Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ 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
Expand All @@ -42,6 +45,7 @@ docs/InformationSchemaApi.md
docs/InformationSchemaResponse.md
docs/InlineData.md
docs/InlineDatasetSource.md
docs/ListConnectionTypesResponse.md
docs/ListConnectionsResponse.md
docs/ListDatasetsResponse.md
docs/ListQueryRunsResponse.md
Expand Down Expand Up @@ -89,6 +93,7 @@ docs/WorkspaceDetail.md
docs/WorkspaceListItem.md
docs/WorkspacesApi.md
src/apis/configuration.rs
src/apis/connection_types_api.rs
src/apis/connections_api.rs
src/apis/datasets_api.rs
src/apis/information_schema_api.rs
Expand Down Expand Up @@ -120,6 +125,8 @@ src/models/connection_health_response.rs
src/models/connection_info.rs
src/models/connection_refresh_result.rs
src/models/connection_schema_error.rs
src/models/connection_type_detail.rs
src/models/connection_type_summary.rs
src/models/create_connection_request.rs
src/models/create_connection_response.rs
src/models/create_dataset_request.rs
Expand All @@ -141,6 +148,7 @@ src/models/get_secret_response.rs
src/models/information_schema_response.rs
src/models/inline_data.rs
src/models/inline_dataset_source.rs
src/models/list_connection_types_response.rs
src/models/list_connections_response.rs
src/models/list_datasets_response.rs
src/models/list_query_runs_response.rs
Expand Down
14 changes: 14 additions & 0 deletions docs/ConnectionTypeDetail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# ConnectionTypeDetail

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**auth** | Option<**serde_json::Value**> | | [optional]
**config_schema** | Option<**serde_json::Value**> | | [optional]
**label** | **String** | |
**name** | **String** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


12 changes: 12 additions & 0 deletions docs/ConnectionTypeSummary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# ConnectionTypeSummary

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**label** | **String** | |
**name** | **String** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


67 changes: 67 additions & 0 deletions docs/ConnectionTypesApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# \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

> models::ConnectionTypeDetail get_connection_type(name)
Get connection type details

Get configuration schema and authentication requirements for a specific connection type.

### Parameters


Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**name** | **String** | Connection type name (e.g. postgres, mysql, snowflake) | [required] |

### Return type

[**models::ConnectionTypeDetail**](ConnectionTypeDetail.md)

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## list_connection_types

> models::ListConnectionTypesResponse list_connection_types()
List connection types

List all available connection types, including native sources and FlightDLT services.

### Parameters

This endpoint does not need any parameter.

### Return type

[**models::ListConnectionTypesResponse**](ListConnectionTypesResponse.md)

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

11 changes: 11 additions & 0 deletions docs/ListConnectionTypesResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# ListConnectionTypesResponse

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**connection_types** | [**Vec<models::ConnectionTypeSummary>**](ConnectionTypeSummary.md) | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


2 changes: 1 addition & 1 deletion src/apis/configuration.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* HotData API
* Hotdata API
*
* Powerful data platform API for datasets, queries, and analytics.
*
Expand Down
111 changes: 111 additions & 0 deletions src/apis/connection_types_api.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
/*
* Hotdata API
*
* Powerful data platform API for datasets, queries, and analytics.
*
* The version of the OpenAPI document: 1.0.0
* Contact: developers@hotdata.dev
* Generated by: https://openapi-generator.tech
*/


use reqwest;
use serde::{Deserialize, Serialize, de::Error as _};
use crate::{apis::ResponseContent, models};
use super::{Error, configuration, ContentType};


/// struct for typed errors of method [`get_connection_type`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetConnectionTypeError {
Status404(models::ApiErrorResponse),
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`list_connection_types`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListConnectionTypesError {
UnknownValue(serde_json::Value),
}


/// Get configuration schema and authentication requirements for a specific connection type.
pub async fn get_connection_type(configuration: &configuration::Configuration, name: &str) -> Result<models::ConnectionTypeDetail, Error<GetConnectionTypeError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_path_name = name;

let uri_str = format!("{}/v1/connection-types/{name}", configuration.base_path, name=crate::apis::urlencode(p_path_name));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);

