Skip to content

Commit ad43737

Browse files
authored
Merge pull request #44 from tower/develop
v0.3.13 Release
2 parents 21bcb41 + 07a5bf2 commit ad43737

141 files changed

Lines changed: 1339 additions & 352 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

Lines changed: 202 additions & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ resolver = "2"
44

55
[workspace.package]
66
edition = "2021"
7-
version = "0.3.12"
7+
version = "0.3.13"
8+
9+
810

911
description = "Tower is the best way to host Python data apps in production"
1012
rust-version = "1.77"
@@ -31,7 +33,6 @@ glob = "0.3"
3133
http = "1.1"
3234
indicatif = "0.17"
3335
log = "0.4"
34-
open = "5"
3536
pem = "3"
3637
promptly = "0.3"
3738
rand = "0.8"
@@ -61,6 +62,7 @@ tower-cmd = { path = "crates/tower-cmd" }
6162
tower-package = { path = "crates/tower-package" }
6263
tower-runtime = { path = "crates/tower-runtime" }
6364
url = { version = "2", features = ["serde"] }
65+
webbrowser = "1"
6466

6567
# The profile that 'dist' will build with
6668
[profile.dist]

crates/tower-api/Cargo.toml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
[package]
22
name = "tower-api"
3-
version = "1.0.0"
4-
authors = ["hello@tower.dev"]
5-
description = "REST API to interact with Tower Services."
6-
# Override this license by providing a License Object in the OpenAPI.
7-
license = "Unlicense"
8-
edition = "2021"
3+
version = { workspace = true }
4+
authors = { workspace = true }
5+
edition = { workspace = true }
6+
rust-version = { workspace = true }
7+
license = { workspace = true }
98

109
[dependencies]
1110
log = { workspace = true }

