From 9fa55f9ad3d300c7112d7eed6b641571abb3422c Mon Sep 17 00:00:00 2001 From: Brad Heller Date: Mon, 26 May 2025 16:12:50 +0200 Subject: [PATCH 1/6] chore: Add context object to make logging easy --- Cargo.lock | 7 +++++++ Cargo.toml | 3 ++- crates/tower-telemetry/Cargo.toml | 10 ++++++++++ crates/tower-telemetry/src/lib.rs | 2 ++ crates/tower-telemetry/src/logging.rs | 23 +++++++++++++++++++++++ 5 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 crates/tower-telemetry/Cargo.toml create mode 100644 crates/tower-telemetry/src/lib.rs create mode 100644 crates/tower-telemetry/src/logging.rs diff --git a/Cargo.lock b/Cargo.lock index 02eb08da..899b6704 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2895,6 +2895,13 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" +[[package]] +name = "tower-telemetry" +version = "0.3.14" +dependencies = [ + "log", +] + [[package]] name = "tower-version" version = "0.3.14" diff --git a/Cargo.toml b/Cargo.toml index f28e5351..decb66f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ futures-util = "0.3" glob = "0.3" http = "1.1" indicatif = "0.17" -log = "0.4" +log = { version = "0.4", features = ["kv"] } pem = "3" promptly = "0.3" rand = "0.8" @@ -61,6 +61,7 @@ tower-api = { path = "crates/tower-api" } tower-cmd = { path = "crates/tower-cmd" } tower-package = { path = "crates/tower-package" } tower-runtime = { path = "crates/tower-runtime" } +tower-telemetry = { path = "crates/tower-telemetry" } url = { version = "2", features = ["serde"] } webbrowser = "1" diff --git a/crates/tower-telemetry/Cargo.toml b/crates/tower-telemetry/Cargo.toml new file mode 100644 index 00000000..4a0c8460 --- /dev/null +++ b/crates/tower-telemetry/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "tower-telemetry" +version = { workspace = true } +authors = { workspace = true } +edition = { workspace = true } +rust-version = { workspace = true } +license = { workspace = true } + +[dependencies] +log = { workspace = true } diff --git a/crates/tower-telemetry/src/lib.rs b/crates/tower-telemetry/src/lib.rs new file mode 100644 index 00000000..b2d926f1 --- /dev/null +++ b/crates/tower-telemetry/src/lib.rs @@ -0,0 +1,2 @@ +pub mod logging; +pub use logging::RunContext; diff --git a/crates/tower-telemetry/src/logging.rs b/crates/tower-telemetry/src/logging.rs new file mode 100644 index 00000000..f56820f1 --- /dev/null +++ b/crates/tower-telemetry/src/logging.rs @@ -0,0 +1,23 @@ +use log::kv::{Key, Value}; + +pub struct RunContext { + run_id: String, +} + +impl log::kv::ToValue for RunContext { + fn to_value(&self) -> Value { + Value::from(self.run_id.as_str()) + } +} + +impl log::kv::ToKey for RunContext { + fn to_key(&self) -> Key { + Key::from("tower.run_id") + } +} + +impl RunContext { + pub fn new(run_id: String) -> Self { + Self { run_id } + } +} From bf2e65ff09b969f131953e808f270e83785e5e58 Mon Sep 17 00:00:00 2001 From: Brad Heller Date: Mon, 26 May 2025 16:14:03 +0200 Subject: [PATCH 2/6] chore: Upgrade Tower API to latest --- crates/tower-api/README.md | 17 +- crates/tower-api/src/apis/configuration.rs | 2 +- crates/tower-api/src/apis/default_api.rs | 185 ++++++++++++++++-- .../src/models/accept_invitation_params.rs | 2 +- .../src/models/accept_invitation_response.rs | 2 +- crates/tower-api/src/models/account.rs | 2 +- .../src/models/acknowledge_alert_response.rs | 2 +- crates/tower-api/src/models/alert.rs | 61 ++---- crates/tower-api/src/models/api_key.rs | 2 +- crates/tower-api/src/models/app.rs | 2 +- crates/tower-api/src/models/app_statistics.rs | 2 +- crates/tower-api/src/models/app_summary.rs | 2 +- crates/tower-api/src/models/app_version.rs | 2 +- .../src/models/cancel_run_response.rs | 2 +- crates/tower-api/src/models/catalog.rs | 2 +- .../tower-api/src/models/catalog_property.rs | 2 +- .../claim_device_login_ticket_params.rs | 2 +- .../claim_device_login_ticket_response.rs | 2 +- .../src/models/create_account_params.rs | 2 +- .../create_account_params_flags_struct.rs | 2 +- .../src/models/create_account_response.rs | 2 +- .../src/models/create_api_key_params.rs | 2 +- .../src/models/create_api_key_response.rs | 2 +- .../tower-api/src/models/create_app_params.rs | 2 +- .../src/models/create_app_response.rs | 2 +- .../src/models/create_catalog_params.rs | 2 +- .../src/models/create_catalog_response.rs | 2 +- .../create_device_login_ticket_response.rs | 2 +- .../models/create_password_reset_params.rs | 32 +++ .../models/create_password_reset_response.rs | 32 +++ .../src/models/create_secret_params.rs | 2 +- .../src/models/create_secret_response.rs | 2 +- .../src/models/create_session_params.rs | 2 +- .../src/models/create_session_response.rs | 2 +- .../src/models/create_team_params.rs | 2 +- .../src/models/create_team_response.rs | 2 +- .../src/models/delete_api_key_params.rs | 2 +- .../src/models/delete_api_key_response.rs | 2 +- .../src/models/delete_app_response.rs | 2 +- .../src/models/delete_catalog_response.rs | 2 +- .../src/models/delete_secret_response.rs | 2 +- .../models/delete_team_invitation_params.rs | 2 +- .../models/delete_team_invitation_response.rs | 2 +- .../src/models/delete_team_params.rs | 2 +- .../src/models/delete_team_response.rs | 2 +- .../src/models/deploy_app_response.rs | 2 +- .../src/models/describe_app_response.rs | 2 +- .../models/describe_app_version_response.rs | 2 +- .../describe_device_login_session_response.rs | 2 +- .../src/models/describe_run_logs_response.rs | 2 +- .../src/models/describe_run_response.rs | 2 +- .../models/describe_secrets_key_response.rs | 2 +- .../src/models/describe_session_response.rs | 2 +- .../src/models/encrypted_catalog_property.rs | 2 +- crates/tower-api/src/models/error_detail.rs | 2 +- crates/tower-api/src/models/error_model.rs | 2 +- .../src/models/export_catalogs_params.rs | 2 +- .../src/models/export_catalogs_response.rs | 2 +- .../src/models/export_secrets_params.rs | 2 +- .../src/models/export_secrets_response.rs | 2 +- .../tower-api/src/models/exported_catalog.rs | 2 +- .../src/models/exported_catalog_property.rs | 2 +- .../tower-api/src/models/exported_secret.rs | 2 +- .../generate_app_statistics_response.rs | 2 +- .../generate_run_statistics_response.rs | 2 +- .../src/models/invite_team_member_params.rs | 2 +- .../src/models/invite_team_member_response.rs | 2 +- .../src/models/leave_team_response.rs | 2 +- .../src/models/list_alerts_200_response.rs | 24 +++ .../src/models/list_alerts_response.rs | 2 +- .../src/models/list_api_keys_response.rs | 2 +- .../models/list_app_environments_response.rs | 2 +- .../src/models/list_app_versions_response.rs | 2 +- .../src/models/list_apps_response.rs | 2 +- .../src/models/list_catalogs_response.rs | 2 +- .../list_my_team_invitations_response.rs | 2 +- .../src/models/list_runs_response.rs | 2 +- .../list_secret_environments_response.rs | 2 +- .../src/models/list_secrets_response.rs | 2 +- .../models/list_team_invitations_response.rs | 2 +- .../src/models/list_team_members_response.rs | 2 +- .../src/models/list_teams_response.rs | 2 +- crates/tower-api/src/models/log_line.rs | 2 +- crates/tower-api/src/models/mod.rs | 20 +- crates/tower-api/src/models/pagination.rs | 2 +- crates/tower-api/src/models/parameter.rs | 2 +- .../src/models/refresh_session_params.rs | 2 +- .../src/models/refresh_session_response.rs | 2 +- .../src/models/remove_team_member_params.rs | 2 +- .../src/models/remove_team_member_response.rs | 2 +- .../models/resend_team_invitation_params.rs | 2 +- .../models/resend_team_invitation_response.rs | 2 +- crates/tower-api/src/models/run.rs | 2 +- crates/tower-api/src/models/run_app_params.rs | 2 +- .../tower-api/src/models/run_app_response.rs | 2 +- .../tower-api/src/models/run_failure_alert.rs | 32 +++ crates/tower-api/src/models/run_log_line.rs | 2 +- crates/tower-api/src/models/run_parameter.rs | 2 +- crates/tower-api/src/models/run_results.rs | 2 +- crates/tower-api/src/models/run_statistics.rs | 2 +- crates/tower-api/src/models/secret.rs | 2 +- crates/tower-api/src/models/series_point.rs | 2 +- crates/tower-api/src/models/session.rs | 2 +- crates/tower-api/src/models/sse_warning.rs | 32 +++ .../src/models/statistics_settings.rs | 2 +- .../stream_alerts_200_response_inner.rs | 26 +++ .../stream_run_logs_200_response_inner.rs | 6 +- crates/tower-api/src/models/team.rs | 2 +- .../tower-api/src/models/team_invitation.rs | 2 +- crates/tower-api/src/models/token.rs | 2 +- .../src/models/update_account_slug_params.rs | 2 +- .../models/update_account_slug_response.rs | 2 +- .../tower-api/src/models/update_app_params.rs | 2 +- .../src/models/update_app_response.rs | 2 +- .../src/models/update_catalog_params.rs | 2 +- .../src/models/update_catalog_response.rs | 2 +- .../update_my_team_invitation_params.rs | 2 +- .../update_my_team_invitation_response.rs | 2 +- .../models/update_password_reset_params.rs | 32 +++ .../models/update_password_reset_response.rs | 32 +++ .../src/models/update_secret_params.rs | 2 +- .../src/models/update_secret_response.rs | 2 +- .../src/models/update_team_params.rs | 2 +- .../src/models/update_team_response.rs | 2 +- .../src/models/update_user_params.rs | 2 +- .../src/models/update_user_response.rs | 2 +- crates/tower-api/src/models/user.rs | 2 +- 127 files changed, 579 insertions(+), 180 deletions(-) create mode 100644 crates/tower-api/src/models/create_password_reset_params.rs create mode 100644 crates/tower-api/src/models/create_password_reset_response.rs create mode 100644 crates/tower-api/src/models/list_alerts_200_response.rs create mode 100644 crates/tower-api/src/models/run_failure_alert.rs create mode 100644 crates/tower-api/src/models/sse_warning.rs create mode 100644 crates/tower-api/src/models/stream_alerts_200_response_inner.rs create mode 100644 crates/tower-api/src/models/update_password_reset_params.rs create mode 100644 crates/tower-api/src/models/update_password_reset_response.rs diff --git a/crates/tower-api/README.md b/crates/tower-api/README.md index 597a7ff6..0c59d9ef 100644 --- a/crates/tower-api/README.md +++ b/crates/tower-api/README.md @@ -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.5.12 +- API version: v0.5.23 - Package version: 1.0.0 - Generator version: 7.13.0 - Build package: `org.openapitools.codegen.languages.RustClientCodegen` @@ -28,7 +28,7 @@ All URIs are relative to *https://api.tower.dev/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *DefaultApi* | [**accept_invitation**](docs/DefaultApi.md#accept_invitation) | **POST** /accounts/invite | Accept an invitation code -*DefaultApi* | [**acknowledge_alert**](docs/DefaultApi.md#acknowledge_alert) | **POST** /alerts/{alert_id}/acknowledge | Acknowledge alert +*DefaultApi* | [**acknowledge_alert**](docs/DefaultApi.md#acknowledge_alert) | **POST** /alerts/{alert_seq}/acknowledge | Acknowledge alert *DefaultApi* | [**cancel_run**](docs/DefaultApi.md#cancel_run) | **POST** /apps/{slug}/runs/{seq} | Cancel run *DefaultApi* | [**claim_device_login_ticket**](docs/DefaultApi.md#claim_device_login_ticket) | **POST** /login/device/claim | Claim a device login ticket *DefaultApi* | [**create_account**](docs/DefaultApi.md#create_account) | **POST** /accounts | Create account @@ -36,6 +36,7 @@ Class | Method | HTTP request | Description *DefaultApi* | [**create_app**](docs/DefaultApi.md#create_app) | **POST** /apps | Create app *DefaultApi* | [**create_catalog**](docs/DefaultApi.md#create_catalog) | **POST** /catalogs | Create catalog *DefaultApi* | [**create_device_login_ticket**](docs/DefaultApi.md#create_device_login_ticket) | **GET** /login/device | Create device login ticket +*DefaultApi* | [**create_password_reset**](docs/DefaultApi.md#create_password_reset) | **POST** /accounts/password-reset | Create password reset *DefaultApi* | [**create_secret**](docs/DefaultApi.md#create_secret) | **POST** /secrets | Create secret *DefaultApi* | [**create_session**](docs/DefaultApi.md#create_session) | **POST** /session | Create session *DefaultApi* | [**create_team**](docs/DefaultApi.md#create_team) | **POST** /teams | Create team @@ -77,11 +78,13 @@ Class | Method | HTTP request | Description *DefaultApi* | [**remove_team_member**](docs/DefaultApi.md#remove_team_member) | **DELETE** /teams/{slug}/members | Remove team member *DefaultApi* | [**resend_team_invitation**](docs/DefaultApi.md#resend_team_invitation) | **POST** /teams/{slug}/invites/resend | Resend team invitation *DefaultApi* | [**run_app**](docs/DefaultApi.md#run_app) | **POST** /apps/{slug}/runs | Run app +*DefaultApi* | [**stream_alerts**](docs/DefaultApi.md#stream_alerts) | **GET** /alerts/stream | Stream alert notifications *DefaultApi* | [**stream_run_logs**](docs/DefaultApi.md#stream_run_logs) | **GET** /apps/{slug}/runs/{seq}/logs/stream | Stream run logs *DefaultApi* | [**update_account_slug**](docs/DefaultApi.md#update_account_slug) | **PUT** /accounts/{slug} | Update account slug *DefaultApi* | [**update_app**](docs/DefaultApi.md#update_app) | **PUT** /apps/{name} | Update app *DefaultApi* | [**update_catalog**](docs/DefaultApi.md#update_catalog) | **PUT** /catalogs/{slug} | Update catalog *DefaultApi* | [**update_my_team_invitation**](docs/DefaultApi.md#update_my_team_invitation) | **PUT** /team-invites | Update my team invitation +*DefaultApi* | [**update_password_reset**](docs/DefaultApi.md#update_password_reset) | **POST** /accounts/password-reset/{code} | Update password reset *DefaultApi* | [**update_secret**](docs/DefaultApi.md#update_secret) | **PUT** /secrets/{name} | Update secret *DefaultApi* | [**update_team**](docs/DefaultApi.md#update_team) | **PUT** /teams/{slug} | Update team *DefaultApi* | [**update_user**](docs/DefaultApi.md#update_user) | **PUT** /user | Update user profile @@ -94,7 +97,6 @@ Class | Method | HTTP request | Description - [Account](docs/Account.md) - [AcknowledgeAlertResponse](docs/AcknowledgeAlertResponse.md) - [Alert](docs/Alert.md) - - [AlertDetail](docs/AlertDetail.md) - [ApiKey](docs/ApiKey.md) - [App](docs/App.md) - [AppStatistics](docs/AppStatistics.md) @@ -115,6 +117,8 @@ Class | Method | HTTP request | Description - [CreateCatalogParams](docs/CreateCatalogParams.md) - [CreateCatalogResponse](docs/CreateCatalogResponse.md) - [CreateDeviceLoginTicketResponse](docs/CreateDeviceLoginTicketResponse.md) + - [CreatePasswordResetParams](docs/CreatePasswordResetParams.md) + - [CreatePasswordResetResponse](docs/CreatePasswordResetResponse.md) - [CreateSecretParams](docs/CreateSecretParams.md) - [CreateSecretResponse](docs/CreateSecretResponse.md) - [CreateSessionParams](docs/CreateSessionParams.md) @@ -153,6 +157,7 @@ Class | Method | HTTP request | Description - [InviteTeamMemberParams](docs/InviteTeamMemberParams.md) - [InviteTeamMemberResponse](docs/InviteTeamMemberResponse.md) - [LeaveTeamResponse](docs/LeaveTeamResponse.md) + - [ListAlerts200Response](docs/ListAlerts200Response.md) - [ListAlertsResponse](docs/ListAlertsResponse.md) - [ListApiKeysResponse](docs/ListApiKeysResponse.md) - [ListAppEnvironmentsResponse](docs/ListAppEnvironmentsResponse.md) @@ -167,7 +172,6 @@ Class | Method | HTTP request | Description - [ListTeamMembersResponse](docs/ListTeamMembersResponse.md) - [ListTeamsResponse](docs/ListTeamsResponse.md) - [LogLine](docs/LogLine.md) - - [LogLineError](docs/LogLineError.md) - [Pagination](docs/Pagination.md) - [Parameter](docs/Parameter.md) - [RefreshSessionParams](docs/RefreshSessionParams.md) @@ -179,6 +183,7 @@ Class | Method | HTTP request | Description - [Run](docs/Run.md) - [RunAppParams](docs/RunAppParams.md) - [RunAppResponse](docs/RunAppResponse.md) + - [RunFailureAlert](docs/RunFailureAlert.md) - [RunLogLine](docs/RunLogLine.md) - [RunParameter](docs/RunParameter.md) - [RunResults](docs/RunResults.md) @@ -186,7 +191,9 @@ Class | Method | HTTP request | Description - [Secret](docs/Secret.md) - [SeriesPoint](docs/SeriesPoint.md) - [Session](docs/Session.md) + - [SseWarning](docs/SseWarning.md) - [StatisticsSettings](docs/StatisticsSettings.md) + - [StreamAlerts200ResponseInner](docs/StreamAlerts200ResponseInner.md) - [StreamRunLogs200ResponseInner](docs/StreamRunLogs200ResponseInner.md) - [Team](docs/Team.md) - [TeamInvitation](docs/TeamInvitation.md) @@ -199,6 +206,8 @@ Class | Method | HTTP request | Description - [UpdateCatalogResponse](docs/UpdateCatalogResponse.md) - [UpdateMyTeamInvitationParams](docs/UpdateMyTeamInvitationParams.md) - [UpdateMyTeamInvitationResponse](docs/UpdateMyTeamInvitationResponse.md) + - [UpdatePasswordResetParams](docs/UpdatePasswordResetParams.md) + - [UpdatePasswordResetResponse](docs/UpdatePasswordResetResponse.md) - [UpdateSecretParams](docs/UpdateSecretParams.md) - [UpdateSecretResponse](docs/UpdateSecretResponse.md) - [UpdateTeamParams](docs/UpdateTeamParams.md) diff --git a/crates/tower-api/src/apis/configuration.rs b/crates/tower-api/src/apis/configuration.rs index c6db6118..9563d78b 100644 --- a/crates/tower-api/src/apis/configuration.rs +++ b/crates/tower-api/src/apis/configuration.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/apis/default_api.rs b/crates/tower-api/src/apis/default_api.rs index ec8ab122..bdd0bd69 100644 --- a/crates/tower-api/src/apis/default_api.rs +++ b/crates/tower-api/src/apis/default_api.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -25,8 +25,8 @@ pub struct AcceptInvitationParams { /// struct for passing parameters to the method [`acknowledge_alert`] #[derive(Clone, Debug)] pub struct AcknowledgeAlertParams { - /// ID of the alert to acknowledge - pub alert_id: String + /// Seq of the alert to acknowledge + pub alert_seq: i64 } /// struct for passing parameters to the method [`cancel_run`] @@ -68,6 +68,12 @@ pub struct CreateCatalogParams { pub create_catalog_params: models::CreateCatalogParams } +/// struct for passing parameters to the method [`create_password_reset`] +#[derive(Clone, Debug)] +pub struct CreatePasswordResetParams { + pub create_password_reset_params: models::CreatePasswordResetParams +} + /// struct for passing parameters to the method [`create_secret`] #[derive(Clone, Debug)] pub struct CreateSecretParams { @@ -234,8 +240,6 @@ pub struct LeaveTeamParams { pub struct ListAlertsParams { /// Filter alerts by alert type pub alert_type: Option, - /// Filter by acknowledgement status (true=acknowledged, false=unacknowledged) - pub acked: Option, /// Filter alerts created after or at this datetime (inclusive) pub start_at: Option, /// Filter alerts created before or at this datetime (inclusive) @@ -243,7 +247,9 @@ pub struct ListAlertsParams { /// The page number to fetch. pub page: Option, /// The number of records to fetch on each page. - pub page_size: Option + pub page_size: Option, + /// Filter alerts by acknowledged status. + pub acked: Option } /// struct for passing parameters to the method [`list_app_environments`] @@ -403,6 +409,14 @@ pub struct UpdateMyTeamInvitationParams { pub update_my_team_invitation_params: models::UpdateMyTeamInvitationParams } +/// struct for passing parameters to the method [`update_password_reset`] +#[derive(Clone, Debug)] +pub struct UpdatePasswordResetParams { + /// The password reset code that was sent to you + pub code: String, + pub update_password_reset_params: models::UpdatePasswordResetParams +} + /// struct for passing parameters to the method [`update_secret`] #[derive(Clone, Debug)] pub struct UpdateSecretParams { @@ -497,6 +511,14 @@ pub enum CreateDeviceLoginTicketSuccess { UnknownValue(serde_json::Value), } +/// struct for typed successes of method [`create_password_reset`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreatePasswordResetSuccess { + Status200(models::CreatePasswordResetResponse), + UnknownValue(serde_json::Value), +} + /// struct for typed successes of method [`create_secret`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -693,7 +715,7 @@ pub enum LeaveTeamSuccess { #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ListAlertsSuccess { - Status200(models::ListAlertsResponse), + Status200(models::ListAlerts200Response), UnknownValue(serde_json::Value), } @@ -826,6 +848,14 @@ pub enum RunAppSuccess { UnknownValue(serde_json::Value), } +/// struct for typed successes of method [`stream_alerts`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum StreamAlertsSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + /// struct for typed successes of method [`stream_run_logs`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -866,6 +896,14 @@ pub enum UpdateMyTeamInvitationSuccess { UnknownValue(serde_json::Value), } +/// struct for typed successes of method [`update_password_reset`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdatePasswordResetSuccess { + Status200(models::UpdatePasswordResetResponse), + UnknownValue(serde_json::Value), +} + /// struct for typed successes of method [`update_secret`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -962,6 +1000,14 @@ pub enum CreateDeviceLoginTicketError { UnknownValue(serde_json::Value), } +/// struct for typed errors of method [`create_password_reset`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreatePasswordResetError { + DefaultResponse(models::ErrorModel), + UnknownValue(serde_json::Value), +} + /// struct for typed errors of method [`create_secret`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -1293,6 +1339,14 @@ pub enum RunAppError { UnknownValue(serde_json::Value), } +/// struct for typed errors of method [`stream_alerts`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum StreamAlertsError { + DefaultResponse(models::ErrorModel), + UnknownValue(serde_json::Value), +} + /// struct for typed errors of method [`stream_run_logs`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -1333,6 +1387,14 @@ pub enum UpdateMyTeamInvitationError { UnknownValue(serde_json::Value), } +/// struct for typed errors of method [`update_password_reset`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdatePasswordResetError { + DefaultResponse(models::ErrorModel), + UnknownValue(serde_json::Value), +} + /// struct for typed errors of method [`update_secret`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -1397,7 +1459,7 @@ pub async fn accept_invitation(configuration: &configuration::Configuration, par /// Mark an alert as acknowledged pub async fn acknowledge_alert(configuration: &configuration::Configuration, params: AcknowledgeAlertParams) -> Result, Error> { - let uri_str = format!("{}/alerts/{alert_id}/acknowledge", configuration.base_path, alert_id=crate::apis::urlencode(params.alert_id)); + let uri_str = format!("{}/alerts/{alert_seq}/acknowledge", configuration.base_path, alert_seq=params.alert_seq); let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -1672,6 +1734,39 @@ pub async fn create_device_login_ticket(configuration: &configuration::Configura } } +/// Starts the password reset process for an account. If an email address exists for the account supplied, you will get a reset password email. +pub async fn create_password_reset(configuration: &configuration::Configuration, params: CreatePasswordResetParams) -> Result, Error> { + + let uri_str = format!("{}/accounts/password-reset", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(¶ms.create_password_reset_params); + + 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 = serde_json::from_str(&content).ok(); + Ok(ResponseContent { tower_trace_id, status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { tower_trace_id, status, content, entity })) + } +} + /// Creates a new secret and associates it with the current account. pub async fn create_secret(configuration: &configuration::Configuration, params: CreateSecretParams) -> Result, Error> { @@ -2546,9 +2641,6 @@ pub async fn list_alerts(configuration: &configuration::Configuration, params: L if let Some(ref param_value) = params.alert_type { req_builder = req_builder.query(&[("alert_type", ¶m_value.to_string())]); } - if let Some(ref param_value) = params.acked { - req_builder = req_builder.query(&[("acked", ¶m_value.to_string())]); - } if let Some(ref param_value) = params.start_at { req_builder = req_builder.query(&[("start_at", ¶m_value.to_string())]); } @@ -2561,6 +2653,9 @@ pub async fn list_alerts(configuration: &configuration::Configuration, params: L if let Some(ref param_value) = params.page_size { req_builder = req_builder.query(&[("page_size", ¶m_value.to_string())]); } + if let Some(ref param_value) = params.acked { + req_builder = req_builder.query(&[("acked", ¶m_value.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } @@ -3233,6 +3328,41 @@ pub async fn run_app(configuration: &configuration::Configuration, params: RunAp } } +/// Streams alert notifications in real-time +pub async fn stream_alerts(configuration: &configuration::Configuration) -> Result, Error> { + + let uri_str = format!("{}/alerts/stream", 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 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 = serde_json::from_str(&content).ok(); + Ok(ResponseContent { tower_trace_id, status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { tower_trace_id, status, content, entity })) + } +} + /// Streams the logs associated with a particular run of an app in real-time. pub async fn stream_run_logs(configuration: &configuration::Configuration, params: StreamRunLogsParams) -> Result, Error> { @@ -3412,6 +3542,39 @@ pub async fn update_my_team_invitation(configuration: &configuration::Configurat } } +/// Updates the password reset code with the new password +pub async fn update_password_reset(configuration: &configuration::Configuration, params: UpdatePasswordResetParams) -> Result, Error> { + + let uri_str = format!("{}/accounts/password-reset/{code}", configuration.base_path, code=crate::apis::urlencode(params.code)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(¶ms.update_password_reset_params); + + 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 = serde_json::from_str(&content).ok(); + Ok(ResponseContent { tower_trace_id, status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { tower_trace_id, status, content, entity })) + } +} + /// Updates a secret that has previously been created in your account pub async fn update_secret(configuration: &configuration::Configuration, params: UpdateSecretParams) -> Result, Error> { diff --git a/crates/tower-api/src/models/accept_invitation_params.rs b/crates/tower-api/src/models/accept_invitation_params.rs index e4dc95be..a787f06b 100644 --- a/crates/tower-api/src/models/accept_invitation_params.rs +++ b/crates/tower-api/src/models/accept_invitation_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/accept_invitation_response.rs b/crates/tower-api/src/models/accept_invitation_response.rs index 4584f8c4..5f312d1c 100644 --- a/crates/tower-api/src/models/accept_invitation_response.rs +++ b/crates/tower-api/src/models/accept_invitation_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/account.rs b/crates/tower-api/src/models/account.rs index 08b36505..40bdb7ca 100644 --- a/crates/tower-api/src/models/account.rs +++ b/crates/tower-api/src/models/account.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/acknowledge_alert_response.rs b/crates/tower-api/src/models/acknowledge_alert_response.rs index 934d7cee..ec30a448 100644 --- a/crates/tower-api/src/models/acknowledge_alert_response.rs +++ b/crates/tower-api/src/models/acknowledge_alert_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/alert.rs b/crates/tower-api/src/models/alert.rs index b592aa12..d85d2e6a 100644 --- a/crates/tower-api/src/models/alert.rs +++ b/crates/tower-api/src/models/alert.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -13,62 +13,35 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Alert { + /// Whether the alert has been acknowledged + #[serde(rename = "acked")] + pub acked: bool, /// Type of the alert #[serde(rename = "alert_type")] - pub alert_type: AlertType, - /// Time when the alert was created + pub alert_type: String, + /// When the alert was created #[serde(rename = "created_at")] pub created_at: String, - /// Detailed description of the alert - #[serde(rename = "details")] - pub details: Vec, - /// Unique identifier for the alert - #[serde(rename = "id")] - pub id: String, - /// Status of the alert + #[serde(rename = "detail")] + pub detail: Box, + /// Sequence number of the alert + #[serde(rename = "seq")] + pub seq: i32, + /// Current status of the alert #[serde(rename = "status")] - pub status: Status, + pub status: String, } impl Alert { - pub fn new(alert_type: AlertType, created_at: String, details: Vec, id: String, status: Status) -> Alert { + pub fn new(acked: bool, alert_type: String, created_at: String, detail: models::RunFailureAlert, seq: i32, status: String) -> Alert { Alert { + acked, alert_type, created_at, - details, - id, + detail: Box::new(detail), + seq, status, } } } -/// Type of the alert -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum AlertType { - #[serde(rename = "error")] - Error, - #[serde(rename = "success")] - Success, -} - -impl Default for AlertType { - fn default() -> AlertType { - Self::Error - } -} -/// Status of the alert -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Status { - #[serde(rename = "pending")] - Pending, - #[serde(rename = "sent")] - Sent, - #[serde(rename = "errored")] - Errored, -} - -impl Default for Status { - fn default() -> Status { - Self::Pending - } -} diff --git a/crates/tower-api/src/models/api_key.rs b/crates/tower-api/src/models/api_key.rs index bf2cd330..e4170523 100644 --- a/crates/tower-api/src/models/api_key.rs +++ b/crates/tower-api/src/models/api_key.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/app.rs b/crates/tower-api/src/models/app.rs index e10fe77f..682fe569 100644 --- a/crates/tower-api/src/models/app.rs +++ b/crates/tower-api/src/models/app.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/app_statistics.rs b/crates/tower-api/src/models/app_statistics.rs index 89851687..5f7ba6c1 100644 --- a/crates/tower-api/src/models/app_statistics.rs +++ b/crates/tower-api/src/models/app_statistics.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/app_summary.rs b/crates/tower-api/src/models/app_summary.rs index 5b414a46..2c5ca011 100644 --- a/crates/tower-api/src/models/app_summary.rs +++ b/crates/tower-api/src/models/app_summary.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/app_version.rs b/crates/tower-api/src/models/app_version.rs index a93449e5..aecf75c7 100644 --- a/crates/tower-api/src/models/app_version.rs +++ b/crates/tower-api/src/models/app_version.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/cancel_run_response.rs b/crates/tower-api/src/models/cancel_run_response.rs index 852b2180..03b3af90 100644 --- a/crates/tower-api/src/models/cancel_run_response.rs +++ b/crates/tower-api/src/models/cancel_run_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/catalog.rs b/crates/tower-api/src/models/catalog.rs index 1433ee28..4347e485 100644 --- a/crates/tower-api/src/models/catalog.rs +++ b/crates/tower-api/src/models/catalog.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/catalog_property.rs b/crates/tower-api/src/models/catalog_property.rs index c6f61589..81849353 100644 --- a/crates/tower-api/src/models/catalog_property.rs +++ b/crates/tower-api/src/models/catalog_property.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/claim_device_login_ticket_params.rs b/crates/tower-api/src/models/claim_device_login_ticket_params.rs index 59412a28..d33d3967 100644 --- a/crates/tower-api/src/models/claim_device_login_ticket_params.rs +++ b/crates/tower-api/src/models/claim_device_login_ticket_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/claim_device_login_ticket_response.rs b/crates/tower-api/src/models/claim_device_login_ticket_response.rs index 1ea942be..08ab208c 100644 --- a/crates/tower-api/src/models/claim_device_login_ticket_response.rs +++ b/crates/tower-api/src/models/claim_device_login_ticket_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_account_params.rs b/crates/tower-api/src/models/create_account_params.rs index 5f6003ad..408d1403 100644 --- a/crates/tower-api/src/models/create_account_params.rs +++ b/crates/tower-api/src/models/create_account_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_account_params_flags_struct.rs b/crates/tower-api/src/models/create_account_params_flags_struct.rs index efff7a38..ce05443c 100644 --- a/crates/tower-api/src/models/create_account_params_flags_struct.rs +++ b/crates/tower-api/src/models/create_account_params_flags_struct.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_account_response.rs b/crates/tower-api/src/models/create_account_response.rs index 14e73ba9..c41c58b1 100644 --- a/crates/tower-api/src/models/create_account_response.rs +++ b/crates/tower-api/src/models/create_account_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_api_key_params.rs b/crates/tower-api/src/models/create_api_key_params.rs index 839e226d..189b0596 100644 --- a/crates/tower-api/src/models/create_api_key_params.rs +++ b/crates/tower-api/src/models/create_api_key_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_api_key_response.rs b/crates/tower-api/src/models/create_api_key_response.rs index 11750a23..046483d6 100644 --- a/crates/tower-api/src/models/create_api_key_response.rs +++ b/crates/tower-api/src/models/create_api_key_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_app_params.rs b/crates/tower-api/src/models/create_app_params.rs index f8c8e5a5..f37cc621 100644 --- a/crates/tower-api/src/models/create_app_params.rs +++ b/crates/tower-api/src/models/create_app_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_app_response.rs b/crates/tower-api/src/models/create_app_response.rs index c8425bdd..7509cc30 100644 --- a/crates/tower-api/src/models/create_app_response.rs +++ b/crates/tower-api/src/models/create_app_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_catalog_params.rs b/crates/tower-api/src/models/create_catalog_params.rs index 86ef802a..8eb7f7cb 100644 --- a/crates/tower-api/src/models/create_catalog_params.rs +++ b/crates/tower-api/src/models/create_catalog_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_catalog_response.rs b/crates/tower-api/src/models/create_catalog_response.rs index 05449907..bde6c20b 100644 --- a/crates/tower-api/src/models/create_catalog_response.rs +++ b/crates/tower-api/src/models/create_catalog_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_device_login_ticket_response.rs b/crates/tower-api/src/models/create_device_login_ticket_response.rs index cd34ff4d..8f4c72a3 100644 --- a/crates/tower-api/src/models/create_device_login_ticket_response.rs +++ b/crates/tower-api/src/models/create_device_login_ticket_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_password_reset_params.rs b/crates/tower-api/src/models/create_password_reset_params.rs new file mode 100644 index 00000000..bfec67cd --- /dev/null +++ b/crates/tower-api/src/models/create_password_reset_params.rs @@ -0,0 +1,32 @@ +/* + * Tower API + * + * REST API to interact with Tower Services. + * + * The version of the OpenAPI document: v0.5.23 + * Contact: hello@tower.dev + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreatePasswordResetParams { + /// A URL to the JSON Schema for this object. + #[serde(rename = "$schema", skip_serializing_if = "Option::is_none")] + pub schema: Option, + /// The email address to send the password reset email to + #[serde(rename = "email")] + pub email: String, +} + +impl CreatePasswordResetParams { + pub fn new(email: String) -> CreatePasswordResetParams { + CreatePasswordResetParams { + schema: None, + email, + } + } +} + diff --git a/crates/tower-api/src/models/create_password_reset_response.rs b/crates/tower-api/src/models/create_password_reset_response.rs new file mode 100644 index 00000000..8e306f19 --- /dev/null +++ b/crates/tower-api/src/models/create_password_reset_response.rs @@ -0,0 +1,32 @@ +/* + * Tower API + * + * REST API to interact with Tower Services. + * + * The version of the OpenAPI document: v0.5.23 + * Contact: hello@tower.dev + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreatePasswordResetResponse { + /// A URL to the JSON Schema for this object. + #[serde(rename = "$schema", skip_serializing_if = "Option::is_none")] + pub schema: Option, + /// A boolean indicating the request was successfully processed. + #[serde(rename = "ok")] + pub ok: bool, +} + +impl CreatePasswordResetResponse { + pub fn new(ok: bool) -> CreatePasswordResetResponse { + CreatePasswordResetResponse { + schema: None, + ok, + } + } +} + diff --git a/crates/tower-api/src/models/create_secret_params.rs b/crates/tower-api/src/models/create_secret_params.rs index f79b778f..7f938168 100644 --- a/crates/tower-api/src/models/create_secret_params.rs +++ b/crates/tower-api/src/models/create_secret_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_secret_response.rs b/crates/tower-api/src/models/create_secret_response.rs index f5cab284..678f8173 100644 --- a/crates/tower-api/src/models/create_secret_response.rs +++ b/crates/tower-api/src/models/create_secret_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_session_params.rs b/crates/tower-api/src/models/create_session_params.rs index 5e902182..a7af824e 100644 --- a/crates/tower-api/src/models/create_session_params.rs +++ b/crates/tower-api/src/models/create_session_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_session_response.rs b/crates/tower-api/src/models/create_session_response.rs index ae9c3bfc..159459e9 100644 --- a/crates/tower-api/src/models/create_session_response.rs +++ b/crates/tower-api/src/models/create_session_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_team_params.rs b/crates/tower-api/src/models/create_team_params.rs index 5758f2e5..09b7dbb8 100644 --- a/crates/tower-api/src/models/create_team_params.rs +++ b/crates/tower-api/src/models/create_team_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_team_response.rs b/crates/tower-api/src/models/create_team_response.rs index fcbb9562..91b4063c 100644 --- a/crates/tower-api/src/models/create_team_response.rs +++ b/crates/tower-api/src/models/create_team_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/delete_api_key_params.rs b/crates/tower-api/src/models/delete_api_key_params.rs index 64c362c7..5e471039 100644 --- a/crates/tower-api/src/models/delete_api_key_params.rs +++ b/crates/tower-api/src/models/delete_api_key_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/delete_api_key_response.rs b/crates/tower-api/src/models/delete_api_key_response.rs index db765c61..9c912a23 100644 --- a/crates/tower-api/src/models/delete_api_key_response.rs +++ b/crates/tower-api/src/models/delete_api_key_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/delete_app_response.rs b/crates/tower-api/src/models/delete_app_response.rs index 44bd1b6c..46d979f9 100644 --- a/crates/tower-api/src/models/delete_app_response.rs +++ b/crates/tower-api/src/models/delete_app_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/delete_catalog_response.rs b/crates/tower-api/src/models/delete_catalog_response.rs index 36d3bf21..c36cf46c 100644 --- a/crates/tower-api/src/models/delete_catalog_response.rs +++ b/crates/tower-api/src/models/delete_catalog_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/delete_secret_response.rs b/crates/tower-api/src/models/delete_secret_response.rs index d4bc4869..5d0b8414 100644 --- a/crates/tower-api/src/models/delete_secret_response.rs +++ b/crates/tower-api/src/models/delete_secret_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/delete_team_invitation_params.rs b/crates/tower-api/src/models/delete_team_invitation_params.rs index 391dbf4f..72b5eb5c 100644 --- a/crates/tower-api/src/models/delete_team_invitation_params.rs +++ b/crates/tower-api/src/models/delete_team_invitation_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/delete_team_invitation_response.rs b/crates/tower-api/src/models/delete_team_invitation_response.rs index ac694118..46cb1ae4 100644 --- a/crates/tower-api/src/models/delete_team_invitation_response.rs +++ b/crates/tower-api/src/models/delete_team_invitation_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/delete_team_params.rs b/crates/tower-api/src/models/delete_team_params.rs index dd692dc7..bb989a04 100644 --- a/crates/tower-api/src/models/delete_team_params.rs +++ b/crates/tower-api/src/models/delete_team_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/delete_team_response.rs b/crates/tower-api/src/models/delete_team_response.rs index a655a2b2..e27ed138 100644 --- a/crates/tower-api/src/models/delete_team_response.rs +++ b/crates/tower-api/src/models/delete_team_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/deploy_app_response.rs b/crates/tower-api/src/models/deploy_app_response.rs index ff1568b5..c5f38a2f 100644 --- a/crates/tower-api/src/models/deploy_app_response.rs +++ b/crates/tower-api/src/models/deploy_app_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/describe_app_response.rs b/crates/tower-api/src/models/describe_app_response.rs index 3d134da2..e865cff6 100644 --- a/crates/tower-api/src/models/describe_app_response.rs +++ b/crates/tower-api/src/models/describe_app_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/describe_app_version_response.rs b/crates/tower-api/src/models/describe_app_version_response.rs index 5d3a7480..24b1cb5d 100644 --- a/crates/tower-api/src/models/describe_app_version_response.rs +++ b/crates/tower-api/src/models/describe_app_version_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/describe_device_login_session_response.rs b/crates/tower-api/src/models/describe_device_login_session_response.rs index 4af97828..0793dbae 100644 --- a/crates/tower-api/src/models/describe_device_login_session_response.rs +++ b/crates/tower-api/src/models/describe_device_login_session_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/describe_run_logs_response.rs b/crates/tower-api/src/models/describe_run_logs_response.rs index d62e17ba..19a18634 100644 --- a/crates/tower-api/src/models/describe_run_logs_response.rs +++ b/crates/tower-api/src/models/describe_run_logs_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/describe_run_response.rs b/crates/tower-api/src/models/describe_run_response.rs index 515ae310..f04127b8 100644 --- a/crates/tower-api/src/models/describe_run_response.rs +++ b/crates/tower-api/src/models/describe_run_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/describe_secrets_key_response.rs b/crates/tower-api/src/models/describe_secrets_key_response.rs index 47306707..8a53c13c 100644 --- a/crates/tower-api/src/models/describe_secrets_key_response.rs +++ b/crates/tower-api/src/models/describe_secrets_key_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/describe_session_response.rs b/crates/tower-api/src/models/describe_session_response.rs index 2ca6baf1..3dcf91a0 100644 --- a/crates/tower-api/src/models/describe_session_response.rs +++ b/crates/tower-api/src/models/describe_session_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/encrypted_catalog_property.rs b/crates/tower-api/src/models/encrypted_catalog_property.rs index 5ab10f25..def93651 100644 --- a/crates/tower-api/src/models/encrypted_catalog_property.rs +++ b/crates/tower-api/src/models/encrypted_catalog_property.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/error_detail.rs b/crates/tower-api/src/models/error_detail.rs index 9967b533..5e672933 100644 --- a/crates/tower-api/src/models/error_detail.rs +++ b/crates/tower-api/src/models/error_detail.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/error_model.rs b/crates/tower-api/src/models/error_model.rs index bf5d113b..7d15c235 100644 --- a/crates/tower-api/src/models/error_model.rs +++ b/crates/tower-api/src/models/error_model.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/export_catalogs_params.rs b/crates/tower-api/src/models/export_catalogs_params.rs index 051c04f8..1ab0f730 100644 --- a/crates/tower-api/src/models/export_catalogs_params.rs +++ b/crates/tower-api/src/models/export_catalogs_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/export_catalogs_response.rs b/crates/tower-api/src/models/export_catalogs_response.rs index 42e98068..43e7713e 100644 --- a/crates/tower-api/src/models/export_catalogs_response.rs +++ b/crates/tower-api/src/models/export_catalogs_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/export_secrets_params.rs b/crates/tower-api/src/models/export_secrets_params.rs index e35fcebd..cd83b955 100644 --- a/crates/tower-api/src/models/export_secrets_params.rs +++ b/crates/tower-api/src/models/export_secrets_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/export_secrets_response.rs b/crates/tower-api/src/models/export_secrets_response.rs index 1526d3b1..9a766f17 100644 --- a/crates/tower-api/src/models/export_secrets_response.rs +++ b/crates/tower-api/src/models/export_secrets_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/exported_catalog.rs b/crates/tower-api/src/models/exported_catalog.rs index 6f70f1ed..e62ab464 100644 --- a/crates/tower-api/src/models/exported_catalog.rs +++ b/crates/tower-api/src/models/exported_catalog.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/exported_catalog_property.rs b/crates/tower-api/src/models/exported_catalog_property.rs index c9326cc3..08329d89 100644 --- a/crates/tower-api/src/models/exported_catalog_property.rs +++ b/crates/tower-api/src/models/exported_catalog_property.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/exported_secret.rs b/crates/tower-api/src/models/exported_secret.rs index a8eeb5d4..22a94d1a 100644 --- a/crates/tower-api/src/models/exported_secret.rs +++ b/crates/tower-api/src/models/exported_secret.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/generate_app_statistics_response.rs b/crates/tower-api/src/models/generate_app_statistics_response.rs index 3482ad17..3a7e92f6 100644 --- a/crates/tower-api/src/models/generate_app_statistics_response.rs +++ b/crates/tower-api/src/models/generate_app_statistics_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/generate_run_statistics_response.rs b/crates/tower-api/src/models/generate_run_statistics_response.rs index 040812f8..547c058e 100644 --- a/crates/tower-api/src/models/generate_run_statistics_response.rs +++ b/crates/tower-api/src/models/generate_run_statistics_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/invite_team_member_params.rs b/crates/tower-api/src/models/invite_team_member_params.rs index 803c0763..73f11055 100644 --- a/crates/tower-api/src/models/invite_team_member_params.rs +++ b/crates/tower-api/src/models/invite_team_member_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/invite_team_member_response.rs b/crates/tower-api/src/models/invite_team_member_response.rs index f003d430..276f36d8 100644 --- a/crates/tower-api/src/models/invite_team_member_response.rs +++ b/crates/tower-api/src/models/invite_team_member_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/leave_team_response.rs b/crates/tower-api/src/models/leave_team_response.rs index a6bf83a8..d211f537 100644 --- a/crates/tower-api/src/models/leave_team_response.rs +++ b/crates/tower-api/src/models/leave_team_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/list_alerts_200_response.rs b/crates/tower-api/src/models/list_alerts_200_response.rs new file mode 100644 index 00000000..8625b11c --- /dev/null +++ b/crates/tower-api/src/models/list_alerts_200_response.rs @@ -0,0 +1,24 @@ +/* + * Tower API + * + * REST API to interact with Tower Services. + * + * The version of the OpenAPI document: v0.5.23 + * Contact: hello@tower.dev + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ListAlerts200Response { +} + +impl ListAlerts200Response { + pub fn new() -> ListAlerts200Response { + ListAlerts200Response { + } + } +} + diff --git a/crates/tower-api/src/models/list_alerts_response.rs b/crates/tower-api/src/models/list_alerts_response.rs index fac9c817..036ec12d 100644 --- a/crates/tower-api/src/models/list_alerts_response.rs +++ b/crates/tower-api/src/models/list_alerts_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/list_api_keys_response.rs b/crates/tower-api/src/models/list_api_keys_response.rs index 2b8699d2..240b4ca5 100644 --- a/crates/tower-api/src/models/list_api_keys_response.rs +++ b/crates/tower-api/src/models/list_api_keys_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/list_app_environments_response.rs b/crates/tower-api/src/models/list_app_environments_response.rs index 0c17f6b4..1a281df7 100644 --- a/crates/tower-api/src/models/list_app_environments_response.rs +++ b/crates/tower-api/src/models/list_app_environments_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/list_app_versions_response.rs b/crates/tower-api/src/models/list_app_versions_response.rs index 3dec792f..73938658 100644 --- a/crates/tower-api/src/models/list_app_versions_response.rs +++ b/crates/tower-api/src/models/list_app_versions_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/list_apps_response.rs b/crates/tower-api/src/models/list_apps_response.rs index 6be23d21..91ce242a 100644 --- a/crates/tower-api/src/models/list_apps_response.rs +++ b/crates/tower-api/src/models/list_apps_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/list_catalogs_response.rs b/crates/tower-api/src/models/list_catalogs_response.rs index e05a77e7..feeb3da1 100644 --- a/crates/tower-api/src/models/list_catalogs_response.rs +++ b/crates/tower-api/src/models/list_catalogs_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/list_my_team_invitations_response.rs b/crates/tower-api/src/models/list_my_team_invitations_response.rs index 146d876f..6a2278b0 100644 --- a/crates/tower-api/src/models/list_my_team_invitations_response.rs +++ b/crates/tower-api/src/models/list_my_team_invitations_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/list_runs_response.rs b/crates/tower-api/src/models/list_runs_response.rs index abbbe4df..99f46d92 100644 --- a/crates/tower-api/src/models/list_runs_response.rs +++ b/crates/tower-api/src/models/list_runs_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/list_secret_environments_response.rs b/crates/tower-api/src/models/list_secret_environments_response.rs index f46773e0..95ff371b 100644 --- a/crates/tower-api/src/models/list_secret_environments_response.rs +++ b/crates/tower-api/src/models/list_secret_environments_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/list_secrets_response.rs b/crates/tower-api/src/models/list_secrets_response.rs index 18224e78..e65b988e 100644 --- a/crates/tower-api/src/models/list_secrets_response.rs +++ b/crates/tower-api/src/models/list_secrets_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/list_team_invitations_response.rs b/crates/tower-api/src/models/list_team_invitations_response.rs index 8b33aec5..09471a0d 100644 --- a/crates/tower-api/src/models/list_team_invitations_response.rs +++ b/crates/tower-api/src/models/list_team_invitations_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/list_team_members_response.rs b/crates/tower-api/src/models/list_team_members_response.rs index c7447e9c..7bc3667e 100644 --- a/crates/tower-api/src/models/list_team_members_response.rs +++ b/crates/tower-api/src/models/list_team_members_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/list_teams_response.rs b/crates/tower-api/src/models/list_teams_response.rs index b3f48a0a..6ebafa68 100644 --- a/crates/tower-api/src/models/list_teams_response.rs +++ b/crates/tower-api/src/models/list_teams_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/log_line.rs b/crates/tower-api/src/models/log_line.rs index 7484e098..f950aafa 100644 --- a/crates/tower-api/src/models/log_line.rs +++ b/crates/tower-api/src/models/log_line.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/mod.rs b/crates/tower-api/src/models/mod.rs index 60dd66fb..3e12ab5d 100644 --- a/crates/tower-api/src/models/mod.rs +++ b/crates/tower-api/src/models/mod.rs @@ -8,8 +8,6 @@ pub mod acknowledge_alert_response; pub use self::acknowledge_alert_response::AcknowledgeAlertResponse; pub mod alert; pub use self::alert::Alert; -pub mod alert_detail; -pub use self::alert_detail::AlertDetail; pub mod api_key; pub use self::api_key::ApiKey; pub mod app; @@ -50,6 +48,10 @@ pub mod create_catalog_response; pub use self::create_catalog_response::CreateCatalogResponse; pub mod create_device_login_ticket_response; pub use self::create_device_login_ticket_response::CreateDeviceLoginTicketResponse; +pub mod create_password_reset_params; +pub use self::create_password_reset_params::CreatePasswordResetParams; +pub mod create_password_reset_response; +pub use self::create_password_reset_response::CreatePasswordResetResponse; pub mod create_secret_params; pub use self::create_secret_params::CreateSecretParams; pub mod create_secret_response; @@ -126,6 +128,8 @@ pub mod invite_team_member_response; pub use self::invite_team_member_response::InviteTeamMemberResponse; pub mod leave_team_response; pub use self::leave_team_response::LeaveTeamResponse; +pub mod list_alerts_200_response; +pub use self::list_alerts_200_response::ListAlerts200Response; pub mod list_alerts_response; pub use self::list_alerts_response::ListAlertsResponse; pub mod list_api_keys_response; @@ -154,8 +158,6 @@ pub mod list_teams_response; pub use self::list_teams_response::ListTeamsResponse; pub mod log_line; pub use self::log_line::LogLine; -pub mod log_line_error; -pub use self::log_line_error::LogLineError; pub mod pagination; pub use self::pagination::Pagination; pub mod parameter; @@ -178,6 +180,8 @@ pub mod run_app_params; pub use self::run_app_params::RunAppParams; pub mod run_app_response; pub use self::run_app_response::RunAppResponse; +pub mod run_failure_alert; +pub use self::run_failure_alert::RunFailureAlert; pub mod run_log_line; pub use self::run_log_line::RunLogLine; pub mod run_parameter; @@ -192,8 +196,12 @@ pub mod series_point; pub use self::series_point::SeriesPoint; pub mod session; pub use self::session::Session; +pub mod sse_warning; +pub use self::sse_warning::SseWarning; pub mod statistics_settings; pub use self::statistics_settings::StatisticsSettings; +pub mod stream_alerts_200_response_inner; +pub use self::stream_alerts_200_response_inner::StreamAlerts200ResponseInner; pub mod stream_run_logs_200_response_inner; pub use self::stream_run_logs_200_response_inner::StreamRunLogs200ResponseInner; pub mod team; @@ -218,6 +226,10 @@ pub mod update_my_team_invitation_params; pub use self::update_my_team_invitation_params::UpdateMyTeamInvitationParams; pub mod update_my_team_invitation_response; pub use self::update_my_team_invitation_response::UpdateMyTeamInvitationResponse; +pub mod update_password_reset_params; +pub use self::update_password_reset_params::UpdatePasswordResetParams; +pub mod update_password_reset_response; +pub use self::update_password_reset_response::UpdatePasswordResetResponse; pub mod update_secret_params; pub use self::update_secret_params::UpdateSecretParams; pub mod update_secret_response; diff --git a/crates/tower-api/src/models/pagination.rs b/crates/tower-api/src/models/pagination.rs index 8061df7d..57d75546 100644 --- a/crates/tower-api/src/models/pagination.rs +++ b/crates/tower-api/src/models/pagination.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/parameter.rs b/crates/tower-api/src/models/parameter.rs index 644c3201..6c2f39a7 100644 --- a/crates/tower-api/src/models/parameter.rs +++ b/crates/tower-api/src/models/parameter.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/refresh_session_params.rs b/crates/tower-api/src/models/refresh_session_params.rs index c8caa271..e041d0e2 100644 --- a/crates/tower-api/src/models/refresh_session_params.rs +++ b/crates/tower-api/src/models/refresh_session_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/refresh_session_response.rs b/crates/tower-api/src/models/refresh_session_response.rs index df3f8363..d460dabf 100644 --- a/crates/tower-api/src/models/refresh_session_response.rs +++ b/crates/tower-api/src/models/refresh_session_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/remove_team_member_params.rs b/crates/tower-api/src/models/remove_team_member_params.rs index 5fc39c69..3cca2531 100644 --- a/crates/tower-api/src/models/remove_team_member_params.rs +++ b/crates/tower-api/src/models/remove_team_member_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/remove_team_member_response.rs b/crates/tower-api/src/models/remove_team_member_response.rs index f4bece2f..0ee7b65c 100644 --- a/crates/tower-api/src/models/remove_team_member_response.rs +++ b/crates/tower-api/src/models/remove_team_member_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/resend_team_invitation_params.rs b/crates/tower-api/src/models/resend_team_invitation_params.rs index aaebdbf2..d29ad4fd 100644 --- a/crates/tower-api/src/models/resend_team_invitation_params.rs +++ b/crates/tower-api/src/models/resend_team_invitation_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/resend_team_invitation_response.rs b/crates/tower-api/src/models/resend_team_invitation_response.rs index 65fdb3a8..07bafd59 100644 --- a/crates/tower-api/src/models/resend_team_invitation_response.rs +++ b/crates/tower-api/src/models/resend_team_invitation_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/run.rs b/crates/tower-api/src/models/run.rs index ec101797..af42a3c5 100644 --- a/crates/tower-api/src/models/run.rs +++ b/crates/tower-api/src/models/run.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/run_app_params.rs b/crates/tower-api/src/models/run_app_params.rs index c6d2b168..bc34d13e 100644 --- a/crates/tower-api/src/models/run_app_params.rs +++ b/crates/tower-api/src/models/run_app_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/run_app_response.rs b/crates/tower-api/src/models/run_app_response.rs index afa53167..ee61bbcd 100644 --- a/crates/tower-api/src/models/run_app_response.rs +++ b/crates/tower-api/src/models/run_app_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/run_failure_alert.rs b/crates/tower-api/src/models/run_failure_alert.rs new file mode 100644 index 00000000..ed284bd8 --- /dev/null +++ b/crates/tower-api/src/models/run_failure_alert.rs @@ -0,0 +1,32 @@ +/* + * Tower API + * + * REST API to interact with Tower Services. + * + * The version of the OpenAPI document: v0.5.23 + * Contact: hello@tower.dev + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct RunFailureAlert { + /// App that the failed Run belongs to + #[serde(rename = "app")] + pub app: Box, + /// Run that failed + #[serde(rename = "run")] + pub run: Box, +} + +impl RunFailureAlert { + pub fn new(app: models::App, run: models::Run) -> RunFailureAlert { + RunFailureAlert { + app: Box::new(app), + run: Box::new(run), + } + } +} + diff --git a/crates/tower-api/src/models/run_log_line.rs b/crates/tower-api/src/models/run_log_line.rs index eba7e8f6..e638cfa4 100644 --- a/crates/tower-api/src/models/run_log_line.rs +++ b/crates/tower-api/src/models/run_log_line.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/run_parameter.rs b/crates/tower-api/src/models/run_parameter.rs index 83a9f7b6..473922e6 100644 --- a/crates/tower-api/src/models/run_parameter.rs +++ b/crates/tower-api/src/models/run_parameter.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/run_results.rs b/crates/tower-api/src/models/run_results.rs index aa6fa4f6..95479358 100644 --- a/crates/tower-api/src/models/run_results.rs +++ b/crates/tower-api/src/models/run_results.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/run_statistics.rs b/crates/tower-api/src/models/run_statistics.rs index 81046e1a..d1f35429 100644 --- a/crates/tower-api/src/models/run_statistics.rs +++ b/crates/tower-api/src/models/run_statistics.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/secret.rs b/crates/tower-api/src/models/secret.rs index a541f52e..993e79e2 100644 --- a/crates/tower-api/src/models/secret.rs +++ b/crates/tower-api/src/models/secret.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/series_point.rs b/crates/tower-api/src/models/series_point.rs index 8f4adbd2..279a0e51 100644 --- a/crates/tower-api/src/models/series_point.rs +++ b/crates/tower-api/src/models/series_point.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/session.rs b/crates/tower-api/src/models/session.rs index 704fbad8..dc03f5aa 100644 --- a/crates/tower-api/src/models/session.rs +++ b/crates/tower-api/src/models/session.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/sse_warning.rs b/crates/tower-api/src/models/sse_warning.rs new file mode 100644 index 00000000..b789d31c --- /dev/null +++ b/crates/tower-api/src/models/sse_warning.rs @@ -0,0 +1,32 @@ +/* + * Tower API + * + * REST API to interact with Tower Services. + * + * The version of the OpenAPI document: v0.5.23 + * Contact: hello@tower.dev + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SseWarning { + /// Contents of the warning. + #[serde(rename = "content")] + pub content: String, + /// Timestamp of the event. + #[serde(rename = "reported_at")] + pub reported_at: String, +} + +impl SseWarning { + pub fn new(content: String, reported_at: String) -> SseWarning { + SseWarning { + content, + reported_at, + } + } +} + diff --git a/crates/tower-api/src/models/statistics_settings.rs b/crates/tower-api/src/models/statistics_settings.rs index 3e40adbe..130697c4 100644 --- a/crates/tower-api/src/models/statistics_settings.rs +++ b/crates/tower-api/src/models/statistics_settings.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/stream_alerts_200_response_inner.rs b/crates/tower-api/src/models/stream_alerts_200_response_inner.rs new file mode 100644 index 00000000..0cbefa59 --- /dev/null +++ b/crates/tower-api/src/models/stream_alerts_200_response_inner.rs @@ -0,0 +1,26 @@ +/* + * Tower API + * + * REST API to interact with Tower Services. + * + * The version of the OpenAPI document: v0.5.23 + * Contact: hello@tower.dev + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum StreamAlerts200ResponseInner { + RunFailureAlert(models::RunFailureAlert), + SseWarning(models::SseWarning), +} + +impl Default for StreamAlerts200ResponseInner { + fn default() -> Self { + Self::RunFailureAlert(Default::default()) + } +} + diff --git a/crates/tower-api/src/models/stream_run_logs_200_response_inner.rs b/crates/tower-api/src/models/stream_run_logs_200_response_inner.rs index d7a351dd..dd91adab 100644 --- a/crates/tower-api/src/models/stream_run_logs_200_response_inner.rs +++ b/crates/tower-api/src/models/stream_run_logs_200_response_inner.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -14,13 +14,13 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum StreamRunLogs200ResponseInner { + SseWarning(models::SseWarning), LogLine(models::LogLine), - LogLineError(models::LogLineError), } impl Default for StreamRunLogs200ResponseInner { fn default() -> Self { - Self::LogLine(Default::default()) + Self::SseWarning(Default::default()) } } /// The channel (either Program or Setup) this log line belongs to. diff --git a/crates/tower-api/src/models/team.rs b/crates/tower-api/src/models/team.rs index deed961b..836265a6 100644 --- a/crates/tower-api/src/models/team.rs +++ b/crates/tower-api/src/models/team.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/team_invitation.rs b/crates/tower-api/src/models/team_invitation.rs index c9221a87..05332f1d 100644 --- a/crates/tower-api/src/models/team_invitation.rs +++ b/crates/tower-api/src/models/team_invitation.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/token.rs b/crates/tower-api/src/models/token.rs index b44c365b..46f84f68 100644 --- a/crates/tower-api/src/models/token.rs +++ b/crates/tower-api/src/models/token.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_account_slug_params.rs b/crates/tower-api/src/models/update_account_slug_params.rs index 5c3352fa..82ef1c5f 100644 --- a/crates/tower-api/src/models/update_account_slug_params.rs +++ b/crates/tower-api/src/models/update_account_slug_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_account_slug_response.rs b/crates/tower-api/src/models/update_account_slug_response.rs index ed8e2b5e..8f3cae5b 100644 --- a/crates/tower-api/src/models/update_account_slug_response.rs +++ b/crates/tower-api/src/models/update_account_slug_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_app_params.rs b/crates/tower-api/src/models/update_app_params.rs index d348c530..d2bf3fdc 100644 --- a/crates/tower-api/src/models/update_app_params.rs +++ b/crates/tower-api/src/models/update_app_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_app_response.rs b/crates/tower-api/src/models/update_app_response.rs index d4768dce..be7e074d 100644 --- a/crates/tower-api/src/models/update_app_response.rs +++ b/crates/tower-api/src/models/update_app_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_catalog_params.rs b/crates/tower-api/src/models/update_catalog_params.rs index 1fdba428..906b8106 100644 --- a/crates/tower-api/src/models/update_catalog_params.rs +++ b/crates/tower-api/src/models/update_catalog_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_catalog_response.rs b/crates/tower-api/src/models/update_catalog_response.rs index d5b5d724..b230591b 100644 --- a/crates/tower-api/src/models/update_catalog_response.rs +++ b/crates/tower-api/src/models/update_catalog_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_my_team_invitation_params.rs b/crates/tower-api/src/models/update_my_team_invitation_params.rs index 96b20287..cd5a634e 100644 --- a/crates/tower-api/src/models/update_my_team_invitation_params.rs +++ b/crates/tower-api/src/models/update_my_team_invitation_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_my_team_invitation_response.rs b/crates/tower-api/src/models/update_my_team_invitation_response.rs index 2dc99a76..9cd34924 100644 --- a/crates/tower-api/src/models/update_my_team_invitation_response.rs +++ b/crates/tower-api/src/models/update_my_team_invitation_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_password_reset_params.rs b/crates/tower-api/src/models/update_password_reset_params.rs new file mode 100644 index 00000000..52319283 --- /dev/null +++ b/crates/tower-api/src/models/update_password_reset_params.rs @@ -0,0 +1,32 @@ +/* + * Tower API + * + * REST API to interact with Tower Services. + * + * The version of the OpenAPI document: v0.5.23 + * Contact: hello@tower.dev + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct UpdatePasswordResetParams { + /// A URL to the JSON Schema for this object. + #[serde(rename = "$schema", skip_serializing_if = "Option::is_none")] + pub schema: Option, + /// The new password that you want to set for your account + #[serde(rename = "password")] + pub password: String, +} + +impl UpdatePasswordResetParams { + pub fn new(password: String) -> UpdatePasswordResetParams { + UpdatePasswordResetParams { + schema: None, + password, + } + } +} + diff --git a/crates/tower-api/src/models/update_password_reset_response.rs b/crates/tower-api/src/models/update_password_reset_response.rs new file mode 100644 index 00000000..1f689a59 --- /dev/null +++ b/crates/tower-api/src/models/update_password_reset_response.rs @@ -0,0 +1,32 @@ +/* + * Tower API + * + * REST API to interact with Tower Services. + * + * The version of the OpenAPI document: v0.5.23 + * Contact: hello@tower.dev + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct UpdatePasswordResetResponse { + /// A URL to the JSON Schema for this object. + #[serde(rename = "$schema", skip_serializing_if = "Option::is_none")] + pub schema: Option, + /// A boolean indicating the request was successfully processed. + #[serde(rename = "ok")] + pub ok: bool, +} + +impl UpdatePasswordResetResponse { + pub fn new(ok: bool) -> UpdatePasswordResetResponse { + UpdatePasswordResetResponse { + schema: None, + ok, + } + } +} + diff --git a/crates/tower-api/src/models/update_secret_params.rs b/crates/tower-api/src/models/update_secret_params.rs index 8c432cb7..04116bd6 100644 --- a/crates/tower-api/src/models/update_secret_params.rs +++ b/crates/tower-api/src/models/update_secret_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_secret_response.rs b/crates/tower-api/src/models/update_secret_response.rs index 2503c27b..b506ab44 100644 --- a/crates/tower-api/src/models/update_secret_response.rs +++ b/crates/tower-api/src/models/update_secret_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_team_params.rs b/crates/tower-api/src/models/update_team_params.rs index 64a8baed..135258cc 100644 --- a/crates/tower-api/src/models/update_team_params.rs +++ b/crates/tower-api/src/models/update_team_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_team_response.rs b/crates/tower-api/src/models/update_team_response.rs index 27099203..3dfe54d7 100644 --- a/crates/tower-api/src/models/update_team_response.rs +++ b/crates/tower-api/src/models/update_team_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_user_params.rs b/crates/tower-api/src/models/update_user_params.rs index a5300710..95523496 100644 --- a/crates/tower-api/src/models/update_user_params.rs +++ b/crates/tower-api/src/models/update_user_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_user_response.rs b/crates/tower-api/src/models/update_user_response.rs index e6eccfb4..4dd9a467 100644 --- a/crates/tower-api/src/models/update_user_response.rs +++ b/crates/tower-api/src/models/update_user_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/user.rs b/crates/tower-api/src/models/user.rs index ffc0d03c..cc91414b 100644 --- a/crates/tower-api/src/models/user.rs +++ b/crates/tower-api/src/models/user.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.5.12 + * The version of the OpenAPI document: v0.5.23 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ From 94c8c69cf3544c8a22e260f1cc5edaddb1488881 Mon Sep 17 00:00:00 2001 From: Brad Heller Date: Sun, 1 Jun 2025 23:31:59 +0200 Subject: [PATCH 3/6] chore: Make App::status a non-mutable operation --- crates/tower-runtime/src/lib.rs | 2 +- crates/tower-runtime/src/local.rs | 73 ++++++++++++------------------- 2 files changed, 28 insertions(+), 47 deletions(-) diff --git a/crates/tower-runtime/src/lib.rs b/crates/tower-runtime/src/lib.rs index e3b38686..84a010cc 100644 --- a/crates/tower-runtime/src/lib.rs +++ b/crates/tower-runtime/src/lib.rs @@ -64,7 +64,7 @@ pub trait App { fn terminate(&mut self) -> impl Future> + Send; // status checks the status of an app - fn status(&mut self) -> impl Future> + Send; + fn status(&self) -> impl Future> + Send; // output returns a reader that contains a combination of the stdout and stderr messages from // the child process diff --git a/crates/tower-runtime/src/local.rs b/crates/tower-runtime/src/local.rs index 3949924f..c0228cac 100644 --- a/crates/tower-runtime/src/local.rs +++ b/crates/tower-runtime/src/local.rs @@ -14,21 +14,17 @@ use crate::{ }; use tokio::{ + fs, + io::{AsyncRead, BufReader, AsyncBufReadExt}, + time::{timeout, Duration}, + sync::Mutex, + process::{Child, Command}, sync::oneshot, sync::oneshot::error::TryRecvError, sync::mpsc::{ UnboundedSender, unbounded_channel, }, - process::Command, -}; - -use tokio::{ - fs, - io::{AsyncRead, BufReader, AsyncBufReadExt}, - time::{timeout, Duration}, - sync::Mutex, - process::Child, }; use tower_package::{Manifest, Package}; @@ -50,28 +46,13 @@ pub struct LocalApp { package: Option, child: Option>>, - status: Option, - waiter: Option>, + status: Mutex>, + waiter: Mutex>, output_sender: OutputSender, output_receiver: OutputReceiver, } -impl Default for LocalApp { - fn default() -> Self { - let (sender, receiver) = unbounded_channel::(); - - Self { - package: None, - child: None, - status: None, - waiter: None, - output_sender: Arc::new(Mutex::new(sender)), - output_receiver: Arc::new(Mutex::new(receiver)), - } - } -} - // Helper function to check if a file is executable async fn is_executable(path: &PathBuf) -> bool { let metadata = match fs::metadata(path).await { @@ -262,7 +243,7 @@ impl App for LocalApp { output_receiver, package: Some(package), child: Some(child), - waiter: Some(rx), + waiter: Mutex::new(rx), status: None, }) } else { @@ -271,29 +252,29 @@ impl App for LocalApp { } } - async fn status(&mut self) -> Result { - if let Some(status) = self.status { + async fn status(&self) -> Result { + let mut status = self.status.lock().await; + + if let Some(status) = *status { Ok(status) } else { - if let Some(waiter) = &mut self.waiter { - let res = waiter.try_recv(); - match res { - Err(TryRecvError::Empty) => Ok(Status::Running), - Err(TryRecvError::Closed) => Err(Error::WaiterClosed), - Ok(t) => { - // We save this for the next time this gets called. - if t == 0 { - self.status = Some(Status::Exited); - Ok(Status::Exited) - } else { - let status = Status::Crashed { code: t }; - self.status = Some(status); - Ok(status) - } + let mut waiter = self.waiter.lock().await; + let res = waiter.try_recv(); + + match res { + Err(TryRecvError::Empty) => Ok(Status::Running), + Err(TryRecvError::Closed) => Err(Error::WaiterClosed), + Ok(t) => { + // We save this for the next time this gets called. + if t == 0 { + *status = Some(Status::Exited); + Ok(Status::Exited) + } else { + let next_status = Status::Crashed { code: t }; + *status = Some(next_status); + Ok(next_status) } } - } else { - Ok(Status::None) } } } From 3c51fe7afcf53bf445a2e089978aaaf8d409c6ad Mon Sep 17 00:00:00 2001 From: Brad Heller Date: Sun, 1 Jun 2025 23:35:36 +0200 Subject: [PATCH 4/6] chore: Fix a few build issues --- crates/tower-cmd/src/run.rs | 2 +- crates/tower-runtime/src/lib.rs | 9 ++++++++- crates/tower-runtime/src/local.rs | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/crates/tower-cmd/src/run.rs b/crates/tower-cmd/src/run.rs index e46b7c12..8a865dc5 100644 --- a/crates/tower-cmd/src/run.rs +++ b/crates/tower-cmd/src/run.rs @@ -346,7 +346,7 @@ async fn monitor_output(output: OutputReceiver) { /// monitor_status is a helper function that will monitor the status of a given app and waits for /// it to progress to a terminal state. -async fn monitor_status(mut app: LocalApp) { +async fn monitor_status(app: LocalApp) { loop { if let Ok(status) = app.status().await { match status { diff --git a/crates/tower-runtime/src/lib.rs b/crates/tower-runtime/src/lib.rs index 84a010cc..ea564302 100644 --- a/crates/tower-runtime/src/lib.rs +++ b/crates/tower-runtime/src/lib.rs @@ -71,11 +71,18 @@ pub trait App { fn output(&self) -> impl Future> + Send; } -#[derive(Default)] pub struct AppLauncher { pub app: Option, } +impl std::default::Default for AppLauncher { + fn default() -> Self { + Self { + app: None, + } + } +} + impl AppLauncher { pub async fn launch( &mut self, diff --git a/crates/tower-runtime/src/local.rs b/crates/tower-runtime/src/local.rs index c0228cac..77b9d992 100644 --- a/crates/tower-runtime/src/local.rs +++ b/crates/tower-runtime/src/local.rs @@ -244,7 +244,7 @@ impl App for LocalApp { package: Some(package), child: Some(child), waiter: Mutex::new(rx), - status: None, + status: Mutex::new(None), }) } else { log::error!("failed to spawn process: {}", res.err().unwrap()); From 1fec69d4b42602fc6ac55d2c43a00eb55ccc121e Mon Sep 17 00:00:00 2001 From: Brad Heller Date: Wed, 4 Jun 2025 13:22:06 -0700 Subject: [PATCH 5/6] chore: Shuffle the deck chairs a bit --- crates/tower-runtime/src/local.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/tower-runtime/src/local.rs b/crates/tower-runtime/src/local.rs index 77b9d992..b88eec4e 100644 --- a/crates/tower-runtime/src/local.rs +++ b/crates/tower-runtime/src/local.rs @@ -188,12 +188,12 @@ impl App for LocalApp { let res = Command::new(pip_path) .current_dir(&working_dir) - .stdin(Stdio::null()) - .stdout(Stdio::piped()) - .stderr(Stdio::piped()) .arg("install") .arg("-r") .arg(package_path.join("requirements.txt")) + .stdin(Stdio::null()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) .kill_on_drop(true) .spawn(); From ceecab9d5733118b708a6f468d4e6fc234007549 Mon Sep 17 00:00:00 2001 From: Brad Heller Date: Wed, 4 Jun 2025 13:35:48 -0700 Subject: [PATCH 6/6] chore: Pass in output channel to app launches --- crates/tower-cmd/src/run.rs | 12 +++---- crates/tower-runtime/src/lib.rs | 16 ++++++--- crates/tower-runtime/src/local.rs | 60 +++++++++++-------------------- 3 files changed, 39 insertions(+), 49 deletions(-) diff --git a/crates/tower-cmd/src/run.rs b/crates/tower-cmd/src/run.rs index 8a865dc5..4b5385cb 100644 --- a/crates/tower-cmd/src/run.rs +++ b/crates/tower-cmd/src/run.rs @@ -123,22 +123,22 @@ async fn do_run_local(config: Config, path: PathBuf, mut params: HashMap = AppLauncher::default(); if let Err(err) = launcher - .launch(package, env, secrets, params, catalogs) + .launch(sender, package, env, secrets, params, catalogs) .await { output::runtime_error(err); return; } - output::success(&format!("App `{}` has been launched", towerfile.app.name)); - // Monitor app output and status concurrently let app = launcher.app.unwrap(); - let output = app.output().await.unwrap(); - - let output_task = tokio::spawn(monitor_output(output)); let status_task = tokio::spawn(monitor_status(app)); let (res1, res2) = tokio::join!(output_task, status_task); diff --git a/crates/tower-runtime/src/lib.rs b/crates/tower-runtime/src/lib.rs index ea564302..39f26cf0 100644 --- a/crates/tower-runtime/src/lib.rs +++ b/crates/tower-runtime/src/lib.rs @@ -6,6 +6,7 @@ use tokio::sync::Mutex; use tokio::sync::mpsc::{ UnboundedReceiver, UnboundedSender, + unbounded_channel, }; use chrono::{DateTime, Utc}; @@ -65,10 +66,6 @@ pub trait App { // status checks the status of an app fn status(&self) -> impl Future> + Send; - - // output returns a reader that contains a combination of the stdout and stderr messages from - // the child process - fn output(&self) -> impl Future> + Send; } pub struct AppLauncher { @@ -83,9 +80,18 @@ impl std::default::Default for AppLauncher { } } +pub fn create_output_stream() -> (OutputSender, OutputReceiver) { + let (sender, receiver) = unbounded_channel::(); + + let output_sender = Arc::new(Mutex::new(sender)); + let output_receiver = Arc::new(Mutex::new(receiver)); + (output_sender, output_receiver) +} + impl AppLauncher { pub async fn launch( &mut self, + output_sender: OutputSender, package: Package, environment: String, secrets: HashMap, @@ -95,6 +101,7 @@ impl AppLauncher { let cwd = package.unpacked_path.clone().unwrap().to_path_buf(); let opts = StartOptions { + output_sender: Some(output_sender), cwd: Some(cwd), environment, secrets, @@ -141,6 +148,7 @@ pub struct StartOptions { pub secrets: HashMap, pub parameters: HashMap, pub env_vars: HashMap, + pub output_sender: Option, } pub struct ExecuteOptions { diff --git a/crates/tower-runtime/src/local.rs b/crates/tower-runtime/src/local.rs index b88eec4e..054d668a 100644 --- a/crates/tower-runtime/src/local.rs +++ b/crates/tower-runtime/src/local.rs @@ -10,6 +10,7 @@ use std::os::unix::fs::PermissionsExt; use crate::{ Status, StartOptions, + OutputSender, errors::Error, }; @@ -21,10 +22,6 @@ use tokio::{ process::{Child, Command}, sync::oneshot, sync::oneshot::error::TryRecvError, - sync::mpsc::{ - UnboundedSender, - unbounded_channel, - }, }; use tower_package::{Manifest, Package}; @@ -34,8 +31,6 @@ use crate::{ Channel, App, Output, - OutputSender, - OutputReceiver, }; pub struct LocalApp { @@ -48,9 +43,6 @@ pub struct LocalApp { child: Option>>, status: Mutex>, waiter: Mutex>, - - output_sender: OutputSender, - output_receiver: OutputReceiver, } // Helper function to check if a file is executable @@ -132,11 +124,6 @@ async fn find_bash() -> Result { impl App for LocalApp { async fn start(opts: StartOptions) -> Result { - let (sender, receiver) = unbounded_channel::(); - - let output_sender = Arc::new(Mutex::new(sender)); - let output_receiver = Arc::new(Mutex::new(receiver)); - let package = opts.package; let environment = opts.environment; let package_path = package.unpacked_path @@ -198,12 +185,15 @@ impl App for LocalApp { .spawn(); if let Ok(mut child) = res { - // Let's also send our logs to this output channel. - let stdout = child.stdout.take().expect("no stdout"); - tokio::spawn(drain_output(FD::Stdout, Channel::Setup, output_sender.clone(), BufReader::new(stdout))); + if let Some(ref sender) = opts.output_sender { + // Let's also send our logs to this output channel. + let stdout = child.stdout.take().expect("no stdout"); + tokio::spawn(drain_output(FD::Stdout, Channel::Setup, sender.clone(), BufReader::new(stdout))); - let stderr = child.stderr.take().expect("no stderr"); - tokio::spawn(drain_output(FD::Stderr, Channel::Setup, output_sender.clone(), BufReader::new(stderr))); + let stderr = child.stderr.take().expect("no stderr"); + tokio::spawn(drain_output(FD::Stderr, Channel::Setup, sender.clone(), BufReader::new(stderr))); + + } log::debug!("waiting for dependency installation to complete"); @@ -232,15 +222,23 @@ impl App for LocalApp { Self::execute_python_program(&environment, working_dir, is_virtualenv, python_path, package_path, &manifest, secrets, params, other_env_vars).await }; - if let Ok(child) = res { + if let Ok(mut child) = res { + if let Some(ref sender) = opts.output_sender { + // Let's also send our logs to this output channel. + let stdout = child.stdout.take().expect("no stdout"); + tokio::spawn(drain_output(FD::Stdout, Channel::Setup, sender.clone(), BufReader::new(stdout))); + + let stderr = child.stderr.take().expect("no stderr"); + tokio::spawn(drain_output(FD::Stderr, Channel::Setup, sender.clone(), BufReader::new(stderr))); + + } + let child = Arc::new(Mutex::new(child)); let (sx, rx) = oneshot::channel::(); tokio::spawn(wait_for_process(sx, Arc::clone(&child))); Ok(Self { - output_sender, - output_receiver, package: Some(package), child: Some(child), waiter: Mutex::new(rx), @@ -294,22 +292,6 @@ impl App for LocalApp { Ok(()) } } - - async fn output(&self) -> Result { - if let Some(proc) = &self.child { - let mut child = proc.lock().await; - - let stdout = child.stdout.take().expect("no stdout"); - tokio::spawn(drain_output(FD::Stdout, Channel::Program, self.output_sender.clone(), BufReader::new(stdout))); - - let stderr = child.stderr.take().expect("no stderr"); - tokio::spawn(drain_output(FD::Stderr, Channel::Program, self.output_sender.clone(), BufReader::new(stderr))); - - Ok(self.output_receiver.clone()) - } else { - Err(Error::NoRunningApp) - } - } } impl LocalApp { @@ -459,7 +441,7 @@ async fn wait_for_process(sx: oneshot::Sender, proc: Arc>) { let _ = sx.send(code); } -async fn drain_output(fd: FD, channel: Channel, output: Arc>>, input: BufReader) { +async fn drain_output(fd: FD, channel: Channel, output: OutputSender, input: BufReader) { let mut lines = input.lines(); while let Some(line) = lines.next_line().await.expect("line iteration fialed") {