diff --git a/robosystems_client/api/graphs/get_graphs.py b/robosystems_client/api/graphs/get_graphs.py index 7ca98a77..fa639d16 100644 --- a/robosystems_client/api/graphs/get_graphs.py +++ b/robosystems_client/api/graphs/get_graphs.py @@ -51,39 +51,46 @@ def sync_detailed( *, client: AuthenticatedClient, ) -> Response[Union[Any, UserGraphsResponse]]: - r"""Get User Graphs + r"""Get User Graphs and Repositories - List all graph databases accessible to the current user with roles and selection status. + List all graph databases and shared repositories accessible to the current user. - Returns a comprehensive list of all graphs the user can access, including their - role in each graph (admin or member) and which graph is currently selected as - the active workspace. + Returns a unified list of both user-created graphs and shared repositories (like SEC data) + that the user has access to, including their role/access level and selection status. **Returned Information:** - - Graph ID and display name for each accessible graph - - User's role (admin/member) indicating permission level - - Selection status (one graph can be marked as \"selected\") - - Creation timestamp for each graph - - **Graph Roles:** - - `admin`: Full access - can manage graph settings, invite users, delete graph - - `member`: Read/write access - can query and modify data, cannot manage settings + - Graph/Repository ID and display name + - User's role/access level (admin/member for graphs, read/write/admin for repositories) + - Selection status (only user graphs can be selected) + - Creation timestamp + - Repository type indicator (isRepository: true for shared repositories) + + **User Graphs (isRepository: false):** + - Collaborative workspaces that can be shared with other users + - Roles: `admin` (full access, can invite users) or `member` (read/write access) + - Can be selected as active workspace + - Graphs you create or have been invited to + + **Shared Repositories (isRepository: true):** + - Read-only data repositories like SEC filings, industry benchmarks + - Access levels: `read`, `write` (for data contributions), `admin` + - Cannot be selected (each has separate subscription) + - Require separate subscriptions (personal, cannot be shared) **Selected Graph Concept:** - The \"selected\" graph is the user's currently active workspace. Many API operations - default to the selected graph if no graph_id is provided. Users can change their - selected graph via the `POST /v1/graphs/{graph_id}/select` endpoint. + The \"selected\" graph is the user's currently active workspace (user graphs only). + Many API operations default to the selected graph if no graph_id is provided. + Users can change their selected graph via `POST /v1/graphs/{graph_id}/select`. **Use Cases:** - - Display graph selector in UI - - Show user's accessible workspaces - - Identify which graph is currently active - - Filter graphs by role for permission-based features + - Display unified graph/repository selector in UI + - Show all accessible data sources (both owned graphs and subscribed repositories) + - Identify currently active workspace + - Filter by type (user graphs vs repositories) **Empty Response:** - New users or users without graph access will receive an empty list with - `selectedGraphId: null`. Users should create a new graph or request access - to an existing graph. + New users receive an empty list with `selectedGraphId: null`. Users should create + a graph or subscribe to a repository. **Note:** Graph listing is included - no credit consumption required. @@ -109,39 +116,46 @@ def sync( *, client: AuthenticatedClient, ) -> Optional[Union[Any, UserGraphsResponse]]: - r"""Get User Graphs + r"""Get User Graphs and Repositories - List all graph databases accessible to the current user with roles and selection status. + List all graph databases and shared repositories accessible to the current user. - Returns a comprehensive list of all graphs the user can access, including their - role in each graph (admin or member) and which graph is currently selected as - the active workspace. + Returns a unified list of both user-created graphs and shared repositories (like SEC data) + that the user has access to, including their role/access level and selection status. **Returned Information:** - - Graph ID and display name for each accessible graph - - User's role (admin/member) indicating permission level - - Selection status (one graph can be marked as \"selected\") - - Creation timestamp for each graph - - **Graph Roles:** - - `admin`: Full access - can manage graph settings, invite users, delete graph - - `member`: Read/write access - can query and modify data, cannot manage settings + - Graph/Repository ID and display name + - User's role/access level (admin/member for graphs, read/write/admin for repositories) + - Selection status (only user graphs can be selected) + - Creation timestamp + - Repository type indicator (isRepository: true for shared repositories) + + **User Graphs (isRepository: false):** + - Collaborative workspaces that can be shared with other users + - Roles: `admin` (full access, can invite users) or `member` (read/write access) + - Can be selected as active workspace + - Graphs you create or have been invited to + + **Shared Repositories (isRepository: true):** + - Read-only data repositories like SEC filings, industry benchmarks + - Access levels: `read`, `write` (for data contributions), `admin` + - Cannot be selected (each has separate subscription) + - Require separate subscriptions (personal, cannot be shared) **Selected Graph Concept:** - The \"selected\" graph is the user's currently active workspace. Many API operations - default to the selected graph if no graph_id is provided. Users can change their - selected graph via the `POST /v1/graphs/{graph_id}/select` endpoint. + The \"selected\" graph is the user's currently active workspace (user graphs only). + Many API operations default to the selected graph if no graph_id is provided. + Users can change their selected graph via `POST /v1/graphs/{graph_id}/select`. **Use Cases:** - - Display graph selector in UI - - Show user's accessible workspaces - - Identify which graph is currently active - - Filter graphs by role for permission-based features + - Display unified graph/repository selector in UI + - Show all accessible data sources (both owned graphs and subscribed repositories) + - Identify currently active workspace + - Filter by type (user graphs vs repositories) **Empty Response:** - New users or users without graph access will receive an empty list with - `selectedGraphId: null`. Users should create a new graph or request access - to an existing graph. + New users receive an empty list with `selectedGraphId: null`. Users should create + a graph or subscribe to a repository. **Note:** Graph listing is included - no credit consumption required. @@ -163,39 +177,46 @@ async def asyncio_detailed( *, client: AuthenticatedClient, ) -> Response[Union[Any, UserGraphsResponse]]: - r"""Get User Graphs + r"""Get User Graphs and Repositories - List all graph databases accessible to the current user with roles and selection status. + List all graph databases and shared repositories accessible to the current user. - Returns a comprehensive list of all graphs the user can access, including their - role in each graph (admin or member) and which graph is currently selected as - the active workspace. + Returns a unified list of both user-created graphs and shared repositories (like SEC data) + that the user has access to, including their role/access level and selection status. **Returned Information:** - - Graph ID and display name for each accessible graph - - User's role (admin/member) indicating permission level - - Selection status (one graph can be marked as \"selected\") - - Creation timestamp for each graph - - **Graph Roles:** - - `admin`: Full access - can manage graph settings, invite users, delete graph - - `member`: Read/write access - can query and modify data, cannot manage settings + - Graph/Repository ID and display name + - User's role/access level (admin/member for graphs, read/write/admin for repositories) + - Selection status (only user graphs can be selected) + - Creation timestamp + - Repository type indicator (isRepository: true for shared repositories) + + **User Graphs (isRepository: false):** + - Collaborative workspaces that can be shared with other users + - Roles: `admin` (full access, can invite users) or `member` (read/write access) + - Can be selected as active workspace + - Graphs you create or have been invited to + + **Shared Repositories (isRepository: true):** + - Read-only data repositories like SEC filings, industry benchmarks + - Access levels: `read`, `write` (for data contributions), `admin` + - Cannot be selected (each has separate subscription) + - Require separate subscriptions (personal, cannot be shared) **Selected Graph Concept:** - The \"selected\" graph is the user's currently active workspace. Many API operations - default to the selected graph if no graph_id is provided. Users can change their - selected graph via the `POST /v1/graphs/{graph_id}/select` endpoint. + The \"selected\" graph is the user's currently active workspace (user graphs only). + Many API operations default to the selected graph if no graph_id is provided. + Users can change their selected graph via `POST /v1/graphs/{graph_id}/select`. **Use Cases:** - - Display graph selector in UI - - Show user's accessible workspaces - - Identify which graph is currently active - - Filter graphs by role for permission-based features + - Display unified graph/repository selector in UI + - Show all accessible data sources (both owned graphs and subscribed repositories) + - Identify currently active workspace + - Filter by type (user graphs vs repositories) **Empty Response:** - New users or users without graph access will receive an empty list with - `selectedGraphId: null`. Users should create a new graph or request access - to an existing graph. + New users receive an empty list with `selectedGraphId: null`. Users should create + a graph or subscribe to a repository. **Note:** Graph listing is included - no credit consumption required. @@ -219,39 +240,46 @@ async def asyncio( *, client: AuthenticatedClient, ) -> Optional[Union[Any, UserGraphsResponse]]: - r"""Get User Graphs + r"""Get User Graphs and Repositories - List all graph databases accessible to the current user with roles and selection status. + List all graph databases and shared repositories accessible to the current user. - Returns a comprehensive list of all graphs the user can access, including their - role in each graph (admin or member) and which graph is currently selected as - the active workspace. + Returns a unified list of both user-created graphs and shared repositories (like SEC data) + that the user has access to, including their role/access level and selection status. **Returned Information:** - - Graph ID and display name for each accessible graph - - User's role (admin/member) indicating permission level - - Selection status (one graph can be marked as \"selected\") - - Creation timestamp for each graph - - **Graph Roles:** - - `admin`: Full access - can manage graph settings, invite users, delete graph - - `member`: Read/write access - can query and modify data, cannot manage settings + - Graph/Repository ID and display name + - User's role/access level (admin/member for graphs, read/write/admin for repositories) + - Selection status (only user graphs can be selected) + - Creation timestamp + - Repository type indicator (isRepository: true for shared repositories) + + **User Graphs (isRepository: false):** + - Collaborative workspaces that can be shared with other users + - Roles: `admin` (full access, can invite users) or `member` (read/write access) + - Can be selected as active workspace + - Graphs you create or have been invited to + + **Shared Repositories (isRepository: true):** + - Read-only data repositories like SEC filings, industry benchmarks + - Access levels: `read`, `write` (for data contributions), `admin` + - Cannot be selected (each has separate subscription) + - Require separate subscriptions (personal, cannot be shared) **Selected Graph Concept:** - The \"selected\" graph is the user's currently active workspace. Many API operations - default to the selected graph if no graph_id is provided. Users can change their - selected graph via the `POST /v1/graphs/{graph_id}/select` endpoint. + The \"selected\" graph is the user's currently active workspace (user graphs only). + Many API operations default to the selected graph if no graph_id is provided. + Users can change their selected graph via `POST /v1/graphs/{graph_id}/select`. **Use Cases:** - - Display graph selector in UI - - Show user's accessible workspaces - - Identify which graph is currently active - - Filter graphs by role for permission-based features + - Display unified graph/repository selector in UI + - Show all accessible data sources (both owned graphs and subscribed repositories) + - Identify currently active workspace + - Filter by type (user graphs vs repositories) **Empty Response:** - New users or users without graph access will receive an empty list with - `selectedGraphId: null`. Users should create a new graph or request access - to an existing graph. + New users receive an empty list with `selectedGraphId: null`. Users should create + a graph or subscribe to a repository. **Note:** Graph listing is included - no credit consumption required. diff --git a/robosystems_client/models/graph_info.py b/robosystems_client/models/graph_info.py index 5a5b85d2..fbbc4069 100644 --- a/robosystems_client/models/graph_info.py +++ b/robosystems_client/models/graph_info.py @@ -1,9 +1,11 @@ from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="GraphInfo") @@ -14,9 +16,11 @@ class GraphInfo: Attributes: graph_id (str): Graph database identifier graph_name (str): Display name for the graph - role (str): User's role in this graph + role (str): User's role/access level is_selected (bool): Whether this is the currently selected graph created_at (str): Creation timestamp + is_repository (Union[Unset, bool]): Whether this is a shared repository (vs user graph) Default: False. + repository_type (Union[None, Unset, str]): Repository type if isRepository=true """ graph_id: str @@ -24,6 +28,8 @@ class GraphInfo: role: str is_selected: bool created_at: str + is_repository: Union[Unset, bool] = False + repository_type: Union[None, Unset, str] = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -37,6 +43,14 @@ def to_dict(self) -> dict[str, Any]: created_at = self.created_at + is_repository = self.is_repository + + repository_type: Union[None, Unset, str] + if isinstance(self.repository_type, Unset): + repository_type = UNSET + else: + repository_type = self.repository_type + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,6 +62,10 @@ def to_dict(self) -> dict[str, Any]: "createdAt": created_at, } ) + if is_repository is not UNSET: + field_dict["isRepository"] = is_repository + if repository_type is not UNSET: + field_dict["repositoryType"] = repository_type return field_dict @@ -64,12 +82,25 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_at = d.pop("createdAt") + is_repository = d.pop("isRepository", UNSET) + + def _parse_repository_type(data: object) -> Union[None, Unset, str]: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(Union[None, Unset, str], data) + + repository_type = _parse_repository_type(d.pop("repositoryType", UNSET)) + graph_info = cls( graph_id=graph_id, graph_name=graph_name, role=role, is_selected=is_selected, created_at=created_at, + is_repository=is_repository, + repository_type=repository_type, ) graph_info.additional_properties = d diff --git a/robosystems_client/models/graph_tier_instance.py b/robosystems_client/models/graph_tier_instance.py index fc3cc3dd..60452a08 100644 --- a/robosystems_client/models/graph_tier_instance.py +++ b/robosystems_client/models/graph_tier_instance.py @@ -13,13 +13,13 @@ class GraphTierInstance: Attributes: type_ (str): Instance type identifier - memory_mb (int): Memory in megabytes - databases_per_instance (int): Databases per instance + memory_mb (int): Memory allocated to your graph in megabytes + is_multitenant (bool): Whether this tier shares infrastructure with other graphs """ type_: str memory_mb: int - databases_per_instance: int + is_multitenant: bool additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -27,7 +27,7 @@ def to_dict(self) -> dict[str, Any]: memory_mb = self.memory_mb - databases_per_instance = self.databases_per_instance + is_multitenant = self.is_multitenant field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -35,7 +35,7 @@ def to_dict(self) -> dict[str, Any]: { "type": type_, "memory_mb": memory_mb, - "databases_per_instance": databases_per_instance, + "is_multitenant": is_multitenant, } ) @@ -48,12 +48,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: memory_mb = d.pop("memory_mb") - databases_per_instance = d.pop("databases_per_instance") + is_multitenant = d.pop("is_multitenant") graph_tier_instance = cls( type_=type_, memory_mb=memory_mb, - databases_per_instance=databases_per_instance, + is_multitenant=is_multitenant, ) graph_tier_instance.additional_properties = d