crates/tower-api/README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ For more information, please visit [https://tower.dev](https://tower.dev)
88

99
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.
1010

11-
- API version: v0.5.9
11+
- API version: v0.5.12
1212
- Package version: 1.0.0
1313
- Generator version: 7.13.0
1414
- Build package: `org.openapitools.codegen.languages.RustClientCodegen`
@@ -54,7 +54,8 @@ Class | Method | HTTP request | Description
5454
*DefaultApi* | [**describe_run_logs**](docs/DefaultApi.md#describe_run_logs) | **GET** /apps/{slug}/runs/{seq}/logs | Describe run logs
5555
*DefaultApi* | [**describe_secrets_key**](docs/DefaultApi.md#describe_secrets_key) | **GET** /secrets/key | Describe encryption key
5656
*DefaultApi* | [**describe_session**](docs/DefaultApi.md#describe_session) | **GET** /session | Describe session
57-
*DefaultApi* | [**export_secrets**](docs/DefaultApi.md#export_secrets) | **GET** /secrets/export | Export secrets
57+
*DefaultApi* | [**export_catalogs**](docs/DefaultApi.md#export_catalogs) | **POST** /catalogs/export | Export catalogs
58+
*DefaultApi* | [**export_secrets**](docs/DefaultApi.md#export_secrets) | **POST** /secrets/export | Export secrets
5859
*DefaultApi* | [**generate_app_statistics**](docs/DefaultApi.md#generate_app_statistics) | **GET** /stats/apps | Generate app statistics
5960
*DefaultApi* | [**generate_run_statistics**](docs/DefaultApi.md#generate_run_statistics) | **GET** /stats/runs | Generate run statistics
6061
*DefaultApi* | [**invite_team_member**](docs/DefaultApi.md#invite_team_member) | **POST** /teams/{slug}/invites | Invite team member
@@ -124,6 +125,7 @@ Class | Method | HTTP request | Description
124125
- [DeleteApiKeyResponse](docs/DeleteApiKeyResponse.md)
125126
- [DeleteAppResponse](docs/DeleteAppResponse.md)
126127
- [DeleteCatalogResponse](docs/DeleteCatalogResponse.md)
128+
- [DeleteSecretResponse](docs/DeleteSecretResponse.md)
127129
- [DeleteTeamInvitationParams](docs/DeleteTeamInvitationParams.md)
128130
- [DeleteTeamInvitationResponse](docs/DeleteTeamInvitationResponse.md)
129131
- [DeleteTeamParams](docs/DeleteTeamParams.md)
@@ -139,8 +141,12 @@ Class | Method | HTTP request | Description
139141
- [EncryptedCatalogProperty](docs/EncryptedCatalogProperty.md)
140142
- [ErrorDetail](docs/ErrorDetail.md)
141143
- [ErrorModel](docs/ErrorModel.md)
144+
- [ExportCatalogsParams](docs/ExportCatalogsParams.md)
145+
- [ExportCatalogsResponse](docs/ExportCatalogsResponse.md)
146+
- [ExportSecretsParams](docs/ExportSecretsParams.md)
142147
- [ExportSecretsResponse](docs/ExportSecretsResponse.md)
143-
- [ExportUserSecretsParams](docs/ExportUserSecretsParams.md)
148+
- [ExportedCatalog](docs/ExportedCatalog.md)
149+
- [ExportedCatalogProperty](docs/ExportedCatalogProperty.md)
144150
- [ExportedSecret](docs/ExportedSecret.md)
145151
- [GenerateAppStatisticsResponse](docs/GenerateAppStatisticsResponse.md)
146152
- [GenerateRunStatisticsResponse](docs/GenerateRunStatisticsResponse.md)

crates/tower-api/src/apis/configuration.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* REST API to interact with Tower Services.
55
*
6-
* The version of the OpenAPI document: v0.5.9
6+
* The version of the OpenAPI document: v0.5.12
77
* Contact: hello@tower.dev
88
* Generated by: https://openapi-generator.tech
99
*/

crates/tower-api/src/apis/default_api.rs

Lines changed: 63 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* REST API to interact with Tower Services.
55
*
6-
* The version of the OpenAPI document: v0.5.9
6+
* The version of the OpenAPI document: v0.5.12
77
* Contact: hello@tower.dev
88
* Generated by: https://openapi-generator.tech
99
*/
@@ -195,18 +195,16 @@ pub struct DescribeSecretsKeyParams {
195195
pub format: Option<String>
196196
}
197197

198+
/// struct for passing parameters to the method [`export_catalogs`]
199+
#[derive(Clone, Debug)]
200+
pub struct ExportCatalogsParams {
201+
pub export_catalogs_params: models::ExportCatalogsParams
202+
}
203+
198204
/// struct for passing parameters to the method [`export_secrets`]
199205
#[derive(Clone, Debug)]
200206
pub struct ExportSecretsParams {
201-
pub export_user_secrets_params: models::ExportUserSecretsParams,
202-
/// The environment to filter by.
203-
pub environment: Option<String>,
204-
/// Whether to fetch all secrets or only the ones that are not marked as deleted.
205-
pub all: Option<bool>,
206-
/// The page number to fetch.
207-
pub page: Option<i64>,
208-
/// The number of records to fetch on each page.
209-
pub page_size: Option<i64>
207+
pub export_secrets_params: models::ExportSecretsParams
210208
}
211209

212210
/// struct for passing parameters to the method [`generate_run_statistics`]
@@ -559,7 +557,7 @@ pub enum DeleteCatalogSuccess {
559557
#[derive(Debug, Clone, Serialize, Deserialize)]
560558
#[serde(untagged)]
561559
pub enum DeleteSecretSuccess {
562-
Status204(),
560+
Status200(models::DeleteSecretResponse),
563561
UnknownValue(serde_json::Value),
564562
}
565563

@@ -643,6 +641,14 @@ pub enum DescribeSessionSuccess {
643641
UnknownValue(serde_json::Value),
644642
}
645643

644+
/// struct for typed successes of method [`export_catalogs`]
645+
#[derive(Debug, Clone, Serialize, Deserialize)]
646+
#[serde(untagged)]
647+
pub enum ExportCatalogsSuccess {
648+
Status200(models::ExportCatalogsResponse),
649+
UnknownValue(serde_json::Value),
650+
}
651+
646652
/// struct for typed successes of method [`export_secrets`]
647653
#[derive(Debug, Clone, Serialize, Deserialize)]
648654
#[serde(untagged)]
@@ -1103,6 +1109,14 @@ pub enum DescribeSessionError {
11031109
UnknownValue(serde_json::Value),
11041110
}
11051111

1112+
/// struct for typed errors of method [`export_catalogs`]
1113+
#[derive(Debug, Clone, Serialize, Deserialize)]
1114+
#[serde(untagged)]
1115+
pub enum ExportCatalogsError {
1116+
DefaultResponse(models::ErrorModel),
1117+
UnknownValue(serde_json::Value),
1118+
}
1119+
11061120
/// struct for typed errors of method [`export_secrets`]
11071121
#[derive(Debug, Clone, Serialize, Deserialize)]
11081122
#[serde(untagged)]
@@ -2307,31 +2321,55 @@ pub async fn describe_session(configuration: &configuration::Configuration) -> R
23072321
}
23082322
}
23092323

2324+
/// Lists all the catalogs in your current account and re-encrypt them with the public key you supplied.
2325+
pub async fn export_catalogs(configuration: &configuration::Configuration, params: ExportCatalogsParams) -> Result<ResponseContent<ExportCatalogsSuccess>, Error<ExportCatalogsError>> {
2326+
2327+
let uri_str = format!("{}/catalogs/export", configuration.base_path);
2328+
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
2329+
2330+
if let Some(ref user_agent) = configuration.user_agent {
2331+
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2332+
}
2333+
if let Some(ref token) = configuration.bearer_access_token {
2334+
req_builder = req_builder.bearer_auth(token.to_owned());
2335+
};
2336+
req_builder = req_builder.json(&params.export_catalogs_params);
2337+
2338+
let req = req_builder.build()?;
2339+
let resp = configuration.client.execute(req).await?;
2340+
2341+
let status = resp.status();
2342+
2343+
let tower_trace_id = resp
2344+
.headers()
2345+
.get("x-tower-trace-id")
2346+
.and_then(|v| v.to_str().ok())
2347+
.map_or(String::from(DEFAULT_TOWER_TRACE_ID), String::from);
2348+
2349+
if !status.is_client_error() && !status.is_server_error() {
2350+
let content = resp.text().await?;
2351+
let entity: Option<ExportCatalogsSuccess> = serde_json::from_str(&content).ok();
2352+
Ok(ResponseContent { tower_trace_id, status, content, entity })
2353+
} else {
2354+
let content = resp.text().await?;
2355+
let entity: Option<ExportCatalogsError> = serde_json::from_str(&content).ok();
2356+
Err(Error::ResponseError(ResponseContent { tower_trace_id, status, content, entity }))
2357+
}
2358+
}
2359+
23102360
/// Lists all the secrets in your current account and re-encrypt them with the public key you supplied.
23112361
pub async fn export_secrets(configuration: &configuration::Configuration, params: ExportSecretsParams) -> Result<ResponseContent<ExportSecretsSuccess>, Error<ExportSecretsError>> {
23122362

23132363
let uri_str = format!("{}/secrets/export", configuration.base_path);
2314-
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2364+
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
23152365

2316-
if let Some(ref param_value) = params.environment {
2317-
req_builder = req_builder.query(&[("environment", &param_value.to_string())]);
2318-
}
2319-
if let Some(ref param_value) = params.all {
2320-
req_builder = req_builder.query(&[("all", &param_value.to_string())]);
2321-
}
2322-
if let Some(ref param_value) = params.page {
2323-
req_builder = req_builder.query(&[("page", &param_value.to_string())]);
2324-
}
2325-
if let Some(ref param_value) = params.page_size {
2326-
req_builder = req_builder.query(&[("page_size", &param_value.to_string())]);
2327-
}
23282366
if let Some(ref user_agent) = configuration.user_agent {
23292367
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
23302368
}
23312369
if let Some(ref token) = configuration.bearer_access_token {
23322370
req_builder = req_builder.bearer_auth(token.to_owned());
23332371
};
2334-
req_builder = req_builder.json(&params.export_user_secrets_params);
2372+
req_builder = req_builder.json(&params.export_secrets_params);
23352373

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

crates/tower-api/src/models/accept_invitation_params.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* REST API to interact with Tower Services.
55
*
6-
* The version of the OpenAPI document: v0.5.9
6+
* The version of the OpenAPI document: v0.5.12
77
* Contact: hello@tower.dev
88
* Generated by: https://openapi-generator.tech
99
*/

crates/tower-api/src/models/accept_invitation_response.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* REST API to interact with Tower Services.
55
*
6-
* The version of the OpenAPI document: v0.5.9
6+
* The version of the OpenAPI document: v0.5.12
77
* Contact: hello@tower.dev
88
* Generated by: https://openapi-generator.tech
99
*/

crates/tower-api/src/models/account.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* REST API to interact with Tower Services.
55
*
6-
* The version of the OpenAPI document: v0.5.9
6+
* The version of the OpenAPI document: v0.5.12
77
* Contact: hello@tower.dev
88
* Generated by: https://openapi-generator.tech
99
*/

crates/tower-api/src/models/acknowledge_alert_response.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* REST API to interact with Tower Services.
55
*
6-
* The version of the OpenAPI document: v0.5.9
6+
* The version of the OpenAPI document: v0.5.12
77
* Contact: hello@tower.dev
88
* Generated by: https://openapi-generator.tech
99
*/

0 commit comments

Comments
 (0)