` keeps working. | [optional]
+**default_catalog** | Option<**String**> | Optional name the database's auto-created default catalog answers to inside its query scope. Must be a valid SQL identifier (`[a-z0-9_]`, not starting with a digit) and may not collide with the reserved catalog names `hotdata`, `datasets`, or `information_schema`. Defaults to `default` when omitted, so `default.main.
` keeps working. | [optional]
**expires_at** | Option<**String**> | When this database expires. Accepts either an RFC 3339 timestamp (e.g. `\"2026-06-01T00:00:00Z\"`) or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days) — for example `\"24h\"`, `\"48h\"`, or `\"7d\"`. Omitted (or empty) means the database never expires. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp. | [optional]
**name** | Option<**String**> | Optional free-form display label (for UIs/CLIs). Not unique. Not an identifier — databases are always addressed by `id`. Accepts the legacy `description` key as an alias so clients that predate the rename keep populating this field. | [optional]
**schemas** | Option<[**Vec**](DatabaseDefaultSchemaDecl.md)> | Optional schemas/tables to declare on the database's auto-created default catalog. Tables declared here can be loaded via the standard managed-table load endpoint targeting `default_connection_id`. Omitted or empty means the default catalog starts empty. | [optional]
diff --git a/docs/CreateDatasetRequest.md b/docs/CreateDatasetRequest.md
deleted file mode 100644
index b64439c..0000000
--- a/docs/CreateDatasetRequest.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# CreateDatasetRequest
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**label** | **String** | |
-**source** | [**models::DatasetSource**](DatasetSource.md) | |
-**table_name** | Option<**String**> | Optional table_name - if not provided, derived from label | [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/CreateDatasetResponse.md b/docs/CreateDatasetResponse.md
deleted file mode 100644
index 46d3dcb..0000000
--- a/docs/CreateDatasetResponse.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# CreateDatasetResponse
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**created_at** | **String** | |
-**id** | **String** | |
-**label** | **String** | |
-**schema_name** | **String** | |
-**status** | **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/DatabaseContextApi.md b/docs/DatabaseContextApi.md
index c4f3d44..6f5cecf 100644
--- a/docs/DatabaseContextApi.md
+++ b/docs/DatabaseContextApi.md
@@ -24,7 +24,7 @@ Removes a named context document from a database.
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**database_id** | **String** | Database ID | [required] |
-**name** | **String** | Context key: same character rules as a dataset table name | [required] |
+**name** | **String** | Context key: same character rules as a table name | [required] |
### Return type
@@ -53,7 +53,7 @@ Get one database context
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**database_id** | **String** | Database ID | [required] |
-**name** | **String** | Context key: same character rules as a dataset table name | [required] |
+**name** | **String** | Context key: same character rules as a table name | [required] |
### Return type
diff --git a/docs/DatabasesApi.md b/docs/DatabasesApi.md
index b05011c..1b06e71 100644
--- a/docs/DatabasesApi.md
+++ b/docs/DatabasesApi.md
@@ -114,7 +114,7 @@ Name | Type | Description | Required | Notes
> models::CreateDatabaseResponse create_database(create_database_request)
Create database
-Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default` (or the optional `default_catalog` name), with a `main` schema pre-declared so `default.main.
` works out of the box. The optional `name` is a free-form display label and is not required to be unique. Optional `default_catalog` overrides the name the default catalog answers to; it must be a valid SQL identifier and may not collide with the `hotdata`, `datasets`, or `information_schema` system catalogs. Optional `schemas` declares additional schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`. Optional `expires_at` sets when the database expires — accepts either an RFC 3339 timestamp or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days), e.g. `24h`, `48h`, `90m`, `7d`. When omitted, the database never expires. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp.
+Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default` (or the optional `default_catalog` name), with a `main` schema pre-declared so `default.main.
` works out of the box. The optional `name` is a free-form display label and is not required to be unique. Optional `default_catalog` overrides the name the default catalog answers to; it must be a valid SQL identifier and may not collide with the reserved catalog names `hotdata`, `datasets`, or `information_schema`. Optional `schemas` declares additional schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`. Optional `expires_at` sets when the database expires — accepts either an RFC 3339 timestamp or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days), e.g. `24h`, `48h`, `90m`, `7d`. When omitted, the database never expires. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp.
### Parameters
diff --git a/docs/DatasetSource.md b/docs/DatasetSource.md
deleted file mode 100644
index 121c1be..0000000
--- a/docs/DatasetSource.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# DatasetSource
-
-## Enum Variants
-
-| Name | Description |
-|---- | -----|
-| DatasetSourceOneOf | Dataset source specification. Internally tagged on `type`, e.g. `{\"type\": \"upload\", \"upload_id\": \"...\"}`. Discriminator values: `upload`, `saved_query`, `sql_query`, `url`, `inline`. |
-| DatasetSourceOneOf1 | Dataset source specification. Internally tagged on `type`, e.g. `{\"type\": \"upload\", \"upload_id\": \"...\"}`. Discriminator values: `upload`, `saved_query`, `sql_query`, `url`, `inline`. |
-| DatasetSourceOneOf2 | Dataset source specification. Internally tagged on `type`, e.g. `{\"type\": \"upload\", \"upload_id\": \"...\"}`. Discriminator values: `upload`, `saved_query`, `sql_query`, `url`, `inline`. |
-| DatasetSourceOneOf3 | Dataset source specification. Internally tagged on `type`, e.g. `{\"type\": \"upload\", \"upload_id\": \"...\"}`. Discriminator values: `upload`, `saved_query`, `sql_query`, `url`, `inline`. |
-| DatasetSourceOneOf4 | Dataset source specification. Internally tagged on `type`, e.g. `{\"type\": \"upload\", \"upload_id\": \"...\"}`. Discriminator values: `upload`, `saved_query`, `sql_query`, `url`, `inline`. |
-
-[[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/DatasetSourceOneOf.md b/docs/DatasetSourceOneOf.md
deleted file mode 100644
index 0d7c476..0000000
--- a/docs/DatasetSourceOneOf.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# DatasetSourceOneOf
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**columns** | Option<**std::collections::HashMap**> | Optional explicit column definitions. Keys are column names, values are type specs. When provided, the schema is built from these definitions instead of being inferred. | [optional]
-**format** | Option<**String**> | | [optional]
-**upload_id** | **String** | |
-**r#type** | **Type** | (enum: upload) |
-
-[[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/DatasetSourceOneOf1.md b/docs/DatasetSourceOneOf1.md
deleted file mode 100644
index 739248b..0000000
--- a/docs/DatasetSourceOneOf1.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# DatasetSourceOneOf1
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**saved_query_id** | **String** | |
-**version** | Option<**i32**> | | [optional]
-**r#type** | **Type** | (enum: saved_query) |
-
-[[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/DatasetSourceOneOf2.md b/docs/DatasetSourceOneOf2.md
deleted file mode 100644
index 81f0f52..0000000
--- a/docs/DatasetSourceOneOf2.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# DatasetSourceOneOf2
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**description** | Option<**String**> | Optional description for the auto-created saved query. | [optional]
-**name** | Option<**String**> | Optional name for the auto-created saved query. Defaults to the dataset label. | [optional]
-**sql** | **String** | |
-**r#type** | **Type** | (enum: sql_query) |
-
-[[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/DatasetSourceOneOf3.md b/docs/DatasetSourceOneOf3.md
deleted file mode 100644
index 8119ad8..0000000
--- a/docs/DatasetSourceOneOf3.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# DatasetSourceOneOf3
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**columns** | Option<**std::collections::HashMap**> | Optional explicit column definitions. Keys are column names, values are type specs. | [optional]
-**format** | Option<**String**> | | [optional]
-**url** | **String** | |
-**r#type** | **Type** | (enum: url) |
-
-[[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/DatasetSourceOneOf4.md b/docs/DatasetSourceOneOf4.md
deleted file mode 100644
index 1f83cb1..0000000
--- a/docs/DatasetSourceOneOf4.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# DatasetSourceOneOf4
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**inline** | [**models::InlineData**](InlineData.md) | |
-**r#type** | **Type** | (enum: inline) |
-
-[[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/DatasetSummary.md b/docs/DatasetSummary.md
deleted file mode 100644
index 3bf5c29..0000000
--- a/docs/DatasetSummary.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# DatasetSummary
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**created_at** | **String** | |
-**id** | **String** | |
-**label** | **String** | |
-**latest_version** | **i32** | |
-**pinned_version** | Option<**i32**> | | [optional]
-**schema_name** | **String** | |
-**table_name** | **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/DatasetVersionSummary.md b/docs/DatasetVersionSummary.md
deleted file mode 100644
index 0ef88bb..0000000
--- a/docs/DatasetVersionSummary.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# DatasetVersionSummary
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**created_at** | **String** | |
-**id** | **String** | |
-**source_type** | **String** | |
-**version** | **i32** | |
-
-[[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/DatasetsApi.md b/docs/DatasetsApi.md
deleted file mode 100644
index 214b8d8..0000000
--- a/docs/DatasetsApi.md
+++ /dev/null
@@ -1,189 +0,0 @@
-# \DatasetsApi
-
-All URIs are relative to *https://api.hotdata.dev*
-
-Method | HTTP request | Description
-------------- | ------------- | -------------
-[**create_dataset**](DatasetsApi.md#create_dataset) | **POST** /v1/datasets | Create dataset
-[**delete_dataset**](DatasetsApi.md#delete_dataset) | **DELETE** /v1/datasets/{id} | Delete dataset
-[**get_dataset**](DatasetsApi.md#get_dataset) | **GET** /v1/datasets/{id} | Get dataset
-[**list_dataset_versions**](DatasetsApi.md#list_dataset_versions) | **GET** /v1/datasets/{id}/versions | List dataset versions
-[**list_datasets**](DatasetsApi.md#list_datasets) | **GET** /v1/datasets | List datasets
-[**update_dataset**](DatasetsApi.md#update_dataset) | **PUT** /v1/datasets/{id} | Update dataset
-
-
-
-## create_dataset
-
-> models::CreateDatasetResponse create_dataset(create_dataset_request, x_database_id)
-Create dataset
-
-Create a new dataset from an uploaded file, inline data, a URL, or a SQL/saved query. The dataset becomes a queryable table under the `datasets` schema (e.g., `SELECT * FROM datasets.my_table`). Supports CSV, JSON, and Parquet formats. Optionally specify explicit column types. For `sql_query` / `saved_query` sources the dataset materializes by running that SQL, so the `X-Database-Id` header is required and the query sees only that database's catalogs (the scope is also reused on refresh). Upload/url/inline sources ignore the header.
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**create_dataset_request** | [**CreateDatasetRequest**](CreateDatasetRequest.md) | | [required] |
-**x_database_id** | Option<**String**> | Required for query-backed datasets (sql_query / saved_query): the database whose catalogs the materializing query runs against. An unknown id is a 404. | |
-
-### Return type
-
-[**models::CreateDatasetResponse**](CreateDatasetResponse.md)
-
-### Authorization
-
-[WorkspaceId](../README.md#WorkspaceId), [SessionId](../README.md#SessionId), [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_dataset
-
-> delete_dataset(id)
-Delete dataset
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**id** | **String** | Dataset ID | [required] |
-
-### Return type
-
- (empty response body)
-
-### Authorization
-
-[WorkspaceId](../README.md#WorkspaceId), [SessionId](../README.md#SessionId), [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_dataset
-
-> models::GetDatasetResponse get_dataset(id)
-Get dataset
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**id** | **String** | Dataset ID | [required] |
-
-### Return type
-
-[**models::GetDatasetResponse**](GetDatasetResponse.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_dataset_versions
-
-> models::ListDatasetVersionsResponse list_dataset_versions(id, limit, offset)
-List dataset versions
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**id** | **String** | Dataset ID | [required] |
-**limit** | Option<**i32**> | Maximum number of versions (default: 100, max: 1000) | |
-**offset** | Option<**i32**> | Pagination offset (default: 0) | |
-
-### Return type
-
-[**models::ListDatasetVersionsResponse**](ListDatasetVersionsResponse.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_datasets
-
-> models::ListDatasetsResponse list_datasets(limit, offset)
-List datasets
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**limit** | Option<**i32**> | Maximum number of datasets (default: 100, max: 1000) | |
-**offset** | Option<**i32**> | Pagination offset (default: 0) | |
-
-### Return type
-
-[**models::ListDatasetsResponse**](ListDatasetsResponse.md)
-
-### Authorization
-
-[WorkspaceId](../README.md#WorkspaceId), [SessionId](../README.md#SessionId), [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_dataset
-
-> models::UpdateDatasetResponse update_dataset(id, update_dataset_request)
-Update dataset
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**id** | **String** | Dataset ID | [required] |
-**update_dataset_request** | [**UpdateDatasetRequest**](UpdateDatasetRequest.md) | | [required] |
-
-### Return type
-
-[**models::UpdateDatasetResponse**](UpdateDatasetResponse.md)
-
-### Authorization
-
-[WorkspaceId](../README.md#WorkspaceId), [SessionId](../README.md#SessionId), [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/GetDatasetResponse.md b/docs/GetDatasetResponse.md
deleted file mode 100644
index 7db9ee3..0000000
--- a/docs/GetDatasetResponse.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# GetDatasetResponse
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**columns** | [**Vec**](ColumnInfo.md) | |
-**created_at** | **String** | |
-**id** | **String** | |
-**label** | **String** | |
-**latest_version** | **i32** | |
-**pinned_version** | Option<**i32**> | | [optional]
-**schema_name** | **String** | |
-**source_type** | **String** | |
-**table_name** | **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/IndexesApi.md b/docs/IndexesApi.md
index ba27fc2..e21a270 100644
--- a/docs/IndexesApi.md
+++ b/docs/IndexesApi.md
@@ -4,47 +4,13 @@ All URIs are relative to *https://api.hotdata.dev*
Method | HTTP request | Description
------------- | ------------- | -------------
-[**create_dataset_index**](IndexesApi.md#create_dataset_index) | **POST** /v1/datasets/{dataset_id}/indexes | Create an index on a dataset
[**create_index**](IndexesApi.md#create_index) | **POST** /v1/connections/{connection_id}/tables/{schema}/{table}/indexes | Create an index on a table
-[**delete_dataset_index**](IndexesApi.md#delete_dataset_index) | **DELETE** /v1/datasets/{dataset_id}/indexes/{index_name} | Delete a dataset index
[**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
-
-> models::IndexInfoResponse create_dataset_index(dataset_id, create_index_request)
-Create an index on a dataset
-
-Create a sorted, BM25, or vector index on a dataset.
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**dataset_id** | **String** | Dataset ID | [required] |
-**create_index_request** | [**CreateIndexRequest**](CreateIndexRequest.md) | | [required] |
-
-### Return type
-
-[**models::IndexInfoResponse**](IndexInfoResponse.md)
-
-### Authorization
-
-[WorkspaceId](../README.md#WorkspaceId), [SessionId](../README.md#SessionId), [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)
-
-
## create_index
> models::IndexInfoResponse create_index(connection_id, schema, table, create_index_request)
@@ -78,37 +44,6 @@ 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)
-## delete_dataset_index
-
-> delete_dataset_index(dataset_id, index_name)
-Delete a dataset index
-
-Delete a specific index from a dataset.
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**dataset_id** | **String** | Dataset ID | [required] |
-**index_name** | **String** | Index name | [required] |
-
-### Return type
-
- (empty response body)
-
-### Authorization
-
-[WorkspaceId](../README.md#WorkspaceId), [SessionId](../README.md#SessionId), [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)
-
-
## delete_index
> delete_index(connection_id, schema, table, index_name)
@@ -142,36 +77,6 @@ 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_dataset_indexes
-
-> models::ListIndexesResponse list_dataset_indexes(dataset_id)
-List indexes on a dataset
-
-List all indexes created on a dataset.
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**dataset_id** | **String** | Dataset ID | [required] |
-
-### Return type
-
-[**models::ListIndexesResponse**](ListIndexesResponse.md)
-
-### Authorization
-
-[WorkspaceId](../README.md#WorkspaceId), [SessionId](../README.md#SessionId), [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_indexes
> models::ListIndexesResponse list_indexes(connection_id, schema, table)
diff --git a/docs/InlineData.md b/docs/InlineData.md
deleted file mode 100644
index 90053fa..0000000
--- a/docs/InlineData.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# InlineData
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**columns** | Option<**std::collections::HashMap**> | Optional explicit column definitions. Keys are column names, values are type specs. When provided, the schema is built from these definitions instead of being inferred. | [optional]
-**content** | **String** | |
-**format** | **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/InlineDatasetSource.md b/docs/InlineDatasetSource.md
deleted file mode 100644
index 9021f90..0000000
--- a/docs/InlineDatasetSource.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# InlineDatasetSource
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**inline** | [**models::InlineData**](InlineData.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/JobResult.md b/docs/JobResult.md
index 8f36928..06636f0 100644
--- a/docs/JobResult.md
+++ b/docs/JobResult.md
@@ -6,7 +6,6 @@
|---- | -----|
| ConnectionRefreshResult | Job-specific result payload. The shape depends on the job type. Null while the job is pending or running. |
| IndexInfoResponse | Job-specific result payload. The shape depends on the job type. Null while the job is pending or running. |
-| RefreshDatasetResponse | Job-specific result payload. The shape depends on the job type. Null while the job is pending or running. |
| TableRefreshResult | Job-specific result payload. The shape depends on the job type. Null while the job is pending or running. |
[[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/JobType.md b/docs/JobType.md
index 63ed30d..e5b5b48 100644
--- a/docs/JobType.md
+++ b/docs/JobType.md
@@ -7,9 +7,7 @@
| Noop | noop |
| DataRefreshTable | data_refresh_table |
| DataRefreshConnection | data_refresh_connection |
-| DatasetRefresh | dataset_refresh |
| CreateIndex | create_index |
-| CreateDatasetIndex | create_dataset_index |
| ManagedLoad | managed_load |
diff --git a/docs/ListDatasetVersionsResponse.md b/docs/ListDatasetVersionsResponse.md
deleted file mode 100644
index 0202ec4..0000000
--- a/docs/ListDatasetVersionsResponse.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# ListDatasetVersionsResponse
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**count** | **i32** | |
-**dataset_id** | **String** | |
-**has_more** | **bool** | |
-**limit** | **i32** | |
-**offset** | **i32** | |
-**versions** | [**Vec**](DatasetVersionSummary.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/ListDatasetsResponse.md b/docs/ListDatasetsResponse.md
deleted file mode 100644
index de9e3b8..0000000
--- a/docs/ListDatasetsResponse.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# ListDatasetsResponse
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**count** | **i32** | Number of datasets returned in this response |
-**datasets** | [**Vec**](DatasetSummary.md) | |
-**has_more** | **bool** | Whether there are more datasets available after this page |
-**limit** | **i32** | Limit used for this request |
-**offset** | **i32** | Pagination offset used for this request |
-
-[[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/RefreshApi.md b/docs/RefreshApi.md
index b0c4a01..1c53a24 100644
--- a/docs/RefreshApi.md
+++ b/docs/RefreshApi.md
@@ -13,7 +13,7 @@ Method | HTTP request | Description
> models::RefreshResponse refresh(refresh_request)
Refresh connection data
-Refresh schema metadata, table data, or dataset data. The behavior depends on the request fields: - **Schema refresh (all)**: omit all fields — re-discovers tables for every connection. - **Schema refresh (single)**: set `connection_id` — re-discovers tables for one connection. - **Data refresh (single table)**: set `connection_id`, `schema_name`, `table_name`, and `data: true`. - **Data refresh (connection)**: set `connection_id` and `data: true` — refreshes all cached tables. Set `include_uncached: true` to also sync tables that haven't been cached yet. - **Dataset refresh**: set `dataset_id` — re-runs the dataset's source (URL fetch or saved query) and creates a new version. Mutually exclusive with `connection_id`. Set `async: true` on data or dataset refresh operations to run in the background and return a job ID for polling.
+Refresh schema metadata or table data. The behavior depends on the request fields: - **Schema refresh (all)**: omit all fields — re-discovers tables for every connection. - **Schema refresh (single)**: set `connection_id` — re-discovers tables for one connection. - **Data refresh (single table)**: set `connection_id`, `schema_name`, `table_name`, and `data: true`. - **Data refresh (connection)**: set `connection_id` and `data: true` — refreshes all cached tables. Set `include_uncached: true` to also sync tables that haven't been cached yet. Set `async: true` on data refresh operations to run in the background and return a job ID for polling.
### Parameters
diff --git a/docs/RefreshDatasetResponse.md b/docs/RefreshDatasetResponse.md
deleted file mode 100644
index c66690f..0000000
--- a/docs/RefreshDatasetResponse.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# RefreshDatasetResponse
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**created_at** | **String** | |
-**id** | **String** | |
-**status** | **String** | |
-**version** | **i32** | |
-
-[[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/RefreshRequest.md b/docs/RefreshRequest.md
index 9e517c5..d2fd148 100644
--- a/docs/RefreshRequest.md
+++ b/docs/RefreshRequest.md
@@ -7,7 +7,6 @@ Name | Type | Description | Notes
**r#async** | Option<**bool**> | When true, submit the refresh as a background job and return immediately with a job ID for status polling. Only supported for data refresh operations. | [optional]
**connection_id** | Option<**String**> | | [optional]
**data** | Option<**bool**> | | [optional]
-**dataset_id** | Option<**String**> | | [optional]
**include_uncached** | Option<**bool**> | Controls whether uncached tables are included in connection-wide data refresh. - `false` (default): Only refresh tables that already have cached data. This is the common case for keeping existing data up-to-date. - `true`: Also sync tables that haven't been cached yet, essentially performing an initial sync for any new tables discovered since the connection was created. This field only applies to connection-wide data refresh (when `data=true` and `table_name` is not specified). It has no effect on single-table refresh or schema refresh operations. | [optional]
**schema_name** | Option<**String**> | | [optional]
**table_name** | Option<**String**> | | [optional]
diff --git a/docs/RefreshResponse.md b/docs/RefreshResponse.md
index 2f55c0f..9a518ba 100644
--- a/docs/RefreshResponse.md
+++ b/docs/RefreshResponse.md
@@ -5,7 +5,6 @@
| Name | Description |
|---- | -----|
| ConnectionRefreshResult | Unified response type for refresh operations |
-| RefreshDatasetResponse | Unified response type for refresh operations |
| SchemaRefreshResult | Unified response type for refresh operations |
| SubmitJobResponse | Unified response type for refresh operations |
| TableRefreshResult | Unified response type for refresh operations |
diff --git a/docs/SavedQueryDatasetSource.md b/docs/SavedQueryDatasetSource.md
deleted file mode 100644
index f26c790..0000000
--- a/docs/SavedQueryDatasetSource.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# SavedQueryDatasetSource
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**saved_query_id** | **String** | |
-**version** | Option<**i32**> | | [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/SqlQueryDatasetSource.md b/docs/SqlQueryDatasetSource.md
deleted file mode 100644
index 0e9bad1..0000000
--- a/docs/SqlQueryDatasetSource.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# SqlQueryDatasetSource
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**description** | Option<**String**> | Optional description for the auto-created saved query. | [optional]
-**name** | Option<**String**> | Optional name for the auto-created saved query. Defaults to the dataset label. | [optional]
-**sql** | **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/UpdateDatasetRequest.md b/docs/UpdateDatasetRequest.md
deleted file mode 100644
index 0341012..0000000
--- a/docs/UpdateDatasetRequest.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# UpdateDatasetRequest
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**label** | Option<**String**> | | [optional]
-**pinned_version** | Option<**i32**> | Pin to a specific version, or send null to unpin. Omit the field entirely to leave pinning unchanged. | [optional]
-**table_name** | 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/UpdateDatasetResponse.md b/docs/UpdateDatasetResponse.md
deleted file mode 100644
index 51b0b4a..0000000
--- a/docs/UpdateDatasetResponse.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# UpdateDatasetResponse
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**id** | **String** | |
-**label** | **String** | |
-**latest_version** | **i32** | |
-**pinned_version** | Option<**i32**> | | [optional]
-**table_name** | **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/UploadDatasetSource.md b/docs/UploadDatasetSource.md
deleted file mode 100644
index e589ec9..0000000
--- a/docs/UploadDatasetSource.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# UploadDatasetSource
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**columns** | Option<**std::collections::HashMap**> | Optional explicit column definitions. Keys are column names, values are type specs. When provided, the schema is built from these definitions instead of being inferred. | [optional]
-**format** | Option<**String**> | | [optional]
-**upload_id** | **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/UploadsApi.md b/docs/UploadsApi.md
index 2c8d694..07f47ad 100644
--- a/docs/UploadsApi.md
+++ b/docs/UploadsApi.md
@@ -42,7 +42,7 @@ Name | Type | Description | Required | Notes
> models::UploadResponse upload_file(body)
Upload file
-Upload a file to be used as a dataset source. Send the raw file bytes as the request body with an appropriate Content-Type header (e.g., `text/csv`, `application/json`, `application/parquet`). The body is streamed to disk, so files up to 20GB are supported. The returned upload ID can be passed to POST /v1/datasets to create a queryable table.
+Upload a Parquet file to publish as the contents of a managed table. Send the raw file bytes as the request body with an appropriate Content-Type header (e.g., `application/parquet`). The body is streamed to disk, so files up to 20GB are supported. The returned upload ID can be passed to the managed-table load endpoint.
### Parameters
diff --git a/docs/UpsertDatabaseContextRequest.md b/docs/UpsertDatabaseContextRequest.md
index a911a9a..690495e 100644
--- a/docs/UpsertDatabaseContextRequest.md
+++ b/docs/UpsertDatabaseContextRequest.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**content** | **String** | |
-**name** | **String** | Upsert key in the catalog. Validated with dataset table-name rules (preserves case): ASCII letter or `_` first; then alphanumeric or `_` only; 1–128 chars; not a SQL reserved word. |
+**name** | **String** | Upsert key in the catalog. Validated with table-name rules (preserves case): ASCII letter or `_` first; then alphanumeric or `_` only; 1–128 chars; not a SQL reserved word. |
[[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/UrlDatasetSource.md b/docs/UrlDatasetSource.md
deleted file mode 100644
index 0390ca9..0000000
--- a/docs/UrlDatasetSource.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# UrlDatasetSource
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**columns** | Option<**std::collections::HashMap**> | Optional explicit column definitions. Keys are column names, values are type specs. | [optional]
-**format** | Option<**String**> | | [optional]
-**url** | **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/UsageApi.md b/docs/UsageApi.md
new file mode 100644
index 0000000..e38502a
--- /dev/null
+++ b/docs/UsageApi.md
@@ -0,0 +1,39 @@
+# \UsageApi
+
+All URIs are relative to *https://api.hotdata.dev*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**get_usage**](UsageApi.md#get_usage) | **GET** /v1/usage | Get workspace usage snapshot
+
+
+
+## get_usage
+
+> models::WorkspaceUsageResponse get_usage(since)
+Get workspace usage snapshot
+
+Return aggregated bytes scanned and current storage size for a billing period. Pass `since` as the subscription's `current_period_start` so the meter value aligns with the Stripe invoice window rather than the calendar month.
+
+### Parameters
+
+
+Name | Type | Description | Required | Notes
+------------- | ------------- | ------------- | ------------- | -------------
+**since** | Option<**String**> | Billing period start (ISO-8601). Defaults to the start of the current UTC calendar month when omitted. | |
+
+### Return type
+
+[**models::WorkspaceUsageResponse**](WorkspaceUsageResponse.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/WorkspaceUsageResponse.md b/docs/WorkspaceUsageResponse.md
new file mode 100644
index 0000000..8f3785f
--- /dev/null
+++ b/docs/WorkspaceUsageResponse.md
@@ -0,0 +1,15 @@
+# WorkspaceUsageResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**bytes_scanned** | **i64** | Sum of `bytes_scanned` across all completed/failed query runs since `since`. Null bytes (queries that touched no row data) contribute 0. |
+**query_count** | **i64** | Number of query runs (succeeded + failed) since `since`. |
+**since** | **String** | The period start used for this response (echoed back for the caller to verify). |
+**storage_bytes** | **i64** | The workspace's current stored-data footprint in bytes, measured at request time: managed-database and dataset data, plus un-consumed uploads, connection caches, and search-index artifacts. |
+**storage_captured_at** | Option<**String**> | When `storage_bytes` was measured (the time this response was produced). | [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/src/apis/databases_api.rs b/src/apis/databases_api.rs
index a53d43e..e6277af 100644
--- a/src/apis/databases_api.rs
+++ b/src/apis/databases_api.rs
@@ -291,7 +291,7 @@ pub async fn attach_database_catalog(
}
}
-/// Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default` (or the optional `default_catalog` name), with a `main` schema pre-declared so `default.main.
` works out of the box. The optional `name` is a free-form display label and is not required to be unique. Optional `default_catalog` overrides the name the default catalog answers to; it must be a valid SQL identifier and may not collide with the `hotdata`, `datasets`, or `information_schema` system catalogs. Optional `schemas` declares additional schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`. Optional `expires_at` sets when the database expires — accepts either an RFC 3339 timestamp or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days), e.g. `24h`, `48h`, `90m`, `7d`. When omitted, the database never expires. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp.
+/// Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default` (or the optional `default_catalog` name), with a `main` schema pre-declared so `default.main.
` works out of the box. The optional `name` is a free-form display label and is not required to be unique. Optional `default_catalog` overrides the name the default catalog answers to; it must be a valid SQL identifier and may not collide with the reserved catalog names `hotdata`, `datasets`, or `information_schema`. Optional `schemas` declares additional schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`. Optional `expires_at` sets when the database expires — accepts either an RFC 3339 timestamp or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days), e.g. `24h`, `48h`, `90m`, `7d`. When omitted, the database never expires. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp.
pub async fn create_database(
configuration: &configuration::Configuration,
create_database_request: models::CreateDatabaseRequest,
diff --git a/src/apis/datasets_api.rs b/src/apis/datasets_api.rs
deleted file mode 100644
index 3a2f6ab..0000000
--- a/src/apis/datasets_api.rs
+++ /dev/null
@@ -1,504 +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_dataset`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum CreateDatasetError {
- Status400(models::ApiErrorResponse),
- Status404(models::ApiErrorResponse),
- Status409(models::ApiErrorResponse),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`delete_dataset`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum DeleteDatasetError {
- Status404(models::ApiErrorResponse),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`get_dataset`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum GetDatasetError {
- Status404(models::ApiErrorResponse),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`list_dataset_versions`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum ListDatasetVersionsError {
- Status404(models::ApiErrorResponse),
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`list_datasets`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum ListDatasetsError {
- UnknownValue(serde_json::Value),
-}
-
-/// struct for typed errors of method [`update_dataset`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum UpdateDatasetError {
- Status404(models::ApiErrorResponse),
- Status409(models::ApiErrorResponse),
- UnknownValue(serde_json::Value),
-}
-
-/// Create a new dataset from an uploaded file, inline data, a URL, or a SQL/saved query. The dataset becomes a queryable table under the `datasets` schema (e.g., `SELECT * FROM datasets.my_table`). Supports CSV, JSON, and Parquet formats. Optionally specify explicit column types. For `sql_query` / `saved_query` sources the dataset materializes by running that SQL, so the `X-Database-Id` header is required and the query sees only that database's catalogs (the scope is also reused on refresh). Upload/url/inline sources ignore the header.
-pub async fn create_dataset(
- configuration: &configuration::Configuration,
- create_dataset_request: models::CreateDatasetRequest,
- x_database_id: Option<&str>,
-) -> Result> {
- // add a prefix to parameters to efficiently prevent name collisions
- let p_body_create_dataset_request = create_dataset_request;
- let p_header_x_database_id = x_database_id;
-
- let uri_str = format!("{}/v1/datasets", 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(param_value) = p_header_x_database_id {
- req_builder = req_builder.header("X-Database-Id", param_value.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(apikey) = configuration.api_keys.get("X-Session-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-Session-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_dataset_request);
-
- let req = req_builder.build()?;
- crate::http_log::log_request(&req);
- // Route through the shared retry helper so HTTP 429 (OVERLOADED admission
- // shedding) is retried per `configuration.retry` on every generated op, not
- // just the hand-written query path. See crate::http::execute_retrying.
- let resp =
- crate::http::execute_retrying(&configuration.client, req, &configuration.retry).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::CreateDatasetResponse`"))),
- 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::CreateDatasetResponse`")))),
- }
- } 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_dataset(
- configuration: &configuration::Configuration,
- id: &str,
-) -> Result<(), Error> {
- // add a prefix to parameters to efficiently prevent name collisions
- let p_path_id = id;
-
- let uri_str = format!(
- "{}/v1/datasets/{id}",
- configuration.base_path,
- id = crate::apis::urlencode(p_path_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(apikey) = configuration.api_keys.get("X-Session-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-Session-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);
- // Route through the shared retry helper so HTTP 429 (OVERLOADED admission
- // shedding) is retried per `configuration.retry` on every generated op, not
- // just the hand-written query path. See crate::http::execute_retrying.
- let resp =
- crate::http::execute_retrying(&configuration.client, req, &configuration.retry).await?;
-
- let status = resp.status();
- crate::http_log::log_response_status(status);
-
- if !status.is_client_error() && !status.is_server_error() {
- Ok(())
- } 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_dataset(
- configuration: &configuration::Configuration,
- id: &str,
-) -> Result> {
- // add a prefix to parameters to efficiently prevent name collisions
- let p_path_id = id;
-
- let uri_str = format!(
- "{}/v1/datasets/{id}",
- configuration.base_path,
- id = crate::apis::urlencode(p_path_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);
- // Route through the shared retry helper so HTTP 429 (OVERLOADED admission
- // shedding) is retried per `configuration.retry` on every generated op, not
- // just the hand-written query path. See crate::http::execute_retrying.
- let resp =
- crate::http::execute_retrying(&configuration.client, req, &configuration.retry).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::GetDatasetResponse`"))),
- 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::GetDatasetResponse`")))),
- }
- } 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 list_dataset_versions(
- configuration: &configuration::Configuration,
- id: &str,
- limit: Option,
- offset: Option,
-) -> Result> {
- // add a prefix to parameters to efficiently prevent name collisions
- let p_path_id = id;
- let p_query_limit = limit;
- let p_query_offset = offset;
-
- let uri_str = format!(
- "{}/v1/datasets/{id}/versions",
- configuration.base_path,
- id = crate::apis::urlencode(p_path_id)
- );
- let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
-
- 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_offset {
- req_builder = req_builder.query(&[("offset", ¶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());
- }
- 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);
- // Route through the shared retry helper so HTTP 429 (OVERLOADED admission
- // shedding) is retried per `configuration.retry` on every generated op, not
- // just the hand-written query path. See crate::http::execute_retrying.
- let resp =
- crate::http::execute_retrying(&configuration.client, req, &configuration.retry).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::ListDatasetVersionsResponse`"))),
- 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::ListDatasetVersionsResponse`")))),
- }
- } 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 list_datasets(
- configuration: &configuration::Configuration,
- limit: Option,
- offset: Option,
-) -> Result> {
- // add a prefix to parameters to efficiently prevent name collisions
- let p_query_limit = limit;
- let p_query_offset = offset;
-
- let uri_str = format!("{}/v1/datasets", configuration.base_path);
- let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
-
- 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_offset {
- req_builder = req_builder.query(&[("offset", ¶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());
- }
- 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(apikey) = configuration.api_keys.get("X-Session-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-Session-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);
- // Route through the shared retry helper so HTTP 429 (OVERLOADED admission
- // shedding) is retried per `configuration.retry` on every generated op, not
- // just the hand-written query path. See crate::http::execute_retrying.
- let resp =
- crate::http::execute_retrying(&configuration.client, req, &configuration.retry).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::ListDatasetsResponse`"))),
- 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::ListDatasetsResponse`")))),
- }
- } 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 update_dataset(
- configuration: &configuration::Configuration,
- id: &str,
- update_dataset_request: models::UpdateDatasetRequest,
-) -> Result> {
- // add a prefix to parameters to efficiently prevent name collisions
- let p_path_id = id;
- let p_body_update_dataset_request = update_dataset_request;
-
- let uri_str = format!(
- "{}/v1/datasets/{id}",
- configuration.base_path,
- id = crate::apis::urlencode(p_path_id)
- );
- let mut req_builder = configuration.client.request(reqwest::Method::PUT, &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(apikey) = configuration.api_keys.get("X-Session-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-Session-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_dataset_request);
-
- let req = req_builder.build()?;
- crate::http_log::log_request(&req);
- // Route through the shared retry helper so HTTP 429 (OVERLOADED admission
- // shedding) is retried per `configuration.retry` on every generated op, not
- // just the hand-written query path. See crate::http::execute_retrying.
- let resp =
- crate::http::execute_retrying(&configuration.client, req, &configuration.retry).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::UpdateDatasetResponse`"))),
- 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::UpdateDatasetResponse`")))),
- }
- } 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/indexes_api.rs b/src/apis/indexes_api.rs
index 8f3d6f2..6e50b86 100644
--- a/src/apis/indexes_api.rs
+++ b/src/apis/indexes_api.rs
@@ -13,16 +13,6 @@ use crate::{apis::ResponseContent, models};
use reqwest;
use serde::{de::Error as _, Deserialize, Serialize};
-/// struct for typed errors of method [`create_dataset_index`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum CreateDatasetIndexError {
- Status400(models::ApiErrorResponse),
- Status404(models::ApiErrorResponse),
- Status500(models::ApiErrorResponse),
- UnknownValue(serde_json::Value),
-}
-
/// struct for typed errors of method [`create_index`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
@@ -33,14 +23,6 @@ pub enum CreateIndexError {
UnknownValue(serde_json::Value),
}
-/// struct for typed errors of method [`delete_dataset_index`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum DeleteDatasetIndexError {
- Status404(models::ApiErrorResponse),
- UnknownValue(serde_json::Value),
-}
-
/// struct for typed errors of method [`delete_index`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
@@ -50,14 +32,6 @@ pub enum DeleteIndexError {
UnknownValue(serde_json::Value),
}
-/// struct for typed errors of method [`list_dataset_indexes`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum ListDatasetIndexesError {
- Status404(models::ApiErrorResponse),
- UnknownValue(serde_json::Value),
-}
-
/// struct for typed errors of method [`list_indexes`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
@@ -77,86 +51,6 @@ pub enum ListIndexesCollectionError {
UnknownValue(serde_json::Value),
}
-/// Create a sorted, BM25, or vector index on a dataset.
-pub async fn create_dataset_index(
- configuration: &configuration::Configuration,
- dataset_id: &str,
- create_index_request: models::CreateIndexRequest,
-) -> Result> {
- // add a prefix to parameters to efficiently prevent name collisions
- let p_path_dataset_id = dataset_id;
- let p_body_create_index_request = create_index_request;
-
- let uri_str = format!(
- "{}/v1/datasets/{dataset_id}/indexes",
- configuration.base_path,
- dataset_id = crate::apis::urlencode(p_path_dataset_id)
- );
- 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(apikey) = configuration.api_keys.get("X-Session-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-Session-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_index_request);
-
- let req = req_builder.build()?;
- crate::http_log::log_request(&req);
- // Route through the shared retry helper so HTTP 429 (OVERLOADED admission
- // shedding) is retried per `configuration.retry` on every generated op, not
- // just the hand-written query path. See crate::http::execute_retrying.
- let resp =
- crate::http::execute_retrying(&configuration.client, req, &configuration.retry).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::IndexInfoResponse`"))),
- 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::IndexInfoResponse`")))),
- }
- } 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,
- }))
- }
-}
-
/// Create a sorted or BM25 full-text index on a cached table.
pub async fn create_index(
configuration: &configuration::Configuration,
@@ -235,74 +129,6 @@ pub async fn create_index(
}
}
-/// Delete a specific index from a dataset.
-pub async fn delete_dataset_index(
- configuration: &configuration::Configuration,
- dataset_id: &str,
- index_name: &str,
-) -> Result<(), Error> {
- // add a prefix to parameters to efficiently prevent name collisions
- let p_path_dataset_id = dataset_id;
- let p_path_index_name = index_name;
-
- let uri_str = format!(
- "{}/v1/datasets/{dataset_id}/indexes/{index_name}",
- configuration.base_path,
- dataset_id = crate::apis::urlencode(p_path_dataset_id),
- index_name = crate::apis::urlencode(p_path_index_name)
- );
- 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(apikey) = configuration.api_keys.get("X-Session-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-Session-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);
- // Route through the shared retry helper so HTTP 429 (OVERLOADED admission
- // shedding) is retried per `configuration.retry` on every generated op, not
- // just the hand-written query path. See crate::http::execute_retrying.
- let resp =
- crate::http::execute_retrying(&configuration.client, req, &configuration.retry).await?;
-
- let status = resp.status();
- crate::http_log::log_response_status(status);
-
- if !status.is_client_error() && !status.is_server_error() {
- Ok(())
- } 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,
- }))
- }
-}
-
/// Delete a specific index from a cached table.
pub async fn delete_index(
configuration: &configuration::Configuration,
@@ -369,81 +195,6 @@ pub async fn delete_index(
}
}
-/// List all indexes created on a dataset.
-pub async fn list_dataset_indexes(
- configuration: &configuration::Configuration,
- dataset_id: &str,
-) -> Result> {
- // add a prefix to parameters to efficiently prevent name collisions
- let p_path_dataset_id = dataset_id;
-
- let uri_str = format!(
- "{}/v1/datasets/{dataset_id}/indexes",
- configuration.base_path,
- dataset_id = crate::apis::urlencode(p_path_dataset_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(apikey) = configuration.api_keys.get("X-Session-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-Session-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);
- // Route through the shared retry helper so HTTP 429 (OVERLOADED admission
- // shedding) is retried per `configuration.retry` on every generated op, not
- // just the hand-written query path. See crate::http::execute_retrying.
- let resp =
- crate::http::execute_retrying(&configuration.client, req, &configuration.retry).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::ListIndexesResponse`"))),
- 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::ListIndexesResponse`")))),
- }
- } 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,
- }))
- }
-}
-
/// List all indexes created on a cached table.
pub async fn list_indexes(
configuration: &configuration::Configuration,
diff --git a/src/apis/mod.rs b/src/apis/mod.rs
index 72e4de5..c2fd0fd 100644
--- a/src/apis/mod.rs
+++ b/src/apis/mod.rs
@@ -117,7 +117,6 @@ pub mod connection_types_api;
pub mod connections_api;
pub mod database_context_api;
pub mod databases_api;
-pub mod datasets_api;
pub mod embedding_providers_api;
pub mod indexes_api;
pub mod information_schema_api;
@@ -129,6 +128,7 @@ pub mod results_api;
pub mod saved_queries_api;
pub mod secrets_api;
pub mod uploads_api;
+pub mod usage_api;
pub mod workspaces_api;
pub mod configuration;
diff --git a/src/apis/refresh_api.rs b/src/apis/refresh_api.rs
index fe1a85e..2c8a27f 100644
--- a/src/apis/refresh_api.rs
+++ b/src/apis/refresh_api.rs
@@ -22,7 +22,7 @@ pub enum RefreshError {
UnknownValue(serde_json::Value),
}
-/// Refresh schema metadata, table data, or dataset data. The behavior depends on the request fields: - **Schema refresh (all)**: omit all fields — re-discovers tables for every connection. - **Schema refresh (single)**: set `connection_id` — re-discovers tables for one connection. - **Data refresh (single table)**: set `connection_id`, `schema_name`, `table_name`, and `data: true`. - **Data refresh (connection)**: set `connection_id` and `data: true` — refreshes all cached tables. Set `include_uncached: true` to also sync tables that haven't been cached yet. - **Dataset refresh**: set `dataset_id` — re-runs the dataset's source (URL fetch or saved query) and creates a new version. Mutually exclusive with `connection_id`. Set `async: true` on data or dataset refresh operations to run in the background and return a job ID for polling.
+/// Refresh schema metadata or table data. The behavior depends on the request fields: - **Schema refresh (all)**: omit all fields — re-discovers tables for every connection. - **Schema refresh (single)**: set `connection_id` — re-discovers tables for one connection. - **Data refresh (single table)**: set `connection_id`, `schema_name`, `table_name`, and `data: true`. - **Data refresh (connection)**: set `connection_id` and `data: true` — refreshes all cached tables. Set `include_uncached: true` to also sync tables that haven't been cached yet. Set `async: true` on data refresh operations to run in the background and return a job ID for polling.
pub async fn refresh(
configuration: &configuration::Configuration,
refresh_request: models::RefreshRequest,
diff --git a/src/apis/uploads_api.rs b/src/apis/uploads_api.rs
index 447d0b4..c45e7bf 100644
--- a/src/apis/uploads_api.rs
+++ b/src/apis/uploads_api.rs
@@ -95,7 +95,7 @@ pub async fn list_uploads(
}
}
-/// Upload a file to be used as a dataset source. Send the raw file bytes as the request body with an appropriate Content-Type header (e.g., `text/csv`, `application/json`, `application/parquet`). The body is streamed to disk, so files up to 20GB are supported. The returned upload ID can be passed to POST /v1/datasets to create a queryable table.
+/// Upload a Parquet file to publish as the contents of a managed table. Send the raw file bytes as the request body with an appropriate Content-Type header (e.g., `application/parquet`). The body is streamed to disk, so files up to 20GB are supported. The returned upload ID can be passed to the managed-table load endpoint.
pub async fn upload_file(
configuration: &configuration::Configuration,
body: std::path::PathBuf,
diff --git a/src/apis/usage_api.rs b/src/apis/usage_api.rs
new file mode 100644
index 0000000..93cbbb9
--- /dev/null
+++ b/src/apis/usage_api.rs
@@ -0,0 +1,87 @@
+/*
+ * 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 [`get_usage`]
+#[derive(Debug, Clone, Serialize, Deserialize)]
+#[serde(untagged)]
+pub enum GetUsageError {
+ UnknownValue(serde_json::Value),
+}
+
+/// Return aggregated bytes scanned and current storage size for a billing period. Pass `since` as the subscription's `current_period_start` so the meter value aligns with the Stripe invoice window rather than the calendar month.
+pub async fn get_usage(
+ configuration: &configuration::Configuration,
+ since: Option<&str>,
+) -> Result> {
+ // add a prefix to parameters to efficiently prevent name collisions
+ let p_query_since = since;
+
+ let uri_str = format!("{}/v1/usage", configuration.base_path);
+ let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
+
+ if let Some(ref param_value) = p_query_since {
+ req_builder = req_builder.query(&[("since", ¶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());
+ }
+ 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);
+ // Route through the shared retry helper so HTTP 429 (OVERLOADED admission
+ // shedding) is retried per `configuration.retry` on every generated op, not
+ // just the hand-written query path. See crate::http::execute_retrying.
+ let resp =
+ crate::http::execute_retrying(&configuration.client, req, &configuration.retry).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::WorkspaceUsageResponse`"))),
+ 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::WorkspaceUsageResponse`")))),
+ }
+ } 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/column_type_spec.rs b/src/models/column_type_spec.rs
deleted file mode 100644
index b2c0aaf..0000000
--- a/src/models/column_type_spec.rs
+++ /dev/null
@@ -1,65 +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};
-
-/// ColumnTypeSpec : Detailed column type specification with optional properties.
-#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
-pub struct ColumnTypeSpec {
- /// Geometry type for GEOMETRY/GEOGRAPHY columns. E.g., \"Point\", \"LineString\", \"Polygon\", \"MultiPoint\", \"MultiLineString\", \"MultiPolygon\", \"GeometryCollection\", or \"Geometry\" (any).
- #[serde(
- rename = "geometry_type",
- default,
- with = "::serde_with::rust::double_option",
- skip_serializing_if = "Option::is_none"
- )]
- pub geometry_type: Option