diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index c9d6801..2b4fe07 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -3,6 +3,7 @@ .gitlab-ci.yml docs/ApiErrorDetail.md docs/ApiErrorResponse.md +docs/AsyncQueryResponse.md docs/BooleanProfileDetail.md docs/CategoricalProfileDetail.md docs/CategoryValueInfo.md @@ -19,11 +20,17 @@ docs/ConnectionHealthResponse.md docs/ConnectionInfo.md docs/ConnectionRefreshResult.md docs/ConnectionSchemaError.md +docs/ConnectionTypeDetail.md +docs/ConnectionTypeSummary.md +docs/ConnectionTypesApi.md docs/ConnectionsApi.md docs/CreateConnectionRequest.md docs/CreateConnectionResponse.md docs/CreateDatasetRequest.md docs/CreateDatasetResponse.md +docs/CreateEmbeddingProviderRequest.md +docs/CreateEmbeddingProviderResponse.md +docs/CreateIndexRequest.md docs/CreateSavedQueryRequest.md docs/CreateSecretRequest.md docs/CreateSecretResponse.md @@ -31,20 +38,36 @@ docs/CreateWorkspaceRequest.md docs/CreateWorkspaceResponse.md docs/DatasetSource.md docs/DatasetSummary.md +docs/DatasetVersionSummary.md docs/DatasetsApi.md docs/DiscoveryStatus.md +docs/EmbeddingProviderResponse.md +docs/EmbeddingProvidersApi.md docs/Error.md docs/ExecuteSavedQueryRequest.md docs/GetConnectionResponse.md docs/GetDatasetResponse.md docs/GetResultResponse.md docs/GetSecretResponse.md +docs/IndexInfoResponse.md +docs/IndexStatus.md +docs/IndexesApi.md docs/InformationSchemaApi.md docs/InformationSchemaResponse.md docs/InlineData.md docs/InlineDatasetSource.md +docs/JobResult.md +docs/JobStatus.md +docs/JobStatusResponse.md +docs/JobType.md +docs/JobsApi.md +docs/ListConnectionTypesResponse.md docs/ListConnectionsResponse.md +docs/ListDatasetVersionsResponse.md docs/ListDatasetsResponse.md +docs/ListEmbeddingProvidersResponse.md +docs/ListIndexesResponse.md +docs/ListJobsResponse.md docs/ListQueryRunsResponse.md docs/ListResultsResponse.md docs/ListSavedQueriesResponse.md @@ -59,18 +82,22 @@ docs/QueryResponse.md docs/QueryRunInfo.md docs/QueryRunsApi.md docs/RefreshApi.md +docs/RefreshDatasetResponse.md docs/RefreshRequest.md docs/RefreshResponse.md docs/RefreshWarning.md docs/ResultInfo.md docs/ResultsApi.md docs/SavedQueriesApi.md +docs/SavedQueryDatasetSource.md docs/SavedQueryDetail.md docs/SavedQuerySummary.md docs/SavedQueryVersionInfo.md docs/SchemaRefreshResult.md docs/SecretMetadataResponse.md docs/SecretsApi.md +docs/SqlQueryDatasetSource.md +docs/SubmitJobResponse.md docs/TableInfo.md docs/TableProfileResponse.md docs/TableRefreshError.md @@ -79,6 +106,8 @@ docs/TemporalProfileDetail.md docs/TextProfileDetail.md docs/UpdateDatasetRequest.md docs/UpdateDatasetResponse.md +docs/UpdateEmbeddingProviderRequest.md +docs/UpdateEmbeddingProviderResponse.md docs/UpdateSavedQueryRequest.md docs/UpdateSecretRequest.md docs/UpdateSecretResponse.md @@ -86,14 +115,19 @@ docs/UploadDatasetSource.md docs/UploadInfo.md docs/UploadResponse.md docs/UploadsApi.md +docs/UrlDatasetSource.md docs/WorkspaceDetail.md docs/WorkspaceListItem.md docs/WorkspacesApi.md hotdata/__init__.py hotdata/api/__init__.py +hotdata/api/connection_types_api.py hotdata/api/connections_api.py hotdata/api/datasets_api.py +hotdata/api/embedding_providers_api.py +hotdata/api/indexes_api.py hotdata/api/information_schema_api.py +hotdata/api/jobs_api.py hotdata/api/query_api.py hotdata/api/query_runs_api.py hotdata/api/refresh_api.py @@ -109,6 +143,7 @@ hotdata/exceptions.py hotdata/models/__init__.py hotdata/models/api_error_detail.py hotdata/models/api_error_response.py +hotdata/models/async_query_response.py hotdata/models/boolean_profile_detail.py hotdata/models/categorical_profile_detail.py hotdata/models/category_value_info.py @@ -125,10 +160,15 @@ hotdata/models/connection_health_response.py hotdata/models/connection_info.py hotdata/models/connection_refresh_result.py hotdata/models/connection_schema_error.py +hotdata/models/connection_type_detail.py +hotdata/models/connection_type_summary.py hotdata/models/create_connection_request.py hotdata/models/create_connection_response.py hotdata/models/create_dataset_request.py hotdata/models/create_dataset_response.py +hotdata/models/create_embedding_provider_request.py +hotdata/models/create_embedding_provider_response.py +hotdata/models/create_index_request.py hotdata/models/create_saved_query_request.py hotdata/models/create_secret_request.py hotdata/models/create_secret_response.py @@ -136,18 +176,31 @@ hotdata/models/create_workspace_request.py hotdata/models/create_workspace_response.py hotdata/models/dataset_source.py hotdata/models/dataset_summary.py +hotdata/models/dataset_version_summary.py hotdata/models/discovery_status.py +hotdata/models/embedding_provider_response.py hotdata/models/error.py hotdata/models/execute_saved_query_request.py hotdata/models/get_connection_response.py hotdata/models/get_dataset_response.py hotdata/models/get_result_response.py hotdata/models/get_secret_response.py +hotdata/models/index_info_response.py +hotdata/models/index_status.py hotdata/models/information_schema_response.py hotdata/models/inline_data.py hotdata/models/inline_dataset_source.py +hotdata/models/job_result.py +hotdata/models/job_status.py +hotdata/models/job_status_response.py +hotdata/models/job_type.py +hotdata/models/list_connection_types_response.py hotdata/models/list_connections_response.py +hotdata/models/list_dataset_versions_response.py hotdata/models/list_datasets_response.py +hotdata/models/list_embedding_providers_response.py +hotdata/models/list_indexes_response.py +hotdata/models/list_jobs_response.py hotdata/models/list_query_runs_response.py hotdata/models/list_results_response.py hotdata/models/list_saved_queries_response.py @@ -159,15 +212,19 @@ hotdata/models/numeric_profile_detail.py hotdata/models/query_request.py hotdata/models/query_response.py hotdata/models/query_run_info.py +hotdata/models/refresh_dataset_response.py hotdata/models/refresh_request.py hotdata/models/refresh_response.py hotdata/models/refresh_warning.py hotdata/models/result_info.py +hotdata/models/saved_query_dataset_source.py hotdata/models/saved_query_detail.py hotdata/models/saved_query_summary.py hotdata/models/saved_query_version_info.py hotdata/models/schema_refresh_result.py hotdata/models/secret_metadata_response.py +hotdata/models/sql_query_dataset_source.py +hotdata/models/submit_job_response.py hotdata/models/table_info.py hotdata/models/table_profile_response.py hotdata/models/table_refresh_error.py @@ -176,12 +233,15 @@ hotdata/models/temporal_profile_detail.py hotdata/models/text_profile_detail.py hotdata/models/update_dataset_request.py hotdata/models/update_dataset_response.py +hotdata/models/update_embedding_provider_request.py +hotdata/models/update_embedding_provider_response.py hotdata/models/update_saved_query_request.py hotdata/models/update_secret_request.py hotdata/models/update_secret_response.py hotdata/models/upload_dataset_source.py hotdata/models/upload_info.py hotdata/models/upload_response.py +hotdata/models/url_dataset_source.py hotdata/models/workspace_detail.py hotdata/models/workspace_list_item.py hotdata/py.typed @@ -192,13 +252,34 @@ setup.cfg setup.py test-requirements.txt test/__init__.py -test/test_boolean_profile_detail.py -test/test_categorical_profile_detail.py -test/test_create_workspace_response.py -test/test_inline_dataset_source.py -test/test_list_workspaces_response.py -test/test_numeric_profile_detail.py -test/test_temporal_profile_detail.py -test/test_text_profile_detail.py -test/test_upload_dataset_source.py +test/test_async_query_response.py +test/test_connection_type_detail.py +test/test_connection_type_summary.py +test/test_connection_types_api.py +test/test_create_embedding_provider_request.py +test/test_create_embedding_provider_response.py +test/test_create_index_request.py +test/test_dataset_version_summary.py +test/test_embedding_provider_response.py +test/test_embedding_providers_api.py +test/test_index_info_response.py +test/test_index_status.py +test/test_indexes_api.py +test/test_job_result.py +test/test_job_status.py +test/test_job_status_response.py +test/test_job_type.py +test/test_jobs_api.py +test/test_list_connection_types_response.py +test/test_list_dataset_versions_response.py +test/test_list_embedding_providers_response.py +test/test_list_indexes_response.py +test/test_list_jobs_response.py +test/test_refresh_dataset_response.py +test/test_saved_query_dataset_source.py +test/test_sql_query_dataset_source.py +test/test_submit_job_response.py +test/test_update_embedding_provider_request.py +test/test_update_embedding_provider_response.py +test/test_url_dataset_source.py tox.ini diff --git a/docs/AsyncQueryResponse.md b/docs/AsyncQueryResponse.md new file mode 100644 index 0000000..446f964 --- /dev/null +++ b/docs/AsyncQueryResponse.md @@ -0,0 +1,33 @@ +# AsyncQueryResponse + +Response returned when a query is submitted asynchronously (202 Accepted). Poll GET /query-runs/{id} to track progress. Once status is \"succeeded\", retrieve results via GET /results/{result_id}. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**query_run_id** | **str** | Unique identifier for the query run. | +**reason** | **str** | Human-readable reason why the query went async (e.g., caching tables for the first time). | [optional] +**status** | **str** | Current status of the query run. | +**status_url** | **str** | URL to poll for query run status. | + +## Example + +```python +from hotdata.models.async_query_response import AsyncQueryResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AsyncQueryResponse from a JSON string +async_query_response_instance = AsyncQueryResponse.from_json(json) +# print the JSON string representation of the object +print(AsyncQueryResponse.to_json()) + +# convert the object into a dict +async_query_response_dict = async_query_response_instance.to_dict() +# create an instance of AsyncQueryResponse from a dict +async_query_response_from_dict = AsyncQueryResponse.from_dict(async_query_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ConnectionRefreshResult.md b/docs/ConnectionRefreshResult.md index 028ee44..e0e3fcf 100644 --- a/docs/ConnectionRefreshResult.md +++ b/docs/ConnectionRefreshResult.md @@ -1,6 +1,6 @@ # ConnectionRefreshResult -Response for connection-wide data refresh +Result payload for a `data_refresh_connection` job. ## Properties @@ -8,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **connection_id** | **str** | | **duration_ms** | **int** | | -**errors** | [**List[TableRefreshError]**](TableRefreshError.md) | | +**errors** | [**List[TableRefreshError]**](TableRefreshError.md) | | [optional] **tables_failed** | **int** | | **tables_refreshed** | **int** | | **total_rows** | **int** | | diff --git a/docs/ConnectionTypeDetail.md b/docs/ConnectionTypeDetail.md new file mode 100644 index 0000000..b98ce11 --- /dev/null +++ b/docs/ConnectionTypeDetail.md @@ -0,0 +1,32 @@ +# ConnectionTypeDetail + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth** | **object** | | [optional] +**config_schema** | **object** | | [optional] +**label** | **str** | | +**name** | **str** | | + +## Example + +```python +from hotdata.models.connection_type_detail import ConnectionTypeDetail + +# TODO update the JSON string below +json = "{}" +# create an instance of ConnectionTypeDetail from a JSON string +connection_type_detail_instance = ConnectionTypeDetail.from_json(json) +# print the JSON string representation of the object +print(ConnectionTypeDetail.to_json()) + +# convert the object into a dict +connection_type_detail_dict = connection_type_detail_instance.to_dict() +# create an instance of ConnectionTypeDetail from a dict +connection_type_detail_from_dict = ConnectionTypeDetail.from_dict(connection_type_detail_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ConnectionTypeSummary.md b/docs/ConnectionTypeSummary.md new file mode 100644 index 0000000..5d15589 --- /dev/null +++ b/docs/ConnectionTypeSummary.md @@ -0,0 +1,30 @@ +# ConnectionTypeSummary + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **str** | | +**name** | **str** | | + +## Example + +```python +from hotdata.models.connection_type_summary import ConnectionTypeSummary + +# TODO update the JSON string below +json = "{}" +# create an instance of ConnectionTypeSummary from a JSON string +connection_type_summary_instance = ConnectionTypeSummary.from_json(json) +# print the JSON string representation of the object +print(ConnectionTypeSummary.to_json()) + +# convert the object into a dict +connection_type_summary_dict = connection_type_summary_instance.to_dict() +# create an instance of ConnectionTypeSummary from a dict +connection_type_summary_from_dict = ConnectionTypeSummary.from_dict(connection_type_summary_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ConnectionTypesApi.md b/docs/ConnectionTypesApi.md new file mode 100644 index 0000000..9e084d2 --- /dev/null +++ b/docs/ConnectionTypesApi.md @@ -0,0 +1,163 @@ +# hotdata.ConnectionTypesApi + +All URIs are relative to *https://app.hotdata.dev* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_connection_type**](ConnectionTypesApi.md#get_connection_type) | **GET** /v1/connection-types/{name} | Get connection type details +[**list_connection_types**](ConnectionTypesApi.md#list_connection_types) | **GET** /v1/connection-types | List connection types + + +# **get_connection_type** +> ConnectionTypeDetail get_connection_type(name) + +Get connection type details + +Get configuration schema and authentication requirements for a specific connection type. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import hotdata +from hotdata.models.connection_type_detail import ConnectionTypeDetail +from hotdata.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.hotdata.dev +# See configuration.py for a list of all supported configuration parameters. +configuration = hotdata.Configuration( + host = "https://app.hotdata.dev" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = hotdata.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with hotdata.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hotdata.ConnectionTypesApi(api_client) + name = 'name_example' # str | Connection type name (e.g. postgres, mysql, snowflake) + + try: + # Get connection type details + api_response = api_instance.get_connection_type(name) + print("The response of ConnectionTypesApi->get_connection_type:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConnectionTypesApi->get_connection_type: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| Connection type name (e.g. postgres, mysql, snowflake) | + +### Return type + +[**ConnectionTypeDetail**](ConnectionTypeDetail.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Connection type details | - | +**404** | Unknown connection type | - | + +[[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_connection_types** +> ListConnectionTypesResponse list_connection_types() + +List connection types + +List all available connection types, including native sources and FlightDLT services. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import hotdata +from hotdata.models.list_connection_types_response import ListConnectionTypesResponse +from hotdata.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.hotdata.dev +# See configuration.py for a list of all supported configuration parameters. +configuration = hotdata.Configuration( + host = "https://app.hotdata.dev" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = hotdata.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with hotdata.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hotdata.ConnectionTypesApi(api_client) + + try: + # List connection types + api_response = api_instance.list_connection_types() + print("The response of ConnectionTypesApi->list_connection_types:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConnectionTypesApi->list_connection_types: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ListConnectionTypesResponse**](ListConnectionTypesResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Available connection types | - | + +[[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/CreateDatasetResponse.md b/docs/CreateDatasetResponse.md index 2c5704f..64a8416 100644 --- a/docs/CreateDatasetResponse.md +++ b/docs/CreateDatasetResponse.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **created_at** | **datetime** | | **id** | **str** | | **label** | **str** | | +**schema_name** | **str** | | **status** | **str** | | **table_name** | **str** | | diff --git a/docs/CreateEmbeddingProviderRequest.md b/docs/CreateEmbeddingProviderRequest.md new file mode 100644 index 0000000..915b144 --- /dev/null +++ b/docs/CreateEmbeddingProviderRequest.md @@ -0,0 +1,34 @@ +# CreateEmbeddingProviderRequest + +Request body for POST /embedding-providers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_key** | **str** | Inline API key. If provided, a secret is auto-created and referenced. Cannot be used together with `secret_name`. | [optional] +**config** | **object** | | [optional] +**name** | **str** | | +**provider_type** | **str** | Provider type: \"local\" or \"service\" | +**secret_name** | **str** | Reference an existing secret by name (for service providers). | [optional] + +## Example + +```python +from hotdata.models.create_embedding_provider_request import CreateEmbeddingProviderRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateEmbeddingProviderRequest from a JSON string +create_embedding_provider_request_instance = CreateEmbeddingProviderRequest.from_json(json) +# print the JSON string representation of the object +print(CreateEmbeddingProviderRequest.to_json()) + +# convert the object into a dict +create_embedding_provider_request_dict = create_embedding_provider_request_instance.to_dict() +# create an instance of CreateEmbeddingProviderRequest from a dict +create_embedding_provider_request_from_dict = CreateEmbeddingProviderRequest.from_dict(create_embedding_provider_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateEmbeddingProviderResponse.md b/docs/CreateEmbeddingProviderResponse.md new file mode 100644 index 0000000..2ca8080 --- /dev/null +++ b/docs/CreateEmbeddingProviderResponse.md @@ -0,0 +1,34 @@ +# CreateEmbeddingProviderResponse + +Response body for POST /embedding-providers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**config** | **object** | | +**created_at** | **datetime** | | +**id** | **str** | | +**name** | **str** | | +**provider_type** | **str** | | + +## Example + +```python +from hotdata.models.create_embedding_provider_response import CreateEmbeddingProviderResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateEmbeddingProviderResponse from a JSON string +create_embedding_provider_response_instance = CreateEmbeddingProviderResponse.from_json(json) +# print the JSON string representation of the object +print(CreateEmbeddingProviderResponse.to_json()) + +# convert the object into a dict +create_embedding_provider_response_dict = create_embedding_provider_response_instance.to_dict() +# create an instance of CreateEmbeddingProviderResponse from a dict +create_embedding_provider_response_from_dict = CreateEmbeddingProviderResponse.from_dict(create_embedding_provider_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateIndexRequest.md b/docs/CreateIndexRequest.md new file mode 100644 index 0000000..4fb1a4f --- /dev/null +++ b/docs/CreateIndexRequest.md @@ -0,0 +1,38 @@ +# CreateIndexRequest + +Request body for POST .../indexes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_async** | **bool** | When true, create the index as a background job and return a job ID for polling. | [optional] +**columns** | **List[str]** | Columns to index. Required for all index types. | +**description** | **str** | User-facing description of the embedding (e.g., \"product descriptions\"). | [optional] +**dimensions** | **int** | Output vector dimensions. Some models support multiple dimension sizes (e.g., OpenAI text-embedding-3-small supports 512 or 1536). If omitted, the model's default dimensions are used. | [optional] +**embedding_provider_id** | **str** | Embedding provider ID. When set for a vector index, the source column is treated as text and embeddings are generated automatically. The vector index is then built on the generated embedding column (`{column}_embedding` by default). | [optional] +**index_name** | **str** | | +**index_type** | **str** | Index type: \"sorted\" (default), \"bm25\", or \"vector\" | [optional] +**metric** | **str** | Distance metric for vector indexes: \"l2\", \"cosine\", or \"dot\". When omitted, defaults to \"l2\" for float array columns or the provider's preferred metric for text columns with auto-embedding. | [optional] +**output_column** | **str** | Custom name for the generated embedding column. Defaults to `{column}_embedding`. | [optional] + +## Example + +```python +from hotdata.models.create_index_request import CreateIndexRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateIndexRequest from a JSON string +create_index_request_instance = CreateIndexRequest.from_json(json) +# print the JSON string representation of the object +print(CreateIndexRequest.to_json()) + +# convert the object into a dict +create_index_request_dict = create_index_request_instance.to_dict() +# create an instance of CreateIndexRequest from a dict +create_index_request_from_dict = CreateIndexRequest.from_dict(create_index_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DatasetSource.md b/docs/DatasetSource.md index 6e6c280..16d43c5 100644 --- a/docs/DatasetSource.md +++ b/docs/DatasetSource.md @@ -6,9 +6,15 @@ Dataset source specification Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**columns** | **Dict[str, str]** | 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] +**columns** | **Dict[str, str]** | Optional explicit column definitions. Keys are column names, values are type specs. | [optional] **format** | **str** | | [optional] **upload_id** | **str** | | +**saved_query_id** | **str** | | +**version** | **int** | | [optional] +**description** | **str** | Optional description for the auto-created saved query. | [optional] +**name** | **str** | Optional name for the auto-created saved query. Defaults to the dataset label. | [optional] +**sql** | **str** | | +**url** | **str** | | **inline** | [**InlineData**](InlineData.md) | | ## Example diff --git a/docs/DatasetSummary.md b/docs/DatasetSummary.md index b6ce2d2..af03246 100644 --- a/docs/DatasetSummary.md +++ b/docs/DatasetSummary.md @@ -9,6 +9,9 @@ Name | Type | Description | Notes **created_at** | **datetime** | | **id** | **str** | | **label** | **str** | | +**latest_version** | **int** | | +**pinned_version** | **int** | | [optional] +**schema_name** | **str** | | **table_name** | **str** | | **updated_at** | **datetime** | | diff --git a/docs/DatasetVersionSummary.md b/docs/DatasetVersionSummary.md new file mode 100644 index 0000000..53582fa --- /dev/null +++ b/docs/DatasetVersionSummary.md @@ -0,0 +1,33 @@ +# DatasetVersionSummary + +Dataset version summary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **datetime** | | +**id** | **str** | | +**source_type** | **str** | | +**version** | **int** | | + +## Example + +```python +from hotdata.models.dataset_version_summary import DatasetVersionSummary + +# TODO update the JSON string below +json = "{}" +# create an instance of DatasetVersionSummary from a JSON string +dataset_version_summary_instance = DatasetVersionSummary.from_json(json) +# print the JSON string representation of the object +print(DatasetVersionSummary.to_json()) + +# convert the object into a dict +dataset_version_summary_dict = dataset_version_summary_instance.to_dict() +# create an instance of DatasetVersionSummary from a dict +dataset_version_summary_from_dict = DatasetVersionSummary.from_dict(dataset_version_summary_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DatasetsApi.md b/docs/DatasetsApi.md index ee52c62..29f9b9b 100644 --- a/docs/DatasetsApi.md +++ b/docs/DatasetsApi.md @@ -7,6 +7,7 @@ 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 @@ -243,6 +244,87 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **list_dataset_versions** +> ListDatasetVersionsResponse list_dataset_versions(id, limit=limit, offset=offset) + +List dataset versions + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import hotdata +from hotdata.models.list_dataset_versions_response import ListDatasetVersionsResponse +from hotdata.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.hotdata.dev +# See configuration.py for a list of all supported configuration parameters. +configuration = hotdata.Configuration( + host = "https://app.hotdata.dev" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = hotdata.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with hotdata.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hotdata.DatasetsApi(api_client) + id = 'id_example' # str | Dataset ID + limit = 56 # int | Maximum number of versions (default: 100, max: 1000) (optional) + offset = 56 # int | Pagination offset (default: 0) (optional) + + try: + # List dataset versions + api_response = api_instance.list_dataset_versions(id, limit=limit, offset=offset) + print("The response of DatasetsApi->list_dataset_versions:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DatasetsApi->list_dataset_versions: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Dataset ID | + **limit** | **int**| Maximum number of versions (default: 100, max: 1000) | [optional] + **offset** | **int**| Pagination offset (default: 0) | [optional] + +### Return type + +[**ListDatasetVersionsResponse**](ListDatasetVersionsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of dataset versions | - | +**404** | Dataset not found | - | + +[[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** > ListDatasetsResponse list_datasets(limit=limit, offset=offset) diff --git a/docs/EmbeddingProviderResponse.md b/docs/EmbeddingProviderResponse.md new file mode 100644 index 0000000..a28f30d --- /dev/null +++ b/docs/EmbeddingProviderResponse.md @@ -0,0 +1,37 @@ +# EmbeddingProviderResponse + +Single embedding provider for API responses + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**config** | **object** | | +**created_at** | **datetime** | | +**has_secret** | **bool** | | +**id** | **str** | | +**name** | **str** | | +**provider_type** | **str** | | +**source** | **str** | Provider source: \"system\" (from config) or \"user\" (created via API). | +**updated_at** | **datetime** | | + +## Example + +```python +from hotdata.models.embedding_provider_response import EmbeddingProviderResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of EmbeddingProviderResponse from a JSON string +embedding_provider_response_instance = EmbeddingProviderResponse.from_json(json) +# print the JSON string representation of the object +print(EmbeddingProviderResponse.to_json()) + +# convert the object into a dict +embedding_provider_response_dict = embedding_provider_response_instance.to_dict() +# create an instance of EmbeddingProviderResponse from a dict +embedding_provider_response_from_dict = EmbeddingProviderResponse.from_dict(embedding_provider_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EmbeddingProvidersApi.md b/docs/EmbeddingProvidersApi.md new file mode 100644 index 0000000..f4e1a94 --- /dev/null +++ b/docs/EmbeddingProvidersApi.md @@ -0,0 +1,399 @@ +# hotdata.EmbeddingProvidersApi + +All URIs are relative to *https://app.hotdata.dev* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_embedding_provider**](EmbeddingProvidersApi.md#create_embedding_provider) | **POST** /v1/embedding-providers | Create embedding provider +[**delete_embedding_provider**](EmbeddingProvidersApi.md#delete_embedding_provider) | **DELETE** /v1/embedding-providers/{id} | Delete embedding provider +[**get_embedding_provider**](EmbeddingProvidersApi.md#get_embedding_provider) | **GET** /v1/embedding-providers/{id} | Get embedding provider +[**list_embedding_providers**](EmbeddingProvidersApi.md#list_embedding_providers) | **GET** /v1/embedding-providers | List embedding providers +[**update_embedding_provider**](EmbeddingProvidersApi.md#update_embedding_provider) | **PUT** /v1/embedding-providers/{id} | Update embedding provider + + +# **create_embedding_provider** +> CreateEmbeddingProviderResponse create_embedding_provider(create_embedding_provider_request) + +Create embedding provider + +Register a new embedding provider that can be used to generate vector embeddings for text columns. Providers can be service-based (e.g., OpenAI) or local. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import hotdata +from hotdata.models.create_embedding_provider_request import CreateEmbeddingProviderRequest +from hotdata.models.create_embedding_provider_response import CreateEmbeddingProviderResponse +from hotdata.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.hotdata.dev +# See configuration.py for a list of all supported configuration parameters. +configuration = hotdata.Configuration( + host = "https://app.hotdata.dev" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = hotdata.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with hotdata.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hotdata.EmbeddingProvidersApi(api_client) + create_embedding_provider_request = hotdata.CreateEmbeddingProviderRequest() # CreateEmbeddingProviderRequest | + + try: + # Create embedding provider + api_response = api_instance.create_embedding_provider(create_embedding_provider_request) + print("The response of EmbeddingProvidersApi->create_embedding_provider:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EmbeddingProvidersApi->create_embedding_provider: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_embedding_provider_request** | [**CreateEmbeddingProviderRequest**](CreateEmbeddingProviderRequest.md)| | + +### Return type + +[**CreateEmbeddingProviderResponse**](CreateEmbeddingProviderResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Embedding provider created | - | +**400** | Invalid request | - | +**409** | Provider with this name already exists | - | + +[[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_embedding_provider** +> delete_embedding_provider(id) + +Delete embedding provider + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import hotdata +from hotdata.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.hotdata.dev +# See configuration.py for a list of all supported configuration parameters. +configuration = hotdata.Configuration( + host = "https://app.hotdata.dev" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = hotdata.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with hotdata.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hotdata.EmbeddingProvidersApi(api_client) + id = 'id_example' # str | Embedding provider ID + + try: + # Delete embedding provider + api_instance.delete_embedding_provider(id) + except Exception as e: + print("Exception when calling EmbeddingProvidersApi->delete_embedding_provider: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Embedding provider ID | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Embedding provider deleted | - | +**404** | Provider not found | - | + +[[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_embedding_provider** +> EmbeddingProviderResponse get_embedding_provider(id) + +Get embedding provider + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import hotdata +from hotdata.models.embedding_provider_response import EmbeddingProviderResponse +from hotdata.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.hotdata.dev +# See configuration.py for a list of all supported configuration parameters. +configuration = hotdata.Configuration( + host = "https://app.hotdata.dev" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = hotdata.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with hotdata.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hotdata.EmbeddingProvidersApi(api_client) + id = 'id_example' # str | Embedding provider ID + + try: + # Get embedding provider + api_response = api_instance.get_embedding_provider(id) + print("The response of EmbeddingProvidersApi->get_embedding_provider:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EmbeddingProvidersApi->get_embedding_provider: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Embedding provider ID | + +### Return type + +[**EmbeddingProviderResponse**](EmbeddingProviderResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Embedding provider details | - | +**404** | Provider not found | - | + +[[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_embedding_providers** +> ListEmbeddingProvidersResponse list_embedding_providers() + +List embedding providers + +List all registered embedding providers. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import hotdata +from hotdata.models.list_embedding_providers_response import ListEmbeddingProvidersResponse +from hotdata.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.hotdata.dev +# See configuration.py for a list of all supported configuration parameters. +configuration = hotdata.Configuration( + host = "https://app.hotdata.dev" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = hotdata.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with hotdata.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hotdata.EmbeddingProvidersApi(api_client) + + try: + # List embedding providers + api_response = api_instance.list_embedding_providers() + print("The response of EmbeddingProvidersApi->list_embedding_providers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EmbeddingProvidersApi->list_embedding_providers: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ListEmbeddingProvidersResponse**](ListEmbeddingProvidersResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of embedding providers | - | + +[[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_embedding_provider** +> UpdateEmbeddingProviderResponse update_embedding_provider(id, update_embedding_provider_request) + +Update embedding provider + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import hotdata +from hotdata.models.update_embedding_provider_request import UpdateEmbeddingProviderRequest +from hotdata.models.update_embedding_provider_response import UpdateEmbeddingProviderResponse +from hotdata.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.hotdata.dev +# See configuration.py for a list of all supported configuration parameters. +configuration = hotdata.Configuration( + host = "https://app.hotdata.dev" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = hotdata.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with hotdata.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hotdata.EmbeddingProvidersApi(api_client) + id = 'id_example' # str | Embedding provider ID + update_embedding_provider_request = hotdata.UpdateEmbeddingProviderRequest() # UpdateEmbeddingProviderRequest | + + try: + # Update embedding provider + api_response = api_instance.update_embedding_provider(id, update_embedding_provider_request) + print("The response of EmbeddingProvidersApi->update_embedding_provider:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EmbeddingProvidersApi->update_embedding_provider: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Embedding provider ID | + **update_embedding_provider_request** | [**UpdateEmbeddingProviderRequest**](UpdateEmbeddingProviderRequest.md)| | + +### Return type + +[**UpdateEmbeddingProviderResponse**](UpdateEmbeddingProviderResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Embedding provider updated | - | +**404** | Provider not found | - | + +[[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 index 7311e5f..5a4119b 100644 --- a/docs/GetDatasetResponse.md +++ b/docs/GetDatasetResponse.md @@ -10,6 +10,8 @@ Name | Type | Description | Notes **created_at** | **datetime** | | **id** | **str** | | **label** | **str** | | +**latest_version** | **int** | | +**pinned_version** | **int** | | [optional] **schema_name** | **str** | | **source_type** | **str** | | **table_name** | **str** | | diff --git a/docs/IndexInfoResponse.md b/docs/IndexInfoResponse.md new file mode 100644 index 0000000..ef2c65b --- /dev/null +++ b/docs/IndexInfoResponse.md @@ -0,0 +1,36 @@ +# IndexInfoResponse + +Result payload for a `create_index` job, and response for index endpoints. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**columns** | **List[str]** | | +**created_at** | **datetime** | | +**index_name** | **str** | | +**index_type** | **str** | | +**metric** | **str** | Distance metric this index was built with. Only present for vector indexes. | [optional] +**status** | [**IndexStatus**](IndexStatus.md) | | +**updated_at** | **datetime** | | + +## Example + +```python +from hotdata.models.index_info_response import IndexInfoResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of IndexInfoResponse from a JSON string +index_info_response_instance = IndexInfoResponse.from_json(json) +# print the JSON string representation of the object +print(IndexInfoResponse.to_json()) + +# convert the object into a dict +index_info_response_dict = index_info_response_instance.to_dict() +# create an instance of IndexInfoResponse from a dict +index_info_response_from_dict = IndexInfoResponse.from_dict(index_info_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IndexStatus.md b/docs/IndexStatus.md new file mode 100644 index 0000000..129ccfb --- /dev/null +++ b/docs/IndexStatus.md @@ -0,0 +1,13 @@ +# IndexStatus + +Index build status exposed to API consumers. + +## Enum + +* `READY` (value: `'ready'`) + +* `PENDING` (value: `'pending'`) + +[[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 new file mode 100644 index 0000000..2d8b0b3 --- /dev/null +++ b/docs/IndexesApi.md @@ -0,0 +1,266 @@ +# hotdata.IndexesApi + +All URIs are relative to *https://app.hotdata.dev* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_index**](IndexesApi.md#create_index) | **POST** /v1/connections/{connection_id}/tables/{schema}/{table}/indexes | Create an index on a table +[**delete_index**](IndexesApi.md#delete_index) | **DELETE** /v1/connections/{connection_id}/tables/{schema}/{table}/indexes/{index_name} | Delete an index +[**list_indexes**](IndexesApi.md#list_indexes) | **GET** /v1/connections/{connection_id}/tables/{schema}/{table}/indexes | List indexes on a table + + +# **create_index** +> IndexInfoResponse create_index(connection_id, var_schema, table, create_index_request) + +Create an index on a table + +Create a sorted or BM25 full-text index on a cached table. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import hotdata +from hotdata.models.create_index_request import CreateIndexRequest +from hotdata.models.index_info_response import IndexInfoResponse +from hotdata.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.hotdata.dev +# See configuration.py for a list of all supported configuration parameters. +configuration = hotdata.Configuration( + host = "https://app.hotdata.dev" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = hotdata.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with hotdata.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hotdata.IndexesApi(api_client) + connection_id = 'connection_id_example' # str | Connection identifier + var_schema = 'var_schema_example' # str | Schema name + table = 'table_example' # str | Table name + create_index_request = hotdata.CreateIndexRequest() # CreateIndexRequest | + + try: + # Create an index on a table + api_response = api_instance.create_index(connection_id, var_schema, table, create_index_request) + print("The response of IndexesApi->create_index:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexesApi->create_index: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **connection_id** | **str**| Connection identifier | + **var_schema** | **str**| Schema name | + **table** | **str**| Table name | + **create_index_request** | [**CreateIndexRequest**](CreateIndexRequest.md)| | + +### Return type + +[**IndexInfoResponse**](IndexInfoResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Index created | - | +**400** | Invalid request | - | +**404** | Table not found | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_index** +> delete_index(connection_id, var_schema, table, index_name) + +Delete an index + +Delete a specific index from a cached table. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import hotdata +from hotdata.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.hotdata.dev +# See configuration.py for a list of all supported configuration parameters. +configuration = hotdata.Configuration( + host = "https://app.hotdata.dev" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = hotdata.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with hotdata.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hotdata.IndexesApi(api_client) + connection_id = 'connection_id_example' # str | Connection identifier + var_schema = 'var_schema_example' # str | Schema name + table = 'table_example' # str | Table name + index_name = 'index_name_example' # str | Index name + + try: + # Delete an index + api_instance.delete_index(connection_id, var_schema, table, index_name) + except Exception as e: + print("Exception when calling IndexesApi->delete_index: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **connection_id** | **str**| Connection identifier | + **var_schema** | **str**| Schema name | + **table** | **str**| Table name | + **index_name** | **str**| Index name | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Index deleted | - | +**404** | Index not found | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_indexes** +> ListIndexesResponse list_indexes(connection_id, var_schema, table) + +List indexes on a table + +List all indexes created on a cached table. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import hotdata +from hotdata.models.list_indexes_response import ListIndexesResponse +from hotdata.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.hotdata.dev +# See configuration.py for a list of all supported configuration parameters. +configuration = hotdata.Configuration( + host = "https://app.hotdata.dev" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = hotdata.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with hotdata.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hotdata.IndexesApi(api_client) + connection_id = 'connection_id_example' # str | Connection identifier + var_schema = 'var_schema_example' # str | Schema name + table = 'table_example' # str | Table name + + try: + # List indexes on a table + api_response = api_instance.list_indexes(connection_id, var_schema, table) + print("The response of IndexesApi->list_indexes:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexesApi->list_indexes: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **connection_id** | **str**| Connection identifier | + **var_schema** | **str**| Schema name | + **table** | **str**| Table name | + +### Return type + +[**ListIndexesResponse**](ListIndexesResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Indexes listed | - | +**404** | Table not found | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/JobResult.md b/docs/JobResult.md new file mode 100644 index 0000000..4d72bb6 --- /dev/null +++ b/docs/JobResult.md @@ -0,0 +1,46 @@ +# JobResult + +Job-specific result payload. The shape depends on the job type. Null while the job is pending or running. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**connection_id** | **str** | | +**duration_ms** | **int** | | +**rows_synced** | **int** | | +**schema_name** | **str** | | +**table_name** | **str** | | +**warnings** | [**List[RefreshWarning]**](RefreshWarning.md) | | [optional] +**errors** | [**List[TableRefreshError]**](TableRefreshError.md) | | [optional] +**tables_failed** | **int** | | +**tables_refreshed** | **int** | | +**total_rows** | **int** | | +**columns** | **List[str]** | | +**created_at** | **datetime** | | +**index_name** | **str** | | +**index_type** | **str** | | +**metric** | **str** | Distance metric this index was built with. Only present for vector indexes. | [optional] +**status** | [**IndexStatus**](IndexStatus.md) | | +**updated_at** | **datetime** | | + +## Example + +```python +from hotdata.models.job_result import JobResult + +# TODO update the JSON string below +json = "{}" +# create an instance of JobResult from a JSON string +job_result_instance = JobResult.from_json(json) +# print the JSON string representation of the object +print(JobResult.to_json()) + +# convert the object into a dict +job_result_dict = job_result_instance.to_dict() +# create an instance of JobResult from a dict +job_result_from_dict = JobResult.from_dict(job_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/JobStatus.md b/docs/JobStatus.md new file mode 100644 index 0000000..f8f0402 --- /dev/null +++ b/docs/JobStatus.md @@ -0,0 +1,19 @@ +# JobStatus + +Current status of a background job. + +## Enum + +* `PENDING` (value: `'pending'`) + +* `RUNNING` (value: `'running'`) + +* `SUCCEEDED` (value: `'succeeded'`) + +* `PARTIALLY_SUCCEEDED` (value: `'partially_succeeded'`) + +* `FAILED` (value: `'failed'`) + +[[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/JobStatusResponse.md b/docs/JobStatusResponse.md new file mode 100644 index 0000000..1909ca0 --- /dev/null +++ b/docs/JobStatusResponse.md @@ -0,0 +1,37 @@ +# JobStatusResponse + +Response body for GET /v1/jobs/{id} + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attempts** | **int** | Number of execution attempts (including the current one). | +**completed_at** | **datetime** | | [optional] +**created_at** | **datetime** | | +**error_message** | **str** | Error or warning message. Set when status is `failed` or `partially_succeeded`. | [optional] +**id** | **str** | | +**job_type** | [**JobType**](JobType.md) | | +**result** | [**JobResult**](JobResult.md) | Job-specific result payload. Null while the job is pending or running. | [optional] +**status** | [**JobStatus**](JobStatus.md) | | + +## Example + +```python +from hotdata.models.job_status_response import JobStatusResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of JobStatusResponse from a JSON string +job_status_response_instance = JobStatusResponse.from_json(json) +# print the JSON string representation of the object +print(JobStatusResponse.to_json()) + +# convert the object into a dict +job_status_response_dict = job_status_response_instance.to_dict() +# create an instance of JobStatusResponse from a dict +job_status_response_from_dict = JobStatusResponse.from_dict(job_status_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/JobType.md b/docs/JobType.md new file mode 100644 index 0000000..c5905a4 --- /dev/null +++ b/docs/JobType.md @@ -0,0 +1,17 @@ +# JobType + +Background job types returned by the API. + +## Enum + +* `NOOP` (value: `'noop'`) + +* `DATA_REFRESH_TABLE` (value: `'data_refresh_table'`) + +* `DATA_REFRESH_CONNECTION` (value: `'data_refresh_connection'`) + +* `CREATE_INDEX` (value: `'create_index'`) + +[[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/JobsApi.md b/docs/JobsApi.md new file mode 100644 index 0000000..15ce309 --- /dev/null +++ b/docs/JobsApi.md @@ -0,0 +1,174 @@ +# hotdata.JobsApi + +All URIs are relative to *https://app.hotdata.dev* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_job**](JobsApi.md#get_job) | **GET** /v1/jobs/{id} | Get job status +[**list_jobs**](JobsApi.md#list_jobs) | **GET** /v1/jobs | List jobs + + +# **get_job** +> JobStatusResponse get_job(id) + +Get job status + +Get the current status of a background job. Poll this endpoint to track job progress. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import hotdata +from hotdata.models.job_status_response import JobStatusResponse +from hotdata.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.hotdata.dev +# See configuration.py for a list of all supported configuration parameters. +configuration = hotdata.Configuration( + host = "https://app.hotdata.dev" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = hotdata.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with hotdata.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hotdata.JobsApi(api_client) + id = 'id_example' # str | Job ID + + try: + # Get job status + api_response = api_instance.get_job(id) + print("The response of JobsApi->get_job:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling JobsApi->get_job: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Job ID | + +### Return type + +[**JobStatusResponse**](JobStatusResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Job status | - | +**404** | Job not found | - | + +[[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_jobs** +> ListJobsResponse list_jobs(job_type=job_type, status=status, limit=limit, offset=offset) + +List jobs + +List background jobs with optional filters by type and status. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import hotdata +from hotdata.models.job_type import JobType +from hotdata.models.list_jobs_response import ListJobsResponse +from hotdata.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.hotdata.dev +# See configuration.py for a list of all supported configuration parameters. +configuration = hotdata.Configuration( + host = "https://app.hotdata.dev" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = hotdata.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with hotdata.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hotdata.JobsApi(api_client) + job_type = hotdata.JobType() # JobType | Filter by job type (optional) + status = 'status_example' # str | Filter by status (comma-separated, e.g. status=pending,running) (optional) + limit = 56 # int | Max results (default 50) (optional) + offset = 56 # int | Offset for pagination (optional) + + try: + # List jobs + api_response = api_instance.list_jobs(job_type=job_type, status=status, limit=limit, offset=offset) + print("The response of JobsApi->list_jobs:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling JobsApi->list_jobs: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **job_type** | [**JobType**](.md)| Filter by job type | [optional] + **status** | **str**| Filter by status (comma-separated, e.g. status=pending,running) | [optional] + **limit** | **int**| Max results (default 50) | [optional] + **offset** | **int**| Offset for pagination | [optional] + +### Return type + +[**ListJobsResponse**](ListJobsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of jobs | - | + +[[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/ListConnectionTypesResponse.md b/docs/ListConnectionTypesResponse.md new file mode 100644 index 0000000..30ec854 --- /dev/null +++ b/docs/ListConnectionTypesResponse.md @@ -0,0 +1,29 @@ +# ListConnectionTypesResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**connection_types** | [**List[ConnectionTypeSummary]**](ConnectionTypeSummary.md) | | + +## Example + +```python +from hotdata.models.list_connection_types_response import ListConnectionTypesResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListConnectionTypesResponse from a JSON string +list_connection_types_response_instance = ListConnectionTypesResponse.from_json(json) +# print the JSON string representation of the object +print(ListConnectionTypesResponse.to_json()) + +# convert the object into a dict +list_connection_types_response_dict = list_connection_types_response_instance.to_dict() +# create an instance of ListConnectionTypesResponse from a dict +list_connection_types_response_from_dict = ListConnectionTypesResponse.from_dict(list_connection_types_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListDatasetVersionsResponse.md b/docs/ListDatasetVersionsResponse.md new file mode 100644 index 0000000..389e9cf --- /dev/null +++ b/docs/ListDatasetVersionsResponse.md @@ -0,0 +1,35 @@ +# ListDatasetVersionsResponse + +Response body for GET /v1/datasets/{id}/versions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | | +**dataset_id** | **str** | | +**has_more** | **bool** | | +**limit** | **int** | | +**offset** | **int** | | +**versions** | [**List[DatasetVersionSummary]**](DatasetVersionSummary.md) | | + +## Example + +```python +from hotdata.models.list_dataset_versions_response import ListDatasetVersionsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListDatasetVersionsResponse from a JSON string +list_dataset_versions_response_instance = ListDatasetVersionsResponse.from_json(json) +# print the JSON string representation of the object +print(ListDatasetVersionsResponse.to_json()) + +# convert the object into a dict +list_dataset_versions_response_dict = list_dataset_versions_response_instance.to_dict() +# create an instance of ListDatasetVersionsResponse from a dict +list_dataset_versions_response_from_dict = ListDatasetVersionsResponse.from_dict(list_dataset_versions_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListEmbeddingProvidersResponse.md b/docs/ListEmbeddingProvidersResponse.md new file mode 100644 index 0000000..ce1fa74 --- /dev/null +++ b/docs/ListEmbeddingProvidersResponse.md @@ -0,0 +1,30 @@ +# ListEmbeddingProvidersResponse + +Response body for GET /embedding-providers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**embedding_providers** | [**List[EmbeddingProviderResponse]**](EmbeddingProviderResponse.md) | | + +## Example + +```python +from hotdata.models.list_embedding_providers_response import ListEmbeddingProvidersResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListEmbeddingProvidersResponse from a JSON string +list_embedding_providers_response_instance = ListEmbeddingProvidersResponse.from_json(json) +# print the JSON string representation of the object +print(ListEmbeddingProvidersResponse.to_json()) + +# convert the object into a dict +list_embedding_providers_response_dict = list_embedding_providers_response_instance.to_dict() +# create an instance of ListEmbeddingProvidersResponse from a dict +list_embedding_providers_response_from_dict = ListEmbeddingProvidersResponse.from_dict(list_embedding_providers_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListIndexesResponse.md b/docs/ListIndexesResponse.md new file mode 100644 index 0000000..a78b6e3 --- /dev/null +++ b/docs/ListIndexesResponse.md @@ -0,0 +1,30 @@ +# ListIndexesResponse + +Response body for GET .../indexes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**indexes** | [**List[IndexInfoResponse]**](IndexInfoResponse.md) | | + +## Example + +```python +from hotdata.models.list_indexes_response import ListIndexesResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListIndexesResponse from a JSON string +list_indexes_response_instance = ListIndexesResponse.from_json(json) +# print the JSON string representation of the object +print(ListIndexesResponse.to_json()) + +# convert the object into a dict +list_indexes_response_dict = list_indexes_response_instance.to_dict() +# create an instance of ListIndexesResponse from a dict +list_indexes_response_from_dict = ListIndexesResponse.from_dict(list_indexes_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListJobsResponse.md b/docs/ListJobsResponse.md new file mode 100644 index 0000000..18e3766 --- /dev/null +++ b/docs/ListJobsResponse.md @@ -0,0 +1,30 @@ +# ListJobsResponse + +Response body for GET /v1/jobs + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**jobs** | [**List[JobStatusResponse]**](JobStatusResponse.md) | | + +## Example + +```python +from hotdata.models.list_jobs_response import ListJobsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListJobsResponse from a JSON string +list_jobs_response_instance = ListJobsResponse.from_json(json) +# print the JSON string representation of the object +print(ListJobsResponse.to_json()) + +# convert the object into a dict +list_jobs_response_dict = list_jobs_response_instance.to_dict() +# create an instance of ListJobsResponse from a dict +list_jobs_response_from_dict = ListJobsResponse.from_dict(list_jobs_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/QueryApi.md b/docs/QueryApi.md index 1d3555d..9745412 100644 --- a/docs/QueryApi.md +++ b/docs/QueryApi.md @@ -14,6 +14,8 @@ Execute SQL query Execute a SQL query against all registered connections and datasets. Use standard Postgres-compatible SQL to reference tables from any connection using the format `connection_name.schema.table`. Results are returned inline and a `result_id` is provided for later retrieval via the Results API. +Set `async: true` to execute asynchronously — returns a query run ID for polling. Optionally set `async_after_ms` to attempt synchronous execution first, falling back to async if the query exceeds the timeout. + ### Example * Bearer Authentication (BearerAuth): @@ -83,6 +85,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Query executed successfully | - | +**202** | Query submitted asynchronously | - | **400** | Invalid request | - | **500** | Internal server error | - | diff --git a/docs/QueryRequest.md b/docs/QueryRequest.md index 7722fb8..9b36875 100644 --- a/docs/QueryRequest.md +++ b/docs/QueryRequest.md @@ -6,6 +6,8 @@ Request body for POST /query Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**var_async** | **bool** | When true, execute the query asynchronously and return a query run ID for polling via GET /query-runs/{id}. The query results can be retrieved via GET /results/{id} once the query run status is \"succeeded\". | [optional] +**async_after_ms** | **int** | If set with async=true, wait up to this many milliseconds for the query to complete synchronously before returning an async response. Minimum 1000ms. Ignored if async is false. | [optional] **sql** | **str** | | ## Example diff --git a/docs/QueryRunInfo.md b/docs/QueryRunInfo.md index 2b02c89..2fb0b39 100644 --- a/docs/QueryRunInfo.md +++ b/docs/QueryRunInfo.md @@ -15,11 +15,13 @@ Name | Type | Description | Notes **row_count** | **int** | | [optional] **saved_query_id** | **str** | | [optional] **saved_query_version** | **int** | | [optional] +**server_processing_ms** | **int** | Total server-side processing time for this query (milliseconds). Measured from query start to result ready. Includes SQL execution, task spawning, and result preparation. Does not include network transit. Populated for all completed query runs (sync and async). | [optional] **snapshot_id** | **str** | | **sql_hash** | **str** | | **sql_text** | **str** | | **status** | **str** | | **trace_id** | **str** | | [optional] +**user_public_id** | **str** | Caller identity derived from the Authorization Bearer token (SHA-256 hash). Format: `user_{first_10_hex_chars}`. Mirrors the webapp's `user_public_id_from_auth_header`. | [optional] **warning_message** | **str** | | [optional] ## Example diff --git a/docs/QueryRunsApi.md b/docs/QueryRunsApi.md index 42f06e8..b0a4ed6 100644 --- a/docs/QueryRunsApi.md +++ b/docs/QueryRunsApi.md @@ -4,11 +4,91 @@ All URIs are relative to *https://app.hotdata.dev* Method | HTTP request | Description ------------- | ------------- | ------------- +[**get_query_run**](QueryRunsApi.md#get_query_run) | **GET** /v1/query-runs/{id} | Get query run [**list_query_runs**](QueryRunsApi.md#list_query_runs) | **GET** /v1/query-runs | List query runs +# **get_query_run** +> QueryRunInfo get_query_run(id) + +Get query run + +Get the status and details of a specific query run by ID. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import hotdata +from hotdata.models.query_run_info import QueryRunInfo +from hotdata.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.hotdata.dev +# See configuration.py for a list of all supported configuration parameters. +configuration = hotdata.Configuration( + host = "https://app.hotdata.dev" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = hotdata.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with hotdata.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hotdata.QueryRunsApi(api_client) + id = 'id_example' # str | Query run ID + + try: + # Get query run + api_response = api_instance.get_query_run(id) + print("The response of QueryRunsApi->get_query_run:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling QueryRunsApi->get_query_run: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Query run ID | + +### Return type + +[**QueryRunInfo**](QueryRunInfo.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Query run details | - | +**404** | Query run not found | - | + +[[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_query_runs** -> ListQueryRunsResponse list_query_runs(limit=limit, cursor=cursor) +> ListQueryRunsResponse list_query_runs(limit=limit, cursor=cursor, status=status, saved_query_id=saved_query_id) List query runs @@ -44,10 +124,12 @@ with hotdata.ApiClient(configuration) as api_client: api_instance = hotdata.QueryRunsApi(api_client) limit = 56 # int | Maximum number of results (optional) cursor = 'cursor_example' # str | Pagination cursor (optional) + status = 'status_example' # str | Filter by status (comma-separated, e.g. status=running,failed) (optional) + saved_query_id = 'saved_query_id_example' # str | Filter by saved query ID (optional) try: # List query runs - api_response = api_instance.list_query_runs(limit=limit, cursor=cursor) + api_response = api_instance.list_query_runs(limit=limit, cursor=cursor, status=status, saved_query_id=saved_query_id) print("The response of QueryRunsApi->list_query_runs:\n") pprint(api_response) except Exception as e: @@ -63,6 +145,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **int**| Maximum number of results | [optional] **cursor** | **str**| Pagination cursor | [optional] + **status** | **str**| Filter by status (comma-separated, e.g. status=running,failed) | [optional] + **saved_query_id** | **str**| Filter by saved query ID | [optional] ### Return type diff --git a/docs/RefreshApi.md b/docs/RefreshApi.md index 40eef37..32a81b3 100644 --- a/docs/RefreshApi.md +++ b/docs/RefreshApi.md @@ -19,6 +19,8 @@ Refresh schema metadata or table data. The behavior depends on the request field - **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. + ### Example * Bearer Authentication (BearerAuth): diff --git a/docs/RefreshDatasetResponse.md b/docs/RefreshDatasetResponse.md new file mode 100644 index 0000000..ee54afa --- /dev/null +++ b/docs/RefreshDatasetResponse.md @@ -0,0 +1,33 @@ +# RefreshDatasetResponse + +Response body for POST /v1/datasets/{id}/refresh + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **datetime** | | +**id** | **str** | | +**status** | **str** | | +**version** | **int** | | + +## Example + +```python +from hotdata.models.refresh_dataset_response import RefreshDatasetResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of RefreshDatasetResponse from a JSON string +refresh_dataset_response_instance = RefreshDatasetResponse.from_json(json) +# print the JSON string representation of the object +print(RefreshDatasetResponse.to_json()) + +# convert the object into a dict +refresh_dataset_response_dict = refresh_dataset_response_instance.to_dict() +# create an instance of RefreshDatasetResponse from a dict +refresh_dataset_response_from_dict = RefreshDatasetResponse.from_dict(refresh_dataset_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RefreshRequest.md b/docs/RefreshRequest.md index 379afa5..35d1e5d 100644 --- a/docs/RefreshRequest.md +++ b/docs/RefreshRequest.md @@ -6,8 +6,10 @@ Request body for POST /refresh Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**var_async** | **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** | **str** | | [optional] **data** | **bool** | | [optional] +**dataset_id** | **str** | | [optional] **include_uncached** | **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** | **str** | | [optional] **table_name** | **str** | | [optional] diff --git a/docs/RefreshResponse.md b/docs/RefreshResponse.md index 655260f..8f543e6 100644 --- a/docs/RefreshResponse.md +++ b/docs/RefreshResponse.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **connections_failed** | **int** | | **connections_refreshed** | **int** | | -**errors** | [**List[TableRefreshError]**](TableRefreshError.md) | | +**errors** | [**List[TableRefreshError]**](TableRefreshError.md) | | [optional] **tables_added** | **int** | | **tables_discovered** | **int** | | **tables_modified** | **int** | | @@ -21,6 +21,11 @@ Name | Type | Description | Notes **tables_failed** | **int** | | **tables_refreshed** | **int** | | **total_rows** | **int** | | +**created_at** | **datetime** | | +**id** | **str** | Job ID for status polling. | +**status** | [**JobStatus**](JobStatus.md) | Current status of the submitted job. | +**version** | **int** | | +**status_url** | **str** | URL to poll for job status. | ## Example diff --git a/docs/SavedQueryDatasetSource.md b/docs/SavedQueryDatasetSource.md new file mode 100644 index 0000000..f38f50d --- /dev/null +++ b/docs/SavedQueryDatasetSource.md @@ -0,0 +1,31 @@ +# SavedQueryDatasetSource + +Create dataset from a saved query result + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**saved_query_id** | **str** | | +**version** | **int** | | [optional] + +## Example + +```python +from hotdata.models.saved_query_dataset_source import SavedQueryDatasetSource + +# TODO update the JSON string below +json = "{}" +# create an instance of SavedQueryDatasetSource from a JSON string +saved_query_dataset_source_instance = SavedQueryDatasetSource.from_json(json) +# print the JSON string representation of the object +print(SavedQueryDatasetSource.to_json()) + +# convert the object into a dict +saved_query_dataset_source_dict = saved_query_dataset_source_instance.to_dict() +# create an instance of SavedQueryDatasetSource from a dict +saved_query_dataset_source_from_dict = SavedQueryDatasetSource.from_dict(saved_query_dataset_source_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SqlQueryDatasetSource.md b/docs/SqlQueryDatasetSource.md new file mode 100644 index 0000000..4893a86 --- /dev/null +++ b/docs/SqlQueryDatasetSource.md @@ -0,0 +1,32 @@ +# SqlQueryDatasetSource + +Create dataset from a SQL query (auto-creates a saved query) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | Optional description for the auto-created saved query. | [optional] +**name** | **str** | Optional name for the auto-created saved query. Defaults to the dataset label. | [optional] +**sql** | **str** | | + +## Example + +```python +from hotdata.models.sql_query_dataset_source import SqlQueryDatasetSource + +# TODO update the JSON string below +json = "{}" +# create an instance of SqlQueryDatasetSource from a JSON string +sql_query_dataset_source_instance = SqlQueryDatasetSource.from_json(json) +# print the JSON string representation of the object +print(SqlQueryDatasetSource.to_json()) + +# convert the object into a dict +sql_query_dataset_source_dict = sql_query_dataset_source_instance.to_dict() +# create an instance of SqlQueryDatasetSource from a dict +sql_query_dataset_source_from_dict = SqlQueryDatasetSource.from_dict(sql_query_dataset_source_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubmitJobResponse.md b/docs/SubmitJobResponse.md new file mode 100644 index 0000000..00695ad --- /dev/null +++ b/docs/SubmitJobResponse.md @@ -0,0 +1,32 @@ +# SubmitJobResponse + +Response returned by APIs that submit a background job (e.g., async refresh). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Job ID for status polling. | +**status** | [**JobStatus**](JobStatus.md) | Current status of the submitted job. | +**status_url** | **str** | URL to poll for job status. | + +## Example + +```python +from hotdata.models.submit_job_response import SubmitJobResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of SubmitJobResponse from a JSON string +submit_job_response_instance = SubmitJobResponse.from_json(json) +# print the JSON string representation of the object +print(SubmitJobResponse.to_json()) + +# convert the object into a dict +submit_job_response_dict = submit_job_response_instance.to_dict() +# create an instance of SubmitJobResponse from a dict +submit_job_response_from_dict = SubmitJobResponse.from_dict(submit_job_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TableRefreshError.md b/docs/TableRefreshError.md index 7965b2d..a035047 100644 --- a/docs/TableRefreshError.md +++ b/docs/TableRefreshError.md @@ -1,6 +1,6 @@ # TableRefreshError -Error details for a failed table refresh +Error details for a failed table refresh. ## Properties diff --git a/docs/TableRefreshResult.md b/docs/TableRefreshResult.md index 81693dd..f6b7bb7 100644 --- a/docs/TableRefreshResult.md +++ b/docs/TableRefreshResult.md @@ -1,6 +1,6 @@ # TableRefreshResult -Response for single table data refresh +Result payload for a `data_refresh_table` job. ## Properties diff --git a/docs/UpdateDatasetRequest.md b/docs/UpdateDatasetRequest.md index a97fab5..fe72f0d 100644 --- a/docs/UpdateDatasetRequest.md +++ b/docs/UpdateDatasetRequest.md @@ -7,6 +7,7 @@ Request body for PUT /v1/datasets/{id} Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **label** | **str** | | [optional] +**pinned_version** | **int** | Pin to a specific version, or send null to unpin. Omit the field entirely to leave pinning unchanged. | [optional] **table_name** | **str** | | [optional] ## Example diff --git a/docs/UpdateDatasetResponse.md b/docs/UpdateDatasetResponse.md index 58884d8..c46d24f 100644 --- a/docs/UpdateDatasetResponse.md +++ b/docs/UpdateDatasetResponse.md @@ -8,6 +8,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | | **label** | **str** | | +**latest_version** | **int** | | +**pinned_version** | **int** | | [optional] **table_name** | **str** | | **updated_at** | **datetime** | | diff --git a/docs/UpdateEmbeddingProviderRequest.md b/docs/UpdateEmbeddingProviderRequest.md new file mode 100644 index 0000000..46445d7 --- /dev/null +++ b/docs/UpdateEmbeddingProviderRequest.md @@ -0,0 +1,33 @@ +# UpdateEmbeddingProviderRequest + +Request body for PUT /embedding-providers/{id} + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_key** | **str** | Inline API key. If provided, updates (or creates) the auto-managed secret. | [optional] +**config** | **object** | | [optional] +**name** | **str** | | [optional] +**secret_name** | **str** | Secret name containing the API key. Pass null to clear. | [optional] + +## Example + +```python +from hotdata.models.update_embedding_provider_request import UpdateEmbeddingProviderRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateEmbeddingProviderRequest from a JSON string +update_embedding_provider_request_instance = UpdateEmbeddingProviderRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateEmbeddingProviderRequest.to_json()) + +# convert the object into a dict +update_embedding_provider_request_dict = update_embedding_provider_request_instance.to_dict() +# create an instance of UpdateEmbeddingProviderRequest from a dict +update_embedding_provider_request_from_dict = UpdateEmbeddingProviderRequest.from_dict(update_embedding_provider_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateEmbeddingProviderResponse.md b/docs/UpdateEmbeddingProviderResponse.md new file mode 100644 index 0000000..c72c6b7 --- /dev/null +++ b/docs/UpdateEmbeddingProviderResponse.md @@ -0,0 +1,32 @@ +# UpdateEmbeddingProviderResponse + +Response body for PUT /embedding-providers/{id} + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**updated_at** | **datetime** | | + +## Example + +```python +from hotdata.models.update_embedding_provider_response import UpdateEmbeddingProviderResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateEmbeddingProviderResponse from a JSON string +update_embedding_provider_response_instance = UpdateEmbeddingProviderResponse.from_json(json) +# print the JSON string representation of the object +print(UpdateEmbeddingProviderResponse.to_json()) + +# convert the object into a dict +update_embedding_provider_response_dict = update_embedding_provider_response_instance.to_dict() +# create an instance of UpdateEmbeddingProviderResponse from a dict +update_embedding_provider_response_from_dict = UpdateEmbeddingProviderResponse.from_dict(update_embedding_provider_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UploadsApi.md b/docs/UploadsApi.md index 432faeb..2ab0006 100644 --- a/docs/UploadsApi.md +++ b/docs/UploadsApi.md @@ -85,11 +85,11 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **upload_file** -> UploadResponse upload_file(request_body) +> UploadResponse upload_file(request_body, streaming=streaming) 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 returned upload ID can be passed to POST /v1/datasets to create a queryable table. +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 returned upload ID can be passed to POST /v1/datasets to create a queryable table. Add `?streaming=true` for large files (up to 20GB) — streams to disk instead of loading into memory. ### Example @@ -122,10 +122,11 @@ with hotdata.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = hotdata.UploadsApi(api_client) request_body = [56] # List[int] | + streaming = True # bool | Stream upload to disk for large files (up to 20GB) (optional) try: # Upload file - api_response = api_instance.upload_file(request_body) + api_response = api_instance.upload_file(request_body, streaming=streaming) print("The response of UploadsApi->upload_file:\n") pprint(api_response) except Exception as e: @@ -140,6 +141,7 @@ with hotdata.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **request_body** | [**List[int]**](int.md)| | + **streaming** | **bool**| Stream upload to disk for large files (up to 20GB) | [optional] ### Return type diff --git a/docs/UrlDatasetSource.md b/docs/UrlDatasetSource.md new file mode 100644 index 0000000..2a28494 --- /dev/null +++ b/docs/UrlDatasetSource.md @@ -0,0 +1,32 @@ +# UrlDatasetSource + +Create dataset from an external HTTP URL + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**columns** | **Dict[str, str]** | Optional explicit column definitions. Keys are column names, values are type specs. | [optional] +**format** | **str** | | [optional] +**url** | **str** | | + +## Example + +```python +from hotdata.models.url_dataset_source import UrlDatasetSource + +# TODO update the JSON string below +json = "{}" +# create an instance of UrlDatasetSource from a JSON string +url_dataset_source_instance = UrlDatasetSource.from_json(json) +# print the JSON string representation of the object +print(UrlDatasetSource.to_json()) + +# convert the object into a dict +url_dataset_source_dict = url_dataset_source_instance.to_dict() +# create an instance of UrlDatasetSource from a dict +url_dataset_source_from_dict = UrlDatasetSource.from_dict(url_dataset_source_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/hotdata/__init__.py b/hotdata/__init__.py index 9f720a1..78648cc 100644 --- a/hotdata/__init__.py +++ b/hotdata/__init__.py @@ -3,7 +3,7 @@ # flake8: noqa """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -19,9 +19,13 @@ # Define package exports __all__ = [ + "ConnectionTypesApi", "ConnectionsApi", "DatasetsApi", + "EmbeddingProvidersApi", + "IndexesApi", "InformationSchemaApi", + "JobsApi", "QueryApi", "QueryRunsApi", "RefreshApi", @@ -41,6 +45,7 @@ "ApiException", "ApiErrorDetail", "ApiErrorResponse", + "AsyncQueryResponse", "BooleanProfileDetail", "CategoricalProfileDetail", "CategoryValueInfo", @@ -57,10 +62,15 @@ "ConnectionInfo", "ConnectionRefreshResult", "ConnectionSchemaError", + "ConnectionTypeDetail", + "ConnectionTypeSummary", "CreateConnectionRequest", "CreateConnectionResponse", "CreateDatasetRequest", "CreateDatasetResponse", + "CreateEmbeddingProviderRequest", + "CreateEmbeddingProviderResponse", + "CreateIndexRequest", "CreateSavedQueryRequest", "CreateSecretRequest", "CreateSecretResponse", @@ -68,18 +78,31 @@ "CreateWorkspaceResponse", "DatasetSource", "DatasetSummary", + "DatasetVersionSummary", "DiscoveryStatus", + "EmbeddingProviderResponse", "Error", "ExecuteSavedQueryRequest", "GetConnectionResponse", "GetDatasetResponse", "GetResultResponse", "GetSecretResponse", + "IndexInfoResponse", + "IndexStatus", "InformationSchemaResponse", "InlineData", "InlineDatasetSource", + "JobResult", + "JobStatus", + "JobStatusResponse", + "JobType", + "ListConnectionTypesResponse", "ListConnectionsResponse", + "ListDatasetVersionsResponse", "ListDatasetsResponse", + "ListEmbeddingProvidersResponse", + "ListIndexesResponse", + "ListJobsResponse", "ListQueryRunsResponse", "ListResultsResponse", "ListSavedQueriesResponse", @@ -91,15 +114,19 @@ "QueryRequest", "QueryResponse", "QueryRunInfo", + "RefreshDatasetResponse", "RefreshRequest", "RefreshResponse", "RefreshWarning", "ResultInfo", + "SavedQueryDatasetSource", "SavedQueryDetail", "SavedQuerySummary", "SavedQueryVersionInfo", "SchemaRefreshResult", "SecretMetadataResponse", + "SqlQueryDatasetSource", + "SubmitJobResponse", "TableInfo", "TableProfileResponse", "TableRefreshError", @@ -108,20 +135,27 @@ "TextProfileDetail", "UpdateDatasetRequest", "UpdateDatasetResponse", + "UpdateEmbeddingProviderRequest", + "UpdateEmbeddingProviderResponse", "UpdateSavedQueryRequest", "UpdateSecretRequest", "UpdateSecretResponse", "UploadDatasetSource", "UploadInfo", "UploadResponse", + "UrlDatasetSource", "WorkspaceDetail", "WorkspaceListItem", ] # import apis into sdk package +from hotdata.api.connection_types_api import ConnectionTypesApi as ConnectionTypesApi from hotdata.api.connections_api import ConnectionsApi as ConnectionsApi from hotdata.api.datasets_api import DatasetsApi as DatasetsApi +from hotdata.api.embedding_providers_api import EmbeddingProvidersApi as EmbeddingProvidersApi +from hotdata.api.indexes_api import IndexesApi as IndexesApi from hotdata.api.information_schema_api import InformationSchemaApi as InformationSchemaApi +from hotdata.api.jobs_api import JobsApi as JobsApi from hotdata.api.query_api import QueryApi as QueryApi from hotdata.api.query_runs_api import QueryRunsApi as QueryRunsApi from hotdata.api.refresh_api import RefreshApi as RefreshApi @@ -145,6 +179,7 @@ # import models into sdk package from hotdata.models.api_error_detail import ApiErrorDetail as ApiErrorDetail from hotdata.models.api_error_response import ApiErrorResponse as ApiErrorResponse +from hotdata.models.async_query_response import AsyncQueryResponse as AsyncQueryResponse from hotdata.models.boolean_profile_detail import BooleanProfileDetail as BooleanProfileDetail from hotdata.models.categorical_profile_detail import CategoricalProfileDetail as CategoricalProfileDetail from hotdata.models.category_value_info import CategoryValueInfo as CategoryValueInfo @@ -161,10 +196,15 @@ from hotdata.models.connection_info import ConnectionInfo as ConnectionInfo from hotdata.models.connection_refresh_result import ConnectionRefreshResult as ConnectionRefreshResult from hotdata.models.connection_schema_error import ConnectionSchemaError as ConnectionSchemaError +from hotdata.models.connection_type_detail import ConnectionTypeDetail as ConnectionTypeDetail +from hotdata.models.connection_type_summary import ConnectionTypeSummary as ConnectionTypeSummary from hotdata.models.create_connection_request import CreateConnectionRequest as CreateConnectionRequest from hotdata.models.create_connection_response import CreateConnectionResponse as CreateConnectionResponse from hotdata.models.create_dataset_request import CreateDatasetRequest as CreateDatasetRequest from hotdata.models.create_dataset_response import CreateDatasetResponse as CreateDatasetResponse +from hotdata.models.create_embedding_provider_request import CreateEmbeddingProviderRequest as CreateEmbeddingProviderRequest +from hotdata.models.create_embedding_provider_response import CreateEmbeddingProviderResponse as CreateEmbeddingProviderResponse +from hotdata.models.create_index_request import CreateIndexRequest as CreateIndexRequest from hotdata.models.create_saved_query_request import CreateSavedQueryRequest as CreateSavedQueryRequest from hotdata.models.create_secret_request import CreateSecretRequest as CreateSecretRequest from hotdata.models.create_secret_response import CreateSecretResponse as CreateSecretResponse @@ -172,18 +212,31 @@ from hotdata.models.create_workspace_response import CreateWorkspaceResponse as CreateWorkspaceResponse from hotdata.models.dataset_source import DatasetSource as DatasetSource from hotdata.models.dataset_summary import DatasetSummary as DatasetSummary +from hotdata.models.dataset_version_summary import DatasetVersionSummary as DatasetVersionSummary from hotdata.models.discovery_status import DiscoveryStatus as DiscoveryStatus +from hotdata.models.embedding_provider_response import EmbeddingProviderResponse as EmbeddingProviderResponse from hotdata.models.error import Error as Error from hotdata.models.execute_saved_query_request import ExecuteSavedQueryRequest as ExecuteSavedQueryRequest from hotdata.models.get_connection_response import GetConnectionResponse as GetConnectionResponse from hotdata.models.get_dataset_response import GetDatasetResponse as GetDatasetResponse from hotdata.models.get_result_response import GetResultResponse as GetResultResponse from hotdata.models.get_secret_response import GetSecretResponse as GetSecretResponse +from hotdata.models.index_info_response import IndexInfoResponse as IndexInfoResponse +from hotdata.models.index_status import IndexStatus as IndexStatus from hotdata.models.information_schema_response import InformationSchemaResponse as InformationSchemaResponse from hotdata.models.inline_data import InlineData as InlineData from hotdata.models.inline_dataset_source import InlineDatasetSource as InlineDatasetSource +from hotdata.models.job_result import JobResult as JobResult +from hotdata.models.job_status import JobStatus as JobStatus +from hotdata.models.job_status_response import JobStatusResponse as JobStatusResponse +from hotdata.models.job_type import JobType as JobType +from hotdata.models.list_connection_types_response import ListConnectionTypesResponse as ListConnectionTypesResponse from hotdata.models.list_connections_response import ListConnectionsResponse as ListConnectionsResponse +from hotdata.models.list_dataset_versions_response import ListDatasetVersionsResponse as ListDatasetVersionsResponse from hotdata.models.list_datasets_response import ListDatasetsResponse as ListDatasetsResponse +from hotdata.models.list_embedding_providers_response import ListEmbeddingProvidersResponse as ListEmbeddingProvidersResponse +from hotdata.models.list_indexes_response import ListIndexesResponse as ListIndexesResponse +from hotdata.models.list_jobs_response import ListJobsResponse as ListJobsResponse from hotdata.models.list_query_runs_response import ListQueryRunsResponse as ListQueryRunsResponse from hotdata.models.list_results_response import ListResultsResponse as ListResultsResponse from hotdata.models.list_saved_queries_response import ListSavedQueriesResponse as ListSavedQueriesResponse @@ -195,15 +248,19 @@ from hotdata.models.query_request import QueryRequest as QueryRequest from hotdata.models.query_response import QueryResponse as QueryResponse from hotdata.models.query_run_info import QueryRunInfo as QueryRunInfo +from hotdata.models.refresh_dataset_response import RefreshDatasetResponse as RefreshDatasetResponse from hotdata.models.refresh_request import RefreshRequest as RefreshRequest from hotdata.models.refresh_response import RefreshResponse as RefreshResponse from hotdata.models.refresh_warning import RefreshWarning as RefreshWarning from hotdata.models.result_info import ResultInfo as ResultInfo +from hotdata.models.saved_query_dataset_source import SavedQueryDatasetSource as SavedQueryDatasetSource from hotdata.models.saved_query_detail import SavedQueryDetail as SavedQueryDetail from hotdata.models.saved_query_summary import SavedQuerySummary as SavedQuerySummary from hotdata.models.saved_query_version_info import SavedQueryVersionInfo as SavedQueryVersionInfo from hotdata.models.schema_refresh_result import SchemaRefreshResult as SchemaRefreshResult from hotdata.models.secret_metadata_response import SecretMetadataResponse as SecretMetadataResponse +from hotdata.models.sql_query_dataset_source import SqlQueryDatasetSource as SqlQueryDatasetSource +from hotdata.models.submit_job_response import SubmitJobResponse as SubmitJobResponse from hotdata.models.table_info import TableInfo as TableInfo from hotdata.models.table_profile_response import TableProfileResponse as TableProfileResponse from hotdata.models.table_refresh_error import TableRefreshError as TableRefreshError @@ -212,12 +269,15 @@ from hotdata.models.text_profile_detail import TextProfileDetail as TextProfileDetail from hotdata.models.update_dataset_request import UpdateDatasetRequest as UpdateDatasetRequest from hotdata.models.update_dataset_response import UpdateDatasetResponse as UpdateDatasetResponse +from hotdata.models.update_embedding_provider_request import UpdateEmbeddingProviderRequest as UpdateEmbeddingProviderRequest +from hotdata.models.update_embedding_provider_response import UpdateEmbeddingProviderResponse as UpdateEmbeddingProviderResponse from hotdata.models.update_saved_query_request import UpdateSavedQueryRequest as UpdateSavedQueryRequest from hotdata.models.update_secret_request import UpdateSecretRequest as UpdateSecretRequest from hotdata.models.update_secret_response import UpdateSecretResponse as UpdateSecretResponse from hotdata.models.upload_dataset_source import UploadDatasetSource as UploadDatasetSource from hotdata.models.upload_info import UploadInfo as UploadInfo from hotdata.models.upload_response import UploadResponse as UploadResponse +from hotdata.models.url_dataset_source import UrlDatasetSource as UrlDatasetSource from hotdata.models.workspace_detail import WorkspaceDetail as WorkspaceDetail from hotdata.models.workspace_list_item import WorkspaceListItem as WorkspaceListItem diff --git a/hotdata/api/__init__.py b/hotdata/api/__init__.py index b901c79..7a4fb19 100644 --- a/hotdata/api/__init__.py +++ b/hotdata/api/__init__.py @@ -1,9 +1,13 @@ # flake8: noqa # import apis into api package +from hotdata.api.connection_types_api import ConnectionTypesApi from hotdata.api.connections_api import ConnectionsApi from hotdata.api.datasets_api import DatasetsApi +from hotdata.api.embedding_providers_api import EmbeddingProvidersApi +from hotdata.api.indexes_api import IndexesApi from hotdata.api.information_schema_api import InformationSchemaApi +from hotdata.api.jobs_api import JobsApi from hotdata.api.query_api import QueryApi from hotdata.api.query_runs_api import QueryRunsApi from hotdata.api.refresh_api import RefreshApi diff --git a/hotdata/api/connection_types_api.py b/hotdata/api/connection_types_api.py new file mode 100644 index 0000000..d8f4c84 --- /dev/null +++ b/hotdata/api/connection_types_api.py @@ -0,0 +1,549 @@ +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing_extensions import Annotated +from hotdata.models.connection_type_detail import ConnectionTypeDetail +from hotdata.models.list_connection_types_response import ListConnectionTypesResponse + +from hotdata.api_client import ApiClient, RequestSerialized +from hotdata.api_response import ApiResponse +from hotdata.rest import RESTResponseType + + +class ConnectionTypesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_connection_type( + self, + name: Annotated[StrictStr, Field(description="Connection type name (e.g. postgres, mysql, snowflake)")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ConnectionTypeDetail: + """Get connection type details + + Get configuration schema and authentication requirements for a specific connection type. + + :param name: Connection type name (e.g. postgres, mysql, snowflake) (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_connection_type_serialize( + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ConnectionTypeDetail", + '404': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_connection_type_with_http_info( + self, + name: Annotated[StrictStr, Field(description="Connection type name (e.g. postgres, mysql, snowflake)")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ConnectionTypeDetail]: + """Get connection type details + + Get configuration schema and authentication requirements for a specific connection type. + + :param name: Connection type name (e.g. postgres, mysql, snowflake) (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_connection_type_serialize( + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ConnectionTypeDetail", + '404': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_connection_type_without_preload_content( + self, + name: Annotated[StrictStr, Field(description="Connection type name (e.g. postgres, mysql, snowflake)")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get connection type details + + Get configuration schema and authentication requirements for a specific connection type. + + :param name: Connection type name (e.g. postgres, mysql, snowflake) (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_connection_type_serialize( + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ConnectionTypeDetail", + '404': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_connection_type_serialize( + self, + name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if name is not None: + _path_params['name'] = name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/connection-types/{name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_connection_types( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListConnectionTypesResponse: + """List connection types + + List all available connection types, including native sources and FlightDLT services. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_connection_types_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListConnectionTypesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_connection_types_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListConnectionTypesResponse]: + """List connection types + + List all available connection types, including native sources and FlightDLT services. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_connection_types_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListConnectionTypesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_connection_types_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List connection types + + List all available connection types, including native sources and FlightDLT services. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_connection_types_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListConnectionTypesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_connection_types_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/connection-types', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/hotdata/api/connections_api.py b/hotdata/api/connections_api.py index 4a46b9c..1c59589 100644 --- a/hotdata/api/connections_api.py +++ b/hotdata/api/connections_api.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/api/datasets_api.py b/hotdata/api/datasets_api.py index f52bdc2..e99a7d7 100644 --- a/hotdata/api/datasets_api.py +++ b/hotdata/api/datasets_api.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -22,6 +22,7 @@ from hotdata.models.create_dataset_request import CreateDatasetRequest from hotdata.models.create_dataset_response import CreateDatasetResponse from hotdata.models.get_dataset_response import GetDatasetResponse +from hotdata.models.list_dataset_versions_response import ListDatasetVersionsResponse from hotdata.models.list_datasets_response import ListDatasetsResponse from hotdata.models.update_dataset_request import UpdateDatasetRequest from hotdata.models.update_dataset_response import UpdateDatasetResponse @@ -846,6 +847,301 @@ def _get_dataset_serialize( + @validate_call + def list_dataset_versions( + self, + id: Annotated[StrictStr, Field(description="Dataset ID")], + limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Maximum number of versions (default: 100, max: 1000)")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset (default: 0)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListDatasetVersionsResponse: + """List dataset versions + + + :param id: Dataset ID (required) + :type id: str + :param limit: Maximum number of versions (default: 100, max: 1000) + :type limit: int + :param offset: Pagination offset (default: 0) + :type offset: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_dataset_versions_serialize( + id=id, + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListDatasetVersionsResponse", + '404': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_dataset_versions_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Dataset ID")], + limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Maximum number of versions (default: 100, max: 1000)")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset (default: 0)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListDatasetVersionsResponse]: + """List dataset versions + + + :param id: Dataset ID (required) + :type id: str + :param limit: Maximum number of versions (default: 100, max: 1000) + :type limit: int + :param offset: Pagination offset (default: 0) + :type offset: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_dataset_versions_serialize( + id=id, + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListDatasetVersionsResponse", + '404': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_dataset_versions_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Dataset ID")], + limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Maximum number of versions (default: 100, max: 1000)")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset (default: 0)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List dataset versions + + + :param id: Dataset ID (required) + :type id: str + :param limit: Maximum number of versions (default: 100, max: 1000) + :type limit: int + :param offset: Pagination offset (default: 0) + :type offset: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_dataset_versions_serialize( + id=id, + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListDatasetVersionsResponse", + '404': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_dataset_versions_serialize( + self, + id, + limit, + offset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/datasets/{id}/versions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def list_datasets( self, diff --git a/hotdata/api/embedding_providers_api.py b/hotdata/api/embedding_providers_api.py new file mode 100644 index 0000000..2d03910 --- /dev/null +++ b/hotdata/api/embedding_providers_api.py @@ -0,0 +1,1380 @@ +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing_extensions import Annotated +from hotdata.models.create_embedding_provider_request import CreateEmbeddingProviderRequest +from hotdata.models.create_embedding_provider_response import CreateEmbeddingProviderResponse +from hotdata.models.embedding_provider_response import EmbeddingProviderResponse +from hotdata.models.list_embedding_providers_response import ListEmbeddingProvidersResponse +from hotdata.models.update_embedding_provider_request import UpdateEmbeddingProviderRequest +from hotdata.models.update_embedding_provider_response import UpdateEmbeddingProviderResponse + +from hotdata.api_client import ApiClient, RequestSerialized +from hotdata.api_response import ApiResponse +from hotdata.rest import RESTResponseType + + +class EmbeddingProvidersApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_embedding_provider( + self, + create_embedding_provider_request: CreateEmbeddingProviderRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CreateEmbeddingProviderResponse: + """Create embedding provider + + Register a new embedding provider that can be used to generate vector embeddings for text columns. Providers can be service-based (e.g., OpenAI) or local. + + :param create_embedding_provider_request: (required) + :type create_embedding_provider_request: CreateEmbeddingProviderRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_embedding_provider_serialize( + create_embedding_provider_request=create_embedding_provider_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateEmbeddingProviderResponse", + '400': "ApiErrorResponse", + '409': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_embedding_provider_with_http_info( + self, + create_embedding_provider_request: CreateEmbeddingProviderRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CreateEmbeddingProviderResponse]: + """Create embedding provider + + Register a new embedding provider that can be used to generate vector embeddings for text columns. Providers can be service-based (e.g., OpenAI) or local. + + :param create_embedding_provider_request: (required) + :type create_embedding_provider_request: CreateEmbeddingProviderRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_embedding_provider_serialize( + create_embedding_provider_request=create_embedding_provider_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateEmbeddingProviderResponse", + '400': "ApiErrorResponse", + '409': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_embedding_provider_without_preload_content( + self, + create_embedding_provider_request: CreateEmbeddingProviderRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create embedding provider + + Register a new embedding provider that can be used to generate vector embeddings for text columns. Providers can be service-based (e.g., OpenAI) or local. + + :param create_embedding_provider_request: (required) + :type create_embedding_provider_request: CreateEmbeddingProviderRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_embedding_provider_serialize( + create_embedding_provider_request=create_embedding_provider_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateEmbeddingProviderResponse", + '400': "ApiErrorResponse", + '409': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_embedding_provider_serialize( + self, + create_embedding_provider_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_embedding_provider_request is not None: + _body_params = create_embedding_provider_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/embedding-providers', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_embedding_provider( + self, + id: Annotated[StrictStr, Field(description="Embedding provider ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete embedding provider + + + :param id: Embedding provider ID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_embedding_provider_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '404': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_embedding_provider_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Embedding provider ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete embedding provider + + + :param id: Embedding provider ID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_embedding_provider_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '404': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_embedding_provider_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Embedding provider ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete embedding provider + + + :param id: Embedding provider ID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_embedding_provider_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '404': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_embedding_provider_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/embedding-providers/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_embedding_provider( + self, + id: Annotated[StrictStr, Field(description="Embedding provider ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EmbeddingProviderResponse: + """Get embedding provider + + + :param id: Embedding provider ID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_embedding_provider_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EmbeddingProviderResponse", + '404': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_embedding_provider_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Embedding provider ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EmbeddingProviderResponse]: + """Get embedding provider + + + :param id: Embedding provider ID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_embedding_provider_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EmbeddingProviderResponse", + '404': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_embedding_provider_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Embedding provider ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get embedding provider + + + :param id: Embedding provider ID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_embedding_provider_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EmbeddingProviderResponse", + '404': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_embedding_provider_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/embedding-providers/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_embedding_providers( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListEmbeddingProvidersResponse: + """List embedding providers + + List all registered embedding providers. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_embedding_providers_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListEmbeddingProvidersResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_embedding_providers_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListEmbeddingProvidersResponse]: + """List embedding providers + + List all registered embedding providers. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_embedding_providers_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListEmbeddingProvidersResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_embedding_providers_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List embedding providers + + List all registered embedding providers. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_embedding_providers_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListEmbeddingProvidersResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_embedding_providers_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/embedding-providers', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_embedding_provider( + self, + id: Annotated[StrictStr, Field(description="Embedding provider ID")], + update_embedding_provider_request: UpdateEmbeddingProviderRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UpdateEmbeddingProviderResponse: + """Update embedding provider + + + :param id: Embedding provider ID (required) + :type id: str + :param update_embedding_provider_request: (required) + :type update_embedding_provider_request: UpdateEmbeddingProviderRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_embedding_provider_serialize( + id=id, + update_embedding_provider_request=update_embedding_provider_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UpdateEmbeddingProviderResponse", + '404': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_embedding_provider_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Embedding provider ID")], + update_embedding_provider_request: UpdateEmbeddingProviderRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UpdateEmbeddingProviderResponse]: + """Update embedding provider + + + :param id: Embedding provider ID (required) + :type id: str + :param update_embedding_provider_request: (required) + :type update_embedding_provider_request: UpdateEmbeddingProviderRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_embedding_provider_serialize( + id=id, + update_embedding_provider_request=update_embedding_provider_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UpdateEmbeddingProviderResponse", + '404': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_embedding_provider_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Embedding provider ID")], + update_embedding_provider_request: UpdateEmbeddingProviderRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update embedding provider + + + :param id: Embedding provider ID (required) + :type id: str + :param update_embedding_provider_request: (required) + :type update_embedding_provider_request: UpdateEmbeddingProviderRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_embedding_provider_serialize( + id=id, + update_embedding_provider_request=update_embedding_provider_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UpdateEmbeddingProviderResponse", + '404': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_embedding_provider_serialize( + self, + id, + update_embedding_provider_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_embedding_provider_request is not None: + _body_params = update_embedding_provider_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v1/embedding-providers/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/hotdata/api/indexes_api.py b/hotdata/api/indexes_api.py new file mode 100644 index 0000000..b4df051 --- /dev/null +++ b/hotdata/api/indexes_api.py @@ -0,0 +1,977 @@ +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing_extensions import Annotated +from hotdata.models.create_index_request import CreateIndexRequest +from hotdata.models.index_info_response import IndexInfoResponse +from hotdata.models.list_indexes_response import ListIndexesResponse + +from hotdata.api_client import ApiClient, RequestSerialized +from hotdata.api_response import ApiResponse +from hotdata.rest import RESTResponseType + + +class IndexesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_index( + self, + connection_id: Annotated[StrictStr, Field(description="Connection identifier")], + var_schema: Annotated[StrictStr, Field(description="Schema name")], + table: Annotated[StrictStr, Field(description="Table name")], + create_index_request: CreateIndexRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> IndexInfoResponse: + """Create an index on a table + + Create a sorted or BM25 full-text index on a cached table. + + :param connection_id: Connection identifier (required) + :type connection_id: str + :param var_schema: Schema name (required) + :type var_schema: str + :param table: Table name (required) + :type table: str + :param create_index_request: (required) + :type create_index_request: CreateIndexRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_index_serialize( + connection_id=connection_id, + var_schema=var_schema, + table=table, + create_index_request=create_index_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "IndexInfoResponse", + '400': "ApiErrorResponse", + '404': "ApiErrorResponse", + '500': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_index_with_http_info( + self, + connection_id: Annotated[StrictStr, Field(description="Connection identifier")], + var_schema: Annotated[StrictStr, Field(description="Schema name")], + table: Annotated[StrictStr, Field(description="Table name")], + create_index_request: CreateIndexRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[IndexInfoResponse]: + """Create an index on a table + + Create a sorted or BM25 full-text index on a cached table. + + :param connection_id: Connection identifier (required) + :type connection_id: str + :param var_schema: Schema name (required) + :type var_schema: str + :param table: Table name (required) + :type table: str + :param create_index_request: (required) + :type create_index_request: CreateIndexRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_index_serialize( + connection_id=connection_id, + var_schema=var_schema, + table=table, + create_index_request=create_index_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "IndexInfoResponse", + '400': "ApiErrorResponse", + '404': "ApiErrorResponse", + '500': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_index_without_preload_content( + self, + connection_id: Annotated[StrictStr, Field(description="Connection identifier")], + var_schema: Annotated[StrictStr, Field(description="Schema name")], + table: Annotated[StrictStr, Field(description="Table name")], + create_index_request: CreateIndexRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create an index on a table + + Create a sorted or BM25 full-text index on a cached table. + + :param connection_id: Connection identifier (required) + :type connection_id: str + :param var_schema: Schema name (required) + :type var_schema: str + :param table: Table name (required) + :type table: str + :param create_index_request: (required) + :type create_index_request: CreateIndexRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_index_serialize( + connection_id=connection_id, + var_schema=var_schema, + table=table, + create_index_request=create_index_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "IndexInfoResponse", + '400': "ApiErrorResponse", + '404': "ApiErrorResponse", + '500': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_index_serialize( + self, + connection_id, + var_schema, + table, + create_index_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if connection_id is not None: + _path_params['connection_id'] = connection_id + if var_schema is not None: + _path_params['schema'] = var_schema + if table is not None: + _path_params['table'] = table + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_index_request is not None: + _body_params = create_index_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/connections/{connection_id}/tables/{schema}/{table}/indexes', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_index( + self, + connection_id: Annotated[StrictStr, Field(description="Connection identifier")], + var_schema: Annotated[StrictStr, Field(description="Schema name")], + table: Annotated[StrictStr, Field(description="Table name")], + index_name: Annotated[StrictStr, Field(description="Index name")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete an index + + Delete a specific index from a cached table. + + :param connection_id: Connection identifier (required) + :type connection_id: str + :param var_schema: Schema name (required) + :type var_schema: str + :param table: Table name (required) + :type table: str + :param index_name: Index name (required) + :type index_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_index_serialize( + connection_id=connection_id, + var_schema=var_schema, + table=table, + index_name=index_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '404': "ApiErrorResponse", + '500': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_index_with_http_info( + self, + connection_id: Annotated[StrictStr, Field(description="Connection identifier")], + var_schema: Annotated[StrictStr, Field(description="Schema name")], + table: Annotated[StrictStr, Field(description="Table name")], + index_name: Annotated[StrictStr, Field(description="Index name")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete an index + + Delete a specific index from a cached table. + + :param connection_id: Connection identifier (required) + :type connection_id: str + :param var_schema: Schema name (required) + :type var_schema: str + :param table: Table name (required) + :type table: str + :param index_name: Index name (required) + :type index_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_index_serialize( + connection_id=connection_id, + var_schema=var_schema, + table=table, + index_name=index_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '404': "ApiErrorResponse", + '500': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_index_without_preload_content( + self, + connection_id: Annotated[StrictStr, Field(description="Connection identifier")], + var_schema: Annotated[StrictStr, Field(description="Schema name")], + table: Annotated[StrictStr, Field(description="Table name")], + index_name: Annotated[StrictStr, Field(description="Index name")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete an index + + Delete a specific index from a cached table. + + :param connection_id: Connection identifier (required) + :type connection_id: str + :param var_schema: Schema name (required) + :type var_schema: str + :param table: Table name (required) + :type table: str + :param index_name: Index name (required) + :type index_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_index_serialize( + connection_id=connection_id, + var_schema=var_schema, + table=table, + index_name=index_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '404': "ApiErrorResponse", + '500': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_index_serialize( + self, + connection_id, + var_schema, + table, + index_name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if connection_id is not None: + _path_params['connection_id'] = connection_id + if var_schema is not None: + _path_params['schema'] = var_schema + if table is not None: + _path_params['table'] = table + if index_name is not None: + _path_params['index_name'] = index_name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/connections/{connection_id}/tables/{schema}/{table}/indexes/{index_name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_indexes( + self, + connection_id: Annotated[StrictStr, Field(description="Connection identifier")], + var_schema: Annotated[StrictStr, Field(description="Schema name")], + table: Annotated[StrictStr, Field(description="Table name")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListIndexesResponse: + """List indexes on a table + + List all indexes created on a cached table. + + :param connection_id: Connection identifier (required) + :type connection_id: str + :param var_schema: Schema name (required) + :type var_schema: str + :param table: Table name (required) + :type table: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_indexes_serialize( + connection_id=connection_id, + var_schema=var_schema, + table=table, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListIndexesResponse", + '404': "ApiErrorResponse", + '500': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_indexes_with_http_info( + self, + connection_id: Annotated[StrictStr, Field(description="Connection identifier")], + var_schema: Annotated[StrictStr, Field(description="Schema name")], + table: Annotated[StrictStr, Field(description="Table name")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListIndexesResponse]: + """List indexes on a table + + List all indexes created on a cached table. + + :param connection_id: Connection identifier (required) + :type connection_id: str + :param var_schema: Schema name (required) + :type var_schema: str + :param table: Table name (required) + :type table: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_indexes_serialize( + connection_id=connection_id, + var_schema=var_schema, + table=table, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListIndexesResponse", + '404': "ApiErrorResponse", + '500': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_indexes_without_preload_content( + self, + connection_id: Annotated[StrictStr, Field(description="Connection identifier")], + var_schema: Annotated[StrictStr, Field(description="Schema name")], + table: Annotated[StrictStr, Field(description="Table name")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List indexes on a table + + List all indexes created on a cached table. + + :param connection_id: Connection identifier (required) + :type connection_id: str + :param var_schema: Schema name (required) + :type var_schema: str + :param table: Table name (required) + :type table: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_indexes_serialize( + connection_id=connection_id, + var_schema=var_schema, + table=table, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListIndexesResponse", + '404': "ApiErrorResponse", + '500': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_indexes_serialize( + self, + connection_id, + var_schema, + table, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if connection_id is not None: + _path_params['connection_id'] = connection_id + if var_schema is not None: + _path_params['schema'] = var_schema + if table is not None: + _path_params['table'] = table + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/connections/{connection_id}/tables/{schema}/{table}/indexes', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/hotdata/api/information_schema_api.py b/hotdata/api/information_schema_api.py index b50e406..40b7c5e 100644 --- a/hotdata/api/information_schema_api.py +++ b/hotdata/api/information_schema_api.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/api/jobs_api.py b/hotdata/api/jobs_api.py new file mode 100644 index 0000000..769eb81 --- /dev/null +++ b/hotdata/api/jobs_api.py @@ -0,0 +1,619 @@ +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from hotdata.models.job_status_response import JobStatusResponse +from hotdata.models.job_type import JobType +from hotdata.models.list_jobs_response import ListJobsResponse + +from hotdata.api_client import ApiClient, RequestSerialized +from hotdata.api_response import ApiResponse +from hotdata.rest import RESTResponseType + + +class JobsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_job( + self, + id: Annotated[StrictStr, Field(description="Job ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> JobStatusResponse: + """Get job status + + Get the current status of a background job. Poll this endpoint to track job progress. + + :param id: Job ID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_job_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "JobStatusResponse", + '404': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_job_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Job ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[JobStatusResponse]: + """Get job status + + Get the current status of a background job. Poll this endpoint to track job progress. + + :param id: Job ID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_job_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "JobStatusResponse", + '404': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_job_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Job ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get job status + + Get the current status of a background job. Poll this endpoint to track job progress. + + :param id: Job ID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_job_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "JobStatusResponse", + '404': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_job_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/jobs/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_jobs( + self, + job_type: Annotated[Optional[JobType], Field(description="Filter by job type")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by status (comma-separated, e.g. status=pending,running)")] = None, + limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Max results (default 50)")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Offset for pagination")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListJobsResponse: + """List jobs + + List background jobs with optional filters by type and status. + + :param job_type: Filter by job type + :type job_type: JobType + :param status: Filter by status (comma-separated, e.g. status=pending,running) + :type status: str + :param limit: Max results (default 50) + :type limit: int + :param offset: Offset for pagination + :type offset: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_jobs_serialize( + job_type=job_type, + status=status, + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListJobsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_jobs_with_http_info( + self, + job_type: Annotated[Optional[JobType], Field(description="Filter by job type")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by status (comma-separated, e.g. status=pending,running)")] = None, + limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Max results (default 50)")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Offset for pagination")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListJobsResponse]: + """List jobs + + List background jobs with optional filters by type and status. + + :param job_type: Filter by job type + :type job_type: JobType + :param status: Filter by status (comma-separated, e.g. status=pending,running) + :type status: str + :param limit: Max results (default 50) + :type limit: int + :param offset: Offset for pagination + :type offset: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_jobs_serialize( + job_type=job_type, + status=status, + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListJobsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_jobs_without_preload_content( + self, + job_type: Annotated[Optional[JobType], Field(description="Filter by job type")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by status (comma-separated, e.g. status=pending,running)")] = None, + limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Max results (default 50)")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Offset for pagination")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List jobs + + List background jobs with optional filters by type and status. + + :param job_type: Filter by job type + :type job_type: JobType + :param status: Filter by status (comma-separated, e.g. status=pending,running) + :type status: str + :param limit: Max results (default 50) + :type limit: int + :param offset: Offset for pagination + :type offset: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_jobs_serialize( + job_type=job_type, + status=status, + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListJobsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_jobs_serialize( + self, + job_type, + status, + limit, + offset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if job_type is not None: + + _query_params.append(('job_type', job_type.value)) + + if status is not None: + + _query_params.append(('status', status)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/jobs', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/hotdata/api/query_api.py b/hotdata/api/query_api.py index 471897c..ed17484 100644 --- a/hotdata/api/query_api.py +++ b/hotdata/api/query_api.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -56,7 +56,7 @@ def query( ) -> QueryResponse: """Execute SQL query - Execute a SQL query against all registered connections and datasets. Use standard Postgres-compatible SQL to reference tables from any connection using the format `connection_name.schema.table`. Results are returned inline and a `result_id` is provided for later retrieval via the Results API. + Execute a SQL query against all registered connections and datasets. Use standard Postgres-compatible SQL to reference tables from any connection using the format `connection_name.schema.table`. Results are returned inline and a `result_id` is provided for later retrieval via the Results API. Set `async: true` to execute asynchronously — returns a query run ID for polling. Optionally set `async_after_ms` to attempt synchronous execution first, falling back to async if the query exceeds the timeout. :param query_request: (required) :type query_request: QueryRequest @@ -92,6 +92,7 @@ def query( _response_types_map: Dict[str, Optional[str]] = { '200': "QueryResponse", + '202': "AsyncQueryResponse", '400': "ApiErrorResponse", '500': "ApiErrorResponse", } @@ -125,7 +126,7 @@ def query_with_http_info( ) -> ApiResponse[QueryResponse]: """Execute SQL query - Execute a SQL query against all registered connections and datasets. Use standard Postgres-compatible SQL to reference tables from any connection using the format `connection_name.schema.table`. Results are returned inline and a `result_id` is provided for later retrieval via the Results API. + Execute a SQL query against all registered connections and datasets. Use standard Postgres-compatible SQL to reference tables from any connection using the format `connection_name.schema.table`. Results are returned inline and a `result_id` is provided for later retrieval via the Results API. Set `async: true` to execute asynchronously — returns a query run ID for polling. Optionally set `async_after_ms` to attempt synchronous execution first, falling back to async if the query exceeds the timeout. :param query_request: (required) :type query_request: QueryRequest @@ -161,6 +162,7 @@ def query_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "QueryResponse", + '202': "AsyncQueryResponse", '400': "ApiErrorResponse", '500': "ApiErrorResponse", } @@ -194,7 +196,7 @@ def query_without_preload_content( ) -> RESTResponseType: """Execute SQL query - Execute a SQL query against all registered connections and datasets. Use standard Postgres-compatible SQL to reference tables from any connection using the format `connection_name.schema.table`. Results are returned inline and a `result_id` is provided for later retrieval via the Results API. + Execute a SQL query against all registered connections and datasets. Use standard Postgres-compatible SQL to reference tables from any connection using the format `connection_name.schema.table`. Results are returned inline and a `result_id` is provided for later retrieval via the Results API. Set `async: true` to execute asynchronously — returns a query run ID for polling. Optionally set `async_after_ms` to attempt synchronous execution first, falling back to async if the query exceeds the timeout. :param query_request: (required) :type query_request: QueryRequest @@ -230,6 +232,7 @@ def query_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "QueryResponse", + '202': "AsyncQueryResponse", '400': "ApiErrorResponse", '500': "ApiErrorResponse", } diff --git a/hotdata/api/query_runs_api.py b/hotdata/api/query_runs_api.py index 49eb0ba..4c11797 100644 --- a/hotdata/api/query_runs_api.py +++ b/hotdata/api/query_runs_api.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -20,6 +20,7 @@ from typing import Optional from typing_extensions import Annotated from hotdata.models.list_query_runs_response import ListQueryRunsResponse +from hotdata.models.query_run_info import QueryRunInfo from hotdata.api_client import ApiClient, RequestSerialized from hotdata.api_response import ApiResponse @@ -39,11 +40,277 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client + @validate_call + def get_query_run( + self, + id: Annotated[StrictStr, Field(description="Query run ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> QueryRunInfo: + """Get query run + + Get the status and details of a specific query run by ID. + + :param id: Query run ID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_query_run_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "QueryRunInfo", + '404': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_query_run_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Query run ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[QueryRunInfo]: + """Get query run + + Get the status and details of a specific query run by ID. + + :param id: Query run ID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_query_run_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "QueryRunInfo", + '404': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_query_run_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Query run ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get query run + + Get the status and details of a specific query run by ID. + + :param id: Query run ID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_query_run_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "QueryRunInfo", + '404': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_query_run_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/query-runs/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def list_query_runs( self, limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Maximum number of results")] = None, cursor: Annotated[Optional[StrictStr], Field(description="Pagination cursor")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by status (comma-separated, e.g. status=running,failed)")] = None, + saved_query_id: Annotated[Optional[StrictStr], Field(description="Filter by saved query ID")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -64,6 +331,10 @@ def list_query_runs( :type limit: int :param cursor: Pagination cursor :type cursor: str + :param status: Filter by status (comma-separated, e.g. status=running,failed) + :type status: str + :param saved_query_id: Filter by saved query ID + :type saved_query_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -89,6 +360,8 @@ def list_query_runs( _param = self._list_query_runs_serialize( limit=limit, cursor=cursor, + status=status, + saved_query_id=saved_query_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -114,6 +387,8 @@ def list_query_runs_with_http_info( self, limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Maximum number of results")] = None, cursor: Annotated[Optional[StrictStr], Field(description="Pagination cursor")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by status (comma-separated, e.g. status=running,failed)")] = None, + saved_query_id: Annotated[Optional[StrictStr], Field(description="Filter by saved query ID")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -134,6 +409,10 @@ def list_query_runs_with_http_info( :type limit: int :param cursor: Pagination cursor :type cursor: str + :param status: Filter by status (comma-separated, e.g. status=running,failed) + :type status: str + :param saved_query_id: Filter by saved query ID + :type saved_query_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -159,6 +438,8 @@ def list_query_runs_with_http_info( _param = self._list_query_runs_serialize( limit=limit, cursor=cursor, + status=status, + saved_query_id=saved_query_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -184,6 +465,8 @@ def list_query_runs_without_preload_content( self, limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Maximum number of results")] = None, cursor: Annotated[Optional[StrictStr], Field(description="Pagination cursor")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by status (comma-separated, e.g. status=running,failed)")] = None, + saved_query_id: Annotated[Optional[StrictStr], Field(description="Filter by saved query ID")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -204,6 +487,10 @@ def list_query_runs_without_preload_content( :type limit: int :param cursor: Pagination cursor :type cursor: str + :param status: Filter by status (comma-separated, e.g. status=running,failed) + :type status: str + :param saved_query_id: Filter by saved query ID + :type saved_query_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -229,6 +516,8 @@ def list_query_runs_without_preload_content( _param = self._list_query_runs_serialize( limit=limit, cursor=cursor, + status=status, + saved_query_id=saved_query_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -249,6 +538,8 @@ def _list_query_runs_serialize( self, limit, cursor, + status, + saved_query_id, _request_auth, _content_type, _headers, @@ -279,6 +570,14 @@ def _list_query_runs_serialize( _query_params.append(('cursor', cursor)) + if status is not None: + + _query_params.append(('status', status)) + + if saved_query_id is not None: + + _query_params.append(('saved_query_id', saved_query_id)) + # process the header parameters # process the form parameters # process the body parameter diff --git a/hotdata/api/refresh_api.py b/hotdata/api/refresh_api.py index 5bb5f61..46aeb95 100644 --- a/hotdata/api/refresh_api.py +++ b/hotdata/api/refresh_api.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -56,7 +56,7 @@ def refresh( ) -> RefreshResponse: """Refresh connection data - 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. + 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. :param refresh_request: (required) :type refresh_request: RefreshRequest @@ -125,7 +125,7 @@ def refresh_with_http_info( ) -> ApiResponse[RefreshResponse]: """Refresh connection data - 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. + 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. :param refresh_request: (required) :type refresh_request: RefreshRequest @@ -194,7 +194,7 @@ def refresh_without_preload_content( ) -> RESTResponseType: """Refresh connection data - 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. + 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. :param refresh_request: (required) :type refresh_request: RefreshRequest diff --git a/hotdata/api/results_api.py b/hotdata/api/results_api.py index c388b64..95834b1 100644 --- a/hotdata/api/results_api.py +++ b/hotdata/api/results_api.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/api/saved_queries_api.py b/hotdata/api/saved_queries_api.py index e9bc997..4184e54 100644 --- a/hotdata/api/saved_queries_api.py +++ b/hotdata/api/saved_queries_api.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/api/secrets_api.py b/hotdata/api/secrets_api.py index 65f6ac8..b813096 100644 --- a/hotdata/api/secrets_api.py +++ b/hotdata/api/secrets_api.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/api/uploads_api.py b/hotdata/api/uploads_api.py index b98eb43..6fb728f 100644 --- a/hotdata/api/uploads_api.py +++ b/hotdata/api/uploads_api.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -16,7 +16,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictStr +from pydantic import Field, StrictBool, StrictStr from typing import List, Optional from typing_extensions import Annotated from hotdata.models.list_uploads_response import ListUploadsResponse @@ -304,6 +304,7 @@ def _list_uploads_serialize( def upload_file( self, request_body: List[Annotated[int, Field(strict=True, ge=0)]], + streaming: Annotated[Optional[StrictBool], Field(description="Stream upload to disk for large files (up to 20GB)")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -319,10 +320,12 @@ def upload_file( ) -> UploadResponse: """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 returned upload ID can be passed to POST /v1/datasets to create a queryable table. + 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 returned upload ID can be passed to POST /v1/datasets to create a queryable table. Add `?streaming=true` for large files (up to 20GB) — streams to disk instead of loading into memory. :param request_body: (required) :type request_body: List[int] + :param streaming: Stream upload to disk for large files (up to 20GB) + :type streaming: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -347,6 +350,7 @@ def upload_file( _param = self._upload_file_serialize( request_body=request_body, + streaming=streaming, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -372,6 +376,7 @@ def upload_file( def upload_file_with_http_info( self, request_body: List[Annotated[int, Field(strict=True, ge=0)]], + streaming: Annotated[Optional[StrictBool], Field(description="Stream upload to disk for large files (up to 20GB)")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -387,10 +392,12 @@ def upload_file_with_http_info( ) -> ApiResponse[UploadResponse]: """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 returned upload ID can be passed to POST /v1/datasets to create a queryable table. + 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 returned upload ID can be passed to POST /v1/datasets to create a queryable table. Add `?streaming=true` for large files (up to 20GB) — streams to disk instead of loading into memory. :param request_body: (required) :type request_body: List[int] + :param streaming: Stream upload to disk for large files (up to 20GB) + :type streaming: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -415,6 +422,7 @@ def upload_file_with_http_info( _param = self._upload_file_serialize( request_body=request_body, + streaming=streaming, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -440,6 +448,7 @@ def upload_file_with_http_info( def upload_file_without_preload_content( self, request_body: List[Annotated[int, Field(strict=True, ge=0)]], + streaming: Annotated[Optional[StrictBool], Field(description="Stream upload to disk for large files (up to 20GB)")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -455,10 +464,12 @@ def upload_file_without_preload_content( ) -> RESTResponseType: """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 returned upload ID can be passed to POST /v1/datasets to create a queryable table. + 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 returned upload ID can be passed to POST /v1/datasets to create a queryable table. Add `?streaming=true` for large files (up to 20GB) — streams to disk instead of loading into memory. :param request_body: (required) :type request_body: List[int] + :param streaming: Stream upload to disk for large files (up to 20GB) + :type streaming: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -483,6 +494,7 @@ def upload_file_without_preload_content( _param = self._upload_file_serialize( request_body=request_body, + streaming=streaming, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -503,6 +515,7 @@ def upload_file_without_preload_content( def _upload_file_serialize( self, request_body, + streaming, _request_auth, _content_type, _headers, @@ -526,6 +539,10 @@ def _upload_file_serialize( # process the path parameters # process the query parameters + if streaming is not None: + + _query_params.append(('streaming', streaming)) + # process the header parameters # process the form parameters # process the body parameter diff --git a/hotdata/api/workspaces_api.py b/hotdata/api/workspaces_api.py index d8f3209..3a562e0 100644 --- a/hotdata/api/workspaces_api.py +++ b/hotdata/api/workspaces_api.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/api_client.py b/hotdata/api_client.py index 58e44c6..926507e 100644 --- a/hotdata/api_client.py +++ b/hotdata/api_client.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -554,8 +554,6 @@ def files_parameters( params = [] for k, v in files.items(): if isinstance(v, str): - if '..' in v: - raise Exception('Invalid file path') with open(v, 'rb') as f: filename = os.path.basename(f.name) filedata = f.read() diff --git a/hotdata/configuration.py b/hotdata/configuration.py index 73e30ac..904220a 100644 --- a/hotdata/configuration.py +++ b/hotdata/configuration.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/exceptions.py b/hotdata/exceptions.py index 74bf2f9..084528e 100644 --- a/hotdata/exceptions.py +++ b/hotdata/exceptions.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/__init__.py b/hotdata/models/__init__.py index afea775..7f4b61d 100644 --- a/hotdata/models/__init__.py +++ b/hotdata/models/__init__.py @@ -2,7 +2,7 @@ # flake8: noqa """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -16,6 +16,7 @@ # import models into model package from hotdata.models.api_error_detail import ApiErrorDetail from hotdata.models.api_error_response import ApiErrorResponse +from hotdata.models.async_query_response import AsyncQueryResponse from hotdata.models.boolean_profile_detail import BooleanProfileDetail from hotdata.models.categorical_profile_detail import CategoricalProfileDetail from hotdata.models.category_value_info import CategoryValueInfo @@ -32,10 +33,15 @@ from hotdata.models.connection_info import ConnectionInfo from hotdata.models.connection_refresh_result import ConnectionRefreshResult from hotdata.models.connection_schema_error import ConnectionSchemaError +from hotdata.models.connection_type_detail import ConnectionTypeDetail +from hotdata.models.connection_type_summary import ConnectionTypeSummary from hotdata.models.create_connection_request import CreateConnectionRequest from hotdata.models.create_connection_response import CreateConnectionResponse from hotdata.models.create_dataset_request import CreateDatasetRequest from hotdata.models.create_dataset_response import CreateDatasetResponse +from hotdata.models.create_embedding_provider_request import CreateEmbeddingProviderRequest +from hotdata.models.create_embedding_provider_response import CreateEmbeddingProviderResponse +from hotdata.models.create_index_request import CreateIndexRequest from hotdata.models.create_saved_query_request import CreateSavedQueryRequest from hotdata.models.create_secret_request import CreateSecretRequest from hotdata.models.create_secret_response import CreateSecretResponse @@ -43,18 +49,31 @@ from hotdata.models.create_workspace_response import CreateWorkspaceResponse from hotdata.models.dataset_source import DatasetSource from hotdata.models.dataset_summary import DatasetSummary +from hotdata.models.dataset_version_summary import DatasetVersionSummary from hotdata.models.discovery_status import DiscoveryStatus +from hotdata.models.embedding_provider_response import EmbeddingProviderResponse from hotdata.models.error import Error from hotdata.models.execute_saved_query_request import ExecuteSavedQueryRequest from hotdata.models.get_connection_response import GetConnectionResponse from hotdata.models.get_dataset_response import GetDatasetResponse from hotdata.models.get_result_response import GetResultResponse from hotdata.models.get_secret_response import GetSecretResponse +from hotdata.models.index_info_response import IndexInfoResponse +from hotdata.models.index_status import IndexStatus from hotdata.models.information_schema_response import InformationSchemaResponse from hotdata.models.inline_data import InlineData from hotdata.models.inline_dataset_source import InlineDatasetSource +from hotdata.models.job_result import JobResult +from hotdata.models.job_status import JobStatus +from hotdata.models.job_status_response import JobStatusResponse +from hotdata.models.job_type import JobType +from hotdata.models.list_connection_types_response import ListConnectionTypesResponse from hotdata.models.list_connections_response import ListConnectionsResponse +from hotdata.models.list_dataset_versions_response import ListDatasetVersionsResponse from hotdata.models.list_datasets_response import ListDatasetsResponse +from hotdata.models.list_embedding_providers_response import ListEmbeddingProvidersResponse +from hotdata.models.list_indexes_response import ListIndexesResponse +from hotdata.models.list_jobs_response import ListJobsResponse from hotdata.models.list_query_runs_response import ListQueryRunsResponse from hotdata.models.list_results_response import ListResultsResponse from hotdata.models.list_saved_queries_response import ListSavedQueriesResponse @@ -66,15 +85,19 @@ from hotdata.models.query_request import QueryRequest from hotdata.models.query_response import QueryResponse from hotdata.models.query_run_info import QueryRunInfo +from hotdata.models.refresh_dataset_response import RefreshDatasetResponse from hotdata.models.refresh_request import RefreshRequest from hotdata.models.refresh_response import RefreshResponse from hotdata.models.refresh_warning import RefreshWarning from hotdata.models.result_info import ResultInfo +from hotdata.models.saved_query_dataset_source import SavedQueryDatasetSource from hotdata.models.saved_query_detail import SavedQueryDetail from hotdata.models.saved_query_summary import SavedQuerySummary from hotdata.models.saved_query_version_info import SavedQueryVersionInfo from hotdata.models.schema_refresh_result import SchemaRefreshResult from hotdata.models.secret_metadata_response import SecretMetadataResponse +from hotdata.models.sql_query_dataset_source import SqlQueryDatasetSource +from hotdata.models.submit_job_response import SubmitJobResponse from hotdata.models.table_info import TableInfo from hotdata.models.table_profile_response import TableProfileResponse from hotdata.models.table_refresh_error import TableRefreshError @@ -83,12 +106,15 @@ from hotdata.models.text_profile_detail import TextProfileDetail from hotdata.models.update_dataset_request import UpdateDatasetRequest from hotdata.models.update_dataset_response import UpdateDatasetResponse +from hotdata.models.update_embedding_provider_request import UpdateEmbeddingProviderRequest +from hotdata.models.update_embedding_provider_response import UpdateEmbeddingProviderResponse from hotdata.models.update_saved_query_request import UpdateSavedQueryRequest from hotdata.models.update_secret_request import UpdateSecretRequest from hotdata.models.update_secret_response import UpdateSecretResponse from hotdata.models.upload_dataset_source import UploadDatasetSource from hotdata.models.upload_info import UploadInfo from hotdata.models.upload_response import UploadResponse +from hotdata.models.url_dataset_source import UrlDatasetSource from hotdata.models.workspace_detail import WorkspaceDetail from hotdata.models.workspace_list_item import WorkspaceListItem diff --git a/hotdata/models/api_error_detail.py b/hotdata/models/api_error_detail.py index 5df9a8f..6d0093f 100644 --- a/hotdata/models/api_error_detail.py +++ b/hotdata/models/api_error_detail.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/api_error_response.py b/hotdata/models/api_error_response.py index 4ea2502..75e6aa4 100644 --- a/hotdata/models/api_error_response.py +++ b/hotdata/models/api_error_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/async_query_response.py b/hotdata/models/async_query_response.py new file mode 100644 index 0000000..e5fbf42 --- /dev/null +++ b/hotdata/models/async_query_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AsyncQueryResponse(BaseModel): + """ + Response returned when a query is submitted asynchronously (202 Accepted). Poll GET /query-runs/{id} to track progress. Once status is \"succeeded\", retrieve results via GET /results/{result_id}. + """ # noqa: E501 + query_run_id: StrictStr = Field(description="Unique identifier for the query run.") + reason: Optional[StrictStr] = Field(default=None, description="Human-readable reason why the query went async (e.g., caching tables for the first time).") + status: StrictStr = Field(description="Current status of the query run.") + status_url: StrictStr = Field(description="URL to poll for query run status.") + __properties: ClassVar[List[str]] = ["query_run_id", "reason", "status", "status_url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AsyncQueryResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if reason (nullable) is None + # and model_fields_set contains the field + if self.reason is None and "reason" in self.model_fields_set: + _dict['reason'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AsyncQueryResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "query_run_id": obj.get("query_run_id"), + "reason": obj.get("reason"), + "status": obj.get("status"), + "status_url": obj.get("status_url") + }) + return _obj + + diff --git a/hotdata/models/boolean_profile_detail.py b/hotdata/models/boolean_profile_detail.py index f34cb77..4b3887c 100644 --- a/hotdata/models/boolean_profile_detail.py +++ b/hotdata/models/boolean_profile_detail.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/categorical_profile_detail.py b/hotdata/models/categorical_profile_detail.py index ca22cd2..0be6d29 100644 --- a/hotdata/models/categorical_profile_detail.py +++ b/hotdata/models/categorical_profile_detail.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/category_value_info.py b/hotdata/models/category_value_info.py index 9bed8ee..9404b09 100644 --- a/hotdata/models/category_value_info.py +++ b/hotdata/models/category_value_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/column_info.py b/hotdata/models/column_info.py index 35c4436..f594992 100644 --- a/hotdata/models/column_info.py +++ b/hotdata/models/column_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/column_profile_detail.py b/hotdata/models/column_profile_detail.py index f2a4617..27cd083 100644 --- a/hotdata/models/column_profile_detail.py +++ b/hotdata/models/column_profile_detail.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/column_profile_detail_one_of.py b/hotdata/models/column_profile_detail_one_of.py index fb000d5..9471fac 100644 --- a/hotdata/models/column_profile_detail_one_of.py +++ b/hotdata/models/column_profile_detail_one_of.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/column_profile_detail_one_of1.py b/hotdata/models/column_profile_detail_one_of1.py index 55507dd..9e4d720 100644 --- a/hotdata/models/column_profile_detail_one_of1.py +++ b/hotdata/models/column_profile_detail_one_of1.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/column_profile_detail_one_of2.py b/hotdata/models/column_profile_detail_one_of2.py index 1cf3dff..21b4dc0 100644 --- a/hotdata/models/column_profile_detail_one_of2.py +++ b/hotdata/models/column_profile_detail_one_of2.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/column_profile_detail_one_of3.py b/hotdata/models/column_profile_detail_one_of3.py index acbcac9..3988b79 100644 --- a/hotdata/models/column_profile_detail_one_of3.py +++ b/hotdata/models/column_profile_detail_one_of3.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/column_profile_detail_one_of4.py b/hotdata/models/column_profile_detail_one_of4.py index 7d46879..7d7e8a2 100644 --- a/hotdata/models/column_profile_detail_one_of4.py +++ b/hotdata/models/column_profile_detail_one_of4.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/column_profile_info.py b/hotdata/models/column_profile_info.py index 2f676f0..2dba0f7 100644 --- a/hotdata/models/column_profile_info.py +++ b/hotdata/models/column_profile_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/column_type_spec.py b/hotdata/models/column_type_spec.py index 28b6d16..d5bebcc 100644 --- a/hotdata/models/column_type_spec.py +++ b/hotdata/models/column_type_spec.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/connection_health_response.py b/hotdata/models/connection_health_response.py index 0dc0473..be5c615 100644 --- a/hotdata/models/connection_health_response.py +++ b/hotdata/models/connection_health_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/connection_info.py b/hotdata/models/connection_info.py index 93df4c0..8621ef1 100644 --- a/hotdata/models/connection_info.py +++ b/hotdata/models/connection_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/connection_refresh_result.py b/hotdata/models/connection_refresh_result.py index 04d6029..fc27cee 100644 --- a/hotdata/models/connection_refresh_result.py +++ b/hotdata/models/connection_refresh_result.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -28,11 +28,11 @@ class ConnectionRefreshResult(BaseModel): """ - Response for connection-wide data refresh + Result payload for a `data_refresh_connection` job. """ # noqa: E501 connection_id: StrictStr duration_ms: Annotated[int, Field(strict=True, ge=0)] - errors: List[TableRefreshError] + errors: Optional[List[TableRefreshError]] = None tables_failed: Annotated[int, Field(strict=True, ge=0)] tables_refreshed: Annotated[int, Field(strict=True, ge=0)] total_rows: Annotated[int, Field(strict=True, ge=0)] diff --git a/hotdata/models/connection_schema_error.py b/hotdata/models/connection_schema_error.py index c2d0d7d..48a0311 100644 --- a/hotdata/models/connection_schema_error.py +++ b/hotdata/models/connection_schema_error.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/connection_type_detail.py b/hotdata/models/connection_type_detail.py new file mode 100644 index 0000000..9c3cdea --- /dev/null +++ b/hotdata/models/connection_type_detail.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ConnectionTypeDetail(BaseModel): + """ + ConnectionTypeDetail + """ # noqa: E501 + auth: Optional[Any] = None + config_schema: Optional[Any] = None + label: StrictStr + name: StrictStr + __properties: ClassVar[List[str]] = ["auth", "config_schema", "label", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ConnectionTypeDetail from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if auth (nullable) is None + # and model_fields_set contains the field + if self.auth is None and "auth" in self.model_fields_set: + _dict['auth'] = None + + # set to None if config_schema (nullable) is None + # and model_fields_set contains the field + if self.config_schema is None and "config_schema" in self.model_fields_set: + _dict['config_schema'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ConnectionTypeDetail from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "auth": obj.get("auth"), + "config_schema": obj.get("config_schema"), + "label": obj.get("label"), + "name": obj.get("name") + }) + return _obj + + diff --git a/hotdata/models/connection_type_summary.py b/hotdata/models/connection_type_summary.py new file mode 100644 index 0000000..67bdb12 --- /dev/null +++ b/hotdata/models/connection_type_summary.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ConnectionTypeSummary(BaseModel): + """ + ConnectionTypeSummary + """ # noqa: E501 + label: StrictStr + name: StrictStr + __properties: ClassVar[List[str]] = ["label", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ConnectionTypeSummary from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ConnectionTypeSummary from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "label": obj.get("label"), + "name": obj.get("name") + }) + return _obj + + diff --git a/hotdata/models/create_connection_request.py b/hotdata/models/create_connection_request.py index 42b7b2c..3bd790b 100644 --- a/hotdata/models/create_connection_request.py +++ b/hotdata/models/create_connection_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/create_connection_response.py b/hotdata/models/create_connection_response.py index 050e248..4b2a2a9 100644 --- a/hotdata/models/create_connection_response.py +++ b/hotdata/models/create_connection_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/create_dataset_request.py b/hotdata/models/create_dataset_request.py index f3cbb1c..f70e5ee 100644 --- a/hotdata/models/create_dataset_request.py +++ b/hotdata/models/create_dataset_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/create_dataset_response.py b/hotdata/models/create_dataset_response.py index f51520d..a02f680 100644 --- a/hotdata/models/create_dataset_response.py +++ b/hotdata/models/create_dataset_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -31,9 +31,10 @@ class CreateDatasetResponse(BaseModel): created_at: datetime id: StrictStr label: StrictStr + schema_name: StrictStr status: StrictStr table_name: StrictStr - __properties: ClassVar[List[str]] = ["created_at", "id", "label", "status", "table_name"] + __properties: ClassVar[List[str]] = ["created_at", "id", "label", "schema_name", "status", "table_name"] model_config = ConfigDict( populate_by_name=True, @@ -89,6 +90,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "created_at": obj.get("created_at"), "id": obj.get("id"), "label": obj.get("label"), + "schema_name": obj.get("schema_name"), "status": obj.get("status"), "table_name": obj.get("table_name") }) diff --git a/hotdata/models/create_embedding_provider_request.py b/hotdata/models/create_embedding_provider_request.py new file mode 100644 index 0000000..4715cf4 --- /dev/null +++ b/hotdata/models/create_embedding_provider_request.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreateEmbeddingProviderRequest(BaseModel): + """ + Request body for POST /embedding-providers + """ # noqa: E501 + api_key: Optional[StrictStr] = Field(default=None, description="Inline API key. If provided, a secret is auto-created and referenced. Cannot be used together with `secret_name`.") + config: Optional[Any] = None + name: StrictStr + provider_type: StrictStr = Field(description="Provider type: \"local\" or \"service\"") + secret_name: Optional[StrictStr] = Field(default=None, description="Reference an existing secret by name (for service providers).") + __properties: ClassVar[List[str]] = ["api_key", "config", "name", "provider_type", "secret_name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateEmbeddingProviderRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if api_key (nullable) is None + # and model_fields_set contains the field + if self.api_key is None and "api_key" in self.model_fields_set: + _dict['api_key'] = None + + # set to None if config (nullable) is None + # and model_fields_set contains the field + if self.config is None and "config" in self.model_fields_set: + _dict['config'] = None + + # set to None if secret_name (nullable) is None + # and model_fields_set contains the field + if self.secret_name is None and "secret_name" in self.model_fields_set: + _dict['secret_name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateEmbeddingProviderRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "api_key": obj.get("api_key"), + "config": obj.get("config"), + "name": obj.get("name"), + "provider_type": obj.get("provider_type"), + "secret_name": obj.get("secret_name") + }) + return _obj + + diff --git a/hotdata/models/create_embedding_provider_response.py b/hotdata/models/create_embedding_provider_response.py new file mode 100644 index 0000000..1781134 --- /dev/null +++ b/hotdata/models/create_embedding_provider_response.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreateEmbeddingProviderResponse(BaseModel): + """ + Response body for POST /embedding-providers + """ # noqa: E501 + config: Optional[Any] + created_at: datetime + id: StrictStr + name: StrictStr + provider_type: StrictStr + __properties: ClassVar[List[str]] = ["config", "created_at", "id", "name", "provider_type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateEmbeddingProviderResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if config (nullable) is None + # and model_fields_set contains the field + if self.config is None and "config" in self.model_fields_set: + _dict['config'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateEmbeddingProviderResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "config": obj.get("config"), + "created_at": obj.get("created_at"), + "id": obj.get("id"), + "name": obj.get("name"), + "provider_type": obj.get("provider_type") + }) + return _obj + + diff --git a/hotdata/models/create_index_request.py b/hotdata/models/create_index_request.py new file mode 100644 index 0000000..ecb2d2c --- /dev/null +++ b/hotdata/models/create_index_request.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CreateIndexRequest(BaseModel): + """ + Request body for POST .../indexes + """ # noqa: E501 + var_async: Optional[StrictBool] = Field(default=None, description="When true, create the index as a background job and return a job ID for polling.", alias="async") + columns: List[StrictStr] = Field(description="Columns to index. Required for all index types.") + description: Optional[StrictStr] = Field(default=None, description="User-facing description of the embedding (e.g., \"product descriptions\").") + dimensions: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Output vector dimensions. Some models support multiple dimension sizes (e.g., OpenAI text-embedding-3-small supports 512 or 1536). If omitted, the model's default dimensions are used.") + embedding_provider_id: Optional[StrictStr] = Field(default=None, description="Embedding provider ID. When set for a vector index, the source column is treated as text and embeddings are generated automatically. The vector index is then built on the generated embedding column (`{column}_embedding` by default).") + index_name: StrictStr + index_type: Optional[StrictStr] = Field(default=None, description="Index type: \"sorted\" (default), \"bm25\", or \"vector\"") + metric: Optional[StrictStr] = Field(default=None, description="Distance metric for vector indexes: \"l2\", \"cosine\", or \"dot\". When omitted, defaults to \"l2\" for float array columns or the provider's preferred metric for text columns with auto-embedding.") + output_column: Optional[StrictStr] = Field(default=None, description="Custom name for the generated embedding column. Defaults to `{column}_embedding`.") + __properties: ClassVar[List[str]] = ["async", "columns", "description", "dimensions", "embedding_provider_id", "index_name", "index_type", "metric", "output_column"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateIndexRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if dimensions (nullable) is None + # and model_fields_set contains the field + if self.dimensions is None and "dimensions" in self.model_fields_set: + _dict['dimensions'] = None + + # set to None if embedding_provider_id (nullable) is None + # and model_fields_set contains the field + if self.embedding_provider_id is None and "embedding_provider_id" in self.model_fields_set: + _dict['embedding_provider_id'] = None + + # set to None if metric (nullable) is None + # and model_fields_set contains the field + if self.metric is None and "metric" in self.model_fields_set: + _dict['metric'] = None + + # set to None if output_column (nullable) is None + # and model_fields_set contains the field + if self.output_column is None and "output_column" in self.model_fields_set: + _dict['output_column'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateIndexRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "async": obj.get("async"), + "columns": obj.get("columns"), + "description": obj.get("description"), + "dimensions": obj.get("dimensions"), + "embedding_provider_id": obj.get("embedding_provider_id"), + "index_name": obj.get("index_name"), + "index_type": obj.get("index_type"), + "metric": obj.get("metric"), + "output_column": obj.get("output_column") + }) + return _obj + + diff --git a/hotdata/models/create_saved_query_request.py b/hotdata/models/create_saved_query_request.py index 8000cf1..c2278d7 100644 --- a/hotdata/models/create_saved_query_request.py +++ b/hotdata/models/create_saved_query_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/create_secret_request.py b/hotdata/models/create_secret_request.py index 78152e0..3ef43ff 100644 --- a/hotdata/models/create_secret_request.py +++ b/hotdata/models/create_secret_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/create_secret_response.py b/hotdata/models/create_secret_response.py index 1d44b6b..22e5729 100644 --- a/hotdata/models/create_secret_response.py +++ b/hotdata/models/create_secret_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/create_workspace_request.py b/hotdata/models/create_workspace_request.py index 4615362..2b95807 100644 --- a/hotdata/models/create_workspace_request.py +++ b/hotdata/models/create_workspace_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/create_workspace_response.py b/hotdata/models/create_workspace_response.py index bd9821e..a9dc71f 100644 --- a/hotdata/models/create_workspace_response.py +++ b/hotdata/models/create_workspace_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/dataset_source.py b/hotdata/models/dataset_source.py index d9f29ed..744857b 100644 --- a/hotdata/models/dataset_source.py +++ b/hotdata/models/dataset_source.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -19,12 +19,15 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional from hotdata.models.inline_dataset_source import InlineDatasetSource +from hotdata.models.saved_query_dataset_source import SavedQueryDatasetSource +from hotdata.models.sql_query_dataset_source import SqlQueryDatasetSource from hotdata.models.upload_dataset_source import UploadDatasetSource +from hotdata.models.url_dataset_source import UrlDatasetSource from pydantic import StrictStr, Field from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self -DATASETSOURCE_ONE_OF_SCHEMAS = ["InlineDatasetSource", "UploadDatasetSource"] +DATASETSOURCE_ONE_OF_SCHEMAS = ["InlineDatasetSource", "SavedQueryDatasetSource", "SqlQueryDatasetSource", "UploadDatasetSource", "UrlDatasetSource"] class DatasetSource(BaseModel): """ @@ -32,10 +35,16 @@ class DatasetSource(BaseModel): """ # data type: UploadDatasetSource oneof_schema_1_validator: Optional[UploadDatasetSource] = None + # data type: SavedQueryDatasetSource + oneof_schema_2_validator: Optional[SavedQueryDatasetSource] = None + # data type: SqlQueryDatasetSource + oneof_schema_3_validator: Optional[SqlQueryDatasetSource] = None + # data type: UrlDatasetSource + oneof_schema_4_validator: Optional[UrlDatasetSource] = None # data type: InlineDatasetSource - oneof_schema_2_validator: Optional[InlineDatasetSource] = None - actual_instance: Optional[Union[InlineDatasetSource, UploadDatasetSource]] = None - one_of_schemas: Set[str] = { "InlineDatasetSource", "UploadDatasetSource" } + oneof_schema_5_validator: Optional[InlineDatasetSource] = None + actual_instance: Optional[Union[InlineDatasetSource, SavedQueryDatasetSource, SqlQueryDatasetSource, UploadDatasetSource, UrlDatasetSource]] = None + one_of_schemas: Set[str] = { "InlineDatasetSource", "SavedQueryDatasetSource", "SqlQueryDatasetSource", "UploadDatasetSource", "UrlDatasetSource" } model_config = ConfigDict( validate_assignment=True, @@ -63,6 +72,21 @@ def actual_instance_must_validate_oneof(cls, v): error_messages.append(f"Error! Input type `{type(v)}` is not `UploadDatasetSource`") else: match += 1 + # validate data type: SavedQueryDatasetSource + if not isinstance(v, SavedQueryDatasetSource): + error_messages.append(f"Error! Input type `{type(v)}` is not `SavedQueryDatasetSource`") + else: + match += 1 + # validate data type: SqlQueryDatasetSource + if not isinstance(v, SqlQueryDatasetSource): + error_messages.append(f"Error! Input type `{type(v)}` is not `SqlQueryDatasetSource`") + else: + match += 1 + # validate data type: UrlDatasetSource + if not isinstance(v, UrlDatasetSource): + error_messages.append(f"Error! Input type `{type(v)}` is not `UrlDatasetSource`") + else: + match += 1 # validate data type: InlineDatasetSource if not isinstance(v, InlineDatasetSource): error_messages.append(f"Error! Input type `{type(v)}` is not `InlineDatasetSource`") @@ -70,10 +94,10 @@ def actual_instance_must_validate_oneof(cls, v): match += 1 if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in DatasetSource with oneOf schemas: InlineDatasetSource, UploadDatasetSource. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when setting `actual_instance` in DatasetSource with oneOf schemas: InlineDatasetSource, SavedQueryDatasetSource, SqlQueryDatasetSource, UploadDatasetSource, UrlDatasetSource. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in DatasetSource with oneOf schemas: InlineDatasetSource, UploadDatasetSource. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting `actual_instance` in DatasetSource with oneOf schemas: InlineDatasetSource, SavedQueryDatasetSource, SqlQueryDatasetSource, UploadDatasetSource, UrlDatasetSource. Details: " + ", ".join(error_messages)) else: return v @@ -94,6 +118,24 @@ def from_json(cls, json_str: str) -> Self: match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) + # deserialize data into SavedQueryDatasetSource + try: + instance.actual_instance = SavedQueryDatasetSource.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SqlQueryDatasetSource + try: + instance.actual_instance = SqlQueryDatasetSource.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into UrlDatasetSource + try: + instance.actual_instance = UrlDatasetSource.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) # deserialize data into InlineDatasetSource try: instance.actual_instance = InlineDatasetSource.from_json(json_str) @@ -103,10 +145,10 @@ def from_json(cls, json_str: str) -> Self: if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into DatasetSource with oneOf schemas: InlineDatasetSource, UploadDatasetSource. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when deserializing the JSON string into DatasetSource with oneOf schemas: InlineDatasetSource, SavedQueryDatasetSource, SqlQueryDatasetSource, UploadDatasetSource, UrlDatasetSource. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into DatasetSource with oneOf schemas: InlineDatasetSource, UploadDatasetSource. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into DatasetSource with oneOf schemas: InlineDatasetSource, SavedQueryDatasetSource, SqlQueryDatasetSource, UploadDatasetSource, UrlDatasetSource. Details: " + ", ".join(error_messages)) else: return instance @@ -120,7 +162,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], InlineDatasetSource, UploadDatasetSource]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], InlineDatasetSource, SavedQueryDatasetSource, SqlQueryDatasetSource, UploadDatasetSource, UrlDatasetSource]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/hotdata/models/dataset_summary.py b/hotdata/models/dataset_summary.py index e0c6d9b..7bb4bf6 100644 --- a/hotdata/models/dataset_summary.py +++ b/hotdata/models/dataset_summary.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -19,8 +19,8 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -31,9 +31,12 @@ class DatasetSummary(BaseModel): created_at: datetime id: StrictStr label: StrictStr + latest_version: StrictInt + pinned_version: Optional[StrictInt] = None + schema_name: StrictStr table_name: StrictStr updated_at: datetime - __properties: ClassVar[List[str]] = ["created_at", "id", "label", "table_name", "updated_at"] + __properties: ClassVar[List[str]] = ["created_at", "id", "label", "latest_version", "pinned_version", "schema_name", "table_name", "updated_at"] model_config = ConfigDict( populate_by_name=True, @@ -74,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if pinned_version (nullable) is None + # and model_fields_set contains the field + if self.pinned_version is None and "pinned_version" in self.model_fields_set: + _dict['pinned_version'] = None + return _dict @classmethod @@ -89,6 +97,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "created_at": obj.get("created_at"), "id": obj.get("id"), "label": obj.get("label"), + "latest_version": obj.get("latest_version"), + "pinned_version": obj.get("pinned_version"), + "schema_name": obj.get("schema_name"), "table_name": obj.get("table_name"), "updated_at": obj.get("updated_at") }) diff --git a/hotdata/models/dataset_version_summary.py b/hotdata/models/dataset_version_summary.py new file mode 100644 index 0000000..7dfa1bd --- /dev/null +++ b/hotdata/models/dataset_version_summary.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class DatasetVersionSummary(BaseModel): + """ + Dataset version summary + """ # noqa: E501 + created_at: datetime + id: StrictStr + source_type: StrictStr + version: StrictInt + __properties: ClassVar[List[str]] = ["created_at", "id", "source_type", "version"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DatasetVersionSummary from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DatasetVersionSummary from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "created_at": obj.get("created_at"), + "id": obj.get("id"), + "source_type": obj.get("source_type"), + "version": obj.get("version") + }) + return _obj + + diff --git a/hotdata/models/discovery_status.py b/hotdata/models/discovery_status.py index 18e5bcc..e72b827 100644 --- a/hotdata/models/discovery_status.py +++ b/hotdata/models/discovery_status.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/embedding_provider_response.py b/hotdata/models/embedding_provider_response.py new file mode 100644 index 0000000..67aa9bd --- /dev/null +++ b/hotdata/models/embedding_provider_response.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class EmbeddingProviderResponse(BaseModel): + """ + Single embedding provider for API responses + """ # noqa: E501 + config: Optional[Any] + created_at: datetime + has_secret: StrictBool + id: StrictStr + name: StrictStr + provider_type: StrictStr + source: StrictStr = Field(description="Provider source: \"system\" (from config) or \"user\" (created via API).") + updated_at: datetime + __properties: ClassVar[List[str]] = ["config", "created_at", "has_secret", "id", "name", "provider_type", "source", "updated_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EmbeddingProviderResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if config (nullable) is None + # and model_fields_set contains the field + if self.config is None and "config" in self.model_fields_set: + _dict['config'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EmbeddingProviderResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "config": obj.get("config"), + "created_at": obj.get("created_at"), + "has_secret": obj.get("has_secret"), + "id": obj.get("id"), + "name": obj.get("name"), + "provider_type": obj.get("provider_type"), + "source": obj.get("source"), + "updated_at": obj.get("updated_at") + }) + return _obj + + diff --git a/hotdata/models/error.py b/hotdata/models/error.py index 08a2c52..e9519de 100644 --- a/hotdata/models/error.py +++ b/hotdata/models/error.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/execute_saved_query_request.py b/hotdata/models/execute_saved_query_request.py index 520bb9c..aa1f04b 100644 --- a/hotdata/models/execute_saved_query_request.py +++ b/hotdata/models/execute_saved_query_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/get_connection_response.py b/hotdata/models/get_connection_response.py index ef55ba4..5164a6f 100644 --- a/hotdata/models/get_connection_response.py +++ b/hotdata/models/get_connection_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/get_dataset_response.py b/hotdata/models/get_dataset_response.py index ae8cd94..6fc3d5f 100644 --- a/hotdata/models/get_dataset_response.py +++ b/hotdata/models/get_dataset_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -19,8 +19,8 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional from hotdata.models.column_info import ColumnInfo from typing import Optional, Set from typing_extensions import Self @@ -33,11 +33,13 @@ class GetDatasetResponse(BaseModel): created_at: datetime id: StrictStr label: StrictStr + latest_version: StrictInt + pinned_version: Optional[StrictInt] = None schema_name: StrictStr source_type: StrictStr table_name: StrictStr updated_at: datetime - __properties: ClassVar[List[str]] = ["columns", "created_at", "id", "label", "schema_name", "source_type", "table_name", "updated_at"] + __properties: ClassVar[List[str]] = ["columns", "created_at", "id", "label", "latest_version", "pinned_version", "schema_name", "source_type", "table_name", "updated_at"] model_config = ConfigDict( populate_by_name=True, @@ -85,6 +87,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_columns: _items.append(_item_columns.to_dict()) _dict['columns'] = _items + # set to None if pinned_version (nullable) is None + # and model_fields_set contains the field + if self.pinned_version is None and "pinned_version" in self.model_fields_set: + _dict['pinned_version'] = None + return _dict @classmethod @@ -101,6 +108,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "created_at": obj.get("created_at"), "id": obj.get("id"), "label": obj.get("label"), + "latest_version": obj.get("latest_version"), + "pinned_version": obj.get("pinned_version"), "schema_name": obj.get("schema_name"), "source_type": obj.get("source_type"), "table_name": obj.get("table_name"), diff --git a/hotdata/models/get_result_response.py b/hotdata/models/get_result_response.py index 611b924..d1b6b12 100644 --- a/hotdata/models/get_result_response.py +++ b/hotdata/models/get_result_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/get_secret_response.py b/hotdata/models/get_secret_response.py index b0529f2..5976b39 100644 --- a/hotdata/models/get_secret_response.py +++ b/hotdata/models/get_secret_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/index_info_response.py b/hotdata/models/index_info_response.py new file mode 100644 index 0000000..72f9d62 --- /dev/null +++ b/hotdata/models/index_info_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hotdata.models.index_status import IndexStatus +from typing import Optional, Set +from typing_extensions import Self + +class IndexInfoResponse(BaseModel): + """ + Result payload for a `create_index` job, and response for index endpoints. + """ # noqa: E501 + columns: List[StrictStr] + created_at: datetime + index_name: StrictStr + index_type: StrictStr + metric: Optional[StrictStr] = Field(default=None, description="Distance metric this index was built with. Only present for vector indexes.") + status: IndexStatus + updated_at: datetime + __properties: ClassVar[List[str]] = ["columns", "created_at", "index_name", "index_type", "metric", "status", "updated_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IndexInfoResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if metric (nullable) is None + # and model_fields_set contains the field + if self.metric is None and "metric" in self.model_fields_set: + _dict['metric'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IndexInfoResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "columns": obj.get("columns"), + "created_at": obj.get("created_at"), + "index_name": obj.get("index_name"), + "index_type": obj.get("index_type"), + "metric": obj.get("metric"), + "status": obj.get("status"), + "updated_at": obj.get("updated_at") + }) + return _obj + + diff --git a/hotdata/models/index_status.py b/hotdata/models/index_status.py new file mode 100644 index 0000000..e1e7a19 --- /dev/null +++ b/hotdata/models/index_status.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class IndexStatus(str, Enum): + """ + Index build status exposed to API consumers. + """ + + """ + allowed enum values + """ + READY = 'ready' + PENDING = 'pending' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of IndexStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/hotdata/models/information_schema_response.py b/hotdata/models/information_schema_response.py index ce275f8..8c5ce17 100644 --- a/hotdata/models/information_schema_response.py +++ b/hotdata/models/information_schema_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/inline_data.py b/hotdata/models/inline_data.py index 0120af6..bf2d32b 100644 --- a/hotdata/models/inline_data.py +++ b/hotdata/models/inline_data.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/inline_dataset_source.py b/hotdata/models/inline_dataset_source.py index 9ee85ef..d1a4c00 100644 --- a/hotdata/models/inline_dataset_source.py +++ b/hotdata/models/inline_dataset_source.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/job_result.py b/hotdata/models/job_result.py new file mode 100644 index 0000000..ec31472 --- /dev/null +++ b/hotdata/models/job_result.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from hotdata.models.connection_refresh_result import ConnectionRefreshResult +from hotdata.models.index_info_response import IndexInfoResponse +from hotdata.models.table_refresh_result import TableRefreshResult +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +JOBRESULT_ONE_OF_SCHEMAS = ["ConnectionRefreshResult", "IndexInfoResponse", "TableRefreshResult"] + +class JobResult(BaseModel): + """ + Job-specific result payload. The shape depends on the job type. Null while the job is pending or running. + """ + # data type: TableRefreshResult + oneof_schema_1_validator: Optional[TableRefreshResult] = Field(default=None, description="Result of a single table data refresh.") + # data type: ConnectionRefreshResult + oneof_schema_2_validator: Optional[ConnectionRefreshResult] = Field(default=None, description="Result of a connection-wide data refresh.") + # data type: IndexInfoResponse + oneof_schema_3_validator: Optional[IndexInfoResponse] = Field(default=None, description="Result of an index creation.") + actual_instance: Optional[Union[ConnectionRefreshResult, IndexInfoResponse, TableRefreshResult]] = None + one_of_schemas: Set[str] = { "ConnectionRefreshResult", "IndexInfoResponse", "TableRefreshResult" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = JobResult.model_construct() + error_messages = [] + match = 0 + # validate data type: TableRefreshResult + if not isinstance(v, TableRefreshResult): + error_messages.append(f"Error! Input type `{type(v)}` is not `TableRefreshResult`") + else: + match += 1 + # validate data type: ConnectionRefreshResult + if not isinstance(v, ConnectionRefreshResult): + error_messages.append(f"Error! Input type `{type(v)}` is not `ConnectionRefreshResult`") + else: + match += 1 + # validate data type: IndexInfoResponse + if not isinstance(v, IndexInfoResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `IndexInfoResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in JobResult with oneOf schemas: ConnectionRefreshResult, IndexInfoResponse, TableRefreshResult. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in JobResult with oneOf schemas: ConnectionRefreshResult, IndexInfoResponse, TableRefreshResult. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into TableRefreshResult + try: + instance.actual_instance = TableRefreshResult.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ConnectionRefreshResult + try: + instance.actual_instance = ConnectionRefreshResult.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into IndexInfoResponse + try: + instance.actual_instance = IndexInfoResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into JobResult with oneOf schemas: ConnectionRefreshResult, IndexInfoResponse, TableRefreshResult. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into JobResult with oneOf schemas: ConnectionRefreshResult, IndexInfoResponse, TableRefreshResult. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ConnectionRefreshResult, IndexInfoResponse, TableRefreshResult]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/hotdata/models/job_status.py b/hotdata/models/job_status.py new file mode 100644 index 0000000..2b31500 --- /dev/null +++ b/hotdata/models/job_status.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class JobStatus(str, Enum): + """ + Current status of a background job. + """ + + """ + allowed enum values + """ + PENDING = 'pending' + RUNNING = 'running' + SUCCEEDED = 'succeeded' + PARTIALLY_SUCCEEDED = 'partially_succeeded' + FAILED = 'failed' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of JobStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/hotdata/models/job_status_response.py b/hotdata/models/job_status_response.py new file mode 100644 index 0000000..ea596da --- /dev/null +++ b/hotdata/models/job_status_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hotdata.models.job_result import JobResult +from hotdata.models.job_status import JobStatus +from hotdata.models.job_type import JobType +from typing import Optional, Set +from typing_extensions import Self + +class JobStatusResponse(BaseModel): + """ + Response body for GET /v1/jobs/{id} + """ # noqa: E501 + attempts: StrictInt = Field(description="Number of execution attempts (including the current one).") + completed_at: Optional[datetime] = None + created_at: datetime + error_message: Optional[StrictStr] = Field(default=None, description="Error or warning message. Set when status is `failed` or `partially_succeeded`.") + id: StrictStr + job_type: JobType + result: Optional[JobResult] = Field(default=None, description="Job-specific result payload. Null while the job is pending or running.") + status: JobStatus + __properties: ClassVar[List[str]] = ["attempts", "completed_at", "created_at", "error_message", "id", "job_type", "result", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of JobStatusResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of result + if self.result: + _dict['result'] = self.result.to_dict() + # set to None if completed_at (nullable) is None + # and model_fields_set contains the field + if self.completed_at is None and "completed_at" in self.model_fields_set: + _dict['completed_at'] = None + + # set to None if error_message (nullable) is None + # and model_fields_set contains the field + if self.error_message is None and "error_message" in self.model_fields_set: + _dict['error_message'] = None + + # set to None if result (nullable) is None + # and model_fields_set contains the field + if self.result is None and "result" in self.model_fields_set: + _dict['result'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JobStatusResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attempts": obj.get("attempts"), + "completed_at": obj.get("completed_at"), + "created_at": obj.get("created_at"), + "error_message": obj.get("error_message"), + "id": obj.get("id"), + "job_type": obj.get("job_type"), + "result": JobResult.from_dict(obj["result"]) if obj.get("result") is not None else None, + "status": obj.get("status") + }) + return _obj + + diff --git a/hotdata/models/job_type.py b/hotdata/models/job_type.py new file mode 100644 index 0000000..7783b49 --- /dev/null +++ b/hotdata/models/job_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class JobType(str, Enum): + """ + Background job types returned by the API. + """ + + """ + allowed enum values + """ + NOOP = 'noop' + DATA_REFRESH_TABLE = 'data_refresh_table' + DATA_REFRESH_CONNECTION = 'data_refresh_connection' + CREATE_INDEX = 'create_index' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of JobType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/hotdata/models/list_connection_types_response.py b/hotdata/models/list_connection_types_response.py new file mode 100644 index 0000000..cfe67ba --- /dev/null +++ b/hotdata/models/list_connection_types_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from hotdata.models.connection_type_summary import ConnectionTypeSummary +from typing import Optional, Set +from typing_extensions import Self + +class ListConnectionTypesResponse(BaseModel): + """ + ListConnectionTypesResponse + """ # noqa: E501 + connection_types: List[ConnectionTypeSummary] + __properties: ClassVar[List[str]] = ["connection_types"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListConnectionTypesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in connection_types (list) + _items = [] + if self.connection_types: + for _item_connection_types in self.connection_types: + if _item_connection_types: + _items.append(_item_connection_types.to_dict()) + _dict['connection_types'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListConnectionTypesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "connection_types": [ConnectionTypeSummary.from_dict(_item) for _item in obj["connection_types"]] if obj.get("connection_types") is not None else None + }) + return _obj + + diff --git a/hotdata/models/list_connections_response.py b/hotdata/models/list_connections_response.py index 4a43d1f..a5b6c9c 100644 --- a/hotdata/models/list_connections_response.py +++ b/hotdata/models/list_connections_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/list_dataset_versions_response.py b/hotdata/models/list_dataset_versions_response.py new file mode 100644 index 0000000..6ec6618 --- /dev/null +++ b/hotdata/models/list_dataset_versions_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from hotdata.models.dataset_version_summary import DatasetVersionSummary +from typing import Optional, Set +from typing_extensions import Self + +class ListDatasetVersionsResponse(BaseModel): + """ + Response body for GET /v1/datasets/{id}/versions + """ # noqa: E501 + count: Annotated[int, Field(strict=True, ge=0)] + dataset_id: StrictStr + has_more: StrictBool + limit: Annotated[int, Field(strict=True, ge=0)] + offset: Annotated[int, Field(strict=True, ge=0)] + versions: List[DatasetVersionSummary] + __properties: ClassVar[List[str]] = ["count", "dataset_id", "has_more", "limit", "offset", "versions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListDatasetVersionsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in versions (list) + _items = [] + if self.versions: + for _item_versions in self.versions: + if _item_versions: + _items.append(_item_versions.to_dict()) + _dict['versions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListDatasetVersionsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "count": obj.get("count"), + "dataset_id": obj.get("dataset_id"), + "has_more": obj.get("has_more"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "versions": [DatasetVersionSummary.from_dict(_item) for _item in obj["versions"]] if obj.get("versions") is not None else None + }) + return _obj + + diff --git a/hotdata/models/list_datasets_response.py b/hotdata/models/list_datasets_response.py index a2df479..0fe049f 100644 --- a/hotdata/models/list_datasets_response.py +++ b/hotdata/models/list_datasets_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/list_embedding_providers_response.py b/hotdata/models/list_embedding_providers_response.py new file mode 100644 index 0000000..8696111 --- /dev/null +++ b/hotdata/models/list_embedding_providers_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from hotdata.models.embedding_provider_response import EmbeddingProviderResponse +from typing import Optional, Set +from typing_extensions import Self + +class ListEmbeddingProvidersResponse(BaseModel): + """ + Response body for GET /embedding-providers + """ # noqa: E501 + embedding_providers: List[EmbeddingProviderResponse] + __properties: ClassVar[List[str]] = ["embedding_providers"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListEmbeddingProvidersResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in embedding_providers (list) + _items = [] + if self.embedding_providers: + for _item_embedding_providers in self.embedding_providers: + if _item_embedding_providers: + _items.append(_item_embedding_providers.to_dict()) + _dict['embedding_providers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListEmbeddingProvidersResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "embedding_providers": [EmbeddingProviderResponse.from_dict(_item) for _item in obj["embedding_providers"]] if obj.get("embedding_providers") is not None else None + }) + return _obj + + diff --git a/hotdata/models/list_indexes_response.py b/hotdata/models/list_indexes_response.py new file mode 100644 index 0000000..ef27b3d --- /dev/null +++ b/hotdata/models/list_indexes_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from hotdata.models.index_info_response import IndexInfoResponse +from typing import Optional, Set +from typing_extensions import Self + +class ListIndexesResponse(BaseModel): + """ + Response body for GET .../indexes + """ # noqa: E501 + indexes: List[IndexInfoResponse] + __properties: ClassVar[List[str]] = ["indexes"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListIndexesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in indexes (list) + _items = [] + if self.indexes: + for _item_indexes in self.indexes: + if _item_indexes: + _items.append(_item_indexes.to_dict()) + _dict['indexes'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListIndexesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "indexes": [IndexInfoResponse.from_dict(_item) for _item in obj["indexes"]] if obj.get("indexes") is not None else None + }) + return _obj + + diff --git a/hotdata/models/list_jobs_response.py b/hotdata/models/list_jobs_response.py new file mode 100644 index 0000000..6779bc5 --- /dev/null +++ b/hotdata/models/list_jobs_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from hotdata.models.job_status_response import JobStatusResponse +from typing import Optional, Set +from typing_extensions import Self + +class ListJobsResponse(BaseModel): + """ + Response body for GET /v1/jobs + """ # noqa: E501 + jobs: List[JobStatusResponse] + __properties: ClassVar[List[str]] = ["jobs"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListJobsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in jobs (list) + _items = [] + if self.jobs: + for _item_jobs in self.jobs: + if _item_jobs: + _items.append(_item_jobs.to_dict()) + _dict['jobs'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListJobsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "jobs": [JobStatusResponse.from_dict(_item) for _item in obj["jobs"]] if obj.get("jobs") is not None else None + }) + return _obj + + diff --git a/hotdata/models/list_query_runs_response.py b/hotdata/models/list_query_runs_response.py index ef4e53c..5493960 100644 --- a/hotdata/models/list_query_runs_response.py +++ b/hotdata/models/list_query_runs_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/list_results_response.py b/hotdata/models/list_results_response.py index 35a2683..f5da477 100644 --- a/hotdata/models/list_results_response.py +++ b/hotdata/models/list_results_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/list_saved_queries_response.py b/hotdata/models/list_saved_queries_response.py index 29ab470..110cbc1 100644 --- a/hotdata/models/list_saved_queries_response.py +++ b/hotdata/models/list_saved_queries_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/list_saved_query_versions_response.py b/hotdata/models/list_saved_query_versions_response.py index 1f81a8d..1f0a3c6 100644 --- a/hotdata/models/list_saved_query_versions_response.py +++ b/hotdata/models/list_saved_query_versions_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/list_secrets_response.py b/hotdata/models/list_secrets_response.py index 2cb7b0e..878a553 100644 --- a/hotdata/models/list_secrets_response.py +++ b/hotdata/models/list_secrets_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/list_uploads_response.py b/hotdata/models/list_uploads_response.py index 8fefa4f..8566d5a 100644 --- a/hotdata/models/list_uploads_response.py +++ b/hotdata/models/list_uploads_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/list_workspaces_response.py b/hotdata/models/list_workspaces_response.py index b1aec18..1b01e73 100644 --- a/hotdata/models/list_workspaces_response.py +++ b/hotdata/models/list_workspaces_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/numeric_profile_detail.py b/hotdata/models/numeric_profile_detail.py index 946cb88..d8189ae 100644 --- a/hotdata/models/numeric_profile_detail.py +++ b/hotdata/models/numeric_profile_detail.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/query_request.py b/hotdata/models/query_request.py index abf06b8..eeba954 100644 --- a/hotdata/models/query_request.py +++ b/hotdata/models/query_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -18,8 +18,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from typing import Optional, Set from typing_extensions import Self @@ -27,8 +28,10 @@ class QueryRequest(BaseModel): """ Request body for POST /query """ # noqa: E501 + var_async: Optional[StrictBool] = Field(default=None, description="When true, execute the query asynchronously and return a query run ID for polling via GET /query-runs/{id}. The query results can be retrieved via GET /results/{id} once the query run status is \"succeeded\".", alias="async") + async_after_ms: Optional[Annotated[int, Field(strict=True, ge=1000)]] = Field(default=None, description="If set with async=true, wait up to this many milliseconds for the query to complete synchronously before returning an async response. Minimum 1000ms. Ignored if async is false.") sql: StrictStr - __properties: ClassVar[List[str]] = ["sql"] + __properties: ClassVar[List[str]] = ["async", "async_after_ms", "sql"] model_config = ConfigDict( populate_by_name=True, @@ -69,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if async_after_ms (nullable) is None + # and model_fields_set contains the field + if self.async_after_ms is None and "async_after_ms" in self.model_fields_set: + _dict['async_after_ms'] = None + return _dict @classmethod @@ -81,6 +89,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "async": obj.get("async"), + "async_after_ms": obj.get("async_after_ms"), "sql": obj.get("sql") }) return _obj diff --git a/hotdata/models/query_response.py b/hotdata/models/query_response.py index 679bff9..c24eb73 100644 --- a/hotdata/models/query_response.py +++ b/hotdata/models/query_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/query_run_info.py b/hotdata/models/query_run_info.py index cd01211..327c36c 100644 --- a/hotdata/models/query_run_info.py +++ b/hotdata/models/query_run_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -19,7 +19,7 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -37,13 +37,15 @@ class QueryRunInfo(BaseModel): row_count: Optional[StrictInt] = None saved_query_id: Optional[StrictStr] = None saved_query_version: Optional[StrictInt] = None + server_processing_ms: Optional[StrictInt] = Field(default=None, description="Total server-side processing time for this query (milliseconds). Measured from query start to result ready. Includes SQL execution, task spawning, and result preparation. Does not include network transit. Populated for all completed query runs (sync and async).") snapshot_id: StrictStr sql_hash: StrictStr sql_text: StrictStr status: StrictStr trace_id: Optional[StrictStr] = None + user_public_id: Optional[StrictStr] = Field(default=None, description="Caller identity derived from the Authorization Bearer token (SHA-256 hash). Format: `user_{first_10_hex_chars}`. Mirrors the webapp's `user_public_id_from_auth_header`.") warning_message: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["completed_at", "created_at", "error_message", "execution_time_ms", "id", "result_id", "row_count", "saved_query_id", "saved_query_version", "snapshot_id", "sql_hash", "sql_text", "status", "trace_id", "warning_message"] + __properties: ClassVar[List[str]] = ["completed_at", "created_at", "error_message", "execution_time_ms", "id", "result_id", "row_count", "saved_query_id", "saved_query_version", "server_processing_ms", "snapshot_id", "sql_hash", "sql_text", "status", "trace_id", "user_public_id", "warning_message"] model_config = ConfigDict( populate_by_name=True, @@ -119,11 +121,21 @@ def to_dict(self) -> Dict[str, Any]: if self.saved_query_version is None and "saved_query_version" in self.model_fields_set: _dict['saved_query_version'] = None + # set to None if server_processing_ms (nullable) is None + # and model_fields_set contains the field + if self.server_processing_ms is None and "server_processing_ms" in self.model_fields_set: + _dict['server_processing_ms'] = None + # set to None if trace_id (nullable) is None # and model_fields_set contains the field if self.trace_id is None and "trace_id" in self.model_fields_set: _dict['trace_id'] = None + # set to None if user_public_id (nullable) is None + # and model_fields_set contains the field + if self.user_public_id is None and "user_public_id" in self.model_fields_set: + _dict['user_public_id'] = None + # set to None if warning_message (nullable) is None # and model_fields_set contains the field if self.warning_message is None and "warning_message" in self.model_fields_set: @@ -150,11 +162,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "row_count": obj.get("row_count"), "saved_query_id": obj.get("saved_query_id"), "saved_query_version": obj.get("saved_query_version"), + "server_processing_ms": obj.get("server_processing_ms"), "snapshot_id": obj.get("snapshot_id"), "sql_hash": obj.get("sql_hash"), "sql_text": obj.get("sql_text"), "status": obj.get("status"), "trace_id": obj.get("trace_id"), + "user_public_id": obj.get("user_public_id"), "warning_message": obj.get("warning_message") }) return _obj diff --git a/hotdata/models/refresh_dataset_response.py b/hotdata/models/refresh_dataset_response.py new file mode 100644 index 0000000..3fff2fa --- /dev/null +++ b/hotdata/models/refresh_dataset_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class RefreshDatasetResponse(BaseModel): + """ + Response body for POST /v1/datasets/{id}/refresh + """ # noqa: E501 + created_at: datetime + id: StrictStr + status: StrictStr + version: StrictInt + __properties: ClassVar[List[str]] = ["created_at", "id", "status", "version"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RefreshDatasetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RefreshDatasetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "created_at": obj.get("created_at"), + "id": obj.get("id"), + "status": obj.get("status"), + "version": obj.get("version") + }) + return _obj + + diff --git a/hotdata/models/refresh_request.py b/hotdata/models/refresh_request.py index 0cbf574..1c423cb 100644 --- a/hotdata/models/refresh_request.py +++ b/hotdata/models/refresh_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -27,12 +27,14 @@ class RefreshRequest(BaseModel): """ Request body for POST /refresh """ # noqa: E501 + var_async: Optional[StrictBool] = Field(default=None, description="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.", alias="async") connection_id: Optional[StrictStr] = None data: Optional[StrictBool] = None + dataset_id: Optional[StrictStr] = None include_uncached: Optional[StrictBool] = Field(default=None, description="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.") schema_name: Optional[StrictStr] = None table_name: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["connection_id", "data", "include_uncached", "schema_name", "table_name"] + __properties: ClassVar[List[str]] = ["async", "connection_id", "data", "dataset_id", "include_uncached", "schema_name", "table_name"] model_config = ConfigDict( populate_by_name=True, @@ -78,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: if self.connection_id is None and "connection_id" in self.model_fields_set: _dict['connection_id'] = None + # set to None if dataset_id (nullable) is None + # and model_fields_set contains the field + if self.dataset_id is None and "dataset_id" in self.model_fields_set: + _dict['dataset_id'] = None + # set to None if schema_name (nullable) is None # and model_fields_set contains the field if self.schema_name is None and "schema_name" in self.model_fields_set: @@ -100,8 +107,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "async": obj.get("async"), "connection_id": obj.get("connection_id"), "data": obj.get("data"), + "dataset_id": obj.get("dataset_id"), "include_uncached": obj.get("include_uncached"), "schema_name": obj.get("schema_name"), "table_name": obj.get("table_name") diff --git a/hotdata/models/refresh_response.py b/hotdata/models/refresh_response.py index 095c42f..37e6511 100644 --- a/hotdata/models/refresh_response.py +++ b/hotdata/models/refresh_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -19,13 +19,15 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional from hotdata.models.connection_refresh_result import ConnectionRefreshResult +from hotdata.models.refresh_dataset_response import RefreshDatasetResponse from hotdata.models.schema_refresh_result import SchemaRefreshResult +from hotdata.models.submit_job_response import SubmitJobResponse from hotdata.models.table_refresh_result import TableRefreshResult from pydantic import StrictStr, Field from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self -REFRESHRESPONSE_ONE_OF_SCHEMAS = ["ConnectionRefreshResult", "SchemaRefreshResult", "TableRefreshResult"] +REFRESHRESPONSE_ONE_OF_SCHEMAS = ["ConnectionRefreshResult", "RefreshDatasetResponse", "SchemaRefreshResult", "SubmitJobResponse", "TableRefreshResult"] class RefreshResponse(BaseModel): """ @@ -37,8 +39,12 @@ class RefreshResponse(BaseModel): oneof_schema_2_validator: Optional[TableRefreshResult] = None # data type: ConnectionRefreshResult oneof_schema_3_validator: Optional[ConnectionRefreshResult] = None - actual_instance: Optional[Union[ConnectionRefreshResult, SchemaRefreshResult, TableRefreshResult]] = None - one_of_schemas: Set[str] = { "ConnectionRefreshResult", "SchemaRefreshResult", "TableRefreshResult" } + # data type: RefreshDatasetResponse + oneof_schema_4_validator: Optional[RefreshDatasetResponse] = None + # data type: SubmitJobResponse + oneof_schema_5_validator: Optional[SubmitJobResponse] = None + actual_instance: Optional[Union[ConnectionRefreshResult, RefreshDatasetResponse, SchemaRefreshResult, SubmitJobResponse, TableRefreshResult]] = None + one_of_schemas: Set[str] = { "ConnectionRefreshResult", "RefreshDatasetResponse", "SchemaRefreshResult", "SubmitJobResponse", "TableRefreshResult" } model_config = ConfigDict( validate_assignment=True, @@ -76,12 +82,22 @@ def actual_instance_must_validate_oneof(cls, v): error_messages.append(f"Error! Input type `{type(v)}` is not `ConnectionRefreshResult`") else: match += 1 + # validate data type: RefreshDatasetResponse + if not isinstance(v, RefreshDatasetResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `RefreshDatasetResponse`") + else: + match += 1 + # validate data type: SubmitJobResponse + if not isinstance(v, SubmitJobResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `SubmitJobResponse`") + else: + match += 1 if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in RefreshResponse with oneOf schemas: ConnectionRefreshResult, SchemaRefreshResult, TableRefreshResult. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when setting `actual_instance` in RefreshResponse with oneOf schemas: ConnectionRefreshResult, RefreshDatasetResponse, SchemaRefreshResult, SubmitJobResponse, TableRefreshResult. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in RefreshResponse with oneOf schemas: ConnectionRefreshResult, SchemaRefreshResult, TableRefreshResult. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting `actual_instance` in RefreshResponse with oneOf schemas: ConnectionRefreshResult, RefreshDatasetResponse, SchemaRefreshResult, SubmitJobResponse, TableRefreshResult. Details: " + ", ".join(error_messages)) else: return v @@ -114,13 +130,25 @@ def from_json(cls, json_str: str) -> Self: match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) + # deserialize data into RefreshDatasetResponse + try: + instance.actual_instance = RefreshDatasetResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SubmitJobResponse + try: + instance.actual_instance = SubmitJobResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into RefreshResponse with oneOf schemas: ConnectionRefreshResult, SchemaRefreshResult, TableRefreshResult. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when deserializing the JSON string into RefreshResponse with oneOf schemas: ConnectionRefreshResult, RefreshDatasetResponse, SchemaRefreshResult, SubmitJobResponse, TableRefreshResult. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into RefreshResponse with oneOf schemas: ConnectionRefreshResult, SchemaRefreshResult, TableRefreshResult. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into RefreshResponse with oneOf schemas: ConnectionRefreshResult, RefreshDatasetResponse, SchemaRefreshResult, SubmitJobResponse, TableRefreshResult. Details: " + ", ".join(error_messages)) else: return instance @@ -134,7 +162,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], ConnectionRefreshResult, SchemaRefreshResult, TableRefreshResult]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], ConnectionRefreshResult, RefreshDatasetResponse, SchemaRefreshResult, SubmitJobResponse, TableRefreshResult]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/hotdata/models/refresh_warning.py b/hotdata/models/refresh_warning.py index 2b03724..cd46c79 100644 --- a/hotdata/models/refresh_warning.py +++ b/hotdata/models/refresh_warning.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/result_info.py b/hotdata/models/result_info.py index 5af6723..e9dfcea 100644 --- a/hotdata/models/result_info.py +++ b/hotdata/models/result_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/saved_query_dataset_source.py b/hotdata/models/saved_query_dataset_source.py new file mode 100644 index 0000000..6d839b8 --- /dev/null +++ b/hotdata/models/saved_query_dataset_source.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SavedQueryDatasetSource(BaseModel): + """ + Create dataset from a saved query result + """ # noqa: E501 + saved_query_id: StrictStr + version: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["saved_query_id", "version"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SavedQueryDatasetSource from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if version (nullable) is None + # and model_fields_set contains the field + if self.version is None and "version" in self.model_fields_set: + _dict['version'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SavedQueryDatasetSource from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "saved_query_id": obj.get("saved_query_id"), + "version": obj.get("version") + }) + return _obj + + diff --git a/hotdata/models/saved_query_detail.py b/hotdata/models/saved_query_detail.py index 4b21272..6bc8977 100644 --- a/hotdata/models/saved_query_detail.py +++ b/hotdata/models/saved_query_detail.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/saved_query_summary.py b/hotdata/models/saved_query_summary.py index 6ea52f6..d3a987d 100644 --- a/hotdata/models/saved_query_summary.py +++ b/hotdata/models/saved_query_summary.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/saved_query_version_info.py b/hotdata/models/saved_query_version_info.py index 0658bda..0c0e64b 100644 --- a/hotdata/models/saved_query_version_info.py +++ b/hotdata/models/saved_query_version_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/schema_refresh_result.py b/hotdata/models/schema_refresh_result.py index 39701e2..278d865 100644 --- a/hotdata/models/schema_refresh_result.py +++ b/hotdata/models/schema_refresh_result.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/secret_metadata_response.py b/hotdata/models/secret_metadata_response.py index f36087c..5b43785 100644 --- a/hotdata/models/secret_metadata_response.py +++ b/hotdata/models/secret_metadata_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/sql_query_dataset_source.py b/hotdata/models/sql_query_dataset_source.py new file mode 100644 index 0000000..5b21407 --- /dev/null +++ b/hotdata/models/sql_query_dataset_source.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SqlQueryDatasetSource(BaseModel): + """ + Create dataset from a SQL query (auto-creates a saved query) + """ # noqa: E501 + description: Optional[StrictStr] = Field(default=None, description="Optional description for the auto-created saved query.") + name: Optional[StrictStr] = Field(default=None, description="Optional name for the auto-created saved query. Defaults to the dataset label.") + sql: StrictStr + __properties: ClassVar[List[str]] = ["description", "name", "sql"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SqlQueryDatasetSource from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SqlQueryDatasetSource from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "description": obj.get("description"), + "name": obj.get("name"), + "sql": obj.get("sql") + }) + return _obj + + diff --git a/hotdata/models/submit_job_response.py b/hotdata/models/submit_job_response.py new file mode 100644 index 0000000..efee825 --- /dev/null +++ b/hotdata/models/submit_job_response.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from hotdata.models.job_status import JobStatus +from typing import Optional, Set +from typing_extensions import Self + +class SubmitJobResponse(BaseModel): + """ + Response returned by APIs that submit a background job (e.g., async refresh). + """ # noqa: E501 + id: StrictStr = Field(description="Job ID for status polling.") + status: JobStatus = Field(description="Current status of the submitted job.") + status_url: StrictStr = Field(description="URL to poll for job status.") + __properties: ClassVar[List[str]] = ["id", "status", "status_url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubmitJobResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubmitJobResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "status": obj.get("status"), + "status_url": obj.get("status_url") + }) + return _obj + + diff --git a/hotdata/models/table_info.py b/hotdata/models/table_info.py index cb9927c..6c24aa9 100644 --- a/hotdata/models/table_info.py +++ b/hotdata/models/table_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/table_profile_response.py b/hotdata/models/table_profile_response.py index 879e5c3..f1711dd 100644 --- a/hotdata/models/table_profile_response.py +++ b/hotdata/models/table_profile_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/table_refresh_error.py b/hotdata/models/table_refresh_error.py index abeae62..5906cf7 100644 --- a/hotdata/models/table_refresh_error.py +++ b/hotdata/models/table_refresh_error.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -25,7 +25,7 @@ class TableRefreshError(BaseModel): """ - Error details for a failed table refresh + Error details for a failed table refresh. """ # noqa: E501 error: StrictStr schema_name: StrictStr diff --git a/hotdata/models/table_refresh_result.py b/hotdata/models/table_refresh_result.py index 35b64da..ded1ec2 100644 --- a/hotdata/models/table_refresh_result.py +++ b/hotdata/models/table_refresh_result.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -27,7 +27,7 @@ class TableRefreshResult(BaseModel): """ - Response for single table data refresh + Result payload for a `data_refresh_table` job. """ # noqa: E501 connection_id: StrictStr duration_ms: Annotated[int, Field(strict=True, ge=0)] diff --git a/hotdata/models/temporal_profile_detail.py b/hotdata/models/temporal_profile_detail.py index 3b0aea4..775b141 100644 --- a/hotdata/models/temporal_profile_detail.py +++ b/hotdata/models/temporal_profile_detail.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/text_profile_detail.py b/hotdata/models/text_profile_detail.py index 0111543..eb3d10a 100644 --- a/hotdata/models/text_profile_detail.py +++ b/hotdata/models/text_profile_detail.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/update_dataset_request.py b/hotdata/models/update_dataset_request.py index ad397ad..c3012a1 100644 --- a/hotdata/models/update_dataset_request.py +++ b/hotdata/models/update_dataset_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -18,7 +18,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -28,8 +28,9 @@ class UpdateDatasetRequest(BaseModel): Request body for PUT /v1/datasets/{id} """ # noqa: E501 label: Optional[StrictStr] = None + pinned_version: Optional[StrictInt] = Field(default=None, description="Pin to a specific version, or send null to unpin. Omit the field entirely to leave pinning unchanged.") table_name: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["label", "table_name"] + __properties: ClassVar[List[str]] = ["label", "pinned_version", "table_name"] model_config = ConfigDict( populate_by_name=True, @@ -75,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: if self.label is None and "label" in self.model_fields_set: _dict['label'] = None + # set to None if pinned_version (nullable) is None + # and model_fields_set contains the field + if self.pinned_version is None and "pinned_version" in self.model_fields_set: + _dict['pinned_version'] = None + # set to None if table_name (nullable) is None # and model_fields_set contains the field if self.table_name is None and "table_name" in self.model_fields_set: @@ -93,6 +99,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "label": obj.get("label"), + "pinned_version": obj.get("pinned_version"), "table_name": obj.get("table_name") }) return _obj diff --git a/hotdata/models/update_dataset_response.py b/hotdata/models/update_dataset_response.py index 672ee99..9cee94f 100644 --- a/hotdata/models/update_dataset_response.py +++ b/hotdata/models/update_dataset_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -19,8 +19,8 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -30,9 +30,11 @@ class UpdateDatasetResponse(BaseModel): """ # noqa: E501 id: StrictStr label: StrictStr + latest_version: StrictInt + pinned_version: Optional[StrictInt] = None table_name: StrictStr updated_at: datetime - __properties: ClassVar[List[str]] = ["id", "label", "table_name", "updated_at"] + __properties: ClassVar[List[str]] = ["id", "label", "latest_version", "pinned_version", "table_name", "updated_at"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if pinned_version (nullable) is None + # and model_fields_set contains the field + if self.pinned_version is None and "pinned_version" in self.model_fields_set: + _dict['pinned_version'] = None + return _dict @classmethod @@ -87,6 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "label": obj.get("label"), + "latest_version": obj.get("latest_version"), + "pinned_version": obj.get("pinned_version"), "table_name": obj.get("table_name"), "updated_at": obj.get("updated_at") }) diff --git a/hotdata/models/update_embedding_provider_request.py b/hotdata/models/update_embedding_provider_request.py new file mode 100644 index 0000000..9bf67bc --- /dev/null +++ b/hotdata/models/update_embedding_provider_request.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UpdateEmbeddingProviderRequest(BaseModel): + """ + Request body for PUT /embedding-providers/{id} + """ # noqa: E501 + api_key: Optional[StrictStr] = Field(default=None, description="Inline API key. If provided, updates (or creates) the auto-managed secret.") + config: Optional[Any] = None + name: Optional[StrictStr] = None + secret_name: Optional[StrictStr] = Field(default=None, description="Secret name containing the API key. Pass null to clear.") + __properties: ClassVar[List[str]] = ["api_key", "config", "name", "secret_name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateEmbeddingProviderRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if api_key (nullable) is None + # and model_fields_set contains the field + if self.api_key is None and "api_key" in self.model_fields_set: + _dict['api_key'] = None + + # set to None if config (nullable) is None + # and model_fields_set contains the field + if self.config is None and "config" in self.model_fields_set: + _dict['config'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if secret_name (nullable) is None + # and model_fields_set contains the field + if self.secret_name is None and "secret_name" in self.model_fields_set: + _dict['secret_name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateEmbeddingProviderRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "api_key": obj.get("api_key"), + "config": obj.get("config"), + "name": obj.get("name"), + "secret_name": obj.get("secret_name") + }) + return _obj + + diff --git a/hotdata/models/update_embedding_provider_response.py b/hotdata/models/update_embedding_provider_response.py new file mode 100644 index 0000000..9dcef6a --- /dev/null +++ b/hotdata/models/update_embedding_provider_response.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class UpdateEmbeddingProviderResponse(BaseModel): + """ + Response body for PUT /embedding-providers/{id} + """ # noqa: E501 + id: StrictStr + name: StrictStr + updated_at: datetime + __properties: ClassVar[List[str]] = ["id", "name", "updated_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateEmbeddingProviderResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateEmbeddingProviderResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "updated_at": obj.get("updated_at") + }) + return _obj + + diff --git a/hotdata/models/update_saved_query_request.py b/hotdata/models/update_saved_query_request.py index 96635f6..b0996e1 100644 --- a/hotdata/models/update_saved_query_request.py +++ b/hotdata/models/update_saved_query_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/update_secret_request.py b/hotdata/models/update_secret_request.py index 60031ca..118dcab 100644 --- a/hotdata/models/update_secret_request.py +++ b/hotdata/models/update_secret_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/update_secret_response.py b/hotdata/models/update_secret_response.py index fe8b2dc..8b05af2 100644 --- a/hotdata/models/update_secret_response.py +++ b/hotdata/models/update_secret_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/upload_dataset_source.py b/hotdata/models/upload_dataset_source.py index 5e4361b..af9a35c 100644 --- a/hotdata/models/upload_dataset_source.py +++ b/hotdata/models/upload_dataset_source.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/upload_info.py b/hotdata/models/upload_info.py index 2b96c3f..2ff8a8b 100644 --- a/hotdata/models/upload_info.py +++ b/hotdata/models/upload_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/upload_response.py b/hotdata/models/upload_response.py index c32b3c4..c6b86dd 100644 --- a/hotdata/models/upload_response.py +++ b/hotdata/models/upload_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/url_dataset_source.py b/hotdata/models/url_dataset_source.py new file mode 100644 index 0000000..b4d917c --- /dev/null +++ b/hotdata/models/url_dataset_source.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UrlDatasetSource(BaseModel): + """ + Create dataset from an external HTTP URL + """ # noqa: E501 + columns: Optional[Dict[str, StrictStr]] = Field(default=None, description="Optional explicit column definitions. Keys are column names, values are type specs.") + format: Optional[StrictStr] = None + url: StrictStr + __properties: ClassVar[List[str]] = ["columns", "format", "url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UrlDatasetSource from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if format (nullable) is None + # and model_fields_set contains the field + if self.format is None and "format" in self.model_fields_set: + _dict['format'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UrlDatasetSource from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "columns": obj.get("columns"), + "format": obj.get("format"), + "url": obj.get("url") + }) + return _obj + + diff --git a/hotdata/models/workspace_detail.py b/hotdata/models/workspace_detail.py index 3612304..5d41b14 100644 --- a/hotdata/models/workspace_detail.py +++ b/hotdata/models/workspace_detail.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/workspace_list_item.py b/hotdata/models/workspace_list_item.py index 547bd2e..59ee5c2 100644 --- a/hotdata/models/workspace_list_item.py +++ b/hotdata/models/workspace_list_item.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/rest.py b/hotdata/rest.py index 60b03c2..a55f43d 100644 --- a/hotdata/rest.py +++ b/hotdata/rest.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/pyproject.toml b/pyproject.toml index 6282c2a..06bd2e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,13 @@ [project] name = "hotdata" version = "1.0.0" -description = "HotData API" +description = "Hotdata API" authors = [ - {name = "HotData",email = "developers@hotdata.dev"}, + {name = "Hotdata",email = "developers@hotdata.dev"}, ] license = { text = "MIT" } readme = "README.md" -keywords = ["OpenAPI", "OpenAPI-Generator", "HotData API"] +keywords = ["OpenAPI", "OpenAPI-Generator", "Hotdata API"] requires-python = ">=3.9" dependencies = [ diff --git a/setup.py b/setup.py index 716a551..06e176e 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -32,11 +32,11 @@ setup( name=NAME, version=VERSION, - description="HotData API", - author="HotData", + description="Hotdata API", + author="Hotdata", author_email="developers@hotdata.dev", url="", - keywords=["OpenAPI", "OpenAPI-Generator", "HotData API"], + keywords=["OpenAPI", "OpenAPI-Generator", "Hotdata API"], install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, diff --git a/test/test_async_query_response.py b/test/test_async_query_response.py new file mode 100644 index 0000000..d523f67 --- /dev/null +++ b/test/test_async_query_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.async_query_response import AsyncQueryResponse + +class TestAsyncQueryResponse(unittest.TestCase): + """AsyncQueryResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AsyncQueryResponse: + """Test AsyncQueryResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AsyncQueryResponse` + """ + model = AsyncQueryResponse() + if include_optional: + return AsyncQueryResponse( + query_run_id = '', + reason = '', + status = '', + status_url = '' + ) + else: + return AsyncQueryResponse( + query_run_id = '', + status = '', + status_url = '', + ) + """ + + def testAsyncQueryResponse(self): + """Test AsyncQueryResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_connection_type_detail.py b/test/test_connection_type_detail.py new file mode 100644 index 0000000..661ef2c --- /dev/null +++ b/test/test_connection_type_detail.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.connection_type_detail import ConnectionTypeDetail + +class TestConnectionTypeDetail(unittest.TestCase): + """ConnectionTypeDetail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ConnectionTypeDetail: + """Test ConnectionTypeDetail + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ConnectionTypeDetail` + """ + model = ConnectionTypeDetail() + if include_optional: + return ConnectionTypeDetail( + auth = None, + config_schema = None, + label = '', + name = '' + ) + else: + return ConnectionTypeDetail( + label = '', + name = '', + ) + """ + + def testConnectionTypeDetail(self): + """Test ConnectionTypeDetail""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_connection_type_summary.py b/test/test_connection_type_summary.py new file mode 100644 index 0000000..079c23a --- /dev/null +++ b/test/test_connection_type_summary.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.connection_type_summary import ConnectionTypeSummary + +class TestConnectionTypeSummary(unittest.TestCase): + """ConnectionTypeSummary unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ConnectionTypeSummary: + """Test ConnectionTypeSummary + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ConnectionTypeSummary` + """ + model = ConnectionTypeSummary() + if include_optional: + return ConnectionTypeSummary( + label = '', + name = '' + ) + else: + return ConnectionTypeSummary( + label = '', + name = '', + ) + """ + + def testConnectionTypeSummary(self): + """Test ConnectionTypeSummary""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_connection_types_api.py b/test/test_connection_types_api.py new file mode 100644 index 0000000..a258dda --- /dev/null +++ b/test/test_connection_types_api.py @@ -0,0 +1,46 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.api.connection_types_api import ConnectionTypesApi + + +class TestConnectionTypesApi(unittest.TestCase): + """ConnectionTypesApi unit test stubs""" + + def setUp(self) -> None: + self.api = ConnectionTypesApi() + + def tearDown(self) -> None: + pass + + def test_get_connection_type(self) -> None: + """Test case for get_connection_type + + Get connection type details + """ + pass + + def test_list_connection_types(self) -> None: + """Test case for list_connection_types + + List connection types + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_embedding_provider_request.py b/test/test_create_embedding_provider_request.py new file mode 100644 index 0000000..6a985a0 --- /dev/null +++ b/test/test_create_embedding_provider_request.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.create_embedding_provider_request import CreateEmbeddingProviderRequest + +class TestCreateEmbeddingProviderRequest(unittest.TestCase): + """CreateEmbeddingProviderRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateEmbeddingProviderRequest: + """Test CreateEmbeddingProviderRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateEmbeddingProviderRequest` + """ + model = CreateEmbeddingProviderRequest() + if include_optional: + return CreateEmbeddingProviderRequest( + api_key = '', + config = None, + name = '', + provider_type = '', + secret_name = '' + ) + else: + return CreateEmbeddingProviderRequest( + name = '', + provider_type = '', + ) + """ + + def testCreateEmbeddingProviderRequest(self): + """Test CreateEmbeddingProviderRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_embedding_provider_response.py b/test/test_create_embedding_provider_response.py new file mode 100644 index 0000000..38db39e --- /dev/null +++ b/test/test_create_embedding_provider_response.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.create_embedding_provider_response import CreateEmbeddingProviderResponse + +class TestCreateEmbeddingProviderResponse(unittest.TestCase): + """CreateEmbeddingProviderResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateEmbeddingProviderResponse: + """Test CreateEmbeddingProviderResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateEmbeddingProviderResponse` + """ + model = CreateEmbeddingProviderResponse() + if include_optional: + return CreateEmbeddingProviderResponse( + config = None, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + id = '', + name = '', + provider_type = '' + ) + else: + return CreateEmbeddingProviderResponse( + config = None, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + id = '', + name = '', + provider_type = '', + ) + """ + + def testCreateEmbeddingProviderResponse(self): + """Test CreateEmbeddingProviderResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_index_request.py b/test/test_create_index_request.py new file mode 100644 index 0000000..1e9499b --- /dev/null +++ b/test/test_create_index_request.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.create_index_request import CreateIndexRequest + +class TestCreateIndexRequest(unittest.TestCase): + """CreateIndexRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateIndexRequest: + """Test CreateIndexRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateIndexRequest` + """ + model = CreateIndexRequest() + if include_optional: + return CreateIndexRequest( + var_async = True, + columns = [ + '' + ], + description = '', + dimensions = 0, + embedding_provider_id = '', + index_name = '', + index_type = '', + metric = '', + output_column = '' + ) + else: + return CreateIndexRequest( + columns = [ + '' + ], + index_name = '', + ) + """ + + def testCreateIndexRequest(self): + """Test CreateIndexRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dataset_version_summary.py b/test/test_dataset_version_summary.py new file mode 100644 index 0000000..2ccabe6 --- /dev/null +++ b/test/test_dataset_version_summary.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.dataset_version_summary import DatasetVersionSummary + +class TestDatasetVersionSummary(unittest.TestCase): + """DatasetVersionSummary unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DatasetVersionSummary: + """Test DatasetVersionSummary + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DatasetVersionSummary` + """ + model = DatasetVersionSummary() + if include_optional: + return DatasetVersionSummary( + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + id = '', + source_type = '', + version = 56 + ) + else: + return DatasetVersionSummary( + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + id = '', + source_type = '', + version = 56, + ) + """ + + def testDatasetVersionSummary(self): + """Test DatasetVersionSummary""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_embedding_provider_response.py b/test/test_embedding_provider_response.py new file mode 100644 index 0000000..83d42ea --- /dev/null +++ b/test/test_embedding_provider_response.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.embedding_provider_response import EmbeddingProviderResponse + +class TestEmbeddingProviderResponse(unittest.TestCase): + """EmbeddingProviderResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EmbeddingProviderResponse: + """Test EmbeddingProviderResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EmbeddingProviderResponse` + """ + model = EmbeddingProviderResponse() + if include_optional: + return EmbeddingProviderResponse( + config = None, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + has_secret = True, + id = '', + name = '', + provider_type = '', + source = '', + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return EmbeddingProviderResponse( + config = None, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + has_secret = True, + id = '', + name = '', + provider_type = '', + source = '', + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + """ + + def testEmbeddingProviderResponse(self): + """Test EmbeddingProviderResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_embedding_providers_api.py b/test/test_embedding_providers_api.py new file mode 100644 index 0000000..12a9fd0 --- /dev/null +++ b/test/test_embedding_providers_api.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.api.embedding_providers_api import EmbeddingProvidersApi + + +class TestEmbeddingProvidersApi(unittest.TestCase): + """EmbeddingProvidersApi unit test stubs""" + + def setUp(self) -> None: + self.api = EmbeddingProvidersApi() + + def tearDown(self) -> None: + pass + + def test_create_embedding_provider(self) -> None: + """Test case for create_embedding_provider + + Create embedding provider + """ + pass + + def test_delete_embedding_provider(self) -> None: + """Test case for delete_embedding_provider + + Delete embedding provider + """ + pass + + def test_get_embedding_provider(self) -> None: + """Test case for get_embedding_provider + + Get embedding provider + """ + pass + + def test_list_embedding_providers(self) -> None: + """Test case for list_embedding_providers + + List embedding providers + """ + pass + + def test_update_embedding_provider(self) -> None: + """Test case for update_embedding_provider + + Update embedding provider + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_index_info_response.py b/test/test_index_info_response.py new file mode 100644 index 0000000..37ad4ab --- /dev/null +++ b/test/test_index_info_response.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.index_info_response import IndexInfoResponse + +class TestIndexInfoResponse(unittest.TestCase): + """IndexInfoResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IndexInfoResponse: + """Test IndexInfoResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IndexInfoResponse` + """ + model = IndexInfoResponse() + if include_optional: + return IndexInfoResponse( + columns = [ + '' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + index_name = '', + index_type = '', + metric = '', + status = 'ready', + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return IndexInfoResponse( + columns = [ + '' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + index_name = '', + index_type = '', + status = 'ready', + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + """ + + def testIndexInfoResponse(self): + """Test IndexInfoResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_index_status.py b/test/test_index_status.py new file mode 100644 index 0000000..66034a9 --- /dev/null +++ b/test/test_index_status.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.index_status import IndexStatus + +class TestIndexStatus(unittest.TestCase): + """IndexStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIndexStatus(self): + """Test IndexStatus""" + # inst = IndexStatus() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_indexes_api.py b/test/test_indexes_api.py new file mode 100644 index 0000000..5f848c4 --- /dev/null +++ b/test/test_indexes_api.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.api.indexes_api import IndexesApi + + +class TestIndexesApi(unittest.TestCase): + """IndexesApi unit test stubs""" + + def setUp(self) -> None: + self.api = IndexesApi() + + def tearDown(self) -> None: + pass + + def test_create_index(self) -> None: + """Test case for create_index + + Create an index on a table + """ + pass + + def test_delete_index(self) -> None: + """Test case for delete_index + + Delete an index + """ + pass + + def test_list_indexes(self) -> None: + """Test case for list_indexes + + List indexes on a table + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_job_result.py b/test/test_job_result.py new file mode 100644 index 0000000..ab452d3 --- /dev/null +++ b/test/test_job_result.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.job_result import JobResult + +class TestJobResult(unittest.TestCase): + """JobResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> JobResult: + """Test JobResult + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `JobResult` + """ + model = JobResult() + if include_optional: + return JobResult( + connection_id = '', + duration_ms = 0, + rows_synced = 0, + schema_name = '', + table_name = '', + warnings = [ + hotdata.models.refresh_warning.RefreshWarning( + message = '', + schema_name = '', + table_name = '', ) + ], + errors = [ + hotdata.models.table_refresh_error.TableRefreshError( + error = '', + schema_name = '', + table_name = '', ) + ], + tables_failed = 0, + tables_refreshed = 0, + total_rows = 0, + columns = [ + '' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + index_name = '', + index_type = '', + metric = '', + status = 'ready', + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return JobResult( + connection_id = '', + duration_ms = 0, + rows_synced = 0, + schema_name = '', + table_name = '', + tables_failed = 0, + tables_refreshed = 0, + total_rows = 0, + columns = [ + '' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + index_name = '', + index_type = '', + status = 'ready', + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + """ + + def testJobResult(self): + """Test JobResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_job_status.py b/test/test_job_status.py new file mode 100644 index 0000000..aee4251 --- /dev/null +++ b/test/test_job_status.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.job_status import JobStatus + +class TestJobStatus(unittest.TestCase): + """JobStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testJobStatus(self): + """Test JobStatus""" + # inst = JobStatus() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_job_status_response.py b/test/test_job_status_response.py new file mode 100644 index 0000000..d435105 --- /dev/null +++ b/test/test_job_status_response.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.job_status_response import JobStatusResponse + +class TestJobStatusResponse(unittest.TestCase): + """JobStatusResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> JobStatusResponse: + """Test JobStatusResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `JobStatusResponse` + """ + model = JobStatusResponse() + if include_optional: + return JobStatusResponse( + attempts = 56, + completed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + error_message = '', + id = '', + job_type = 'noop', + result = None, + status = 'pending' + ) + else: + return JobStatusResponse( + attempts = 56, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + id = '', + job_type = 'noop', + status = 'pending', + ) + """ + + def testJobStatusResponse(self): + """Test JobStatusResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_job_type.py b/test/test_job_type.py new file mode 100644 index 0000000..ebb3be8 --- /dev/null +++ b/test/test_job_type.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.job_type import JobType + +class TestJobType(unittest.TestCase): + """JobType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testJobType(self): + """Test JobType""" + # inst = JobType() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_jobs_api.py b/test/test_jobs_api.py new file mode 100644 index 0000000..e9fe942 --- /dev/null +++ b/test/test_jobs_api.py @@ -0,0 +1,46 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.api.jobs_api import JobsApi + + +class TestJobsApi(unittest.TestCase): + """JobsApi unit test stubs""" + + def setUp(self) -> None: + self.api = JobsApi() + + def tearDown(self) -> None: + pass + + def test_get_job(self) -> None: + """Test case for get_job + + Get job status + """ + pass + + def test_list_jobs(self) -> None: + """Test case for list_jobs + + List jobs + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_connection_types_response.py b/test/test_list_connection_types_response.py new file mode 100644 index 0000000..f23f893 --- /dev/null +++ b/test/test_list_connection_types_response.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.list_connection_types_response import ListConnectionTypesResponse + +class TestListConnectionTypesResponse(unittest.TestCase): + """ListConnectionTypesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListConnectionTypesResponse: + """Test ListConnectionTypesResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListConnectionTypesResponse` + """ + model = ListConnectionTypesResponse() + if include_optional: + return ListConnectionTypesResponse( + connection_types = [ + hotdata.models.connection_type_summary.ConnectionTypeSummary( + label = '', + name = '', ) + ] + ) + else: + return ListConnectionTypesResponse( + connection_types = [ + hotdata.models.connection_type_summary.ConnectionTypeSummary( + label = '', + name = '', ) + ], + ) + """ + + def testListConnectionTypesResponse(self): + """Test ListConnectionTypesResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_dataset_versions_response.py b/test/test_list_dataset_versions_response.py new file mode 100644 index 0000000..9fc993b --- /dev/null +++ b/test/test_list_dataset_versions_response.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.list_dataset_versions_response import ListDatasetVersionsResponse + +class TestListDatasetVersionsResponse(unittest.TestCase): + """ListDatasetVersionsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListDatasetVersionsResponse: + """Test ListDatasetVersionsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListDatasetVersionsResponse` + """ + model = ListDatasetVersionsResponse() + if include_optional: + return ListDatasetVersionsResponse( + count = 0, + dataset_id = '', + has_more = True, + limit = 0, + offset = 0, + versions = [ + hotdata.models.dataset_version_summary.DatasetVersionSummary( + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + id = '', + source_type = '', + version = 56, ) + ] + ) + else: + return ListDatasetVersionsResponse( + count = 0, + dataset_id = '', + has_more = True, + limit = 0, + offset = 0, + versions = [ + hotdata.models.dataset_version_summary.DatasetVersionSummary( + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + id = '', + source_type = '', + version = 56, ) + ], + ) + """ + + def testListDatasetVersionsResponse(self): + """Test ListDatasetVersionsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_embedding_providers_response.py b/test/test_list_embedding_providers_response.py new file mode 100644 index 0000000..edb6e17 --- /dev/null +++ b/test/test_list_embedding_providers_response.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.list_embedding_providers_response import ListEmbeddingProvidersResponse + +class TestListEmbeddingProvidersResponse(unittest.TestCase): + """ListEmbeddingProvidersResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListEmbeddingProvidersResponse: + """Test ListEmbeddingProvidersResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListEmbeddingProvidersResponse` + """ + model = ListEmbeddingProvidersResponse() + if include_optional: + return ListEmbeddingProvidersResponse( + embedding_providers = [ + hotdata.models.embedding_provider_response.EmbeddingProviderResponse( + config = null, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + has_secret = True, + id = '', + name = '', + provider_type = '', + source = '', + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ] + ) + else: + return ListEmbeddingProvidersResponse( + embedding_providers = [ + hotdata.models.embedding_provider_response.EmbeddingProviderResponse( + config = null, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + has_secret = True, + id = '', + name = '', + provider_type = '', + source = '', + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + ) + """ + + def testListEmbeddingProvidersResponse(self): + """Test ListEmbeddingProvidersResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_indexes_response.py b/test/test_list_indexes_response.py new file mode 100644 index 0000000..198a126 --- /dev/null +++ b/test/test_list_indexes_response.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.list_indexes_response import ListIndexesResponse + +class TestListIndexesResponse(unittest.TestCase): + """ListIndexesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListIndexesResponse: + """Test ListIndexesResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListIndexesResponse` + """ + model = ListIndexesResponse() + if include_optional: + return ListIndexesResponse( + indexes = [ + hotdata.models.index_info_response.IndexInfoResponse( + columns = [ + '' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + index_name = '', + index_type = '', + metric = '', + status = 'ready', + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ] + ) + else: + return ListIndexesResponse( + indexes = [ + hotdata.models.index_info_response.IndexInfoResponse( + columns = [ + '' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + index_name = '', + index_type = '', + metric = '', + status = 'ready', + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + ) + """ + + def testListIndexesResponse(self): + """Test ListIndexesResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_jobs_response.py b/test/test_list_jobs_response.py new file mode 100644 index 0000000..77904d5 --- /dev/null +++ b/test/test_list_jobs_response.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.list_jobs_response import ListJobsResponse + +class TestListJobsResponse(unittest.TestCase): + """ListJobsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListJobsResponse: + """Test ListJobsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListJobsResponse` + """ + model = ListJobsResponse() + if include_optional: + return ListJobsResponse( + jobs = [ + hotdata.models.job_status_response.JobStatusResponse( + attempts = 56, + completed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + error_message = '', + id = '', + job_type = 'noop', + result = null, + status = 'pending', ) + ] + ) + else: + return ListJobsResponse( + jobs = [ + hotdata.models.job_status_response.JobStatusResponse( + attempts = 56, + completed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + error_message = '', + id = '', + job_type = 'noop', + result = null, + status = 'pending', ) + ], + ) + """ + + def testListJobsResponse(self): + """Test ListJobsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_refresh_dataset_response.py b/test/test_refresh_dataset_response.py new file mode 100644 index 0000000..89cf87d --- /dev/null +++ b/test/test_refresh_dataset_response.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.refresh_dataset_response import RefreshDatasetResponse + +class TestRefreshDatasetResponse(unittest.TestCase): + """RefreshDatasetResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RefreshDatasetResponse: + """Test RefreshDatasetResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RefreshDatasetResponse` + """ + model = RefreshDatasetResponse() + if include_optional: + return RefreshDatasetResponse( + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + id = '', + status = '', + version = 56 + ) + else: + return RefreshDatasetResponse( + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + id = '', + status = '', + version = 56, + ) + """ + + def testRefreshDatasetResponse(self): + """Test RefreshDatasetResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_saved_query_dataset_source.py b/test/test_saved_query_dataset_source.py new file mode 100644 index 0000000..5b2499c --- /dev/null +++ b/test/test_saved_query_dataset_source.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.saved_query_dataset_source import SavedQueryDatasetSource + +class TestSavedQueryDatasetSource(unittest.TestCase): + """SavedQueryDatasetSource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SavedQueryDatasetSource: + """Test SavedQueryDatasetSource + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SavedQueryDatasetSource` + """ + model = SavedQueryDatasetSource() + if include_optional: + return SavedQueryDatasetSource( + saved_query_id = '', + version = 56 + ) + else: + return SavedQueryDatasetSource( + saved_query_id = '', + ) + """ + + def testSavedQueryDatasetSource(self): + """Test SavedQueryDatasetSource""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sql_query_dataset_source.py b/test/test_sql_query_dataset_source.py new file mode 100644 index 0000000..f657534 --- /dev/null +++ b/test/test_sql_query_dataset_source.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.sql_query_dataset_source import SqlQueryDatasetSource + +class TestSqlQueryDatasetSource(unittest.TestCase): + """SqlQueryDatasetSource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SqlQueryDatasetSource: + """Test SqlQueryDatasetSource + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SqlQueryDatasetSource` + """ + model = SqlQueryDatasetSource() + if include_optional: + return SqlQueryDatasetSource( + description = '', + name = '', + sql = '' + ) + else: + return SqlQueryDatasetSource( + sql = '', + ) + """ + + def testSqlQueryDatasetSource(self): + """Test SqlQueryDatasetSource""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_submit_job_response.py b/test/test_submit_job_response.py new file mode 100644 index 0000000..976fae9 --- /dev/null +++ b/test/test_submit_job_response.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.submit_job_response import SubmitJobResponse + +class TestSubmitJobResponse(unittest.TestCase): + """SubmitJobResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SubmitJobResponse: + """Test SubmitJobResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SubmitJobResponse` + """ + model = SubmitJobResponse() + if include_optional: + return SubmitJobResponse( + id = '', + status = 'pending', + status_url = '' + ) + else: + return SubmitJobResponse( + id = '', + status = 'pending', + status_url = '', + ) + """ + + def testSubmitJobResponse(self): + """Test SubmitJobResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_embedding_provider_request.py b/test/test_update_embedding_provider_request.py new file mode 100644 index 0000000..3f51e72 --- /dev/null +++ b/test/test_update_embedding_provider_request.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.update_embedding_provider_request import UpdateEmbeddingProviderRequest + +class TestUpdateEmbeddingProviderRequest(unittest.TestCase): + """UpdateEmbeddingProviderRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateEmbeddingProviderRequest: + """Test UpdateEmbeddingProviderRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateEmbeddingProviderRequest` + """ + model = UpdateEmbeddingProviderRequest() + if include_optional: + return UpdateEmbeddingProviderRequest( + api_key = '', + config = None, + name = '', + secret_name = '' + ) + else: + return UpdateEmbeddingProviderRequest( + ) + """ + + def testUpdateEmbeddingProviderRequest(self): + """Test UpdateEmbeddingProviderRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_embedding_provider_response.py b/test/test_update_embedding_provider_response.py new file mode 100644 index 0000000..f31731d --- /dev/null +++ b/test/test_update_embedding_provider_response.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.update_embedding_provider_response import UpdateEmbeddingProviderResponse + +class TestUpdateEmbeddingProviderResponse(unittest.TestCase): + """UpdateEmbeddingProviderResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateEmbeddingProviderResponse: + """Test UpdateEmbeddingProviderResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateEmbeddingProviderResponse` + """ + model = UpdateEmbeddingProviderResponse() + if include_optional: + return UpdateEmbeddingProviderResponse( + id = '', + name = '', + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return UpdateEmbeddingProviderResponse( + id = '', + name = '', + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + """ + + def testUpdateEmbeddingProviderResponse(self): + """Test UpdateEmbeddingProviderResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_url_dataset_source.py b/test/test_url_dataset_source.py new file mode 100644 index 0000000..eeb3b05 --- /dev/null +++ b/test/test_url_dataset_source.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, queries, and analytics. + + The version of the OpenAPI document: 1.0.0 + Contact: developers@hotdata.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hotdata.models.url_dataset_source import UrlDatasetSource + +class TestUrlDatasetSource(unittest.TestCase): + """UrlDatasetSource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UrlDatasetSource: + """Test UrlDatasetSource + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UrlDatasetSource` + """ + model = UrlDatasetSource() + if include_optional: + return UrlDatasetSource( + columns = { + 'key' : '' + }, + format = '', + url = '' + ) + else: + return UrlDatasetSource( + url = '', + ) + """ + + def testUrlDatasetSource(self): + """Test UrlDatasetSource""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main()