From 9e74ac11f63352d91941a034c53f1489d90c16cd Mon Sep 17 00:00:00 2001 From: "hotdata-automation[bot]" <267177015+hotdata-automation[bot]@users.noreply.github.com> Date: Tue, 9 Jun 2026 23:40:08 +0000 Subject: [PATCH] feat(api): add list-indexes endpoint, exclude internal migrate-backend --- .gitignore | 7 - .openapi-generator/FILES | 28 +- docs/IndexEntryResponse.md | 39 ++ docs/IndexesApi.md | 101 +++++ docs/ListIndexesPageResponse.md | 34 ++ docs/WorkspaceDetail.md | 1 - docs/WorkspaceListItem.md | 1 - hotdata/__init__.py | 18 +- hotdata/api/__init__.py | 1 - hotdata/api/indexes_api.py | 375 +++++++++++++++++++ hotdata/api_client.py | 2 +- hotdata/models/__init__.py | 8 +- hotdata/models/index_entry_response.py | 113 ++++++ hotdata/models/list_indexes_page_response.py | 110 ++++++ hotdata/models/workspace_detail.py | 6 +- hotdata/models/workspace_list_item.py | 6 +- pyproject.toml | 2 +- test/test_index_entry_response.py | 73 ++++ test/test_list_indexes_page_response.py | 64 ++++ 19 files changed, 927 insertions(+), 62 deletions(-) create mode 100644 docs/IndexEntryResponse.md create mode 100644 docs/ListIndexesPageResponse.md create mode 100644 hotdata/models/index_entry_response.py create mode 100644 hotdata/models/list_indexes_page_response.py create mode 100644 test/test_index_entry_response.py create mode 100644 test/test_list_indexes_page_response.py diff --git a/.gitignore b/.gitignore index 229d53d..65b06b9 100644 --- a/.gitignore +++ b/.gitignore @@ -64,10 +64,3 @@ target/ # Ipython Notebook .ipynb_checkpoints - -# macOS -.DS_Store - -# Claude Code (local-only state) -.claude/settings.local.json -.claude/worktrees/ diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index eecb7ba..6123818 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -37,7 +37,6 @@ docs/CreateDatasetResponse.md docs/CreateEmbeddingProviderRequest.md docs/CreateEmbeddingProviderResponse.md docs/CreateIndexRequest.md -docs/CreateSandboxRequest.md docs/CreateSavedQueryRequest.md docs/CreateSecretRequest.md docs/CreateSecretResponse.md @@ -60,7 +59,6 @@ docs/DatasetSourceOneOf4.md docs/DatasetSummary.md docs/DatasetVersionSummary.md docs/DatasetsApi.md -docs/DeleteSandboxResponse.md docs/DiscoveryStatus.md docs/EmbeddingProviderResponse.md docs/EmbeddingProvidersApi.md @@ -71,6 +69,7 @@ docs/GetDatabaseContextResponse.md docs/GetDatasetResponse.md docs/GetResultResponse.md docs/GetSecretResponse.md +docs/IndexEntryResponse.md docs/IndexInfoResponse.md docs/IndexStatus.md docs/IndexesApi.md @@ -90,11 +89,11 @@ docs/ListDatabasesResponse.md docs/ListDatasetVersionsResponse.md docs/ListDatasetsResponse.md docs/ListEmbeddingProvidersResponse.md +docs/ListIndexesPageResponse.md docs/ListIndexesResponse.md docs/ListJobsResponse.md docs/ListQueryRunsResponse.md docs/ListResultsResponse.md -docs/ListSandboxesResponse.md docs/ListSavedQueriesResponse.md docs/ListSavedQueryVersionsResponse.md docs/ListSecretsResponse.md @@ -118,9 +117,6 @@ docs/RefreshWarning.md docs/ResultInfo.md docs/ResultsApi.md docs/ResultsFormatQuery.md -docs/Sandbox.md -docs/SandboxResponse.md -docs/SandboxesApi.md docs/SavedQueriesApi.md docs/SavedQueryDatasetSource.md docs/SavedQueryDetail.md @@ -141,7 +137,6 @@ docs/UpdateDatasetRequest.md docs/UpdateDatasetResponse.md docs/UpdateEmbeddingProviderRequest.md docs/UpdateEmbeddingProviderResponse.md -docs/UpdateSandboxRequest.md docs/UpdateSavedQueryRequest.md docs/UpdateSecretRequest.md docs/UpdateSecretResponse.md @@ -170,7 +165,6 @@ hotdata/api/query_api.py hotdata/api/query_runs_api.py hotdata/api/refresh_api.py hotdata/api/results_api.py -hotdata/api/sandboxes_api.py hotdata/api/saved_queries_api.py hotdata/api/secrets_api.py hotdata/api/uploads_api.py @@ -214,7 +208,6 @@ hotdata/models/create_dataset_response.py hotdata/models/create_embedding_provider_request.py hotdata/models/create_embedding_provider_response.py hotdata/models/create_index_request.py -hotdata/models/create_sandbox_request.py hotdata/models/create_saved_query_request.py hotdata/models/create_secret_request.py hotdata/models/create_secret_response.py @@ -234,7 +227,6 @@ hotdata/models/dataset_source_one_of3.py hotdata/models/dataset_source_one_of4.py hotdata/models/dataset_summary.py hotdata/models/dataset_version_summary.py -hotdata/models/delete_sandbox_response.py hotdata/models/discovery_status.py hotdata/models/embedding_provider_response.py hotdata/models/error.py @@ -244,6 +236,7 @@ hotdata/models/get_database_context_response.py hotdata/models/get_dataset_response.py hotdata/models/get_result_response.py hotdata/models/get_secret_response.py +hotdata/models/index_entry_response.py hotdata/models/index_info_response.py hotdata/models/index_status.py hotdata/models/information_schema_response.py @@ -260,11 +253,11 @@ hotdata/models/list_databases_response.py hotdata/models/list_dataset_versions_response.py hotdata/models/list_datasets_response.py hotdata/models/list_embedding_providers_response.py +hotdata/models/list_indexes_page_response.py hotdata/models/list_indexes_response.py hotdata/models/list_jobs_response.py hotdata/models/list_query_runs_response.py hotdata/models/list_results_response.py -hotdata/models/list_sandboxes_response.py hotdata/models/list_saved_queries_response.py hotdata/models/list_saved_query_versions_response.py hotdata/models/list_secrets_response.py @@ -284,8 +277,6 @@ hotdata/models/refresh_response.py hotdata/models/refresh_warning.py hotdata/models/result_info.py hotdata/models/results_format_query.py -hotdata/models/sandbox.py -hotdata/models/sandbox_response.py hotdata/models/saved_query_dataset_source.py hotdata/models/saved_query_detail.py hotdata/models/saved_query_summary.py @@ -304,7 +295,6 @@ hotdata/models/update_dataset_request.py hotdata/models/update_dataset_response.py hotdata/models/update_embedding_provider_request.py hotdata/models/update_embedding_provider_response.py -hotdata/models/update_sandbox_request.py hotdata/models/update_saved_query_request.py hotdata/models/update_secret_request.py hotdata/models/update_secret_response.py @@ -318,14 +308,8 @@ hotdata/models/workspace_detail.py hotdata/models/workspace_list_item.py hotdata/py.typed hotdata/rest.py -pyproject.toml -requirements.txt setup.cfg -test-requirements.txt test/__init__.py -test/test_add_managed_schema_request.py -test/test_add_managed_table_decl.py -test/test_add_managed_table_request.py -test/test_managed_schema_response.py -test/test_managed_table_response.py +test/test_index_entry_response.py +test/test_list_indexes_page_response.py tox.ini diff --git a/docs/IndexEntryResponse.md b/docs/IndexEntryResponse.md new file mode 100644 index 0000000..6129383 --- /dev/null +++ b/docs/IndexEntryResponse.md @@ -0,0 +1,39 @@ +# IndexEntryResponse + +One index in a cross-table listing: the per-table [`IndexInfoResponse`] plus the identity needed to know which table it belongs to. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**columns** | **List[str]** | | +**created_at** | **datetime** | | +**index_name** | **str** | | +**index_type** | **str** | | +**metric** | **str** | Distance metric this index was built with. Only present for vector indexes. | [optional] +**status** | [**IndexStatus**](IndexStatus.md) | | +**updated_at** | **datetime** | | +**connection_id** | **str** | | [optional] +**schema_name** | **str** | | +**table_name** | **str** | | + +## Example + +```python +from hotdata.models.index_entry_response import IndexEntryResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of IndexEntryResponse from a JSON string +index_entry_response_instance = IndexEntryResponse.from_json(json) +# print the JSON string representation of the object +print(IndexEntryResponse.to_json()) + +# convert the object into a dict +index_entry_response_dict = index_entry_response_instance.to_dict() +# create an instance of IndexEntryResponse from a dict +index_entry_response_from_dict = IndexEntryResponse.from_dict(index_entry_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IndexesApi.md b/docs/IndexesApi.md index 061a530..5838fc0 100644 --- a/docs/IndexesApi.md +++ b/docs/IndexesApi.md @@ -10,6 +10,7 @@ Method | HTTP request | Description [**delete_index**](IndexesApi.md#delete_index) | **DELETE** /v1/connections/{connection_id}/tables/{schema}/{table}/indexes/{index_name} | Delete an index [**list_dataset_indexes**](IndexesApi.md#list_dataset_indexes) | **GET** /v1/datasets/{dataset_id}/indexes | List indexes on a dataset [**list_indexes**](IndexesApi.md#list_indexes) | **GET** /v1/connections/{connection_id}/tables/{schema}/{table}/indexes | List indexes on a table +[**list_indexes_collection**](IndexesApi.md#list_indexes_collection) | **GET** /v1/indexes | List indexes across tables in a database # **create_dataset_index** @@ -571,3 +572,103 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **list_indexes_collection** +> ListIndexesPageResponse list_indexes_collection(x_database_id, connection_id=connection_id, var_schema=var_schema, table=table, index_type=index_type, limit=limit, cursor=cursor) + +List indexes across tables in a database + +List all indexes in the database identified by the required X-Database-Id header, paginated. Optional filters narrow by connection, schema, table, or index type. + +### Example + +* Api Key Authentication (WorkspaceId): +* Bearer Authentication (BearerAuth): + +```python +import hotdata +from hotdata.models.list_indexes_page_response import ListIndexesPageResponse +from hotdata.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.hotdata.dev +# See configuration.py for a list of all supported configuration parameters. +configuration = hotdata.Configuration( + host = "https://api.hotdata.dev" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: WorkspaceId +configuration.api_key['WorkspaceId'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['WorkspaceId'] = 'Bearer' + +# Configure Bearer authorization: BearerAuth +configuration = hotdata.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with hotdata.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hotdata.IndexesApi(api_client) + x_database_id = 'x_database_id_example' # str | Database to scope to (required) + connection_id = 'connection_id_example' # str | Filter to one connection (optional) + var_schema = 'var_schema_example' # str | Filter by schema name (optional) + table = 'table_example' # str | Filter by table name (optional) + index_type = 'index_type_example' # str | Filter by index type (optional) + limit = 56 # int | Max indexes per page (optional) + cursor = 'cursor_example' # str | Pagination cursor (optional) + + try: + # List indexes across tables in a database + api_response = api_instance.list_indexes_collection(x_database_id, connection_id=connection_id, var_schema=var_schema, table=table, index_type=index_type, limit=limit, cursor=cursor) + print("The response of IndexesApi->list_indexes_collection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexesApi->list_indexes_collection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_database_id** | **str**| Database to scope to (required) | + **connection_id** | **str**| Filter to one connection | [optional] + **var_schema** | **str**| Filter by schema name | [optional] + **table** | **str**| Filter by table name | [optional] + **index_type** | **str**| Filter by index type | [optional] + **limit** | **int**| Max indexes per page | [optional] + **cursor** | **str**| Pagination cursor | [optional] + +### Return type + +[**ListIndexesPageResponse**](ListIndexesPageResponse.md) + +### Authorization + +[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Indexes listed | - | +**400** | Missing X-Database-Id or bad cursor | - | +**404** | Database not found | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ListIndexesPageResponse.md b/docs/ListIndexesPageResponse.md new file mode 100644 index 0000000..ab8a0b8 --- /dev/null +++ b/docs/ListIndexesPageResponse.md @@ -0,0 +1,34 @@ +# ListIndexesPageResponse + +Response body for `GET /v1/indexes` (paginated, cross-table). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | | +**has_more** | **bool** | | +**indexes** | [**List[IndexEntryResponse]**](IndexEntryResponse.md) | | +**limit** | **int** | | +**next_cursor** | **str** | | [optional] + +## Example + +```python +from hotdata.models.list_indexes_page_response import ListIndexesPageResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListIndexesPageResponse from a JSON string +list_indexes_page_response_instance = ListIndexesPageResponse.from_json(json) +# print the JSON string representation of the object +print(ListIndexesPageResponse.to_json()) + +# convert the object into a dict +list_indexes_page_response_dict = list_indexes_page_response_instance.to_dict() +# create an instance of ListIndexesPageResponse from a dict +list_indexes_page_response_from_dict = ListIndexesPageResponse.from_dict(list_indexes_page_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WorkspaceDetail.md b/docs/WorkspaceDetail.md index ad4c5ed..39624ef 100644 --- a/docs/WorkspaceDetail.md +++ b/docs/WorkspaceDetail.md @@ -8,7 +8,6 @@ Name | Type | Description | Notes **public_id** | **str** | | **name** | **str** | | **provision_status** | **str** | | -**namespace** | **str** | | ## Example diff --git a/docs/WorkspaceListItem.md b/docs/WorkspaceListItem.md index f74069b..080c4cc 100644 --- a/docs/WorkspaceListItem.md +++ b/docs/WorkspaceListItem.md @@ -10,7 +10,6 @@ Name | Type | Description | Notes **active** | **bool** | | **favorite** | **bool** | | **provision_status** | **str** | | -**namespace** | **str** | | ## Example diff --git a/hotdata/__init__.py b/hotdata/__init__.py index c0733b7..0f70de1 100644 --- a/hotdata/__init__.py +++ b/hotdata/__init__.py @@ -37,7 +37,6 @@ "QueryRunsApi", "RefreshApi", "ResultsApi", - "SandboxesApi", "SavedQueriesApi", "SecretsApi", "UploadsApi", @@ -85,7 +84,6 @@ "CreateEmbeddingProviderRequest", "CreateEmbeddingProviderResponse", "CreateIndexRequest", - "CreateSandboxRequest", "CreateSavedQueryRequest", "CreateSecretRequest", "CreateSecretResponse", @@ -105,7 +103,6 @@ "DatasetSourceOneOf4", "DatasetSummary", "DatasetVersionSummary", - "DeleteSandboxResponse", "DiscoveryStatus", "EmbeddingProviderResponse", "Error", @@ -115,6 +112,7 @@ "GetDatasetResponse", "GetResultResponse", "GetSecretResponse", + "IndexEntryResponse", "IndexInfoResponse", "IndexStatus", "InformationSchemaResponse", @@ -131,11 +129,11 @@ "ListDatasetVersionsResponse", "ListDatasetsResponse", "ListEmbeddingProvidersResponse", + "ListIndexesPageResponse", "ListIndexesResponse", "ListJobsResponse", "ListQueryRunsResponse", "ListResultsResponse", - "ListSandboxesResponse", "ListSavedQueriesResponse", "ListSavedQueryVersionsResponse", "ListSecretsResponse", @@ -155,8 +153,6 @@ "RefreshWarning", "ResultInfo", "ResultsFormatQuery", - "Sandbox", - "SandboxResponse", "SavedQueryDatasetSource", "SavedQueryDetail", "SavedQuerySummary", @@ -175,7 +171,6 @@ "UpdateDatasetResponse", "UpdateEmbeddingProviderRequest", "UpdateEmbeddingProviderResponse", - "UpdateSandboxRequest", "UpdateSavedQueryRequest", "UpdateSecretRequest", "UpdateSecretResponse", @@ -203,7 +198,6 @@ from hotdata.api.query_runs_api import QueryRunsApi as QueryRunsApi from hotdata.api.refresh_api import RefreshApi as RefreshApi from hotdata.api.results_api import ResultsApi as ResultsApi -from hotdata.api.sandboxes_api import SandboxesApi as SandboxesApi from hotdata.api.saved_queries_api import SavedQueriesApi as SavedQueriesApi from hotdata.api.secrets_api import SecretsApi as SecretsApi from hotdata.api.uploads_api import UploadsApi as UploadsApi @@ -255,7 +249,6 @@ from hotdata.models.create_embedding_provider_request import CreateEmbeddingProviderRequest as CreateEmbeddingProviderRequest from hotdata.models.create_embedding_provider_response import CreateEmbeddingProviderResponse as CreateEmbeddingProviderResponse from hotdata.models.create_index_request import CreateIndexRequest as CreateIndexRequest -from hotdata.models.create_sandbox_request import CreateSandboxRequest as CreateSandboxRequest from hotdata.models.create_saved_query_request import CreateSavedQueryRequest as CreateSavedQueryRequest from hotdata.models.create_secret_request import CreateSecretRequest as CreateSecretRequest from hotdata.models.create_secret_response import CreateSecretResponse as CreateSecretResponse @@ -275,7 +268,6 @@ from hotdata.models.dataset_source_one_of4 import DatasetSourceOneOf4 as DatasetSourceOneOf4 from hotdata.models.dataset_summary import DatasetSummary as DatasetSummary from hotdata.models.dataset_version_summary import DatasetVersionSummary as DatasetVersionSummary -from hotdata.models.delete_sandbox_response import DeleteSandboxResponse as DeleteSandboxResponse from hotdata.models.discovery_status import DiscoveryStatus as DiscoveryStatus from hotdata.models.embedding_provider_response import EmbeddingProviderResponse as EmbeddingProviderResponse from hotdata.models.error import Error as Error @@ -285,6 +277,7 @@ from hotdata.models.get_dataset_response import GetDatasetResponse as GetDatasetResponse from hotdata.models.get_result_response import GetResultResponse as GetResultResponse from hotdata.models.get_secret_response import GetSecretResponse as GetSecretResponse +from hotdata.models.index_entry_response import IndexEntryResponse as IndexEntryResponse from hotdata.models.index_info_response import IndexInfoResponse as IndexInfoResponse from hotdata.models.index_status import IndexStatus as IndexStatus from hotdata.models.information_schema_response import InformationSchemaResponse as InformationSchemaResponse @@ -301,11 +294,11 @@ from hotdata.models.list_dataset_versions_response import ListDatasetVersionsResponse as ListDatasetVersionsResponse from hotdata.models.list_datasets_response import ListDatasetsResponse as ListDatasetsResponse from hotdata.models.list_embedding_providers_response import ListEmbeddingProvidersResponse as ListEmbeddingProvidersResponse +from hotdata.models.list_indexes_page_response import ListIndexesPageResponse as ListIndexesPageResponse from hotdata.models.list_indexes_response import ListIndexesResponse as ListIndexesResponse from hotdata.models.list_jobs_response import ListJobsResponse as ListJobsResponse from hotdata.models.list_query_runs_response import ListQueryRunsResponse as ListQueryRunsResponse from hotdata.models.list_results_response import ListResultsResponse as ListResultsResponse -from hotdata.models.list_sandboxes_response import ListSandboxesResponse as ListSandboxesResponse from hotdata.models.list_saved_queries_response import ListSavedQueriesResponse as ListSavedQueriesResponse from hotdata.models.list_saved_query_versions_response import ListSavedQueryVersionsResponse as ListSavedQueryVersionsResponse from hotdata.models.list_secrets_response import ListSecretsResponse as ListSecretsResponse @@ -325,8 +318,6 @@ from hotdata.models.refresh_warning import RefreshWarning as RefreshWarning from hotdata.models.result_info import ResultInfo as ResultInfo from hotdata.models.results_format_query import ResultsFormatQuery as ResultsFormatQuery -from hotdata.models.sandbox import Sandbox as Sandbox -from hotdata.models.sandbox_response import SandboxResponse as SandboxResponse from hotdata.models.saved_query_dataset_source import SavedQueryDatasetSource as SavedQueryDatasetSource from hotdata.models.saved_query_detail import SavedQueryDetail as SavedQueryDetail from hotdata.models.saved_query_summary import SavedQuerySummary as SavedQuerySummary @@ -345,7 +336,6 @@ from hotdata.models.update_dataset_response import UpdateDatasetResponse as UpdateDatasetResponse from hotdata.models.update_embedding_provider_request import UpdateEmbeddingProviderRequest as UpdateEmbeddingProviderRequest from hotdata.models.update_embedding_provider_response import UpdateEmbeddingProviderResponse as UpdateEmbeddingProviderResponse -from hotdata.models.update_sandbox_request import UpdateSandboxRequest as UpdateSandboxRequest from hotdata.models.update_saved_query_request import UpdateSavedQueryRequest as UpdateSavedQueryRequest from hotdata.models.update_secret_request import UpdateSecretRequest as UpdateSecretRequest from hotdata.models.update_secret_response import UpdateSecretResponse as UpdateSecretResponse diff --git a/hotdata/api/__init__.py b/hotdata/api/__init__.py index 30250d0..61fc98d 100644 --- a/hotdata/api/__init__.py +++ b/hotdata/api/__init__.py @@ -14,7 +14,6 @@ from hotdata.api.query_runs_api import QueryRunsApi from hotdata.api.refresh_api import RefreshApi from hotdata.api.results_api import ResultsApi -from hotdata.api.sandboxes_api import SandboxesApi from hotdata.api.saved_queries_api import SavedQueriesApi from hotdata.api.secrets_api import SecretsApi from hotdata.api.uploads_api import UploadsApi diff --git a/hotdata/api/indexes_api.py b/hotdata/api/indexes_api.py index cada327..9e3113c 100644 --- a/hotdata/api/indexes_api.py +++ b/hotdata/api/indexes_api.py @@ -17,9 +17,11 @@ from typing_extensions import Annotated from pydantic import Field, StrictStr +from typing import Optional from typing_extensions import Annotated from hotdata.models.create_index_request import CreateIndexRequest from hotdata.models.index_info_response import IndexInfoResponse +from hotdata.models.list_indexes_page_response import ListIndexesPageResponse from hotdata.models.list_indexes_response import ListIndexesResponse from hotdata.api_client import ApiClient, RequestSerialized @@ -1825,3 +1827,376 @@ def _list_indexes_serialize( ) + + + @validate_call + def list_indexes_collection( + self, + x_database_id: Annotated[StrictStr, Field(description="Database to scope to (required)")], + connection_id: Annotated[Optional[StrictStr], Field(description="Filter to one connection")] = None, + var_schema: Annotated[Optional[StrictStr], Field(description="Filter by schema name")] = None, + table: Annotated[Optional[StrictStr], Field(description="Filter by table name")] = None, + index_type: Annotated[Optional[StrictStr], Field(description="Filter by index type")] = None, + limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Max indexes per page")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="Pagination cursor")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListIndexesPageResponse: + """List indexes across tables in a database + + List all indexes in the database identified by the required X-Database-Id header, paginated. Optional filters narrow by connection, schema, table, or index type. + + :param x_database_id: Database to scope to (required) (required) + :type x_database_id: str + :param connection_id: Filter to one connection + :type connection_id: str + :param var_schema: Filter by schema name + :type var_schema: str + :param table: Filter by table name + :type table: str + :param index_type: Filter by index type + :type index_type: str + :param limit: Max indexes per page + :type limit: int + :param cursor: Pagination cursor + :type cursor: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_indexes_collection_serialize( + x_database_id=x_database_id, + connection_id=connection_id, + var_schema=var_schema, + table=table, + index_type=index_type, + limit=limit, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListIndexesPageResponse", + '400': "ApiErrorResponse", + '404': "ApiErrorResponse", + '500': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_indexes_collection_with_http_info( + self, + x_database_id: Annotated[StrictStr, Field(description="Database to scope to (required)")], + connection_id: Annotated[Optional[StrictStr], Field(description="Filter to one connection")] = None, + var_schema: Annotated[Optional[StrictStr], Field(description="Filter by schema name")] = None, + table: Annotated[Optional[StrictStr], Field(description="Filter by table name")] = None, + index_type: Annotated[Optional[StrictStr], Field(description="Filter by index type")] = None, + limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Max indexes per page")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="Pagination cursor")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListIndexesPageResponse]: + """List indexes across tables in a database + + List all indexes in the database identified by the required X-Database-Id header, paginated. Optional filters narrow by connection, schema, table, or index type. + + :param x_database_id: Database to scope to (required) (required) + :type x_database_id: str + :param connection_id: Filter to one connection + :type connection_id: str + :param var_schema: Filter by schema name + :type var_schema: str + :param table: Filter by table name + :type table: str + :param index_type: Filter by index type + :type index_type: str + :param limit: Max indexes per page + :type limit: int + :param cursor: Pagination cursor + :type cursor: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_indexes_collection_serialize( + x_database_id=x_database_id, + connection_id=connection_id, + var_schema=var_schema, + table=table, + index_type=index_type, + limit=limit, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListIndexesPageResponse", + '400': "ApiErrorResponse", + '404': "ApiErrorResponse", + '500': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_indexes_collection_without_preload_content( + self, + x_database_id: Annotated[StrictStr, Field(description="Database to scope to (required)")], + connection_id: Annotated[Optional[StrictStr], Field(description="Filter to one connection")] = None, + var_schema: Annotated[Optional[StrictStr], Field(description="Filter by schema name")] = None, + table: Annotated[Optional[StrictStr], Field(description="Filter by table name")] = None, + index_type: Annotated[Optional[StrictStr], Field(description="Filter by index type")] = None, + limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Max indexes per page")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="Pagination cursor")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List indexes across tables in a database + + List all indexes in the database identified by the required X-Database-Id header, paginated. Optional filters narrow by connection, schema, table, or index type. + + :param x_database_id: Database to scope to (required) (required) + :type x_database_id: str + :param connection_id: Filter to one connection + :type connection_id: str + :param var_schema: Filter by schema name + :type var_schema: str + :param table: Filter by table name + :type table: str + :param index_type: Filter by index type + :type index_type: str + :param limit: Max indexes per page + :type limit: int + :param cursor: Pagination cursor + :type cursor: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_indexes_collection_serialize( + x_database_id=x_database_id, + connection_id=connection_id, + var_schema=var_schema, + table=table, + index_type=index_type, + limit=limit, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListIndexesPageResponse", + '400': "ApiErrorResponse", + '404': "ApiErrorResponse", + '500': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_indexes_collection_serialize( + self, + x_database_id, + connection_id, + var_schema, + table, + index_type, + limit, + cursor, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if connection_id is not None: + + _query_params.append(('connection_id', connection_id)) + + if var_schema is not None: + + _query_params.append(('schema', var_schema)) + + if table is not None: + + _query_params.append(('table', table)) + + if index_type is not None: + + _query_params.append(('index_type', index_type)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + # process the header parameters + if x_database_id is not None: + _header_params['X-Database-Id'] = x_database_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'WorkspaceId', + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/indexes', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/hotdata/api_client.py b/hotdata/api_client.py index 4c1cabd..1393125 100644 --- a/hotdata/api_client.py +++ b/hotdata/api_client.py @@ -91,7 +91,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/0.2.6/python' + self.user_agent = 'OpenAPI-Generator/0.3.2/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/hotdata/models/__init__.py b/hotdata/models/__init__.py index 5883742..5c2a580 100644 --- a/hotdata/models/__init__.py +++ b/hotdata/models/__init__.py @@ -48,7 +48,6 @@ from hotdata.models.create_embedding_provider_request import CreateEmbeddingProviderRequest from hotdata.models.create_embedding_provider_response import CreateEmbeddingProviderResponse from hotdata.models.create_index_request import CreateIndexRequest -from hotdata.models.create_sandbox_request import CreateSandboxRequest from hotdata.models.create_saved_query_request import CreateSavedQueryRequest from hotdata.models.create_secret_request import CreateSecretRequest from hotdata.models.create_secret_response import CreateSecretResponse @@ -68,7 +67,6 @@ from hotdata.models.dataset_source_one_of4 import DatasetSourceOneOf4 from hotdata.models.dataset_summary import DatasetSummary from hotdata.models.dataset_version_summary import DatasetVersionSummary -from hotdata.models.delete_sandbox_response import DeleteSandboxResponse from hotdata.models.discovery_status import DiscoveryStatus from hotdata.models.embedding_provider_response import EmbeddingProviderResponse from hotdata.models.error import Error @@ -78,6 +76,7 @@ from hotdata.models.get_dataset_response import GetDatasetResponse from hotdata.models.get_result_response import GetResultResponse from hotdata.models.get_secret_response import GetSecretResponse +from hotdata.models.index_entry_response import IndexEntryResponse from hotdata.models.index_info_response import IndexInfoResponse from hotdata.models.index_status import IndexStatus from hotdata.models.information_schema_response import InformationSchemaResponse @@ -94,11 +93,11 @@ from hotdata.models.list_dataset_versions_response import ListDatasetVersionsResponse from hotdata.models.list_datasets_response import ListDatasetsResponse from hotdata.models.list_embedding_providers_response import ListEmbeddingProvidersResponse +from hotdata.models.list_indexes_page_response import ListIndexesPageResponse from hotdata.models.list_indexes_response import ListIndexesResponse from hotdata.models.list_jobs_response import ListJobsResponse from hotdata.models.list_query_runs_response import ListQueryRunsResponse from hotdata.models.list_results_response import ListResultsResponse -from hotdata.models.list_sandboxes_response import ListSandboxesResponse from hotdata.models.list_saved_queries_response import ListSavedQueriesResponse from hotdata.models.list_saved_query_versions_response import ListSavedQueryVersionsResponse from hotdata.models.list_secrets_response import ListSecretsResponse @@ -118,8 +117,6 @@ from hotdata.models.refresh_warning import RefreshWarning from hotdata.models.result_info import ResultInfo from hotdata.models.results_format_query import ResultsFormatQuery -from hotdata.models.sandbox import Sandbox -from hotdata.models.sandbox_response import SandboxResponse from hotdata.models.saved_query_dataset_source import SavedQueryDatasetSource from hotdata.models.saved_query_detail import SavedQueryDetail from hotdata.models.saved_query_summary import SavedQuerySummary @@ -138,7 +135,6 @@ from hotdata.models.update_dataset_response import UpdateDatasetResponse from hotdata.models.update_embedding_provider_request import UpdateEmbeddingProviderRequest from hotdata.models.update_embedding_provider_response import UpdateEmbeddingProviderResponse -from hotdata.models.update_sandbox_request import UpdateSandboxRequest from hotdata.models.update_saved_query_request import UpdateSavedQueryRequest from hotdata.models.update_secret_request import UpdateSecretRequest from hotdata.models.update_secret_response import UpdateSecretResponse diff --git a/hotdata/models/index_entry_response.py b/hotdata/models/index_entry_response.py new file mode 100644 index 0000000..3cb7a23 --- /dev/null +++ b/hotdata/models/index_entry_response.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hotdata.models.index_status import IndexStatus +from typing import Optional, Set +from typing_extensions import Self + +class IndexEntryResponse(BaseModel): + """ + One index in a cross-table listing: the per-table [`IndexInfoResponse`] plus the identity needed to know which table it belongs to. + """ # noqa: E501 + columns: List[StrictStr] + created_at: datetime + index_name: StrictStr + index_type: StrictStr + metric: Optional[StrictStr] = Field(default=None, description="Distance metric this index was built with. Only present for vector indexes.") + status: IndexStatus + updated_at: datetime + connection_id: Optional[StrictStr] = None + schema_name: StrictStr + table_name: StrictStr + __properties: ClassVar[List[str]] = ["columns", "created_at", "index_name", "index_type", "metric", "status", "updated_at", "connection_id", "schema_name", "table_name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IndexEntryResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if connection_id (nullable) is None + # and model_fields_set contains the field + if self.connection_id is None and "connection_id" in self.model_fields_set: + _dict['connection_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IndexEntryResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "columns": obj.get("columns"), + "created_at": obj.get("created_at"), + "index_name": obj.get("index_name"), + "index_type": obj.get("index_type"), + "metric": obj.get("metric"), + "status": obj.get("status"), + "updated_at": obj.get("updated_at"), + "connection_id": obj.get("connection_id"), + "schema_name": obj.get("schema_name"), + "table_name": obj.get("table_name") + }) + return _obj + + diff --git a/hotdata/models/list_indexes_page_response.py b/hotdata/models/list_indexes_page_response.py new file mode 100644 index 0000000..f2cd959 --- /dev/null +++ b/hotdata/models/list_indexes_page_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from hotdata.models.index_entry_response import IndexEntryResponse +from typing import Optional, Set +from typing_extensions import Self + +class ListIndexesPageResponse(BaseModel): + """ + Response body for `GET /v1/indexes` (paginated, cross-table). + """ # noqa: E501 + count: Annotated[int, Field(strict=True, ge=0)] + has_more: StrictBool + indexes: List[IndexEntryResponse] + limit: Annotated[int, Field(strict=True, ge=0)] + next_cursor: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["count", "has_more", "indexes", "limit", "next_cursor"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListIndexesPageResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in indexes (list) + _items = [] + if self.indexes: + for _item_indexes in self.indexes: + if _item_indexes: + _items.append(_item_indexes.to_dict()) + _dict['indexes'] = _items + # set to None if next_cursor (nullable) is None + # and model_fields_set contains the field + if self.next_cursor is None and "next_cursor" in self.model_fields_set: + _dict['next_cursor'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListIndexesPageResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "count": obj.get("count"), + "has_more": obj.get("has_more"), + "indexes": [IndexEntryResponse.from_dict(_item) for _item in obj["indexes"]] if obj.get("indexes") is not None else None, + "limit": obj.get("limit"), + "next_cursor": obj.get("next_cursor") + }) + return _obj + + diff --git a/hotdata/models/workspace_detail.py b/hotdata/models/workspace_detail.py index 5d41b14..49c09b7 100644 --- a/hotdata/models/workspace_detail.py +++ b/hotdata/models/workspace_detail.py @@ -30,8 +30,7 @@ class WorkspaceDetail(BaseModel): public_id: StrictStr name: StrictStr provision_status: StrictStr - namespace: StrictStr - __properties: ClassVar[List[str]] = ["public_id", "name", "provision_status", "namespace"] + __properties: ClassVar[List[str]] = ["public_id", "name", "provision_status"] model_config = ConfigDict( populate_by_name=True, @@ -86,8 +85,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "public_id": obj.get("public_id"), "name": obj.get("name"), - "provision_status": obj.get("provision_status"), - "namespace": obj.get("namespace") + "provision_status": obj.get("provision_status") }) return _obj diff --git a/hotdata/models/workspace_list_item.py b/hotdata/models/workspace_list_item.py index 59ee5c2..635374f 100644 --- a/hotdata/models/workspace_list_item.py +++ b/hotdata/models/workspace_list_item.py @@ -32,8 +32,7 @@ class WorkspaceListItem(BaseModel): active: StrictBool favorite: StrictBool provision_status: StrictStr - namespace: StrictStr - __properties: ClassVar[List[str]] = ["public_id", "name", "active", "favorite", "provision_status", "namespace"] + __properties: ClassVar[List[str]] = ["public_id", "name", "active", "favorite", "provision_status"] model_config = ConfigDict( populate_by_name=True, @@ -90,8 +89,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "active": obj.get("active"), "favorite": obj.get("favorite"), - "provision_status": obj.get("provision_status"), - "namespace": obj.get("namespace") + "provision_status": obj.get("provision_status") }) return _obj diff --git a/pyproject.toml b/pyproject.toml index 063f6a0..0a3020f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "hotdata" -version = "0.3.1" +version = "0.3.2" description = "Hotdata API" authors = [ {name = "Hotdata",email = "developers@hotdata.dev"}, diff --git a/test/test_index_entry_response.py b/test/test_index_entry_response.py new file mode 100644 index 0000000..988459b --- /dev/null +++ b/test/test_index_entry_response.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.index_entry_response import IndexEntryResponse + +class TestIndexEntryResponse(unittest.TestCase): + """IndexEntryResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IndexEntryResponse: + """Test IndexEntryResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IndexEntryResponse` + """ + model = IndexEntryResponse() + if include_optional: + return IndexEntryResponse( + columns = [ + '' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + index_name = '', + index_type = '', + metric = '', + status = 'ready', + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + connection_id = '', + schema_name = '', + table_name = '' + ) + else: + return IndexEntryResponse( + columns = [ + '' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + index_name = '', + index_type = '', + status = 'ready', + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + schema_name = '', + table_name = '', + ) + """ + + def testIndexEntryResponse(self): + """Test IndexEntryResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_indexes_page_response.py b/test/test_list_indexes_page_response.py new file mode 100644 index 0000000..0f8f780 --- /dev/null +++ b/test/test_list_indexes_page_response.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.list_indexes_page_response import ListIndexesPageResponse + +class TestListIndexesPageResponse(unittest.TestCase): + """ListIndexesPageResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListIndexesPageResponse: + """Test ListIndexesPageResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListIndexesPageResponse` + """ + model = ListIndexesPageResponse() + if include_optional: + return ListIndexesPageResponse( + count = 0, + has_more = True, + indexes = [ + null + ], + limit = 0, + next_cursor = '' + ) + else: + return ListIndexesPageResponse( + count = 0, + has_more = True, + indexes = [ + null + ], + limit = 0, + ) + """ + + def testListIndexesPageResponse(self): + """Test ListIndexesPageResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main()