if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};

let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;

let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);

if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ConnectionTypeDetail`"))),
ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ConnectionTypeDetail`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetConnectionTypeError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}

/// List all available connection types, including native sources and FlightDLT services.
pub async fn list_connection_types(configuration: &configuration::Configuration, ) -> Result<models::ListConnectionTypesResponse, Error<ListConnectionTypesError>> {

let uri_str = format!("{}/v1/connection-types", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);

if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};

let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;

let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);

if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ListConnectionTypesResponse`"))),
ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ListConnectionTypesResponse`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListConnectionTypesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}

2 changes: 1 addition & 1 deletion src/apis/connections_api.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* HotData API
* Hotdata API
*
* Powerful data platform API for datasets, queries, and analytics.
*
Expand Down
2 changes: 1 addition & 1 deletion src/apis/datasets_api.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* HotData API
* Hotdata API
*
* Powerful data platform API for datasets, queries, and analytics.
*
Expand Down
2 changes: 1 addition & 1 deletion src/apis/information_schema_api.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* HotData API
* Hotdata API
*
* Powerful data platform API for datasets, queries, and analytics.
*
Expand Down
1 change: 1 addition & 0 deletions src/apis/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ impl From<&str> for ContentType {
}
}

pub mod connection_types_api;
pub mod connections_api;
pub mod datasets_api;
pub mod information_schema_api;
Expand Down
2 changes: 1 addition & 1 deletion src/apis/query_api.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* HotData API
* Hotdata API
*
* Powerful data platform API for datasets, queries, and analytics.
*
Expand Down
2 changes: 1 addition & 1 deletion src/apis/query_runs_api.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* HotData API
* Hotdata API
*
* Powerful data platform API for datasets, queries, and analytics.
*
Expand Down
2 changes: 1 addition & 1 deletion src/apis/refresh_api.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* HotData API
* Hotdata API
*
* Powerful data platform API for datasets, queries, and analytics.
*
Expand Down
2 changes: 1 addition & 1 deletion src/apis/results_api.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* HotData API
* Hotdata API
*
* Powerful data platform API for datasets, queries, and analytics.
*
Expand Down
2 changes: 1 addition & 1 deletion src/apis/saved_queries_api.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* HotData API
* Hotdata API
*
* Powerful data platform API for datasets, queries, and analytics.
*
Expand Down
2 changes: 1 addition & 1 deletion src/apis/secrets_api.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* HotData API
* Hotdata API
*
* Powerful data platform API for datasets, queries, and analytics.
*
Expand Down
2 changes: 1 addition & 1 deletion src/apis/uploads_api.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* HotData API
* Hotdata API
*
* Powerful data platform API for datasets, queries, and analytics.
*
Expand Down
2 changes: 1 addition & 1 deletion src/apis/workspaces_api.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* HotData API
* Hotdata API
*
* Powerful data platform API for datasets, queries, and analytics.
*
Expand Down
2 changes: 1 addition & 1 deletion src/models/api_error_detail.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* HotData API
* Hotdata API
*
* Powerful data platform API for datasets, queries, and analytics.
*
Expand Down
2 changes: 1 addition & 1 deletion src/models/api_error_response.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* HotData API
* Hotdata API
*
* Powerful data platform API for datasets, queries, and analytics.
*
Expand Down
2 changes: 1 addition & 1 deletion src/models/boolean_profile_detail.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* HotData API
* Hotdata API
*
* Powerful data platform API for datasets, queries, and analytics.
*
Expand Down
2 changes: 1 addition & 1 deletion src/models/categorical_profile_detail.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* HotData API
* Hotdata API
*
* Powerful data platform API for datasets, queries, and analytics.
*
Expand Down
2 changes: 1 addition & 1 deletion src/models/category_value_info.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* HotData API
* Hotdata API
*
* Powerful data platform API for datasets, queries, and analytics.
*
Expand Down
2 changes: 1 addition & 1 deletion src/models/column_info.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* HotData API
* Hotdata API
*
* Powerful data platform API for datasets, queries, and analytics.
*
Expand Down
Loading
Loading