Skip to content
Merged
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
4 changes: 3 additions & 1 deletion crates/tower-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ For more information, please visit [https://tower.dev](https://tower.dev)

This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client.

- API version: v0.10.14
- API version: v0.10.15
- Package version: 1.0.0
- Generator version: 7.19.0
- Build package: `org.openapitools.codegen.languages.RustClientCodegen`
Expand Down Expand Up @@ -66,6 +66,7 @@ Class | Method | HTTP request | Description
*DefaultApi* | [**describe_app**](docs/DefaultApi.md#describe_app) | **GET** /apps/{name} | Describe app
*DefaultApi* | [**describe_app_version**](docs/DefaultApi.md#describe_app_version) | **GET** /apps/{name}/versions/{num} | Describe app version
*DefaultApi* | [**describe_authentication_context**](docs/DefaultApi.md#describe_authentication_context) | **GET** /user/auth-context | Describe authentication context
*DefaultApi* | [**describe_catalog**](docs/DefaultApi.md#describe_catalog) | **GET** /catalogs/{name} | Describe catalog
*DefaultApi* | [**describe_device_login_session**](docs/DefaultApi.md#describe_device_login_session) | **GET** /login/device/{device_code} | Describe device login session
*DefaultApi* | [**describe_email_preferences**](docs/DefaultApi.md#describe_email_preferences) | **GET** /user/email-preferences | Describe email preferences
*DefaultApi* | [**describe_organization_usage**](docs/DefaultApi.md#describe_organization_usage) | **GET** /usage | Describe organization usage
Expand Down Expand Up @@ -205,6 +206,7 @@ Class | Method | HTTP request | Description
- [DescribeAppResponse](docs/DescribeAppResponse.md)
- [DescribeAppVersionResponse](docs/DescribeAppVersionResponse.md)
- [DescribeAuthenticationContextBody](docs/DescribeAuthenticationContextBody.md)
- [DescribeCatalogResponse](docs/DescribeCatalogResponse.md)
- [DescribeDeviceLoginSessionResponse](docs/DescribeDeviceLoginSessionResponse.md)
- [DescribeEmailPreferencesBody](docs/DescribeEmailPreferencesBody.md)
- [DescribePlanResponse](docs/DescribePlanResponse.md)
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/apis/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
89 changes: 88 additions & 1 deletion crates/tower-api/src/apis/default_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down Expand Up @@ -267,6 +267,15 @@ pub struct DescribeAppVersionParams {
pub num: String,
}

/// struct for passing parameters to the method [`describe_catalog`]
#[derive(Clone, Debug)]
pub struct DescribeCatalogParams {
/// The name of the catalog.
pub name: String,
/// The environment of the catalog.
pub environment: Option<String>,
}

/// struct for passing parameters to the method [`describe_device_login_session`]
#[derive(Clone, Debug)]
pub struct DescribeDeviceLoginSessionParams {
Expand Down Expand Up @@ -1049,6 +1058,14 @@ pub enum DescribeAuthenticationContextSuccess {
UnknownValue(serde_json::Value),
}

/// struct for typed successes of method [`describe_catalog`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DescribeCatalogSuccess {
Status200(models::DescribeCatalogResponse),
UnknownValue(serde_json::Value),
}

/// struct for typed successes of method [`describe_device_login_session`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
Expand Down Expand Up @@ -1878,6 +1895,14 @@ pub enum DescribeAuthenticationContextError {
UnknownValue(serde_json::Value),
}

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

/// struct for typed errors of method [`describe_device_login_session`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
Expand Down Expand Up @@ -4670,6 +4695,68 @@ pub async fn describe_authentication_context(
}
}

/// Returns details for a specific catalog, including its property names and previews.
pub async fn describe_catalog(
configuration: &configuration::Configuration,
params: DescribeCatalogParams,
) -> Result<ResponseContent<DescribeCatalogSuccess>, Error<DescribeCatalogError>> {
let uri_str = format!(
"{}/catalogs/{name}",
configuration.base_path,
name = crate::apis::urlencode(params.name)
);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);

if let Some(ref param_value) = params.environment {
req_builder = req_builder.query(&[("environment", &param_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
if let Some(ref apikey) = configuration.api_key {
let key = apikey.key.clone();
let value = match apikey.prefix {
Some(ref prefix) => format!("{} {}", prefix, key),
None => key,
};
req_builder = req_builder.header("X-API-Key", value);
};

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

let status = resp.status();

let tower_trace_id = resp
.headers()
.get("x-tower-trace-id")
.and_then(|v| v.to_str().ok())
.map_or(String::from(DEFAULT_TOWER_TRACE_ID), String::from);

if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
let entity: Option<DescribeCatalogSuccess> = serde_json::from_str(&content).ok();
Ok(ResponseContent {
tower_trace_id,
status,
content,
entity,
})
} else {
let content = resp.text().await?;
let entity: Option<DescribeCatalogError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent {
tower_trace_id,
status,
content,
entity,
}))
}
}

/// Checks if a device login code has been claimed and returns the user session if so.
pub async fn describe_device_login_session(
configuration: &configuration::Configuration,
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/apis/feature_flags_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/acknowledge_alert_response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/alert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/api_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/app_statistics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/app_summary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/app_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/authentication_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/batch_schedule_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/batch_schedule_response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/cancel_run_response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/catalog_property.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/create_account_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/create_account_response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/create_api_key_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/create_api_key_response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/create_app_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/create_app_response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/create_authenticator_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* REST API to interact with Tower Services.
*
* The version of the OpenAPI document: v0.10.14
* The version of the OpenAPI document: v0.10.15
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
Loading
Loading