From f6326a20f055ddb129a311eaa7273a735e2ed117 Mon Sep 17 00:00:00 2001 From: "Joseph T. French" Date: Mon, 9 Feb 2026 23:35:16 -0600 Subject: [PATCH] Refactor billing API status values and remove unused connection endpoints - Updated status values in `get_checkout_status.py` from `completed` to `active` and added `canceled` status for clarity in resource readiness. - Removed deprecated connection-related files including `create_connection.py`, `create_link_token.py`, `delete_connection.py`, `exchange_link_token.py`, `get_connection.py`, `get_connection_options.py`, and `init_o_auth.py` to streamline the codebase and improve maintainability. --- .../api/billing/get_checkout_status.py | 20 +- .../api/connections/__init__.py | 1 - .../api/connections/create_connection.py | 291 ---------------- .../api/connections/create_link_token.py | 256 -------------- .../api/connections/delete_connection.py | 242 ------------- .../api/connections/exchange_link_token.py | 276 --------------- .../api/connections/get_connection.py | 234 ------------- .../api/connections/get_connection_options.py | 255 -------------- .../api/connections/init_o_auth.py | 202 ----------- .../api/connections/list_connections.py | 285 ---------------- .../api/connections/oauth_callback.py | 295 ---------------- .../api/connections/sync_connection.py | 320 ------------------ robosystems_client/api/views/__init__.py | 1 - robosystems_client/api/views/create_view.py | 248 -------------- robosystems_client/api/views/save_view.py | 302 ----------------- robosystems_client/models/__init__.py | 88 ----- .../models/checkout_status_response.py | 2 +- .../models/connection_options_response.py | 84 ----- .../models/connection_provider_info.py | 205 ----------- .../connection_provider_info_auth_type.py | 11 - .../connection_provider_info_provider.py | 10 - .../models/connection_response.py | 151 --------- .../models/connection_response_metadata.py | 46 --- .../models/connection_response_provider.py | 10 - .../models/create_connection_request.py | 179 ---------- .../create_connection_request_provider.py | 10 - .../models/create_view_request.py | 141 -------- .../models/exchange_token_request.py | 118 ------- .../exchange_token_request_metadata_type_0.py | 46 --- robosystems_client/models/fact_detail.py | 109 ------ .../models/graph_subscription_response.py | 8 + .../models/graph_subscription_tier.py | 9 - .../models/graph_subscriptions.py | 10 - robosystems_client/models/graph_tier_info.py | 8 - .../models/graph_tier_limits.py | 8 - .../models/link_token_request.py | 172 ---------- .../link_token_request_options_type_0.py | 46 --- .../link_token_request_provider_type_0.py | 10 - .../list_connections_provider_type_0.py | 10 - .../models/o_auth_callback_request.py | 132 -------- .../models/o_auth_init_request.py | 130 ------- ...h_init_request_additional_params_type_0.py | 46 --- .../models/o_auth_init_response.py | 80 ----- .../models/plaid_connection_config.py | 209 ------------ ..._connection_config_accounts_type_0_item.py | 46 --- ...id_connection_config_institution_type_0.py | 46 --- .../models/quick_books_connection_config.py | 94 ----- .../models/save_view_request.py | 138 -------- .../models/save_view_response.py | 181 ---------- .../models/sec_connection_config.py | 84 ----- robosystems_client/models/storage_info.py | 62 ---- robosystems_client/models/structure_detail.py | 85 ----- .../models/sync_connection_request.py | 108 ------ ..._connection_request_sync_options_type_0.py | 46 --- ...sync_connection_response_syncconnection.py | 46 --- robosystems_client/models/view_axis_config.py | 276 --------------- .../view_axis_config_element_labels_type_0.py | 46 --- .../view_axis_config_member_labels_type_0.py | 46 --- robosystems_client/models/view_config.py | 127 ------- robosystems_client/models/view_source.py | 144 -------- robosystems_client/models/view_source_type.py | 9 - 61 files changed, 21 insertions(+), 6879 deletions(-) delete mode 100644 robosystems_client/api/connections/__init__.py delete mode 100644 robosystems_client/api/connections/create_connection.py delete mode 100644 robosystems_client/api/connections/create_link_token.py delete mode 100644 robosystems_client/api/connections/delete_connection.py delete mode 100644 robosystems_client/api/connections/exchange_link_token.py delete mode 100644 robosystems_client/api/connections/get_connection.py delete mode 100644 robosystems_client/api/connections/get_connection_options.py delete mode 100644 robosystems_client/api/connections/init_o_auth.py delete mode 100644 robosystems_client/api/connections/list_connections.py delete mode 100644 robosystems_client/api/connections/oauth_callback.py delete mode 100644 robosystems_client/api/connections/sync_connection.py delete mode 100644 robosystems_client/api/views/__init__.py delete mode 100644 robosystems_client/api/views/create_view.py delete mode 100644 robosystems_client/api/views/save_view.py delete mode 100644 robosystems_client/models/connection_options_response.py delete mode 100644 robosystems_client/models/connection_provider_info.py delete mode 100644 robosystems_client/models/connection_provider_info_auth_type.py delete mode 100644 robosystems_client/models/connection_provider_info_provider.py delete mode 100644 robosystems_client/models/connection_response.py delete mode 100644 robosystems_client/models/connection_response_metadata.py delete mode 100644 robosystems_client/models/connection_response_provider.py delete mode 100644 robosystems_client/models/create_connection_request.py delete mode 100644 robosystems_client/models/create_connection_request_provider.py delete mode 100644 robosystems_client/models/create_view_request.py delete mode 100644 robosystems_client/models/exchange_token_request.py delete mode 100644 robosystems_client/models/exchange_token_request_metadata_type_0.py delete mode 100644 robosystems_client/models/fact_detail.py delete mode 100644 robosystems_client/models/link_token_request.py delete mode 100644 robosystems_client/models/link_token_request_options_type_0.py delete mode 100644 robosystems_client/models/link_token_request_provider_type_0.py delete mode 100644 robosystems_client/models/list_connections_provider_type_0.py delete mode 100644 robosystems_client/models/o_auth_callback_request.py delete mode 100644 robosystems_client/models/o_auth_init_request.py delete mode 100644 robosystems_client/models/o_auth_init_request_additional_params_type_0.py delete mode 100644 robosystems_client/models/o_auth_init_response.py delete mode 100644 robosystems_client/models/plaid_connection_config.py delete mode 100644 robosystems_client/models/plaid_connection_config_accounts_type_0_item.py delete mode 100644 robosystems_client/models/plaid_connection_config_institution_type_0.py delete mode 100644 robosystems_client/models/quick_books_connection_config.py delete mode 100644 robosystems_client/models/save_view_request.py delete mode 100644 robosystems_client/models/save_view_response.py delete mode 100644 robosystems_client/models/sec_connection_config.py delete mode 100644 robosystems_client/models/storage_info.py delete mode 100644 robosystems_client/models/structure_detail.py delete mode 100644 robosystems_client/models/sync_connection_request.py delete mode 100644 robosystems_client/models/sync_connection_request_sync_options_type_0.py delete mode 100644 robosystems_client/models/sync_connection_response_syncconnection.py delete mode 100644 robosystems_client/models/view_axis_config.py delete mode 100644 robosystems_client/models/view_axis_config_element_labels_type_0.py delete mode 100644 robosystems_client/models/view_axis_config_member_labels_type_0.py delete mode 100644 robosystems_client/models/view_config.py delete mode 100644 robosystems_client/models/view_source.py delete mode 100644 robosystems_client/models/view_source_type.py diff --git a/robosystems_client/api/billing/get_checkout_status.py b/robosystems_client/api/billing/get_checkout_status.py index 37f85cc..37a10ae 100644 --- a/robosystems_client/api/billing/get_checkout_status.py +++ b/robosystems_client/api/billing/get_checkout_status.py @@ -69,10 +69,11 @@ def sync_detailed( **Status Values:** - `pending_payment`: Waiting for payment to complete - `provisioning`: Payment confirmed, resource being created - - `completed`: Resource is ready (resource_id will be set) + - `active`: Resource is ready (resource_id will be set) - `failed`: Something went wrong (error field will be set) + - `canceled`: Payment was canceled - **When status is 'completed':** + **When status is 'active':** - For graphs: `resource_id` will be the graph_id, and `operation_id` can be used to monitor SSE progress - For repositories: `resource_id` will be the repository name and access is immediately available @@ -114,10 +115,11 @@ def sync( **Status Values:** - `pending_payment`: Waiting for payment to complete - `provisioning`: Payment confirmed, resource being created - - `completed`: Resource is ready (resource_id will be set) + - `active`: Resource is ready (resource_id will be set) - `failed`: Something went wrong (error field will be set) + - `canceled`: Payment was canceled - **When status is 'completed':** + **When status is 'active':** - For graphs: `resource_id` will be the graph_id, and `operation_id` can be used to monitor SSE progress - For repositories: `resource_id` will be the repository name and access is immediately available @@ -154,10 +156,11 @@ async def asyncio_detailed( **Status Values:** - `pending_payment`: Waiting for payment to complete - `provisioning`: Payment confirmed, resource being created - - `completed`: Resource is ready (resource_id will be set) + - `active`: Resource is ready (resource_id will be set) - `failed`: Something went wrong (error field will be set) + - `canceled`: Payment was canceled - **When status is 'completed':** + **When status is 'active':** - For graphs: `resource_id` will be the graph_id, and `operation_id` can be used to monitor SSE progress - For repositories: `resource_id` will be the repository name and access is immediately available @@ -197,10 +200,11 @@ async def asyncio( **Status Values:** - `pending_payment`: Waiting for payment to complete - `provisioning`: Payment confirmed, resource being created - - `completed`: Resource is ready (resource_id will be set) + - `active`: Resource is ready (resource_id will be set) - `failed`: Something went wrong (error field will be set) + - `canceled`: Payment was canceled - **When status is 'completed':** + **When status is 'active':** - For graphs: `resource_id` will be the graph_id, and `operation_id` can be used to monitor SSE progress - For repositories: `resource_id` will be the repository name and access is immediately available diff --git a/robosystems_client/api/connections/__init__.py b/robosystems_client/api/connections/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/robosystems_client/api/connections/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/robosystems_client/api/connections/create_connection.py b/robosystems_client/api/connections/create_connection.py deleted file mode 100644 index ba6094d..0000000 --- a/robosystems_client/api/connections/create_connection.py +++ /dev/null @@ -1,291 +0,0 @@ -from http import HTTPStatus -from typing import Any -from urllib.parse import quote - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.connection_response import ConnectionResponse -from ...models.create_connection_request import CreateConnectionRequest -from ...models.error_response import ErrorResponse -from ...models.http_validation_error import HTTPValidationError -from ...types import Response - - -def _get_kwargs( - graph_id: str, - *, - body: CreateConnectionRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/v1/graphs/{graph_id}/connections".format( - graph_id=quote(str(graph_id), safe=""), - ), - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ConnectionResponse | ErrorResponse | HTTPValidationError | None: - if response.status_code == 201: - response_201 = ConnectionResponse.from_dict(response.json()) - - return response_201 - - if response.status_code == 400: - response_400 = ErrorResponse.from_dict(response.json()) - - return response_400 - - if response.status_code == 403: - response_403 = ErrorResponse.from_dict(response.json()) - - return response_403 - - if response.status_code == 409: - response_409 = ErrorResponse.from_dict(response.json()) - - return response_409 - - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ErrorResponse.from_dict(response.json()) - - return response_500 - - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ConnectionResponse | ErrorResponse | HTTPValidationError]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - graph_id: str, - *, - client: AuthenticatedClient, - body: CreateConnectionRequest, -) -> Response[ConnectionResponse | ErrorResponse | HTTPValidationError]: - """Create Connection - - Create a new data connection for external system integration. - - This endpoint initiates connections to external data sources: - - **SEC Connections**: - - Provide entity CIK for automatic filing retrieval - - No authentication needed - - Begins immediate data sync - - **QuickBooks Connections**: - - Returns OAuth URL for authorization - - Requires admin permissions in QuickBooks - - Complete with OAuth callback - - **Plaid Connections**: - - Returns Plaid Link token - - User completes bank authentication - - Exchange public token for access - - Note: - This operation is included - no credit consumption required. - - Args: - graph_id (str): - body (CreateConnectionRequest): Request to create a new connection. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[ConnectionResponse | ErrorResponse | HTTPValidationError] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - graph_id: str, - *, - client: AuthenticatedClient, - body: CreateConnectionRequest, -) -> ConnectionResponse | ErrorResponse | HTTPValidationError | None: - """Create Connection - - Create a new data connection for external system integration. - - This endpoint initiates connections to external data sources: - - **SEC Connections**: - - Provide entity CIK for automatic filing retrieval - - No authentication needed - - Begins immediate data sync - - **QuickBooks Connections**: - - Returns OAuth URL for authorization - - Requires admin permissions in QuickBooks - - Complete with OAuth callback - - **Plaid Connections**: - - Returns Plaid Link token - - User completes bank authentication - - Exchange public token for access - - Note: - This operation is included - no credit consumption required. - - Args: - graph_id (str): - body (CreateConnectionRequest): Request to create a new connection. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - ConnectionResponse | ErrorResponse | HTTPValidationError - """ - - return sync_detailed( - graph_id=graph_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - graph_id: str, - *, - client: AuthenticatedClient, - body: CreateConnectionRequest, -) -> Response[ConnectionResponse | ErrorResponse | HTTPValidationError]: - """Create Connection - - Create a new data connection for external system integration. - - This endpoint initiates connections to external data sources: - - **SEC Connections**: - - Provide entity CIK for automatic filing retrieval - - No authentication needed - - Begins immediate data sync - - **QuickBooks Connections**: - - Returns OAuth URL for authorization - - Requires admin permissions in QuickBooks - - Complete with OAuth callback - - **Plaid Connections**: - - Returns Plaid Link token - - User completes bank authentication - - Exchange public token for access - - Note: - This operation is included - no credit consumption required. - - Args: - graph_id (str): - body (CreateConnectionRequest): Request to create a new connection. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[ConnectionResponse | ErrorResponse | HTTPValidationError] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - graph_id: str, - *, - client: AuthenticatedClient, - body: CreateConnectionRequest, -) -> ConnectionResponse | ErrorResponse | HTTPValidationError | None: - """Create Connection - - Create a new data connection for external system integration. - - This endpoint initiates connections to external data sources: - - **SEC Connections**: - - Provide entity CIK for automatic filing retrieval - - No authentication needed - - Begins immediate data sync - - **QuickBooks Connections**: - - Returns OAuth URL for authorization - - Requires admin permissions in QuickBooks - - Complete with OAuth callback - - **Plaid Connections**: - - Returns Plaid Link token - - User completes bank authentication - - Exchange public token for access - - Note: - This operation is included - no credit consumption required. - - Args: - graph_id (str): - body (CreateConnectionRequest): Request to create a new connection. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - ConnectionResponse | ErrorResponse | HTTPValidationError - """ - - return ( - await asyncio_detailed( - graph_id=graph_id, - client=client, - body=body, - ) - ).parsed diff --git a/robosystems_client/api/connections/create_link_token.py b/robosystems_client/api/connections/create_link_token.py deleted file mode 100644 index 8d9bc9c..0000000 --- a/robosystems_client/api/connections/create_link_token.py +++ /dev/null @@ -1,256 +0,0 @@ -from http import HTTPStatus -from typing import Any -from urllib.parse import quote - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.error_response import ErrorResponse -from ...models.http_validation_error import HTTPValidationError -from ...models.link_token_request import LinkTokenRequest -from ...types import Response - - -def _get_kwargs( - graph_id: str, - *, - body: LinkTokenRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/v1/graphs/{graph_id}/connections/link/token".format( - graph_id=quote(str(graph_id), safe=""), - ), - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Any | ErrorResponse | HTTPValidationError | None: - if response.status_code == 200: - response_200 = response.json() - return response_200 - - if response.status_code == 400: - response_400 = ErrorResponse.from_dict(response.json()) - - return response_400 - - if response.status_code == 404: - response_404 = ErrorResponse.from_dict(response.json()) - - return response_404 - - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ErrorResponse.from_dict(response.json()) - - return response_500 - - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[Any | ErrorResponse | HTTPValidationError]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - graph_id: str, - *, - client: AuthenticatedClient, - body: LinkTokenRequest, -) -> Response[Any | ErrorResponse | HTTPValidationError]: - """Create Link Token - - Create a link token for embedded authentication providers. - - This endpoint generates a temporary token used to initialize embedded authentication UI. - - Currently supported providers: - - **Plaid**: Bank account connections with real-time transaction access - - The link token: - - Expires after 4 hours - - Is single-use only - - Must be used with the matching frontend SDK - - Includes user and entity context - - No credits are consumed for creating link tokens. - - Args: - graph_id (str): - body (LinkTokenRequest): Request to create a link token for embedded authentication. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Any | ErrorResponse | HTTPValidationError] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - graph_id: str, - *, - client: AuthenticatedClient, - body: LinkTokenRequest, -) -> Any | ErrorResponse | HTTPValidationError | None: - """Create Link Token - - Create a link token for embedded authentication providers. - - This endpoint generates a temporary token used to initialize embedded authentication UI. - - Currently supported providers: - - **Plaid**: Bank account connections with real-time transaction access - - The link token: - - Expires after 4 hours - - Is single-use only - - Must be used with the matching frontend SDK - - Includes user and entity context - - No credits are consumed for creating link tokens. - - Args: - graph_id (str): - body (LinkTokenRequest): Request to create a link token for embedded authentication. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Any | ErrorResponse | HTTPValidationError - """ - - return sync_detailed( - graph_id=graph_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - graph_id: str, - *, - client: AuthenticatedClient, - body: LinkTokenRequest, -) -> Response[Any | ErrorResponse | HTTPValidationError]: - """Create Link Token - - Create a link token for embedded authentication providers. - - This endpoint generates a temporary token used to initialize embedded authentication UI. - - Currently supported providers: - - **Plaid**: Bank account connections with real-time transaction access - - The link token: - - Expires after 4 hours - - Is single-use only - - Must be used with the matching frontend SDK - - Includes user and entity context - - No credits are consumed for creating link tokens. - - Args: - graph_id (str): - body (LinkTokenRequest): Request to create a link token for embedded authentication. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Any | ErrorResponse | HTTPValidationError] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - graph_id: str, - *, - client: AuthenticatedClient, - body: LinkTokenRequest, -) -> Any | ErrorResponse | HTTPValidationError | None: - """Create Link Token - - Create a link token for embedded authentication providers. - - This endpoint generates a temporary token used to initialize embedded authentication UI. - - Currently supported providers: - - **Plaid**: Bank account connections with real-time transaction access - - The link token: - - Expires after 4 hours - - Is single-use only - - Must be used with the matching frontend SDK - - Includes user and entity context - - No credits are consumed for creating link tokens. - - Args: - graph_id (str): - body (LinkTokenRequest): Request to create a link token for embedded authentication. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Any | ErrorResponse | HTTPValidationError - """ - - return ( - await asyncio_detailed( - graph_id=graph_id, - client=client, - body=body, - ) - ).parsed diff --git a/robosystems_client/api/connections/delete_connection.py b/robosystems_client/api/connections/delete_connection.py deleted file mode 100644 index dadb979..0000000 --- a/robosystems_client/api/connections/delete_connection.py +++ /dev/null @@ -1,242 +0,0 @@ -from http import HTTPStatus -from typing import Any -from urllib.parse import quote - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.error_response import ErrorResponse -from ...models.http_validation_error import HTTPValidationError -from ...models.success_response import SuccessResponse -from ...types import Response - - -def _get_kwargs( - graph_id: str, - connection_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "delete", - "url": "/v1/graphs/{graph_id}/connections/{connection_id}".format( - graph_id=quote(str(graph_id), safe=""), - connection_id=quote(str(connection_id), safe=""), - ), - } - - return _kwargs - - -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorResponse | HTTPValidationError | SuccessResponse | None: - if response.status_code == 200: - response_200 = SuccessResponse.from_dict(response.json()) - - return response_200 - - if response.status_code == 403: - response_403 = ErrorResponse.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ErrorResponse.from_dict(response.json()) - - return response_404 - - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ErrorResponse.from_dict(response.json()) - - return response_500 - - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorResponse | HTTPValidationError | SuccessResponse]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - graph_id: str, - connection_id: str, - *, - client: AuthenticatedClient, -) -> Response[ErrorResponse | HTTPValidationError | SuccessResponse]: - """Delete Connection - - Delete a data connection and clean up related resources. - - This operation: - - Removes the connection configuration - - Preserves any imported data in the graph - - Performs provider-specific cleanup - - Revokes stored credentials - - Note: - This operation is included - no credit consumption required. - - Only users with admin role can delete connections. - - Args: - graph_id (str): - connection_id (str): Connection identifier - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[ErrorResponse | HTTPValidationError | SuccessResponse] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - connection_id=connection_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - graph_id: str, - connection_id: str, - *, - client: AuthenticatedClient, -) -> ErrorResponse | HTTPValidationError | SuccessResponse | None: - """Delete Connection - - Delete a data connection and clean up related resources. - - This operation: - - Removes the connection configuration - - Preserves any imported data in the graph - - Performs provider-specific cleanup - - Revokes stored credentials - - Note: - This operation is included - no credit consumption required. - - Only users with admin role can delete connections. - - Args: - graph_id (str): - connection_id (str): Connection identifier - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - ErrorResponse | HTTPValidationError | SuccessResponse - """ - - return sync_detailed( - graph_id=graph_id, - connection_id=connection_id, - client=client, - ).parsed - - -async def asyncio_detailed( - graph_id: str, - connection_id: str, - *, - client: AuthenticatedClient, -) -> Response[ErrorResponse | HTTPValidationError | SuccessResponse]: - """Delete Connection - - Delete a data connection and clean up related resources. - - This operation: - - Removes the connection configuration - - Preserves any imported data in the graph - - Performs provider-specific cleanup - - Revokes stored credentials - - Note: - This operation is included - no credit consumption required. - - Only users with admin role can delete connections. - - Args: - graph_id (str): - connection_id (str): Connection identifier - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[ErrorResponse | HTTPValidationError | SuccessResponse] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - connection_id=connection_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - graph_id: str, - connection_id: str, - *, - client: AuthenticatedClient, -) -> ErrorResponse | HTTPValidationError | SuccessResponse | None: - """Delete Connection - - Delete a data connection and clean up related resources. - - This operation: - - Removes the connection configuration - - Preserves any imported data in the graph - - Performs provider-specific cleanup - - Revokes stored credentials - - Note: - This operation is included - no credit consumption required. - - Only users with admin role can delete connections. - - Args: - graph_id (str): - connection_id (str): Connection identifier - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - ErrorResponse | HTTPValidationError | SuccessResponse - """ - - return ( - await asyncio_detailed( - graph_id=graph_id, - connection_id=connection_id, - client=client, - ) - ).parsed diff --git a/robosystems_client/api/connections/exchange_link_token.py b/robosystems_client/api/connections/exchange_link_token.py deleted file mode 100644 index 75eb4a6..0000000 --- a/robosystems_client/api/connections/exchange_link_token.py +++ /dev/null @@ -1,276 +0,0 @@ -from http import HTTPStatus -from typing import Any -from urllib.parse import quote - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.error_response import ErrorResponse -from ...models.exchange_token_request import ExchangeTokenRequest -from ...models.http_validation_error import HTTPValidationError -from ...types import Response - - -def _get_kwargs( - graph_id: str, - *, - body: ExchangeTokenRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/v1/graphs/{graph_id}/connections/link/exchange".format( - graph_id=quote(str(graph_id), safe=""), - ), - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Any | ErrorResponse | HTTPValidationError | None: - if response.status_code == 200: - response_200 = response.json() - return response_200 - - if response.status_code == 400: - response_400 = ErrorResponse.from_dict(response.json()) - - return response_400 - - if response.status_code == 404: - response_404 = ErrorResponse.from_dict(response.json()) - - return response_404 - - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ErrorResponse.from_dict(response.json()) - - return response_500 - - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[Any | ErrorResponse | HTTPValidationError]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - graph_id: str, - *, - client: AuthenticatedClient, - body: ExchangeTokenRequest, -) -> Response[Any | ErrorResponse | HTTPValidationError]: - """Exchange Link Token - - Exchange a public token for permanent access credentials. - - This completes the embedded authentication flow after user authorization. - - The exchange process: - 1. Validates the temporary public token - 2. Exchanges it for permanent access credentials - 3. Updates the connection with account information - 4. Optionally triggers initial data sync - - Supported providers: - - **Plaid**: Exchanges Plaid Link public token for access token - - Security: - - Public tokens expire after 30 minutes - - Each token can only be exchanged once - - Full audit trail is maintained - - No credits are consumed for token exchange. - - Args: - graph_id (str): - body (ExchangeTokenRequest): Exchange temporary token for permanent credentials. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Any | ErrorResponse | HTTPValidationError] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - graph_id: str, - *, - client: AuthenticatedClient, - body: ExchangeTokenRequest, -) -> Any | ErrorResponse | HTTPValidationError | None: - """Exchange Link Token - - Exchange a public token for permanent access credentials. - - This completes the embedded authentication flow after user authorization. - - The exchange process: - 1. Validates the temporary public token - 2. Exchanges it for permanent access credentials - 3. Updates the connection with account information - 4. Optionally triggers initial data sync - - Supported providers: - - **Plaid**: Exchanges Plaid Link public token for access token - - Security: - - Public tokens expire after 30 minutes - - Each token can only be exchanged once - - Full audit trail is maintained - - No credits are consumed for token exchange. - - Args: - graph_id (str): - body (ExchangeTokenRequest): Exchange temporary token for permanent credentials. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Any | ErrorResponse | HTTPValidationError - """ - - return sync_detailed( - graph_id=graph_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - graph_id: str, - *, - client: AuthenticatedClient, - body: ExchangeTokenRequest, -) -> Response[Any | ErrorResponse | HTTPValidationError]: - """Exchange Link Token - - Exchange a public token for permanent access credentials. - - This completes the embedded authentication flow after user authorization. - - The exchange process: - 1. Validates the temporary public token - 2. Exchanges it for permanent access credentials - 3. Updates the connection with account information - 4. Optionally triggers initial data sync - - Supported providers: - - **Plaid**: Exchanges Plaid Link public token for access token - - Security: - - Public tokens expire after 30 minutes - - Each token can only be exchanged once - - Full audit trail is maintained - - No credits are consumed for token exchange. - - Args: - graph_id (str): - body (ExchangeTokenRequest): Exchange temporary token for permanent credentials. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Any | ErrorResponse | HTTPValidationError] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - graph_id: str, - *, - client: AuthenticatedClient, - body: ExchangeTokenRequest, -) -> Any | ErrorResponse | HTTPValidationError | None: - """Exchange Link Token - - Exchange a public token for permanent access credentials. - - This completes the embedded authentication flow after user authorization. - - The exchange process: - 1. Validates the temporary public token - 2. Exchanges it for permanent access credentials - 3. Updates the connection with account information - 4. Optionally triggers initial data sync - - Supported providers: - - **Plaid**: Exchanges Plaid Link public token for access token - - Security: - - Public tokens expire after 30 minutes - - Each token can only be exchanged once - - Full audit trail is maintained - - No credits are consumed for token exchange. - - Args: - graph_id (str): - body (ExchangeTokenRequest): Exchange temporary token for permanent credentials. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Any | ErrorResponse | HTTPValidationError - """ - - return ( - await asyncio_detailed( - graph_id=graph_id, - client=client, - body=body, - ) - ).parsed diff --git a/robosystems_client/api/connections/get_connection.py b/robosystems_client/api/connections/get_connection.py deleted file mode 100644 index 433f981..0000000 --- a/robosystems_client/api/connections/get_connection.py +++ /dev/null @@ -1,234 +0,0 @@ -from http import HTTPStatus -from typing import Any -from urllib.parse import quote - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.connection_response import ConnectionResponse -from ...models.error_response import ErrorResponse -from ...models.http_validation_error import HTTPValidationError -from ...types import Response - - -def _get_kwargs( - graph_id: str, - connection_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/v1/graphs/{graph_id}/connections/{connection_id}".format( - graph_id=quote(str(graph_id), safe=""), - connection_id=quote(str(connection_id), safe=""), - ), - } - - return _kwargs - - -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ConnectionResponse | ErrorResponse | HTTPValidationError | None: - if response.status_code == 200: - response_200 = ConnectionResponse.from_dict(response.json()) - - return response_200 - - if response.status_code == 403: - response_403 = ErrorResponse.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ErrorResponse.from_dict(response.json()) - - return response_404 - - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ErrorResponse.from_dict(response.json()) - - return response_500 - - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ConnectionResponse | ErrorResponse | HTTPValidationError]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - graph_id: str, - connection_id: str, - *, - client: AuthenticatedClient, -) -> Response[ConnectionResponse | ErrorResponse | HTTPValidationError]: - """Get Connection - - Get detailed information about a specific connection. - - Returns comprehensive connection details including: - - Current status and health indicators - - Authentication state - - Sync history and statistics - - Error details if any - - Provider-specific metadata - - No credits are consumed for viewing connection details. - - Args: - graph_id (str): - connection_id (str): Unique connection identifier - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[ConnectionResponse | ErrorResponse | HTTPValidationError] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - connection_id=connection_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - graph_id: str, - connection_id: str, - *, - client: AuthenticatedClient, -) -> ConnectionResponse | ErrorResponse | HTTPValidationError | None: - """Get Connection - - Get detailed information about a specific connection. - - Returns comprehensive connection details including: - - Current status and health indicators - - Authentication state - - Sync history and statistics - - Error details if any - - Provider-specific metadata - - No credits are consumed for viewing connection details. - - Args: - graph_id (str): - connection_id (str): Unique connection identifier - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - ConnectionResponse | ErrorResponse | HTTPValidationError - """ - - return sync_detailed( - graph_id=graph_id, - connection_id=connection_id, - client=client, - ).parsed - - -async def asyncio_detailed( - graph_id: str, - connection_id: str, - *, - client: AuthenticatedClient, -) -> Response[ConnectionResponse | ErrorResponse | HTTPValidationError]: - """Get Connection - - Get detailed information about a specific connection. - - Returns comprehensive connection details including: - - Current status and health indicators - - Authentication state - - Sync history and statistics - - Error details if any - - Provider-specific metadata - - No credits are consumed for viewing connection details. - - Args: - graph_id (str): - connection_id (str): Unique connection identifier - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[ConnectionResponse | ErrorResponse | HTTPValidationError] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - connection_id=connection_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - graph_id: str, - connection_id: str, - *, - client: AuthenticatedClient, -) -> ConnectionResponse | ErrorResponse | HTTPValidationError | None: - """Get Connection - - Get detailed information about a specific connection. - - Returns comprehensive connection details including: - - Current status and health indicators - - Authentication state - - Sync history and statistics - - Error details if any - - Provider-specific metadata - - No credits are consumed for viewing connection details. - - Args: - graph_id (str): - connection_id (str): Unique connection identifier - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - ConnectionResponse | ErrorResponse | HTTPValidationError - """ - - return ( - await asyncio_detailed( - graph_id=graph_id, - connection_id=connection_id, - client=client, - ) - ).parsed diff --git a/robosystems_client/api/connections/get_connection_options.py b/robosystems_client/api/connections/get_connection_options.py deleted file mode 100644 index 718225b..0000000 --- a/robosystems_client/api/connections/get_connection_options.py +++ /dev/null @@ -1,255 +0,0 @@ -from http import HTTPStatus -from typing import Any -from urllib.parse import quote - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.connection_options_response import ConnectionOptionsResponse -from ...models.error_response import ErrorResponse -from ...models.http_validation_error import HTTPValidationError -from ...types import Response - - -def _get_kwargs( - graph_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/v1/graphs/{graph_id}/connections/options".format( - graph_id=quote(str(graph_id), safe=""), - ), - } - - return _kwargs - - -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ConnectionOptionsResponse | ErrorResponse | HTTPValidationError | None: - if response.status_code == 200: - response_200 = ConnectionOptionsResponse.from_dict(response.json()) - - return response_200 - - if response.status_code == 403: - response_403 = ErrorResponse.from_dict(response.json()) - - return response_403 - - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ErrorResponse.from_dict(response.json()) - - return response_500 - - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ConnectionOptionsResponse | ErrorResponse | HTTPValidationError]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - graph_id: str, - *, - client: AuthenticatedClient, -) -> Response[ConnectionOptionsResponse | ErrorResponse | HTTPValidationError]: - """List Connection Options - - Get metadata about all available data connection providers. - - This endpoint returns comprehensive information about each supported provider: - - **SEC EDGAR**: Public entity financial filings - - No authentication required (public data) - - 10-K, 10-Q, 8-K reports with XBRL data - - Historical and real-time filing access - - **QuickBooks Online**: Full accounting system integration - - OAuth 2.0 authentication - - Chart of accounts, transactions, trial balance - - Real-time sync capabilities - - **Plaid**: Bank account connections - - Secure bank authentication via Plaid Link - - Transaction history and balances - - Multi-account support - - No credits are consumed for viewing connection options. - - Args: - graph_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[ConnectionOptionsResponse | ErrorResponse | HTTPValidationError] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - graph_id: str, - *, - client: AuthenticatedClient, -) -> ConnectionOptionsResponse | ErrorResponse | HTTPValidationError | None: - """List Connection Options - - Get metadata about all available data connection providers. - - This endpoint returns comprehensive information about each supported provider: - - **SEC EDGAR**: Public entity financial filings - - No authentication required (public data) - - 10-K, 10-Q, 8-K reports with XBRL data - - Historical and real-time filing access - - **QuickBooks Online**: Full accounting system integration - - OAuth 2.0 authentication - - Chart of accounts, transactions, trial balance - - Real-time sync capabilities - - **Plaid**: Bank account connections - - Secure bank authentication via Plaid Link - - Transaction history and balances - - Multi-account support - - No credits are consumed for viewing connection options. - - Args: - graph_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - ConnectionOptionsResponse | ErrorResponse | HTTPValidationError - """ - - return sync_detailed( - graph_id=graph_id, - client=client, - ).parsed - - -async def asyncio_detailed( - graph_id: str, - *, - client: AuthenticatedClient, -) -> Response[ConnectionOptionsResponse | ErrorResponse | HTTPValidationError]: - """List Connection Options - - Get metadata about all available data connection providers. - - This endpoint returns comprehensive information about each supported provider: - - **SEC EDGAR**: Public entity financial filings - - No authentication required (public data) - - 10-K, 10-Q, 8-K reports with XBRL data - - Historical and real-time filing access - - **QuickBooks Online**: Full accounting system integration - - OAuth 2.0 authentication - - Chart of accounts, transactions, trial balance - - Real-time sync capabilities - - **Plaid**: Bank account connections - - Secure bank authentication via Plaid Link - - Transaction history and balances - - Multi-account support - - No credits are consumed for viewing connection options. - - Args: - graph_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[ConnectionOptionsResponse | ErrorResponse | HTTPValidationError] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - graph_id: str, - *, - client: AuthenticatedClient, -) -> ConnectionOptionsResponse | ErrorResponse | HTTPValidationError | None: - """List Connection Options - - Get metadata about all available data connection providers. - - This endpoint returns comprehensive information about each supported provider: - - **SEC EDGAR**: Public entity financial filings - - No authentication required (public data) - - 10-K, 10-Q, 8-K reports with XBRL data - - Historical and real-time filing access - - **QuickBooks Online**: Full accounting system integration - - OAuth 2.0 authentication - - Chart of accounts, transactions, trial balance - - Real-time sync capabilities - - **Plaid**: Bank account connections - - Secure bank authentication via Plaid Link - - Transaction history and balances - - Multi-account support - - No credits are consumed for viewing connection options. - - Args: - graph_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - ConnectionOptionsResponse | ErrorResponse | HTTPValidationError - """ - - return ( - await asyncio_detailed( - graph_id=graph_id, - client=client, - ) - ).parsed diff --git a/robosystems_client/api/connections/init_o_auth.py b/robosystems_client/api/connections/init_o_auth.py deleted file mode 100644 index d72a88e..0000000 --- a/robosystems_client/api/connections/init_o_auth.py +++ /dev/null @@ -1,202 +0,0 @@ -from http import HTTPStatus -from typing import Any -from urllib.parse import quote - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.http_validation_error import HTTPValidationError -from ...models.o_auth_init_request import OAuthInitRequest -from ...models.o_auth_init_response import OAuthInitResponse -from ...types import Response - - -def _get_kwargs( - graph_id: str, - *, - body: OAuthInitRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/v1/graphs/{graph_id}/connections/oauth/init".format( - graph_id=quote(str(graph_id), safe=""), - ), - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> HTTPValidationError | OAuthInitResponse | None: - if response.status_code == 200: - response_200 = OAuthInitResponse.from_dict(response.json()) - - return response_200 - - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[HTTPValidationError | OAuthInitResponse]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - graph_id: str, - *, - client: AuthenticatedClient, - body: OAuthInitRequest, -) -> Response[HTTPValidationError | OAuthInitResponse]: - """Init Oauth - - Initialize OAuth flow for a connection. - - This generates an authorization URL that the frontend should redirect the user to. - Currently supports: QuickBooks - - Args: - graph_id (str): - body (OAuthInitRequest): Request to initiate OAuth flow. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[HTTPValidationError | OAuthInitResponse] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - graph_id: str, - *, - client: AuthenticatedClient, - body: OAuthInitRequest, -) -> HTTPValidationError | OAuthInitResponse | None: - """Init Oauth - - Initialize OAuth flow for a connection. - - This generates an authorization URL that the frontend should redirect the user to. - Currently supports: QuickBooks - - Args: - graph_id (str): - body (OAuthInitRequest): Request to initiate OAuth flow. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - HTTPValidationError | OAuthInitResponse - """ - - return sync_detailed( - graph_id=graph_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - graph_id: str, - *, - client: AuthenticatedClient, - body: OAuthInitRequest, -) -> Response[HTTPValidationError | OAuthInitResponse]: - """Init Oauth - - Initialize OAuth flow for a connection. - - This generates an authorization URL that the frontend should redirect the user to. - Currently supports: QuickBooks - - Args: - graph_id (str): - body (OAuthInitRequest): Request to initiate OAuth flow. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[HTTPValidationError | OAuthInitResponse] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - graph_id: str, - *, - client: AuthenticatedClient, - body: OAuthInitRequest, -) -> HTTPValidationError | OAuthInitResponse | None: - """Init Oauth - - Initialize OAuth flow for a connection. - - This generates an authorization URL that the frontend should redirect the user to. - Currently supports: QuickBooks - - Args: - graph_id (str): - body (OAuthInitRequest): Request to initiate OAuth flow. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - HTTPValidationError | OAuthInitResponse - """ - - return ( - await asyncio_detailed( - graph_id=graph_id, - client=client, - body=body, - ) - ).parsed diff --git a/robosystems_client/api/connections/list_connections.py b/robosystems_client/api/connections/list_connections.py deleted file mode 100644 index 8f2e8ae..0000000 --- a/robosystems_client/api/connections/list_connections.py +++ /dev/null @@ -1,285 +0,0 @@ -from http import HTTPStatus -from typing import Any -from urllib.parse import quote - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.connection_response import ConnectionResponse -from ...models.error_response import ErrorResponse -from ...models.http_validation_error import HTTPValidationError -from ...models.list_connections_provider_type_0 import ListConnectionsProviderType0 -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - graph_id: str, - *, - entity_id: None | str | Unset = UNSET, - provider: ListConnectionsProviderType0 | None | Unset = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - json_entity_id: None | str | Unset - if isinstance(entity_id, Unset): - json_entity_id = UNSET - else: - json_entity_id = entity_id - params["entity_id"] = json_entity_id - - json_provider: None | str | Unset - if isinstance(provider, Unset): - json_provider = UNSET - elif isinstance(provider, ListConnectionsProviderType0): - json_provider = provider.value - else: - json_provider = provider - params["provider"] = json_provider - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - _kwargs: dict[str, Any] = { - "method": "get", - "url": "/v1/graphs/{graph_id}/connections".format( - graph_id=quote(str(graph_id), safe=""), - ), - "params": params, - } - - return _kwargs - - -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorResponse | HTTPValidationError | list[ConnectionResponse] | None: - if response.status_code == 200: - response_200 = [] - _response_200 = response.json() - for response_200_item_data in _response_200: - response_200_item = ConnectionResponse.from_dict(response_200_item_data) - - response_200.append(response_200_item) - - return response_200 - - if response.status_code == 403: - response_403 = ErrorResponse.from_dict(response.json()) - - return response_403 - - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ErrorResponse.from_dict(response.json()) - - return response_500 - - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorResponse | HTTPValidationError | list[ConnectionResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - graph_id: str, - *, - client: AuthenticatedClient, - entity_id: None | str | Unset = UNSET, - provider: ListConnectionsProviderType0 | None | Unset = UNSET, -) -> Response[ErrorResponse | HTTPValidationError | list[ConnectionResponse]]: - """List Connections - - List all data connections in the graph. - - Returns active and inactive connections with their current status. - Connections can be filtered by: - - **Entity**: Show connections for a specific entity - - **Provider**: Filter by connection type (sec, quickbooks, plaid) - - Each connection shows: - - Current sync status and health - - Last successful sync timestamp - - Configuration metadata - - Error messages if any - - No credits are consumed for listing connections. - - Args: - graph_id (str): - entity_id (None | str | Unset): Filter by entity ID - provider (ListConnectionsProviderType0 | None | Unset): Filter by provider type - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[ErrorResponse | HTTPValidationError | list[ConnectionResponse]] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - entity_id=entity_id, - provider=provider, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - graph_id: str, - *, - client: AuthenticatedClient, - entity_id: None | str | Unset = UNSET, - provider: ListConnectionsProviderType0 | None | Unset = UNSET, -) -> ErrorResponse | HTTPValidationError | list[ConnectionResponse] | None: - """List Connections - - List all data connections in the graph. - - Returns active and inactive connections with their current status. - Connections can be filtered by: - - **Entity**: Show connections for a specific entity - - **Provider**: Filter by connection type (sec, quickbooks, plaid) - - Each connection shows: - - Current sync status and health - - Last successful sync timestamp - - Configuration metadata - - Error messages if any - - No credits are consumed for listing connections. - - Args: - graph_id (str): - entity_id (None | str | Unset): Filter by entity ID - provider (ListConnectionsProviderType0 | None | Unset): Filter by provider type - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - ErrorResponse | HTTPValidationError | list[ConnectionResponse] - """ - - return sync_detailed( - graph_id=graph_id, - client=client, - entity_id=entity_id, - provider=provider, - ).parsed - - -async def asyncio_detailed( - graph_id: str, - *, - client: AuthenticatedClient, - entity_id: None | str | Unset = UNSET, - provider: ListConnectionsProviderType0 | None | Unset = UNSET, -) -> Response[ErrorResponse | HTTPValidationError | list[ConnectionResponse]]: - """List Connections - - List all data connections in the graph. - - Returns active and inactive connections with their current status. - Connections can be filtered by: - - **Entity**: Show connections for a specific entity - - **Provider**: Filter by connection type (sec, quickbooks, plaid) - - Each connection shows: - - Current sync status and health - - Last successful sync timestamp - - Configuration metadata - - Error messages if any - - No credits are consumed for listing connections. - - Args: - graph_id (str): - entity_id (None | str | Unset): Filter by entity ID - provider (ListConnectionsProviderType0 | None | Unset): Filter by provider type - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[ErrorResponse | HTTPValidationError | list[ConnectionResponse]] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - entity_id=entity_id, - provider=provider, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - graph_id: str, - *, - client: AuthenticatedClient, - entity_id: None | str | Unset = UNSET, - provider: ListConnectionsProviderType0 | None | Unset = UNSET, -) -> ErrorResponse | HTTPValidationError | list[ConnectionResponse] | None: - """List Connections - - List all data connections in the graph. - - Returns active and inactive connections with their current status. - Connections can be filtered by: - - **Entity**: Show connections for a specific entity - - **Provider**: Filter by connection type (sec, quickbooks, plaid) - - Each connection shows: - - Current sync status and health - - Last successful sync timestamp - - Configuration metadata - - Error messages if any - - No credits are consumed for listing connections. - - Args: - graph_id (str): - entity_id (None | str | Unset): Filter by entity ID - provider (ListConnectionsProviderType0 | None | Unset): Filter by provider type - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - ErrorResponse | HTTPValidationError | list[ConnectionResponse] - """ - - return ( - await asyncio_detailed( - graph_id=graph_id, - client=client, - entity_id=entity_id, - provider=provider, - ) - ).parsed diff --git a/robosystems_client/api/connections/oauth_callback.py b/robosystems_client/api/connections/oauth_callback.py deleted file mode 100644 index a091731..0000000 --- a/robosystems_client/api/connections/oauth_callback.py +++ /dev/null @@ -1,295 +0,0 @@ -from http import HTTPStatus -from typing import Any -from urllib.parse import quote - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.error_response import ErrorResponse -from ...models.http_validation_error import HTTPValidationError -from ...models.o_auth_callback_request import OAuthCallbackRequest -from ...types import Response - - -def _get_kwargs( - graph_id: str, - provider: str, - *, - body: OAuthCallbackRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/v1/graphs/{graph_id}/connections/oauth/callback/{provider}".format( - graph_id=quote(str(graph_id), safe=""), - provider=quote(str(provider), safe=""), - ), - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Any | ErrorResponse | HTTPValidationError | None: - if response.status_code == 200: - response_200 = response.json() - return response_200 - - if response.status_code == 400: - response_400 = ErrorResponse.from_dict(response.json()) - - return response_400 - - if response.status_code == 403: - response_403 = ErrorResponse.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ErrorResponse.from_dict(response.json()) - - return response_404 - - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ErrorResponse.from_dict(response.json()) - - return response_500 - - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[Any | ErrorResponse | HTTPValidationError]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - graph_id: str, - provider: str, - *, - client: AuthenticatedClient, - body: OAuthCallbackRequest, -) -> Response[Any | ErrorResponse | HTTPValidationError]: - """OAuth Callback - - Handle OAuth callback from provider after user authorization. - - This endpoint completes the OAuth flow: - 1. Validates the OAuth state parameter - 2. Exchanges authorization code for access tokens - 3. Stores tokens securely - 4. Updates connection status - 5. Optionally triggers initial sync - - Supported providers: - - **QuickBooks**: Accounting data integration - - Security measures: - - State validation prevents session hijacking - - User context is verified - - Tokens are encrypted before storage - - Full audit trail is maintained - - No credits are consumed for OAuth callbacks. - - Args: - graph_id (str): - provider (str): OAuth provider name - body (OAuthCallbackRequest): OAuth callback parameters. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Any | ErrorResponse | HTTPValidationError] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - provider=provider, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - graph_id: str, - provider: str, - *, - client: AuthenticatedClient, - body: OAuthCallbackRequest, -) -> Any | ErrorResponse | HTTPValidationError | None: - """OAuth Callback - - Handle OAuth callback from provider after user authorization. - - This endpoint completes the OAuth flow: - 1. Validates the OAuth state parameter - 2. Exchanges authorization code for access tokens - 3. Stores tokens securely - 4. Updates connection status - 5. Optionally triggers initial sync - - Supported providers: - - **QuickBooks**: Accounting data integration - - Security measures: - - State validation prevents session hijacking - - User context is verified - - Tokens are encrypted before storage - - Full audit trail is maintained - - No credits are consumed for OAuth callbacks. - - Args: - graph_id (str): - provider (str): OAuth provider name - body (OAuthCallbackRequest): OAuth callback parameters. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Any | ErrorResponse | HTTPValidationError - """ - - return sync_detailed( - graph_id=graph_id, - provider=provider, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - graph_id: str, - provider: str, - *, - client: AuthenticatedClient, - body: OAuthCallbackRequest, -) -> Response[Any | ErrorResponse | HTTPValidationError]: - """OAuth Callback - - Handle OAuth callback from provider after user authorization. - - This endpoint completes the OAuth flow: - 1. Validates the OAuth state parameter - 2. Exchanges authorization code for access tokens - 3. Stores tokens securely - 4. Updates connection status - 5. Optionally triggers initial sync - - Supported providers: - - **QuickBooks**: Accounting data integration - - Security measures: - - State validation prevents session hijacking - - User context is verified - - Tokens are encrypted before storage - - Full audit trail is maintained - - No credits are consumed for OAuth callbacks. - - Args: - graph_id (str): - provider (str): OAuth provider name - body (OAuthCallbackRequest): OAuth callback parameters. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Any | ErrorResponse | HTTPValidationError] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - provider=provider, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - graph_id: str, - provider: str, - *, - client: AuthenticatedClient, - body: OAuthCallbackRequest, -) -> Any | ErrorResponse | HTTPValidationError | None: - """OAuth Callback - - Handle OAuth callback from provider after user authorization. - - This endpoint completes the OAuth flow: - 1. Validates the OAuth state parameter - 2. Exchanges authorization code for access tokens - 3. Stores tokens securely - 4. Updates connection status - 5. Optionally triggers initial sync - - Supported providers: - - **QuickBooks**: Accounting data integration - - Security measures: - - State validation prevents session hijacking - - User context is verified - - Tokens are encrypted before storage - - Full audit trail is maintained - - No credits are consumed for OAuth callbacks. - - Args: - graph_id (str): - provider (str): OAuth provider name - body (OAuthCallbackRequest): OAuth callback parameters. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Any | ErrorResponse | HTTPValidationError - """ - - return ( - await asyncio_detailed( - graph_id=graph_id, - provider=provider, - client=client, - body=body, - ) - ).parsed diff --git a/robosystems_client/api/connections/sync_connection.py b/robosystems_client/api/connections/sync_connection.py deleted file mode 100644 index cb73e07..0000000 --- a/robosystems_client/api/connections/sync_connection.py +++ /dev/null @@ -1,320 +0,0 @@ -from http import HTTPStatus -from typing import Any -from urllib.parse import quote - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.error_response import ErrorResponse -from ...models.http_validation_error import HTTPValidationError -from ...models.sync_connection_request import SyncConnectionRequest -from ...models.sync_connection_response_syncconnection import ( - SyncConnectionResponseSyncconnection, -) -from ...types import Response - - -def _get_kwargs( - graph_id: str, - connection_id: str, - *, - body: SyncConnectionRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/v1/graphs/{graph_id}/connections/{connection_id}/sync".format( - graph_id=quote(str(graph_id), safe=""), - connection_id=quote(str(connection_id), safe=""), - ), - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorResponse | HTTPValidationError | SyncConnectionResponseSyncconnection | None: - if response.status_code == 200: - response_200 = SyncConnectionResponseSyncconnection.from_dict(response.json()) - - return response_200 - - if response.status_code == 403: - response_403 = ErrorResponse.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ErrorResponse.from_dict(response.json()) - - return response_404 - - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - - if response.status_code == 500: - response_500 = ErrorResponse.from_dict(response.json()) - - return response_500 - - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ - ErrorResponse | HTTPValidationError | SyncConnectionResponseSyncconnection -]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - graph_id: str, - connection_id: str, - *, - client: AuthenticatedClient, - body: SyncConnectionRequest, -) -> Response[ - ErrorResponse | HTTPValidationError | SyncConnectionResponseSyncconnection -]: - """Sync Connection - - Trigger a data synchronization for the connection. - - Initiates data sync based on provider type: - - **SEC Sync**: - - Downloads latest filings from EDGAR - - Parses XBRL data and updates graph - - Typically completes in 5-10 minutes - - **QuickBooks Sync**: - - Fetches latest transactions and balances - - Updates chart of accounts - - Generates fresh trial balance - - Duration depends on data volume - - **Plaid Sync**: - - Retrieves recent bank transactions - - Updates account balances - - Categorizes new transactions - - Note: - This operation is included - no credit consumption required. - - Returns a task ID for monitoring sync progress. - - Args: - graph_id (str): - connection_id (str): Connection identifier - body (SyncConnectionRequest): Request to sync a connection. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[ErrorResponse | HTTPValidationError | SyncConnectionResponseSyncconnection] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - connection_id=connection_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - graph_id: str, - connection_id: str, - *, - client: AuthenticatedClient, - body: SyncConnectionRequest, -) -> ErrorResponse | HTTPValidationError | SyncConnectionResponseSyncconnection | None: - """Sync Connection - - Trigger a data synchronization for the connection. - - Initiates data sync based on provider type: - - **SEC Sync**: - - Downloads latest filings from EDGAR - - Parses XBRL data and updates graph - - Typically completes in 5-10 minutes - - **QuickBooks Sync**: - - Fetches latest transactions and balances - - Updates chart of accounts - - Generates fresh trial balance - - Duration depends on data volume - - **Plaid Sync**: - - Retrieves recent bank transactions - - Updates account balances - - Categorizes new transactions - - Note: - This operation is included - no credit consumption required. - - Returns a task ID for monitoring sync progress. - - Args: - graph_id (str): - connection_id (str): Connection identifier - body (SyncConnectionRequest): Request to sync a connection. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - ErrorResponse | HTTPValidationError | SyncConnectionResponseSyncconnection - """ - - return sync_detailed( - graph_id=graph_id, - connection_id=connection_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - graph_id: str, - connection_id: str, - *, - client: AuthenticatedClient, - body: SyncConnectionRequest, -) -> Response[ - ErrorResponse | HTTPValidationError | SyncConnectionResponseSyncconnection -]: - """Sync Connection - - Trigger a data synchronization for the connection. - - Initiates data sync based on provider type: - - **SEC Sync**: - - Downloads latest filings from EDGAR - - Parses XBRL data and updates graph - - Typically completes in 5-10 minutes - - **QuickBooks Sync**: - - Fetches latest transactions and balances - - Updates chart of accounts - - Generates fresh trial balance - - Duration depends on data volume - - **Plaid Sync**: - - Retrieves recent bank transactions - - Updates account balances - - Categorizes new transactions - - Note: - This operation is included - no credit consumption required. - - Returns a task ID for monitoring sync progress. - - Args: - graph_id (str): - connection_id (str): Connection identifier - body (SyncConnectionRequest): Request to sync a connection. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[ErrorResponse | HTTPValidationError | SyncConnectionResponseSyncconnection] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - connection_id=connection_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - graph_id: str, - connection_id: str, - *, - client: AuthenticatedClient, - body: SyncConnectionRequest, -) -> ErrorResponse | HTTPValidationError | SyncConnectionResponseSyncconnection | None: - """Sync Connection - - Trigger a data synchronization for the connection. - - Initiates data sync based on provider type: - - **SEC Sync**: - - Downloads latest filings from EDGAR - - Parses XBRL data and updates graph - - Typically completes in 5-10 minutes - - **QuickBooks Sync**: - - Fetches latest transactions and balances - - Updates chart of accounts - - Generates fresh trial balance - - Duration depends on data volume - - **Plaid Sync**: - - Retrieves recent bank transactions - - Updates account balances - - Categorizes new transactions - - Note: - This operation is included - no credit consumption required. - - Returns a task ID for monitoring sync progress. - - Args: - graph_id (str): - connection_id (str): Connection identifier - body (SyncConnectionRequest): Request to sync a connection. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - ErrorResponse | HTTPValidationError | SyncConnectionResponseSyncconnection - """ - - return ( - await asyncio_detailed( - graph_id=graph_id, - connection_id=connection_id, - client=client, - body=body, - ) - ).parsed diff --git a/robosystems_client/api/views/__init__.py b/robosystems_client/api/views/__init__.py deleted file mode 100644 index 2d7c0b2..0000000 --- a/robosystems_client/api/views/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Contains endpoint functions for accessing the API""" diff --git a/robosystems_client/api/views/create_view.py b/robosystems_client/api/views/create_view.py deleted file mode 100644 index df4a91c..0000000 --- a/robosystems_client/api/views/create_view.py +++ /dev/null @@ -1,248 +0,0 @@ -from http import HTTPStatus -from typing import Any -from urllib.parse import quote - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.create_view_request import CreateViewRequest -from ...models.http_validation_error import HTTPValidationError -from ...types import Response - - -def _get_kwargs( - graph_id: str, - *, - body: CreateViewRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/v1/graphs/{graph_id}/views".format( - graph_id=quote(str(graph_id), safe=""), - ), - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Any | HTTPValidationError | None: - if response.status_code == 200: - response_200 = response.json() - return response_200 - - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[Any | HTTPValidationError]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - graph_id: str, - *, - client: AuthenticatedClient, - body: CreateViewRequest, -) -> Response[Any | HTTPValidationError]: - """Create View - - Generate financial report view from data source (dual-mode support). - - **Mode 1: Transaction Aggregation (generate_from_transactions)** - - Aggregates raw transaction data to trial balance - - Creates facts on-demand - - Shows real-time reporting from source of truth - - **Mode 2: Existing Facts (pivot_existing_facts)** - - Queries existing Fact nodes - - Supports multi-dimensional analysis - - Works with SEC filings and pre-computed facts - - Both modes: - - Build FactGrid from data - - Generate pivot table presentation - - Return consistent response format - - Args: - graph_id (str): - body (CreateViewRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Any | HTTPValidationError] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - graph_id: str, - *, - client: AuthenticatedClient, - body: CreateViewRequest, -) -> Any | HTTPValidationError | None: - """Create View - - Generate financial report view from data source (dual-mode support). - - **Mode 1: Transaction Aggregation (generate_from_transactions)** - - Aggregates raw transaction data to trial balance - - Creates facts on-demand - - Shows real-time reporting from source of truth - - **Mode 2: Existing Facts (pivot_existing_facts)** - - Queries existing Fact nodes - - Supports multi-dimensional analysis - - Works with SEC filings and pre-computed facts - - Both modes: - - Build FactGrid from data - - Generate pivot table presentation - - Return consistent response format - - Args: - graph_id (str): - body (CreateViewRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Any | HTTPValidationError - """ - - return sync_detailed( - graph_id=graph_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - graph_id: str, - *, - client: AuthenticatedClient, - body: CreateViewRequest, -) -> Response[Any | HTTPValidationError]: - """Create View - - Generate financial report view from data source (dual-mode support). - - **Mode 1: Transaction Aggregation (generate_from_transactions)** - - Aggregates raw transaction data to trial balance - - Creates facts on-demand - - Shows real-time reporting from source of truth - - **Mode 2: Existing Facts (pivot_existing_facts)** - - Queries existing Fact nodes - - Supports multi-dimensional analysis - - Works with SEC filings and pre-computed facts - - Both modes: - - Build FactGrid from data - - Generate pivot table presentation - - Return consistent response format - - Args: - graph_id (str): - body (CreateViewRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Any | HTTPValidationError] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - graph_id: str, - *, - client: AuthenticatedClient, - body: CreateViewRequest, -) -> Any | HTTPValidationError | None: - """Create View - - Generate financial report view from data source (dual-mode support). - - **Mode 1: Transaction Aggregation (generate_from_transactions)** - - Aggregates raw transaction data to trial balance - - Creates facts on-demand - - Shows real-time reporting from source of truth - - **Mode 2: Existing Facts (pivot_existing_facts)** - - Queries existing Fact nodes - - Supports multi-dimensional analysis - - Works with SEC filings and pre-computed facts - - Both modes: - - Build FactGrid from data - - Generate pivot table presentation - - Return consistent response format - - Args: - graph_id (str): - body (CreateViewRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Any | HTTPValidationError - """ - - return ( - await asyncio_detailed( - graph_id=graph_id, - client=client, - body=body, - ) - ).parsed diff --git a/robosystems_client/api/views/save_view.py b/robosystems_client/api/views/save_view.py deleted file mode 100644 index 93f311b..0000000 --- a/robosystems_client/api/views/save_view.py +++ /dev/null @@ -1,302 +0,0 @@ -from http import HTTPStatus -from typing import Any -from urllib.parse import quote - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.http_validation_error import HTTPValidationError -from ...models.save_view_request import SaveViewRequest -from ...models.save_view_response import SaveViewResponse -from ...types import Response - - -def _get_kwargs( - graph_id: str, - *, - body: SaveViewRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/v1/graphs/{graph_id}/views/save".format( - graph_id=quote(str(graph_id), safe=""), - ), - } - - _kwargs["json"] = body.to_dict() - - headers["Content-Type"] = "application/json" - - _kwargs["headers"] = headers - return _kwargs - - -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> HTTPValidationError | SaveViewResponse | None: - if response.status_code == 200: - response_200 = SaveViewResponse.from_dict(response.json()) - - return response_200 - - if response.status_code == 422: - response_422 = HTTPValidationError.from_dict(response.json()) - - return response_422 - - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[HTTPValidationError | SaveViewResponse]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - graph_id: str, - *, - client: AuthenticatedClient, - body: SaveViewRequest, -) -> Response[HTTPValidationError | SaveViewResponse]: - """Save View - - Save or update view as materialized report in the graph. - - Converts computed view results into persistent Report, Fact, and Structure nodes. - This establishes what data exists in the subgraph, which then defines what - needs to be exported for publishing to the parent graph. - - **Create Mode** (no report_id provided): - - Generates new report_id from entity + period + report type - - Creates new Report, Facts, and Structures - - **Update Mode** (report_id provided): - - Deletes all existing Facts and Structures for the report - - Updates Report metadata - - Creates fresh Facts and Structures from current view - - Useful for refreshing reports with updated data or view configurations - - **This is NOT publishing** - it only creates nodes in the subgraph workspace. - Publishing (export → parquet → parent ingest) happens separately. - - Creates/Updates: - - Report node with metadata - - Fact nodes with all aspects (period, entity, element, unit) - - PresentationStructure nodes (how facts are displayed) - - CalculationStructure nodes (how facts roll up) - - Returns: - - report_id: Unique identifier used as parquet export prefix - - parquet_export_prefix: Filename prefix for future exports - - All created facts and structures - - Args: - graph_id (str): - body (SaveViewRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[HTTPValidationError | SaveViewResponse] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - body=body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - graph_id: str, - *, - client: AuthenticatedClient, - body: SaveViewRequest, -) -> HTTPValidationError | SaveViewResponse | None: - """Save View - - Save or update view as materialized report in the graph. - - Converts computed view results into persistent Report, Fact, and Structure nodes. - This establishes what data exists in the subgraph, which then defines what - needs to be exported for publishing to the parent graph. - - **Create Mode** (no report_id provided): - - Generates new report_id from entity + period + report type - - Creates new Report, Facts, and Structures - - **Update Mode** (report_id provided): - - Deletes all existing Facts and Structures for the report - - Updates Report metadata - - Creates fresh Facts and Structures from current view - - Useful for refreshing reports with updated data or view configurations - - **This is NOT publishing** - it only creates nodes in the subgraph workspace. - Publishing (export → parquet → parent ingest) happens separately. - - Creates/Updates: - - Report node with metadata - - Fact nodes with all aspects (period, entity, element, unit) - - PresentationStructure nodes (how facts are displayed) - - CalculationStructure nodes (how facts roll up) - - Returns: - - report_id: Unique identifier used as parquet export prefix - - parquet_export_prefix: Filename prefix for future exports - - All created facts and structures - - Args: - graph_id (str): - body (SaveViewRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - HTTPValidationError | SaveViewResponse - """ - - return sync_detailed( - graph_id=graph_id, - client=client, - body=body, - ).parsed - - -async def asyncio_detailed( - graph_id: str, - *, - client: AuthenticatedClient, - body: SaveViewRequest, -) -> Response[HTTPValidationError | SaveViewResponse]: - """Save View - - Save or update view as materialized report in the graph. - - Converts computed view results into persistent Report, Fact, and Structure nodes. - This establishes what data exists in the subgraph, which then defines what - needs to be exported for publishing to the parent graph. - - **Create Mode** (no report_id provided): - - Generates new report_id from entity + period + report type - - Creates new Report, Facts, and Structures - - **Update Mode** (report_id provided): - - Deletes all existing Facts and Structures for the report - - Updates Report metadata - - Creates fresh Facts and Structures from current view - - Useful for refreshing reports with updated data or view configurations - - **This is NOT publishing** - it only creates nodes in the subgraph workspace. - Publishing (export → parquet → parent ingest) happens separately. - - Creates/Updates: - - Report node with metadata - - Fact nodes with all aspects (period, entity, element, unit) - - PresentationStructure nodes (how facts are displayed) - - CalculationStructure nodes (how facts roll up) - - Returns: - - report_id: Unique identifier used as parquet export prefix - - parquet_export_prefix: Filename prefix for future exports - - All created facts and structures - - Args: - graph_id (str): - body (SaveViewRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[HTTPValidationError | SaveViewResponse] - """ - - kwargs = _get_kwargs( - graph_id=graph_id, - body=body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - graph_id: str, - *, - client: AuthenticatedClient, - body: SaveViewRequest, -) -> HTTPValidationError | SaveViewResponse | None: - """Save View - - Save or update view as materialized report in the graph. - - Converts computed view results into persistent Report, Fact, and Structure nodes. - This establishes what data exists in the subgraph, which then defines what - needs to be exported for publishing to the parent graph. - - **Create Mode** (no report_id provided): - - Generates new report_id from entity + period + report type - - Creates new Report, Facts, and Structures - - **Update Mode** (report_id provided): - - Deletes all existing Facts and Structures for the report - - Updates Report metadata - - Creates fresh Facts and Structures from current view - - Useful for refreshing reports with updated data or view configurations - - **This is NOT publishing** - it only creates nodes in the subgraph workspace. - Publishing (export → parquet → parent ingest) happens separately. - - Creates/Updates: - - Report node with metadata - - Fact nodes with all aspects (period, entity, element, unit) - - PresentationStructure nodes (how facts are displayed) - - CalculationStructure nodes (how facts roll up) - - Returns: - - report_id: Unique identifier used as parquet export prefix - - parquet_export_prefix: Filename prefix for future exports - - All created facts and structures - - Args: - graph_id (str): - body (SaveViewRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - HTTPValidationError | SaveViewResponse - """ - - return ( - await asyncio_detailed( - graph_id=graph_id, - client=client, - body=body, - ) - ).parsed diff --git a/robosystems_client/models/__init__.py b/robosystems_client/models/__init__.py index 5eeb97f..5df050d 100644 --- a/robosystems_client/models/__init__.py +++ b/robosystems_client/models/__init__.py @@ -48,27 +48,17 @@ ) from .checkout_response import CheckoutResponse from .checkout_status_response import CheckoutStatusResponse -from .connection_options_response import ConnectionOptionsResponse -from .connection_provider_info import ConnectionProviderInfo -from .connection_provider_info_auth_type import ConnectionProviderInfoAuthType -from .connection_provider_info_provider import ConnectionProviderInfoProvider -from .connection_response import ConnectionResponse -from .connection_response_metadata import ConnectionResponseMetadata -from .connection_response_provider import ConnectionResponseProvider from .content_limits import ContentLimits from .copy_operation_limits import CopyOperationLimits from .create_api_key_request import CreateAPIKeyRequest from .create_api_key_response import CreateAPIKeyResponse from .create_checkout_request import CreateCheckoutRequest from .create_checkout_request_resource_config import CreateCheckoutRequestResourceConfig -from .create_connection_request import CreateConnectionRequest -from .create_connection_request_provider import CreateConnectionRequestProvider from .create_graph_request import CreateGraphRequest from .create_org_request import CreateOrgRequest from .create_repository_subscription_request import CreateRepositorySubscriptionRequest from .create_subgraph_request import CreateSubgraphRequest from .create_subgraph_request_metadata_type_0 import CreateSubgraphRequestMetadataType0 -from .create_view_request import CreateViewRequest from .credit_limits import CreditLimits from .credit_summary import CreditSummary from .credit_summary_operation_breakdown import CreditSummaryOperationBreakdown @@ -99,13 +89,10 @@ ) from .enhanced_file_status_layers import EnhancedFileStatusLayers from .error_response import ErrorResponse -from .exchange_token_request import ExchangeTokenRequest -from .exchange_token_request_metadata_type_0 import ExchangeTokenRequestMetadataType0 from .execute_cypher_query_response_200 import ExecuteCypherQueryResponse200 from .execute_cypher_query_response_200_data_item import ( ExecuteCypherQueryResponse200DataItem, ) -from .fact_detail import FactDetail from .file_info import FileInfo from .file_layer_status import FileLayerStatus from .file_status_update import FileStatusUpdate @@ -153,10 +140,6 @@ from .invoice import Invoice from .invoice_line_item import InvoiceLineItem from .invoices_response import InvoicesResponse -from .link_token_request import LinkTokenRequest -from .link_token_request_options_type_0 import LinkTokenRequestOptionsType0 -from .link_token_request_provider_type_0 import LinkTokenRequestProviderType0 -from .list_connections_provider_type_0 import ListConnectionsProviderType0 from .list_org_graphs_response_200_item import ListOrgGraphsResponse200Item from .list_subgraphs_response import ListSubgraphsResponse from .list_table_files_response import ListTableFilesResponse @@ -170,12 +153,6 @@ from .mcp_tool_call_arguments import MCPToolCallArguments from .mcp_tools_response import MCPToolsResponse from .mcp_tools_response_tools_item import MCPToolsResponseToolsItem -from .o_auth_callback_request import OAuthCallbackRequest -from .o_auth_init_request import OAuthInitRequest -from .o_auth_init_request_additional_params_type_0 import ( - OAuthInitRequestAdditionalParamsType0, -) -from .o_auth_init_response import OAuthInitResponse from .offering_repository_plan import OfferingRepositoryPlan from .offering_repository_plan_rate_limits_type_0 import ( OfferingRepositoryPlanRateLimitsType0, @@ -208,16 +185,8 @@ from .performance_insights import PerformanceInsights from .performance_insights_operation_stats import PerformanceInsightsOperationStats from .performance_insights_slow_queries_item import PerformanceInsightsSlowQueriesItem -from .plaid_connection_config import PlaidConnectionConfig -from .plaid_connection_config_accounts_type_0_item import ( - PlaidConnectionConfigAccountsType0Item, -) -from .plaid_connection_config_institution_type_0 import ( - PlaidConnectionConfigInstitutionType0, -) from .portal_session_response import PortalSessionResponse from .query_limits import QueryLimits -from .quick_books_connection_config import QuickBooksConnectionConfig from .rate_limits import RateLimits from .register_request import RegisterRequest from .repository_info import RepositoryInfo @@ -228,8 +197,6 @@ from .reset_password_request import ResetPasswordRequest from .reset_password_validate_response import ResetPasswordValidateResponse from .response_mode import ResponseMode -from .save_view_request import SaveViewRequest -from .save_view_response import SaveViewResponse from .schema_export_response import SchemaExportResponse from .schema_export_response_data_stats_type_0 import SchemaExportResponseDataStatsType0 from .schema_export_response_schema_definition_type_0 import ( @@ -246,7 +213,6 @@ SchemaValidationResponseCompatibilityType0, ) from .schema_validation_response_stats_type_0 import SchemaValidationResponseStatsType0 -from .sec_connection_config import SECConnectionConfig from .selection_criteria import SelectionCriteria from .service_offering_summary import ServiceOfferingSummary from .service_offerings_response import ServiceOfferingsResponse @@ -254,11 +220,9 @@ from .sso_exchange_request import SSOExchangeRequest from .sso_exchange_response import SSOExchangeResponse from .sso_token_response import SSOTokenResponse -from .storage_info import StorageInfo from .storage_limit_response import StorageLimitResponse from .storage_limits import StorageLimits from .storage_summary import StorageSummary -from .structure_detail import StructureDetail from .subgraph_quota_response import SubgraphQuotaResponse from .subgraph_response import SubgraphResponse from .subgraph_response_metadata_type_0 import SubgraphResponseMetadataType0 @@ -266,13 +230,6 @@ from .subgraph_type import SubgraphType from .success_response import SuccessResponse from .success_response_data_type_0 import SuccessResponseDataType0 -from .sync_connection_request import SyncConnectionRequest -from .sync_connection_request_sync_options_type_0 import ( - SyncConnectionRequestSyncOptionsType0, -) -from .sync_connection_response_syncconnection import ( - SyncConnectionResponseSyncconnection, -) from .table_info import TableInfo from .table_list_response import TableListResponse from .table_query_request import TableQueryRequest @@ -291,12 +248,6 @@ from .user_response import UserResponse from .validation_error import ValidationError from .validation_error_context import ValidationErrorContext -from .view_axis_config import ViewAxisConfig -from .view_axis_config_element_labels_type_0 import ViewAxisConfigElementLabelsType0 -from .view_axis_config_member_labels_type_0 import ViewAxisConfigMemberLabelsType0 -from .view_config import ViewConfig -from .view_source import ViewSource -from .view_source_type import ViewSourceType __all__ = ( "AccountInfo", @@ -339,27 +290,17 @@ "CheckCreditBalanceResponseCheckcreditbalance", "CheckoutResponse", "CheckoutStatusResponse", - "ConnectionOptionsResponse", - "ConnectionProviderInfo", - "ConnectionProviderInfoAuthType", - "ConnectionProviderInfoProvider", - "ConnectionResponse", - "ConnectionResponseMetadata", - "ConnectionResponseProvider", "ContentLimits", "CopyOperationLimits", "CreateAPIKeyRequest", "CreateAPIKeyResponse", "CreateCheckoutRequest", "CreateCheckoutRequestResourceConfig", - "CreateConnectionRequest", - "CreateConnectionRequestProvider", "CreateGraphRequest", "CreateOrgRequest", "CreateRepositorySubscriptionRequest", "CreateSubgraphRequest", "CreateSubgraphRequestMetadataType0", - "CreateViewRequest", "CreditLimits", "CreditSummary", "CreditSummaryOperationBreakdown", @@ -384,11 +325,8 @@ "EnhancedCreditTransactionResponseMetadata", "EnhancedFileStatusLayers", "ErrorResponse", - "ExchangeTokenRequest", - "ExchangeTokenRequestMetadataType0", "ExecuteCypherQueryResponse200", "ExecuteCypherQueryResponse200DataItem", - "FactDetail", "FileInfo", "FileLayerStatus", "FileStatusUpdate", @@ -426,10 +364,6 @@ "Invoice", "InvoiceLineItem", "InvoicesResponse", - "LinkTokenRequest", - "LinkTokenRequestOptionsType0", - "LinkTokenRequestProviderType0", - "ListConnectionsProviderType0", "ListOrgGraphsResponse200Item", "ListSubgraphsResponse", "ListTableFilesResponse", @@ -443,10 +377,6 @@ "MCPToolCallArguments", "MCPToolsResponse", "MCPToolsResponseToolsItem", - "OAuthCallbackRequest", - "OAuthInitRequest", - "OAuthInitRequestAdditionalParamsType0", - "OAuthInitResponse", "OfferingRepositoryPlan", "OfferingRepositoryPlanRateLimitsType0", "OperationCosts", @@ -477,12 +407,8 @@ "PerformanceInsights", "PerformanceInsightsOperationStats", "PerformanceInsightsSlowQueriesItem", - "PlaidConnectionConfig", - "PlaidConnectionConfigAccountsType0Item", - "PlaidConnectionConfigInstitutionType0", "PortalSessionResponse", "QueryLimits", - "QuickBooksConnectionConfig", "RateLimits", "RegisterRequest", "RepositoryInfo", @@ -491,8 +417,6 @@ "ResetPasswordRequest", "ResetPasswordValidateResponse", "ResponseMode", - "SaveViewRequest", - "SaveViewResponse", "SchemaExportResponse", "SchemaExportResponseDataStatsType0", "SchemaExportResponseSchemaDefinitionType0", @@ -503,7 +427,6 @@ "SchemaValidationResponse", "SchemaValidationResponseCompatibilityType0", "SchemaValidationResponseStatsType0", - "SECConnectionConfig", "SelectionCriteria", "ServiceOfferingsResponse", "ServiceOfferingSummary", @@ -511,11 +434,9 @@ "SSOExchangeRequest", "SSOExchangeResponse", "SSOTokenResponse", - "StorageInfo", "StorageLimitResponse", "StorageLimits", "StorageSummary", - "StructureDetail", "SubgraphQuotaResponse", "SubgraphResponse", "SubgraphResponseMetadataType0", @@ -523,9 +444,6 @@ "SubgraphType", "SuccessResponse", "SuccessResponseDataType0", - "SyncConnectionRequest", - "SyncConnectionRequestSyncOptionsType0", - "SyncConnectionResponseSyncconnection", "TableInfo", "TableListResponse", "TableQueryRequest", @@ -544,10 +462,4 @@ "UserResponse", "ValidationError", "ValidationErrorContext", - "ViewAxisConfig", - "ViewAxisConfigElementLabelsType0", - "ViewAxisConfigMemberLabelsType0", - "ViewConfig", - "ViewSource", - "ViewSourceType", ) diff --git a/robosystems_client/models/checkout_status_response.py b/robosystems_client/models/checkout_status_response.py index 8037554..91e81e1 100644 --- a/robosystems_client/models/checkout_status_response.py +++ b/robosystems_client/models/checkout_status_response.py @@ -16,7 +16,7 @@ class CheckoutStatusResponse: """Status of a checkout session. Attributes: - status (str): Checkout status: 'pending_payment', 'provisioning', 'completed', 'failed' + status (str): Checkout status: 'pending_payment', 'provisioning', 'active', 'failed', 'canceled' subscription_id (str): Internal subscription ID resource_id (None | str | Unset): Resource ID (graph_id for both graphs and repositories) once provisioned. For repositories, this is the repository slug (e.g., 'sec') diff --git a/robosystems_client/models/connection_options_response.py b/robosystems_client/models/connection_options_response.py deleted file mode 100644 index 1fa4479..0000000 --- a/robosystems_client/models/connection_options_response.py +++ /dev/null @@ -1,84 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.connection_provider_info import ConnectionProviderInfo - - -T = TypeVar("T", bound="ConnectionOptionsResponse") - - -@_attrs_define -class ConnectionOptionsResponse: - """Response with all available connection options. - - Attributes: - providers (list[ConnectionProviderInfo]): Available connection providers - total_providers (int): Total number of providers - """ - - providers: list[ConnectionProviderInfo] - total_providers: int - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - providers = [] - for providers_item_data in self.providers: - providers_item = providers_item_data.to_dict() - providers.append(providers_item) - - total_providers = self.total_providers - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "providers": providers, - "total_providers": total_providers, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.connection_provider_info import ConnectionProviderInfo - - d = dict(src_dict) - providers = [] - _providers = d.pop("providers") - for providers_item_data in _providers: - providers_item = ConnectionProviderInfo.from_dict(providers_item_data) - - providers.append(providers_item) - - total_providers = d.pop("total_providers") - - connection_options_response = cls( - providers=providers, - total_providers=total_providers, - ) - - connection_options_response.additional_properties = d - return connection_options_response - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/connection_provider_info.py b/robosystems_client/models/connection_provider_info.py deleted file mode 100644 index ae63151..0000000 --- a/robosystems_client/models/connection_provider_info.py +++ /dev/null @@ -1,205 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.connection_provider_info_auth_type import ConnectionProviderInfoAuthType -from ..models.connection_provider_info_provider import ConnectionProviderInfoProvider -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ConnectionProviderInfo") - - -@_attrs_define -class ConnectionProviderInfo: - """Information about a connection provider. - - Attributes: - provider (ConnectionProviderInfoProvider): Provider identifier - display_name (str): Human-readable provider name - description (str): Provider description - auth_type (ConnectionProviderInfoAuthType): Authentication type - required_config (list[str]): Required configuration fields - features (list[str]): Supported features - data_types (list[str]): Types of data available - auth_flow (None | str | Unset): Description of authentication flow - optional_config (list[str] | Unset): Optional configuration fields - sync_frequency (None | str | Unset): Typical sync frequency - setup_instructions (None | str | Unset): Setup instructions - documentation_url (None | str | Unset): Link to documentation - """ - - provider: ConnectionProviderInfoProvider - display_name: str - description: str - auth_type: ConnectionProviderInfoAuthType - required_config: list[str] - features: list[str] - data_types: list[str] - auth_flow: None | str | Unset = UNSET - optional_config: list[str] | Unset = UNSET - sync_frequency: None | str | Unset = UNSET - setup_instructions: None | str | Unset = UNSET - documentation_url: None | str | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - provider = self.provider.value - - display_name = self.display_name - - description = self.description - - auth_type = self.auth_type.value - - required_config = self.required_config - - features = self.features - - data_types = self.data_types - - auth_flow: None | str | Unset - if isinstance(self.auth_flow, Unset): - auth_flow = UNSET - else: - auth_flow = self.auth_flow - - optional_config: list[str] | Unset = UNSET - if not isinstance(self.optional_config, Unset): - optional_config = self.optional_config - - sync_frequency: None | str | Unset - if isinstance(self.sync_frequency, Unset): - sync_frequency = UNSET - else: - sync_frequency = self.sync_frequency - - setup_instructions: None | str | Unset - if isinstance(self.setup_instructions, Unset): - setup_instructions = UNSET - else: - setup_instructions = self.setup_instructions - - documentation_url: None | str | Unset - if isinstance(self.documentation_url, Unset): - documentation_url = UNSET - else: - documentation_url = self.documentation_url - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "provider": provider, - "display_name": display_name, - "description": description, - "auth_type": auth_type, - "required_config": required_config, - "features": features, - "data_types": data_types, - } - ) - if auth_flow is not UNSET: - field_dict["auth_flow"] = auth_flow - if optional_config is not UNSET: - field_dict["optional_config"] = optional_config - if sync_frequency is not UNSET: - field_dict["sync_frequency"] = sync_frequency - if setup_instructions is not UNSET: - field_dict["setup_instructions"] = setup_instructions - if documentation_url is not UNSET: - field_dict["documentation_url"] = documentation_url - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - provider = ConnectionProviderInfoProvider(d.pop("provider")) - - display_name = d.pop("display_name") - - description = d.pop("description") - - auth_type = ConnectionProviderInfoAuthType(d.pop("auth_type")) - - required_config = cast(list[str], d.pop("required_config")) - - features = cast(list[str], d.pop("features")) - - data_types = cast(list[str], d.pop("data_types")) - - def _parse_auth_flow(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - auth_flow = _parse_auth_flow(d.pop("auth_flow", UNSET)) - - optional_config = cast(list[str], d.pop("optional_config", UNSET)) - - def _parse_sync_frequency(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - sync_frequency = _parse_sync_frequency(d.pop("sync_frequency", UNSET)) - - def _parse_setup_instructions(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - setup_instructions = _parse_setup_instructions(d.pop("setup_instructions", UNSET)) - - def _parse_documentation_url(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - documentation_url = _parse_documentation_url(d.pop("documentation_url", UNSET)) - - connection_provider_info = cls( - provider=provider, - display_name=display_name, - description=description, - auth_type=auth_type, - required_config=required_config, - features=features, - data_types=data_types, - auth_flow=auth_flow, - optional_config=optional_config, - sync_frequency=sync_frequency, - setup_instructions=setup_instructions, - documentation_url=documentation_url, - ) - - connection_provider_info.additional_properties = d - return connection_provider_info - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/connection_provider_info_auth_type.py b/robosystems_client/models/connection_provider_info_auth_type.py deleted file mode 100644 index 6dc2860..0000000 --- a/robosystems_client/models/connection_provider_info_auth_type.py +++ /dev/null @@ -1,11 +0,0 @@ -from enum import Enum - - -class ConnectionProviderInfoAuthType(str, Enum): - API_KEY = "api_key" - LINK = "link" - NONE = "none" - OAUTH = "oauth" - - def __str__(self) -> str: - return str(self.value) diff --git a/robosystems_client/models/connection_provider_info_provider.py b/robosystems_client/models/connection_provider_info_provider.py deleted file mode 100644 index cbe28a5..0000000 --- a/robosystems_client/models/connection_provider_info_provider.py +++ /dev/null @@ -1,10 +0,0 @@ -from enum import Enum - - -class ConnectionProviderInfoProvider(str, Enum): - PLAID = "plaid" - QUICKBOOKS = "quickbooks" - SEC = "sec" - - def __str__(self) -> str: - return str(self.value) diff --git a/robosystems_client/models/connection_response.py b/robosystems_client/models/connection_response.py deleted file mode 100644 index 2cd37dd..0000000 --- a/robosystems_client/models/connection_response.py +++ /dev/null @@ -1,151 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.connection_response_provider import ConnectionResponseProvider -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.connection_response_metadata import ConnectionResponseMetadata - - -T = TypeVar("T", bound="ConnectionResponse") - - -@_attrs_define -class ConnectionResponse: - """Connection response model. - - Attributes: - connection_id (str): Unique connection identifier - provider (ConnectionResponseProvider): Connection provider type - entity_id (str): Entity identifier - status (str): Connection status - created_at (str): Creation timestamp - metadata (ConnectionResponseMetadata): Provider-specific metadata - updated_at (None | str | Unset): Last update timestamp - last_sync (None | str | Unset): Last sync timestamp - """ - - connection_id: str - provider: ConnectionResponseProvider - entity_id: str - status: str - created_at: str - metadata: ConnectionResponseMetadata - updated_at: None | str | Unset = UNSET - last_sync: None | str | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - connection_id = self.connection_id - - provider = self.provider.value - - entity_id = self.entity_id - - status = self.status - - created_at = self.created_at - - metadata = self.metadata.to_dict() - - updated_at: None | str | Unset - if isinstance(self.updated_at, Unset): - updated_at = UNSET - else: - updated_at = self.updated_at - - last_sync: None | str | Unset - if isinstance(self.last_sync, Unset): - last_sync = UNSET - else: - last_sync = self.last_sync - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "connection_id": connection_id, - "provider": provider, - "entity_id": entity_id, - "status": status, - "created_at": created_at, - "metadata": metadata, - } - ) - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if last_sync is not UNSET: - field_dict["last_sync"] = last_sync - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.connection_response_metadata import ConnectionResponseMetadata - - d = dict(src_dict) - connection_id = d.pop("connection_id") - - provider = ConnectionResponseProvider(d.pop("provider")) - - entity_id = d.pop("entity_id") - - status = d.pop("status") - - created_at = d.pop("created_at") - - metadata = ConnectionResponseMetadata.from_dict(d.pop("metadata")) - - def _parse_updated_at(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - updated_at = _parse_updated_at(d.pop("updated_at", UNSET)) - - def _parse_last_sync(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - last_sync = _parse_last_sync(d.pop("last_sync", UNSET)) - - connection_response = cls( - connection_id=connection_id, - provider=provider, - entity_id=entity_id, - status=status, - created_at=created_at, - metadata=metadata, - updated_at=updated_at, - last_sync=last_sync, - ) - - connection_response.additional_properties = d - return connection_response - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/connection_response_metadata.py b/robosystems_client/models/connection_response_metadata.py deleted file mode 100644 index 198a616..0000000 --- a/robosystems_client/models/connection_response_metadata.py +++ /dev/null @@ -1,46 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ConnectionResponseMetadata") - - -@_attrs_define -class ConnectionResponseMetadata: - """Provider-specific metadata""" - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - connection_response_metadata = cls() - - connection_response_metadata.additional_properties = d - return connection_response_metadata - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/connection_response_provider.py b/robosystems_client/models/connection_response_provider.py deleted file mode 100644 index d4579e2..0000000 --- a/robosystems_client/models/connection_response_provider.py +++ /dev/null @@ -1,10 +0,0 @@ -from enum import Enum - - -class ConnectionResponseProvider(str, Enum): - PLAID = "plaid" - QUICKBOOKS = "quickbooks" - SEC = "sec" - - def __str__(self) -> str: - return str(self.value) diff --git a/robosystems_client/models/create_connection_request.py b/robosystems_client/models/create_connection_request.py deleted file mode 100644 index 645b3b3..0000000 --- a/robosystems_client/models/create_connection_request.py +++ /dev/null @@ -1,179 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.create_connection_request_provider import CreateConnectionRequestProvider -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.plaid_connection_config import PlaidConnectionConfig - from ..models.quick_books_connection_config import QuickBooksConnectionConfig - from ..models.sec_connection_config import SECConnectionConfig - - -T = TypeVar("T", bound="CreateConnectionRequest") - - -@_attrs_define -class CreateConnectionRequest: - """Request to create a new connection. - - Attributes: - provider (CreateConnectionRequestProvider): Connection provider type - entity_id (str): Entity identifier - sec_config (None | SECConnectionConfig | Unset): - quickbooks_config (None | QuickBooksConnectionConfig | Unset): - plaid_config (None | PlaidConnectionConfig | Unset): - """ - - provider: CreateConnectionRequestProvider - entity_id: str - sec_config: None | SECConnectionConfig | Unset = UNSET - quickbooks_config: None | QuickBooksConnectionConfig | Unset = UNSET - plaid_config: None | PlaidConnectionConfig | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.plaid_connection_config import PlaidConnectionConfig - from ..models.quick_books_connection_config import QuickBooksConnectionConfig - from ..models.sec_connection_config import SECConnectionConfig - - provider = self.provider.value - - entity_id = self.entity_id - - sec_config: dict[str, Any] | None | Unset - if isinstance(self.sec_config, Unset): - sec_config = UNSET - elif isinstance(self.sec_config, SECConnectionConfig): - sec_config = self.sec_config.to_dict() - else: - sec_config = self.sec_config - - quickbooks_config: dict[str, Any] | None | Unset - if isinstance(self.quickbooks_config, Unset): - quickbooks_config = UNSET - elif isinstance(self.quickbooks_config, QuickBooksConnectionConfig): - quickbooks_config = self.quickbooks_config.to_dict() - else: - quickbooks_config = self.quickbooks_config - - plaid_config: dict[str, Any] | None | Unset - if isinstance(self.plaid_config, Unset): - plaid_config = UNSET - elif isinstance(self.plaid_config, PlaidConnectionConfig): - plaid_config = self.plaid_config.to_dict() - else: - plaid_config = self.plaid_config - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "provider": provider, - "entity_id": entity_id, - } - ) - if sec_config is not UNSET: - field_dict["sec_config"] = sec_config - if quickbooks_config is not UNSET: - field_dict["quickbooks_config"] = quickbooks_config - if plaid_config is not UNSET: - field_dict["plaid_config"] = plaid_config - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.plaid_connection_config import PlaidConnectionConfig - from ..models.quick_books_connection_config import QuickBooksConnectionConfig - from ..models.sec_connection_config import SECConnectionConfig - - d = dict(src_dict) - provider = CreateConnectionRequestProvider(d.pop("provider")) - - entity_id = d.pop("entity_id") - - def _parse_sec_config(data: object) -> None | SECConnectionConfig | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - sec_config_type_0 = SECConnectionConfig.from_dict(data) - - return sec_config_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | SECConnectionConfig | Unset, data) - - sec_config = _parse_sec_config(d.pop("sec_config", UNSET)) - - def _parse_quickbooks_config( - data: object, - ) -> None | QuickBooksConnectionConfig | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - quickbooks_config_type_0 = QuickBooksConnectionConfig.from_dict(data) - - return quickbooks_config_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | QuickBooksConnectionConfig | Unset, data) - - quickbooks_config = _parse_quickbooks_config(d.pop("quickbooks_config", UNSET)) - - def _parse_plaid_config(data: object) -> None | PlaidConnectionConfig | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - plaid_config_type_0 = PlaidConnectionConfig.from_dict(data) - - return plaid_config_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | PlaidConnectionConfig | Unset, data) - - plaid_config = _parse_plaid_config(d.pop("plaid_config", UNSET)) - - create_connection_request = cls( - provider=provider, - entity_id=entity_id, - sec_config=sec_config, - quickbooks_config=quickbooks_config, - plaid_config=plaid_config, - ) - - create_connection_request.additional_properties = d - return create_connection_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/create_connection_request_provider.py b/robosystems_client/models/create_connection_request_provider.py deleted file mode 100644 index 0d68faa..0000000 --- a/robosystems_client/models/create_connection_request_provider.py +++ /dev/null @@ -1,10 +0,0 @@ -from enum import Enum - - -class CreateConnectionRequestProvider(str, Enum): - PLAID = "plaid" - QUICKBOOKS = "quickbooks" - SEC = "sec" - - def __str__(self) -> str: - return str(self.value) diff --git a/robosystems_client/models/create_view_request.py b/robosystems_client/models/create_view_request.py deleted file mode 100644 index a1d355c..0000000 --- a/robosystems_client/models/create_view_request.py +++ /dev/null @@ -1,141 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.view_config import ViewConfig - from ..models.view_source import ViewSource - - -T = TypeVar("T", bound="CreateViewRequest") - - -@_attrs_define -class CreateViewRequest: - """ - Attributes: - source (ViewSource): - name (None | str | Unset): Optional name for the view - view_config (ViewConfig | Unset): - presentation_formats (list[str] | Unset): Presentation formats to generate - mapping_structure_id (None | str | Unset): Optional mapping structure ID to aggregate Chart of Accounts elements - into reporting taxonomy elements - """ - - source: ViewSource - name: None | str | Unset = UNSET - view_config: ViewConfig | Unset = UNSET - presentation_formats: list[str] | Unset = UNSET - mapping_structure_id: None | str | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - source = self.source.to_dict() - - name: None | str | Unset - if isinstance(self.name, Unset): - name = UNSET - else: - name = self.name - - view_config: dict[str, Any] | Unset = UNSET - if not isinstance(self.view_config, Unset): - view_config = self.view_config.to_dict() - - presentation_formats: list[str] | Unset = UNSET - if not isinstance(self.presentation_formats, Unset): - presentation_formats = self.presentation_formats - - mapping_structure_id: None | str | Unset - if isinstance(self.mapping_structure_id, Unset): - mapping_structure_id = UNSET - else: - mapping_structure_id = self.mapping_structure_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "source": source, - } - ) - if name is not UNSET: - field_dict["name"] = name - if view_config is not UNSET: - field_dict["view_config"] = view_config - if presentation_formats is not UNSET: - field_dict["presentation_formats"] = presentation_formats - if mapping_structure_id is not UNSET: - field_dict["mapping_structure_id"] = mapping_structure_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.view_config import ViewConfig - from ..models.view_source import ViewSource - - d = dict(src_dict) - source = ViewSource.from_dict(d.pop("source")) - - def _parse_name(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - name = _parse_name(d.pop("name", UNSET)) - - _view_config = d.pop("view_config", UNSET) - view_config: ViewConfig | Unset - if isinstance(_view_config, Unset): - view_config = UNSET - else: - view_config = ViewConfig.from_dict(_view_config) - - presentation_formats = cast(list[str], d.pop("presentation_formats", UNSET)) - - def _parse_mapping_structure_id(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - mapping_structure_id = _parse_mapping_structure_id( - d.pop("mapping_structure_id", UNSET) - ) - - create_view_request = cls( - source=source, - name=name, - view_config=view_config, - presentation_formats=presentation_formats, - mapping_structure_id=mapping_structure_id, - ) - - create_view_request.additional_properties = d - return create_view_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/exchange_token_request.py b/robosystems_client/models/exchange_token_request.py deleted file mode 100644 index d2401f7..0000000 --- a/robosystems_client/models/exchange_token_request.py +++ /dev/null @@ -1,118 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.exchange_token_request_metadata_type_0 import ( - ExchangeTokenRequestMetadataType0, - ) - - -T = TypeVar("T", bound="ExchangeTokenRequest") - - -@_attrs_define -class ExchangeTokenRequest: - """Exchange temporary token for permanent credentials. - - Attributes: - connection_id (str): Connection ID to update - public_token (str): Temporary token from embedded auth - metadata (ExchangeTokenRequestMetadataType0 | None | Unset): Provider-specific metadata - """ - - connection_id: str - public_token: str - metadata: ExchangeTokenRequestMetadataType0 | None | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.exchange_token_request_metadata_type_0 import ( - ExchangeTokenRequestMetadataType0, - ) - - connection_id = self.connection_id - - public_token = self.public_token - - metadata: dict[str, Any] | None | Unset - if isinstance(self.metadata, Unset): - metadata = UNSET - elif isinstance(self.metadata, ExchangeTokenRequestMetadataType0): - metadata = self.metadata.to_dict() - else: - metadata = self.metadata - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "connection_id": connection_id, - "public_token": public_token, - } - ) - if metadata is not UNSET: - field_dict["metadata"] = metadata - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.exchange_token_request_metadata_type_0 import ( - ExchangeTokenRequestMetadataType0, - ) - - d = dict(src_dict) - connection_id = d.pop("connection_id") - - public_token = d.pop("public_token") - - def _parse_metadata( - data: object, - ) -> ExchangeTokenRequestMetadataType0 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - metadata_type_0 = ExchangeTokenRequestMetadataType0.from_dict(data) - - return metadata_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(ExchangeTokenRequestMetadataType0 | None | Unset, data) - - metadata = _parse_metadata(d.pop("metadata", UNSET)) - - exchange_token_request = cls( - connection_id=connection_id, - public_token=public_token, - metadata=metadata, - ) - - exchange_token_request.additional_properties = d - return exchange_token_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/exchange_token_request_metadata_type_0.py b/robosystems_client/models/exchange_token_request_metadata_type_0.py deleted file mode 100644 index ce656cd..0000000 --- a/robosystems_client/models/exchange_token_request_metadata_type_0.py +++ /dev/null @@ -1,46 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ExchangeTokenRequestMetadataType0") - - -@_attrs_define -class ExchangeTokenRequestMetadataType0: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - exchange_token_request_metadata_type_0 = cls() - - exchange_token_request_metadata_type_0.additional_properties = d - return exchange_token_request_metadata_type_0 - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/fact_detail.py b/robosystems_client/models/fact_detail.py deleted file mode 100644 index 013f0d9..0000000 --- a/robosystems_client/models/fact_detail.py +++ /dev/null @@ -1,109 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="FactDetail") - - -@_attrs_define -class FactDetail: - """ - Attributes: - fact_id (str): - element_uri (str): - element_name (str): - numeric_value (float): - unit (str): - period_start (str): - period_end (str): - """ - - fact_id: str - element_uri: str - element_name: str - numeric_value: float - unit: str - period_start: str - period_end: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - fact_id = self.fact_id - - element_uri = self.element_uri - - element_name = self.element_name - - numeric_value = self.numeric_value - - unit = self.unit - - period_start = self.period_start - - period_end = self.period_end - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "fact_id": fact_id, - "element_uri": element_uri, - "element_name": element_name, - "numeric_value": numeric_value, - "unit": unit, - "period_start": period_start, - "period_end": period_end, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - fact_id = d.pop("fact_id") - - element_uri = d.pop("element_uri") - - element_name = d.pop("element_name") - - numeric_value = d.pop("numeric_value") - - unit = d.pop("unit") - - period_start = d.pop("period_start") - - period_end = d.pop("period_end") - - fact_detail = cls( - fact_id=fact_id, - element_uri=element_uri, - element_name=element_name, - numeric_value=numeric_value, - unit=unit, - period_start=period_start, - period_end=period_end, - ) - - fact_detail.additional_properties = d - return fact_detail - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/graph_subscription_response.py b/robosystems_client/models/graph_subscription_response.py index 05831e3..0d231c1 100644 --- a/robosystems_client/models/graph_subscription_response.py +++ b/robosystems_client/models/graph_subscription_response.py @@ -20,6 +20,7 @@ class GraphSubscriptionResponse: resource_type (str): Resource type (graph or repository) resource_id (str): Resource identifier plan_name (str): Current plan name + plan_display_name (str): Human-readable plan name for UI display billing_interval (str): Billing interval status (str): Subscription status base_price_cents (int): Base price in cents @@ -36,6 +37,7 @@ class GraphSubscriptionResponse: resource_type: str resource_id: str plan_name: str + plan_display_name: str billing_interval: str status: str base_price_cents: int @@ -56,6 +58,8 @@ def to_dict(self) -> dict[str, Any]: plan_name = self.plan_name + plan_display_name = self.plan_display_name + billing_interval = self.billing_interval status = self.status @@ -102,6 +106,7 @@ def to_dict(self) -> dict[str, Any]: "resource_type": resource_type, "resource_id": resource_id, "plan_name": plan_name, + "plan_display_name": plan_display_name, "billing_interval": billing_interval, "status": status, "base_price_cents": base_price_cents, @@ -132,6 +137,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: plan_name = d.pop("plan_name") + plan_display_name = d.pop("plan_display_name") + billing_interval = d.pop("billing_interval") status = d.pop("status") @@ -192,6 +199,7 @@ def _parse_ends_at(data: object) -> None | str | Unset: resource_type=resource_type, resource_id=resource_id, plan_name=plan_name, + plan_display_name=plan_display_name, billing_interval=billing_interval, status=status, base_price_cents=base_price_cents, diff --git a/robosystems_client/models/graph_subscription_tier.py b/robosystems_client/models/graph_subscription_tier.py index fcdd82c..79c2b8a 100644 --- a/robosystems_client/models/graph_subscription_tier.py +++ b/robosystems_client/models/graph_subscription_tier.py @@ -30,7 +30,6 @@ class GraphSubscriptionTier: priority_support (bool): Whether priority support is included api_rate_multiplier (float): API rate multiplier backend (str): Database backend (ladybug or neo4j) - storage_included (bool | Unset): Whether storage is included in the tier Default: True. max_queries_per_hour (int | None | Unset): Maximum queries per hour max_subgraphs (int | Unset): Maximum subgraphs supported Default: 0. instance_type (None | str | Unset): Instance type @@ -47,7 +46,6 @@ class GraphSubscriptionTier: priority_support: bool api_rate_multiplier: float backend: str - storage_included: bool | Unset = True max_queries_per_hour: int | None | Unset = UNSET max_subgraphs: int | Unset = 0 instance_type: None | str | Unset = UNSET @@ -76,8 +74,6 @@ def to_dict(self) -> dict[str, Any]: backend = self.backend - storage_included = self.storage_included - max_queries_per_hour: int | None | Unset if isinstance(self.max_queries_per_hour, Unset): max_queries_per_hour = UNSET @@ -109,8 +105,6 @@ def to_dict(self) -> dict[str, Any]: "backend": backend, } ) - if storage_included is not UNSET: - field_dict["storage_included"] = storage_included if max_queries_per_hour is not UNSET: field_dict["max_queries_per_hour"] = max_queries_per_hour if max_subgraphs is not UNSET: @@ -145,8 +139,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: backend = d.pop("backend") - storage_included = d.pop("storage_included", UNSET) - def _parse_max_queries_per_hour(data: object) -> int | None | Unset: if data is None: return data @@ -181,7 +173,6 @@ def _parse_instance_type(data: object) -> None | str | Unset: priority_support=priority_support, api_rate_multiplier=api_rate_multiplier, backend=backend, - storage_included=storage_included, max_queries_per_hour=max_queries_per_hour, max_subgraphs=max_subgraphs, instance_type=instance_type, diff --git a/robosystems_client/models/graph_subscriptions.py b/robosystems_client/models/graph_subscriptions.py index b405a22..62701ff 100644 --- a/robosystems_client/models/graph_subscriptions.py +++ b/robosystems_client/models/graph_subscriptions.py @@ -8,7 +8,6 @@ if TYPE_CHECKING: from ..models.graph_subscription_tier import GraphSubscriptionTier - from ..models.storage_info import StorageInfo T = TypeVar("T", bound="GraphSubscriptions") @@ -26,14 +25,12 @@ class GraphSubscriptions: description (str): Description of graph subscriptions pricing_model (str): Pricing model type (per_graph or per_organization) tiers (list[GraphSubscriptionTier]): Available infrastructure tiers - storage (StorageInfo): Storage information. notes (list[str]): Important notes """ description: str pricing_model: str tiers: list[GraphSubscriptionTier] - storage: StorageInfo notes: list[str] additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -47,8 +44,6 @@ def to_dict(self) -> dict[str, Any]: tiers_item = tiers_item_data.to_dict() tiers.append(tiers_item) - storage = self.storage.to_dict() - notes = self.notes field_dict: dict[str, Any] = {} @@ -58,7 +53,6 @@ def to_dict(self) -> dict[str, Any]: "description": description, "pricing_model": pricing_model, "tiers": tiers, - "storage": storage, "notes": notes, } ) @@ -68,7 +62,6 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.graph_subscription_tier import GraphSubscriptionTier - from ..models.storage_info import StorageInfo d = dict(src_dict) description = d.pop("description") @@ -82,15 +75,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: tiers.append(tiers_item) - storage = StorageInfo.from_dict(d.pop("storage")) - notes = cast(list[str], d.pop("notes")) graph_subscriptions = cls( description=description, pricing_model=pricing_model, tiers=tiers, - storage=storage, notes=notes, ) diff --git a/robosystems_client/models/graph_tier_info.py b/robosystems_client/models/graph_tier_info.py index c1d0f7e..d02ad14 100644 --- a/robosystems_client/models/graph_tier_info.py +++ b/robosystems_client/models/graph_tier_info.py @@ -28,7 +28,6 @@ class GraphTierInfo: backend (str): Database backend (ladybug or neo4j) enabled (bool): Whether tier is available max_subgraphs (int | None): Maximum subgraphs allowed - storage_limit_gb (int): Storage limit in GB monthly_credits (int): Monthly AI credits api_rate_multiplier (float): API rate limit multiplier features (list[str]): List of tier features @@ -44,7 +43,6 @@ class GraphTierInfo: backend: str enabled: bool max_subgraphs: int | None - storage_limit_gb: int monthly_credits: int api_rate_multiplier: float features: list[str] @@ -69,8 +67,6 @@ def to_dict(self) -> dict[str, Any]: max_subgraphs: int | None max_subgraphs = self.max_subgraphs - storage_limit_gb = self.storage_limit_gb - monthly_credits = self.monthly_credits api_rate_multiplier = self.api_rate_multiplier @@ -98,7 +94,6 @@ def to_dict(self) -> dict[str, Any]: "backend": backend, "enabled": enabled, "max_subgraphs": max_subgraphs, - "storage_limit_gb": storage_limit_gb, "monthly_credits": monthly_credits, "api_rate_multiplier": api_rate_multiplier, "features": features, @@ -136,8 +131,6 @@ def _parse_max_subgraphs(data: object) -> int | None: max_subgraphs = _parse_max_subgraphs(d.pop("max_subgraphs")) - storage_limit_gb = d.pop("storage_limit_gb") - monthly_credits = d.pop("monthly_credits") api_rate_multiplier = d.pop("api_rate_multiplier") @@ -165,7 +158,6 @@ def _parse_monthly_price(data: object) -> float | None | Unset: backend=backend, enabled=enabled, max_subgraphs=max_subgraphs, - storage_limit_gb=storage_limit_gb, monthly_credits=monthly_credits, api_rate_multiplier=api_rate_multiplier, features=features, diff --git a/robosystems_client/models/graph_tier_limits.py b/robosystems_client/models/graph_tier_limits.py index 168b85d..e5aa903 100644 --- a/robosystems_client/models/graph_tier_limits.py +++ b/robosystems_client/models/graph_tier_limits.py @@ -19,14 +19,12 @@ class GraphTierLimits: """Resource limits for a tier. Attributes: - storage_gb (int): Storage limit in GB monthly_credits (int): Monthly credit allocation max_subgraphs (int | None): Maximum subgraphs (null for unlimited) copy_operations (GraphTierCopyOperations): Copy operation limits for a tier. backup (GraphTierBackup): Backup configuration for a tier. """ - storage_gb: int monthly_credits: int max_subgraphs: int | None copy_operations: GraphTierCopyOperations @@ -34,8 +32,6 @@ class GraphTierLimits: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - storage_gb = self.storage_gb - monthly_credits = self.monthly_credits max_subgraphs: int | None @@ -49,7 +45,6 @@ def to_dict(self) -> dict[str, Any]: field_dict.update(self.additional_properties) field_dict.update( { - "storage_gb": storage_gb, "monthly_credits": monthly_credits, "max_subgraphs": max_subgraphs, "copy_operations": copy_operations, @@ -65,8 +60,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.graph_tier_copy_operations import GraphTierCopyOperations d = dict(src_dict) - storage_gb = d.pop("storage_gb") - monthly_credits = d.pop("monthly_credits") def _parse_max_subgraphs(data: object) -> int | None: @@ -81,7 +74,6 @@ def _parse_max_subgraphs(data: object) -> int | None: backup = GraphTierBackup.from_dict(d.pop("backup")) graph_tier_limits = cls( - storage_gb=storage_gb, monthly_credits=monthly_credits, max_subgraphs=max_subgraphs, copy_operations=copy_operations, diff --git a/robosystems_client/models/link_token_request.py b/robosystems_client/models/link_token_request.py deleted file mode 100644 index 7d28e0e..0000000 --- a/robosystems_client/models/link_token_request.py +++ /dev/null @@ -1,172 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.link_token_request_provider_type_0 import LinkTokenRequestProviderType0 -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.link_token_request_options_type_0 import LinkTokenRequestOptionsType0 - - -T = TypeVar("T", bound="LinkTokenRequest") - - -@_attrs_define -class LinkTokenRequest: - """Request to create a link token for embedded authentication. - - Attributes: - entity_id (str): Entity identifier - user_id (str): User identifier - provider (LinkTokenRequestProviderType0 | None | Unset): Provider type (defaults based on connection) - products (list[str] | None | Unset): Data products to request (provider-specific) - options (LinkTokenRequestOptionsType0 | None | Unset): Provider-specific options - """ - - entity_id: str - user_id: str - provider: LinkTokenRequestProviderType0 | None | Unset = UNSET - products: list[str] | None | Unset = UNSET - options: LinkTokenRequestOptionsType0 | None | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.link_token_request_options_type_0 import LinkTokenRequestOptionsType0 - - entity_id = self.entity_id - - user_id = self.user_id - - provider: None | str | Unset - if isinstance(self.provider, Unset): - provider = UNSET - elif isinstance(self.provider, LinkTokenRequestProviderType0): - provider = self.provider.value - else: - provider = self.provider - - products: list[str] | None | Unset - if isinstance(self.products, Unset): - products = UNSET - elif isinstance(self.products, list): - products = self.products - - else: - products = self.products - - options: dict[str, Any] | None | Unset - if isinstance(self.options, Unset): - options = UNSET - elif isinstance(self.options, LinkTokenRequestOptionsType0): - options = self.options.to_dict() - else: - options = self.options - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "entity_id": entity_id, - "user_id": user_id, - } - ) - if provider is not UNSET: - field_dict["provider"] = provider - if products is not UNSET: - field_dict["products"] = products - if options is not UNSET: - field_dict["options"] = options - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.link_token_request_options_type_0 import LinkTokenRequestOptionsType0 - - d = dict(src_dict) - entity_id = d.pop("entity_id") - - user_id = d.pop("user_id") - - def _parse_provider(data: object) -> LinkTokenRequestProviderType0 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - provider_type_0 = LinkTokenRequestProviderType0(data) - - return provider_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(LinkTokenRequestProviderType0 | None | Unset, data) - - provider = _parse_provider(d.pop("provider", UNSET)) - - def _parse_products(data: object) -> list[str] | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, list): - raise TypeError() - products_type_0 = cast(list[str], data) - - return products_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(list[str] | None | Unset, data) - - products = _parse_products(d.pop("products", UNSET)) - - def _parse_options(data: object) -> LinkTokenRequestOptionsType0 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - options_type_0 = LinkTokenRequestOptionsType0.from_dict(data) - - return options_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(LinkTokenRequestOptionsType0 | None | Unset, data) - - options = _parse_options(d.pop("options", UNSET)) - - link_token_request = cls( - entity_id=entity_id, - user_id=user_id, - provider=provider, - products=products, - options=options, - ) - - link_token_request.additional_properties = d - return link_token_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/link_token_request_options_type_0.py b/robosystems_client/models/link_token_request_options_type_0.py deleted file mode 100644 index a419405..0000000 --- a/robosystems_client/models/link_token_request_options_type_0.py +++ /dev/null @@ -1,46 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="LinkTokenRequestOptionsType0") - - -@_attrs_define -class LinkTokenRequestOptionsType0: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - link_token_request_options_type_0 = cls() - - link_token_request_options_type_0.additional_properties = d - return link_token_request_options_type_0 - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/link_token_request_provider_type_0.py b/robosystems_client/models/link_token_request_provider_type_0.py deleted file mode 100644 index 8d83fe0..0000000 --- a/robosystems_client/models/link_token_request_provider_type_0.py +++ /dev/null @@ -1,10 +0,0 @@ -from enum import Enum - - -class LinkTokenRequestProviderType0(str, Enum): - PLAID = "plaid" - QUICKBOOKS = "quickbooks" - SEC = "sec" - - def __str__(self) -> str: - return str(self.value) diff --git a/robosystems_client/models/list_connections_provider_type_0.py b/robosystems_client/models/list_connections_provider_type_0.py deleted file mode 100644 index 7c20ede..0000000 --- a/robosystems_client/models/list_connections_provider_type_0.py +++ /dev/null @@ -1,10 +0,0 @@ -from enum import Enum - - -class ListConnectionsProviderType0(str, Enum): - PLAID = "plaid" - QUICKBOOKS = "quickbooks" - SEC = "sec" - - def __str__(self) -> str: - return str(self.value) diff --git a/robosystems_client/models/o_auth_callback_request.py b/robosystems_client/models/o_auth_callback_request.py deleted file mode 100644 index 5212d8e..0000000 --- a/robosystems_client/models/o_auth_callback_request.py +++ /dev/null @@ -1,132 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="OAuthCallbackRequest") - - -@_attrs_define -class OAuthCallbackRequest: - """OAuth callback parameters. - - Attributes: - code (str): Authorization code from OAuth provider - state (str): OAuth state for verification - realm_id (None | str | Unset): QuickBooks-specific realm ID - error (None | str | Unset): OAuth error if authorization failed - error_description (None | str | Unset): OAuth error details - """ - - code: str - state: str - realm_id: None | str | Unset = UNSET - error: None | str | Unset = UNSET - error_description: None | str | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - code = self.code - - state = self.state - - realm_id: None | str | Unset - if isinstance(self.realm_id, Unset): - realm_id = UNSET - else: - realm_id = self.realm_id - - error: None | str | Unset - if isinstance(self.error, Unset): - error = UNSET - else: - error = self.error - - error_description: None | str | Unset - if isinstance(self.error_description, Unset): - error_description = UNSET - else: - error_description = self.error_description - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "code": code, - "state": state, - } - ) - if realm_id is not UNSET: - field_dict["realm_id"] = realm_id - if error is not UNSET: - field_dict["error"] = error - if error_description is not UNSET: - field_dict["error_description"] = error_description - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - code = d.pop("code") - - state = d.pop("state") - - def _parse_realm_id(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - realm_id = _parse_realm_id(d.pop("realm_id", UNSET)) - - def _parse_error(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - error = _parse_error(d.pop("error", UNSET)) - - def _parse_error_description(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - error_description = _parse_error_description(d.pop("error_description", UNSET)) - - o_auth_callback_request = cls( - code=code, - state=state, - realm_id=realm_id, - error=error, - error_description=error_description, - ) - - o_auth_callback_request.additional_properties = d - return o_auth_callback_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/o_auth_init_request.py b/robosystems_client/models/o_auth_init_request.py deleted file mode 100644 index 9fc09b8..0000000 --- a/robosystems_client/models/o_auth_init_request.py +++ /dev/null @@ -1,130 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.o_auth_init_request_additional_params_type_0 import ( - OAuthInitRequestAdditionalParamsType0, - ) - - -T = TypeVar("T", bound="OAuthInitRequest") - - -@_attrs_define -class OAuthInitRequest: - """Request to initiate OAuth flow. - - Attributes: - connection_id (str): Connection ID to link OAuth to - redirect_uri (None | str | Unset): Override default redirect URI - additional_params (None | OAuthInitRequestAdditionalParamsType0 | Unset): Provider-specific parameters - """ - - connection_id: str - redirect_uri: None | str | Unset = UNSET - additional_params: None | OAuthInitRequestAdditionalParamsType0 | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.o_auth_init_request_additional_params_type_0 import ( - OAuthInitRequestAdditionalParamsType0, - ) - - connection_id = self.connection_id - - redirect_uri: None | str | Unset - if isinstance(self.redirect_uri, Unset): - redirect_uri = UNSET - else: - redirect_uri = self.redirect_uri - - additional_params: dict[str, Any] | None | Unset - if isinstance(self.additional_params, Unset): - additional_params = UNSET - elif isinstance(self.additional_params, OAuthInitRequestAdditionalParamsType0): - additional_params = self.additional_params.to_dict() - else: - additional_params = self.additional_params - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "connection_id": connection_id, - } - ) - if redirect_uri is not UNSET: - field_dict["redirect_uri"] = redirect_uri - if additional_params is not UNSET: - field_dict["additional_params"] = additional_params - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.o_auth_init_request_additional_params_type_0 import ( - OAuthInitRequestAdditionalParamsType0, - ) - - d = dict(src_dict) - connection_id = d.pop("connection_id") - - def _parse_redirect_uri(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - redirect_uri = _parse_redirect_uri(d.pop("redirect_uri", UNSET)) - - def _parse_additional_params( - data: object, - ) -> None | OAuthInitRequestAdditionalParamsType0 | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - additional_params_type_0 = OAuthInitRequestAdditionalParamsType0.from_dict(data) - - return additional_params_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | OAuthInitRequestAdditionalParamsType0 | Unset, data) - - additional_params = _parse_additional_params(d.pop("additional_params", UNSET)) - - o_auth_init_request = cls( - connection_id=connection_id, - redirect_uri=redirect_uri, - additional_params=additional_params, - ) - - o_auth_init_request.additional_properties = d - return o_auth_init_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/o_auth_init_request_additional_params_type_0.py b/robosystems_client/models/o_auth_init_request_additional_params_type_0.py deleted file mode 100644 index 6f50561..0000000 --- a/robosystems_client/models/o_auth_init_request_additional_params_type_0.py +++ /dev/null @@ -1,46 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="OAuthInitRequestAdditionalParamsType0") - - -@_attrs_define -class OAuthInitRequestAdditionalParamsType0: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - o_auth_init_request_additional_params_type_0 = cls() - - o_auth_init_request_additional_params_type_0.additional_properties = d - return o_auth_init_request_additional_params_type_0 - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/o_auth_init_response.py b/robosystems_client/models/o_auth_init_response.py deleted file mode 100644 index 5ac85ae..0000000 --- a/robosystems_client/models/o_auth_init_response.py +++ /dev/null @@ -1,80 +0,0 @@ -from __future__ import annotations - -import datetime -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field -from dateutil.parser import isoparse - -T = TypeVar("T", bound="OAuthInitResponse") - - -@_attrs_define -class OAuthInitResponse: - """Response with OAuth authorization URL. - - Attributes: - auth_url (str): URL to redirect user for authorization - state (str): OAuth state for security - expires_at (datetime.datetime): When this OAuth request expires - """ - - auth_url: str - state: str - expires_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - auth_url = self.auth_url - - state = self.state - - expires_at = self.expires_at.isoformat() - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "auth_url": auth_url, - "state": state, - "expires_at": expires_at, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - auth_url = d.pop("auth_url") - - state = d.pop("state") - - expires_at = isoparse(d.pop("expires_at")) - - o_auth_init_response = cls( - auth_url=auth_url, - state=state, - expires_at=expires_at, - ) - - o_auth_init_response.additional_properties = d - return o_auth_init_response - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/plaid_connection_config.py b/robosystems_client/models/plaid_connection_config.py deleted file mode 100644 index 2922cac..0000000 --- a/robosystems_client/models/plaid_connection_config.py +++ /dev/null @@ -1,209 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.plaid_connection_config_accounts_type_0_item import ( - PlaidConnectionConfigAccountsType0Item, - ) - from ..models.plaid_connection_config_institution_type_0 import ( - PlaidConnectionConfigInstitutionType0, - ) - - -T = TypeVar("T", bound="PlaidConnectionConfig") - - -@_attrs_define -class PlaidConnectionConfig: - """Plaid-specific connection configuration. - - Attributes: - public_token (None | str | Unset): Plaid public token for exchange - access_token (None | str | Unset): Plaid access token (set after exchange) - item_id (None | str | Unset): Plaid item ID - institution (None | PlaidConnectionConfigInstitutionType0 | Unset): Institution information - accounts (list[PlaidConnectionConfigAccountsType0Item] | None | Unset): Connected accounts - """ - - public_token: None | str | Unset = UNSET - access_token: None | str | Unset = UNSET - item_id: None | str | Unset = UNSET - institution: None | PlaidConnectionConfigInstitutionType0 | Unset = UNSET - accounts: list[PlaidConnectionConfigAccountsType0Item] | None | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.plaid_connection_config_institution_type_0 import ( - PlaidConnectionConfigInstitutionType0, - ) - - public_token: None | str | Unset - if isinstance(self.public_token, Unset): - public_token = UNSET - else: - public_token = self.public_token - - access_token: None | str | Unset - if isinstance(self.access_token, Unset): - access_token = UNSET - else: - access_token = self.access_token - - item_id: None | str | Unset - if isinstance(self.item_id, Unset): - item_id = UNSET - else: - item_id = self.item_id - - institution: dict[str, Any] | None | Unset - if isinstance(self.institution, Unset): - institution = UNSET - elif isinstance(self.institution, PlaidConnectionConfigInstitutionType0): - institution = self.institution.to_dict() - else: - institution = self.institution - - accounts: list[dict[str, Any]] | None | Unset - if isinstance(self.accounts, Unset): - accounts = UNSET - elif isinstance(self.accounts, list): - accounts = [] - for accounts_type_0_item_data in self.accounts: - accounts_type_0_item = accounts_type_0_item_data.to_dict() - accounts.append(accounts_type_0_item) - - else: - accounts = self.accounts - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if public_token is not UNSET: - field_dict["public_token"] = public_token - if access_token is not UNSET: - field_dict["access_token"] = access_token - if item_id is not UNSET: - field_dict["item_id"] = item_id - if institution is not UNSET: - field_dict["institution"] = institution - if accounts is not UNSET: - field_dict["accounts"] = accounts - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.plaid_connection_config_accounts_type_0_item import ( - PlaidConnectionConfigAccountsType0Item, - ) - from ..models.plaid_connection_config_institution_type_0 import ( - PlaidConnectionConfigInstitutionType0, - ) - - d = dict(src_dict) - - def _parse_public_token(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - public_token = _parse_public_token(d.pop("public_token", UNSET)) - - def _parse_access_token(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - access_token = _parse_access_token(d.pop("access_token", UNSET)) - - def _parse_item_id(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - item_id = _parse_item_id(d.pop("item_id", UNSET)) - - def _parse_institution( - data: object, - ) -> None | PlaidConnectionConfigInstitutionType0 | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - institution_type_0 = PlaidConnectionConfigInstitutionType0.from_dict(data) - - return institution_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | PlaidConnectionConfigInstitutionType0 | Unset, data) - - institution = _parse_institution(d.pop("institution", UNSET)) - - def _parse_accounts( - data: object, - ) -> list[PlaidConnectionConfigAccountsType0Item] | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, list): - raise TypeError() - accounts_type_0 = [] - _accounts_type_0 = data - for accounts_type_0_item_data in _accounts_type_0: - accounts_type_0_item = PlaidConnectionConfigAccountsType0Item.from_dict( - accounts_type_0_item_data - ) - - accounts_type_0.append(accounts_type_0_item) - - return accounts_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(list[PlaidConnectionConfigAccountsType0Item] | None | Unset, data) - - accounts = _parse_accounts(d.pop("accounts", UNSET)) - - plaid_connection_config = cls( - public_token=public_token, - access_token=access_token, - item_id=item_id, - institution=institution, - accounts=accounts, - ) - - plaid_connection_config.additional_properties = d - return plaid_connection_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/plaid_connection_config_accounts_type_0_item.py b/robosystems_client/models/plaid_connection_config_accounts_type_0_item.py deleted file mode 100644 index a98cbb5..0000000 --- a/robosystems_client/models/plaid_connection_config_accounts_type_0_item.py +++ /dev/null @@ -1,46 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="PlaidConnectionConfigAccountsType0Item") - - -@_attrs_define -class PlaidConnectionConfigAccountsType0Item: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - plaid_connection_config_accounts_type_0_item = cls() - - plaid_connection_config_accounts_type_0_item.additional_properties = d - return plaid_connection_config_accounts_type_0_item - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/plaid_connection_config_institution_type_0.py b/robosystems_client/models/plaid_connection_config_institution_type_0.py deleted file mode 100644 index 15953cb..0000000 --- a/robosystems_client/models/plaid_connection_config_institution_type_0.py +++ /dev/null @@ -1,46 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="PlaidConnectionConfigInstitutionType0") - - -@_attrs_define -class PlaidConnectionConfigInstitutionType0: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - plaid_connection_config_institution_type_0 = cls() - - plaid_connection_config_institution_type_0.additional_properties = d - return plaid_connection_config_institution_type_0 - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/quick_books_connection_config.py b/robosystems_client/models/quick_books_connection_config.py deleted file mode 100644 index 0da94c6..0000000 --- a/robosystems_client/models/quick_books_connection_config.py +++ /dev/null @@ -1,94 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="QuickBooksConnectionConfig") - - -@_attrs_define -class QuickBooksConnectionConfig: - """QuickBooks-specific connection configuration. - - Attributes: - realm_id (None | str | Unset): QuickBooks Realm ID - refresh_token (None | str | Unset): OAuth refresh token - """ - - realm_id: None | str | Unset = UNSET - refresh_token: None | str | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - realm_id: None | str | Unset - if isinstance(self.realm_id, Unset): - realm_id = UNSET - else: - realm_id = self.realm_id - - refresh_token: None | str | Unset - if isinstance(self.refresh_token, Unset): - refresh_token = UNSET - else: - refresh_token = self.refresh_token - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if realm_id is not UNSET: - field_dict["realm_id"] = realm_id - if refresh_token is not UNSET: - field_dict["refresh_token"] = refresh_token - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - - def _parse_realm_id(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - realm_id = _parse_realm_id(d.pop("realm_id", UNSET)) - - def _parse_refresh_token(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - refresh_token = _parse_refresh_token(d.pop("refresh_token", UNSET)) - - quick_books_connection_config = cls( - realm_id=realm_id, - refresh_token=refresh_token, - ) - - quick_books_connection_config.additional_properties = d - return quick_books_connection_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/save_view_request.py b/robosystems_client/models/save_view_request.py deleted file mode 100644 index 3a09f83..0000000 --- a/robosystems_client/models/save_view_request.py +++ /dev/null @@ -1,138 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="SaveViewRequest") - - -@_attrs_define -class SaveViewRequest: - """ - Attributes: - report_type (str): Type of report (e.g., 'Annual Report', 'Quarterly Report', '10-K') - period_start (str): Period start date (YYYY-MM-DD) - period_end (str): Period end date (YYYY-MM-DD) - report_id (None | str | Unset): Existing report ID to update (if provided, deletes existing facts/structures and - creates new ones) - entity_id (None | str | Unset): Entity identifier (defaults to primary entity) - include_presentation (bool | Unset): Create presentation structures Default: True. - include_calculation (bool | Unset): Create calculation structures Default: True. - """ - - report_type: str - period_start: str - period_end: str - report_id: None | str | Unset = UNSET - entity_id: None | str | Unset = UNSET - include_presentation: bool | Unset = True - include_calculation: bool | Unset = True - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - report_type = self.report_type - - period_start = self.period_start - - period_end = self.period_end - - report_id: None | str | Unset - if isinstance(self.report_id, Unset): - report_id = UNSET - else: - report_id = self.report_id - - entity_id: None | str | Unset - if isinstance(self.entity_id, Unset): - entity_id = UNSET - else: - entity_id = self.entity_id - - include_presentation = self.include_presentation - - include_calculation = self.include_calculation - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "report_type": report_type, - "period_start": period_start, - "period_end": period_end, - } - ) - if report_id is not UNSET: - field_dict["report_id"] = report_id - if entity_id is not UNSET: - field_dict["entity_id"] = entity_id - if include_presentation is not UNSET: - field_dict["include_presentation"] = include_presentation - if include_calculation is not UNSET: - field_dict["include_calculation"] = include_calculation - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - report_type = d.pop("report_type") - - period_start = d.pop("period_start") - - period_end = d.pop("period_end") - - def _parse_report_id(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - report_id = _parse_report_id(d.pop("report_id", UNSET)) - - def _parse_entity_id(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - entity_id = _parse_entity_id(d.pop("entity_id", UNSET)) - - include_presentation = d.pop("include_presentation", UNSET) - - include_calculation = d.pop("include_calculation", UNSET) - - save_view_request = cls( - report_type=report_type, - period_start=period_start, - period_end=period_end, - report_id=report_id, - entity_id=entity_id, - include_presentation=include_presentation, - include_calculation=include_calculation, - ) - - save_view_request.additional_properties = d - return save_view_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/save_view_response.py b/robosystems_client/models/save_view_response.py deleted file mode 100644 index 1be21b6..0000000 --- a/robosystems_client/models/save_view_response.py +++ /dev/null @@ -1,181 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.fact_detail import FactDetail - from ..models.structure_detail import StructureDetail - - -T = TypeVar("T", bound="SaveViewResponse") - - -@_attrs_define -class SaveViewResponse: - """ - Attributes: - report_id (str): Unique report identifier (used as parquet export prefix) - report_type (str): - entity_id (str): - entity_name (str): - period_start (str): - period_end (str): - fact_count (int): - presentation_count (int): - calculation_count (int): - facts (list[FactDetail]): - structures (list[StructureDetail]): - created_at (str): - parquet_export_prefix (str): Prefix for parquet file exports - """ - - report_id: str - report_type: str - entity_id: str - entity_name: str - period_start: str - period_end: str - fact_count: int - presentation_count: int - calculation_count: int - facts: list[FactDetail] - structures: list[StructureDetail] - created_at: str - parquet_export_prefix: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - report_id = self.report_id - - report_type = self.report_type - - entity_id = self.entity_id - - entity_name = self.entity_name - - period_start = self.period_start - - period_end = self.period_end - - fact_count = self.fact_count - - presentation_count = self.presentation_count - - calculation_count = self.calculation_count - - facts = [] - for facts_item_data in self.facts: - facts_item = facts_item_data.to_dict() - facts.append(facts_item) - - structures = [] - for structures_item_data in self.structures: - structures_item = structures_item_data.to_dict() - structures.append(structures_item) - - created_at = self.created_at - - parquet_export_prefix = self.parquet_export_prefix - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "report_id": report_id, - "report_type": report_type, - "entity_id": entity_id, - "entity_name": entity_name, - "period_start": period_start, - "period_end": period_end, - "fact_count": fact_count, - "presentation_count": presentation_count, - "calculation_count": calculation_count, - "facts": facts, - "structures": structures, - "created_at": created_at, - "parquet_export_prefix": parquet_export_prefix, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.fact_detail import FactDetail - from ..models.structure_detail import StructureDetail - - d = dict(src_dict) - report_id = d.pop("report_id") - - report_type = d.pop("report_type") - - entity_id = d.pop("entity_id") - - entity_name = d.pop("entity_name") - - period_start = d.pop("period_start") - - period_end = d.pop("period_end") - - fact_count = d.pop("fact_count") - - presentation_count = d.pop("presentation_count") - - calculation_count = d.pop("calculation_count") - - facts = [] - _facts = d.pop("facts") - for facts_item_data in _facts: - facts_item = FactDetail.from_dict(facts_item_data) - - facts.append(facts_item) - - structures = [] - _structures = d.pop("structures") - for structures_item_data in _structures: - structures_item = StructureDetail.from_dict(structures_item_data) - - structures.append(structures_item) - - created_at = d.pop("created_at") - - parquet_export_prefix = d.pop("parquet_export_prefix") - - save_view_response = cls( - report_id=report_id, - report_type=report_type, - entity_id=entity_id, - entity_name=entity_name, - period_start=period_start, - period_end=period_end, - fact_count=fact_count, - presentation_count=presentation_count, - calculation_count=calculation_count, - facts=facts, - structures=structures, - created_at=created_at, - parquet_export_prefix=parquet_export_prefix, - ) - - save_view_response.additional_properties = d - return save_view_response - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/sec_connection_config.py b/robosystems_client/models/sec_connection_config.py deleted file mode 100644 index cea8f3f..0000000 --- a/robosystems_client/models/sec_connection_config.py +++ /dev/null @@ -1,84 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="SECConnectionConfig") - - -@_attrs_define -class SECConnectionConfig: - """SEC-specific connection configuration. - - Attributes: - cik (str): 10-digit CIK number - entity_name (None | str | Unset): Entity name from SEC - """ - - cik: str - entity_name: None | str | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - cik = self.cik - - entity_name: None | str | Unset - if isinstance(self.entity_name, Unset): - entity_name = UNSET - else: - entity_name = self.entity_name - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "cik": cik, - } - ) - if entity_name is not UNSET: - field_dict["entity_name"] = entity_name - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - cik = d.pop("cik") - - def _parse_entity_name(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - entity_name = _parse_entity_name(d.pop("entity_name", UNSET)) - - sec_connection_config = cls( - cik=cik, - entity_name=entity_name, - ) - - sec_connection_config.additional_properties = d - return sec_connection_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/storage_info.py b/robosystems_client/models/storage_info.py deleted file mode 100644 index 82527b6..0000000 --- a/robosystems_client/models/storage_info.py +++ /dev/null @@ -1,62 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="StorageInfo") - - -@_attrs_define -class StorageInfo: - """Storage information. - - Attributes: - description (str | Unset): Storage billing description Default: 'Storage included in tier'. - """ - - description: str | Unset = "Storage included in tier" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - description = self.description - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if description is not UNSET: - field_dict["description"] = description - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - description = d.pop("description", UNSET) - - storage_info = cls( - description=description, - ) - - storage_info.additional_properties = d - return storage_info - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/structure_detail.py b/robosystems_client/models/structure_detail.py deleted file mode 100644 index 2a3a1da..0000000 --- a/robosystems_client/models/structure_detail.py +++ /dev/null @@ -1,85 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="StructureDetail") - - -@_attrs_define -class StructureDetail: - """ - Attributes: - structure_id (str): - structure_type (str): - name (str): - element_count (int): - """ - - structure_id: str - structure_type: str - name: str - element_count: int - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - structure_id = self.structure_id - - structure_type = self.structure_type - - name = self.name - - element_count = self.element_count - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "structure_id": structure_id, - "structure_type": structure_type, - "name": name, - "element_count": element_count, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - structure_id = d.pop("structure_id") - - structure_type = d.pop("structure_type") - - name = d.pop("name") - - element_count = d.pop("element_count") - - structure_detail = cls( - structure_id=structure_id, - structure_type=structure_type, - name=name, - element_count=element_count, - ) - - structure_detail.additional_properties = d - return structure_detail - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/sync_connection_request.py b/robosystems_client/models/sync_connection_request.py deleted file mode 100644 index 44032cd..0000000 --- a/robosystems_client/models/sync_connection_request.py +++ /dev/null @@ -1,108 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.sync_connection_request_sync_options_type_0 import ( - SyncConnectionRequestSyncOptionsType0, - ) - - -T = TypeVar("T", bound="SyncConnectionRequest") - - -@_attrs_define -class SyncConnectionRequest: - """Request to sync a connection. - - Attributes: - full_sync (bool | Unset): Perform full sync vs incremental Default: False. - sync_options (None | SyncConnectionRequestSyncOptionsType0 | Unset): Provider-specific sync options - """ - - full_sync: bool | Unset = False - sync_options: None | SyncConnectionRequestSyncOptionsType0 | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.sync_connection_request_sync_options_type_0 import ( - SyncConnectionRequestSyncOptionsType0, - ) - - full_sync = self.full_sync - - sync_options: dict[str, Any] | None | Unset - if isinstance(self.sync_options, Unset): - sync_options = UNSET - elif isinstance(self.sync_options, SyncConnectionRequestSyncOptionsType0): - sync_options = self.sync_options.to_dict() - else: - sync_options = self.sync_options - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if full_sync is not UNSET: - field_dict["full_sync"] = full_sync - if sync_options is not UNSET: - field_dict["sync_options"] = sync_options - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.sync_connection_request_sync_options_type_0 import ( - SyncConnectionRequestSyncOptionsType0, - ) - - d = dict(src_dict) - full_sync = d.pop("full_sync", UNSET) - - def _parse_sync_options( - data: object, - ) -> None | SyncConnectionRequestSyncOptionsType0 | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - sync_options_type_0 = SyncConnectionRequestSyncOptionsType0.from_dict(data) - - return sync_options_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | SyncConnectionRequestSyncOptionsType0 | Unset, data) - - sync_options = _parse_sync_options(d.pop("sync_options", UNSET)) - - sync_connection_request = cls( - full_sync=full_sync, - sync_options=sync_options, - ) - - sync_connection_request.additional_properties = d - return sync_connection_request - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/sync_connection_request_sync_options_type_0.py b/robosystems_client/models/sync_connection_request_sync_options_type_0.py deleted file mode 100644 index 9cfa0e3..0000000 --- a/robosystems_client/models/sync_connection_request_sync_options_type_0.py +++ /dev/null @@ -1,46 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="SyncConnectionRequestSyncOptionsType0") - - -@_attrs_define -class SyncConnectionRequestSyncOptionsType0: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - sync_connection_request_sync_options_type_0 = cls() - - sync_connection_request_sync_options_type_0.additional_properties = d - return sync_connection_request_sync_options_type_0 - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/sync_connection_response_syncconnection.py b/robosystems_client/models/sync_connection_response_syncconnection.py deleted file mode 100644 index 6c1efa2..0000000 --- a/robosystems_client/models/sync_connection_response_syncconnection.py +++ /dev/null @@ -1,46 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="SyncConnectionResponseSyncconnection") - - -@_attrs_define -class SyncConnectionResponseSyncconnection: - """ """ - - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - sync_connection_response_syncconnection = cls() - - sync_connection_response_syncconnection.additional_properties = d - return sync_connection_response_syncconnection - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/view_axis_config.py b/robosystems_client/models/view_axis_config.py deleted file mode 100644 index e24c43d..0000000 --- a/robosystems_client/models/view_axis_config.py +++ /dev/null @@ -1,276 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.view_axis_config_element_labels_type_0 import ( - ViewAxisConfigElementLabelsType0, - ) - from ..models.view_axis_config_member_labels_type_0 import ( - ViewAxisConfigMemberLabelsType0, - ) - - -T = TypeVar("T", bound="ViewAxisConfig") - - -@_attrs_define -class ViewAxisConfig: - """ - Attributes: - type_ (str): Axis type: 'element', 'period', 'dimension', 'entity' - dimension_axis (None | str | Unset): Dimension axis name for dimension-type axes - include_null_dimension (bool | Unset): Include facts where this dimension is NULL (default: false) Default: - False. - selected_members (list[str] | None | Unset): Specific members to include (e.g., ['2024-12-31', '2023-12-31']) - member_order (list[str] | None | Unset): Explicit ordering of members (overrides default sort) - member_labels (None | Unset | ViewAxisConfigMemberLabelsType0): Custom labels for members (e.g., {'2024-12-31': - 'Current Year'}) - element_order (list[str] | None | Unset): Element ordering for hierarchy display (e.g., ['us-gaap:Assets', 'us- - gaap:Cash', ...]) - element_labels (None | Unset | ViewAxisConfigElementLabelsType0): Custom labels for elements (e.g., {'us- - gaap:Cash': 'Cash and Cash Equivalents'}) - """ - - type_: str - dimension_axis: None | str | Unset = UNSET - include_null_dimension: bool | Unset = False - selected_members: list[str] | None | Unset = UNSET - member_order: list[str] | None | Unset = UNSET - member_labels: None | Unset | ViewAxisConfigMemberLabelsType0 = UNSET - element_order: list[str] | None | Unset = UNSET - element_labels: None | Unset | ViewAxisConfigElementLabelsType0 = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - from ..models.view_axis_config_element_labels_type_0 import ( - ViewAxisConfigElementLabelsType0, - ) - from ..models.view_axis_config_member_labels_type_0 import ( - ViewAxisConfigMemberLabelsType0, - ) - - type_ = self.type_ - - dimension_axis: None | str | Unset - if isinstance(self.dimension_axis, Unset): - dimension_axis = UNSET - else: - dimension_axis = self.dimension_axis - - include_null_dimension = self.include_null_dimension - - selected_members: list[str] | None | Unset - if isinstance(self.selected_members, Unset): - selected_members = UNSET - elif isinstance(self.selected_members, list): - selected_members = self.selected_members - - else: - selected_members = self.selected_members - - member_order: list[str] | None | Unset - if isinstance(self.member_order, Unset): - member_order = UNSET - elif isinstance(self.member_order, list): - member_order = self.member_order - - else: - member_order = self.member_order - - member_labels: dict[str, Any] | None | Unset - if isinstance(self.member_labels, Unset): - member_labels = UNSET - elif isinstance(self.member_labels, ViewAxisConfigMemberLabelsType0): - member_labels = self.member_labels.to_dict() - else: - member_labels = self.member_labels - - element_order: list[str] | None | Unset - if isinstance(self.element_order, Unset): - element_order = UNSET - elif isinstance(self.element_order, list): - element_order = self.element_order - - else: - element_order = self.element_order - - element_labels: dict[str, Any] | None | Unset - if isinstance(self.element_labels, Unset): - element_labels = UNSET - elif isinstance(self.element_labels, ViewAxisConfigElementLabelsType0): - element_labels = self.element_labels.to_dict() - else: - element_labels = self.element_labels - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "type": type_, - } - ) - if dimension_axis is not UNSET: - field_dict["dimension_axis"] = dimension_axis - if include_null_dimension is not UNSET: - field_dict["include_null_dimension"] = include_null_dimension - if selected_members is not UNSET: - field_dict["selected_members"] = selected_members - if member_order is not UNSET: - field_dict["member_order"] = member_order - if member_labels is not UNSET: - field_dict["member_labels"] = member_labels - if element_order is not UNSET: - field_dict["element_order"] = element_order - if element_labels is not UNSET: - field_dict["element_labels"] = element_labels - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.view_axis_config_element_labels_type_0 import ( - ViewAxisConfigElementLabelsType0, - ) - from ..models.view_axis_config_member_labels_type_0 import ( - ViewAxisConfigMemberLabelsType0, - ) - - d = dict(src_dict) - type_ = d.pop("type") - - def _parse_dimension_axis(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - dimension_axis = _parse_dimension_axis(d.pop("dimension_axis", UNSET)) - - include_null_dimension = d.pop("include_null_dimension", UNSET) - - def _parse_selected_members(data: object) -> list[str] | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, list): - raise TypeError() - selected_members_type_0 = cast(list[str], data) - - return selected_members_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(list[str] | None | Unset, data) - - selected_members = _parse_selected_members(d.pop("selected_members", UNSET)) - - def _parse_member_order(data: object) -> list[str] | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, list): - raise TypeError() - member_order_type_0 = cast(list[str], data) - - return member_order_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(list[str] | None | Unset, data) - - member_order = _parse_member_order(d.pop("member_order", UNSET)) - - def _parse_member_labels( - data: object, - ) -> None | Unset | ViewAxisConfigMemberLabelsType0: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - member_labels_type_0 = ViewAxisConfigMemberLabelsType0.from_dict(data) - - return member_labels_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | Unset | ViewAxisConfigMemberLabelsType0, data) - - member_labels = _parse_member_labels(d.pop("member_labels", UNSET)) - - def _parse_element_order(data: object) -> list[str] | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, list): - raise TypeError() - element_order_type_0 = cast(list[str], data) - - return element_order_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(list[str] | None | Unset, data) - - element_order = _parse_element_order(d.pop("element_order", UNSET)) - - def _parse_element_labels( - data: object, - ) -> None | Unset | ViewAxisConfigElementLabelsType0: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - element_labels_type_0 = ViewAxisConfigElementLabelsType0.from_dict(data) - - return element_labels_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | Unset | ViewAxisConfigElementLabelsType0, data) - - element_labels = _parse_element_labels(d.pop("element_labels", UNSET)) - - view_axis_config = cls( - type_=type_, - dimension_axis=dimension_axis, - include_null_dimension=include_null_dimension, - selected_members=selected_members, - member_order=member_order, - member_labels=member_labels, - element_order=element_order, - element_labels=element_labels, - ) - - view_axis_config.additional_properties = d - return view_axis_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/view_axis_config_element_labels_type_0.py b/robosystems_client/models/view_axis_config_element_labels_type_0.py deleted file mode 100644 index 8f1638f..0000000 --- a/robosystems_client/models/view_axis_config_element_labels_type_0.py +++ /dev/null @@ -1,46 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ViewAxisConfigElementLabelsType0") - - -@_attrs_define -class ViewAxisConfigElementLabelsType0: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - view_axis_config_element_labels_type_0 = cls() - - view_axis_config_element_labels_type_0.additional_properties = d - return view_axis_config_element_labels_type_0 - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/view_axis_config_member_labels_type_0.py b/robosystems_client/models/view_axis_config_member_labels_type_0.py deleted file mode 100644 index ec29942..0000000 --- a/robosystems_client/models/view_axis_config_member_labels_type_0.py +++ /dev/null @@ -1,46 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ViewAxisConfigMemberLabelsType0") - - -@_attrs_define -class ViewAxisConfigMemberLabelsType0: - """ """ - - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - view_axis_config_member_labels_type_0 = cls() - - view_axis_config_member_labels_type_0.additional_properties = d - return view_axis_config_member_labels_type_0 - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/view_config.py b/robosystems_client/models/view_config.py deleted file mode 100644 index 782f103..0000000 --- a/robosystems_client/models/view_config.py +++ /dev/null @@ -1,127 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.view_axis_config import ViewAxisConfig - - -T = TypeVar("T", bound="ViewConfig") - - -@_attrs_define -class ViewConfig: - """ - Attributes: - rows (list[ViewAxisConfig] | Unset): Row axis configuration - columns (list[ViewAxisConfig] | Unset): Column axis configuration - values (str | Unset): Field to use for values (default: numeric_value) Default: 'numeric_value'. - aggregation_function (str | Unset): Aggregation function: sum, average, count Default: 'sum'. - fill_value (float | Unset): Value to use for missing data Default: 0.0. - """ - - rows: list[ViewAxisConfig] | Unset = UNSET - columns: list[ViewAxisConfig] | Unset = UNSET - values: str | Unset = "numeric_value" - aggregation_function: str | Unset = "sum" - fill_value: float | Unset = 0.0 - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - rows: list[dict[str, Any]] | Unset = UNSET - if not isinstance(self.rows, Unset): - rows = [] - for rows_item_data in self.rows: - rows_item = rows_item_data.to_dict() - rows.append(rows_item) - - columns: list[dict[str, Any]] | Unset = UNSET - if not isinstance(self.columns, Unset): - columns = [] - for columns_item_data in self.columns: - columns_item = columns_item_data.to_dict() - columns.append(columns_item) - - values = self.values - - aggregation_function = self.aggregation_function - - fill_value = self.fill_value - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if rows is not UNSET: - field_dict["rows"] = rows - if columns is not UNSET: - field_dict["columns"] = columns - if values is not UNSET: - field_dict["values"] = values - if aggregation_function is not UNSET: - field_dict["aggregation_function"] = aggregation_function - if fill_value is not UNSET: - field_dict["fill_value"] = fill_value - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.view_axis_config import ViewAxisConfig - - d = dict(src_dict) - _rows = d.pop("rows", UNSET) - rows: list[ViewAxisConfig] | Unset = UNSET - if _rows is not UNSET: - rows = [] - for rows_item_data in _rows: - rows_item = ViewAxisConfig.from_dict(rows_item_data) - - rows.append(rows_item) - - _columns = d.pop("columns", UNSET) - columns: list[ViewAxisConfig] | Unset = UNSET - if _columns is not UNSET: - columns = [] - for columns_item_data in _columns: - columns_item = ViewAxisConfig.from_dict(columns_item_data) - - columns.append(columns_item) - - values = d.pop("values", UNSET) - - aggregation_function = d.pop("aggregation_function", UNSET) - - fill_value = d.pop("fill_value", UNSET) - - view_config = cls( - rows=rows, - columns=columns, - values=values, - aggregation_function=aggregation_function, - fill_value=fill_value, - ) - - view_config.additional_properties = d - return view_config - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/view_source.py b/robosystems_client/models/view_source.py deleted file mode 100644 index a53557a..0000000 --- a/robosystems_client/models/view_source.py +++ /dev/null @@ -1,144 +0,0 @@ -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.view_source_type import ViewSourceType -from ..types import UNSET, Unset - -T = TypeVar("T", bound="ViewSource") - - -@_attrs_define -class ViewSource: - """ - Attributes: - type_ (ViewSourceType): - period_start (None | str | Unset): Start date for transaction aggregation (YYYY-MM-DD) - period_end (None | str | Unset): End date for transaction aggregation (YYYY-MM-DD) - fact_set_id (None | str | Unset): FactSet ID for existing facts mode - entity_id (None | str | Unset): Filter by entity (optional) - """ - - type_: ViewSourceType - period_start: None | str | Unset = UNSET - period_end: None | str | Unset = UNSET - fact_set_id: None | str | Unset = UNSET - entity_id: None | str | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: - type_ = self.type_.value - - period_start: None | str | Unset - if isinstance(self.period_start, Unset): - period_start = UNSET - else: - period_start = self.period_start - - period_end: None | str | Unset - if isinstance(self.period_end, Unset): - period_end = UNSET - else: - period_end = self.period_end - - fact_set_id: None | str | Unset - if isinstance(self.fact_set_id, Unset): - fact_set_id = UNSET - else: - fact_set_id = self.fact_set_id - - entity_id: None | str | Unset - if isinstance(self.entity_id, Unset): - entity_id = UNSET - else: - entity_id = self.entity_id - - field_dict: dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "type": type_, - } - ) - if period_start is not UNSET: - field_dict["period_start"] = period_start - if period_end is not UNSET: - field_dict["period_end"] = period_end - if fact_set_id is not UNSET: - field_dict["fact_set_id"] = fact_set_id - if entity_id is not UNSET: - field_dict["entity_id"] = entity_id - - return field_dict - - @classmethod - def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - d = dict(src_dict) - type_ = ViewSourceType(d.pop("type")) - - def _parse_period_start(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - period_start = _parse_period_start(d.pop("period_start", UNSET)) - - def _parse_period_end(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - period_end = _parse_period_end(d.pop("period_end", UNSET)) - - def _parse_fact_set_id(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - fact_set_id = _parse_fact_set_id(d.pop("fact_set_id", UNSET)) - - def _parse_entity_id(data: object) -> None | str | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(None | str | Unset, data) - - entity_id = _parse_entity_id(d.pop("entity_id", UNSET)) - - view_source = cls( - type_=type_, - period_start=period_start, - period_end=period_end, - fact_set_id=fact_set_id, - entity_id=entity_id, - ) - - view_source.additional_properties = d - return view_source - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/robosystems_client/models/view_source_type.py b/robosystems_client/models/view_source_type.py deleted file mode 100644 index 471211e..0000000 --- a/robosystems_client/models/view_source_type.py +++ /dev/null @@ -1,9 +0,0 @@ -from enum import Enum - - -class ViewSourceType(str, Enum): - FACT_SET = "fact_set" - TRANSACTIONS = "transactions" - - def __str__(self) -> str: - return str(self.value)