From 191bb3d645d326d642370536ec955348a79da15f Mon Sep 17 00:00:00 2001 From: Brad Heller Date: Fri, 18 Jul 2025 15:11:42 +0200 Subject: [PATCH 1/3] chore: Upgrade Tower API clients --- crates/tower-api/README.md | 26 +-- crates/tower-api/src/apis/configuration.rs | 2 +- crates/tower-api/src/apis/default_api.rs | 77 ++++---- .../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 +- .../models/acknowledge_all_alerts_response.rs | 2 +- crates/tower-api/src/models/alert.rs | 2 +- crates/tower-api/src/models/api_key.rs | 2 +- crates/tower-api/src/models/app.rs | 12 +- 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 | 11 +- .../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 | 4 +- .../src/models/create_app_response.rs | 2 +- .../src/models/create_authenticator_params.rs | 2 +- .../models/create_authenticator_response.rs | 2 +- .../src/models/create_catalog_params.rs | 7 +- .../src/models/create_catalog_response.rs | 2 +- .../create_device_login_ticket_response.rs | 2 +- .../models/create_password_reset_params.rs | 2 +- .../models/create_password_reset_response.rs | 2 +- .../src/models/create_schedule_params.rs | 12 +- .../src/models/create_schedule_response.rs | 2 +- .../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_authenticator_params.rs | 2 +- .../models/delete_authenticator_response.rs | 2 +- .../src/models/delete_catalog_response.rs | 2 +- .../src/models/delete_schedule_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 | 11 +- .../src/models/exported_catalog_property.rs | 2 +- .../tower-api/src/models/exported_secret.rs | 2 +- .../src/models/featurebase_identity.rs | 2 +- .../generate_app_statistics_response.rs | 2 +- .../models/generate_authenticator_response.rs | 2 +- .../generate_run_statistics_response.rs | 2 +- .../generate_runner_credentials_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 | 2 +- .../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 +- .../models/list_authenticators_response.rs | 2 +- .../src/models/list_catalogs_response.rs | 2 +- .../list_my_team_invitations_response.rs | 2 +- .../src/models/list_runs_response.rs | 2 +- .../src/models/list_schedules_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/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 | 11 +- 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 | 2 +- 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 +- .../src/models/run_timeseries_point.rs | 2 +- .../src/models/runner_credentials.rs | 2 +- crates/tower-api/src/models/schedule.rs | 12 +- .../src/models/search_runs_response.rs | 2 +- crates/tower-api/src/models/secret.rs | 2 +- crates/tower-api/src/models/session.rs | 2 +- crates/tower-api/src/models/sse_warning.rs | 2 +- .../src/models/statistics_settings.rs | 2 +- .../stream_alerts_200_response_inner.rs | 2 +- .../stream_run_logs_200_response_inner.rs | 2 +- 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/unverified_authenticator.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 | 8 +- .../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 | 2 +- .../models/update_password_reset_response.rs | 2 +- .../src/models/update_schedule_params.rs | 12 +- .../src/models/update_schedule_response.rs | 2 +- .../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 +- .../src/models/verified_authenticator.rs | 2 +- .../api/default/cancel_run.py | 30 +-- .../api/default/create_schedule.py | 168 ++++++++++++++++ .../api/default/delete_app.py | 30 +-- .../api/default/delete_catalog.py | 57 ++++-- .../api/default/delete_schedule.py | 160 +++++++++++++++ .../api/default/deploy_app.py | 30 +-- .../api/default/describe_app.py | 30 +-- .../api/default/describe_run.py | 30 +-- .../api/default/describe_run_logs.py | 30 +-- .../default/generate_runner_credentials.py | 140 ++++++++++++++ .../api/default/list_app_environments.py | 30 +-- .../tower_api_client/api/default/list_runs.py | 30 +-- .../api/default/list_schedules.py | 181 +++++++++++++++++ .../tower_api_client/api/default/run_app.py | 30 +-- .../api/default/stream_run_logs.py | 30 +-- .../api/default/update_catalog.py | 30 +-- .../api/default/update_schedule.py | 183 ++++++++++++++++++ src/tower/tower_api_client/models/__init__.py | 18 ++ src/tower/tower_api_client/models/app.py | 17 +- src/tower/tower_api_client/models/catalog.py | 21 +- .../models/create_app_params.py | 2 +- .../models/create_catalog_params.py | 8 - .../models/create_schedule_params.py | 114 +++++++++++ .../models/create_schedule_response.py | 57 ++++++ .../models/delete_schedule_response.py | 51 +++++ .../models/exported_catalog.py | 21 +- .../generate_runner_credentials_response.py | 57 ++++++ .../models/list_schedules_response.py | 75 +++++++ src/tower/tower_api_client/models/run.py | 18 +- .../models/runner_credentials.py | 71 +++++++ src/tower/tower_api_client/models/schedule.py | 99 ++++++++++ .../models/update_catalog_params.py | 8 - .../models/update_schedule_params.py | 124 ++++++++++++ .../models/update_schedule_response.py | 57 ++++++ 180 files changed, 2041 insertions(+), 467 deletions(-) create mode 100644 src/tower/tower_api_client/api/default/create_schedule.py create mode 100644 src/tower/tower_api_client/api/default/delete_schedule.py create mode 100644 src/tower/tower_api_client/api/default/generate_runner_credentials.py create mode 100644 src/tower/tower_api_client/api/default/list_schedules.py create mode 100644 src/tower/tower_api_client/api/default/update_schedule.py create mode 100644 src/tower/tower_api_client/models/create_schedule_params.py create mode 100644 src/tower/tower_api_client/models/create_schedule_response.py create mode 100644 src/tower/tower_api_client/models/delete_schedule_response.py create mode 100644 src/tower/tower_api_client/models/generate_runner_credentials_response.py create mode 100644 src/tower/tower_api_client/models/list_schedules_response.py create mode 100644 src/tower/tower_api_client/models/runner_credentials.py create mode 100644 src/tower/tower_api_client/models/schedule.py create mode 100644 src/tower/tower_api_client/models/update_schedule_params.py create mode 100644 src/tower/tower_api_client/models/update_schedule_response.py diff --git a/crates/tower-api/README.md b/crates/tower-api/README.md index 684db42e..e2b3364c 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.6.19 +- API version: v0.6.22 - Package version: 1.0.0 - Generator version: 7.13.0 - Build package: `org.openapitools.codegen.languages.RustClientCodegen` @@ -30,7 +30,7 @@ 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_seq}/acknowledge | Acknowledge alert *DefaultApi* | [**acknowledge_all_alerts**](docs/DefaultApi.md#acknowledge_all_alerts) | **POST** /alerts/acknowledge-all | Acknowledge all alerts -*DefaultApi* | [**cancel_run**](docs/DefaultApi.md#cancel_run) | **POST** /apps/{slug}/runs/{seq} | Cancel run +*DefaultApi* | [**cancel_run**](docs/DefaultApi.md#cancel_run) | **POST** /apps/{name}/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 *DefaultApi* | [**create_api_key**](docs/DefaultApi.md#create_api_key) | **POST** /api-keys | Create API Key @@ -45,19 +45,19 @@ Class | Method | HTTP request | Description *DefaultApi* | [**create_team**](docs/DefaultApi.md#create_team) | **POST** /teams | Create team *DefaultApi* | [**delete_alert**](docs/DefaultApi.md#delete_alert) | **DELETE** /alerts/{alert_id} | Delete alert *DefaultApi* | [**delete_api_key**](docs/DefaultApi.md#delete_api_key) | **DELETE** /api-keys | Delete API key -*DefaultApi* | [**delete_app**](docs/DefaultApi.md#delete_app) | **DELETE** /apps/{slug} | Delete app +*DefaultApi* | [**delete_app**](docs/DefaultApi.md#delete_app) | **DELETE** /apps/{name} | Delete app *DefaultApi* | [**delete_authenticator**](docs/DefaultApi.md#delete_authenticator) | **DELETE** /accounts/authenticator | Delete authenticator -*DefaultApi* | [**delete_catalog**](docs/DefaultApi.md#delete_catalog) | **DELETE** /catalogs/{slug} | Delete catalog +*DefaultApi* | [**delete_catalog**](docs/DefaultApi.md#delete_catalog) | **DELETE** /catalogs/{name} | Delete catalog *DefaultApi* | [**delete_schedule**](docs/DefaultApi.md#delete_schedule) | **DELETE** /schedules/{id} | Delete schedule *DefaultApi* | [**delete_secret**](docs/DefaultApi.md#delete_secret) | **DELETE** /secrets/{name} | Delete secret *DefaultApi* | [**delete_team**](docs/DefaultApi.md#delete_team) | **DELETE** /teams | Delete team *DefaultApi* | [**delete_team_invitation**](docs/DefaultApi.md#delete_team_invitation) | **DELETE** /teams/{slug}/invites | Delete team invitation -*DefaultApi* | [**deploy_app**](docs/DefaultApi.md#deploy_app) | **POST** /apps/{slug}/deploy | Deploy app -*DefaultApi* | [**describe_app**](docs/DefaultApi.md#describe_app) | **GET** /apps/{slug} | Describe app +*DefaultApi* | [**deploy_app**](docs/DefaultApi.md#deploy_app) | **POST** /apps/{name}/deploy | Deploy app +*DefaultApi* | [**describe_app**](docs/DefaultApi.md#describe_app) | **GET** /apps/{name} | Describe app *DefaultApi* | [**describe_app_version**](docs/DefaultApi.md#describe_app_version) | **GET** /apps/{name}/versions/{num} | Describe app version *DefaultApi* | [**describe_device_login_session**](docs/DefaultApi.md#describe_device_login_session) | **GET** /login/device/{device_code} | Describe device login session -*DefaultApi* | [**describe_run**](docs/DefaultApi.md#describe_run) | **GET** /apps/{slug}/runs/{seq} | Describe run -*DefaultApi* | [**describe_run_logs**](docs/DefaultApi.md#describe_run_logs) | **GET** /apps/{slug}/runs/{seq}/logs | Describe run logs +*DefaultApi* | [**describe_run**](docs/DefaultApi.md#describe_run) | **GET** /apps/{name}/runs/{seq} | Describe run +*DefaultApi* | [**describe_run_logs**](docs/DefaultApi.md#describe_run_logs) | **GET** /apps/{name}/runs/{seq}/logs | Describe run logs *DefaultApi* | [**describe_secrets_key**](docs/DefaultApi.md#describe_secrets_key) | **GET** /secrets/key | Describe encryption key *DefaultApi* | [**describe_session**](docs/DefaultApi.md#describe_session) | **GET** /session | Describe session *DefaultApi* | [**export_catalogs**](docs/DefaultApi.md#export_catalogs) | **POST** /catalogs/export | Export catalogs @@ -70,13 +70,13 @@ Class | Method | HTTP request | Description *DefaultApi* | [**leave_team**](docs/DefaultApi.md#leave_team) | **POST** /teams/{slug}/leave | Leave team *DefaultApi* | [**list_alerts**](docs/DefaultApi.md#list_alerts) | **GET** /alerts | List alerts *DefaultApi* | [**list_api_keys**](docs/DefaultApi.md#list_api_keys) | **GET** /api-keys | List API keys -*DefaultApi* | [**list_app_environments**](docs/DefaultApi.md#list_app_environments) | **GET** /apps/{slug}/environments | List app environments +*DefaultApi* | [**list_app_environments**](docs/DefaultApi.md#list_app_environments) | **GET** /apps/{name}/environments | List app environments *DefaultApi* | [**list_app_versions**](docs/DefaultApi.md#list_app_versions) | **GET** /apps/{name}/versions | List app versions *DefaultApi* | [**list_apps**](docs/DefaultApi.md#list_apps) | **GET** /apps | List apps *DefaultApi* | [**list_authenticators**](docs/DefaultApi.md#list_authenticators) | **GET** /accounts/authenticator | List authenticators *DefaultApi* | [**list_catalogs**](docs/DefaultApi.md#list_catalogs) | **GET** /catalogs | List catalogs *DefaultApi* | [**list_my_team_invitations**](docs/DefaultApi.md#list_my_team_invitations) | **GET** /team-invites | List my team invitations -*DefaultApi* | [**list_runs**](docs/DefaultApi.md#list_runs) | **GET** /apps/{slug}/runs | List runs +*DefaultApi* | [**list_runs**](docs/DefaultApi.md#list_runs) | **GET** /apps/{name}/runs | List runs *DefaultApi* | [**list_schedules**](docs/DefaultApi.md#list_schedules) | **GET** /schedules | List schedules *DefaultApi* | [**list_secret_environments**](docs/DefaultApi.md#list_secret_environments) | **GET** /secrets/environments | List secret environments *DefaultApi* | [**list_secrets**](docs/DefaultApi.md#list_secrets) | **GET** /secrets | List secrets @@ -86,13 +86,13 @@ Class | Method | HTTP request | Description *DefaultApi* | [**refresh_session**](docs/DefaultApi.md#refresh_session) | **POST** /session/refresh | Refresh session *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* | [**run_app**](docs/DefaultApi.md#run_app) | **POST** /apps/{name}/runs | Run app *DefaultApi* | [**search_runs**](docs/DefaultApi.md#search_runs) | **GET** /runs | Search runs *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* | [**stream_run_logs**](docs/DefaultApi.md#stream_run_logs) | **GET** /apps/{name}/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_catalog**](docs/DefaultApi.md#update_catalog) | **PUT** /catalogs/{name} | 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_schedule**](docs/DefaultApi.md#update_schedule) | **PUT** /schedules/{id} | Update schedule diff --git a/crates/tower-api/src/apis/configuration.rs b/crates/tower-api/src/apis/configuration.rs index a6edd873..d7c1bc0e 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 66794b72..a34a36b7 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.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -32,8 +32,8 @@ pub struct AcknowledgeAlertParams { /// struct for passing parameters to the method [`cancel_run`] #[derive(Clone, Debug)] pub struct CancelRunParams { - /// The slug of the app to fetch runs for. - pub slug: String, + /// The name of the app to fetch runs for. + pub name: String, /// The number of the run to fetch. pub seq: i64 } @@ -120,8 +120,8 @@ pub struct DeleteApiKeyParams { /// struct for passing parameters to the method [`delete_app`] #[derive(Clone, Debug)] pub struct DeleteAppParams { - /// The slug of the app to delete. - pub slug: String + /// The name of the app to delete. + pub name: String } /// struct for passing parameters to the method [`delete_authenticator`] @@ -133,8 +133,10 @@ pub struct DeleteAuthenticatorParams { /// struct for passing parameters to the method [`delete_catalog`] #[derive(Clone, Debug)] pub struct DeleteCatalogParams { - /// The slug of the catalog to update. - pub slug: String + /// The name of the catalog to update. + pub name: String, + /// The environment of the catalog to delete. + pub environment: Option } /// struct for passing parameters to the method [`delete_schedule`] @@ -170,8 +172,8 @@ pub struct DeleteTeamInvitationParams { /// struct for passing parameters to the method [`deploy_app`] #[derive(Clone, Debug)] pub struct DeployAppParams { - /// The slug of the app to deploy. - pub slug: String, + /// The name of the app to deploy. + pub name: String, /// The encoding of the content. pub content_encoding: Option } @@ -179,8 +181,8 @@ pub struct DeployAppParams { /// struct for passing parameters to the method [`describe_app`] #[derive(Clone, Debug)] pub struct DescribeAppParams { - /// The slug of the app to fetch. - pub slug: String, + /// The name of the app to fetch. + pub name: String, /// The number of recent runs to fetch for the app. pub runs: Option, /// Filter runs scheduled after this datetime (inclusive). Provide timestamps in ISO-8601 format. @@ -210,8 +212,8 @@ pub struct DescribeDeviceLoginSessionParams { /// struct for passing parameters to the method [`describe_run`] #[derive(Clone, Debug)] pub struct DescribeRunParams { - /// The slug of the app to fetch runs for. - pub slug: String, + /// The name of the app to fetch runs for. + pub name: String, /// The number of the run to fetch. pub seq: i64 } @@ -219,8 +221,8 @@ pub struct DescribeRunParams { /// struct for passing parameters to the method [`describe_run_logs`] #[derive(Clone, Debug)] pub struct DescribeRunLogsParams { - /// The slug of the app to get logs for. - pub slug: String, + /// The name of the app to get logs for. + pub name: String, /// The sequence number of the run to get logs for. pub seq: i64 } @@ -293,7 +295,7 @@ pub struct ListAlertsParams { #[derive(Clone, Debug)] pub struct ListAppEnvironmentsParams { /// The name of the app to get the version for. - pub slug: String + pub name: String } /// struct for passing parameters to the method [`list_app_versions`] @@ -336,8 +338,8 @@ pub struct ListCatalogsParams { /// struct for passing parameters to the method [`list_runs`] #[derive(Clone, Debug)] pub struct ListRunsParams { - /// The slug of the app to fetch runs for. - pub slug: String, + /// The name of the app to fetch runs for. + pub name: String, /// The page number to fetch. pub page: Option, /// The number of records to fetch on each page. @@ -411,8 +413,8 @@ pub struct ResendTeamInvitationParams { /// struct for passing parameters to the method [`run_app`] #[derive(Clone, Debug)] pub struct RunAppParams { - /// The slug of the app to fetch runs for. - pub slug: String, + /// The name of the app to fetch runs for. + pub name: String, pub run_app_params: models::RunAppParams } @@ -434,8 +436,8 @@ pub struct SearchRunsParams { /// struct for passing parameters to the method [`stream_run_logs`] #[derive(Clone, Debug)] pub struct StreamRunLogsParams { - /// The slug of the app to get logs for. - pub slug: String, + /// The name of the app to get logs for. + pub name: String, /// The sequence number of the run to get logs for. pub seq: i64 } @@ -459,8 +461,8 @@ pub struct UpdateAppParams { /// struct for passing parameters to the method [`update_catalog`] #[derive(Clone, Debug)] pub struct UpdateCatalogParams { - /// The slug of the catalog to update. - pub slug: String, + /// The name of the catalog to update. + pub name: String, pub update_catalog_params: models::UpdateCatalogParams } @@ -1774,7 +1776,7 @@ pub async fn acknowledge_all_alerts(configuration: &configuration::Configuration /// Cancel a run pub async fn cancel_run(configuration: &configuration::Configuration, params: CancelRunParams) -> Result, Error> { - let uri_str = format!("{}/apps/{slug}/runs/{seq}", configuration.base_path, slug=crate::apis::urlencode(params.slug), seq=params.seq); + let uri_str = format!("{}/apps/{name}/runs/{seq}", configuration.base_path, name=crate::apis::urlencode(params.name), seq=params.seq); let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -2297,7 +2299,7 @@ pub async fn delete_api_key(configuration: &configuration::Configuration, params /// Delete one of your apps, the associated code, and all the runs as well. pub async fn delete_app(configuration: &configuration::Configuration, params: DeleteAppParams) -> Result, Error> { - let uri_str = format!("{}/apps/{slug}", configuration.base_path, slug=crate::apis::urlencode(params.slug)); + let uri_str = format!("{}/apps/{name}", configuration.base_path, name=crate::apis::urlencode(params.name)); let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -2368,9 +2370,12 @@ pub async fn delete_authenticator(configuration: &configuration::Configuration, /// Delete a new catalog object in the currently authenticated account. pub async fn delete_catalog(configuration: &configuration::Configuration, params: DeleteCatalogParams) -> Result, Error> { - let uri_str = format!("{}/catalogs/{slug}", configuration.base_path, slug=crate::apis::urlencode(params.slug)); + let uri_str = format!("{}/catalogs/{name}", configuration.base_path, name=crate::apis::urlencode(params.name)); let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + if let Some(ref param_value) = params.environment { + req_builder = req_builder.query(&[("environment", ¶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()); } @@ -2548,7 +2553,7 @@ pub async fn delete_team_invitation(configuration: &configuration::Configuration /// Deploy a new version of an app. Reads the request body, which is a TAR file (or a GZipped TAR file) and creates a new deployment for an app based on that file. pub async fn deploy_app(configuration: &configuration::Configuration, params: DeployAppParams) -> Result, Error> { - let uri_str = format!("{}/apps/{slug}/deploy", configuration.base_path, slug=crate::apis::urlencode(params.slug)); + let uri_str = format!("{}/apps/{name}/deploy", configuration.base_path, name=crate::apis::urlencode(params.name)); let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -2586,7 +2591,7 @@ pub async fn deploy_app(configuration: &configuration::Configuration, params: De /// Get all the runs for the current account. pub async fn describe_app(configuration: &configuration::Configuration, params: DescribeAppParams) -> Result, Error> { - let uri_str = format!("{}/apps/{slug}", configuration.base_path, slug=crate::apis::urlencode(params.slug)); + let uri_str = format!("{}/apps/{name}", configuration.base_path, name=crate::apis::urlencode(params.name)); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = params.runs { @@ -2700,7 +2705,7 @@ pub async fn describe_device_login_session(configuration: &configuration::Config /// Describe a run of an app. pub async fn describe_run(configuration: &configuration::Configuration, params: DescribeRunParams) -> Result, Error> { - let uri_str = format!("{}/apps/{slug}/runs/{seq}", configuration.base_path, slug=crate::apis::urlencode(params.slug), seq=params.seq); + let uri_str = format!("{}/apps/{name}/runs/{seq}", configuration.base_path, name=crate::apis::urlencode(params.name), seq=params.seq); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -2743,7 +2748,7 @@ pub async fn describe_run(configuration: &configuration::Configuration, params: /// Retrieves the logs associated with a particular run of an app. pub async fn describe_run_logs(configuration: &configuration::Configuration, params: DescribeRunLogsParams) -> Result, Error> { - let uri_str = format!("{}/apps/{slug}/runs/{seq}/logs", configuration.base_path, slug=crate::apis::urlencode(params.slug), seq=params.seq); + let uri_str = format!("{}/apps/{name}/runs/{seq}/logs", configuration.base_path, name=crate::apis::urlencode(params.name), seq=params.seq); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -3241,7 +3246,7 @@ pub async fn list_api_keys(configuration: &configuration::Configuration) -> Resu /// Generates a list of all the known environments for a given app in the current account. pub async fn list_app_environments(configuration: &configuration::Configuration, params: ListAppEnvironmentsParams) -> Result, Error> { - let uri_str = format!("{}/apps/{slug}/environments", configuration.base_path, slug=crate::apis::urlencode(params.slug)); + let uri_str = format!("{}/apps/{name}/environments", configuration.base_path, name=crate::apis::urlencode(params.name)); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -3489,7 +3494,7 @@ pub async fn list_my_team_invitations(configuration: &configuration::Configurati /// Generates a list of all the runs for a given app. The list is paginated based on the query string parameters passed in. pub async fn list_runs(configuration: &configuration::Configuration, params: ListRunsParams) -> Result, Error> { - let uri_str = format!("{}/apps/{slug}/runs", configuration.base_path, slug=crate::apis::urlencode(params.slug)); + let uri_str = format!("{}/apps/{name}/runs", configuration.base_path, name=crate::apis::urlencode(params.name)); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = params.page { @@ -3878,7 +3883,7 @@ pub async fn resend_team_invitation(configuration: &configuration::Configuration /// Runs an app with the supplied parameters. pub async fn run_app(configuration: &configuration::Configuration, params: RunAppParams) -> Result, Error> { - let uri_str = format!("{}/apps/{slug}/runs", configuration.base_path, slug=crate::apis::urlencode(params.slug)); + let uri_str = format!("{}/apps/{name}/runs", configuration.base_path, name=crate::apis::urlencode(params.name)); let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -4010,7 +4015,7 @@ pub async fn stream_alerts(configuration: &configuration::Configuration) -> Resu /// 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> { - let uri_str = format!("{}/apps/{slug}/runs/{seq}/logs/stream", configuration.base_path, slug=crate::apis::urlencode(params.slug), seq=params.seq); + let uri_str = format!("{}/apps/{name}/runs/{seq}/logs/stream", configuration.base_path, name=crate::apis::urlencode(params.name), seq=params.seq); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -4117,7 +4122,7 @@ pub async fn update_app(configuration: &configuration::Configuration, params: Up /// Update a new catalog object in the currently authenticated account. pub async fn update_catalog(configuration: &configuration::Configuration, params: UpdateCatalogParams) -> Result, Error> { - let uri_str = format!("{}/catalogs/{slug}", configuration.base_path, slug=crate::apis::urlencode(params.slug)); + let uri_str = format!("{}/catalogs/{name}", configuration.base_path, name=crate::apis::urlencode(params.name)); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { diff --git a/crates/tower-api/src/models/accept_invitation_params.rs b/crates/tower-api/src/models/accept_invitation_params.rs index 3c59f691..78b26042 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 2b6be00e..26d66356 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 d5de23cb..bf3474a8 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 67b8ae15..1d886e56 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.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/acknowledge_all_alerts_response.rs b/crates/tower-api/src/models/acknowledge_all_alerts_response.rs index c6ace3a6..7e5e87f7 100644 --- a/crates/tower-api/src/models/acknowledge_all_alerts_response.rs +++ b/crates/tower-api/src/models/acknowledge_all_alerts_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 365c4b96..6a979a2c 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.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/api_key.rs b/crates/tower-api/src/models/api_key.rs index 2ec47af1..9bc9600f 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 184e76b1..d37982e3 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.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -40,9 +40,9 @@ pub struct App { /// A short description of the app. Can be empty. #[serde(rename = "short_description")] pub short_description: String, - /// The unique slug of the app. - #[serde(rename = "slug")] - pub slug: String, + /// The name of the app presented as a slug to support legacy CLI clients + #[serde(rename = "slug", skip_serializing_if = "Option::is_none")] + pub slug: Option, /// The status of the app #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, @@ -52,7 +52,7 @@ pub struct App { } impl App { - pub fn new(created_at: String, health_status: HealthStatus, name: String, next_run_at: Option, owner: String, schedule: Option, short_description: String, slug: String, version: Option) -> App { + pub fn new(created_at: String, health_status: HealthStatus, name: String, next_run_at: Option, owner: String, schedule: Option, short_description: String, version: Option) -> App { App { created_at, health_status, @@ -63,7 +63,7 @@ impl App { run_results: None, schedule, short_description, - slug, + slug: None, status: None, version, } diff --git a/crates/tower-api/src/models/app_statistics.rs b/crates/tower-api/src/models/app_statistics.rs index 5715d0c4..ee43a6a7 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 3fc2b2ef..29db4a59 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 2ce9dd1f..9915e02a 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 79f94e3e..c9f1bdd4 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 b40c13fa..10791ff4 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.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -21,20 +21,21 @@ pub struct Catalog { pub name: String, #[serde(rename = "properties")] pub properties: Vec, - #[serde(rename = "slug")] - pub slug: String, + /// This property is deprecated. Please use name instead. + #[serde(rename = "slug", skip_serializing_if = "Option::is_none")] + pub slug: Option, #[serde(rename = "type")] pub r#type: String, } impl Catalog { - pub fn new(created_at: String, environment: String, name: String, properties: Vec, slug: String, r#type: String) -> Catalog { + pub fn new(created_at: String, environment: String, name: String, properties: Vec, r#type: String) -> Catalog { Catalog { created_at, environment, name, properties, - slug, + slug: None, r#type, } } diff --git a/crates/tower-api/src/models/catalog_property.rs b/crates/tower-api/src/models/catalog_property.rs index 36406b7a..2973a376 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 9b1246eb..49b25cc1 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 5a0a32f9..92b7b6f6 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 f40e4487..96dc71b1 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 8312c165..da936c10 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 c902240d..8df2f550 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 d09efa04..01a8c10d 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 33a518c0..b969e3fd 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 30aed35f..5d1f9f46 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.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -22,7 +22,7 @@ pub struct CreateAppParams { /// A description of the app. #[serde(rename = "short_description", skip_serializing_if = "Option::is_none")] pub short_description: Option, - /// A slug for the app. + /// The slug of the app. Legacy CLI will send it but we don't need it. #[serde(rename = "slug", skip_serializing_if = "Option::is_none")] pub slug: Option, } diff --git a/crates/tower-api/src/models/create_app_response.rs b/crates/tower-api/src/models/create_app_response.rs index 9e4204c3..242d6fb5 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.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_authenticator_params.rs b/crates/tower-api/src/models/create_authenticator_params.rs index 431a6085..6a577294 100644 --- a/crates/tower-api/src/models/create_authenticator_params.rs +++ b/crates/tower-api/src/models/create_authenticator_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_authenticator_response.rs b/crates/tower-api/src/models/create_authenticator_response.rs index 14a288ae..d2fd9ac4 100644 --- a/crates/tower-api/src/models/create_authenticator_response.rs +++ b/crates/tower-api/src/models/create_authenticator_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 0db9b0e9..d14de8df 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.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -22,20 +22,17 @@ pub struct CreateCatalogParams { pub name: String, #[serde(rename = "properties")] pub properties: Vec, - #[serde(rename = "slug")] - pub slug: String, #[serde(rename = "type")] pub r#type: Type, } impl CreateCatalogParams { - pub fn new(environment: String, name: String, properties: Vec, slug: String, r#type: Type) -> CreateCatalogParams { + pub fn new(environment: String, name: String, properties: Vec, r#type: Type) -> CreateCatalogParams { CreateCatalogParams { schema: None, environment, name, properties, - slug, r#type, } } diff --git a/crates/tower-api/src/models/create_catalog_response.rs b/crates/tower-api/src/models/create_catalog_response.rs index a2933430..70e39eaf 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 ff72c19f..c5b1d4a0 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 index f61ba78f..27d7bf92 100644 --- a/crates/tower-api/src/models/create_password_reset_params.rs +++ b/crates/tower-api/src/models/create_password_reset_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_password_reset_response.rs b/crates/tower-api/src/models/create_password_reset_response.rs index dabee43d..1cf3e695 100644 --- a/crates/tower-api/src/models/create_password_reset_response.rs +++ b/crates/tower-api/src/models/create_password_reset_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_schedule_params.rs b/crates/tower-api/src/models/create_schedule_params.rs index dddb475e..4136693a 100644 --- a/crates/tower-api/src/models/create_schedule_params.rs +++ b/crates/tower-api/src/models/create_schedule_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -16,9 +16,9 @@ pub struct CreateScheduleParams { /// A URL to the JSON Schema for this object. #[serde(rename = "$schema", skip_serializing_if = "Option::is_none")] pub schema: Option, - /// The slug of the app to create a schedule for - #[serde(rename = "app_slug")] - pub app_slug: String, + /// The name of the app to create a schedule for + #[serde(rename = "app_name")] + pub app_name: String, /// The specific app version to run (if omitted, will use the app's default version) #[serde(rename = "app_version", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub app_version: Option>, @@ -34,10 +34,10 @@ pub struct CreateScheduleParams { } impl CreateScheduleParams { - pub fn new(app_slug: String, cron_string: String) -> CreateScheduleParams { + pub fn new(app_name: String, cron_string: String) -> CreateScheduleParams { CreateScheduleParams { schema: None, - app_slug, + app_name, app_version: None, cron_string, environment: None, diff --git a/crates/tower-api/src/models/create_schedule_response.rs b/crates/tower-api/src/models/create_schedule_response.rs index b1cd82e0..476a8596 100644 --- a/crates/tower-api/src/models/create_schedule_response.rs +++ b/crates/tower-api/src/models/create_schedule_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_secret_params.rs b/crates/tower-api/src/models/create_secret_params.rs index 939b9ea8..28e970c3 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 7e1b99f8..1a5be82a 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 c2b0abf5..70714fab 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 6f93c641..4d40dc80 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 11334fec..e514234c 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 83431dd6..4f02eaf7 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 f53b1fc3..38d36263 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 eec85bf4..95dea344 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 b6976af1..007dfb4d 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.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/delete_authenticator_params.rs b/crates/tower-api/src/models/delete_authenticator_params.rs index bae4ded0..bafc4aba 100644 --- a/crates/tower-api/src/models/delete_authenticator_params.rs +++ b/crates/tower-api/src/models/delete_authenticator_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/delete_authenticator_response.rs b/crates/tower-api/src/models/delete_authenticator_response.rs index c0749bf7..07047339 100644 --- a/crates/tower-api/src/models/delete_authenticator_response.rs +++ b/crates/tower-api/src/models/delete_authenticator_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 3af444ec..c6861ec7 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.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/delete_schedule_response.rs b/crates/tower-api/src/models/delete_schedule_response.rs index 9a1055a2..e9ac3156 100644 --- a/crates/tower-api/src/models/delete_schedule_response.rs +++ b/crates/tower-api/src/models/delete_schedule_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 11b29bfa..6ed88241 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 d5962539..e2165299 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 70b4035d..299bb722 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 1a6d905f..6626d3df 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 8f5a3960..695a3522 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 8dd463e6..71212d3a 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 46e551cf..cc5bf0f9 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 350ce54d..f98c24b3 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 2bb864cc..72316863 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 22c24f95..c9ca5556 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 bd15d01e..fa8c4467 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 3569323b..25096800 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 6cbf7922..4d3a6d78 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 4b77672c..bc56670e 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 60df6b40..03dcd708 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 cfdafa2a..54fbacaa 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 79edcf72..50e95e66 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 c6f2755e..cc1cc457 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 e747fa06..9ed4bb93 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 8ed70ac5..15f029d5 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 9a234cb5..e4e9d18f 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.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -21,20 +21,21 @@ pub struct ExportedCatalog { pub name: String, #[serde(rename = "properties")] pub properties: Vec, - #[serde(rename = "slug")] - pub slug: String, + /// This property is deprecated. Please use name instead. + #[serde(rename = "slug", skip_serializing_if = "Option::is_none")] + pub slug: Option, #[serde(rename = "type")] pub r#type: String, } impl ExportedCatalog { - pub fn new(created_at: String, environment: String, name: String, properties: Vec, slug: String, r#type: String) -> ExportedCatalog { + pub fn new(created_at: String, environment: String, name: String, properties: Vec, r#type: String) -> ExportedCatalog { ExportedCatalog { created_at, environment, name, properties, - slug, + slug: None, r#type, } } diff --git a/crates/tower-api/src/models/exported_catalog_property.rs b/crates/tower-api/src/models/exported_catalog_property.rs index d3fc0093..b203ad47 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 80d78b8f..4c9c50d1 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.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/featurebase_identity.rs b/crates/tower-api/src/models/featurebase_identity.rs index 1b5d82dd..2142ae84 100644 --- a/crates/tower-api/src/models/featurebase_identity.rs +++ b/crates/tower-api/src/models/featurebase_identity.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 7ea28873..b8482bde 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.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/generate_authenticator_response.rs b/crates/tower-api/src/models/generate_authenticator_response.rs index cd29b668..13bcd7f5 100644 --- a/crates/tower-api/src/models/generate_authenticator_response.rs +++ b/crates/tower-api/src/models/generate_authenticator_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 12f4b2e3..2b248957 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.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/generate_runner_credentials_response.rs b/crates/tower-api/src/models/generate_runner_credentials_response.rs index 2912f2f9..e45d5d02 100644 --- a/crates/tower-api/src/models/generate_runner_credentials_response.rs +++ b/crates/tower-api/src/models/generate_runner_credentials_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 7fbf894e..6c3c562d 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 524b85be..41d8a70e 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 3457f708..26c7a86d 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 index e5483965..007ec9bb 100644 --- a/crates/tower-api/src/models/list_alerts_200_response.rs +++ b/crates/tower-api/src/models/list_alerts_200_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/list_alerts_response.rs b/crates/tower-api/src/models/list_alerts_response.rs index 5a5bbb78..72cdc1af 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 c0d186c9..d0a6422c 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 31eefa68..defa801d 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 94cf84e5..02801c1e 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 864ece97..64612df8 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.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/list_authenticators_response.rs b/crates/tower-api/src/models/list_authenticators_response.rs index 7d32e59b..bb727e35 100644 --- a/crates/tower-api/src/models/list_authenticators_response.rs +++ b/crates/tower-api/src/models/list_authenticators_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 849d7e8c..9deaad65 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 033f692d..738ad2cf 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 36596077..6ce51b5a 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.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/list_schedules_response.rs b/crates/tower-api/src/models/list_schedules_response.rs index e6aae0cc..b7ef93e5 100644 --- a/crates/tower-api/src/models/list_schedules_response.rs +++ b/crates/tower-api/src/models/list_schedules_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 84604ea9..d23ac961 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 29c97b7b..b85f754f 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 bdbcd10a..5caef4a9 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 2cc6738b..0252ea6d 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 cd6dc971..454fe547 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 eef729aa..592dbec9 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.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/pagination.rs b/crates/tower-api/src/models/pagination.rs index 4ded98b1..444c5d3b 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 d9481d59..67681ee1 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 8ef40907..189d4904 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 7ad25d0e..f1b2fa0e 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 8c2e71f3..b5bf6d7e 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 43eabd5d..242af9cd 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 d18acd6c..8ad47d5b 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 e2ff4171..c1c083a8 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 6f715d43..76838ff5 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.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -15,8 +15,9 @@ use serde::{Deserialize, Serialize}; pub struct Run { #[serde(rename = "app_name")] pub app_name: String, - #[serde(rename = "app_slug")] - pub app_slug: String, + /// The app name presented as app_slug to support legacy CLI clients + #[serde(rename = "app_slug", skip_serializing_if = "Option::is_none")] + pub app_slug: Option, #[serde(rename = "app_version")] pub app_version: String, #[serde(rename = "cancelled_at", deserialize_with = "Option::deserialize")] @@ -48,10 +49,10 @@ pub struct Run { } impl Run { - pub fn new(app_name: String, app_slug: String, app_version: String, cancelled_at: Option, created_at: String, ended_at: Option, environment: String, exit_code: Option, number: i64, parameters: Vec, run_id: String, scheduled_at: String, started_at: Option, status: Status, status_group: StatusGroup) -> Run { + pub fn new(app_name: String, app_version: String, cancelled_at: Option, created_at: String, ended_at: Option, environment: String, exit_code: Option, number: i64, parameters: Vec, run_id: String, scheduled_at: String, started_at: Option, status: Status, status_group: StatusGroup) -> Run { Run { app_name, - app_slug, + app_slug: None, app_version, cancelled_at, created_at, diff --git a/crates/tower-api/src/models/run_app_params.rs b/crates/tower-api/src/models/run_app_params.rs index 1cf9431c..7f615278 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 adb58c8a..59cbedd4 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 index b25f4448..bbf3c0e6 100644 --- a/crates/tower-api/src/models/run_failure_alert.rs +++ b/crates/tower-api/src/models/run_failure_alert.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/run_log_line.rs b/crates/tower-api/src/models/run_log_line.rs index 5176ece9..bd68f684 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 1fd4549a..42a170ed 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 cdaaae76..9282e4fb 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 4e0ef41e..806d336c 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.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/run_timeseries_point.rs b/crates/tower-api/src/models/run_timeseries_point.rs index 18aa3bba..993d8aca 100644 --- a/crates/tower-api/src/models/run_timeseries_point.rs +++ b/crates/tower-api/src/models/run_timeseries_point.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/runner_credentials.rs b/crates/tower-api/src/models/runner_credentials.rs index d750efe4..03b382ab 100644 --- a/crates/tower-api/src/models/runner_credentials.rs +++ b/crates/tower-api/src/models/runner_credentials.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/schedule.rs b/crates/tower-api/src/models/schedule.rs index cd259634..6b86d6e7 100644 --- a/crates/tower-api/src/models/schedule.rs +++ b/crates/tower-api/src/models/schedule.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -13,9 +13,9 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Schedule { - /// The slug of the app that will be executed - #[serde(rename = "app_slug")] - pub app_slug: String, + /// The name of the app that will be executed + #[serde(rename = "app_name")] + pub app_name: String, /// The specific app version to run, or null for the default version #[serde(rename = "app_version", skip_serializing_if = "Option::is_none")] pub app_version: Option, @@ -34,9 +34,9 @@ pub struct Schedule { } impl Schedule { - pub fn new(app_slug: String, cron: String, environment: String, id: String) -> Schedule { + pub fn new(app_name: String, cron: String, environment: String, id: String) -> Schedule { Schedule { - app_slug, + app_name, app_version: None, cron, environment, diff --git a/crates/tower-api/src/models/search_runs_response.rs b/crates/tower-api/src/models/search_runs_response.rs index f671b7db..14c3169b 100644 --- a/crates/tower-api/src/models/search_runs_response.rs +++ b/crates/tower-api/src/models/search_runs_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 88275bed..106e1408 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 3703547b..7a6edde3 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 index 502e367a..de879fbd 100644 --- a/crates/tower-api/src/models/sse_warning.rs +++ b/crates/tower-api/src/models/sse_warning.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/statistics_settings.rs b/crates/tower-api/src/models/statistics_settings.rs index 2a474be3..a2a4ce95 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 index e26e006e..e30ab0b2 100644 --- a/crates/tower-api/src/models/stream_alerts_200_response_inner.rs +++ b/crates/tower-api/src/models/stream_alerts_200_response_inner.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ 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 476e16e9..c9f01fa9 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.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/team.rs b/crates/tower-api/src/models/team.rs index 5f92a0ef..492b6b95 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 563c599b..558ce75f 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 13cab94d..3cf76b42 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.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/unverified_authenticator.rs b/crates/tower-api/src/models/unverified_authenticator.rs index 78bb6b7c..c32b5f7c 100644 --- a/crates/tower-api/src/models/unverified_authenticator.rs +++ b/crates/tower-api/src/models/unverified_authenticator.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 a642b8db..39fba629 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 173daebb..93f3a2cd 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 5aeea452..09662894 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 e5bdbf2c..7ad84530 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 6fc3d134..22216ed9 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.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -19,19 +19,15 @@ pub struct UpdateCatalogParams { /// New environment for the catalog #[serde(rename = "environment")] pub environment: String, - /// New name for the catalog - #[serde(rename = "name")] - pub name: String, #[serde(rename = "properties")] pub properties: Vec, } impl UpdateCatalogParams { - pub fn new(environment: String, name: String, properties: Vec) -> UpdateCatalogParams { + pub fn new(environment: String, properties: Vec) -> UpdateCatalogParams { UpdateCatalogParams { schema: None, environment, - name, properties, } } diff --git a/crates/tower-api/src/models/update_catalog_response.rs b/crates/tower-api/src/models/update_catalog_response.rs index fb281b8e..4325c6cf 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 aa683e2a..56a24ada 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 09460498..8703d411 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 index 1505fa2f..9c7fc65a 100644 --- a/crates/tower-api/src/models/update_password_reset_params.rs +++ b/crates/tower-api/src/models/update_password_reset_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_password_reset_response.rs b/crates/tower-api/src/models/update_password_reset_response.rs index c2a2f2f7..55f528e1 100644 --- a/crates/tower-api/src/models/update_password_reset_response.rs +++ b/crates/tower-api/src/models/update_password_reset_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_schedule_params.rs b/crates/tower-api/src/models/update_schedule_params.rs index e63158db..d9f5e6b8 100644 --- a/crates/tower-api/src/models/update_schedule_params.rs +++ b/crates/tower-api/src/models/update_schedule_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -16,9 +16,9 @@ pub struct UpdateScheduleParams { /// A URL to the JSON Schema for this object. #[serde(rename = "$schema", skip_serializing_if = "Option::is_none")] pub schema: Option, - /// The slug of the app that this schedule runs - #[serde(rename = "app_slug")] - pub app_slug: String, + /// The name of the app that this schedule runs + #[serde(rename = "app_name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub app_name: Option>, /// The specific app version to run (if omitted, will use the app's default version) #[serde(rename = "app_version", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub app_version: Option>, @@ -34,10 +34,10 @@ pub struct UpdateScheduleParams { } impl UpdateScheduleParams { - pub fn new(app_slug: String) -> UpdateScheduleParams { + pub fn new() -> UpdateScheduleParams { UpdateScheduleParams { schema: None, - app_slug, + app_name: None, app_version: None, cron: None, environment: None, diff --git a/crates/tower-api/src/models/update_schedule_response.rs b/crates/tower-api/src/models/update_schedule_response.rs index b82997d0..66d4bbc9 100644 --- a/crates/tower-api/src/models/update_schedule_response.rs +++ b/crates/tower-api/src/models/update_schedule_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_secret_params.rs b/crates/tower-api/src/models/update_secret_params.rs index 3af8ac02..eacbe258 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 9660200c..9e364c39 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 cf606f1f..88aa5eae 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 cb6b9a74..31163f15 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 45443c85..1c31bc68 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 766615f2..21125716 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.6.19 + * The version of the OpenAPI document: v0.6.22 * 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 6a483fab..23fbc97d 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.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/verified_authenticator.rs b/crates/tower-api/src/models/verified_authenticator.rs index 6fee1fc4..bf3410ee 100644 --- a/crates/tower-api/src/models/verified_authenticator.rs +++ b/crates/tower-api/src/models/verified_authenticator.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.19 + * The version of the OpenAPI document: v0.6.22 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/src/tower/tower_api_client/api/default/cancel_run.py b/src/tower/tower_api_client/api/default/cancel_run.py index ab709898..2dbc22e1 100644 --- a/src/tower/tower_api_client/api/default/cancel_run.py +++ b/src/tower/tower_api_client/api/default/cancel_run.py @@ -10,13 +10,13 @@ def _get_kwargs( - slug: str, + name: str, seq: int, ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "post", - "url": "/apps/{slug}/runs/{seq}".format( - slug=slug, + "url": "/apps/{name}/runs/{seq}".format( + name=name, seq=seq, ), } @@ -49,7 +49,7 @@ def _build_response( def sync_detailed( - slug: str, + name: str, seq: int, *, client: AuthenticatedClient, @@ -59,7 +59,7 @@ def sync_detailed( Cancel a run Args: - slug (str): The slug of the app to fetch runs for. + name (str): The name of the app to fetch runs for. seq (int): The number of the run to fetch. Raises: @@ -71,7 +71,7 @@ def sync_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, seq=seq, ) @@ -83,7 +83,7 @@ def sync_detailed( def sync( - slug: str, + name: str, seq: int, *, client: AuthenticatedClient, @@ -93,7 +93,7 @@ def sync( Cancel a run Args: - slug (str): The slug of the app to fetch runs for. + name (str): The name of the app to fetch runs for. seq (int): The number of the run to fetch. Raises: @@ -105,14 +105,14 @@ def sync( """ return sync_detailed( - slug=slug, + name=name, seq=seq, client=client, ).parsed async def asyncio_detailed( - slug: str, + name: str, seq: int, *, client: AuthenticatedClient, @@ -122,7 +122,7 @@ async def asyncio_detailed( Cancel a run Args: - slug (str): The slug of the app to fetch runs for. + name (str): The name of the app to fetch runs for. seq (int): The number of the run to fetch. Raises: @@ -134,7 +134,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, seq=seq, ) @@ -144,7 +144,7 @@ async def asyncio_detailed( async def asyncio( - slug: str, + name: str, seq: int, *, client: AuthenticatedClient, @@ -154,7 +154,7 @@ async def asyncio( Cancel a run Args: - slug (str): The slug of the app to fetch runs for. + name (str): The name of the app to fetch runs for. seq (int): The number of the run to fetch. Raises: @@ -167,7 +167,7 @@ async def asyncio( return ( await asyncio_detailed( - slug=slug, + name=name, seq=seq, client=client, ) diff --git a/src/tower/tower_api_client/api/default/create_schedule.py b/src/tower/tower_api_client/api/default/create_schedule.py new file mode 100644 index 00000000..2b65f22b --- /dev/null +++ b/src/tower/tower_api_client/api/default/create_schedule.py @@ -0,0 +1,168 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.create_schedule_params import CreateScheduleParams +from ...models.create_schedule_response import CreateScheduleResponse +from ...types import Response + + +def _get_kwargs( + *, + body: CreateScheduleParams, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/schedules", + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[CreateScheduleResponse]: + if response.status_code == 200: + response_200 = CreateScheduleResponse.from_dict(response.json()) + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[CreateScheduleResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: CreateScheduleParams, +) -> Response[CreateScheduleResponse]: + """Create schedule + + Create a new schedule for an app. + + Args: + body (CreateScheduleParams): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CreateScheduleResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: CreateScheduleParams, +) -> Optional[CreateScheduleResponse]: + """Create schedule + + Create a new schedule for an app. + + Args: + body (CreateScheduleParams): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CreateScheduleResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: CreateScheduleParams, +) -> Response[CreateScheduleResponse]: + """Create schedule + + Create a new schedule for an app. + + Args: + body (CreateScheduleParams): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CreateScheduleResponse] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: CreateScheduleParams, +) -> Optional[CreateScheduleResponse]: + """Create schedule + + Create a new schedule for an app. + + Args: + body (CreateScheduleParams): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CreateScheduleResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/src/tower/tower_api_client/api/default/delete_app.py b/src/tower/tower_api_client/api/default/delete_app.py index ad9bdf2f..ec3d0de6 100644 --- a/src/tower/tower_api_client/api/default/delete_app.py +++ b/src/tower/tower_api_client/api/default/delete_app.py @@ -10,12 +10,12 @@ def _get_kwargs( - slug: str, + name: str, ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "delete", - "url": "/apps/{slug}".format( - slug=slug, + "url": "/apps/{name}".format( + name=name, ), } @@ -47,7 +47,7 @@ def _build_response( def sync_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, ) -> Response[DeleteAppResponse]: @@ -56,7 +56,7 @@ def sync_detailed( Delete one of your apps, the associated code, and all the runs as well. Args: - slug (str): The slug of the app to delete. + name (str): The name of the app to delete. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -67,7 +67,7 @@ def sync_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, ) response = client.get_httpx_client().request( @@ -78,7 +78,7 @@ def sync_detailed( def sync( - slug: str, + name: str, *, client: AuthenticatedClient, ) -> Optional[DeleteAppResponse]: @@ -87,7 +87,7 @@ def sync( Delete one of your apps, the associated code, and all the runs as well. Args: - slug (str): The slug of the app to delete. + name (str): The name of the app to delete. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -98,13 +98,13 @@ def sync( """ return sync_detailed( - slug=slug, + name=name, client=client, ).parsed async def asyncio_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, ) -> Response[DeleteAppResponse]: @@ -113,7 +113,7 @@ async def asyncio_detailed( Delete one of your apps, the associated code, and all the runs as well. Args: - slug (str): The slug of the app to delete. + name (str): The name of the app to delete. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -124,7 +124,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -133,7 +133,7 @@ async def asyncio_detailed( async def asyncio( - slug: str, + name: str, *, client: AuthenticatedClient, ) -> Optional[DeleteAppResponse]: @@ -142,7 +142,7 @@ async def asyncio( Delete one of your apps, the associated code, and all the runs as well. Args: - slug (str): The slug of the app to delete. + name (str): The name of the app to delete. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -154,7 +154,7 @@ async def asyncio( return ( await asyncio_detailed( - slug=slug, + name=name, client=client, ) ).parsed diff --git a/src/tower/tower_api_client/api/default/delete_catalog.py b/src/tower/tower_api_client/api/default/delete_catalog.py index 85ca4995..b19f3355 100644 --- a/src/tower/tower_api_client/api/default/delete_catalog.py +++ b/src/tower/tower_api_client/api/default/delete_catalog.py @@ -6,17 +6,26 @@ from ... import errors from ...client import AuthenticatedClient, Client from ...models.delete_catalog_response import DeleteCatalogResponse -from ...types import Response +from ...types import UNSET, Response, Unset def _get_kwargs( - slug: str, + name: str, + *, + environment: Union[Unset, str] = "default", ) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["environment"] = environment + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/catalogs/{slug}".format( - slug=slug, + "url": "/catalogs/{name}".format( + name=name, ), + "params": params, } return _kwargs @@ -47,16 +56,19 @@ def _build_response( def sync_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, + environment: Union[Unset, str] = "default", ) -> Response[DeleteCatalogResponse]: """Delete catalog Delete a new catalog object in the currently authenticated account. Args: - slug (str): The slug of the catalog to update. + name (str): The name of the catalog to update. + environment (Union[Unset, str]): The environment of the catalog to delete. Default: + 'default'. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -67,7 +79,8 @@ def sync_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, + environment=environment, ) response = client.get_httpx_client().request( @@ -78,16 +91,19 @@ def sync_detailed( def sync( - slug: str, + name: str, *, client: AuthenticatedClient, + environment: Union[Unset, str] = "default", ) -> Optional[DeleteCatalogResponse]: """Delete catalog Delete a new catalog object in the currently authenticated account. Args: - slug (str): The slug of the catalog to update. + name (str): The name of the catalog to update. + environment (Union[Unset, str]): The environment of the catalog to delete. Default: + 'default'. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -98,22 +114,26 @@ def sync( """ return sync_detailed( - slug=slug, + name=name, client=client, + environment=environment, ).parsed async def asyncio_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, + environment: Union[Unset, str] = "default", ) -> Response[DeleteCatalogResponse]: """Delete catalog Delete a new catalog object in the currently authenticated account. Args: - slug (str): The slug of the catalog to update. + name (str): The name of the catalog to update. + environment (Union[Unset, str]): The environment of the catalog to delete. Default: + 'default'. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -124,7 +144,8 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, + environment=environment, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -133,16 +154,19 @@ async def asyncio_detailed( async def asyncio( - slug: str, + name: str, *, client: AuthenticatedClient, + environment: Union[Unset, str] = "default", ) -> Optional[DeleteCatalogResponse]: """Delete catalog Delete a new catalog object in the currently authenticated account. Args: - slug (str): The slug of the catalog to update. + name (str): The name of the catalog to update. + environment (Union[Unset, str]): The environment of the catalog to delete. Default: + 'default'. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -154,7 +178,8 @@ async def asyncio( return ( await asyncio_detailed( - slug=slug, + name=name, client=client, + environment=environment, ) ).parsed diff --git a/src/tower/tower_api_client/api/default/delete_schedule.py b/src/tower/tower_api_client/api/default/delete_schedule.py new file mode 100644 index 00000000..dafcee8e --- /dev/null +++ b/src/tower/tower_api_client/api/default/delete_schedule.py @@ -0,0 +1,160 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.delete_schedule_response import DeleteScheduleResponse +from ...types import Response + + +def _get_kwargs( + id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/schedules/{id}".format( + id=id, + ), + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[DeleteScheduleResponse]: + if response.status_code == 200: + response_200 = DeleteScheduleResponse.from_dict(response.json()) + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[DeleteScheduleResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[DeleteScheduleResponse]: + """Delete schedule + + Delete an existing schedule for an app. + + Args: + id (str): The ID of the schedule to delete. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DeleteScheduleResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient, +) -> Optional[DeleteScheduleResponse]: + """Delete schedule + + Delete an existing schedule for an app. + + Args: + id (str): The ID of the schedule to delete. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DeleteScheduleResponse + """ + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, +) -> Response[DeleteScheduleResponse]: + """Delete schedule + + Delete an existing schedule for an app. + + Args: + id (str): The ID of the schedule to delete. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DeleteScheduleResponse] + """ + + kwargs = _get_kwargs( + id=id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, +) -> Optional[DeleteScheduleResponse]: + """Delete schedule + + Delete an existing schedule for an app. + + Args: + id (str): The ID of the schedule to delete. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DeleteScheduleResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/src/tower/tower_api_client/api/default/deploy_app.py b/src/tower/tower_api_client/api/default/deploy_app.py index a9698164..9547e5d1 100644 --- a/src/tower/tower_api_client/api/default/deploy_app.py +++ b/src/tower/tower_api_client/api/default/deploy_app.py @@ -11,7 +11,7 @@ def _get_kwargs( - slug: str, + name: str, *, content_encoding: Union[Unset, str] = UNSET, ) -> dict[str, Any]: @@ -21,8 +21,8 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": "/apps/{slug}/deploy".format( - slug=slug, + "url": "/apps/{name}/deploy".format( + name=name, ), } @@ -67,7 +67,7 @@ def _build_response( def sync_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, content_encoding: Union[Unset, str] = UNSET, @@ -78,7 +78,7 @@ def sync_detailed( and creates a new deployment for an app based on that file. Args: - slug (str): The slug of the app to deploy. + name (str): The name of the app to deploy. content_encoding (Union[Unset, str]): The encoding of the content. Raises: @@ -90,7 +90,7 @@ def sync_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, content_encoding=content_encoding, ) @@ -102,7 +102,7 @@ def sync_detailed( def sync( - slug: str, + name: str, *, client: AuthenticatedClient, content_encoding: Union[Unset, str] = UNSET, @@ -113,7 +113,7 @@ def sync( and creates a new deployment for an app based on that file. Args: - slug (str): The slug of the app to deploy. + name (str): The name of the app to deploy. content_encoding (Union[Unset, str]): The encoding of the content. Raises: @@ -125,14 +125,14 @@ def sync( """ return sync_detailed( - slug=slug, + name=name, client=client, content_encoding=content_encoding, ).parsed async def asyncio_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, content_encoding: Union[Unset, str] = UNSET, @@ -143,7 +143,7 @@ async def asyncio_detailed( and creates a new deployment for an app based on that file. Args: - slug (str): The slug of the app to deploy. + name (str): The name of the app to deploy. content_encoding (Union[Unset, str]): The encoding of the content. Raises: @@ -155,7 +155,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, content_encoding=content_encoding, ) @@ -165,7 +165,7 @@ async def asyncio_detailed( async def asyncio( - slug: str, + name: str, *, client: AuthenticatedClient, content_encoding: Union[Unset, str] = UNSET, @@ -176,7 +176,7 @@ async def asyncio( and creates a new deployment for an app based on that file. Args: - slug (str): The slug of the app to deploy. + name (str): The name of the app to deploy. content_encoding (Union[Unset, str]): The encoding of the content. Raises: @@ -189,7 +189,7 @@ async def asyncio( return ( await asyncio_detailed( - slug=slug, + name=name, client=client, content_encoding=content_encoding, ) diff --git a/src/tower/tower_api_client/api/default/describe_app.py b/src/tower/tower_api_client/api/default/describe_app.py index 90f86acf..ffb746d4 100644 --- a/src/tower/tower_api_client/api/default/describe_app.py +++ b/src/tower/tower_api_client/api/default/describe_app.py @@ -11,7 +11,7 @@ def _get_kwargs( - slug: str, + name: str, *, runs: Union[Unset, int] = UNSET, start_at: Union[Unset, datetime.datetime] = UNSET, @@ -38,8 +38,8 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": "/apps/{slug}".format( - slug=slug, + "url": "/apps/{name}".format( + name=name, ), "params": params, } @@ -72,7 +72,7 @@ def _build_response( def sync_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, runs: Union[Unset, int] = UNSET, @@ -85,7 +85,7 @@ def sync_detailed( Get all the runs for the current account. Args: - slug (str): The slug of the app to fetch. + name (str): The name of the app to fetch. runs (Union[Unset, int]): The number of recent runs to fetch for the app. start_at (Union[Unset, datetime.datetime]): Filter runs scheduled after this datetime (inclusive). Provide timestamps in ISO-8601 format. @@ -103,7 +103,7 @@ def sync_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, runs=runs, start_at=start_at, end_at=end_at, @@ -118,7 +118,7 @@ def sync_detailed( def sync( - slug: str, + name: str, *, client: AuthenticatedClient, runs: Union[Unset, int] = UNSET, @@ -131,7 +131,7 @@ def sync( Get all the runs for the current account. Args: - slug (str): The slug of the app to fetch. + name (str): The name of the app to fetch. runs (Union[Unset, int]): The number of recent runs to fetch for the app. start_at (Union[Unset, datetime.datetime]): Filter runs scheduled after this datetime (inclusive). Provide timestamps in ISO-8601 format. @@ -149,7 +149,7 @@ def sync( """ return sync_detailed( - slug=slug, + name=name, client=client, runs=runs, start_at=start_at, @@ -159,7 +159,7 @@ def sync( async def asyncio_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, runs: Union[Unset, int] = UNSET, @@ -172,7 +172,7 @@ async def asyncio_detailed( Get all the runs for the current account. Args: - slug (str): The slug of the app to fetch. + name (str): The name of the app to fetch. runs (Union[Unset, int]): The number of recent runs to fetch for the app. start_at (Union[Unset, datetime.datetime]): Filter runs scheduled after this datetime (inclusive). Provide timestamps in ISO-8601 format. @@ -190,7 +190,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, runs=runs, start_at=start_at, end_at=end_at, @@ -203,7 +203,7 @@ async def asyncio_detailed( async def asyncio( - slug: str, + name: str, *, client: AuthenticatedClient, runs: Union[Unset, int] = UNSET, @@ -216,7 +216,7 @@ async def asyncio( Get all the runs for the current account. Args: - slug (str): The slug of the app to fetch. + name (str): The name of the app to fetch. runs (Union[Unset, int]): The number of recent runs to fetch for the app. start_at (Union[Unset, datetime.datetime]): Filter runs scheduled after this datetime (inclusive). Provide timestamps in ISO-8601 format. @@ -235,7 +235,7 @@ async def asyncio( return ( await asyncio_detailed( - slug=slug, + name=name, client=client, runs=runs, start_at=start_at, diff --git a/src/tower/tower_api_client/api/default/describe_run.py b/src/tower/tower_api_client/api/default/describe_run.py index 0e1818ed..c29f1532 100644 --- a/src/tower/tower_api_client/api/default/describe_run.py +++ b/src/tower/tower_api_client/api/default/describe_run.py @@ -11,13 +11,13 @@ def _get_kwargs( - slug: str, + name: str, seq: int, ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": "/apps/{slug}/runs/{seq}".format( - slug=slug, + "url": "/apps/{name}/runs/{seq}".format( + name=name, seq=seq, ), } @@ -58,7 +58,7 @@ def _build_response( def sync_detailed( - slug: str, + name: str, seq: int, *, client: AuthenticatedClient, @@ -68,7 +68,7 @@ def sync_detailed( Describe a run of an app. Args: - slug (str): The slug of the app to fetch runs for. + name (str): The name of the app to fetch runs for. seq (int): The number of the run to fetch. Raises: @@ -80,7 +80,7 @@ def sync_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, seq=seq, ) @@ -92,7 +92,7 @@ def sync_detailed( def sync( - slug: str, + name: str, seq: int, *, client: AuthenticatedClient, @@ -102,7 +102,7 @@ def sync( Describe a run of an app. Args: - slug (str): The slug of the app to fetch runs for. + name (str): The name of the app to fetch runs for. seq (int): The number of the run to fetch. Raises: @@ -114,14 +114,14 @@ def sync( """ return sync_detailed( - slug=slug, + name=name, seq=seq, client=client, ).parsed async def asyncio_detailed( - slug: str, + name: str, seq: int, *, client: AuthenticatedClient, @@ -131,7 +131,7 @@ async def asyncio_detailed( Describe a run of an app. Args: - slug (str): The slug of the app to fetch runs for. + name (str): The name of the app to fetch runs for. seq (int): The number of the run to fetch. Raises: @@ -143,7 +143,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, seq=seq, ) @@ -153,7 +153,7 @@ async def asyncio_detailed( async def asyncio( - slug: str, + name: str, seq: int, *, client: AuthenticatedClient, @@ -163,7 +163,7 @@ async def asyncio( Describe a run of an app. Args: - slug (str): The slug of the app to fetch runs for. + name (str): The name of the app to fetch runs for. seq (int): The number of the run to fetch. Raises: @@ -176,7 +176,7 @@ async def asyncio( return ( await asyncio_detailed( - slug=slug, + name=name, seq=seq, client=client, ) diff --git a/src/tower/tower_api_client/api/default/describe_run_logs.py b/src/tower/tower_api_client/api/default/describe_run_logs.py index 70305f64..1e1d81e3 100644 --- a/src/tower/tower_api_client/api/default/describe_run_logs.py +++ b/src/tower/tower_api_client/api/default/describe_run_logs.py @@ -10,13 +10,13 @@ def _get_kwargs( - slug: str, + name: str, seq: int, ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": "/apps/{slug}/runs/{seq}/logs".format( - slug=slug, + "url": "/apps/{name}/runs/{seq}/logs".format( + name=name, seq=seq, ), } @@ -49,7 +49,7 @@ def _build_response( def sync_detailed( - slug: str, + name: str, seq: int, *, client: AuthenticatedClient, @@ -59,7 +59,7 @@ def sync_detailed( Retrieves the logs associated with a particular run of an app. Args: - slug (str): The slug of the app to get logs for. + name (str): The name of the app to get logs for. seq (int): The sequence number of the run to get logs for. Raises: @@ -71,7 +71,7 @@ def sync_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, seq=seq, ) @@ -83,7 +83,7 @@ def sync_detailed( def sync( - slug: str, + name: str, seq: int, *, client: AuthenticatedClient, @@ -93,7 +93,7 @@ def sync( Retrieves the logs associated with a particular run of an app. Args: - slug (str): The slug of the app to get logs for. + name (str): The name of the app to get logs for. seq (int): The sequence number of the run to get logs for. Raises: @@ -105,14 +105,14 @@ def sync( """ return sync_detailed( - slug=slug, + name=name, seq=seq, client=client, ).parsed async def asyncio_detailed( - slug: str, + name: str, seq: int, *, client: AuthenticatedClient, @@ -122,7 +122,7 @@ async def asyncio_detailed( Retrieves the logs associated with a particular run of an app. Args: - slug (str): The slug of the app to get logs for. + name (str): The name of the app to get logs for. seq (int): The sequence number of the run to get logs for. Raises: @@ -134,7 +134,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, seq=seq, ) @@ -144,7 +144,7 @@ async def asyncio_detailed( async def asyncio( - slug: str, + name: str, seq: int, *, client: AuthenticatedClient, @@ -154,7 +154,7 @@ async def asyncio( Retrieves the logs associated with a particular run of an app. Args: - slug (str): The slug of the app to get logs for. + name (str): The name of the app to get logs for. seq (int): The sequence number of the run to get logs for. Raises: @@ -167,7 +167,7 @@ async def asyncio( return ( await asyncio_detailed( - slug=slug, + name=name, seq=seq, client=client, ) diff --git a/src/tower/tower_api_client/api/default/generate_runner_credentials.py b/src/tower/tower_api_client/api/default/generate_runner_credentials.py new file mode 100644 index 00000000..0e5a95b0 --- /dev/null +++ b/src/tower/tower_api_client/api/default/generate_runner_credentials.py @@ -0,0 +1,140 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.generate_runner_credentials_response import ( + GenerateRunnerCredentialsResponse, +) +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/runners/credentials", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[GenerateRunnerCredentialsResponse]: + if response.status_code == 200: + response_200 = GenerateRunnerCredentialsResponse.from_dict(response.json()) + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[GenerateRunnerCredentialsResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, +) -> Response[GenerateRunnerCredentialsResponse]: + """Generate runner credentials + + Uses your current authentication context to generate runner credentials that are used for + authenticating runner requests + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GenerateRunnerCredentialsResponse] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, +) -> Optional[GenerateRunnerCredentialsResponse]: + """Generate runner credentials + + Uses your current authentication context to generate runner credentials that are used for + authenticating runner requests + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GenerateRunnerCredentialsResponse + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, +) -> Response[GenerateRunnerCredentialsResponse]: + """Generate runner credentials + + Uses your current authentication context to generate runner credentials that are used for + authenticating runner requests + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GenerateRunnerCredentialsResponse] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, +) -> Optional[GenerateRunnerCredentialsResponse]: + """Generate runner credentials + + Uses your current authentication context to generate runner credentials that are used for + authenticating runner requests + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GenerateRunnerCredentialsResponse + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/src/tower/tower_api_client/api/default/list_app_environments.py b/src/tower/tower_api_client/api/default/list_app_environments.py index df48cb09..27d26443 100644 --- a/src/tower/tower_api_client/api/default/list_app_environments.py +++ b/src/tower/tower_api_client/api/default/list_app_environments.py @@ -10,12 +10,12 @@ def _get_kwargs( - slug: str, + name: str, ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": "/apps/{slug}/environments".format( - slug=slug, + "url": "/apps/{name}/environments".format( + name=name, ), } @@ -47,7 +47,7 @@ def _build_response( def sync_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, ) -> Response[ListAppEnvironmentsResponse]: @@ -56,7 +56,7 @@ def sync_detailed( Generates a list of all the known environments for a given app in the current account. Args: - slug (str): The name of the app to get the version for. + name (str): The name of the app to get the version for. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -67,7 +67,7 @@ def sync_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, ) response = client.get_httpx_client().request( @@ -78,7 +78,7 @@ def sync_detailed( def sync( - slug: str, + name: str, *, client: AuthenticatedClient, ) -> Optional[ListAppEnvironmentsResponse]: @@ -87,7 +87,7 @@ def sync( Generates a list of all the known environments for a given app in the current account. Args: - slug (str): The name of the app to get the version for. + name (str): The name of the app to get the version for. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -98,13 +98,13 @@ def sync( """ return sync_detailed( - slug=slug, + name=name, client=client, ).parsed async def asyncio_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, ) -> Response[ListAppEnvironmentsResponse]: @@ -113,7 +113,7 @@ async def asyncio_detailed( Generates a list of all the known environments for a given app in the current account. Args: - slug (str): The name of the app to get the version for. + name (str): The name of the app to get the version for. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -124,7 +124,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -133,7 +133,7 @@ async def asyncio_detailed( async def asyncio( - slug: str, + name: str, *, client: AuthenticatedClient, ) -> Optional[ListAppEnvironmentsResponse]: @@ -142,7 +142,7 @@ async def asyncio( Generates a list of all the known environments for a given app in the current account. Args: - slug (str): The name of the app to get the version for. + name (str): The name of the app to get the version for. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -154,7 +154,7 @@ async def asyncio( return ( await asyncio_detailed( - slug=slug, + name=name, client=client, ) ).parsed diff --git a/src/tower/tower_api_client/api/default/list_runs.py b/src/tower/tower_api_client/api/default/list_runs.py index 88c4cc49..11d31a1a 100644 --- a/src/tower/tower_api_client/api/default/list_runs.py +++ b/src/tower/tower_api_client/api/default/list_runs.py @@ -12,7 +12,7 @@ def _get_kwargs( - slug: str, + name: str, *, page: Union[Unset, int] = 1, page_size: Union[Unset, int] = 20, @@ -49,8 +49,8 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "get", - "url": "/apps/{slug}/runs".format( - slug=slug, + "url": "/apps/{name}/runs".format( + name=name, ), "params": params, } @@ -83,7 +83,7 @@ def _build_response( def sync_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, page: Union[Unset, int] = 1, @@ -98,7 +98,7 @@ def sync_detailed( parameters passed in. Args: - slug (str): The slug of the app to fetch runs for. + name (str): The name of the app to fetch runs for. page (Union[Unset, int]): The page number to fetch. Default: 1. page_size (Union[Unset, int]): The number of records to fetch on each page. Default: 20. status (Union[Unset, list[ListRunsStatusItem]]): Filter runs by status(es) (comma @@ -117,7 +117,7 @@ def sync_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, page=page, page_size=page_size, status=status, @@ -133,7 +133,7 @@ def sync_detailed( def sync( - slug: str, + name: str, *, client: AuthenticatedClient, page: Union[Unset, int] = 1, @@ -148,7 +148,7 @@ def sync( parameters passed in. Args: - slug (str): The slug of the app to fetch runs for. + name (str): The name of the app to fetch runs for. page (Union[Unset, int]): The page number to fetch. Default: 1. page_size (Union[Unset, int]): The number of records to fetch on each page. Default: 20. status (Union[Unset, list[ListRunsStatusItem]]): Filter runs by status(es) (comma @@ -167,7 +167,7 @@ def sync( """ return sync_detailed( - slug=slug, + name=name, client=client, page=page, page_size=page_size, @@ -178,7 +178,7 @@ def sync( async def asyncio_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, page: Union[Unset, int] = 1, @@ -193,7 +193,7 @@ async def asyncio_detailed( parameters passed in. Args: - slug (str): The slug of the app to fetch runs for. + name (str): The name of the app to fetch runs for. page (Union[Unset, int]): The page number to fetch. Default: 1. page_size (Union[Unset, int]): The number of records to fetch on each page. Default: 20. status (Union[Unset, list[ListRunsStatusItem]]): Filter runs by status(es) (comma @@ -212,7 +212,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, page=page, page_size=page_size, status=status, @@ -226,7 +226,7 @@ async def asyncio_detailed( async def asyncio( - slug: str, + name: str, *, client: AuthenticatedClient, page: Union[Unset, int] = 1, @@ -241,7 +241,7 @@ async def asyncio( parameters passed in. Args: - slug (str): The slug of the app to fetch runs for. + name (str): The name of the app to fetch runs for. page (Union[Unset, int]): The page number to fetch. Default: 1. page_size (Union[Unset, int]): The number of records to fetch on each page. Default: 20. status (Union[Unset, list[ListRunsStatusItem]]): Filter runs by status(es) (comma @@ -261,7 +261,7 @@ async def asyncio( return ( await asyncio_detailed( - slug=slug, + name=name, client=client, page=page, page_size=page_size, diff --git a/src/tower/tower_api_client/api/default/list_schedules.py b/src/tower/tower_api_client/api/default/list_schedules.py new file mode 100644 index 00000000..23ac9983 --- /dev/null +++ b/src/tower/tower_api_client/api/default/list_schedules.py @@ -0,0 +1,181 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.list_schedules_response import ListSchedulesResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: Union[Unset, int] = UNSET, + page_size: Union[Unset, int] = UNSET, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["page"] = page + + params["page_size"] = page_size + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/schedules", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[ListSchedulesResponse]: + if response.status_code == 200: + response_200 = ListSchedulesResponse.from_dict(response.json()) + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[ListSchedulesResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + page: Union[Unset, int] = UNSET, + page_size: Union[Unset, int] = UNSET, +) -> Response[ListSchedulesResponse]: + """List schedules + + List all schedules for an app. + + Args: + page (Union[Unset, int]): The page number to fetch. + page_size (Union[Unset, int]): The number of records to fetch on each page. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ListSchedulesResponse] + """ + + kwargs = _get_kwargs( + page=page, + page_size=page_size, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + page: Union[Unset, int] = UNSET, + page_size: Union[Unset, int] = UNSET, +) -> Optional[ListSchedulesResponse]: + """List schedules + + List all schedules for an app. + + Args: + page (Union[Unset, int]): The page number to fetch. + page_size (Union[Unset, int]): The number of records to fetch on each page. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ListSchedulesResponse + """ + + return sync_detailed( + client=client, + page=page, + page_size=page_size, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + page: Union[Unset, int] = UNSET, + page_size: Union[Unset, int] = UNSET, +) -> Response[ListSchedulesResponse]: + """List schedules + + List all schedules for an app. + + Args: + page (Union[Unset, int]): The page number to fetch. + page_size (Union[Unset, int]): The number of records to fetch on each page. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ListSchedulesResponse] + """ + + kwargs = _get_kwargs( + page=page, + page_size=page_size, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + page: Union[Unset, int] = UNSET, + page_size: Union[Unset, int] = UNSET, +) -> Optional[ListSchedulesResponse]: + """List schedules + + List all schedules for an app. + + Args: + page (Union[Unset, int]): The page number to fetch. + page_size (Union[Unset, int]): The number of records to fetch on each page. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ListSchedulesResponse + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + page_size=page_size, + ) + ).parsed diff --git a/src/tower/tower_api_client/api/default/run_app.py b/src/tower/tower_api_client/api/default/run_app.py index 6213b686..6aabf401 100644 --- a/src/tower/tower_api_client/api/default/run_app.py +++ b/src/tower/tower_api_client/api/default/run_app.py @@ -12,7 +12,7 @@ def _get_kwargs( - slug: str, + name: str, *, body: RunAppParams, ) -> dict[str, Any]: @@ -20,8 +20,8 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": "/apps/{slug}/runs".format( - slug=slug, + "url": "/apps/{name}/runs".format( + name=name, ), } @@ -67,7 +67,7 @@ def _build_response( def sync_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, body: RunAppParams, @@ -77,7 +77,7 @@ def sync_detailed( Runs an app with the supplied parameters. Args: - slug (str): The slug of the app to fetch runs for. + name (str): The name of the app to fetch runs for. body (RunAppParams): Raises: @@ -89,7 +89,7 @@ def sync_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, body=body, ) @@ -101,7 +101,7 @@ def sync_detailed( def sync( - slug: str, + name: str, *, client: AuthenticatedClient, body: RunAppParams, @@ -111,7 +111,7 @@ def sync( Runs an app with the supplied parameters. Args: - slug (str): The slug of the app to fetch runs for. + name (str): The name of the app to fetch runs for. body (RunAppParams): Raises: @@ -123,14 +123,14 @@ def sync( """ return sync_detailed( - slug=slug, + name=name, client=client, body=body, ).parsed async def asyncio_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, body: RunAppParams, @@ -140,7 +140,7 @@ async def asyncio_detailed( Runs an app with the supplied parameters. Args: - slug (str): The slug of the app to fetch runs for. + name (str): The name of the app to fetch runs for. body (RunAppParams): Raises: @@ -152,7 +152,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, body=body, ) @@ -162,7 +162,7 @@ async def asyncio_detailed( async def asyncio( - slug: str, + name: str, *, client: AuthenticatedClient, body: RunAppParams, @@ -172,7 +172,7 @@ async def asyncio( Runs an app with the supplied parameters. Args: - slug (str): The slug of the app to fetch runs for. + name (str): The name of the app to fetch runs for. body (RunAppParams): Raises: @@ -185,7 +185,7 @@ async def asyncio( return ( await asyncio_detailed( - slug=slug, + name=name, client=client, body=body, ) diff --git a/src/tower/tower_api_client/api/default/stream_run_logs.py b/src/tower/tower_api_client/api/default/stream_run_logs.py index 9888ffef..15e46a38 100644 --- a/src/tower/tower_api_client/api/default/stream_run_logs.py +++ b/src/tower/tower_api_client/api/default/stream_run_logs.py @@ -11,13 +11,13 @@ def _get_kwargs( - slug: str, + name: str, seq: int, ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": "/apps/{slug}/runs/{seq}/logs/stream".format( - slug=slug, + "url": "/apps/{name}/runs/{seq}/logs/stream".format( + name=name, seq=seq, ), } @@ -73,7 +73,7 @@ def _build_response( def sync_detailed( - slug: str, + name: str, seq: int, *, client: AuthenticatedClient, @@ -83,7 +83,7 @@ def sync_detailed( Streams the logs associated with a particular run of an app in real-time. Args: - slug (str): The slug of the app to get logs for. + name (str): The name of the app to get logs for. seq (int): The sequence number of the run to get logs for. Raises: @@ -95,7 +95,7 @@ def sync_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, seq=seq, ) @@ -107,7 +107,7 @@ def sync_detailed( def sync( - slug: str, + name: str, seq: int, *, client: AuthenticatedClient, @@ -117,7 +117,7 @@ def sync( Streams the logs associated with a particular run of an app in real-time. Args: - slug (str): The slug of the app to get logs for. + name (str): The name of the app to get logs for. seq (int): The sequence number of the run to get logs for. Raises: @@ -129,14 +129,14 @@ def sync( """ return sync_detailed( - slug=slug, + name=name, seq=seq, client=client, ).parsed async def asyncio_detailed( - slug: str, + name: str, seq: int, *, client: AuthenticatedClient, @@ -146,7 +146,7 @@ async def asyncio_detailed( Streams the logs associated with a particular run of an app in real-time. Args: - slug (str): The slug of the app to get logs for. + name (str): The name of the app to get logs for. seq (int): The sequence number of the run to get logs for. Raises: @@ -158,7 +158,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, seq=seq, ) @@ -168,7 +168,7 @@ async def asyncio_detailed( async def asyncio( - slug: str, + name: str, seq: int, *, client: AuthenticatedClient, @@ -178,7 +178,7 @@ async def asyncio( Streams the logs associated with a particular run of an app in real-time. Args: - slug (str): The slug of the app to get logs for. + name (str): The name of the app to get logs for. seq (int): The sequence number of the run to get logs for. Raises: @@ -191,7 +191,7 @@ async def asyncio( return ( await asyncio_detailed( - slug=slug, + name=name, seq=seq, client=client, ) diff --git a/src/tower/tower_api_client/api/default/update_catalog.py b/src/tower/tower_api_client/api/default/update_catalog.py index 97698867..e0f76737 100644 --- a/src/tower/tower_api_client/api/default/update_catalog.py +++ b/src/tower/tower_api_client/api/default/update_catalog.py @@ -11,7 +11,7 @@ def _get_kwargs( - slug: str, + name: str, *, body: UpdateCatalogParams, ) -> dict[str, Any]: @@ -19,8 +19,8 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": "/catalogs/{slug}".format( - slug=slug, + "url": "/catalogs/{name}".format( + name=name, ), } @@ -58,7 +58,7 @@ def _build_response( def sync_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, body: UpdateCatalogParams, @@ -68,7 +68,7 @@ def sync_detailed( Update a new catalog object in the currently authenticated account. Args: - slug (str): The slug of the catalog to update. + name (str): The name of the catalog to update. body (UpdateCatalogParams): Raises: @@ -80,7 +80,7 @@ def sync_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, body=body, ) @@ -92,7 +92,7 @@ def sync_detailed( def sync( - slug: str, + name: str, *, client: AuthenticatedClient, body: UpdateCatalogParams, @@ -102,7 +102,7 @@ def sync( Update a new catalog object in the currently authenticated account. Args: - slug (str): The slug of the catalog to update. + name (str): The name of the catalog to update. body (UpdateCatalogParams): Raises: @@ -114,14 +114,14 @@ def sync( """ return sync_detailed( - slug=slug, + name=name, client=client, body=body, ).parsed async def asyncio_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, body: UpdateCatalogParams, @@ -131,7 +131,7 @@ async def asyncio_detailed( Update a new catalog object in the currently authenticated account. Args: - slug (str): The slug of the catalog to update. + name (str): The name of the catalog to update. body (UpdateCatalogParams): Raises: @@ -143,7 +143,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, body=body, ) @@ -153,7 +153,7 @@ async def asyncio_detailed( async def asyncio( - slug: str, + name: str, *, client: AuthenticatedClient, body: UpdateCatalogParams, @@ -163,7 +163,7 @@ async def asyncio( Update a new catalog object in the currently authenticated account. Args: - slug (str): The slug of the catalog to update. + name (str): The name of the catalog to update. body (UpdateCatalogParams): Raises: @@ -176,7 +176,7 @@ async def asyncio( return ( await asyncio_detailed( - slug=slug, + name=name, client=client, body=body, ) diff --git a/src/tower/tower_api_client/api/default/update_schedule.py b/src/tower/tower_api_client/api/default/update_schedule.py new file mode 100644 index 00000000..00ca07a6 --- /dev/null +++ b/src/tower/tower_api_client/api/default/update_schedule.py @@ -0,0 +1,183 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.update_schedule_params import UpdateScheduleParams +from ...models.update_schedule_response import UpdateScheduleResponse +from ...types import Response + + +def _get_kwargs( + id: str, + *, + body: UpdateScheduleParams, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/schedules/{id}".format( + id=id, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[UpdateScheduleResponse]: + if response.status_code == 200: + response_200 = UpdateScheduleResponse.from_dict(response.json()) + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[UpdateScheduleResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + id: str, + *, + client: AuthenticatedClient, + body: UpdateScheduleParams, +) -> Response[UpdateScheduleResponse]: + """Update schedule + + Update an existing schedule for an app. + + Args: + id (str): The ID of the schedule to update. + body (UpdateScheduleParams): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[UpdateScheduleResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + id: str, + *, + client: AuthenticatedClient, + body: UpdateScheduleParams, +) -> Optional[UpdateScheduleResponse]: + """Update schedule + + Update an existing schedule for an app. + + Args: + id (str): The ID of the schedule to update. + body (UpdateScheduleParams): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + UpdateScheduleResponse + """ + + return sync_detailed( + id=id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, + body: UpdateScheduleParams, +) -> Response[UpdateScheduleResponse]: + """Update schedule + + Update an existing schedule for an app. + + Args: + id (str): The ID of the schedule to update. + body (UpdateScheduleParams): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[UpdateScheduleResponse] + """ + + kwargs = _get_kwargs( + id=id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, + body: UpdateScheduleParams, +) -> Optional[UpdateScheduleResponse]: + """Update schedule + + Update an existing schedule for an app. + + Args: + id (str): The ID of the schedule to update. + body (UpdateScheduleParams): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + UpdateScheduleResponse + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/src/tower/tower_api_client/models/__init__.py b/src/tower/tower_api_client/models/__init__.py index 55a12836..cc2ba641 100644 --- a/src/tower/tower_api_client/models/__init__.py +++ b/src/tower/tower_api_client/models/__init__.py @@ -33,6 +33,8 @@ from .create_device_login_ticket_response import CreateDeviceLoginTicketResponse from .create_password_reset_params import CreatePasswordResetParams from .create_password_reset_response import CreatePasswordResetResponse +from .create_schedule_params import CreateScheduleParams +from .create_schedule_response import CreateScheduleResponse from .create_secret_params import CreateSecretParams from .create_secret_response import CreateSecretResponse from .create_session_params import CreateSessionParams @@ -45,6 +47,7 @@ from .delete_authenticator_params import DeleteAuthenticatorParams from .delete_authenticator_response import DeleteAuthenticatorResponse from .delete_catalog_response import DeleteCatalogResponse +from .delete_schedule_response import DeleteScheduleResponse from .delete_secret_response import DeleteSecretResponse from .delete_team_invitation_params import DeleteTeamInvitationParams from .delete_team_invitation_response import DeleteTeamInvitationResponse @@ -73,6 +76,7 @@ from .generate_authenticator_response import GenerateAuthenticatorResponse from .generate_run_statistics_response import GenerateRunStatisticsResponse from .generate_run_statistics_status_item import GenerateRunStatisticsStatusItem +from .generate_runner_credentials_response import GenerateRunnerCredentialsResponse from .invite_team_member_params import InviteTeamMemberParams from .invite_team_member_response import InviteTeamMemberResponse from .leave_team_response import LeaveTeamResponse @@ -88,6 +92,7 @@ from .list_my_team_invitations_response import ListMyTeamInvitationsResponse from .list_runs_response import ListRunsResponse from .list_runs_status_item import ListRunsStatusItem +from .list_schedules_response import ListSchedulesResponse from .list_secret_environments_response import ListSecretEnvironmentsResponse from .list_secrets_response import ListSecretsResponse from .list_team_invitations_response import ListTeamInvitationsResponse @@ -115,6 +120,8 @@ from .run_status import RunStatus from .run_status_group import RunStatusGroup from .run_timeseries_point import RunTimeseriesPoint +from .runner_credentials import RunnerCredentials +from .schedule import Schedule from .search_runs_response import SearchRunsResponse from .search_runs_status_item import SearchRunsStatusItem from .secret import Secret @@ -136,6 +143,8 @@ from .update_my_team_invitation_response import UpdateMyTeamInvitationResponse from .update_password_reset_params import UpdatePasswordResetParams from .update_password_reset_response import UpdatePasswordResetResponse +from .update_schedule_params import UpdateScheduleParams +from .update_schedule_response import UpdateScheduleResponse from .update_secret_params import UpdateSecretParams from .update_secret_response import UpdateSecretResponse from .update_team_params import UpdateTeamParams @@ -179,6 +188,8 @@ "CreateDeviceLoginTicketResponse", "CreatePasswordResetParams", "CreatePasswordResetResponse", + "CreateScheduleParams", + "CreateScheduleResponse", "CreateSecretParams", "CreateSecretResponse", "CreateSessionParams", @@ -191,6 +202,7 @@ "DeleteAuthenticatorParams", "DeleteAuthenticatorResponse", "DeleteCatalogResponse", + "DeleteScheduleResponse", "DeleteSecretResponse", "DeleteTeamInvitationParams", "DeleteTeamInvitationResponse", @@ -217,6 +229,7 @@ "FeaturebaseIdentity", "GenerateAppStatisticsResponse", "GenerateAuthenticatorResponse", + "GenerateRunnerCredentialsResponse", "GenerateRunStatisticsResponse", "GenerateRunStatisticsStatusItem", "InviteTeamMemberParams", @@ -234,6 +247,7 @@ "ListMyTeamInvitationsResponse", "ListRunsResponse", "ListRunsStatusItem", + "ListSchedulesResponse", "ListSecretEnvironmentsResponse", "ListSecretsResponse", "ListTeamInvitationsResponse", @@ -255,12 +269,14 @@ "RunAppResponse", "RunFailureAlert", "RunLogLine", + "RunnerCredentials", "RunParameter", "RunResults", "RunStatistics", "RunStatus", "RunStatusGroup", "RunTimeseriesPoint", + "Schedule", "SearchRunsResponse", "SearchRunsStatusItem", "Secret", @@ -282,6 +298,8 @@ "UpdateMyTeamInvitationResponse", "UpdatePasswordResetParams", "UpdatePasswordResetResponse", + "UpdateScheduleParams", + "UpdateScheduleResponse", "UpdateSecretParams", "UpdateSecretResponse", "UpdateTeamParams", diff --git a/src/tower/tower_api_client/models/app.py b/src/tower/tower_api_client/models/app.py index 6c2240f3..227e2fdc 100644 --- a/src/tower/tower_api_client/models/app.py +++ b/src/tower/tower_api_client/models/app.py @@ -29,10 +29,10 @@ class App: owner (str): The account slug that owns this app schedule (Union[None, str]): The schedule associated with this app, null if none. short_description (str): A short description of the app. Can be empty. - slug (str): The unique slug of the app. version (Union[None, str]): The current version of this app, null if none. last_run (Union[Unset, Run]): run_results (Union[Unset, RunResults]): + slug (Union[Unset, str]): The name of the app presented as a slug to support legacy CLI clients status (Union[Unset, AppStatus]): The status of the app """ @@ -43,10 +43,10 @@ class App: owner: str schedule: Union[None, str] short_description: str - slug: str version: Union[None, str] last_run: Union[Unset, "Run"] = UNSET run_results: Union[Unset, "RunResults"] = UNSET + slug: Union[Unset, str] = UNSET status: Union[Unset, AppStatus] = UNSET def to_dict(self) -> dict[str, Any]: @@ -69,8 +69,6 @@ def to_dict(self) -> dict[str, Any]: short_description = self.short_description - slug = self.slug - version: Union[None, str] version = self.version @@ -82,6 +80,8 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.run_results, Unset): run_results = self.run_results.to_dict() + slug = self.slug + status: Union[Unset, str] = UNSET if not isinstance(self.status, Unset): status = self.status.value @@ -96,7 +96,6 @@ def to_dict(self) -> dict[str, Any]: "owner": owner, "schedule": schedule, "short_description": short_description, - "slug": slug, "version": version, } ) @@ -104,6 +103,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["last_run"] = last_run if run_results is not UNSET: field_dict["run_results"] = run_results + if slug is not UNSET: + field_dict["slug"] = slug if status is not UNSET: field_dict["status"] = status @@ -147,8 +148,6 @@ def _parse_schedule(data: object) -> Union[None, str]: short_description = d.pop("short_description") - slug = d.pop("slug") - def _parse_version(data: object) -> Union[None, str]: if data is None: return data @@ -170,6 +169,8 @@ def _parse_version(data: object) -> Union[None, str]: else: run_results = RunResults.from_dict(_run_results) + slug = d.pop("slug", UNSET) + _status = d.pop("status", UNSET) status: Union[Unset, AppStatus] if isinstance(_status, Unset): @@ -185,10 +186,10 @@ def _parse_version(data: object) -> Union[None, str]: owner=owner, schedule=schedule, short_description=short_description, - slug=slug, version=version, last_run=last_run, run_results=run_results, + slug=slug, status=status, ) diff --git a/src/tower/tower_api_client/models/catalog.py b/src/tower/tower_api_client/models/catalog.py index e75bdf13..d366be4b 100644 --- a/src/tower/tower_api_client/models/catalog.py +++ b/src/tower/tower_api_client/models/catalog.py @@ -1,10 +1,12 @@ import datetime from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar, Union from attrs import define as _attrs_define from dateutil.parser import isoparse +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.catalog_property import CatalogProperty @@ -20,16 +22,16 @@ class Catalog: environment (str): name (str): properties (list['CatalogProperty']): - slug (str): type_ (str): + slug (Union[Unset, str]): This property is deprecated. Please use name instead. """ created_at: datetime.datetime environment: str name: str properties: list["CatalogProperty"] - slug: str type_: str + slug: Union[Unset, str] = UNSET def to_dict(self) -> dict[str, Any]: created_at = self.created_at.isoformat() @@ -43,10 +45,10 @@ def to_dict(self) -> dict[str, Any]: properties_item = properties_item_data.to_dict() properties.append(properties_item) - slug = self.slug - type_ = self.type_ + slug = self.slug + field_dict: dict[str, Any] = {} field_dict.update( { @@ -54,10 +56,11 @@ def to_dict(self) -> dict[str, Any]: "environment": environment, "name": name, "properties": properties, - "slug": slug, "type": type_, } ) + if slug is not UNSET: + field_dict["slug"] = slug return field_dict @@ -79,17 +82,17 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: properties.append(properties_item) - slug = d.pop("slug") - type_ = d.pop("type") + slug = d.pop("slug", UNSET) + catalog = cls( created_at=created_at, environment=environment, name=name, properties=properties, - slug=slug, type_=type_, + slug=slug, ) return catalog diff --git a/src/tower/tower_api_client/models/create_app_params.py b/src/tower/tower_api_client/models/create_app_params.py index c37e8fcd..6f54a0f9 100644 --- a/src/tower/tower_api_client/models/create_app_params.py +++ b/src/tower/tower_api_client/models/create_app_params.py @@ -16,7 +16,7 @@ class CreateAppParams: schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example: https://api.tower.dev/v1/schemas/CreateAppParams.json. short_description (Union[Unset, str]): A description of the app. - slug (Union[Unset, str]): A slug for the app. + slug (Union[Unset, str]): The slug of the app. Legacy CLI will send it but we don't need it. """ name: str diff --git a/src/tower/tower_api_client/models/create_catalog_params.py b/src/tower/tower_api_client/models/create_catalog_params.py index 2df3e349..b70c4653 100644 --- a/src/tower/tower_api_client/models/create_catalog_params.py +++ b/src/tower/tower_api_client/models/create_catalog_params.py @@ -20,7 +20,6 @@ class CreateCatalogParams: environment (str): name (str): properties (list['EncryptedCatalogProperty']): - slug (str): type_ (CreateCatalogParamsType): schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example: https://api.tower.dev/v1/schemas/CreateCatalogParams.json. @@ -29,7 +28,6 @@ class CreateCatalogParams: environment: str name: str properties: list["EncryptedCatalogProperty"] - slug: str type_: CreateCatalogParamsType schema: Union[Unset, str] = UNSET @@ -43,8 +41,6 @@ def to_dict(self) -> dict[str, Any]: properties_item = properties_item_data.to_dict() properties.append(properties_item) - slug = self.slug - type_ = self.type_.value schema = self.schema @@ -55,7 +51,6 @@ def to_dict(self) -> dict[str, Any]: "environment": environment, "name": name, "properties": properties, - "slug": slug, "type": type_, } ) @@ -80,8 +75,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: properties.append(properties_item) - slug = d.pop("slug") - type_ = CreateCatalogParamsType(d.pop("type")) schema = d.pop("$schema", UNSET) @@ -90,7 +83,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: environment=environment, name=name, properties=properties, - slug=slug, type_=type_, schema=schema, ) diff --git a/src/tower/tower_api_client/models/create_schedule_params.py b/src/tower/tower_api_client/models/create_schedule_params.py new file mode 100644 index 00000000..19992456 --- /dev/null +++ b/src/tower/tower_api_client/models/create_schedule_params.py @@ -0,0 +1,114 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.run_parameter import RunParameter + + +T = TypeVar("T", bound="CreateScheduleParams") + + +@_attrs_define +class CreateScheduleParams: + """ + Attributes: + app_name (str): The name of the app to create a schedule for + cron_string (str): The cron expression defining when the app should run + schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example: + https://api.tower.dev/v1/schemas/CreateScheduleParams.json. + app_version (Union[None, Unset, str]): The specific app version to run (if omitted, will use the app's default + version) + environment (Union[Unset, str]): The environment to run the app in Default: 'default'. + parameters (Union[Unset, list['RunParameter']]): Parameters to pass when running the app + """ + + app_name: str + cron_string: str + schema: Union[Unset, str] = UNSET + app_version: Union[None, Unset, str] = UNSET + environment: Union[Unset, str] = "default" + parameters: Union[Unset, list["RunParameter"]] = UNSET + + def to_dict(self) -> dict[str, Any]: + app_name = self.app_name + + cron_string = self.cron_string + + schema = self.schema + + app_version: Union[None, Unset, str] + if isinstance(self.app_version, Unset): + app_version = UNSET + else: + app_version = self.app_version + + environment = self.environment + + parameters: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.parameters, Unset): + parameters = [] + for parameters_item_data in self.parameters: + parameters_item = parameters_item_data.to_dict() + parameters.append(parameters_item) + + field_dict: dict[str, Any] = {} + field_dict.update( + { + "app_name": app_name, + "cron_string": cron_string, + } + ) + if schema is not UNSET: + field_dict["$schema"] = schema + if app_version is not UNSET: + field_dict["app_version"] = app_version + if environment is not UNSET: + field_dict["environment"] = environment + if parameters is not UNSET: + field_dict["parameters"] = parameters + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.run_parameter import RunParameter + + d = dict(src_dict) + app_name = d.pop("app_name") + + cron_string = d.pop("cron_string") + + schema = d.pop("$schema", UNSET) + + def _parse_app_version(data: object) -> Union[None, Unset, str]: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(Union[None, Unset, str], data) + + app_version = _parse_app_version(d.pop("app_version", UNSET)) + + environment = d.pop("environment", UNSET) + + parameters = [] + _parameters = d.pop("parameters", UNSET) + for parameters_item_data in _parameters or []: + parameters_item = RunParameter.from_dict(parameters_item_data) + + parameters.append(parameters_item) + + create_schedule_params = cls( + app_name=app_name, + cron_string=cron_string, + schema=schema, + app_version=app_version, + environment=environment, + parameters=parameters, + ) + + return create_schedule_params diff --git a/src/tower/tower_api_client/models/create_schedule_response.py b/src/tower/tower_api_client/models/create_schedule_response.py new file mode 100644 index 00000000..5e53c2dc --- /dev/null +++ b/src/tower/tower_api_client/models/create_schedule_response.py @@ -0,0 +1,57 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.schedule import Schedule + + +T = TypeVar("T", bound="CreateScheduleResponse") + + +@_attrs_define +class CreateScheduleResponse: + """ + Attributes: + schedule (Schedule): + schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example: + https://api.tower.dev/v1/schemas/CreateScheduleResponse.json. + """ + + schedule: "Schedule" + schema: Union[Unset, str] = UNSET + + def to_dict(self) -> dict[str, Any]: + schedule = self.schedule.to_dict() + + schema = self.schema + + field_dict: dict[str, Any] = {} + field_dict.update( + { + "schedule": schedule, + } + ) + if schema is not UNSET: + field_dict["$schema"] = schema + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.schedule import Schedule + + d = dict(src_dict) + schedule = Schedule.from_dict(d.pop("schedule")) + + schema = d.pop("$schema", UNSET) + + create_schedule_response = cls( + schedule=schedule, + schema=schema, + ) + + return create_schedule_response diff --git a/src/tower/tower_api_client/models/delete_schedule_response.py b/src/tower/tower_api_client/models/delete_schedule_response.py new file mode 100644 index 00000000..5da8741f --- /dev/null +++ b/src/tower/tower_api_client/models/delete_schedule_response.py @@ -0,0 +1,51 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeleteScheduleResponse") + + +@_attrs_define +class DeleteScheduleResponse: + """ + Attributes: + id (str): The ID of the deleted schedule. + schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example: + https://api.tower.dev/v1/schemas/DeleteScheduleResponse.json. + """ + + id: str + schema: Union[Unset, str] = UNSET + + def to_dict(self) -> dict[str, Any]: + id = self.id + + schema = self.schema + + field_dict: dict[str, Any] = {} + field_dict.update( + { + "id": id, + } + ) + if schema is not UNSET: + field_dict["$schema"] = schema + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id") + + schema = d.pop("$schema", UNSET) + + delete_schedule_response = cls( + id=id, + schema=schema, + ) + + return delete_schedule_response diff --git a/src/tower/tower_api_client/models/exported_catalog.py b/src/tower/tower_api_client/models/exported_catalog.py index 79dedf88..183a169a 100644 --- a/src/tower/tower_api_client/models/exported_catalog.py +++ b/src/tower/tower_api_client/models/exported_catalog.py @@ -1,10 +1,12 @@ import datetime from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar, Union from attrs import define as _attrs_define from dateutil.parser import isoparse +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.exported_catalog_property import ExportedCatalogProperty @@ -20,16 +22,16 @@ class ExportedCatalog: environment (str): name (str): properties (list['ExportedCatalogProperty']): - slug (str): type_ (str): + slug (Union[Unset, str]): This property is deprecated. Please use name instead. """ created_at: datetime.datetime environment: str name: str properties: list["ExportedCatalogProperty"] - slug: str type_: str + slug: Union[Unset, str] = UNSET def to_dict(self) -> dict[str, Any]: created_at = self.created_at.isoformat() @@ -43,10 +45,10 @@ def to_dict(self) -> dict[str, Any]: properties_item = properties_item_data.to_dict() properties.append(properties_item) - slug = self.slug - type_ = self.type_ + slug = self.slug + field_dict: dict[str, Any] = {} field_dict.update( { @@ -54,10 +56,11 @@ def to_dict(self) -> dict[str, Any]: "environment": environment, "name": name, "properties": properties, - "slug": slug, "type": type_, } ) + if slug is not UNSET: + field_dict["slug"] = slug return field_dict @@ -79,17 +82,17 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: properties.append(properties_item) - slug = d.pop("slug") - type_ = d.pop("type") + slug = d.pop("slug", UNSET) + exported_catalog = cls( created_at=created_at, environment=environment, name=name, properties=properties, - slug=slug, type_=type_, + slug=slug, ) return exported_catalog diff --git a/src/tower/tower_api_client/models/generate_runner_credentials_response.py b/src/tower/tower_api_client/models/generate_runner_credentials_response.py new file mode 100644 index 00000000..928b6cd6 --- /dev/null +++ b/src/tower/tower_api_client/models/generate_runner_credentials_response.py @@ -0,0 +1,57 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.runner_credentials import RunnerCredentials + + +T = TypeVar("T", bound="GenerateRunnerCredentialsResponse") + + +@_attrs_define +class GenerateRunnerCredentialsResponse: + """ + Attributes: + credentials (RunnerCredentials): + schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example: + https://api.tower.dev/v1/schemas/GenerateRunnerCredentialsResponse.json. + """ + + credentials: "RunnerCredentials" + schema: Union[Unset, str] = UNSET + + def to_dict(self) -> dict[str, Any]: + credentials = self.credentials.to_dict() + + schema = self.schema + + field_dict: dict[str, Any] = {} + field_dict.update( + { + "credentials": credentials, + } + ) + if schema is not UNSET: + field_dict["$schema"] = schema + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.runner_credentials import RunnerCredentials + + d = dict(src_dict) + credentials = RunnerCredentials.from_dict(d.pop("credentials")) + + schema = d.pop("$schema", UNSET) + + generate_runner_credentials_response = cls( + credentials=credentials, + schema=schema, + ) + + return generate_runner_credentials_response diff --git a/src/tower/tower_api_client/models/list_schedules_response.py b/src/tower/tower_api_client/models/list_schedules_response.py new file mode 100644 index 00000000..93d717f5 --- /dev/null +++ b/src/tower/tower_api_client/models/list_schedules_response.py @@ -0,0 +1,75 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.pagination import Pagination + from ..models.schedule import Schedule + + +T = TypeVar("T", bound="ListSchedulesResponse") + + +@_attrs_define +class ListSchedulesResponse: + """ + Attributes: + pages (Pagination): + schedules (list['Schedule']): + schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example: + https://api.tower.dev/v1/schemas/ListSchedulesResponse.json. + """ + + pages: "Pagination" + schedules: list["Schedule"] + schema: Union[Unset, str] = UNSET + + def to_dict(self) -> dict[str, Any]: + pages = self.pages.to_dict() + + schedules = [] + for schedules_item_data in self.schedules: + schedules_item = schedules_item_data.to_dict() + schedules.append(schedules_item) + + schema = self.schema + + field_dict: dict[str, Any] = {} + field_dict.update( + { + "pages": pages, + "schedules": schedules, + } + ) + if schema is not UNSET: + field_dict["$schema"] = schema + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.pagination import Pagination + from ..models.schedule import Schedule + + d = dict(src_dict) + pages = Pagination.from_dict(d.pop("pages")) + + schedules = [] + _schedules = d.pop("schedules") + for schedules_item_data in _schedules: + schedules_item = Schedule.from_dict(schedules_item_data) + + schedules.append(schedules_item) + + schema = d.pop("$schema", UNSET) + + list_schedules_response = cls( + pages=pages, + schedules=schedules, + schema=schema, + ) + + return list_schedules_response diff --git a/src/tower/tower_api_client/models/run.py b/src/tower/tower_api_client/models/run.py index d23ceeda..d779387f 100644 --- a/src/tower/tower_api_client/models/run.py +++ b/src/tower/tower_api_client/models/run.py @@ -7,6 +7,7 @@ from ..models.run_status import RunStatus from ..models.run_status_group import RunStatusGroup +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.run_parameter import RunParameter @@ -20,7 +21,6 @@ class Run: """ Attributes: app_name (str): - app_slug (str): app_version (str): cancelled_at (Union[None, datetime.datetime]): created_at (datetime.datetime): @@ -34,10 +34,10 @@ class Run: started_at (Union[None, datetime.datetime]): status (RunStatus): status_group (RunStatusGroup): + app_slug (Union[Unset, str]): The app name presented as app_slug to support legacy CLI clients """ app_name: str - app_slug: str app_version: str cancelled_at: Union[None, datetime.datetime] created_at: datetime.datetime @@ -51,12 +51,11 @@ class Run: started_at: Union[None, datetime.datetime] status: RunStatus status_group: RunStatusGroup + app_slug: Union[Unset, str] = UNSET def to_dict(self) -> dict[str, Any]: app_name = self.app_name - app_slug = self.app_slug - app_version = self.app_version cancelled_at: Union[None, str] @@ -99,11 +98,12 @@ def to_dict(self) -> dict[str, Any]: status_group = self.status_group.value + app_slug = self.app_slug + field_dict: dict[str, Any] = {} field_dict.update( { "app_name": app_name, - "app_slug": app_slug, "app_version": app_version, "cancelled_at": cancelled_at, "created_at": created_at, @@ -119,6 +119,8 @@ def to_dict(self) -> dict[str, Any]: "status_group": status_group, } ) + if app_slug is not UNSET: + field_dict["app_slug"] = app_slug return field_dict @@ -129,8 +131,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) app_name = d.pop("app_name") - app_slug = d.pop("app_slug") - app_version = d.pop("app_version") def _parse_cancelled_at(data: object) -> Union[None, datetime.datetime]: @@ -206,9 +206,10 @@ def _parse_started_at(data: object) -> Union[None, datetime.datetime]: status_group = RunStatusGroup(d.pop("status_group")) + app_slug = d.pop("app_slug", UNSET) + run = cls( app_name=app_name, - app_slug=app_slug, app_version=app_version, cancelled_at=cancelled_at, created_at=created_at, @@ -222,6 +223,7 @@ def _parse_started_at(data: object) -> Union[None, datetime.datetime]: started_at=started_at, status=status, status_group=status_group, + app_slug=app_slug, ) return run diff --git a/src/tower/tower_api_client/models/runner_credentials.py b/src/tower/tower_api_client/models/runner_credentials.py new file mode 100644 index 00000000..f99ae433 --- /dev/null +++ b/src/tower/tower_api_client/models/runner_credentials.py @@ -0,0 +1,71 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union, cast + +from attrs import define as _attrs_define + +T = TypeVar("T", bound="RunnerCredentials") + + +@_attrs_define +class RunnerCredentials: + """ + Attributes: + certificate (str): The signed certificate used by the runner to authenticate itself to Tower. + private_key (str): The private key used by the runner to authenticate itself to Tower. + root_ca (Union[None, str]): The PEM encoded root CA certificate that is used to verify the runner's certificate + when Tower is responsible for signing server certs. + runner_service_url (str): The host of the runner service that this runner will connect to. This is typically the + Tower service host. + """ + + certificate: str + private_key: str + root_ca: Union[None, str] + runner_service_url: str + + def to_dict(self) -> dict[str, Any]: + certificate = self.certificate + + private_key = self.private_key + + root_ca: Union[None, str] + root_ca = self.root_ca + + runner_service_url = self.runner_service_url + + field_dict: dict[str, Any] = {} + field_dict.update( + { + "certificate": certificate, + "private_key": private_key, + "root_ca": root_ca, + "runner_service_url": runner_service_url, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + certificate = d.pop("certificate") + + private_key = d.pop("private_key") + + def _parse_root_ca(data: object) -> Union[None, str]: + if data is None: + return data + return cast(Union[None, str], data) + + root_ca = _parse_root_ca(d.pop("root_ca")) + + runner_service_url = d.pop("runner_service_url") + + runner_credentials = cls( + certificate=certificate, + private_key=private_key, + root_ca=root_ca, + runner_service_url=runner_service_url, + ) + + return runner_credentials diff --git a/src/tower/tower_api_client/models/schedule.py b/src/tower/tower_api_client/models/schedule.py new file mode 100644 index 00000000..0be0f015 --- /dev/null +++ b/src/tower/tower_api_client/models/schedule.py @@ -0,0 +1,99 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.run_parameter import RunParameter + + +T = TypeVar("T", bound="Schedule") + + +@_attrs_define +class Schedule: + """ + Attributes: + app_name (str): The name of the app that will be executed + cron (str): The cron expression defining when the app should run + environment (str): The environment to run the app in + id (str): The unique identifier for the schedule + app_version (Union[Unset, str]): The specific app version to run, or null for the default version + parameters (Union[Unset, list['RunParameter']]): The parameters to pass when running the app + """ + + app_name: str + cron: str + environment: str + id: str + app_version: Union[Unset, str] = UNSET + parameters: Union[Unset, list["RunParameter"]] = UNSET + + def to_dict(self) -> dict[str, Any]: + app_name = self.app_name + + cron = self.cron + + environment = self.environment + + id = self.id + + app_version = self.app_version + + parameters: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.parameters, Unset): + parameters = [] + for parameters_item_data in self.parameters: + parameters_item = parameters_item_data.to_dict() + parameters.append(parameters_item) + + field_dict: dict[str, Any] = {} + field_dict.update( + { + "app_name": app_name, + "cron": cron, + "environment": environment, + "id": id, + } + ) + if app_version is not UNSET: + field_dict["app_version"] = app_version + if parameters is not UNSET: + field_dict["parameters"] = parameters + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.run_parameter import RunParameter + + d = dict(src_dict) + app_name = d.pop("app_name") + + cron = d.pop("cron") + + environment = d.pop("environment") + + id = d.pop("id") + + app_version = d.pop("app_version", UNSET) + + parameters = [] + _parameters = d.pop("parameters", UNSET) + for parameters_item_data in _parameters or []: + parameters_item = RunParameter.from_dict(parameters_item_data) + + parameters.append(parameters_item) + + schedule = cls( + app_name=app_name, + cron=cron, + environment=environment, + id=id, + app_version=app_version, + parameters=parameters, + ) + + return schedule diff --git a/src/tower/tower_api_client/models/update_catalog_params.py b/src/tower/tower_api_client/models/update_catalog_params.py index ede84c92..a313c0f7 100644 --- a/src/tower/tower_api_client/models/update_catalog_params.py +++ b/src/tower/tower_api_client/models/update_catalog_params.py @@ -17,22 +17,18 @@ class UpdateCatalogParams: """ Attributes: environment (str): New environment for the catalog - name (str): New name for the catalog properties (list['EncryptedCatalogProperty']): schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example: https://api.tower.dev/v1/schemas/UpdateCatalogParams.json. """ environment: str - name: str properties: list["EncryptedCatalogProperty"] schema: Union[Unset, str] = UNSET def to_dict(self) -> dict[str, Any]: environment = self.environment - name = self.name - properties = [] for properties_item_data in self.properties: properties_item = properties_item_data.to_dict() @@ -44,7 +40,6 @@ def to_dict(self) -> dict[str, Any]: field_dict.update( { "environment": environment, - "name": name, "properties": properties, } ) @@ -60,8 +55,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) environment = d.pop("environment") - name = d.pop("name") - properties = [] _properties = d.pop("properties") for properties_item_data in _properties: @@ -73,7 +66,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: update_catalog_params = cls( environment=environment, - name=name, properties=properties, schema=schema, ) diff --git a/src/tower/tower_api_client/models/update_schedule_params.py b/src/tower/tower_api_client/models/update_schedule_params.py new file mode 100644 index 00000000..85da8fb4 --- /dev/null +++ b/src/tower/tower_api_client/models/update_schedule_params.py @@ -0,0 +1,124 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.run_parameter import RunParameter + + +T = TypeVar("T", bound="UpdateScheduleParams") + + +@_attrs_define +class UpdateScheduleParams: + """ + Attributes: + schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example: + https://api.tower.dev/v1/schemas/UpdateScheduleParams.json. + app_name (Union[None, Unset, str]): The name of the app that this schedule runs + app_version (Union[None, Unset, str]): The specific app version to run (if omitted, will use the app's default + version) + cron (Union[Unset, str]): The cron expression defining when the app should run + environment (Union[Unset, str]): The environment to run the app in + parameters (Union[Unset, list['RunParameter']]): Parameters to pass when running the app + """ + + schema: Union[Unset, str] = UNSET + app_name: Union[None, Unset, str] = UNSET + app_version: Union[None, Unset, str] = UNSET + cron: Union[Unset, str] = UNSET + environment: Union[Unset, str] = UNSET + parameters: Union[Unset, list["RunParameter"]] = UNSET + + def to_dict(self) -> dict[str, Any]: + schema = self.schema + + app_name: Union[None, Unset, str] + if isinstance(self.app_name, Unset): + app_name = UNSET + else: + app_name = self.app_name + + app_version: Union[None, Unset, str] + if isinstance(self.app_version, Unset): + app_version = UNSET + else: + app_version = self.app_version + + cron = self.cron + + environment = self.environment + + parameters: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.parameters, Unset): + parameters = [] + for parameters_item_data in self.parameters: + parameters_item = parameters_item_data.to_dict() + parameters.append(parameters_item) + + field_dict: dict[str, Any] = {} + field_dict.update({}) + if schema is not UNSET: + field_dict["$schema"] = schema + if app_name is not UNSET: + field_dict["app_name"] = app_name + if app_version is not UNSET: + field_dict["app_version"] = app_version + if cron is not UNSET: + field_dict["cron"] = cron + if environment is not UNSET: + field_dict["environment"] = environment + if parameters is not UNSET: + field_dict["parameters"] = parameters + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.run_parameter import RunParameter + + d = dict(src_dict) + schema = d.pop("$schema", UNSET) + + def _parse_app_name(data: object) -> Union[None, Unset, str]: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(Union[None, Unset, str], data) + + app_name = _parse_app_name(d.pop("app_name", UNSET)) + + def _parse_app_version(data: object) -> Union[None, Unset, str]: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(Union[None, Unset, str], data) + + app_version = _parse_app_version(d.pop("app_version", UNSET)) + + cron = d.pop("cron", UNSET) + + environment = d.pop("environment", UNSET) + + parameters = [] + _parameters = d.pop("parameters", UNSET) + for parameters_item_data in _parameters or []: + parameters_item = RunParameter.from_dict(parameters_item_data) + + parameters.append(parameters_item) + + update_schedule_params = cls( + schema=schema, + app_name=app_name, + app_version=app_version, + cron=cron, + environment=environment, + parameters=parameters, + ) + + return update_schedule_params diff --git a/src/tower/tower_api_client/models/update_schedule_response.py b/src/tower/tower_api_client/models/update_schedule_response.py new file mode 100644 index 00000000..94e8496a --- /dev/null +++ b/src/tower/tower_api_client/models/update_schedule_response.py @@ -0,0 +1,57 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.schedule import Schedule + + +T = TypeVar("T", bound="UpdateScheduleResponse") + + +@_attrs_define +class UpdateScheduleResponse: + """ + Attributes: + schedule (Schedule): + schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example: + https://api.tower.dev/v1/schemas/UpdateScheduleResponse.json. + """ + + schedule: "Schedule" + schema: Union[Unset, str] = UNSET + + def to_dict(self) -> dict[str, Any]: + schedule = self.schedule.to_dict() + + schema = self.schema + + field_dict: dict[str, Any] = {} + field_dict.update( + { + "schedule": schedule, + } + ) + if schema is not UNSET: + field_dict["$schema"] = schema + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.schedule import Schedule + + d = dict(src_dict) + schedule = Schedule.from_dict(d.pop("schedule")) + + schema = d.pop("$schema", UNSET) + + update_schedule_response = cls( + schedule=schedule, + schema=schema, + ) + + return update_schedule_response From 7205cfdeb602ae2565a365600c7eada0c1d175d8 Mon Sep 17 00:00:00 2001 From: Brad Heller Date: Fri, 18 Jul 2025 15:21:22 +0200 Subject: [PATCH 2/3] chore: Purge app slugs from everything --- crates/tower-cmd/src/api.rs | 20 +++++++-------- crates/tower-cmd/src/apps.rs | 42 ++++++++++++------------------- crates/tower-cmd/src/util/apps.rs | 12 ++++----- 3 files changed, 32 insertions(+), 42 deletions(-) diff --git a/crates/tower-cmd/src/api.rs b/crates/tower-cmd/src/api.rs index 9bed6be2..3263cf1e 100644 --- a/crates/tower-cmd/src/api.rs +++ b/crates/tower-cmd/src/api.rs @@ -14,11 +14,11 @@ pub trait ResponseEntity { fn extract_data(self) -> Option; } -pub async fn describe_app(config: &Config, slug: &str) -> Result> { +pub async fn describe_app(config: &Config, name: &str) -> Result> { let api_config = &config.into(); let params = tower_api::apis::default_api::DescribeAppParams { - slug: slug.to_string(), + name: name.to_string(), runs: None, start_at: None, end_at: None, @@ -43,47 +43,47 @@ pub async fn list_apps(config: &Config) -> Result Result> { +pub async fn create_app(config: &Config, name: &str, description: &str) -> Result> { let api_config = &config.into(); let params = tower_api::apis::default_api::CreateAppParams { create_app_params: tower_api::models::CreateAppParams{ name: name.to_string(), - slug: Some(slug.to_string()), short_description: Some(description.to_string()), schema: None, + slug: None, }, }; unwrap_api_response(tower_api::apis::default_api::create_app(api_config, params)).await } -pub async fn delete_app(config: &Config, slug: &str) -> Result> { +pub async fn delete_app(config: &Config, name: &str) -> Result> { let api_config = &config.into(); let params = tower_api::apis::default_api::DeleteAppParams { - slug: slug.to_string(), + name: name.to_string(), }; unwrap_api_response(tower_api::apis::default_api::delete_app(api_config, params)).await } -pub async fn describe_run_logs(config: &Config, slug: &str, seq: i64) -> Result> { +pub async fn describe_run_logs(config: &Config, name: &str, seq: i64) -> Result> { let api_config = &config.into(); let params = tower_api::apis::default_api::DescribeRunLogsParams { - slug: slug.to_string(), + name: name.to_string(), seq, }; unwrap_api_response(tower_api::apis::default_api::describe_run_logs(api_config, params)).await } -pub async fn run_app(config: &Config, slug: &str, env: &str, params: HashMap) -> Result> { +pub async fn run_app(config: &Config, name: &str, env: &str, params: HashMap) -> Result> { let api_config = &config.into(); let params = tower_api::apis::default_api::RunAppParams { - slug: slug.to_string(), + name: name.to_string(), run_app_params: tower_api::models::RunAppParams { schema: None, environment: env.to_string(), diff --git a/crates/tower-cmd/src/apps.rs b/crates/tower-cmd/src/apps.rs index bf2de986..5a8ae0b7 100644 --- a/crates/tower-cmd/src/apps.rs +++ b/crates/tower-cmd/src/apps.rs @@ -34,14 +34,6 @@ pub fn apps_cmd() -> Command { .required(true) .action(clap::ArgAction::Set), ) - .arg( - Arg::new("slug") - .short('s') - .long("slug") - .value_parser(value_parser!(String)) - .default_value("") - .action(clap::ArgAction::Set), - ) .arg( Arg::new("description") .long("description") @@ -59,9 +51,9 @@ pub fn apps_cmd() -> Command { } pub async fn do_logs(config: Config, cmd: &ArgMatches) { - let (slug, seq) = extract_app_slug_and_run("logs", cmd.subcommand()); + let (name, seq) = extract_app_name_and_run("logs", cmd.subcommand()); - if let Ok(resp) = api::describe_run_logs(&config, &slug, seq).await { + if let Ok(resp) = api::describe_run_logs(&config, &name, seq).await { for line in resp.log_lines { output::log_line(&line.timestamp, &line.message, output::LogLineType::Remote); } @@ -69,9 +61,9 @@ pub async fn do_logs(config: Config, cmd: &ArgMatches) { } pub async fn do_show(config: Config, cmd: &ArgMatches) { - let slug = extract_app_slug("show", cmd.subcommand()); + let name = extract_app_name("show", cmd.subcommand()); - match api::describe_app(&config, &slug).await { + match api::describe_app(&config, &name).await { Ok(app_response) => { let app = app_response.app; let runs = app_response.runs; @@ -190,12 +182,10 @@ pub async fn do_create(config: Config, args: &ArgMatches) { output::die("App name (--name) is required"); }); - let slug = args.get_one::("slug").unwrap(); - let description = args.get_one::("description").unwrap(); let mut spinner = output::spinner("Creating app"); - if let Err(err) = api::create_app(&config, name, slug, description).await { + if let Err(err) = api::create_app(&config, name, description).await { spinner.failure(); output::tower_error(err); } else { @@ -206,10 +196,10 @@ pub async fn do_create(config: Config, args: &ArgMatches) { } pub async fn do_delete(config: Config, cmd: &ArgMatches) { - let slug = extract_app_slug("delete", cmd.subcommand()); + let name = extract_app_name("delete", cmd.subcommand()); let mut spinner = output::spinner("Deleting app"); - if let Err(err) = api::delete_app(&config, &slug).await { + if let Err(err) = api::delete_app(&config, &name).await { spinner.failure(); output::tower_error(err); } else { @@ -218,11 +208,11 @@ pub async fn do_delete(config: Config, cmd: &ArgMatches) { } /// Extract app name and run number from command -fn extract_app_slug_and_run(subcmd: &str, cmd: Option<(&str, &ArgMatches)>) -> (String, i64) { - if let Some((slug, _)) = cmd { - if let Some((slug, num)) = slug.split_once('#') { +fn extract_app_name_and_run(subcmd: &str, cmd: Option<(&str, &ArgMatches)>) -> (String, i64) { + if let Some((name, _)) = cmd { + if let Some((name, num)) = name.split_once('#') { return ( - slug.to_string(), + name.to_string(), num.parse::().unwrap_or_else(|_| { output::die("Run number must be an actual number"); }), @@ -232,15 +222,15 @@ fn extract_app_slug_and_run(subcmd: &str, cmd: Option<(&str, &ArgMatches)>) -> ( let line = format!("Run number is required. Example: tower apps {} #", subcmd); output::die(&line); } - let line = format!("App slug is required. Example: tower apps {} #", subcmd); + let line = format!("App name is required. Example: tower apps {} #", subcmd); output::die(&line) } -fn extract_app_slug(subcmd: &str, cmd: Option<(&str, &ArgMatches)>) -> String { - if let Some((slug, _)) = cmd { - return slug.to_string(); +fn extract_app_name(subcmd: &str, cmd: Option<(&str, &ArgMatches)>) -> String { + if let Some((name, _)) = cmd { + return name.to_string(); } - let line = format!("App slug is required. Example: tower apps {} ", subcmd); + let line = format!("App name is required. Example: tower apps {} ", subcmd); output::die(&line); } diff --git a/crates/tower-cmd/src/util/apps.rs b/crates/tower-cmd/src/util/apps.rs index c0f3330b..21d0e6c7 100644 --- a/crates/tower-cmd/src/util/apps.rs +++ b/crates/tower-cmd/src/util/apps.rs @@ -9,14 +9,14 @@ use tower_api::models::CreateAppParams as CreateAppParamsModel; pub async fn ensure_app_exists( api_config: &Configuration, - app_slug: &str, + app_name: &str, description: &str, ) -> Result<(), tower_api::apis::Error> { // Try to describe the app first let describe_result = default_api::describe_app( api_config, DescribeAppParams { - slug: app_slug.to_string(), + name: app_name.to_string(), runs: None, start_at: None, end_at: None, @@ -52,7 +52,7 @@ pub async fn ensure_app_exists( let create_app = prompt_default( format!( "App '{}' does not exist. Would you like to create it?", - app_slug + app_name ), false, ) @@ -69,9 +69,9 @@ pub async fn ensure_app_exists( CreateAppParams { create_app_params: CreateAppParamsModel { schema: None, - name: app_slug.to_string(), - slug: Some(app_slug.to_string()), + name: app_name.to_string(), short_description: Some(description.to_string()), + slug: None, }, }, ) @@ -79,7 +79,7 @@ pub async fn ensure_app_exists( match create_result { Ok(_) => { - output::success(&format!("Created app '{}'", app_slug)); + output::success(&format!("Created app '{}'", app_name)); Ok(()) } Err(create_err) => { From 911dacd12ae5d1a22f21c41194c28c16952b3aa1 Mon Sep 17 00:00:00 2001 From: Brad Heller Date: Tue, 22 Jul 2025 10:15:20 +0200 Subject: [PATCH 3/3] chore: Updated clients for Tower API --- crates/config/src/error.rs | 4 +- crates/config/src/lib.rs | 6 +- crates/config/src/session.rs | 3 - crates/tower-api/README.md | 24 ++--- crates/tower-api/src/apis/configuration.rs | 2 +- crates/tower-api/src/apis/default_api.rs | 84 ++++++++--------- .../src/models/accept_invitation_params.rs | 2 +- .../src/models/accept_invitation_response.rs | 2 +- crates/tower-api/src/models/account.rs | 11 +-- .../src/models/acknowledge_alert_response.rs | 2 +- .../models/acknowledge_all_alerts_response.rs | 2 +- crates/tower-api/src/models/alert.rs | 2 +- crates/tower-api/src/models/api_key.rs | 2 +- crates/tower-api/src/models/app.rs | 4 +- 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_authenticator_params.rs | 2 +- .../models/create_authenticator_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 | 2 +- .../models/create_password_reset_response.rs | 2 +- .../src/models/create_schedule_params.rs | 2 +- .../src/models/create_schedule_response.rs | 2 +- .../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 | 8 +- .../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_authenticator_params.rs | 2 +- .../models/delete_authenticator_response.rs | 2 +- .../src/models/delete_catalog_response.rs | 2 +- .../src/models/delete_schedule_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 | 12 +-- .../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 +- .../src/models/featurebase_identity.rs | 2 +- .../generate_app_statistics_response.rs | 2 +- .../models/generate_authenticator_response.rs | 2 +- .../generate_run_statistics_response.rs | 2 +- .../generate_runner_credentials_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 | 2 +- .../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 +- .../models/list_authenticators_response.rs | 2 +- .../src/models/list_catalogs_response.rs | 2 +- .../list_my_team_invitations_response.rs | 2 +- .../src/models/list_runs_response.rs | 2 +- .../src/models/list_schedules_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 | 8 +- 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 | 4 +- 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 | 2 +- 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 +- .../src/models/run_timeseries_point.rs | 2 +- .../src/models/runner_credentials.rs | 2 +- crates/tower-api/src/models/schedule.rs | 2 +- .../src/models/search_runs_response.rs | 2 +- crates/tower-api/src/models/secret.rs | 2 +- crates/tower-api/src/models/session.rs | 2 +- crates/tower-api/src/models/sse_warning.rs | 2 +- .../src/models/statistics_settings.rs | 2 +- .../stream_alerts_200_response_inner.rs | 2 +- .../stream_run_logs_200_response_inner.rs | 2 +- crates/tower-api/src/models/team.rs | 11 +-- .../tower-api/src/models/team_invitation.rs | 2 +- crates/tower-api/src/models/token.rs | 2 +- .../src/models/unverified_authenticator.rs | 2 +- .../src/models/update_account_name_params.rs | 32 +++++++ .../models/update_account_name_response.rs | 31 +++++++ .../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 | 12 +-- .../update_my_team_invitation_response.rs | 2 +- .../models/update_password_reset_params.rs | 2 +- .../models/update_password_reset_response.rs | 2 +- .../src/models/update_schedule_params.rs | 2 +- .../src/models/update_schedule_response.rs | 2 +- .../src/models/update_secret_params.rs | 2 +- .../src/models/update_secret_response.rs | 2 +- .../src/models/update_team_params.rs | 10 +-- .../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 +- .../src/models/verified_authenticator.rs | 2 +- crates/tower-cmd/src/output.rs | 4 +- crates/tower-cmd/src/teams.rs | 47 +++------- src/tower/_client.py | 22 ++--- .../api/default/delete_team_invitation.py | 30 +++---- .../api/default/invite_team_member.py | 30 +++---- .../api/default/leave_team.py | 30 +++---- .../api/default/list_team_invitations.py | 30 +++---- .../api/default/list_team_members.py | 30 +++---- .../api/default/remove_team_member.py | 30 +++---- .../api/default/resend_team_invitation.py | 30 +++---- ...account_slug.py => update_account_name.py} | 90 +++++++++---------- .../api/default/update_team.py | 38 ++++---- src/tower/tower_api_client/models/__init__.py | 8 +- src/tower/tower_api_client/models/account.py | 13 +-- src/tower/tower_api_client/models/app.py | 2 +- .../models/create_team_params.py | 8 -- .../models/delete_team_params.py | 12 +-- src/tower/tower_api_client/models/run.py | 2 +- src/tower/tower_api_client/models/team.py | 17 ++-- ...arams.py => update_account_name_params.py} | 22 ++--- ...nse.py => update_account_name_response.py} | 10 +-- .../update_my_team_invitation_params.py | 12 +-- .../models/update_team_params.py | 19 +--- tests/tower/test_client.py | 5 -- 174 files changed, 541 insertions(+), 532 deletions(-) create mode 100644 crates/tower-api/src/models/update_account_name_params.rs create mode 100644 crates/tower-api/src/models/update_account_name_response.rs rename src/tower/tower_api_client/api/default/{update_account_slug.py => update_account_name.py} (64%) rename src/tower/tower_api_client/models/{update_account_slug_params.py => update_account_name_params.py} (64%) rename src/tower/tower_api_client/models/{update_account_slug_response.py => update_account_name_response.py} (82%) diff --git a/crates/config/src/error.rs b/crates/config/src/error.rs index 3f4479dd..fd276531 100644 --- a/crates/config/src/error.rs +++ b/crates/config/src/error.rs @@ -21,8 +21,8 @@ pub enum Error { #[snafu(display("Missing required app field `{}` in Towerfile", field))] MissingRequiredAppField { field: String }, - #[snafu(display("Team with slug {} not found!", team_slug))] - TeamNotFound { team_slug: String }, + #[snafu(display("Team with name {} not found!", team_name))] + TeamNotFound { team_name: String }, #[snafu(display("Unknown describe session value: {}", value))] UnknownDescribeSessionValue { value: serde_json::Value }, diff --git a/crates/config/src/lib.rs b/crates/config/src/lib.rs index ce6d5d3b..29848012 100644 --- a/crates/config/src/lib.rs +++ b/crates/config/src/lib.rs @@ -129,7 +129,7 @@ impl Config { } /// Sets the active team in the session by team slug and saves it - pub fn set_active_team_by_slug(&self, team_slug: &str) -> Result<(), Error> { + pub fn set_active_team_by_name(&self, name: &str) -> Result<(), Error> { // Get the current session let mut session = Session::from_config_dir()?; @@ -137,10 +137,10 @@ impl Config { let team = session .teams .iter() - .find(|team| team.slug == team_slug) + .find(|team| team.name == name) .cloned() .ok_or(Error::TeamNotFound { - team_slug: team_slug.to_string(), + team_name: name.to_string(), })?; // Set the active team diff --git a/crates/config/src/session.rs b/crates/config/src/session.rs index ca4203fd..2fddd910 100644 --- a/crates/config/src/session.rs +++ b/crates/config/src/session.rs @@ -30,7 +30,6 @@ pub struct Token { #[derive(Clone, Serialize, Deserialize, Debug)] pub struct Team { - pub slug: String, pub name: String, pub token: Token, pub team_type: String, @@ -189,7 +188,6 @@ impl Session { .teams .iter() .map(|team_api| Team { - slug: team_api.slug.clone(), name: team_api.name.clone(), token: if let Some(token) = &team_api.token { Token { @@ -232,7 +230,6 @@ impl Session { .teams .iter() .map(|t| Team { - slug: t.slug.clone(), name: t.name.clone(), team_type: t.r#type.clone(), token: Token { diff --git a/crates/tower-api/README.md b/crates/tower-api/README.md index e2b3364c..a59a4f34 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.6.22 +- API version: v0.6.24 - Package version: 1.0.0 - Generator version: 7.13.0 - Build package: `org.openapitools.codegen.languages.RustClientCodegen` @@ -51,7 +51,7 @@ Class | Method | HTTP request | Description *DefaultApi* | [**delete_schedule**](docs/DefaultApi.md#delete_schedule) | **DELETE** /schedules/{id} | Delete schedule *DefaultApi* | [**delete_secret**](docs/DefaultApi.md#delete_secret) | **DELETE** /secrets/{name} | Delete secret *DefaultApi* | [**delete_team**](docs/DefaultApi.md#delete_team) | **DELETE** /teams | Delete team -*DefaultApi* | [**delete_team_invitation**](docs/DefaultApi.md#delete_team_invitation) | **DELETE** /teams/{slug}/invites | Delete team invitation +*DefaultApi* | [**delete_team_invitation**](docs/DefaultApi.md#delete_team_invitation) | **DELETE** /teams/{name}/invites | Delete team invitation *DefaultApi* | [**deploy_app**](docs/DefaultApi.md#deploy_app) | **POST** /apps/{name}/deploy | Deploy app *DefaultApi* | [**describe_app**](docs/DefaultApi.md#describe_app) | **GET** /apps/{name} | Describe app *DefaultApi* | [**describe_app_version**](docs/DefaultApi.md#describe_app_version) | **GET** /apps/{name}/versions/{num} | Describe app version @@ -66,8 +66,8 @@ Class | Method | HTTP request | Description *DefaultApi* | [**generate_authenticator**](docs/DefaultApi.md#generate_authenticator) | **POST** /accounts/authenticator/generate | Generate authenticator *DefaultApi* | [**generate_run_statistics**](docs/DefaultApi.md#generate_run_statistics) | **GET** /stats/runs | Generate run statistics *DefaultApi* | [**generate_runner_credentials**](docs/DefaultApi.md#generate_runner_credentials) | **POST** /runners/credentials | Generate runner credentials -*DefaultApi* | [**invite_team_member**](docs/DefaultApi.md#invite_team_member) | **POST** /teams/{slug}/invites | Invite team member -*DefaultApi* | [**leave_team**](docs/DefaultApi.md#leave_team) | **POST** /teams/{slug}/leave | Leave team +*DefaultApi* | [**invite_team_member**](docs/DefaultApi.md#invite_team_member) | **POST** /teams/{name}/invites | Invite team member +*DefaultApi* | [**leave_team**](docs/DefaultApi.md#leave_team) | **POST** /teams/{name}/leave | Leave team *DefaultApi* | [**list_alerts**](docs/DefaultApi.md#list_alerts) | **GET** /alerts | List alerts *DefaultApi* | [**list_api_keys**](docs/DefaultApi.md#list_api_keys) | **GET** /api-keys | List API keys *DefaultApi* | [**list_app_environments**](docs/DefaultApi.md#list_app_environments) | **GET** /apps/{name}/environments | List app environments @@ -80,24 +80,24 @@ Class | Method | HTTP request | Description *DefaultApi* | [**list_schedules**](docs/DefaultApi.md#list_schedules) | **GET** /schedules | List schedules *DefaultApi* | [**list_secret_environments**](docs/DefaultApi.md#list_secret_environments) | **GET** /secrets/environments | List secret environments *DefaultApi* | [**list_secrets**](docs/DefaultApi.md#list_secrets) | **GET** /secrets | List secrets -*DefaultApi* | [**list_team_invitations**](docs/DefaultApi.md#list_team_invitations) | **GET** /teams/{slug}/invites | List team invitations -*DefaultApi* | [**list_team_members**](docs/DefaultApi.md#list_team_members) | **GET** /teams/{slug}/members | List team members +*DefaultApi* | [**list_team_invitations**](docs/DefaultApi.md#list_team_invitations) | **GET** /teams/{name}/invites | List team invitations +*DefaultApi* | [**list_team_members**](docs/DefaultApi.md#list_team_members) | **GET** /teams/{name}/members | List team members *DefaultApi* | [**list_teams**](docs/DefaultApi.md#list_teams) | **GET** /teams | List teams *DefaultApi* | [**refresh_session**](docs/DefaultApi.md#refresh_session) | **POST** /session/refresh | Refresh session -*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* | [**remove_team_member**](docs/DefaultApi.md#remove_team_member) | **DELETE** /teams/{name}/members | Remove team member +*DefaultApi* | [**resend_team_invitation**](docs/DefaultApi.md#resend_team_invitation) | **POST** /teams/{name}/invites/resend | Resend team invitation *DefaultApi* | [**run_app**](docs/DefaultApi.md#run_app) | **POST** /apps/{name}/runs | Run app *DefaultApi* | [**search_runs**](docs/DefaultApi.md#search_runs) | **GET** /runs | Search runs *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/{name}/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_account_name**](docs/DefaultApi.md#update_account_name) | **PUT** /accounts/{name} | Update account name *DefaultApi* | [**update_app**](docs/DefaultApi.md#update_app) | **PUT** /apps/{name} | Update app *DefaultApi* | [**update_catalog**](docs/DefaultApi.md#update_catalog) | **PUT** /catalogs/{name} | 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_schedule**](docs/DefaultApi.md#update_schedule) | **PUT** /schedules/{id} | Update schedule *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_team**](docs/DefaultApi.md#update_team) | **PUT** /teams/{name} | Update team *DefaultApi* | [**update_user**](docs/DefaultApi.md#update_user) | **PUT** /user | Update user profile @@ -226,8 +226,8 @@ Class | Method | HTTP request | Description - [TeamInvitation](docs/TeamInvitation.md) - [Token](docs/Token.md) - [UnverifiedAuthenticator](docs/UnverifiedAuthenticator.md) - - [UpdateAccountSlugParams](docs/UpdateAccountSlugParams.md) - - [UpdateAccountSlugResponse](docs/UpdateAccountSlugResponse.md) + - [UpdateAccountNameParams](docs/UpdateAccountNameParams.md) + - [UpdateAccountNameResponse](docs/UpdateAccountNameResponse.md) - [UpdateAppParams](docs/UpdateAppParams.md) - [UpdateAppResponse](docs/UpdateAppResponse.md) - [UpdateCatalogParams](docs/UpdateCatalogParams.md) diff --git a/crates/tower-api/src/apis/configuration.rs b/crates/tower-api/src/apis/configuration.rs index d7c1bc0e..45b100ab 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 a34a36b7..3feb8ece 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.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -164,8 +164,8 @@ pub struct DeleteTeamParams { /// struct for passing parameters to the method [`delete_team_invitation`] #[derive(Clone, Debug)] pub struct DeleteTeamInvitationParams { - /// The slug of the team to remove someone from - pub slug: String, + /// The name of the team to remove someone from + pub name: String, pub delete_team_invitation_params: models::DeleteTeamInvitationParams } @@ -262,16 +262,16 @@ pub struct GenerateRunStatisticsParams { /// struct for passing parameters to the method [`invite_team_member`] #[derive(Clone, Debug)] pub struct InviteTeamMemberParams { - /// The slug of the team to invite someone to - pub slug: String, + /// The name of the team to invite someone to + pub name: String, pub invite_team_member_params: models::InviteTeamMemberParams } /// struct for passing parameters to the method [`leave_team`] #[derive(Clone, Debug)] pub struct LeaveTeamParams { - /// The slug of the team to leave - pub slug: String + /// The name of the team to leave + pub name: String } /// struct for passing parameters to the method [`list_alerts`] @@ -377,15 +377,15 @@ pub struct ListSecretsParams { /// struct for passing parameters to the method [`list_team_invitations`] #[derive(Clone, Debug)] pub struct ListTeamInvitationsParams { - /// The slug of the team to list members for - pub slug: String + /// The name of the team to list members for + pub name: String } /// struct for passing parameters to the method [`list_team_members`] #[derive(Clone, Debug)] pub struct ListTeamMembersParams { - /// The slug of the team to list members for - pub slug: String + /// The name of the team to list members for + pub name: String } /// struct for passing parameters to the method [`refresh_session`] @@ -397,16 +397,16 @@ pub struct RefreshSessionParams { /// struct for passing parameters to the method [`remove_team_member`] #[derive(Clone, Debug)] pub struct RemoveTeamMemberParams { - /// The slug of the team to remove someone from - pub slug: String, + /// The name of the team to remove someone from + pub name: String, pub remove_team_member_params: models::RemoveTeamMemberParams } /// struct for passing parameters to the method [`resend_team_invitation`] #[derive(Clone, Debug)] pub struct ResendTeamInvitationParams { - /// The slug of the team to invite someone to - pub slug: String, + /// The name of the team to invite someone to + pub name: String, pub resend_team_invitation_params: models::ResendTeamInvitationParams } @@ -442,12 +442,12 @@ pub struct StreamRunLogsParams { pub seq: i64 } -/// struct for passing parameters to the method [`update_account_slug`] +/// struct for passing parameters to the method [`update_account_name`] #[derive(Clone, Debug)] -pub struct UpdateAccountSlugParams { - /// The slug of the account to update - pub slug: String, - pub update_account_slug_params: models::UpdateAccountSlugParams +pub struct UpdateAccountNameParams { + /// The name of the account to update + pub name: String, + pub update_account_name_params: models::UpdateAccountNameParams } /// struct for passing parameters to the method [`update_app`] @@ -498,8 +498,8 @@ pub struct UpdateSecretParams { /// struct for passing parameters to the method [`update_team`] #[derive(Clone, Debug)] pub struct UpdateTeamParams { - /// The slug of the team to update - pub slug: String, + /// The name of the team to update + pub name: String, pub update_team_params: models::UpdateTeamParams } @@ -1015,11 +1015,11 @@ pub enum StreamRunLogsSuccess { UnknownValue(serde_json::Value), } -/// struct for typed successes of method [`update_account_slug`] +/// struct for typed successes of method [`update_account_name`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum UpdateAccountSlugSuccess { - Status200(models::UpdateAccountSlugResponse), +pub enum UpdateAccountNameSuccess { + Status200(models::UpdateAccountNameResponse), UnknownValue(serde_json::Value), } @@ -1594,10 +1594,10 @@ pub enum StreamRunLogsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`update_account_slug`] +/// struct for typed errors of method [`update_account_name`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum UpdateAccountSlugError { +pub enum UpdateAccountNameError { DefaultResponse(models::ErrorModel), UnknownValue(serde_json::Value), } @@ -2517,7 +2517,7 @@ pub async fn delete_team(configuration: &configuration::Configuration, params: D /// Delete a pending team invitation that you have previously sent pub async fn delete_team_invitation(configuration: &configuration::Configuration, params: DeleteTeamInvitationParams) -> Result, Error> { - let uri_str = format!("{}/teams/{slug}/invites", configuration.base_path, slug=crate::apis::urlencode(params.slug)); + let uri_str = format!("{}/teams/{name}/invites", configuration.base_path, name=crate::apis::urlencode(params.name)); let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -3087,7 +3087,7 @@ pub async fn generate_runner_credentials(configuration: &configuration::Configur /// Invite a new team pub async fn invite_team_member(configuration: &configuration::Configuration, params: InviteTeamMemberParams) -> Result, Error> { - let uri_str = format!("{}/teams/{slug}/invites", configuration.base_path, slug=crate::apis::urlencode(params.slug)); + let uri_str = format!("{}/teams/{name}/invites", configuration.base_path, name=crate::apis::urlencode(params.name)); let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -3123,7 +3123,7 @@ pub async fn invite_team_member(configuration: &configuration::Configuration, pa /// Remove yourself from a team, if that's something you'd like to do for whatever reason. If you're the last member of a team, you cannot remove yourself. You should delete the team instead. pub async fn leave_team(configuration: &configuration::Configuration, params: LeaveTeamParams) -> Result, Error> { - let uri_str = format!("{}/teams/{slug}/leave", configuration.base_path, slug=crate::apis::urlencode(params.slug)); + let uri_str = format!("{}/teams/{name}/leave", configuration.base_path, name=crate::apis::urlencode(params.name)); let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -3670,7 +3670,7 @@ pub async fn list_secrets(configuration: &configuration::Configuration, params: /// List the pending invitations for a team pub async fn list_team_invitations(configuration: &configuration::Configuration, params: ListTeamInvitationsParams) -> Result, Error> { - let uri_str = format!("{}/teams/{slug}/invites", configuration.base_path, slug=crate::apis::urlencode(params.slug)); + let uri_str = format!("{}/teams/{name}/invites", configuration.base_path, name=crate::apis::urlencode(params.name)); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -3705,7 +3705,7 @@ pub async fn list_team_invitations(configuration: &configuration::Configuration, /// List the members of a team pub async fn list_team_members(configuration: &configuration::Configuration, params: ListTeamMembersParams) -> Result, Error> { - let uri_str = format!("{}/teams/{slug}/members", configuration.base_path, slug=crate::apis::urlencode(params.slug)); + let uri_str = format!("{}/teams/{name}/members", configuration.base_path, name=crate::apis::urlencode(params.name)); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -3811,7 +3811,7 @@ pub async fn refresh_session(configuration: &configuration::Configuration, param /// Remove a new team pub async fn remove_team_member(configuration: &configuration::Configuration, params: RemoveTeamMemberParams) -> Result, Error> { - let uri_str = format!("{}/teams/{slug}/members", configuration.base_path, slug=crate::apis::urlencode(params.slug)); + let uri_str = format!("{}/teams/{name}/members", configuration.base_path, name=crate::apis::urlencode(params.name)); let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -3847,7 +3847,7 @@ pub async fn remove_team_member(configuration: &configuration::Configuration, pa /// Resend a team invitation to a user if they need a reminder or if they lost it pub async fn resend_team_invitation(configuration: &configuration::Configuration, params: ResendTeamInvitationParams) -> Result, Error> { - let uri_str = format!("{}/teams/{slug}/invites/resend", configuration.base_path, slug=crate::apis::urlencode(params.slug)); + let uri_str = format!("{}/teams/{name}/invites/resend", configuration.base_path, name=crate::apis::urlencode(params.name)); let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -4047,10 +4047,10 @@ pub async fn stream_run_logs(configuration: &configuration::Configuration, param } } -/// Update the slug for an account -pub async fn update_account_slug(configuration: &configuration::Configuration, params: UpdateAccountSlugParams) -> Result, Error> { +/// Update the name for an account +pub async fn update_account_name(configuration: &configuration::Configuration, params: UpdateAccountNameParams) -> Result, Error> { - let uri_str = format!("{}/accounts/{slug}", configuration.base_path, slug=crate::apis::urlencode(params.slug)); + let uri_str = format!("{}/accounts/{name}", configuration.base_path, name=crate::apis::urlencode(params.name)); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -4059,7 +4059,7 @@ pub async fn update_account_slug(configuration: &configuration::Configuration, p if let Some(ref token) = configuration.bearer_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(¶ms.update_account_slug_params); + req_builder = req_builder.json(¶ms.update_account_name_params); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -4074,11 +4074,11 @@ pub async fn update_account_slug(configuration: &configuration::Configuration, p if !status.is_client_error() && !status.is_server_error() { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + 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(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { tower_trace_id, status, content, entity })) } } @@ -4296,10 +4296,10 @@ pub async fn update_secret(configuration: &configuration::Configuration, params: } } -/// Update a team with a new name or slug. Note that updating the team with a new slug will cause all your URLs to change! +/// Update a team with a new name or name. Note that updating the team with a new name will cause all your URLs to change! pub async fn update_team(configuration: &configuration::Configuration, params: UpdateTeamParams) -> Result, Error> { - let uri_str = format!("{}/teams/{slug}", configuration.base_path, slug=crate::apis::urlencode(params.slug)); + let uri_str = format!("{}/teams/{name}", configuration.base_path, name=crate::apis::urlencode(params.name)); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { diff --git a/crates/tower-api/src/models/accept_invitation_params.rs b/crates/tower-api/src/models/accept_invitation_params.rs index 78b26042..5857c33d 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 26d66356..bf931c70 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 bf3474a8..21e47197 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.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -15,15 +15,16 @@ use serde::{Deserialize, Serialize}; pub struct Account { #[serde(rename = "name")] pub name: String, - #[serde(rename = "slug")] - pub slug: String, + /// This property is deprecated. Please use name instead. + #[serde(rename = "slug", skip_serializing_if = "Option::is_none")] + pub slug: Option, } impl Account { - pub fn new(name: String, slug: String) -> Account { + pub fn new(name: String) -> Account { Account { name, - slug, + slug: None, } } } diff --git a/crates/tower-api/src/models/acknowledge_alert_response.rs b/crates/tower-api/src/models/acknowledge_alert_response.rs index 1d886e56..0b5d010c 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.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/acknowledge_all_alerts_response.rs b/crates/tower-api/src/models/acknowledge_all_alerts_response.rs index 7e5e87f7..5d933afd 100644 --- a/crates/tower-api/src/models/acknowledge_all_alerts_response.rs +++ b/crates/tower-api/src/models/acknowledge_all_alerts_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 6a979a2c..54d4adc8 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.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/api_key.rs b/crates/tower-api/src/models/api_key.rs index 9bc9600f..865a8c21 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 d37982e3..f083ee66 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.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -40,7 +40,7 @@ pub struct App { /// A short description of the app. Can be empty. #[serde(rename = "short_description")] pub short_description: String, - /// The name of the app presented as a slug to support legacy CLI clients + /// This property is deprecated. Please use name instead. #[serde(rename = "slug", skip_serializing_if = "Option::is_none")] pub slug: Option, /// The status of the app diff --git a/crates/tower-api/src/models/app_statistics.rs b/crates/tower-api/src/models/app_statistics.rs index ee43a6a7..afed4963 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 29db4a59..2e668277 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 9915e02a..7f07a7d8 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 c9f1bdd4..1e150433 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 10791ff4..d6333426 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 2973a376..4b0dd4cb 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 49b25cc1..23cca6a5 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 92b7b6f6..3c3d2e61 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 96dc71b1..3d7d2194 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 da936c10..4fa9e105 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 8df2f550..b883b7fd 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 01a8c10d..8c75b66f 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 b969e3fd..4e99c580 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 5d1f9f46..08d370eb 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 242d6fb5..e2b02249 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.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_authenticator_params.rs b/crates/tower-api/src/models/create_authenticator_params.rs index 6a577294..9d08f255 100644 --- a/crates/tower-api/src/models/create_authenticator_params.rs +++ b/crates/tower-api/src/models/create_authenticator_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_authenticator_response.rs b/crates/tower-api/src/models/create_authenticator_response.rs index d2fd9ac4..60feed4a 100644 --- a/crates/tower-api/src/models/create_authenticator_response.rs +++ b/crates/tower-api/src/models/create_authenticator_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 d14de8df..bc244d04 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 70e39eaf..53dd0c52 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 c5b1d4a0..ef434875 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 index 27d7bf92..88e0289c 100644 --- a/crates/tower-api/src/models/create_password_reset_params.rs +++ b/crates/tower-api/src/models/create_password_reset_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_password_reset_response.rs b/crates/tower-api/src/models/create_password_reset_response.rs index 1cf3e695..4e25cc8e 100644 --- a/crates/tower-api/src/models/create_password_reset_response.rs +++ b/crates/tower-api/src/models/create_password_reset_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_schedule_params.rs b/crates/tower-api/src/models/create_schedule_params.rs index 4136693a..7c0866be 100644 --- a/crates/tower-api/src/models/create_schedule_params.rs +++ b/crates/tower-api/src/models/create_schedule_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_schedule_response.rs b/crates/tower-api/src/models/create_schedule_response.rs index 476a8596..2077e916 100644 --- a/crates/tower-api/src/models/create_schedule_response.rs +++ b/crates/tower-api/src/models/create_schedule_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_secret_params.rs b/crates/tower-api/src/models/create_secret_params.rs index 28e970c3..15b5f885 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 1a5be82a..2fa5ce9a 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 70714fab..f141cfc4 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 4d40dc80..e7d37695 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 e514234c..1ec83581 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.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -19,17 +19,13 @@ pub struct CreateTeamParams { /// The name of the team to create #[serde(rename = "name")] pub name: String, - /// The slug of the team to create - #[serde(rename = "slug")] - pub slug: String, } impl CreateTeamParams { - pub fn new(name: String, slug: String) -> CreateTeamParams { + pub fn new(name: String) -> CreateTeamParams { CreateTeamParams { schema: None, name, - slug, } } } diff --git a/crates/tower-api/src/models/create_team_response.rs b/crates/tower-api/src/models/create_team_response.rs index 4f02eaf7..560f8681 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 38d36263..e31065d5 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 95dea344..eac3b2ed 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 007dfb4d..d5d89c7f 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.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/delete_authenticator_params.rs b/crates/tower-api/src/models/delete_authenticator_params.rs index bafc4aba..95d82a48 100644 --- a/crates/tower-api/src/models/delete_authenticator_params.rs +++ b/crates/tower-api/src/models/delete_authenticator_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/delete_authenticator_response.rs b/crates/tower-api/src/models/delete_authenticator_response.rs index 07047339..71cc947d 100644 --- a/crates/tower-api/src/models/delete_authenticator_response.rs +++ b/crates/tower-api/src/models/delete_authenticator_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 c6861ec7..e5f5f15d 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.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/delete_schedule_response.rs b/crates/tower-api/src/models/delete_schedule_response.rs index e9ac3156..5bc84960 100644 --- a/crates/tower-api/src/models/delete_schedule_response.rs +++ b/crates/tower-api/src/models/delete_schedule_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 6ed88241..2de5d0fd 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 e2165299..9900fb2e 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 299bb722..679f9496 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 6626d3df..f551ff9c 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.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -16,16 +16,16 @@ pub struct DeleteTeamParams { /// A URL to the JSON Schema for this object. #[serde(rename = "$schema", skip_serializing_if = "Option::is_none")] pub schema: Option, - /// The slug of the team to delete - #[serde(rename = "slug")] - pub slug: String, + /// The name of the team to delete + #[serde(rename = "name")] + pub name: String, } impl DeleteTeamParams { - pub fn new(slug: String) -> DeleteTeamParams { + pub fn new(name: String) -> DeleteTeamParams { DeleteTeamParams { schema: None, - slug, + name, } } } diff --git a/crates/tower-api/src/models/delete_team_response.rs b/crates/tower-api/src/models/delete_team_response.rs index 695a3522..65cf9b78 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 71212d3a..3b902b9b 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 cc5bf0f9..8a5f7019 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 f98c24b3..22226b04 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 72316863..ac62e574 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 c9ca5556..cf50dfd6 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 fa8c4467..d4757410 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 25096800..b7e4dd80 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 4d3a6d78..32059fa1 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 bc56670e..05bf2401 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 03dcd708..82246d0e 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 54fbacaa..550a5ab1 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 50e95e66..6fd5d6db 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 cc1cc457..5ce0c191 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 9ed4bb93..202d4da7 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 15f029d5..5845f1e4 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 e4e9d18f..a760a3df 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 b203ad47..d97157a9 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 4c9c50d1..f67eae27 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.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/featurebase_identity.rs b/crates/tower-api/src/models/featurebase_identity.rs index 2142ae84..55075941 100644 --- a/crates/tower-api/src/models/featurebase_identity.rs +++ b/crates/tower-api/src/models/featurebase_identity.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 b8482bde..f610c10b 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.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/generate_authenticator_response.rs b/crates/tower-api/src/models/generate_authenticator_response.rs index 13bcd7f5..4d6dcc50 100644 --- a/crates/tower-api/src/models/generate_authenticator_response.rs +++ b/crates/tower-api/src/models/generate_authenticator_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 2b248957..a564800d 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.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/generate_runner_credentials_response.rs b/crates/tower-api/src/models/generate_runner_credentials_response.rs index e45d5d02..2f6eb2fb 100644 --- a/crates/tower-api/src/models/generate_runner_credentials_response.rs +++ b/crates/tower-api/src/models/generate_runner_credentials_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 6c3c562d..dcb0dd38 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 41d8a70e..5a6d1ce1 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 26c7a86d..abc5e67f 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 index 007ec9bb..9628e891 100644 --- a/crates/tower-api/src/models/list_alerts_200_response.rs +++ b/crates/tower-api/src/models/list_alerts_200_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/list_alerts_response.rs b/crates/tower-api/src/models/list_alerts_response.rs index 72cdc1af..bbbb140b 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 d0a6422c..6e920370 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 defa801d..19806ed7 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 02801c1e..aa6c7efc 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 64612df8..39517049 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.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/list_authenticators_response.rs b/crates/tower-api/src/models/list_authenticators_response.rs index bb727e35..ab6cdfbb 100644 --- a/crates/tower-api/src/models/list_authenticators_response.rs +++ b/crates/tower-api/src/models/list_authenticators_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 9deaad65..86647c30 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 738ad2cf..f17dc63a 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 6ce51b5a..f27bfeec 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.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/list_schedules_response.rs b/crates/tower-api/src/models/list_schedules_response.rs index b7ef93e5..26ec075d 100644 --- a/crates/tower-api/src/models/list_schedules_response.rs +++ b/crates/tower-api/src/models/list_schedules_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 d23ac961..251645f2 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 b85f754f..841586dc 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 5caef4a9..ae9d565b 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 0252ea6d..a6d81e15 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 454fe547..7fabb0b8 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 592dbec9..d172a21f 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 d129d5ce..e503a5db 100644 --- a/crates/tower-api/src/models/mod.rs +++ b/crates/tower-api/src/models/mod.rs @@ -244,10 +244,10 @@ pub mod token; pub use self::token::Token; pub mod unverified_authenticator; pub use self::unverified_authenticator::UnverifiedAuthenticator; -pub mod update_account_slug_params; -pub use self::update_account_slug_params::UpdateAccountSlugParams; -pub mod update_account_slug_response; -pub use self::update_account_slug_response::UpdateAccountSlugResponse; +pub mod update_account_name_params; +pub use self::update_account_name_params::UpdateAccountNameParams; +pub mod update_account_name_response; +pub use self::update_account_name_response::UpdateAccountNameResponse; pub mod update_app_params; pub use self::update_app_params::UpdateAppParams; pub mod update_app_response; diff --git a/crates/tower-api/src/models/pagination.rs b/crates/tower-api/src/models/pagination.rs index 444c5d3b..be08c4a7 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 67681ee1..50552afa 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 189d4904..435b87bd 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 f1b2fa0e..048b1cf1 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 b5bf6d7e..b9587a16 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 242af9cd..4ab73ada 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 8ad47d5b..bfdcf2ed 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 c1c083a8..1510671f 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 76838ff5..dcfe8d68 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.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -15,7 +15,7 @@ use serde::{Deserialize, Serialize}; pub struct Run { #[serde(rename = "app_name")] pub app_name: String, - /// The app name presented as app_slug to support legacy CLI clients + /// This property is deprecated. Please use app_name instead. #[serde(rename = "app_slug", skip_serializing_if = "Option::is_none")] pub app_slug: Option, #[serde(rename = "app_version")] diff --git a/crates/tower-api/src/models/run_app_params.rs b/crates/tower-api/src/models/run_app_params.rs index 7f615278..5ae8d7e2 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 59cbedd4..0b1cdacd 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 index bbf3c0e6..ed012a20 100644 --- a/crates/tower-api/src/models/run_failure_alert.rs +++ b/crates/tower-api/src/models/run_failure_alert.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/run_log_line.rs b/crates/tower-api/src/models/run_log_line.rs index bd68f684..a8a1c76b 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 42a170ed..d509e6cf 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 9282e4fb..f5a4352a 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 806d336c..96df2303 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.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/run_timeseries_point.rs b/crates/tower-api/src/models/run_timeseries_point.rs index 993d8aca..4d84c5c2 100644 --- a/crates/tower-api/src/models/run_timeseries_point.rs +++ b/crates/tower-api/src/models/run_timeseries_point.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/runner_credentials.rs b/crates/tower-api/src/models/runner_credentials.rs index 03b382ab..a063c84f 100644 --- a/crates/tower-api/src/models/runner_credentials.rs +++ b/crates/tower-api/src/models/runner_credentials.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/schedule.rs b/crates/tower-api/src/models/schedule.rs index 6b86d6e7..87e6a738 100644 --- a/crates/tower-api/src/models/schedule.rs +++ b/crates/tower-api/src/models/schedule.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/search_runs_response.rs b/crates/tower-api/src/models/search_runs_response.rs index 14c3169b..116a52db 100644 --- a/crates/tower-api/src/models/search_runs_response.rs +++ b/crates/tower-api/src/models/search_runs_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 106e1408..5e712cff 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 7a6edde3..f921304e 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 index de879fbd..444dd342 100644 --- a/crates/tower-api/src/models/sse_warning.rs +++ b/crates/tower-api/src/models/sse_warning.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/statistics_settings.rs b/crates/tower-api/src/models/statistics_settings.rs index a2a4ce95..6043d303 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 index e30ab0b2..0ada5201 100644 --- a/crates/tower-api/src/models/stream_alerts_200_response_inner.rs +++ b/crates/tower-api/src/models/stream_alerts_200_response_inner.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ 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 c9f01fa9..e050cad5 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.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/team.rs b/crates/tower-api/src/models/team.rs index 492b6b95..575ed92f 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.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -15,8 +15,9 @@ use serde::{Deserialize, Serialize}; pub struct Team { #[serde(rename = "name")] pub name: String, - #[serde(rename = "slug")] - pub slug: String, + /// This property is deprecated. Please use name instead. + #[serde(rename = "slug", skip_serializing_if = "Option::is_none")] + pub slug: Option, #[serde(rename = "token", skip_serializing_if = "Option::is_none")] pub token: Option>, /// The type of team, either 'personal' or 'team'. @@ -25,10 +26,10 @@ pub struct Team { } impl Team { - pub fn new(name: String, slug: String, r#type: String) -> Team { + pub fn new(name: String, r#type: String) -> Team { Team { name, - slug, + slug: None, token: None, r#type, } diff --git a/crates/tower-api/src/models/team_invitation.rs b/crates/tower-api/src/models/team_invitation.rs index 558ce75f..fe98c92a 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 3cf76b42..ac82c16c 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.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/unverified_authenticator.rs b/crates/tower-api/src/models/unverified_authenticator.rs index c32b5f7c..40f89720 100644 --- a/crates/tower-api/src/models/unverified_authenticator.rs +++ b/crates/tower-api/src/models/unverified_authenticator.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_account_name_params.rs b/crates/tower-api/src/models/update_account_name_params.rs new file mode 100644 index 00000000..902a12f5 --- /dev/null +++ b/crates/tower-api/src/models/update_account_name_params.rs @@ -0,0 +1,32 @@ +/* + * Tower API + * + * REST API to interact with Tower Services. + * + * The version of the OpenAPI document: v0.6.24 + * 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 UpdateAccountNameParams { + /// A URL to the JSON Schema for this object. + #[serde(rename = "$schema", skip_serializing_if = "Option::is_none")] + pub schema: Option, + /// The new name for the account + #[serde(rename = "name")] + pub name: String, +} + +impl UpdateAccountNameParams { + pub fn new(name: String) -> UpdateAccountNameParams { + UpdateAccountNameParams { + schema: None, + name, + } + } +} + diff --git a/crates/tower-api/src/models/update_account_name_response.rs b/crates/tower-api/src/models/update_account_name_response.rs new file mode 100644 index 00000000..cdc37a8b --- /dev/null +++ b/crates/tower-api/src/models/update_account_name_response.rs @@ -0,0 +1,31 @@ +/* + * Tower API + * + * REST API to interact with Tower Services. + * + * The version of the OpenAPI document: v0.6.24 + * 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 UpdateAccountNameResponse { + /// A URL to the JSON Schema for this object. + #[serde(rename = "$schema", skip_serializing_if = "Option::is_none")] + pub schema: Option, + #[serde(rename = "account")] + pub account: Box, +} + +impl UpdateAccountNameResponse { + pub fn new(account: models::Account) -> UpdateAccountNameResponse { + UpdateAccountNameResponse { + schema: None, + account: Box::new(account), + } + } +} + diff --git a/crates/tower-api/src/models/update_app_params.rs b/crates/tower-api/src/models/update_app_params.rs index 09662894..59a85ce1 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 7ad84530..0897c283 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 22216ed9..8a98d5c9 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 4325c6cf..91df8ce3 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 56a24ada..a9047268 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.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -19,17 +19,17 @@ pub struct UpdateMyTeamInvitationParams { /// Whether or not the invitation was accepted. If false, it's considered rejected. #[serde(rename = "accepted")] pub accepted: bool, - /// The slug of the team invitation to update - #[serde(rename = "slug")] - pub slug: String, + /// The name of the team invitation to update + #[serde(rename = "name")] + pub name: String, } impl UpdateMyTeamInvitationParams { - pub fn new(accepted: bool, slug: String) -> UpdateMyTeamInvitationParams { + pub fn new(accepted: bool, name: String) -> UpdateMyTeamInvitationParams { UpdateMyTeamInvitationParams { schema: None, accepted, - slug, + name, } } } 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 8703d411..4256b36c 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 index 9c7fc65a..a2950e42 100644 --- a/crates/tower-api/src/models/update_password_reset_params.rs +++ b/crates/tower-api/src/models/update_password_reset_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_password_reset_response.rs b/crates/tower-api/src/models/update_password_reset_response.rs index 55f528e1..e039b90a 100644 --- a/crates/tower-api/src/models/update_password_reset_response.rs +++ b/crates/tower-api/src/models/update_password_reset_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_schedule_params.rs b/crates/tower-api/src/models/update_schedule_params.rs index d9f5e6b8..d1d68463 100644 --- a/crates/tower-api/src/models/update_schedule_params.rs +++ b/crates/tower-api/src/models/update_schedule_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_schedule_response.rs b/crates/tower-api/src/models/update_schedule_response.rs index 66d4bbc9..679b1cb3 100644 --- a/crates/tower-api/src/models/update_schedule_response.rs +++ b/crates/tower-api/src/models/update_schedule_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_secret_params.rs b/crates/tower-api/src/models/update_secret_params.rs index eacbe258..254a6a5a 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 9e364c39..18a380d0 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 88aa5eae..7c5f9468 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.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -16,20 +16,16 @@ pub struct UpdateTeamParams { /// A URL to the JSON Schema for this object. #[serde(rename = "$schema", skip_serializing_if = "Option::is_none")] pub schema: Option, - /// The name of the team to create. This is optional, if you supply null it will not update the team name. + /// The name of the team to to update. This is optional, if you supply null it will not update the team name. #[serde(rename = "name", deserialize_with = "Option::deserialize")] pub name: Option, - /// The new slug that you want the team to use. This is optional, if you supply null it will not update the slug. - #[serde(rename = "slug", deserialize_with = "Option::deserialize")] - pub slug: Option, } impl UpdateTeamParams { - pub fn new(name: Option, slug: Option) -> UpdateTeamParams { + pub fn new(name: Option) -> UpdateTeamParams { UpdateTeamParams { schema: None, name, - slug, } } } diff --git a/crates/tower-api/src/models/update_team_response.rs b/crates/tower-api/src/models/update_team_response.rs index 31163f15..9c419e12 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 1c31bc68..80b45315 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 21125716..c9b8d627 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.6.22 + * The version of the OpenAPI document: v0.6.24 * 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 23fbc97d..e3dbc1fa 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.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/verified_authenticator.rs b/crates/tower-api/src/models/verified_authenticator.rs index bf3410ee..57918f78 100644 --- a/crates/tower-api/src/models/verified_authenticator.rs +++ b/crates/tower-api/src/models/verified_authenticator.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.6.22 + * The version of the OpenAPI document: v0.6.24 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-cmd/src/output.rs b/crates/tower-cmd/src/output.rs index c60a11f0..9b2f9831 100644 --- a/crates/tower-cmd/src/output.rs +++ b/crates/tower-cmd/src/output.rs @@ -87,8 +87,8 @@ pub fn config_error(err: config::Error) { config::Error::MissingRequiredAppField { ref field } => { format!("Missing required app field `{}` in Towerfile", field) } - config::Error::TeamNotFound { ref team_slug } => { - format!("Team with slug `{}` not found!", team_slug) + config::Error::TeamNotFound { ref team_name } => { + format!("Team with name `{}` not found!", team_name) } config::Error::UnknownDescribeSessionValue { value: _ } => { "An error occured while describing the session associated with the JWT you provided. Maybe your CLI is out of date?".to_string() diff --git a/crates/tower-cmd/src/teams.rs b/crates/tower-cmd/src/teams.rs index 121bdf8b..2d8064ed 100644 --- a/crates/tower-cmd/src/teams.rs +++ b/crates/tower-cmd/src/teams.rs @@ -63,10 +63,10 @@ pub async fn do_list(config: Config) { // Get the current active team from the session let active_team = session.active_team.clone(); - let active_team_slug = active_team.map(|team| team.slug.clone()); + let active_team_name = active_team.map(|team| team.name.clone()); // Create headers for the table - let headers = vec!["", "Slug", "Team Name"] + let headers = vec!["", "Name"] .into_iter() .map(|h| h.yellow().to_string()) .collect(); @@ -77,34 +77,13 @@ pub async fn do_list(config: Config) { .iter() .map(|team| { // Create the active indicator in its own column - let active_indicator = if Some(&team.slug) == active_team_slug.as_ref() { + let active_indicator = if Some(&team.name) == active_team_name.as_ref() { "*".to_string() } else { "".to_string() }; - // Use the plain slug without asterisk - let slug_display = team.slug.clone(); - - // Check if team name is blank and use user's name instead - let display_name = if team.name.trim().is_empty() { - // Get the user's first and last name from the session - let user = &session.user; - let first_name = user.first_name.trim(); - let last_name = user.last_name.trim(); - - if !first_name.is_empty() || !last_name.is_empty() { - // Use first and last name if available - format!("{} {}", first_name, last_name).trim().to_string() - } else { - // Fall back to "Personal Workspace" if both names are empty - "Personal Workspace".to_string() - } - } else { - team.name.clone() - }; - - vec![active_indicator, slug_display, display_name] + vec![active_indicator, team.name.clone()] }) .collect(); @@ -119,18 +98,18 @@ pub async fn do_list(config: Config) { } pub async fn do_switch(config: Config, args: &ArgMatches) { - let slug = extract_team_slug("switch", args.subcommand()); + let name = extract_team_name("switch", args.subcommand()); // Refresh the session first to ensure we have the latest teams data let session = refresh_session(&config).await; - // Check if the provided team slug exists in the refreshed session - let team = session.teams.iter().find(|team| team.slug == slug); + // Check if the provided team name exists in the refreshed session + let team = session.teams.iter().find(|team| team.name == name); match team { Some(team) => { // Team found, set it as active - match config.set_active_team_by_slug(&slug) { + match config.set_active_team_by_name(&name) { Ok(_) => { output::success(&format!("Switched to team: {}", team.name)); } @@ -144,18 +123,18 @@ pub async fn do_switch(config: Config, args: &ArgMatches) { // Team not found output::failure(&format!( "Team '{}' not found. Use 'tower teams list' to see all your teams.", - slug + name, )); std::process::exit(1); } } } -fn extract_team_slug(subcmd: &str, cmd: Option<(&str, &ArgMatches)>) -> String { - if let Some((slug, _)) = cmd { - return slug.to_string(); +fn extract_team_name(subcmd: &str, cmd: Option<(&str, &ArgMatches)>) -> String { + if let Some((name, _)) = cmd { + return name.to_string(); } - let line = format!("Team slug is required. Example: tower teams {} ", subcmd); + let line = format!("Team name is required. Example: tower teams {} ", subcmd); output::die(&line); } diff --git a/src/tower/_client.py b/src/tower/_client.py index daa9b7e4..2eefb905 100644 --- a/src/tower/_client.py +++ b/src/tower/_client.py @@ -45,19 +45,19 @@ def run_app( - slug: str, + name: str, environment: Optional[str] = None, parameters: Optional[Dict[str, str]] = None, ) -> Run: """ Run a Tower application with specified parameters and environment. - This function initiates a new run of a Tower application identified by its slug. + This function initiates a new run of a Tower application identified by its name. The run can be configured with an optional environment override and runtime parameters. If no environment is specified, the default environment from the Tower context is used. Args: - slug (str): The unique identifier of the application to run. + name (str): The unique identifier of the application to run. environment (Optional[str]): The environment to run the application in. If not provided, uses the default environment from the Tower context. parameters (Optional[Dict[str, str]]): A dictionary of key-value pairs @@ -65,7 +65,7 @@ def run_app( Returns: Run: A Run object containing information about the initiated application run, - including the app_slug and run number. + including the app_name and run number. Raises: RuntimeError: If there is an error initiating the run or if the Tower API @@ -88,7 +88,7 @@ def run_app( try: output: Optional[Union[ErrorModel, RunAppResponse]] = run_app_api.sync( - slug=slug, client=client, body=input_body + name=name, client=client, body=input_body ) if output is None: @@ -101,9 +101,9 @@ def run_app( except UnexpectedStatus as e: # Raise an AppNotFoundError here if the app was, indeed, not found. if e.status_code == 404: - raise AppNotFoundError(slug) + raise AppNotFoundError(name) else: - raise UnknownException(f"Unexpected status code {e.status_code} when running app {slug}") + raise UnknownException(f"Unexpected status code {e.status_code} when running app {name}") def wait_for_run( run: Run, @@ -118,7 +118,7 @@ def wait_for_run( a terminal state (exited, errored, cancelled, or crashed). Args: - run (Run): The Run object containing the app_slug and number of the run to monitor. + run (Run): The Run object containing the app_name and number of the run to monitor. timeout (Optional[float]): Maximum time to wait in seconds before raising a TimeoutException. Defaults to one day (86,400 seconds). raise_on_failure (bool): If True, raises a RunFailedError when the run fails. @@ -158,7 +158,7 @@ def wait_for_run( return desc elif _is_failed_run(desc): if raise_on_failure: - raise RunFailedError(desc.app_slug, desc.number, desc.status) + raise RunFailedError(desc.app_name, desc.number, desc.status) else: return desc @@ -235,7 +235,7 @@ def wait_for_runs( successful_runs.append(desc) elif _is_failed_run(desc): if raise_on_failure: - raise RunFailedError(desc.app_slug, desc.number, desc.status) + raise RunFailedError(desc.app_name, desc.number, desc.status) else: failed_runs.append(desc) @@ -344,7 +344,7 @@ def _check_run_status( try: output: Optional[Union[DescribeRunResponse, ErrorModel]] = describe_run_api.sync( - slug=run.app_slug, + name=run.app_name, seq=run.number, client=client ) diff --git a/src/tower/tower_api_client/api/default/delete_team_invitation.py b/src/tower/tower_api_client/api/default/delete_team_invitation.py index f15cbc89..7b2d1511 100644 --- a/src/tower/tower_api_client/api/default/delete_team_invitation.py +++ b/src/tower/tower_api_client/api/default/delete_team_invitation.py @@ -11,7 +11,7 @@ def _get_kwargs( - slug: str, + name: str, *, body: DeleteTeamInvitationParams, ) -> dict[str, Any]: @@ -19,8 +19,8 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "delete", - "url": "/teams/{slug}/invites".format( - slug=slug, + "url": "/teams/{name}/invites".format( + name=name, ), } @@ -58,7 +58,7 @@ def _build_response( def sync_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, body: DeleteTeamInvitationParams, @@ -68,7 +68,7 @@ def sync_detailed( Delete a pending team invitation that you have previously sent Args: - slug (str): The slug of the team to remove someone from + name (str): The name of the team to remove someone from body (DeleteTeamInvitationParams): Raises: @@ -80,7 +80,7 @@ def sync_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, body=body, ) @@ -92,7 +92,7 @@ def sync_detailed( def sync( - slug: str, + name: str, *, client: AuthenticatedClient, body: DeleteTeamInvitationParams, @@ -102,7 +102,7 @@ def sync( Delete a pending team invitation that you have previously sent Args: - slug (str): The slug of the team to remove someone from + name (str): The name of the team to remove someone from body (DeleteTeamInvitationParams): Raises: @@ -114,14 +114,14 @@ def sync( """ return sync_detailed( - slug=slug, + name=name, client=client, body=body, ).parsed async def asyncio_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, body: DeleteTeamInvitationParams, @@ -131,7 +131,7 @@ async def asyncio_detailed( Delete a pending team invitation that you have previously sent Args: - slug (str): The slug of the team to remove someone from + name (str): The name of the team to remove someone from body (DeleteTeamInvitationParams): Raises: @@ -143,7 +143,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, body=body, ) @@ -153,7 +153,7 @@ async def asyncio_detailed( async def asyncio( - slug: str, + name: str, *, client: AuthenticatedClient, body: DeleteTeamInvitationParams, @@ -163,7 +163,7 @@ async def asyncio( Delete a pending team invitation that you have previously sent Args: - slug (str): The slug of the team to remove someone from + name (str): The name of the team to remove someone from body (DeleteTeamInvitationParams): Raises: @@ -176,7 +176,7 @@ async def asyncio( return ( await asyncio_detailed( - slug=slug, + name=name, client=client, body=body, ) diff --git a/src/tower/tower_api_client/api/default/invite_team_member.py b/src/tower/tower_api_client/api/default/invite_team_member.py index 8d0e6f5f..11863b6e 100644 --- a/src/tower/tower_api_client/api/default/invite_team_member.py +++ b/src/tower/tower_api_client/api/default/invite_team_member.py @@ -11,7 +11,7 @@ def _get_kwargs( - slug: str, + name: str, *, body: InviteTeamMemberParams, ) -> dict[str, Any]: @@ -19,8 +19,8 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": "/teams/{slug}/invites".format( - slug=slug, + "url": "/teams/{name}/invites".format( + name=name, ), } @@ -58,7 +58,7 @@ def _build_response( def sync_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, body: InviteTeamMemberParams, @@ -68,7 +68,7 @@ def sync_detailed( Invite a new team Args: - slug (str): The slug of the team to invite someone to + name (str): The name of the team to invite someone to body (InviteTeamMemberParams): Raises: @@ -80,7 +80,7 @@ def sync_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, body=body, ) @@ -92,7 +92,7 @@ def sync_detailed( def sync( - slug: str, + name: str, *, client: AuthenticatedClient, body: InviteTeamMemberParams, @@ -102,7 +102,7 @@ def sync( Invite a new team Args: - slug (str): The slug of the team to invite someone to + name (str): The name of the team to invite someone to body (InviteTeamMemberParams): Raises: @@ -114,14 +114,14 @@ def sync( """ return sync_detailed( - slug=slug, + name=name, client=client, body=body, ).parsed async def asyncio_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, body: InviteTeamMemberParams, @@ -131,7 +131,7 @@ async def asyncio_detailed( Invite a new team Args: - slug (str): The slug of the team to invite someone to + name (str): The name of the team to invite someone to body (InviteTeamMemberParams): Raises: @@ -143,7 +143,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, body=body, ) @@ -153,7 +153,7 @@ async def asyncio_detailed( async def asyncio( - slug: str, + name: str, *, client: AuthenticatedClient, body: InviteTeamMemberParams, @@ -163,7 +163,7 @@ async def asyncio( Invite a new team Args: - slug (str): The slug of the team to invite someone to + name (str): The name of the team to invite someone to body (InviteTeamMemberParams): Raises: @@ -176,7 +176,7 @@ async def asyncio( return ( await asyncio_detailed( - slug=slug, + name=name, client=client, body=body, ) diff --git a/src/tower/tower_api_client/api/default/leave_team.py b/src/tower/tower_api_client/api/default/leave_team.py index 99738087..8024b09c 100644 --- a/src/tower/tower_api_client/api/default/leave_team.py +++ b/src/tower/tower_api_client/api/default/leave_team.py @@ -10,12 +10,12 @@ def _get_kwargs( - slug: str, + name: str, ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "post", - "url": "/teams/{slug}/leave".format( - slug=slug, + "url": "/teams/{name}/leave".format( + name=name, ), } @@ -47,7 +47,7 @@ def _build_response( def sync_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, ) -> Response[LeaveTeamResponse]: @@ -57,7 +57,7 @@ def sync_detailed( last member of a team, you cannot remove yourself. You should delete the team instead. Args: - slug (str): The slug of the team to leave + name (str): The name of the team to leave Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -68,7 +68,7 @@ def sync_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, ) response = client.get_httpx_client().request( @@ -79,7 +79,7 @@ def sync_detailed( def sync( - slug: str, + name: str, *, client: AuthenticatedClient, ) -> Optional[LeaveTeamResponse]: @@ -89,7 +89,7 @@ def sync( last member of a team, you cannot remove yourself. You should delete the team instead. Args: - slug (str): The slug of the team to leave + name (str): The name of the team to leave Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -100,13 +100,13 @@ def sync( """ return sync_detailed( - slug=slug, + name=name, client=client, ).parsed async def asyncio_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, ) -> Response[LeaveTeamResponse]: @@ -116,7 +116,7 @@ async def asyncio_detailed( last member of a team, you cannot remove yourself. You should delete the team instead. Args: - slug (str): The slug of the team to leave + name (str): The name of the team to leave Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -127,7 +127,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -136,7 +136,7 @@ async def asyncio_detailed( async def asyncio( - slug: str, + name: str, *, client: AuthenticatedClient, ) -> Optional[LeaveTeamResponse]: @@ -146,7 +146,7 @@ async def asyncio( last member of a team, you cannot remove yourself. You should delete the team instead. Args: - slug (str): The slug of the team to leave + name (str): The name of the team to leave Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -158,7 +158,7 @@ async def asyncio( return ( await asyncio_detailed( - slug=slug, + name=name, client=client, ) ).parsed diff --git a/src/tower/tower_api_client/api/default/list_team_invitations.py b/src/tower/tower_api_client/api/default/list_team_invitations.py index 85930b0e..4e48640e 100644 --- a/src/tower/tower_api_client/api/default/list_team_invitations.py +++ b/src/tower/tower_api_client/api/default/list_team_invitations.py @@ -10,12 +10,12 @@ def _get_kwargs( - slug: str, + name: str, ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": "/teams/{slug}/invites".format( - slug=slug, + "url": "/teams/{name}/invites".format( + name=name, ), } @@ -47,7 +47,7 @@ def _build_response( def sync_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, ) -> Response[ListTeamInvitationsResponse]: @@ -56,7 +56,7 @@ def sync_detailed( List the pending invitations for a team Args: - slug (str): The slug of the team to list members for + name (str): The name of the team to list members for Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -67,7 +67,7 @@ def sync_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, ) response = client.get_httpx_client().request( @@ -78,7 +78,7 @@ def sync_detailed( def sync( - slug: str, + name: str, *, client: AuthenticatedClient, ) -> Optional[ListTeamInvitationsResponse]: @@ -87,7 +87,7 @@ def sync( List the pending invitations for a team Args: - slug (str): The slug of the team to list members for + name (str): The name of the team to list members for Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -98,13 +98,13 @@ def sync( """ return sync_detailed( - slug=slug, + name=name, client=client, ).parsed async def asyncio_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, ) -> Response[ListTeamInvitationsResponse]: @@ -113,7 +113,7 @@ async def asyncio_detailed( List the pending invitations for a team Args: - slug (str): The slug of the team to list members for + name (str): The name of the team to list members for Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -124,7 +124,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -133,7 +133,7 @@ async def asyncio_detailed( async def asyncio( - slug: str, + name: str, *, client: AuthenticatedClient, ) -> Optional[ListTeamInvitationsResponse]: @@ -142,7 +142,7 @@ async def asyncio( List the pending invitations for a team Args: - slug (str): The slug of the team to list members for + name (str): The name of the team to list members for Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -154,7 +154,7 @@ async def asyncio( return ( await asyncio_detailed( - slug=slug, + name=name, client=client, ) ).parsed diff --git a/src/tower/tower_api_client/api/default/list_team_members.py b/src/tower/tower_api_client/api/default/list_team_members.py index e74bbc66..6014f50b 100644 --- a/src/tower/tower_api_client/api/default/list_team_members.py +++ b/src/tower/tower_api_client/api/default/list_team_members.py @@ -10,12 +10,12 @@ def _get_kwargs( - slug: str, + name: str, ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": "/teams/{slug}/members".format( - slug=slug, + "url": "/teams/{name}/members".format( + name=name, ), } @@ -47,7 +47,7 @@ def _build_response( def sync_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, ) -> Response[ListTeamMembersResponse]: @@ -56,7 +56,7 @@ def sync_detailed( List the members of a team Args: - slug (str): The slug of the team to list members for + name (str): The name of the team to list members for Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -67,7 +67,7 @@ def sync_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, ) response = client.get_httpx_client().request( @@ -78,7 +78,7 @@ def sync_detailed( def sync( - slug: str, + name: str, *, client: AuthenticatedClient, ) -> Optional[ListTeamMembersResponse]: @@ -87,7 +87,7 @@ def sync( List the members of a team Args: - slug (str): The slug of the team to list members for + name (str): The name of the team to list members for Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -98,13 +98,13 @@ def sync( """ return sync_detailed( - slug=slug, + name=name, client=client, ).parsed async def asyncio_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, ) -> Response[ListTeamMembersResponse]: @@ -113,7 +113,7 @@ async def asyncio_detailed( List the members of a team Args: - slug (str): The slug of the team to list members for + name (str): The name of the team to list members for Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -124,7 +124,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -133,7 +133,7 @@ async def asyncio_detailed( async def asyncio( - slug: str, + name: str, *, client: AuthenticatedClient, ) -> Optional[ListTeamMembersResponse]: @@ -142,7 +142,7 @@ async def asyncio( List the members of a team Args: - slug (str): The slug of the team to list members for + name (str): The name of the team to list members for Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -154,7 +154,7 @@ async def asyncio( return ( await asyncio_detailed( - slug=slug, + name=name, client=client, ) ).parsed diff --git a/src/tower/tower_api_client/api/default/remove_team_member.py b/src/tower/tower_api_client/api/default/remove_team_member.py index df782461..a8d41ac2 100644 --- a/src/tower/tower_api_client/api/default/remove_team_member.py +++ b/src/tower/tower_api_client/api/default/remove_team_member.py @@ -11,7 +11,7 @@ def _get_kwargs( - slug: str, + name: str, *, body: RemoveTeamMemberParams, ) -> dict[str, Any]: @@ -19,8 +19,8 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "delete", - "url": "/teams/{slug}/members".format( - slug=slug, + "url": "/teams/{name}/members".format( + name=name, ), } @@ -58,7 +58,7 @@ def _build_response( def sync_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, body: RemoveTeamMemberParams, @@ -68,7 +68,7 @@ def sync_detailed( Remove a new team Args: - slug (str): The slug of the team to remove someone from + name (str): The name of the team to remove someone from body (RemoveTeamMemberParams): Raises: @@ -80,7 +80,7 @@ def sync_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, body=body, ) @@ -92,7 +92,7 @@ def sync_detailed( def sync( - slug: str, + name: str, *, client: AuthenticatedClient, body: RemoveTeamMemberParams, @@ -102,7 +102,7 @@ def sync( Remove a new team Args: - slug (str): The slug of the team to remove someone from + name (str): The name of the team to remove someone from body (RemoveTeamMemberParams): Raises: @@ -114,14 +114,14 @@ def sync( """ return sync_detailed( - slug=slug, + name=name, client=client, body=body, ).parsed async def asyncio_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, body: RemoveTeamMemberParams, @@ -131,7 +131,7 @@ async def asyncio_detailed( Remove a new team Args: - slug (str): The slug of the team to remove someone from + name (str): The name of the team to remove someone from body (RemoveTeamMemberParams): Raises: @@ -143,7 +143,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, body=body, ) @@ -153,7 +153,7 @@ async def asyncio_detailed( async def asyncio( - slug: str, + name: str, *, client: AuthenticatedClient, body: RemoveTeamMemberParams, @@ -163,7 +163,7 @@ async def asyncio( Remove a new team Args: - slug (str): The slug of the team to remove someone from + name (str): The name of the team to remove someone from body (RemoveTeamMemberParams): Raises: @@ -176,7 +176,7 @@ async def asyncio( return ( await asyncio_detailed( - slug=slug, + name=name, client=client, body=body, ) diff --git a/src/tower/tower_api_client/api/default/resend_team_invitation.py b/src/tower/tower_api_client/api/default/resend_team_invitation.py index e0be72c3..cf60d6e2 100644 --- a/src/tower/tower_api_client/api/default/resend_team_invitation.py +++ b/src/tower/tower_api_client/api/default/resend_team_invitation.py @@ -11,7 +11,7 @@ def _get_kwargs( - slug: str, + name: str, *, body: ResendTeamInvitationParams, ) -> dict[str, Any]: @@ -19,8 +19,8 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": "/teams/{slug}/invites/resend".format( - slug=slug, + "url": "/teams/{name}/invites/resend".format( + name=name, ), } @@ -58,7 +58,7 @@ def _build_response( def sync_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, body: ResendTeamInvitationParams, @@ -68,7 +68,7 @@ def sync_detailed( Resend a team invitation to a user if they need a reminder or if they lost it Args: - slug (str): The slug of the team to invite someone to + name (str): The name of the team to invite someone to body (ResendTeamInvitationParams): Raises: @@ -80,7 +80,7 @@ def sync_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, body=body, ) @@ -92,7 +92,7 @@ def sync_detailed( def sync( - slug: str, + name: str, *, client: AuthenticatedClient, body: ResendTeamInvitationParams, @@ -102,7 +102,7 @@ def sync( Resend a team invitation to a user if they need a reminder or if they lost it Args: - slug (str): The slug of the team to invite someone to + name (str): The name of the team to invite someone to body (ResendTeamInvitationParams): Raises: @@ -114,14 +114,14 @@ def sync( """ return sync_detailed( - slug=slug, + name=name, client=client, body=body, ).parsed async def asyncio_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, body: ResendTeamInvitationParams, @@ -131,7 +131,7 @@ async def asyncio_detailed( Resend a team invitation to a user if they need a reminder or if they lost it Args: - slug (str): The slug of the team to invite someone to + name (str): The name of the team to invite someone to body (ResendTeamInvitationParams): Raises: @@ -143,7 +143,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, body=body, ) @@ -153,7 +153,7 @@ async def asyncio_detailed( async def asyncio( - slug: str, + name: str, *, client: AuthenticatedClient, body: ResendTeamInvitationParams, @@ -163,7 +163,7 @@ async def asyncio( Resend a team invitation to a user if they need a reminder or if they lost it Args: - slug (str): The slug of the team to invite someone to + name (str): The name of the team to invite someone to body (ResendTeamInvitationParams): Raises: @@ -176,7 +176,7 @@ async def asyncio( return ( await asyncio_detailed( - slug=slug, + name=name, client=client, body=body, ) diff --git a/src/tower/tower_api_client/api/default/update_account_slug.py b/src/tower/tower_api_client/api/default/update_account_name.py similarity index 64% rename from src/tower/tower_api_client/api/default/update_account_slug.py rename to src/tower/tower_api_client/api/default/update_account_name.py index cc7043c6..47ea3048 100644 --- a/src/tower/tower_api_client/api/default/update_account_slug.py +++ b/src/tower/tower_api_client/api/default/update_account_name.py @@ -5,22 +5,22 @@ from ... import errors from ...client import AuthenticatedClient, Client -from ...models.update_account_slug_params import UpdateAccountSlugParams -from ...models.update_account_slug_response import UpdateAccountSlugResponse +from ...models.update_account_name_params import UpdateAccountNameParams +from ...models.update_account_name_response import UpdateAccountNameResponse from ...types import Response def _get_kwargs( - slug: str, + name: str, *, - body: UpdateAccountSlugParams, + body: UpdateAccountNameParams, ) -> dict[str, Any]: headers: dict[str, Any] = {} _kwargs: dict[str, Any] = { "method": "put", - "url": "/accounts/{slug}".format( - slug=slug, + "url": "/accounts/{name}".format( + name=name, ), } @@ -35,9 +35,9 @@ def _get_kwargs( def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[UpdateAccountSlugResponse]: +) -> Optional[UpdateAccountNameResponse]: if response.status_code == 200: - response_200 = UpdateAccountSlugResponse.from_dict(response.json()) + response_200 = UpdateAccountNameResponse.from_dict(response.json()) return response_200 if client.raise_on_unexpected_status: @@ -48,7 +48,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[UpdateAccountSlugResponse]: +) -> Response[UpdateAccountNameResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -58,29 +58,29 @@ def _build_response( def sync_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, - body: UpdateAccountSlugParams, -) -> Response[UpdateAccountSlugResponse]: - """Update account slug + body: UpdateAccountNameParams, +) -> Response[UpdateAccountNameResponse]: + """Update account name - Update the slug for an account + Update the name for an account Args: - slug (str): The slug of the account to update - body (UpdateAccountSlugParams): + name (str): The name of the account to update + body (UpdateAccountNameParams): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[UpdateAccountSlugResponse] + Response[UpdateAccountNameResponse] """ kwargs = _get_kwargs( - slug=slug, + name=name, body=body, ) @@ -92,58 +92,58 @@ def sync_detailed( def sync( - slug: str, + name: str, *, client: AuthenticatedClient, - body: UpdateAccountSlugParams, -) -> Optional[UpdateAccountSlugResponse]: - """Update account slug + body: UpdateAccountNameParams, +) -> Optional[UpdateAccountNameResponse]: + """Update account name - Update the slug for an account + Update the name for an account Args: - slug (str): The slug of the account to update - body (UpdateAccountSlugParams): + name (str): The name of the account to update + body (UpdateAccountNameParams): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - UpdateAccountSlugResponse + UpdateAccountNameResponse """ return sync_detailed( - slug=slug, + name=name, client=client, body=body, ).parsed async def asyncio_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, - body: UpdateAccountSlugParams, -) -> Response[UpdateAccountSlugResponse]: - """Update account slug + body: UpdateAccountNameParams, +) -> Response[UpdateAccountNameResponse]: + """Update account name - Update the slug for an account + Update the name for an account Args: - slug (str): The slug of the account to update - body (UpdateAccountSlugParams): + name (str): The name of the account to update + body (UpdateAccountNameParams): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[UpdateAccountSlugResponse] + Response[UpdateAccountNameResponse] """ kwargs = _get_kwargs( - slug=slug, + name=name, body=body, ) @@ -153,30 +153,30 @@ async def asyncio_detailed( async def asyncio( - slug: str, + name: str, *, client: AuthenticatedClient, - body: UpdateAccountSlugParams, -) -> Optional[UpdateAccountSlugResponse]: - """Update account slug + body: UpdateAccountNameParams, +) -> Optional[UpdateAccountNameResponse]: + """Update account name - Update the slug for an account + Update the name for an account Args: - slug (str): The slug of the account to update - body (UpdateAccountSlugParams): + name (str): The name of the account to update + body (UpdateAccountNameParams): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - UpdateAccountSlugResponse + UpdateAccountNameResponse """ return ( await asyncio_detailed( - slug=slug, + name=name, client=client, body=body, ) diff --git a/src/tower/tower_api_client/api/default/update_team.py b/src/tower/tower_api_client/api/default/update_team.py index cce35396..9d094fce 100644 --- a/src/tower/tower_api_client/api/default/update_team.py +++ b/src/tower/tower_api_client/api/default/update_team.py @@ -11,7 +11,7 @@ def _get_kwargs( - slug: str, + name: str, *, body: UpdateTeamParams, ) -> dict[str, Any]: @@ -19,8 +19,8 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "put", - "url": "/teams/{slug}".format( - slug=slug, + "url": "/teams/{name}".format( + name=name, ), } @@ -58,18 +58,18 @@ def _build_response( def sync_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, body: UpdateTeamParams, ) -> Response[UpdateTeamResponse]: """Update team - Update a team with a new name or slug. Note that updating the team with a new slug will cause all + Update a team with a new name or name. Note that updating the team with a new name will cause all your URLs to change! Args: - slug (str): The slug of the team to update + name (str): The name of the team to update body (UpdateTeamParams): Raises: @@ -81,7 +81,7 @@ def sync_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, body=body, ) @@ -93,18 +93,18 @@ def sync_detailed( def sync( - slug: str, + name: str, *, client: AuthenticatedClient, body: UpdateTeamParams, ) -> Optional[UpdateTeamResponse]: """Update team - Update a team with a new name or slug. Note that updating the team with a new slug will cause all + Update a team with a new name or name. Note that updating the team with a new name will cause all your URLs to change! Args: - slug (str): The slug of the team to update + name (str): The name of the team to update body (UpdateTeamParams): Raises: @@ -116,25 +116,25 @@ def sync( """ return sync_detailed( - slug=slug, + name=name, client=client, body=body, ).parsed async def asyncio_detailed( - slug: str, + name: str, *, client: AuthenticatedClient, body: UpdateTeamParams, ) -> Response[UpdateTeamResponse]: """Update team - Update a team with a new name or slug. Note that updating the team with a new slug will cause all + Update a team with a new name or name. Note that updating the team with a new name will cause all your URLs to change! Args: - slug (str): The slug of the team to update + name (str): The name of the team to update body (UpdateTeamParams): Raises: @@ -146,7 +146,7 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( - slug=slug, + name=name, body=body, ) @@ -156,18 +156,18 @@ async def asyncio_detailed( async def asyncio( - slug: str, + name: str, *, client: AuthenticatedClient, body: UpdateTeamParams, ) -> Optional[UpdateTeamResponse]: """Update team - Update a team with a new name or slug. Note that updating the team with a new slug will cause all + Update a team with a new name or name. Note that updating the team with a new name will cause all your URLs to change! Args: - slug (str): The slug of the team to update + name (str): The name of the team to update body (UpdateTeamParams): Raises: @@ -180,7 +180,7 @@ async def asyncio( return ( await asyncio_detailed( - slug=slug, + name=name, client=client, body=body, ) diff --git a/src/tower/tower_api_client/models/__init__.py b/src/tower/tower_api_client/models/__init__.py index cc2ba641..135ab035 100644 --- a/src/tower/tower_api_client/models/__init__.py +++ b/src/tower/tower_api_client/models/__init__.py @@ -133,8 +133,8 @@ from .team_invitation import TeamInvitation from .token import Token from .unverified_authenticator import UnverifiedAuthenticator -from .update_account_slug_params import UpdateAccountSlugParams -from .update_account_slug_response import UpdateAccountSlugResponse +from .update_account_name_params import UpdateAccountNameParams +from .update_account_name_response import UpdateAccountNameResponse from .update_app_params import UpdateAppParams from .update_app_response import UpdateAppResponse from .update_catalog_params import UpdateCatalogParams @@ -288,8 +288,8 @@ "TeamInvitation", "Token", "UnverifiedAuthenticator", - "UpdateAccountSlugParams", - "UpdateAccountSlugResponse", + "UpdateAccountNameParams", + "UpdateAccountNameResponse", "UpdateAppParams", "UpdateAppResponse", "UpdateCatalogParams", diff --git a/src/tower/tower_api_client/models/account.py b/src/tower/tower_api_client/models/account.py index eee02418..76e81498 100644 --- a/src/tower/tower_api_client/models/account.py +++ b/src/tower/tower_api_client/models/account.py @@ -1,8 +1,10 @@ from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, Union from attrs import define as _attrs_define +from ..types import UNSET, Unset + T = TypeVar("T", bound="Account") @@ -11,11 +13,11 @@ class Account: """ Attributes: name (str): - slug (str): + slug (Union[Unset, str]): This property is deprecated. Please use name instead. """ name: str - slug: str + slug: Union[Unset, str] = UNSET def to_dict(self) -> dict[str, Any]: name = self.name @@ -26,9 +28,10 @@ def to_dict(self) -> dict[str, Any]: field_dict.update( { "name": name, - "slug": slug, } ) + if slug is not UNSET: + field_dict["slug"] = slug return field_dict @@ -37,7 +40,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name") - slug = d.pop("slug") + slug = d.pop("slug", UNSET) account = cls( name=name, diff --git a/src/tower/tower_api_client/models/app.py b/src/tower/tower_api_client/models/app.py index 227e2fdc..c2aaf2e2 100644 --- a/src/tower/tower_api_client/models/app.py +++ b/src/tower/tower_api_client/models/app.py @@ -32,7 +32,7 @@ class App: version (Union[None, str]): The current version of this app, null if none. last_run (Union[Unset, Run]): run_results (Union[Unset, RunResults]): - slug (Union[Unset, str]): The name of the app presented as a slug to support legacy CLI clients + slug (Union[Unset, str]): This property is deprecated. Please use name instead. status (Union[Unset, AppStatus]): The status of the app """ diff --git a/src/tower/tower_api_client/models/create_team_params.py b/src/tower/tower_api_client/models/create_team_params.py index 90c1ca59..133b67a9 100644 --- a/src/tower/tower_api_client/models/create_team_params.py +++ b/src/tower/tower_api_client/models/create_team_params.py @@ -13,27 +13,22 @@ class CreateTeamParams: """ Attributes: name (str): The name of the team to create - slug (str): The slug of the team to create schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example: https://api.tower.dev/v1/schemas/CreateTeamParams.json. """ name: str - slug: str schema: Union[Unset, str] = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - slug = self.slug - schema = self.schema field_dict: dict[str, Any] = {} field_dict.update( { "name": name, - "slug": slug, } ) if schema is not UNSET: @@ -46,13 +41,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name") - slug = d.pop("slug") - schema = d.pop("$schema", UNSET) create_team_params = cls( name=name, - slug=slug, schema=schema, ) diff --git a/src/tower/tower_api_client/models/delete_team_params.py b/src/tower/tower_api_client/models/delete_team_params.py index 2af8bbb4..379b45b6 100644 --- a/src/tower/tower_api_client/models/delete_team_params.py +++ b/src/tower/tower_api_client/models/delete_team_params.py @@ -12,23 +12,23 @@ class DeleteTeamParams: """ Attributes: - slug (str): The slug of the team to delete + name (str): The name of the team to delete schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example: https://api.tower.dev/v1/schemas/DeleteTeamParams.json. """ - slug: str + name: str schema: Union[Unset, str] = UNSET def to_dict(self) -> dict[str, Any]: - slug = self.slug + name = self.name schema = self.schema field_dict: dict[str, Any] = {} field_dict.update( { - "slug": slug, + "name": name, } ) if schema is not UNSET: @@ -39,12 +39,12 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - slug = d.pop("slug") + name = d.pop("name") schema = d.pop("$schema", UNSET) delete_team_params = cls( - slug=slug, + name=name, schema=schema, ) diff --git a/src/tower/tower_api_client/models/run.py b/src/tower/tower_api_client/models/run.py index d779387f..c017ae5c 100644 --- a/src/tower/tower_api_client/models/run.py +++ b/src/tower/tower_api_client/models/run.py @@ -34,7 +34,7 @@ class Run: started_at (Union[None, datetime.datetime]): status (RunStatus): status_group (RunStatusGroup): - app_slug (Union[Unset, str]): The app name presented as app_slug to support legacy CLI clients + app_slug (Union[Unset, str]): This property is deprecated. Please use app_name instead. """ app_name: str diff --git a/src/tower/tower_api_client/models/team.py b/src/tower/tower_api_client/models/team.py index b852cdcb..869598e9 100644 --- a/src/tower/tower_api_client/models/team.py +++ b/src/tower/tower_api_client/models/team.py @@ -17,23 +17,23 @@ class Team: """ Attributes: name (str): - slug (str): type_ (str): The type of team, either 'personal' or 'team'. + slug (Union[Unset, str]): This property is deprecated. Please use name instead. token (Union[Unset, Token]): """ name: str - slug: str type_: str + slug: Union[Unset, str] = UNSET token: Union[Unset, "Token"] = UNSET def to_dict(self) -> dict[str, Any]: name = self.name - slug = self.slug - type_ = self.type_ + slug = self.slug + token: Union[Unset, dict[str, Any]] = UNSET if not isinstance(self.token, Unset): token = self.token.to_dict() @@ -42,10 +42,11 @@ def to_dict(self) -> dict[str, Any]: field_dict.update( { "name": name, - "slug": slug, "type": type_, } ) + if slug is not UNSET: + field_dict["slug"] = slug if token is not UNSET: field_dict["token"] = token @@ -58,10 +59,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name") - slug = d.pop("slug") - type_ = d.pop("type") + slug = d.pop("slug", UNSET) + _token = d.pop("token", UNSET) token: Union[Unset, Token] if isinstance(_token, Unset): @@ -71,8 +72,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: team = cls( name=name, - slug=slug, type_=type_, + slug=slug, token=token, ) diff --git a/src/tower/tower_api_client/models/update_account_slug_params.py b/src/tower/tower_api_client/models/update_account_name_params.py similarity index 64% rename from src/tower/tower_api_client/models/update_account_slug_params.py rename to src/tower/tower_api_client/models/update_account_name_params.py index f47ba402..dc418452 100644 --- a/src/tower/tower_api_client/models/update_account_slug_params.py +++ b/src/tower/tower_api_client/models/update_account_name_params.py @@ -5,30 +5,30 @@ from ..types import UNSET, Unset -T = TypeVar("T", bound="UpdateAccountSlugParams") +T = TypeVar("T", bound="UpdateAccountNameParams") @_attrs_define -class UpdateAccountSlugParams: +class UpdateAccountNameParams: """ Attributes: - new_slug (str): The new slug for the account + name (str): The new name for the account schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example: - https://api.tower.dev/v1/schemas/UpdateAccountSlugParams.json. + https://api.tower.dev/v1/schemas/UpdateAccountNameParams.json. """ - new_slug: str + name: str schema: Union[Unset, str] = UNSET def to_dict(self) -> dict[str, Any]: - new_slug = self.new_slug + name = self.name schema = self.schema field_dict: dict[str, Any] = {} field_dict.update( { - "new_slug": new_slug, + "name": name, } ) if schema is not UNSET: @@ -39,13 +39,13 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - new_slug = d.pop("new_slug") + name = d.pop("name") schema = d.pop("$schema", UNSET) - update_account_slug_params = cls( - new_slug=new_slug, + update_account_name_params = cls( + name=name, schema=schema, ) - return update_account_slug_params + return update_account_name_params diff --git a/src/tower/tower_api_client/models/update_account_slug_response.py b/src/tower/tower_api_client/models/update_account_name_response.py similarity index 82% rename from src/tower/tower_api_client/models/update_account_slug_response.py rename to src/tower/tower_api_client/models/update_account_name_response.py index 36dfe83e..993a27bb 100644 --- a/src/tower/tower_api_client/models/update_account_slug_response.py +++ b/src/tower/tower_api_client/models/update_account_name_response.py @@ -9,16 +9,16 @@ from ..models.account import Account -T = TypeVar("T", bound="UpdateAccountSlugResponse") +T = TypeVar("T", bound="UpdateAccountNameResponse") @_attrs_define -class UpdateAccountSlugResponse: +class UpdateAccountNameResponse: """ Attributes: account (Account): schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example: - https://api.tower.dev/v1/schemas/UpdateAccountSlugResponse.json. + https://api.tower.dev/v1/schemas/UpdateAccountNameResponse.json. """ account: "Account" @@ -49,9 +49,9 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: schema = d.pop("$schema", UNSET) - update_account_slug_response = cls( + update_account_name_response = cls( account=account, schema=schema, ) - return update_account_slug_response + return update_account_name_response diff --git a/src/tower/tower_api_client/models/update_my_team_invitation_params.py b/src/tower/tower_api_client/models/update_my_team_invitation_params.py index dd79f98f..2ae654ae 100644 --- a/src/tower/tower_api_client/models/update_my_team_invitation_params.py +++ b/src/tower/tower_api_client/models/update_my_team_invitation_params.py @@ -13,19 +13,19 @@ class UpdateMyTeamInvitationParams: """ Attributes: accepted (bool): Whether or not the invitation was accepted. If false, it's considered rejected. - slug (str): The slug of the team invitation to update + name (str): The name of the team invitation to update schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example: https://api.tower.dev/v1/schemas/UpdateMyTeamInvitationParams.json. """ accepted: bool - slug: str + name: str schema: Union[Unset, str] = UNSET def to_dict(self) -> dict[str, Any]: accepted = self.accepted - slug = self.slug + name = self.name schema = self.schema @@ -33,7 +33,7 @@ def to_dict(self) -> dict[str, Any]: field_dict.update( { "accepted": accepted, - "slug": slug, + "name": name, } ) if schema is not UNSET: @@ -46,13 +46,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) accepted = d.pop("accepted") - slug = d.pop("slug") + name = d.pop("name") schema = d.pop("$schema", UNSET) update_my_team_invitation_params = cls( accepted=accepted, - slug=slug, + name=name, schema=schema, ) diff --git a/src/tower/tower_api_client/models/update_team_params.py b/src/tower/tower_api_client/models/update_team_params.py index d1931a2d..98a16372 100644 --- a/src/tower/tower_api_client/models/update_team_params.py +++ b/src/tower/tower_api_client/models/update_team_params.py @@ -12,32 +12,25 @@ class UpdateTeamParams: """ Attributes: - name (Union[None, str]): The name of the team to create. This is optional, if you supply null it will not update - the team name. - slug (Union[None, str]): The new slug that you want the team to use. This is optional, if you supply null it - will not update the slug. + name (Union[None, str]): The name of the team to to update. This is optional, if you supply null it will not + update the team name. schema (Union[Unset, str]): A URL to the JSON Schema for this object. Example: https://api.tower.dev/v1/schemas/UpdateTeamParams.json. """ name: Union[None, str] - slug: Union[None, str] schema: Union[Unset, str] = UNSET def to_dict(self) -> dict[str, Any]: name: Union[None, str] name = self.name - slug: Union[None, str] - slug = self.slug - schema = self.schema field_dict: dict[str, Any] = {} field_dict.update( { "name": name, - "slug": slug, } ) if schema is not UNSET: @@ -56,18 +49,10 @@ def _parse_name(data: object) -> Union[None, str]: name = _parse_name(d.pop("name")) - def _parse_slug(data: object) -> Union[None, str]: - if data is None: - return data - return cast(Union[None, str], data) - - slug = _parse_slug(d.pop("slug")) - schema = d.pop("$schema", UNSET) update_team_params = cls( name=name, - slug=slug, schema=schema, ) diff --git a/tests/tower/test_client.py b/tests/tower/test_client.py index 964cd09f..c54135ae 100644 --- a/tests/tower/test_client.py +++ b/tests/tower/test_client.py @@ -25,7 +25,6 @@ def mock_api_config(): def mock_run_response_factory(): """Factory to create consistent run response objects.""" def _create_run_response( - app_slug: str = "my-app", app_version: str = "v6", number: int = 0, run_id: str = "50ac9bc1-c783-4359-9917-a706f20dc02c", @@ -40,7 +39,6 @@ def _create_run_response( return { "run": { "app_name": "my-app", - "app_slug": app_slug, "app_version": app_version, "cancelled_at": None, "created_at": "2025-04-25T20:54:58.762547Z", @@ -64,7 +62,6 @@ def _create_run_response( def create_run_object(): """Factory to create Run objects for testing.""" def _create_run( - app_slug: str = "my-app", app_version: str = "v6", number: int = 0, run_id: str = "50ac9bc1-c783-4359-9917-a706f20dc02c", @@ -79,7 +76,6 @@ def _create_run( return Run( app_name="my-app", exit_code=None, - app_slug=app_slug, app_version=app_version, cancelled_at=None, created_at="2025-04-25T20:54:58.762547Z", @@ -112,7 +108,6 @@ def test_running_apps(httpx_mock, mock_api_config, mock_run_response_factory): # Assert the response assert run is not None - assert run.app_slug == "my-app" assert run.status == "pending"