From 45e3d609ec554cd4f847a9f690db2fc83d33c661 Mon Sep 17 00:00:00 2001 From: zfarrell <1420220+zfarrell@users.noreply.github.com> Date: Tue, 9 Jun 2026 23:57:06 +0000 Subject: [PATCH 1/2] feat(api): add list-indexes endpoint --- .openapi-generator/FILES | 18 +- Cargo.toml | 2 +- docs/DeleteSandboxResponse.md | 12 - docs/IndexEntryResponse.md | 20 + docs/IndexesApi.md | 37 ++ ...xRequest.md => ListIndexesPageResponse.md} | 9 +- docs/ListSandboxesResponse.md | 12 - docs/Sandbox.md | 15 - docs/SandboxResponse.md | 12 - docs/SandboxesApi.md | 157 -------- docs/UpdateSandboxRequest.md | 12 - docs/WorkspaceDetail.md | 1 - docs/WorkspaceListItem.md | 1 - src/apis/configuration.rs | 2 +- src/apis/indexes_api.rs | 100 +++++ src/apis/mod.rs | 1 - src/apis/sandboxes_api.rs | 378 ------------------ src/models/create_sandbox_request.rs | 31 -- src/models/delete_sandbox_response.rs | 26 -- src/models/index_entry_response.rs | 70 ++++ src/models/list_indexes_page_response.rs | 50 +++ src/models/list_sandboxes_response.rs | 26 -- src/models/mod.rs | 16 +- src/models/sandbox.rs | 45 --- src/models/sandbox_response.rs | 29 -- src/models/update_sandbox_request.rs | 31 -- src/models/workspace_detail.rs | 10 +- src/models/workspace_list_item.rs | 4 - 28 files changed, 294 insertions(+), 833 deletions(-) delete mode 100644 docs/DeleteSandboxResponse.md create mode 100644 docs/IndexEntryResponse.md rename docs/{CreateSandboxRequest.md => ListIndexesPageResponse.md} (53%) delete mode 100644 docs/ListSandboxesResponse.md delete mode 100644 docs/Sandbox.md delete mode 100644 docs/SandboxResponse.md delete mode 100644 docs/SandboxesApi.md delete mode 100644 docs/UpdateSandboxRequest.md delete mode 100644 src/apis/sandboxes_api.rs delete mode 100644 src/models/create_sandbox_request.rs delete mode 100644 src/models/delete_sandbox_response.rs create mode 100644 src/models/index_entry_response.rs create mode 100644 src/models/list_indexes_page_response.rs delete mode 100644 src/models/list_sandboxes_response.rs delete mode 100644 src/models/sandbox.rs delete mode 100644 src/models/sandbox_response.rs delete mode 100644 src/models/update_sandbox_request.rs diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 3a44128..58763a2 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -35,7 +35,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 @@ -58,7 +57,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 @@ -69,6 +67,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 @@ -88,11 +87,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 @@ -116,9 +115,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 @@ -139,7 +135,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 @@ -168,7 +163,6 @@ src/apis/query_api.rs src/apis/query_runs_api.rs src/apis/refresh_api.rs src/apis/results_api.rs -src/apis/sandboxes_api.rs src/apis/saved_queries_api.rs src/apis/secrets_api.rs src/apis/uploads_api.rs @@ -207,7 +201,6 @@ src/models/create_dataset_response.rs src/models/create_embedding_provider_request.rs src/models/create_embedding_provider_response.rs src/models/create_index_request.rs -src/models/create_sandbox_request.rs src/models/create_saved_query_request.rs src/models/create_secret_request.rs src/models/create_secret_response.rs @@ -227,7 +220,6 @@ src/models/dataset_source_one_of_3.rs src/models/dataset_source_one_of_4.rs src/models/dataset_summary.rs src/models/dataset_version_summary.rs -src/models/delete_sandbox_response.rs src/models/discovery_status.rs src/models/embedding_provider_response.rs src/models/error.rs @@ -237,6 +229,7 @@ src/models/get_database_context_response.rs src/models/get_dataset_response.rs src/models/get_result_response.rs src/models/get_secret_response.rs +src/models/index_entry_response.rs src/models/index_info_response.rs src/models/index_status.rs src/models/information_schema_response.rs @@ -253,11 +246,11 @@ src/models/list_databases_response.rs src/models/list_dataset_versions_response.rs src/models/list_datasets_response.rs src/models/list_embedding_providers_response.rs +src/models/list_indexes_page_response.rs src/models/list_indexes_response.rs src/models/list_jobs_response.rs src/models/list_query_runs_response.rs src/models/list_results_response.rs -src/models/list_sandboxes_response.rs src/models/list_saved_queries_response.rs src/models/list_saved_query_versions_response.rs src/models/list_secrets_response.rs @@ -278,8 +271,6 @@ src/models/refresh_response.rs src/models/refresh_warning.rs src/models/result_info.rs src/models/results_format_query.rs -src/models/sandbox.rs -src/models/sandbox_response.rs src/models/saved_query_dataset_source.rs src/models/saved_query_detail.rs src/models/saved_query_summary.rs @@ -298,7 +289,6 @@ src/models/update_dataset_request.rs src/models/update_dataset_response.rs src/models/update_embedding_provider_request.rs src/models/update_embedding_provider_response.rs -src/models/update_sandbox_request.rs src/models/update_saved_query_request.rs src/models/update_secret_request.rs src/models/update_secret_response.rs diff --git a/Cargo.toml b/Cargo.toml index b1301c2..cde5ec8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hotdata" -version = "0.1.2" +version = "0.1.3" authors = ["developers@hotdata.dev"] description = "Powerful data platform API for datasets, queries, and analytics." license = "MIT" diff --git a/docs/DeleteSandboxResponse.md b/docs/DeleteSandboxResponse.md deleted file mode 100644 index 91647ec..0000000 --- a/docs/DeleteSandboxResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# DeleteSandboxResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ok** | **bool** | | -**deleted** | **bool** | | - -[[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/IndexEntryResponse.md b/docs/IndexEntryResponse.md new file mode 100644 index 0000000..74dae89 --- /dev/null +++ b/docs/IndexEntryResponse.md @@ -0,0 +1,20 @@ +# IndexEntryResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**columns** | **Vec** | | +**created_at** | **String** | | +**index_name** | **String** | | +**index_type** | **String** | | +**metric** | Option<**String**> | Distance metric this index was built with. Only present for vector indexes. | [optional] +**status** | [**models::IndexStatus**](IndexStatus.md) | | +**updated_at** | **String** | | +**connection_id** | Option<**String**> | | [optional] +**schema_name** | **String** | | +**table_name** | **String** | | + +[[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 d8b8c03..0c4eb80 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 @@ -202,3 +203,39 @@ Name | Type | Description | Required | 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 + +> models::ListIndexesPageResponse list_indexes_collection(x_database_id, connection_id, schema, table, index_type, limit, 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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**x_database_id** | **String** | Database to scope to (required) | [required] | +**connection_id** | Option<**String**> | Filter to one connection | | +**schema** | Option<**String**> | Filter by schema name | | +**table** | Option<**String**> | Filter by table name | | +**index_type** | Option<**String**> | Filter by index type | | +**limit** | Option<**i32**> | Max indexes per page | | +**cursor** | Option<**String**> | Pagination cursor | | + +### Return type + +[**models::ListIndexesPageResponse**](ListIndexesPageResponse.md) + +### Authorization + +[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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/CreateSandboxRequest.md b/docs/ListIndexesPageResponse.md similarity index 53% rename from docs/CreateSandboxRequest.md rename to docs/ListIndexesPageResponse.md index 8b752c0..306e3fd 100644 --- a/docs/CreateSandboxRequest.md +++ b/docs/ListIndexesPageResponse.md @@ -1,11 +1,14 @@ -# CreateSandboxRequest +# ListIndexesPageResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | Option<**String**> | Human-readable name for the sandbox. | [optional] -**markdown** | Option<**String**> | Optional markdown notes. | [optional] +**count** | **i32** | | +**has_more** | **bool** | | +**indexes** | [**Vec**](IndexEntryResponse.md) | | +**limit** | **i32** | | +**next_cursor** | Option<**String**> | | [optional] [[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/ListSandboxesResponse.md b/docs/ListSandboxesResponse.md deleted file mode 100644 index 725ada0..0000000 --- a/docs/ListSandboxesResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListSandboxesResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ok** | **bool** | | -**sandboxes** | [**Vec**](Sandbox.md) | | - -[[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/Sandbox.md b/docs/Sandbox.md deleted file mode 100644 index 07a3783..0000000 --- a/docs/Sandbox.md +++ /dev/null @@ -1,15 +0,0 @@ -# Sandbox - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**public_id** | **String** | | -**name** | **String** | | -**markdown** | **String** | Freeform markdown notes attached to the sandbox. | -**created_at** | **String** | | -**updated_at** | **String** | | - -[[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/SandboxResponse.md b/docs/SandboxResponse.md deleted file mode 100644 index d997892..0000000 --- a/docs/SandboxResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# SandboxResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ok** | **bool** | | -**sandbox** | [**models::Sandbox**](Sandbox.md) | | - -[[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/SandboxesApi.md b/docs/SandboxesApi.md deleted file mode 100644 index 4eff5f9..0000000 --- a/docs/SandboxesApi.md +++ /dev/null @@ -1,157 +0,0 @@ -# \SandboxesApi - -All URIs are relative to *https://api.hotdata.dev* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_sandbox**](SandboxesApi.md#create_sandbox) | **POST** /v1/sandboxes | Create a sandbox -[**delete_sandbox**](SandboxesApi.md#delete_sandbox) | **DELETE** /v1/sandboxes/{public_id} | Delete sandbox -[**get_sandbox**](SandboxesApi.md#get_sandbox) | **GET** /v1/sandboxes/{public_id} | Get sandbox -[**list_sandboxes**](SandboxesApi.md#list_sandboxes) | **GET** /v1/sandboxes | List sandboxes -[**update_sandbox**](SandboxesApi.md#update_sandbox) | **PATCH** /v1/sandboxes/{public_id} | Update sandbox - - - -## create_sandbox - -> models::SandboxResponse create_sandbox(create_sandbox_request) -Create a sandbox - -Creates a sandbox in the requested workspace. The returned `public_id` is the value to pass as `X-Session-Id` on scoped ops. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**create_sandbox_request** | [**CreateSandboxRequest**](CreateSandboxRequest.md) | | [required] | - -### Return type - -[**models::SandboxResponse**](SandboxResponse.md) - -### Authorization - -[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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) - - -## delete_sandbox - -> models::DeleteSandboxResponse delete_sandbox(public_id) -Delete sandbox - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**public_id** | **String** | Public id of the sandbox. | [required] | - -### Return type - -[**models::DeleteSandboxResponse**](DeleteSandboxResponse.md) - -### Authorization - -[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## get_sandbox - -> models::SandboxResponse get_sandbox(public_id) -Get sandbox - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**public_id** | **String** | Public id of the sandbox. | [required] | - -### Return type - -[**models::SandboxResponse**](SandboxResponse.md) - -### Authorization - -[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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_sandboxes - -> models::ListSandboxesResponse list_sandboxes() -List sandboxes - -Lists sandboxes for the caller in the requested workspace. - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**models::ListSandboxesResponse**](ListSandboxesResponse.md) - -### Authorization - -[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## update_sandbox - -> models::SandboxResponse update_sandbox(public_id, update_sandbox_request) -Update sandbox - -Partial update. Only the provided fields are changed. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**public_id** | **String** | Public id of the sandbox. | [required] | -**update_sandbox_request** | [**UpdateSandboxRequest**](UpdateSandboxRequest.md) | | [required] | - -### Return type - -[**models::SandboxResponse**](SandboxResponse.md) - -### Authorization - -[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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/UpdateSandboxRequest.md b/docs/UpdateSandboxRequest.md deleted file mode 100644 index d5e5827..0000000 --- a/docs/UpdateSandboxRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# UpdateSandboxRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | Option<**String**> | | [optional] -**markdown** | Option<**String**> | | [optional] - -[[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 0cfcc17..9bcfc74 100644 --- a/docs/WorkspaceDetail.md +++ b/docs/WorkspaceDetail.md @@ -7,7 +7,6 @@ Name | Type | Description | Notes **public_id** | **String** | | **name** | **String** | | **provision_status** | **String** | | -**namespace** | **String** | | [[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/WorkspaceListItem.md b/docs/WorkspaceListItem.md index ef31c32..bbfe8d1 100644 --- a/docs/WorkspaceListItem.md +++ b/docs/WorkspaceListItem.md @@ -9,7 +9,6 @@ Name | Type | Description | Notes **active** | **bool** | | **favorite** | **bool** | | **provision_status** | **String** | | -**namespace** | **String** | | [[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/src/apis/configuration.rs b/src/apis/configuration.rs index 8211473..26089fa 100644 --- a/src/apis/configuration.rs +++ b/src/apis/configuration.rs @@ -65,7 +65,7 @@ impl Default for Configuration { fn default() -> Self { Configuration { base_path: "https://api.hotdata.dev".to_owned(), - user_agent: Some("hotdata-rust/0.1.2".to_owned()), + user_agent: Some("hotdata-rust/0.1.3".to_owned()), client: reqwest::Client::new(), basic_auth: None, oauth_access_token: None, diff --git a/src/apis/indexes_api.rs b/src/apis/indexes_api.rs index a410e30..3ce1269 100644 --- a/src/apis/indexes_api.rs +++ b/src/apis/indexes_api.rs @@ -67,6 +67,16 @@ pub enum ListIndexesError { UnknownValue(serde_json::Value), } +/// struct for typed errors of method [`list_indexes_collection`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListIndexesCollectionError { + Status400(models::ApiErrorResponse), + Status404(models::ApiErrorResponse), + Status500(models::ApiErrorResponse), + UnknownValue(serde_json::Value), +} + /// Create a sorted, BM25, or vector index on a dataset. pub async fn create_dataset_index( configuration: &configuration::Configuration, @@ -482,3 +492,93 @@ pub async fn list_indexes( })) } } + +/// 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. +pub async fn list_indexes_collection( + configuration: &configuration::Configuration, + x_database_id: &str, + connection_id: Option<&str>, + schema: Option<&str>, + table: Option<&str>, + index_type: Option<&str>, + limit: Option, + cursor: Option<&str>, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_header_x_database_id = x_database_id; + let p_query_connection_id = connection_id; + let p_query_schema = schema; + let p_query_table = table; + let p_query_index_type = index_type; + let p_query_limit = limit; + let p_query_cursor = cursor; + + let uri_str = format!("{}/v1/indexes", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_connection_id { + req_builder = req_builder.query(&[("connection_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_schema { + req_builder = req_builder.query(&[("schema", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_table { + req_builder = req_builder.query(&[("table", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_index_type { + req_builder = req_builder.query(&[("index_type", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_cursor { + req_builder = req_builder.query(&[("cursor", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.header("X-Database-Id", p_header_x_database_id.to_string()); + if let Some(apikey) = configuration.api_keys.get("X-Workspace-Id") { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-Workspace-Id", value); + }; + if let Some(token) = configuration.resolve_bearer_token().await { + req_builder = req_builder.bearer_auth(token); + }; + + let req = req_builder.build()?; + crate::http_log::log_request(&req); + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + crate::http_log::log_response_status(status); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + crate::http_log::log_response_body(&content); + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ListIndexesPageResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ListIndexesPageResponse`")))), + } + } else { + let content = resp.text().await?; + crate::http_log::log_response_body(&content); + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} diff --git a/src/apis/mod.rs b/src/apis/mod.rs index 75cd5d5..72e4de5 100644 --- a/src/apis/mod.rs +++ b/src/apis/mod.rs @@ -126,7 +126,6 @@ pub mod query_api; pub mod query_runs_api; pub mod refresh_api; pub mod results_api; -pub mod sandboxes_api; pub mod saved_queries_api; pub mod secrets_api; pub mod uploads_api; diff --git a/src/apis/sandboxes_api.rs b/src/apis/sandboxes_api.rs deleted file mode 100644 index 9feb307..0000000 --- a/src/apis/sandboxes_api.rs +++ /dev/null @@ -1,378 +0,0 @@ -/* - * 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: https://openapi-generator.tech - */ - -use super::{configuration, ContentType, Error}; -use crate::{apis::ResponseContent, models}; -use reqwest; -use serde::{de::Error as _, Deserialize, Serialize}; - -/// struct for typed errors of method [`create_sandbox`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateSandboxError { - Status400(models::Error), - Status401(models::Error), - Status403(models::Error), - Status404(models::Error), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`delete_sandbox`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteSandboxError { - Status401(models::Error), - Status403(models::Error), - Status404(models::Error), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`get_sandbox`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetSandboxError { - Status401(models::Error), - Status403(models::Error), - Status404(models::Error), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`list_sandboxes`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListSandboxesError { - Status400(models::Error), - Status401(models::Error), - Status403(models::Error), - Status404(models::Error), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`update_sandbox`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateSandboxError { - Status400(models::Error), - Status401(models::Error), - Status403(models::Error), - Status404(models::Error), - UnknownValue(serde_json::Value), -} - -/// Creates a sandbox in the requested workspace. The returned `public_id` is the value to pass as `X-Session-Id` on scoped ops. -pub async fn create_sandbox( - configuration: &configuration::Configuration, - create_sandbox_request: models::CreateSandboxRequest, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_body_create_sandbox_request = create_sandbox_request; - - let uri_str = format!("{}/v1/sandboxes", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(apikey) = configuration.api_keys.get("X-Workspace-Id") { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-Workspace-Id", value); - }; - if let Some(token) = configuration.resolve_bearer_token().await { - req_builder = req_builder.bearer_auth(token); - }; - req_builder = req_builder.json(&p_body_create_sandbox_request); - - let req = req_builder.build()?; - crate::http_log::log_request(&req); - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - crate::http_log::log_response_status(status); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - crate::http_log::log_response_body(&content); - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SandboxResponse`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SandboxResponse`")))), - } - } else { - let content = resp.text().await?; - crate::http_log::log_response_body(&content); - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn delete_sandbox( - configuration: &configuration::Configuration, - public_id: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_public_id = public_id; - - let uri_str = format!( - "{}/v1/sandboxes/{public_id}", - configuration.base_path, - public_id = crate::apis::urlencode(p_path_public_id) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(apikey) = configuration.api_keys.get("X-Workspace-Id") { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-Workspace-Id", value); - }; - if let Some(token) = configuration.resolve_bearer_token().await { - req_builder = req_builder.bearer_auth(token); - }; - - let req = req_builder.build()?; - crate::http_log::log_request(&req); - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - crate::http_log::log_response_status(status); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - crate::http_log::log_response_body(&content); - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeleteSandboxResponse`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DeleteSandboxResponse`")))), - } - } else { - let content = resp.text().await?; - crate::http_log::log_response_body(&content); - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn get_sandbox( - configuration: &configuration::Configuration, - public_id: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_public_id = public_id; - - let uri_str = format!( - "{}/v1/sandboxes/{public_id}", - configuration.base_path, - public_id = crate::apis::urlencode(p_path_public_id) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(apikey) = configuration.api_keys.get("X-Workspace-Id") { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-Workspace-Id", value); - }; - if let Some(token) = configuration.resolve_bearer_token().await { - req_builder = req_builder.bearer_auth(token); - }; - - let req = req_builder.build()?; - crate::http_log::log_request(&req); - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - crate::http_log::log_response_status(status); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - crate::http_log::log_response_body(&content); - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SandboxResponse`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SandboxResponse`")))), - } - } else { - let content = resp.text().await?; - crate::http_log::log_response_body(&content); - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -/// Lists sandboxes for the caller in the requested workspace. -pub async fn list_sandboxes( - configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/v1/sandboxes", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(apikey) = configuration.api_keys.get("X-Workspace-Id") { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-Workspace-Id", value); - }; - if let Some(token) = configuration.resolve_bearer_token().await { - req_builder = req_builder.bearer_auth(token); - }; - - let req = req_builder.build()?; - crate::http_log::log_request(&req); - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - crate::http_log::log_response_status(status); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - crate::http_log::log_response_body(&content); - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ListSandboxesResponse`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ListSandboxesResponse`")))), - } - } else { - let content = resp.text().await?; - crate::http_log::log_response_body(&content); - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -/// Partial update. Only the provided fields are changed. -pub async fn update_sandbox( - configuration: &configuration::Configuration, - public_id: &str, - update_sandbox_request: models::UpdateSandboxRequest, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_path_public_id = public_id; - let p_body_update_sandbox_request = update_sandbox_request; - - let uri_str = format!( - "{}/v1/sandboxes/{public_id}", - configuration.base_path, - public_id = crate::apis::urlencode(p_path_public_id) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(apikey) = configuration.api_keys.get("X-Workspace-Id") { - let key = apikey.key.clone(); - let value = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("X-Workspace-Id", value); - }; - if let Some(token) = configuration.resolve_bearer_token().await { - req_builder = req_builder.bearer_auth(token); - }; - req_builder = req_builder.json(&p_body_update_sandbox_request); - - let req = req_builder.build()?; - crate::http_log::log_request(&req); - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - crate::http_log::log_response_status(status); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - crate::http_log::log_response_body(&content); - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SandboxResponse`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SandboxResponse`")))), - } - } else { - let content = resp.text().await?; - crate::http_log::log_response_body(&content); - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} diff --git a/src/models/create_sandbox_request.rs b/src/models/create_sandbox_request.rs deleted file mode 100644 index 55f7a75..0000000 --- a/src/models/create_sandbox_request.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateSandboxRequest { - /// Human-readable name for the sandbox. - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - /// Optional markdown notes. - #[serde(rename = "markdown", skip_serializing_if = "Option::is_none")] - pub markdown: Option, -} - -impl CreateSandboxRequest { - pub fn new() -> CreateSandboxRequest { - CreateSandboxRequest { - name: None, - markdown: None, - } - } -} diff --git a/src/models/delete_sandbox_response.rs b/src/models/delete_sandbox_response.rs deleted file mode 100644 index 526c317..0000000 --- a/src/models/delete_sandbox_response.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct DeleteSandboxResponse { - #[serde(rename = "ok")] - pub ok: bool, - #[serde(rename = "deleted")] - pub deleted: bool, -} - -impl DeleteSandboxResponse { - pub fn new(ok: bool, deleted: bool) -> DeleteSandboxResponse { - DeleteSandboxResponse { ok, deleted } - } -} diff --git a/src/models/index_entry_response.rs b/src/models/index_entry_response.rs new file mode 100644 index 0000000..8109147 --- /dev/null +++ b/src/models/index_entry_response.rs @@ -0,0 +1,70 @@ +/* + * 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: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// IndexEntryResponse : One index in a cross-table listing: the per-table [`IndexInfoResponse`] plus the identity needed to know which table it belongs to. +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct IndexEntryResponse { + #[serde(rename = "columns")] + pub columns: Vec, + #[serde(rename = "created_at")] + pub created_at: String, + #[serde(rename = "index_name")] + pub index_name: String, + #[serde(rename = "index_type")] + pub index_type: String, + /// Distance metric this index was built with. Only present for vector indexes. + #[serde(rename = "metric", skip_serializing_if = "Option::is_none")] + pub metric: Option, + #[serde(rename = "status")] + pub status: models::IndexStatus, + #[serde(rename = "updated_at")] + pub updated_at: String, + #[serde( + rename = "connection_id", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub connection_id: Option>, + #[serde(rename = "schema_name")] + pub schema_name: String, + #[serde(rename = "table_name")] + pub table_name: String, +} + +impl IndexEntryResponse { + /// One index in a cross-table listing: the per-table [`IndexInfoResponse`] plus the identity needed to know which table it belongs to. + pub fn new( + columns: Vec, + created_at: String, + index_name: String, + index_type: String, + status: models::IndexStatus, + updated_at: String, + schema_name: String, + table_name: String, + ) -> IndexEntryResponse { + IndexEntryResponse { + columns, + created_at, + index_name, + index_type, + metric: None, + status, + updated_at, + connection_id: None, + schema_name, + table_name, + } + } +} diff --git a/src/models/list_indexes_page_response.rs b/src/models/list_indexes_page_response.rs new file mode 100644 index 0000000..0763b5f --- /dev/null +++ b/src/models/list_indexes_page_response.rs @@ -0,0 +1,50 @@ +/* + * 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: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// ListIndexesPageResponse : Response body for `GET /v1/indexes` (paginated, cross-table). +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ListIndexesPageResponse { + #[serde(rename = "count")] + pub count: i32, + #[serde(rename = "has_more")] + pub has_more: bool, + #[serde(rename = "indexes")] + pub indexes: Vec, + #[serde(rename = "limit")] + pub limit: i32, + #[serde( + rename = "next_cursor", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub next_cursor: Option>, +} + +impl ListIndexesPageResponse { + /// Response body for `GET /v1/indexes` (paginated, cross-table). + pub fn new( + count: i32, + has_more: bool, + indexes: Vec, + limit: i32, + ) -> ListIndexesPageResponse { + ListIndexesPageResponse { + count, + has_more, + indexes, + limit, + next_cursor: None, + } + } +} diff --git a/src/models/list_sandboxes_response.rs b/src/models/list_sandboxes_response.rs deleted file mode 100644 index 55db237..0000000 --- a/src/models/list_sandboxes_response.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ListSandboxesResponse { - #[serde(rename = "ok")] - pub ok: bool, - #[serde(rename = "sandboxes")] - pub sandboxes: Vec, -} - -impl ListSandboxesResponse { - pub fn new(ok: bool, sandboxes: Vec) -> ListSandboxesResponse { - ListSandboxesResponse { ok, sandboxes } - } -} diff --git a/src/models/mod.rs b/src/models/mod.rs index 40be7f8..0a6f305 100644 --- a/src/models/mod.rs +++ b/src/models/mod.rs @@ -66,8 +66,6 @@ pub mod create_embedding_provider_response; pub use self::create_embedding_provider_response::CreateEmbeddingProviderResponse; pub mod create_index_request; pub use self::create_index_request::CreateIndexRequest; -pub mod create_sandbox_request; -pub use self::create_sandbox_request::CreateSandboxRequest; pub mod create_saved_query_request; pub use self::create_saved_query_request::CreateSavedQueryRequest; pub mod create_secret_request; @@ -106,8 +104,6 @@ pub mod dataset_summary; pub use self::dataset_summary::DatasetSummary; pub mod dataset_version_summary; pub use self::dataset_version_summary::DatasetVersionSummary; -pub mod delete_sandbox_response; -pub use self::delete_sandbox_response::DeleteSandboxResponse; pub mod discovery_status; pub use self::discovery_status::DiscoveryStatus; pub mod embedding_provider_response; @@ -126,6 +122,8 @@ pub mod get_result_response; pub use self::get_result_response::GetResultResponse; pub mod get_secret_response; pub use self::get_secret_response::GetSecretResponse; +pub mod index_entry_response; +pub use self::index_entry_response::IndexEntryResponse; pub mod index_info_response; pub use self::index_info_response::IndexInfoResponse; pub mod index_status; @@ -158,6 +156,8 @@ pub mod list_datasets_response; pub use self::list_datasets_response::ListDatasetsResponse; pub mod list_embedding_providers_response; pub use self::list_embedding_providers_response::ListEmbeddingProvidersResponse; +pub mod list_indexes_page_response; +pub use self::list_indexes_page_response::ListIndexesPageResponse; pub mod list_indexes_response; pub use self::list_indexes_response::ListIndexesResponse; pub mod list_jobs_response; @@ -166,8 +166,6 @@ pub mod list_query_runs_response; pub use self::list_query_runs_response::ListQueryRunsResponse; pub mod list_results_response; pub use self::list_results_response::ListResultsResponse; -pub mod list_sandboxes_response; -pub use self::list_sandboxes_response::ListSandboxesResponse; pub mod list_saved_queries_response; pub use self::list_saved_queries_response::ListSavedQueriesResponse; pub mod list_saved_query_versions_response; @@ -206,10 +204,6 @@ pub mod result_info; pub use self::result_info::ResultInfo; pub mod results_format_query; pub use self::results_format_query::ResultsFormatQuery; -pub mod sandbox; -pub use self::sandbox::Sandbox; -pub mod sandbox_response; -pub use self::sandbox_response::SandboxResponse; pub mod saved_query_dataset_source; pub use self::saved_query_dataset_source::SavedQueryDatasetSource; pub mod saved_query_detail; @@ -246,8 +240,6 @@ pub mod update_embedding_provider_request; pub use self::update_embedding_provider_request::UpdateEmbeddingProviderRequest; pub mod update_embedding_provider_response; pub use self::update_embedding_provider_response::UpdateEmbeddingProviderResponse; -pub mod update_sandbox_request; -pub use self::update_sandbox_request::UpdateSandboxRequest; pub mod update_saved_query_request; pub use self::update_saved_query_request::UpdateSavedQueryRequest; pub mod update_secret_request; diff --git a/src/models/sandbox.rs b/src/models/sandbox.rs deleted file mode 100644 index 6d18e09..0000000 --- a/src/models/sandbox.rs +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Sandbox { - #[serde(rename = "public_id")] - pub public_id: String, - #[serde(rename = "name")] - pub name: String, - /// Freeform markdown notes attached to the sandbox. - #[serde(rename = "markdown")] - pub markdown: String, - #[serde(rename = "created_at")] - pub created_at: String, - #[serde(rename = "updated_at")] - pub updated_at: String, -} - -impl Sandbox { - pub fn new( - public_id: String, - name: String, - markdown: String, - created_at: String, - updated_at: String, - ) -> Sandbox { - Sandbox { - public_id, - name, - markdown, - created_at, - updated_at, - } - } -} diff --git a/src/models/sandbox_response.rs b/src/models/sandbox_response.rs deleted file mode 100644 index 3514b01..0000000 --- a/src/models/sandbox_response.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct SandboxResponse { - #[serde(rename = "ok")] - pub ok: bool, - #[serde(rename = "sandbox")] - pub sandbox: Box, -} - -impl SandboxResponse { - pub fn new(ok: bool, sandbox: models::Sandbox) -> SandboxResponse { - SandboxResponse { - ok, - sandbox: Box::new(sandbox), - } - } -} diff --git a/src/models/update_sandbox_request.rs b/src/models/update_sandbox_request.rs deleted file mode 100644 index 6938af1..0000000 --- a/src/models/update_sandbox_request.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// UpdateSandboxRequest : Partial update — only the provided fields are changed. -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct UpdateSandboxRequest { - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "markdown", skip_serializing_if = "Option::is_none")] - pub markdown: Option, -} - -impl UpdateSandboxRequest { - /// Partial update — only the provided fields are changed. - pub fn new() -> UpdateSandboxRequest { - UpdateSandboxRequest { - name: None, - markdown: None, - } - } -} diff --git a/src/models/workspace_detail.rs b/src/models/workspace_detail.rs index 3a7d062..d6deb1b 100644 --- a/src/models/workspace_detail.rs +++ b/src/models/workspace_detail.rs @@ -19,22 +19,14 @@ pub struct WorkspaceDetail { pub name: String, #[serde(rename = "provision_status")] pub provision_status: String, - #[serde(rename = "namespace")] - pub namespace: String, } impl WorkspaceDetail { - pub fn new( - public_id: String, - name: String, - provision_status: String, - namespace: String, - ) -> WorkspaceDetail { + pub fn new(public_id: String, name: String, provision_status: String) -> WorkspaceDetail { WorkspaceDetail { public_id, name, provision_status, - namespace, } } } diff --git a/src/models/workspace_list_item.rs b/src/models/workspace_list_item.rs index 1dc8809..50a1f28 100644 --- a/src/models/workspace_list_item.rs +++ b/src/models/workspace_list_item.rs @@ -23,8 +23,6 @@ pub struct WorkspaceListItem { pub favorite: bool, #[serde(rename = "provision_status")] pub provision_status: String, - #[serde(rename = "namespace")] - pub namespace: String, } impl WorkspaceListItem { @@ -34,7 +32,6 @@ impl WorkspaceListItem { active: bool, favorite: bool, provision_status: String, - namespace: String, ) -> WorkspaceListItem { WorkspaceListItem { public_id, @@ -42,7 +39,6 @@ impl WorkspaceListItem { active, favorite, provision_status, - namespace, } } } From 1564fc521523acad5a31b1ab90ef53c51e66b9a6 Mon Sep 17 00:00:00 2001 From: Zac Farrell Date: Tue, 9 Jun 2026 17:01:04 -0700 Subject: [PATCH 2/2] docs: add 0.1.3 changelog entry --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c67d9c..1200122 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.1.3] - 2026-06-09 + +### Added + +- `list_indexes_collection` (`GET /v1/indexes`) in `hotdata::apis::indexes_api` — lists indexes across every table in a database, scoped by the `X-Database-Id` header — along with the `IndexEntryResponse` and `ListIndexesPageResponse` models. + +### Removed + +- Sandbox endpoints and their models (`sandboxes_api`, `Sandbox`, `SandboxResponse`, `CreateSandboxRequest`, `UpdateSandboxRequest`, `ListSandboxesResponse`, `DeleteSandboxResponse`), following their removal from the Hotdata OpenAPI spec. + +### Changed + +- Regenerated the client from the updated Hotdata OpenAPI spec. + ## [0.1.2] - 2026-06-06 ### Added