Skip to content
Closed
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
3 changes: 1 addition & 2 deletions 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.11.24
- API version: v0.12.6
- Package version: 1.0.0
- Generator version: 7.19.0
- Build package: `org.openapitools.codegen.languages.RustClientCodegen`
Expand Down Expand Up @@ -74,7 +74,6 @@ Class | Method | HTTP request | Description
*DefaultApi* | [**describe_catalog**](docs/DefaultApi.md#describe_catalog) | **GET** /catalogs/{name} | Describe catalog
*DefaultApi* | [**describe_catalog_fact**](docs/DefaultApi.md#describe_catalog_fact) | **GET** /catalogs/{catalog}/facts/{name} | Describe a catalog fact
*DefaultApi* | [**describe_catalog_usage**](docs/DefaultApi.md#describe_catalog_usage) | **GET** /catalogs/{name}/usage | Describe catalog usage
*DefaultApi* | [**describe_default_catalog**](docs/DefaultApi.md#describe_default_catalog) | **GET** /storage/catalogs/default | Describe default 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_environment**](docs/DefaultApi.md#describe_environment) | **GET** /environments/{name} | Describe environment
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.11.24
* The version of the OpenAPI document: v0.12.6
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
79 changes: 7 additions & 72 deletions 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.11.24
* The version of the OpenAPI document: v0.12.6
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down Expand Up @@ -1280,15 +1280,6 @@ pub enum DescribeCatalogUsageSuccess {
UnknownValue(serde_json::Value),
}

/// struct for typed successes of method [`describe_default_catalog`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DescribeDefaultCatalogSuccess {
Status200(models::DescribeCatalogResponse),
Status202(),
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 @@ -2187,9 +2178,13 @@ pub enum DeleteWebhookError {
#[serde(untagged)]
pub enum DeployAppError {
Status400(models::ErrorModel),
Status408(models::ErrorModel),
Status412(models::ErrorModel),
Status413(models::ErrorModel),
Status422(models::ErrorModel),
Status429(models::ErrorModel),
Status500(models::ErrorModel),
Status503(models::ErrorModel),
UnknownValue(serde_json::Value),
}

Expand Down Expand Up @@ -2252,13 +2247,6 @@ pub enum DescribeCatalogUsageError {
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`describe_default_catalog`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DescribeDefaultCatalogError {
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 @@ -2715,6 +2703,7 @@ pub enum UpdateCatalogError {
Status401(models::ErrorModel),
Status403(models::ErrorModel),
Status404(models::ErrorModel),
Status409(models::ErrorModel),
Status422(models::ErrorModel),
Status500(models::ErrorModel),
DefaultResponse(models::ErrorModel),
Expand Down Expand Up @@ -4336,7 +4325,7 @@ pub async fn delete_api_key(
}
}

/// Delete one of your apps, the associated code, and all the runs as well.
/// Delete one of your apps, the associated code and schedules, and all the runs as well.
pub async fn delete_app(
configuration: &configuration::Configuration,
params: DeleteAppParams,
Expand Down Expand Up @@ -5653,60 +5642,6 @@ pub async fn describe_catalog_usage(
}
}

/// Returns the team's default catalog, provisioning it lazily if it does not yet exist. When two concurrent first calls race to provision the catalog, the loser receives 202 Accepted; retry after a few seconds and the catalog will be ready.
pub async fn describe_default_catalog(
configuration: &configuration::Configuration,
) -> Result<ResponseContent<DescribeDefaultCatalogSuccess>, Error<DescribeDefaultCatalogError>> {
let uri_str = format!("{}/storage/catalogs/default", 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());
};
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<DescribeDefaultCatalogSuccess> = serde_json::from_str(&content).ok();
Ok(ResponseContent {
tower_trace_id,
status,
content,
entity,
})
} else {
let content = resp.text().await?;
let entity: Option<DescribeDefaultCatalogError> = 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.11.24
* The version of the OpenAPI document: v0.12.6
* 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.11.24
* The version of the OpenAPI document: v0.12.6
* 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.11.24
* The version of the OpenAPI document: v0.12.6
* 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.11.24
* The version of the OpenAPI document: v0.12.6
* 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.11.24
* The version of the OpenAPI document: v0.12.6
* 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.11.24
* The version of the OpenAPI document: v0.12.6
* 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_owner.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.11.24
* The version of the OpenAPI document: v0.12.6
* 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.11.24
* The version of the OpenAPI document: v0.12.6
* 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.11.24
* The version of the OpenAPI document: v0.12.6
* 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.11.24
* The version of the OpenAPI document: v0.12.6
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/app_tag.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.11.24
* The version of the OpenAPI document: v0.12.6
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
8 changes: 7 additions & 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.11.24
* The version of the OpenAPI document: v0.12.6
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand All @@ -26,6 +26,10 @@ pub struct AppVersion {
#[serde_as(as = "DefaultOnNull")]
#[serde(rename = "parameters")]
pub parameters: Vec<models::Parameter>,
/// The resource profile declared in this version's Towerfile, or empty if none was declared (runs then use basic.medium).
#[serde_as(as = "DefaultOnNull")]
#[serde(rename = "run_size")]
pub run_size: String,
/// The Towerfile that this version was created from.
#[serde_as(as = "DefaultOnNull")]
#[serde(rename = "towerfile")]
Expand All @@ -39,6 +43,7 @@ impl AppVersion {
pub fn new(
created_at: String,
parameters: Vec<models::Parameter>,
run_size: String,
towerfile: String,
version: String,
) -> AppVersion {
Expand All @@ -47,6 +52,7 @@ impl AppVersion {
created_at,
idempotency_key: None,
parameters,
run_size,
towerfile,
version,
}
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.11.24
* The version of the OpenAPI document: v0.12.6
* 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.11.24
* The version of the OpenAPI document: v0.12.6
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/batch_describe_runs_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.11.24
* The version of the OpenAPI document: v0.12.6
* 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.11.24
* The version of the OpenAPI document: v0.12.6
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/batch_error.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.11.24
* The version of the OpenAPI document: v0.12.6
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/batch_run_and_links.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.11.24
* The version of the OpenAPI document: v0.12.6
* 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.11.24
* The version of the OpenAPI document: v0.12.6
* 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.11.24
* The version of the OpenAPI document: v0.12.6
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/batched_run_log_lines.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.11.24
* The version of the OpenAPI document: v0.12.6
* 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.11.24
* The version of the OpenAPI document: v0.12.6
* 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.11.24
* The version of the OpenAPI document: v0.12.6
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/tower-api/src/models/catalog_credentials.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.11.24
* The version of the OpenAPI document: v0.12.6
* Contact: hello@tower.dev
* Generated by: https://openapi-generator.tech
*/
Expand Down
Loading
Loading