From 34aac5610b4371736853f776d133d715a9f2a167 Mon Sep 17 00:00:00 2001 From: Brad Heller Date: Wed, 22 Jul 2026 14:48:53 +0100 Subject: [PATCH 1/3] chore: Fix the catalog show output and provide a full view --- crates/tower-cmd/src/catalogs.rs | 79 ++++++++++++++++++++++++++++---- 1 file changed, 69 insertions(+), 10 deletions(-) diff --git a/crates/tower-cmd/src/catalogs.rs b/crates/tower-cmd/src/catalogs.rs index eba2a6e0..1970b542 100644 --- a/crates/tower-cmd/src/catalogs.rs +++ b/crates/tower-cmd/src/catalogs.rs @@ -70,6 +70,12 @@ pub fn catalogs_cmd() -> Command { .help("Environment the catalog belongs to") .action(ArgAction::Set), ) + .arg( + Arg::new("full") + .long("full") + .help("List each table's columns and their types") + .action(ArgAction::SetTrue), + ) .about("Show the details of a catalog, including its properties and tables"), ) .subcommand( @@ -235,6 +241,7 @@ pub async fn do_show(out: &output::Out, config: Config, args: &ArgMatches) { .get_one::("catalog_name") .expect("catalog_name is required"); let env = cmd::get_string_flag(args, "environment"); + let full = cmd::get_bool_flag(args, "full"); let response = match api::describe_catalog(&config, name, &env).await { Ok(response) => response, @@ -247,7 +254,7 @@ pub async fn do_show(out: &output::Out, config: Config, args: &ArgMatches) { } let tables = if is_storage { - Some(fetch_catalog_tables(out, &config, name, &env).await) + Some(fetch_catalog_tables(out, &config, name, &env, full).await) } else { None }; @@ -265,8 +272,30 @@ pub async fn do_show(out: &output::Out, config: Config, args: &ArgMatches) { Some(Ok(result)) if result.rows.is_empty() => { human.push_str(" No tables found.\n"); } + Some(Ok(result)) if full => { + for row in &result.rows { + let namespace = json_value_to_cell(row.first().unwrap_or(&serde_json::Value::Null)); + let table = json_value_to_cell(row.get(1).unwrap_or(&serde_json::Value::Null)); + human.push_str(&header_line(&format!("{}.{}", namespace, table))); + + let names = json_array_to_strings(row.get(2)); + let types = json_array_to_strings(row.get(3)); + if names.is_empty() { + human.push_str(" No columns found.\n"); + } else { + let headers = vec!["Column".to_string(), "Type".to_string()]; + let data = names + .iter() + .enumerate() + .map(|(i, n)| vec![n.clone(), types.get(i).cloned().unwrap_or_default()]) + .collect(); + human.push_str(&output::table_text(headers, data)); + } + human.push('\n'); + } + } Some(Ok(result)) => { - let headers = vec!["Schema".to_string(), "Table".to_string()]; + let headers = vec!["Namespace".to_string(), "Table".to_string()]; let data = result .rows .iter() @@ -291,10 +320,26 @@ pub async fn do_show(out: &output::Out, config: Config, args: &ArgMatches) { .rows .iter() .map(|row| { - serde_json::json!({ - "schema": row.first().cloned().unwrap_or(serde_json::Value::Null), + let mut entry = serde_json::json!({ + "namespace": row.first().cloned().unwrap_or(serde_json::Value::Null), "table": row.get(1).cloned().unwrap_or(serde_json::Value::Null), - }) + }); + if full { + let names = json_array_to_strings(row.get(2)); + let types = json_array_to_strings(row.get(3)); + let columns = names + .iter() + .enumerate() + .map(|(i, n)| { + serde_json::json!({ + "name": n, + "type": types.get(i).cloned().unwrap_or_default(), + }) + }) + .collect(); + entry["columns"] = serde_json::Value::Array(columns); + } + entry }) .collect(), ), @@ -317,6 +362,7 @@ async fn fetch_catalog_tables( config: &Config, name: &str, env: &str, + full: bool, ) -> Result { let mut spinner = out.spinner("Listing tables..."); @@ -343,12 +389,16 @@ async fn fetch_catalog_tables( ); let db_name = name.to_string(); + // `SHOW ALL TABLES` already carries each table's `column_names`/`column_types` + // as list columns, so `--full` needs no extra per-table introspection. + let query = if full { + "SELECT \"schema\", name, column_names, column_types FROM (SHOW ALL TABLES) WHERE database = ? ORDER BY \"schema\", name" + } else { + "SELECT \"schema\", name FROM (SHOW ALL TABLES) WHERE database = ? ORDER BY \"schema\", name" + }; + let result = tokio::task::spawn_blocking(move || { - run_duckdb_query( - &setup, - "SELECT \"schema\", name FROM (SHOW ALL TABLES) WHERE database = ? ORDER BY \"schema\", name", - duckdb::params![db_name], - ) + run_duckdb_query(&setup, query, duckdb::params![db_name]) }) .await; match result { @@ -668,6 +718,15 @@ fn json_value_to_cell(value: &serde_json::Value) -> String { } } +/// Flattens a DuckDB list column (surfaced as a JSON array) into display strings. +/// Anything that isn't an array — a null or missing cell — becomes an empty list. +fn json_array_to_strings(value: Option<&serde_json::Value>) -> Vec { + match value { + Some(serde_json::Value::Array(items)) => items.iter().map(json_value_to_cell).collect(), + _ => Vec::new(), + } +} + fn is_storage_catalog_type(catalog_type: Option<&str>) -> bool { catalog_type == Some(STORAGE_CATALOG_TYPE) } From ae47a119635d0806cfaefc182571db980e4fabf0 Mon Sep 17 00:00:00 2001 From: Brad Heller Date: Wed, 22 Jul 2026 15:42:29 +0100 Subject: [PATCH 2/3] chore: Add `--full` to `catalogs show` so we can one-shot the whole environment --- crates/tower-cmd/src/catalogs.rs | 438 +++++++++++++++++++++++++++++-- 1 file changed, 417 insertions(+), 21 deletions(-) diff --git a/crates/tower-cmd/src/catalogs.rs b/crates/tower-cmd/src/catalogs.rs index 1970b542..4dcf6fd7 100644 --- a/crates/tower-cmd/src/catalogs.rs +++ b/crates/tower-cmd/src/catalogs.rs @@ -1,10 +1,13 @@ use clap::{value_parser, Arg, ArgAction, ArgMatches, Command}; use colored::Colorize; use config::Config; +use futures_util::StreamExt; use std::io::{IsTerminal, Read}; +use std::time::{Duration, Instant}; use tower_api::models::{ vend_catalog_credentials_body, CatalogCredentials, DescribeCatalogResponse, }; +use tower_telemetry::debug; use crate::{api, beta, output, util::cmd}; @@ -382,37 +385,42 @@ async fn fetch_catalog_tables( }; let token = response.credentials.oauth_token.clone(); - let setup = attach_statements( - name, - &response.credentials, - vend_catalog_credentials_body::Mode::Read, - ); - let db_name = name.to_string(); - // `SHOW ALL TABLES` already carries each table's `column_names`/`column_types` - // as list columns, so `--full` needs no extra per-table introspection. - let query = if full { - "SELECT \"schema\", name, column_names, column_types FROM (SHOW ALL TABLES) WHERE database = ? ORDER BY \"schema\", name" + // `--full` needs every table's column schema. Going through DuckDB means a + // `DESCRIBE` per table, each of which fully opens the Iceberg table (reading + // manifests from object storage) — slow, and unbounded for tables with heavy + // metadata. The Iceberg REST catalog's `loadTable` returns the schema + // straight from table metadata with no manifest I/O, so `--full` talks to + // the catalog directly. The plain listing stays on DuckDB. + let result = if full { + fetch_catalog_columns_via_rest(&response.credentials).await } else { - "SELECT \"schema\", name FROM (SHOW ALL TABLES) WHERE database = ? ORDER BY \"schema\", name" + let setup = attach_statements( + name, + &response.credentials, + vend_catalog_credentials_body::Mode::Read, + ); + let db_name = name.to_string(); + tokio::task::spawn_blocking(move || { + run_duckdb_query( + &setup, + "SELECT \"schema\", name FROM (SHOW ALL TABLES) WHERE database = ? ORDER BY \"schema\", name", + duckdb::params![db_name], + ) + }) + .await + .map_err(|err| err.to_string()) + .and_then(|inner| inner.map_err(|err| err.to_string())) }; - let result = tokio::task::spawn_blocking(move || { - run_duckdb_query(&setup, query, duckdb::params![db_name]) - }) - .await; match result { - Ok(Ok(query_result)) => { + Ok(query_result) => { spinner.success(out); Ok(query_result) } - Ok(Err(err)) => { - spinner.failure(out); - Err(redact_token(&err.to_string(), &token)) - } Err(err) => { spinner.failure(out); - Err(redact_token(&err.to_string(), &token)) + Err(redact_token(&err, &token)) } } } @@ -572,10 +580,19 @@ fn run_duckdb_query( params: P, ) -> Result { let conn = duckdb::Connection::open_in_memory()?; + // Setup statements embed the vended OAuth token, so time them without logging + // their text. + let setup_start = Instant::now(); for statement in setup { conn.execute_batch(statement)?; } + debug!( + "duckdb: setup ({} statements) took {:?}", + setup.len(), + setup_start.elapsed() + ); + let query_start = Instant::now(); let mut stmt = conn.prepare(query)?; let mut columns: Vec = Vec::new(); let mut rows = Vec::new(); @@ -600,9 +617,388 @@ fn run_duckdb_query( columns = stmt.column_names(); } + debug!( + "duckdb: query took {:?} ({} rows): {}", + query_start.elapsed(), + rows.len(), + query + ); + Ok(QueryResult { columns, rows }) } +/// How many `loadTable` requests `--full` runs against the Iceberg REST catalog +/// at once. Each is a single metadata fetch; kept modest because Polaris rate +/// limits (HTTP 429) aggressive fan-out. Throttled requests are retried, so this +/// only tunes throughput, not correctness. +const CATALOG_LOADTABLE_CONCURRENCY: usize = 4; + +/// How many times to retry a throttled or transient catalog request before +/// giving up on it. +const CATALOG_HTTP_MAX_RETRIES: usize = 4; + +/// Fetches every table's column schema directly from the Iceberg REST catalog. +/// Discovers namespaces and tables through the catalog's list endpoints, then +/// `loadTable`s each table concurrently and reads its current schema — no DuckDB +/// attach and no manifest I/O, which is what makes `DESCRIBE` slow. Returns rows +/// shaped like the plain listing (`[namespace, table, [column names], +/// [column types]]`) so `do_show` renders both modes the same way. A table whose +/// `loadTable` fails is reported with no columns rather than failing the listing. +async fn fetch_catalog_columns_via_rest( + credentials: &CatalogCredentials, +) -> Result { + let client = reqwest::Client::new(); + let base = credentials.catalog_uri.trim_end_matches('/'); + // The vended warehouse is the Polaris REST prefix (see `CatalogCredentials`). + let prefix = credentials.warehouse.as_str(); + let token = credentials.oauth_token.as_str(); + + let list_start = Instant::now(); + let namespaces = list_all_namespaces(&client, base, prefix, token).await?; + let mut tables: Vec<(Vec, String)> = Vec::new(); + for namespace in &namespaces { + for table in list_tables(&client, base, prefix, token, namespace).await? { + tables.push((namespace.clone(), table)); + } + } + debug!( + "catalog rest: discovered {} tables across {} namespaces in {:?}", + tables.len(), + namespaces.len(), + list_start.elapsed() + ); + + let load_start = Instant::now(); + let client = &client; + let mut rows: Vec> = futures_util::stream::iter(tables) + .map(|(namespace, table)| async move { + let display_ns = namespace.join("."); + let started = Instant::now(); + let (names, types) = + match load_table_columns(client, base, prefix, token, &namespace, &table).await { + Ok(columns) => { + debug!( + "catalog rest: loadTable {}.{} took {:?} ({} columns)", + display_ns, + table, + started.elapsed(), + columns.0.len() + ); + columns + } + Err(err) => { + debug!( + "catalog rest: loadTable {}.{} failed after {:?}: {}", + display_ns, + table, + started.elapsed(), + err + ); + (Vec::new(), Vec::new()) + } + }; + vec![ + serde_json::Value::String(display_ns), + serde_json::Value::String(table), + serde_json::Value::Array(names), + serde_json::Value::Array(types), + ] + }) + .buffer_unordered(CATALOG_LOADTABLE_CONCURRENCY) + .collect() + .await; + debug!( + "catalog rest: loaded {} table schemas in {:?}", + rows.len(), + load_start.elapsed() + ); + + // `buffer_unordered` yields as each request finishes, so restore the + // namespace/table ordering the plain listing produces. + rows.sort_by(|a, b| { + let key = |row: &[serde_json::Value]| { + ( + row.first().and_then(|v| v.as_str()).unwrap_or("").to_owned(), + row.get(1).and_then(|v| v.as_str()).unwrap_or("").to_owned(), + ) + }; + key(a).cmp(&key(b)) + }); + + Ok(QueryResult { + columns: vec![ + "schema".to_string(), + "name".to_string(), + "column_names".to_string(), + "column_types".to_string(), + ], + rows, + }) +} + +/// Appends `segments` to the catalog base URL, percent-encoding each segment +/// (so a multi-level namespace joined by the Iceberg `\u{1f}` separator is +/// encoded as one path component). Preserves any path already on the base. +fn build_catalog_url(base: &str, segments: &[&str]) -> Result { + let mut url = reqwest::Url::parse(base).map_err(|err| err.to_string())?; + { + let mut path = url + .path_segments_mut() + .map_err(|_| format!("catalog uri is not a valid base: {}", base))?; + for segment in segments { + path.push(segment); + } + } + Ok(url) +} + +/// Issues an authenticated GET and parses the JSON body, retrying on throttling +/// (HTTP 429) and transient 5xx responses with backoff — Polaris rate limits +/// concurrent `loadTable`s, and an un-retried 429 would drop that table's +/// schema. The bearer token rides in the header, never the URL, so the URL is +/// safe to include in errors. +async fn catalog_get_json( + client: &reqwest::Client, + url: reqwest::Url, + token: &str, +) -> Result { + let url_display = url.as_str().to_owned(); + let mut attempt = 0; + loop { + let response = client + .get(url.clone()) + .bearer_auth(token) + .send() + .await + .map_err(|err| err.to_string())?; + let status = response.status(); + if status.is_success() { + return response + .json::() + .await + .map_err(|err| format!("GET {} -> {}", url_display, err)); + } + + let retryable = + status == reqwest::StatusCode::TOO_MANY_REQUESTS || status.is_server_error(); + if retryable && attempt < CATALOG_HTTP_MAX_RETRIES { + // Honour Retry-After when present; otherwise exponential backoff. + let backoff = retry_after(&response) + .unwrap_or_else(|| Duration::from_millis(200 * (1 << attempt))); + debug!( + "catalog rest: {} returned HTTP {} (attempt {}), retrying in {:?}", + url_display, + status, + attempt + 1, + backoff + ); + attempt += 1; + tokio::time::sleep(backoff).await; + continue; + } + + let body: String = response + .text() + .await + .unwrap_or_default() + .chars() + .take(200) + .collect(); + return Err(format!("GET {} -> HTTP {}: {}", url_display, status, body)); + } +} + +/// Parses a `Retry-After` header expressed in whole seconds, if present. +fn retry_after(response: &reqwest::Response) -> Option { + response + .headers() + .get(reqwest::header::RETRY_AFTER)? + .to_str() + .ok()? + .trim() + .parse::() + .ok() + .map(Duration::from_secs) +} + +/// Walks the catalog's namespace tree breadth-first so nested namespaces are +/// included, not just the top level. Deduped in case a catalog also returns +/// descendants from the root listing. +async fn list_all_namespaces( + client: &reqwest::Client, + base: &str, + prefix: &str, + token: &str, +) -> Result>, String> { + let mut all: Vec> = Vec::new(); + let mut frontier: Vec> = vec![Vec::new()]; + while let Some(parent) = frontier.pop() { + for child in list_namespaces(client, base, prefix, token, &parent).await? { + if !all.contains(&child) { + all.push(child.clone()); + frontier.push(child); + } + } + } + Ok(all) +} + +/// Lists the immediate child namespaces of `parent` (the root when empty). +async fn list_namespaces( + client: &reqwest::Client, + base: &str, + prefix: &str, + token: &str, + parent: &[String], +) -> Result>, String> { + let mut url = build_catalog_url(base, &["v1", prefix, "namespaces"])?; + if !parent.is_empty() { + url.query_pairs_mut() + .append_pair("parent", &parent.join("\u{1f}")); + } + let json = catalog_get_json(client, url, token).await?; + Ok(json + .get("namespaces") + .and_then(|v| v.as_array()) + .map(|list| { + list.iter() + .filter_map(|ns| ns.as_array()) + .map(|levels| { + levels + .iter() + .filter_map(|level| level.as_str().map(str::to_owned)) + .collect() + }) + .collect() + }) + .unwrap_or_default()) +} + +/// Lists the table names in a single namespace. +async fn list_tables( + client: &reqwest::Client, + base: &str, + prefix: &str, + token: &str, + namespace: &[String], +) -> Result, String> { + let ns = namespace.join("\u{1f}"); + let url = build_catalog_url(base, &["v1", prefix, "namespaces", &ns, "tables"])?; + let json = catalog_get_json(client, url, token).await?; + Ok(json + .get("identifiers") + .and_then(|v| v.as_array()) + .map(|list| { + list.iter() + .filter_map(|ident| ident.get("name").and_then(|n| n.as_str())) + .map(str::to_owned) + .collect() + }) + .unwrap_or_default()) +} + +/// `loadTable`s one table and extracts its current schema as parallel +/// `(column names, column types)` vectors. Falls back to the first schema, and +/// to legacy single-`schema` metadata, when `current-schema-id` isn't matched. +async fn load_table_columns( + client: &reqwest::Client, + base: &str, + prefix: &str, + token: &str, + namespace: &[String], + table: &str, +) -> Result<(Vec, Vec), String> { + let ns = namespace.join("\u{1f}"); + let url = build_catalog_url(base, &["v1", prefix, "namespaces", &ns, "tables", table])?; + let json = catalog_get_json(client, url, token).await?; + + let metadata = json + .get("metadata") + .ok_or_else(|| "loadTable response missing `metadata`".to_string())?; + let current = metadata.get("current-schema-id").and_then(|v| v.as_i64()); + let schema = match (metadata.get("schemas").and_then(|v| v.as_array()), current) { + (Some(schemas), Some(id)) => schemas + .iter() + .find(|s| s.get("schema-id").and_then(|v| v.as_i64()) == Some(id)) + .or_else(|| schemas.first()), + (Some(schemas), None) => schemas.first(), + (None, _) => metadata.get("schema"), + }; + + let fields = schema + .and_then(|s| s.get("fields")) + .and_then(|v| v.as_array()); + let mut names = Vec::new(); + let mut types = Vec::new(); + if let Some(fields) = fields { + for field in fields { + let name = field + .get("name") + .and_then(|v| v.as_str()) + .unwrap_or_default() + .to_owned(); + let ty = iceberg_type_to_display(field.get("type").unwrap_or(&serde_json::Value::Null)); + names.push(serde_json::Value::String(name)); + types.push(serde_json::Value::String(ty)); + } + } + Ok((names, types)) +} + +/// Renders an Iceberg field type (from `loadTable` metadata) as a display +/// string, mapping primitives to the DuckDB-style names the plain listing shows +/// and summarising nested types. +fn iceberg_type_to_display(ty: &serde_json::Value) -> String { + match ty { + serde_json::Value::String(name) => iceberg_primitive_to_display(name), + serde_json::Value::Object(obj) => match obj.get("type").and_then(|v| v.as_str()) { + Some("struct") => "STRUCT".to_string(), + Some("list") => { + let element = obj + .get("element") + .map(iceberg_type_to_display) + .unwrap_or_default(); + format!("LIST({})", element) + } + Some("map") => { + let key = obj.get("key").map(iceberg_type_to_display).unwrap_or_default(); + let value = obj + .get("value") + .map(iceberg_type_to_display) + .unwrap_or_default(); + format!("MAP({}, {})", key, value) + } + Some(other) => other.to_uppercase(), + None => "UNKNOWN".to_string(), + }, + _ => "UNKNOWN".to_string(), + } +} + +/// Maps an Iceberg primitive type name to its DuckDB-style display name so the +/// `--full` output matches the types the plain listing used to show. +fn iceberg_primitive_to_display(name: &str) -> String { + match name { + "boolean" => "BOOLEAN".to_string(), + "int" => "INTEGER".to_string(), + "long" => "BIGINT".to_string(), + "float" => "FLOAT".to_string(), + "double" => "DOUBLE".to_string(), + "date" => "DATE".to_string(), + "time" => "TIME".to_string(), + "timestamp" => "TIMESTAMP".to_string(), + "timestamp_ns" => "TIMESTAMP_NS".to_string(), + "timestamptz" | "timestamptz_ns" => "TIMESTAMP WITH TIME ZONE".to_string(), + "string" => "VARCHAR".to_string(), + "uuid" => "UUID".to_string(), + "binary" => "BLOB".to_string(), + // decimal(P, S) is already descriptive; fixed[L] has no tidy SQL name. + other if other.starts_with("decimal") => other.to_uppercase(), + other if other.starts_with("fixed") => "BLOB".to_string(), + other => other.to_uppercase(), + } +} + fn duckdb_value_to_json(value: duckdb::types::Value) -> serde_json::Value { use duckdb::types::{TimeUnit, Value}; use serde_json::json; From cf2672205d931a8f7923bf8b7c8f4cc095ef137c Mon Sep 17 00:00:00 2001 From: Brad Heller Date: Wed, 22 Jul 2026 16:04:20 +0100 Subject: [PATCH 3/3] chore: Add `catalog facts` to tower-cli --- crates/tower-api/README.md | 13 +- crates/tower-api/src/apis/configuration.rs | 2 +- crates/tower-api/src/apis/default_api.rs | 388 ++++++++++- .../tower-api/src/apis/feature_flags_api.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/api_key_owner.rs | 2 +- crates/tower-api/src/models/app.rs | 6 +- crates/tower-api/src/models/app_statistics.rs | 2 +- crates/tower-api/src/models/app_summary.rs | 2 +- crates/tower-api/src/models/app_tag.rs | 29 + crates/tower-api/src/models/app_version.rs | 2 +- .../src/models/authentication_context.rs | 2 +- .../src/models/batch_schedule_params.rs | 2 +- .../src/models/batch_schedule_response.rs | 2 +- .../src/models/cancel_run_response.rs | 2 +- crates/tower-api/src/models/catalog.rs | 2 +- .../src/models/catalog_credentials.rs | 2 +- crates/tower-api/src/models/catalog_fact.rs | 151 +++++ .../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 | 28 +- .../src/models/create_app_response.rs | 2 +- .../src/models/create_catalog_params.rs | 2 +- .../src/models/create_catalog_response.rs | 2 +- .../create_device_login_ticket_response.rs | 2 +- .../src/models/create_environment_params.rs | 2 +- .../src/models/create_environment_response.rs | 2 +- .../src/models/create_guest_params.rs | 2 +- .../src/models/create_guest_response.rs | 2 +- .../models/create_sandbox_secrets_params.rs | 2 +- .../models/create_sandbox_secrets_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 +- .../create_service_account_api_key_params.rs | 2 +- ...create_service_account_api_key_response.rs | 2 +- .../models/create_service_account_params.rs | 2 +- .../models/create_service_account_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/create_webhook_params.rs | 2 +- .../src/models/create_webhook_response.rs | 2 +- .../src/models/delete_api_key_params.rs | 2 +- .../src/models/delete_api_key_response.rs | 2 +- .../src/models/delete_app_response.rs | 2 +- .../src/models/delete_catalog_response.rs | 2 +- .../src/models/delete_environment_response.rs | 2 +- .../src/models/delete_guest_output_body.rs | 2 +- .../src/models/delete_schedule_params.rs | 2 +- .../src/models/delete_schedule_response.rs | 2 +- .../src/models/delete_secret_response.rs | 2 +- .../delete_service_account_api_key_params.rs | 2 +- .../src/models/delete_session_params.rs | 2 +- .../src/models/delete_session_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/delete_webhook_response.rs | 2 +- .../src/models/deploy_app_request.rs | 2 +- .../src/models/deploy_app_response.rs | 2 +- .../src/models/describe_account_body.rs | 2 +- .../src/models/describe_app_response.rs | 2 +- .../models/describe_app_version_response.rs | 2 +- .../describe_authentication_context_body.rs | 2 +- .../models/describe_catalog_fact_response.rs | 29 + .../src/models/describe_catalog_response.rs | 2 +- .../describe_device_login_session_response.rs | 2 +- .../models/describe_email_preferences_body.rs | 2 +- .../models/describe_environment_response.rs | 2 +- .../src/models/describe_plan_response.rs | 2 +- .../src/models/describe_run_graph_response.rs | 2 +- .../src/models/describe_run_links.rs | 2 +- .../src/models/describe_run_logs_response.rs | 2 +- .../src/models/describe_run_response.rs | 2 +- .../models/describe_secrets_key_response.rs | 2 +- .../describe_service_account_response.rs | 2 +- .../src/models/describe_session_response.rs | 2 +- .../src/models/describe_team_response.rs | 2 +- .../src/models/describe_webhook_response.rs | 2 +- .../src/models/describe_whoami_response.rs | 2 +- .../src/models/email_subscriptions.rs | 2 +- .../src/models/encrypted_catalog_property.rs | 2 +- crates/tower-api/src/models/environment.rs | 2 +- crates/tower-api/src/models/error_detail.rs | 2 +- crates/tower-api/src/models/error_model.rs | 2 +- crates/tower-api/src/models/event_alert.rs | 2 +- crates/tower-api/src/models/event_error.rs | 2 +- crates/tower-api/src/models/event_log.rs | 2 +- .../tower-api/src/models/event_shouldertap.rs | 2 +- crates/tower-api/src/models/event_warning.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 +- crates/tower-api/src/models/feature.rs | 2 +- .../src/models/featurebase_identity.rs | 2 +- .../generate_app_statistics_response.rs | 2 +- ...organization_usage_time_series_response.rs | 2 +- .../generate_run_statistics_response.rs | 2 +- .../generate_runner_credentials_response.rs | 2 +- .../models/get_feature_flag_response_body.rs | 2 +- crates/tower-api/src/models/guest.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_response.rs | 2 +- .../src/models/list_api_keys_response.rs | 2 +- .../models/list_app_environments_response.rs | 2 +- .../src/models/list_app_versions_response.rs | 2 +- .../src/models/list_apps_response.rs | 2 +- .../src/models/list_catalog_facts_response.rs | 32 + .../src/models/list_catalogs_response.rs | 2 +- .../src/models/list_environments_response.rs | 2 +- .../src/models/list_guests_response.rs | 2 +- .../list_my_team_invitations_response.rs | 2 +- .../src/models/list_runners_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 +- .../list_service_account_api_keys_response.rs | 2 +- .../models/list_service_accounts_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 +- .../src/models/list_webhooks_response.rs | 2 +- crates/tower-api/src/models/mod.rs | 14 + crates/tower-api/src/models/organization.rs | 2 +- .../src/models/organization_usage.rs | 2 +- crates/tower-api/src/models/pagination.rs | 2 +- crates/tower-api/src/models/parameter.rs | 2 +- crates/tower-api/src/models/plan.rs | 2 +- .../src/models/refresh_session_params.rs | 2 +- .../src/models/refresh_session_response.rs | 2 +- .../regenerate_guest_login_url_params.rs | 2 +- .../regenerate_guest_login_url_response.rs | 2 +- .../src/models/remove_team_member_params.rs | 2 +- .../src/models/remove_team_member_response.rs | 2 +- .../models/resend_team_invitation_params.rs | 2 +- .../models/resend_team_invitation_response.rs | 2 +- crates/tower-api/src/models/run.rs | 2 +- .../src/models/run_app_initiator_data.rs | 2 +- crates/tower-api/src/models/run_app_params.rs | 2 +- .../tower-api/src/models/run_app_response.rs | 2 +- crates/tower-api/src/models/run_attempt.rs | 2 +- crates/tower-api/src/models/run_creator.rs | 2 +- .../tower-api/src/models/run_failure_alert.rs | 2 +- crates/tower-api/src/models/run_graph_node.rs | 2 +- .../tower-api/src/models/run_graph_run_id.rs | 2 +- crates/tower-api/src/models/run_initiator.rs | 2 +- .../src/models/run_initiator_details.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 +- .../tower-api/src/models/run_retry_policy.rs | 2 +- .../src/models/run_run_initiator_details.rs | 2 +- crates/tower-api/src/models/run_statistics.rs | 2 +- .../src/models/run_timeseries_point.rs | 2 +- crates/tower-api/src/models/runner.rs | 2 +- .../src/models/runner_credentials.rs | 2 +- crates/tower-api/src/models/schedule.rs | 2 +- crates/tower-api/src/models/schedule_owner.rs | 2 +- .../models/schedule_run_initiator_details.rs | 2 +- .../src/models/search_runs_response.rs | 2 +- crates/tower-api/src/models/secret.rs | 2 +- .../src/models/server_sent_events_inner.rs | 2 +- .../src/models/server_sent_events_inner_1.rs | 2 +- .../src/models/server_sent_events_inner_2.rs | 2 +- .../tower-api/src/models/service_account.rs | 2 +- .../src/models/service_account_creator.rs | 2 +- crates/tower-api/src/models/session.rs | 2 +- crates/tower-api/src/models/shoulder_tap.rs | 2 +- crates/tower-api/src/models/sse_warning.rs | 2 +- .../src/models/statistics_settings.rs | 2 +- crates/tower-api/src/models/tag_filter.rs | 75 +++ crates/tower-api/src/models/team.rs | 2 +- .../tower-api/src/models/team_invitation.rs | 2 +- .../tower-api/src/models/team_membership.rs | 2 +- .../src/models/test_webhook_response.rs | 2 +- crates/tower-api/src/models/token.rs | 2 +- .../src/models/update_account_params.rs | 7 +- .../src/models/update_account_response.rs | 2 +- .../models/update_app_environment_params.rs | 2 +- .../models/update_app_environment_response.rs | 2 +- .../tower-api/src/models/update_app_params.rs | 17 +- .../src/models/update_app_response.rs | 2 +- .../src/models/update_catalog_fact_body.rs | 129 ++++ .../models/update_catalog_fact_response.rs | 29 + .../src/models/update_catalog_params.rs | 2 +- .../src/models/update_catalog_response.rs | 2 +- .../models/update_email_preferences_body.rs | 2 +- .../src/models/update_environment_params.rs | 2 +- .../src/models/update_environment_response.rs | 2 +- .../update_my_team_invitation_params.rs | 2 +- .../update_my_team_invitation_response.rs | 2 +- .../src/models/update_organization_params.rs | 2 +- .../models/update_organization_response.rs | 2 +- .../src/models/update_plan_params.rs | 2 +- .../src/models/update_plan_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 +- .../models/update_service_account_params.rs | 2 +- .../models/update_service_account_response.rs | 2 +- .../src/models/update_team_member_params.rs | 2 +- .../src/models/update_team_member_response.rs | 2 +- .../src/models/update_team_params.rs | 7 +- .../src/models/update_team_response.rs | 2 +- .../src/models/update_user_params.rs | 2 +- .../src/models/update_user_response.rs | 2 +- .../src/models/update_webhook_params.rs | 2 +- .../src/models/update_webhook_response.rs | 2 +- crates/tower-api/src/models/usage_limit.rs | 2 +- .../models/usage_metric_time_series_point.rs | 2 +- crates/tower-api/src/models/user.rs | 2 +- .../models/vend_catalog_credentials_body.rs | 2 +- .../vend_catalog_credentials_response.rs | 2 +- crates/tower-api/src/models/webhook.rs | 2 +- crates/tower-cmd/src/api.rs | 137 ++++ crates/tower-cmd/src/catalogs.rs | 604 +++++++++++++++++- crates/tower-cmd/src/lib.rs | 18 + crates/tower-cmd/src/util/apps.rs | 4 + 240 files changed, 1925 insertions(+), 234 deletions(-) create mode 100644 crates/tower-api/src/models/app_tag.rs create mode 100644 crates/tower-api/src/models/catalog_fact.rs create mode 100644 crates/tower-api/src/models/describe_catalog_fact_response.rs create mode 100644 crates/tower-api/src/models/list_catalog_facts_response.rs create mode 100644 crates/tower-api/src/models/tag_filter.rs create mode 100644 crates/tower-api/src/models/update_catalog_fact_body.rs create mode 100644 crates/tower-api/src/models/update_catalog_fact_response.rs diff --git a/crates/tower-api/README.md b/crates/tower-api/README.md index 77a6697c..6c22dca1 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.11.12 +- API version: v0.11.17 - Package version: 1.0.0 - Generator version: 7.19.0 - Build package: `org.openapitools.codegen.languages.RustClientCodegen` @@ -53,6 +53,7 @@ Class | Method | HTTP request | Description *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/{name} | Delete app *DefaultApi* | [**delete_catalog**](docs/DefaultApi.md#delete_catalog) | **DELETE** /catalogs/{name} | Delete catalog +*DefaultApi* | [**delete_catalog_fact**](docs/DefaultApi.md#delete_catalog_fact) | **DELETE** /catalogs/{catalog}/facts/{name} | Delete a catalog fact *DefaultApi* | [**delete_environment**](docs/DefaultApi.md#delete_environment) | **DELETE** /environments/{name} | Delete environment *DefaultApi* | [**delete_guest**](docs/DefaultApi.md#delete_guest) | **DELETE** /guests/{guest_id} | Delete guest *DefaultApi* | [**delete_schedule**](docs/DefaultApi.md#delete_schedule) | **DELETE** /schedules | Delete schedule @@ -69,6 +70,7 @@ Class | Method | HTTP request | Description *DefaultApi* | [**describe_app_version**](docs/DefaultApi.md#describe_app_version) | **GET** /apps/{name}/versions/{num} | Describe app version *DefaultApi* | [**describe_authentication_context**](docs/DefaultApi.md#describe_authentication_context) | **GET** /user/auth-context | Describe authentication context *DefaultApi* | [**describe_catalog**](docs/DefaultApi.md#describe_catalog) | **GET** /catalogs/{name} | Describe catalog +*DefaultApi* | [**describe_catalog_fact**](docs/DefaultApi.md#describe_catalog_fact) | **GET** /catalogs/{catalog}/facts/{name} | Describe a catalog fact *DefaultApi* | [**describe_default_catalog**](docs/DefaultApi.md#describe_default_catalog) | **GET** /storage/catalogs/default | Describe default catalog *DefaultApi* | [**describe_device_login_session**](docs/DefaultApi.md#describe_device_login_session) | **GET** /login/device/{device_code} | Describe device login session *DefaultApi* | [**describe_email_preferences**](docs/DefaultApi.md#describe_email_preferences) | **GET** /user/email-preferences | Describe email preferences @@ -97,6 +99,7 @@ Class | Method | HTTP request | Description *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_catalog_facts**](docs/DefaultApi.md#list_catalog_facts) | **GET** /catalogs/{catalog}/facts | List catalog facts *DefaultApi* | [**list_catalogs**](docs/DefaultApi.md#list_catalogs) | **GET** /catalogs | List catalogs *DefaultApi* | [**list_environments**](docs/DefaultApi.md#list_environments) | **GET** /environments | List environments *DefaultApi* | [**list_guests**](docs/DefaultApi.md#list_guests) | **GET** /guests | List guests @@ -125,6 +128,7 @@ Class | Method | HTTP request | Description *DefaultApi* | [**update_app**](docs/DefaultApi.md#update_app) | **PUT** /apps/{name} | Update app *DefaultApi* | [**update_app_environment**](docs/DefaultApi.md#update_app_environment) | **PUT** /apps/{name}/environments/{environment} | Update app environment *DefaultApi* | [**update_catalog**](docs/DefaultApi.md#update_catalog) | **PUT** /catalogs/{name} | Update catalog +*DefaultApi* | [**update_catalog_fact**](docs/DefaultApi.md#update_catalog_fact) | **PUT** /catalogs/{catalog}/facts/{name} | Update a catalog fact *DefaultApi* | [**update_email_preferences**](docs/DefaultApi.md#update_email_preferences) | **PUT** /user/email-preferences | Update email preferences *DefaultApi* | [**update_environment**](docs/DefaultApi.md#update_environment) | **PUT** /environments/{name} | Update environment *DefaultApi* | [**update_my_team_invitation**](docs/DefaultApi.md#update_my_team_invitation) | **PUT** /team-invites | Update my team invitation @@ -152,6 +156,7 @@ Class | Method | HTTP request | Description - [App](docs/App.md) - [AppStatistics](docs/AppStatistics.md) - [AppSummary](docs/AppSummary.md) + - [AppTag](docs/AppTag.md) - [AppVersion](docs/AppVersion.md) - [AuthenticationContext](docs/AuthenticationContext.md) - [BatchScheduleParams](docs/BatchScheduleParams.md) @@ -159,6 +164,7 @@ Class | Method | HTTP request | Description - [CancelRunResponse](docs/CancelRunResponse.md) - [Catalog](docs/Catalog.md) - [CatalogCredentials](docs/CatalogCredentials.md) + - [CatalogFact](docs/CatalogFact.md) - [CatalogProperty](docs/CatalogProperty.md) - [ClaimDeviceLoginTicketParams](docs/ClaimDeviceLoginTicketParams.md) - [ClaimDeviceLoginTicketResponse](docs/ClaimDeviceLoginTicketResponse.md) @@ -215,6 +221,7 @@ Class | Method | HTTP request | Description - [DescribeAppResponse](docs/DescribeAppResponse.md) - [DescribeAppVersionResponse](docs/DescribeAppVersionResponse.md) - [DescribeAuthenticationContextBody](docs/DescribeAuthenticationContextBody.md) + - [DescribeCatalogFactResponse](docs/DescribeCatalogFactResponse.md) - [DescribeCatalogResponse](docs/DescribeCatalogResponse.md) - [DescribeDeviceLoginSessionResponse](docs/DescribeDeviceLoginSessionResponse.md) - [DescribeEmailPreferencesBody](docs/DescribeEmailPreferencesBody.md) @@ -263,6 +270,7 @@ Class | Method | HTTP request | Description - [ListAppEnvironmentsResponse](docs/ListAppEnvironmentsResponse.md) - [ListAppVersionsResponse](docs/ListAppVersionsResponse.md) - [ListAppsResponse](docs/ListAppsResponse.md) + - [ListCatalogFactsResponse](docs/ListCatalogFactsResponse.md) - [ListCatalogsResponse](docs/ListCatalogsResponse.md) - [ListEnvironmentsResponse](docs/ListEnvironmentsResponse.md) - [ListGuestsResponse](docs/ListGuestsResponse.md) @@ -325,6 +333,7 @@ Class | Method | HTTP request | Description - [ShoulderTap](docs/ShoulderTap.md) - [SseWarning](docs/SseWarning.md) - [StatisticsSettings](docs/StatisticsSettings.md) + - [TagFilter](docs/TagFilter.md) - [Team](docs/Team.md) - [TeamInvitation](docs/TeamInvitation.md) - [TeamMembership](docs/TeamMembership.md) @@ -336,6 +345,8 @@ Class | Method | HTTP request | Description - [UpdateAppEnvironmentResponse](docs/UpdateAppEnvironmentResponse.md) - [UpdateAppParams](docs/UpdateAppParams.md) - [UpdateAppResponse](docs/UpdateAppResponse.md) + - [UpdateCatalogFactBody](docs/UpdateCatalogFactBody.md) + - [UpdateCatalogFactResponse](docs/UpdateCatalogFactResponse.md) - [UpdateCatalogParams](docs/UpdateCatalogParams.md) - [UpdateCatalogResponse](docs/UpdateCatalogResponse.md) - [UpdateEmailPreferencesBody](docs/UpdateEmailPreferencesBody.md) diff --git a/crates/tower-api/src/apis/configuration.rs b/crates/tower-api/src/apis/configuration.rs index 0458570c..eed91008 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 a80c32a1..80aa8413 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -170,6 +170,17 @@ pub struct DeleteCatalogParams { pub environment: Option, } +/// struct for passing parameters to the method [`delete_catalog_fact`] +#[derive(Clone, Debug)] +pub struct DeleteCatalogFactParams { + /// The name of the catalog. + pub catalog: String, + /// The name of the fact. + pub name: String, + /// The environment of the catalog. + pub environment: Option, +} + /// struct for passing parameters to the method [`delete_environment`] #[derive(Clone, Debug)] pub struct DeleteEnvironmentParams { @@ -302,6 +313,17 @@ pub struct DescribeCatalogParams { pub environment: Option, } +/// struct for passing parameters to the method [`describe_catalog_fact`] +#[derive(Clone, Debug)] +pub struct DescribeCatalogFactParams { + /// The name of the catalog. + pub catalog: String, + /// The name of the fact. + pub name: String, + /// The environment of the catalog. + pub environment: Option, +} + /// struct for passing parameters to the method [`describe_device_login_session`] #[derive(Clone, Debug)] pub struct DescribeDeviceLoginSessionParams { @@ -352,6 +374,10 @@ pub struct DescribeRunLogsParams { pub seq: i64, /// Fetch logs from this timestamp onwards (inclusive). pub start_at: Option, + /// Return only the first N log lines. Cannot be combined with tail. + pub head: Option, + /// Return only the last N log lines. Cannot be combined with head. + pub tail: Option, } /// struct for passing parameters to the method [`describe_secrets_key`] @@ -480,6 +506,8 @@ pub struct ListAppsParams { pub page: Option, /// The number of records to fetch on each page. pub page_size: Option, + /// The tag query to filter apps by. Provide a serialized TagFilter as the value for the parameter. + pub tag_filter: Option, /// The search query to filter apps by. pub query: Option, /// Number of recent runs to fetch (-1 for all runs, defaults to 20) @@ -492,6 +520,19 @@ pub struct ListAppsParams { pub environment: Option, } +/// struct for passing parameters to the method [`list_catalog_facts`] +#[derive(Clone, Debug)] +pub struct ListCatalogFactsParams { + /// The name of the catalog. + pub catalog: String, + /// The environment of the catalog. + pub environment: Option, + /// Filter facts by scope. When omitted, facts of every scope are returned. + pub scope: Option, + /// Filter facts by object path (exact match). When omitted, facts about any object are returned. + pub object: Option, +} + /// struct for passing parameters to the method [`list_catalogs`] #[derive(Clone, Debug)] pub struct ListCatalogsParams { @@ -727,6 +768,18 @@ pub struct UpdateCatalogParams { pub update_catalog_params: models::UpdateCatalogParams, } +/// struct for passing parameters to the method [`update_catalog_fact`] +#[derive(Clone, Debug)] +pub struct UpdateCatalogFactParams { + /// The name of the catalog. + pub catalog: String, + /// The name of the fact. + pub name: String, + pub update_catalog_fact_body: models::UpdateCatalogFactBody, + /// The environment of the catalog. + pub environment: Option, +} + /// struct for passing parameters to the method [`update_email_preferences`] #[derive(Clone, Debug)] pub struct UpdateEmailPreferencesParams { @@ -1032,6 +1085,14 @@ pub enum DeleteCatalogSuccess { UnknownValue(serde_json::Value), } +/// struct for typed successes of method [`delete_catalog_fact`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteCatalogFactSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + /// struct for typed successes of method [`delete_environment`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -1160,6 +1221,14 @@ pub enum DescribeCatalogSuccess { UnknownValue(serde_json::Value), } +/// struct for typed successes of method [`describe_catalog_fact`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DescribeCatalogFactSuccess { + Status200(models::DescribeCatalogFactResponse), + UnknownValue(serde_json::Value), +} + /// struct for typed successes of method [`describe_default_catalog`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -1385,6 +1454,14 @@ pub enum ListAppsSuccess { UnknownValue(serde_json::Value), } +/// struct for typed successes of method [`list_catalog_facts`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListCatalogFactsSuccess { + Status200(models::ListCatalogFactsResponse), + UnknownValue(serde_json::Value), +} + /// struct for typed successes of method [`list_catalogs`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -1609,6 +1686,14 @@ pub enum UpdateCatalogSuccess { UnknownValue(serde_json::Value), } +/// struct for typed successes of method [`update_catalog_fact`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateCatalogFactSuccess { + Status200(models::UpdateCatalogFactResponse), + UnknownValue(serde_json::Value), +} + /// struct for typed successes of method [`update_email_preferences`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -1924,6 +2009,14 @@ pub enum DeleteCatalogError { UnknownValue(serde_json::Value), } +/// struct for typed errors of method [`delete_catalog_fact`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteCatalogFactError { + DefaultResponse(models::ErrorModel), + UnknownValue(serde_json::Value), +} + /// struct for typed errors of method [`delete_environment`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -2054,6 +2147,14 @@ pub enum DescribeCatalogError { UnknownValue(serde_json::Value), } +/// struct for typed errors of method [`describe_catalog_fact`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DescribeCatalogFactError { + DefaultResponse(models::ErrorModel), + UnknownValue(serde_json::Value), +} + /// struct for typed errors of method [`describe_default_catalog`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -2279,6 +2380,14 @@ pub enum ListAppsError { UnknownValue(serde_json::Value), } +/// struct for typed errors of method [`list_catalog_facts`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListCatalogFactsError { + DefaultResponse(models::ErrorModel), + UnknownValue(serde_json::Value), +} + /// struct for typed errors of method [`list_catalogs`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -2503,6 +2612,14 @@ pub enum UpdateCatalogError { UnknownValue(serde_json::Value), } +/// struct for typed errors of method [`update_catalog_fact`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateCatalogFactError { + DefaultResponse(models::ErrorModel), + UnknownValue(serde_json::Value), +} + /// struct for typed errors of method [`update_email_preferences`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -4111,6 +4228,71 @@ pub async fn delete_catalog( } } +/// Deletes a semantic metadata fact addressed by its name within a catalog. +pub async fn delete_catalog_fact( + configuration: &configuration::Configuration, + params: DeleteCatalogFactParams, +) -> Result, Error> { + let uri_str = format!( + "{}/catalogs/{catalog}/facts/{name}", + configuration.base_path, + catalog = crate::apis::urlencode(params.catalog), + 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()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-API-Key", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + let tower_trace_id = resp + .headers() + .get("x-tower-trace-id") + .and_then(|v| v.to_str().ok()) + .map_or(String::from(DEFAULT_TOWER_TRACE_ID), String::from); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { + tower_trace_id, + status, + content, + entity, + }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + tower_trace_id, + status, + content, + entity, + })) + } +} + /// Delete an environment by name pub async fn delete_environment( configuration: &configuration::Configuration, @@ -5110,6 +5292,69 @@ pub async fn describe_catalog( } } +/// Returns a single semantic metadata fact addressed by its name within a catalog. +pub async fn describe_catalog_fact( + configuration: &configuration::Configuration, + params: DescribeCatalogFactParams, +) -> Result, Error> { + let uri_str = format!( + "{}/catalogs/{catalog}/facts/{name}", + configuration.base_path, + catalog = crate::apis::urlencode(params.catalog), + name = crate::apis::urlencode(params.name) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = params.environment { + req_builder = req_builder.query(&[("environment", ¶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()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-API-Key", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + let tower_trace_id = resp + .headers() + .get("x-tower-trace-id") + .and_then(|v| v.to_str().ok()) + .map_or(String::from(DEFAULT_TOWER_TRACE_ID), String::from); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { + tower_trace_id, + status, + content, + entity, + }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + tower_trace_id, + status, + content, + entity, + })) + } +} + /// Returns the team's default catalog, provisioning it lazily if it does not yet exist. When two concurrent first calls race to provision the catalog, the loser receives 202 Accepted; retry after a few seconds and the catalog will be ready. pub async fn describe_default_catalog( configuration: &configuration::Configuration, @@ -5581,6 +5826,12 @@ pub async fn describe_run_logs( if let Some(ref param_value) = params.start_at { req_builder = req_builder.query(&[("start_at", ¶m_value.to_string())]); } + if let Some(ref param_value) = params.head { + req_builder = req_builder.query(&[("head", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.tail { + req_builder = req_builder.query(&[("tail", ¶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()); } @@ -6734,6 +6985,9 @@ pub async fn list_apps( if let Some(ref param_value) = params.page_size { req_builder = req_builder.query(&[("page_size", ¶m_value.to_string())]); } + if let Some(ref param_value) = params.tag_filter { + req_builder = req_builder.query(&[("tag_filter", ¶m_value.to_string())]); + } if let Some(ref param_value) = params.query { req_builder = req_builder.query(&[("query", ¶m_value.to_string())]); } @@ -6796,6 +7050,74 @@ pub async fn list_apps( } } +/// Lists the semantic metadata facts attached to a catalog, optionally filtered by scope and/or object path. +pub async fn list_catalog_facts( + configuration: &configuration::Configuration, + params: ListCatalogFactsParams, +) -> Result, Error> { + let uri_str = format!( + "{}/catalogs/{catalog}/facts", + configuration.base_path, + catalog = crate::apis::urlencode(params.catalog) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = params.environment { + req_builder = req_builder.query(&[("environment", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.scope { + req_builder = req_builder.query(&[("scope", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.object { + req_builder = req_builder.query(&[("object", ¶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()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-API-Key", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + let tower_trace_id = resp + .headers() + .get("x-tower-trace-id") + .and_then(|v| v.to_str().ok()) + .map_or(String::from(DEFAULT_TOWER_TRACE_ID), String::from); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { + tower_trace_id, + status, + content, + entity, + }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + tower_trace_id, + status, + content, + entity, + })) + } +} + /// Lists all the catalogs associated with your current account. pub async fn list_catalogs( configuration: &configuration::Configuration, @@ -8550,6 +8872,70 @@ pub async fn update_catalog( } } +/// Idempotently sets a semantic metadata fact by name: creates it when the name is new, updates it when it already exists. An inferred write cannot overwrite an existing confirmed fact. +pub async fn update_catalog_fact( + configuration: &configuration::Configuration, + params: UpdateCatalogFactParams, +) -> Result, Error> { + let uri_str = format!( + "{}/catalogs/{catalog}/facts/{name}", + configuration.base_path, + catalog = crate::apis::urlencode(params.catalog), + name = crate::apis::urlencode(params.name) + ); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &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()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("X-API-Key", value); + }; + req_builder = req_builder.json(¶ms.update_catalog_fact_body); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + let tower_trace_id = resp + .headers() + .get("x-tower-trace-id") + .and_then(|v| v.to_str().ok()) + .map_or(String::from(DEFAULT_TOWER_TRACE_ID), String::from); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { + tower_trace_id, + status, + content, + entity, + }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + tower_trace_id, + status, + content, + entity, + })) + } +} + /// Updates the set of email preferences the current user has. If a partial set of preferences is submitted, it will be updated accordingly. pub async fn update_email_preferences( configuration: &configuration::Configuration, diff --git a/crates/tower-api/src/apis/feature_flags_api.rs b/crates/tower-api/src/apis/feature_flags_api.rs index 562e1050..bb90cc43 100644 --- a/crates/tower-api/src/apis/feature_flags_api.rs +++ b/crates/tower-api/src/apis/feature_flags_api.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 5d517280..13f84cda 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 3e5ae388..d55f0d56 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 cf0960a6..3562b641 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 150914cb..917366f8 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 e4ff77db..c92f2dff 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/api_key_owner.rs b/crates/tower-api/src/models/api_key_owner.rs index f079c412..840d5b93 100644 --- a/crates/tower-api/src/models/api_key_owner.rs +++ b/crates/tower-api/src/models/api_key_owner.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 62771ba8..6afd89c2 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -69,6 +69,9 @@ pub struct App { /// The subdomain that this app is accessible via. Must be externally accessible first. #[serde(rename = "subdomain", skip_serializing_if = "Option::is_none")] pub subdomain: Option, + /// The tags applied to the app. + #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] + pub tags: Option>, /// The current version of this app, null if none. #[serde(rename = "version", deserialize_with = "Option::deserialize")] pub version: Option, @@ -105,6 +108,7 @@ impl App { slug: None, status: None, subdomain: None, + tags: None, version, } } diff --git a/crates/tower-api/src/models/app_statistics.rs b/crates/tower-api/src/models/app_statistics.rs index ac1c918f..e691a736 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 0e8a7d62..fd6eaacf 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/app_tag.rs b/crates/tower-api/src/models/app_tag.rs new file mode 100644 index 00000000..59fadff6 --- /dev/null +++ b/crates/tower-api/src/models/app_tag.rs @@ -0,0 +1,29 @@ +/* + * Tower API + * + * REST API to interact with Tower Services. + * + * The version of the OpenAPI document: v0.11.17 + * Contact: hello@tower.dev + * Generated by: https://openapi-generator.tech + */ +use crate::models; +use serde::{Deserialize, Deserializer, Serialize}; +use serde_with::{serde_as, DefaultOnNull}; + +#[serde_as] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AppTag { + #[serde_as(as = "DefaultOnNull")] + #[serde(rename = "name")] + pub name: String, + #[serde_as(as = "DefaultOnNull")] + #[serde(rename = "value")] + pub value: String, +} + +impl AppTag { + pub fn new(name: String, value: String) -> AppTag { + AppTag { name, value } + } +} diff --git a/crates/tower-api/src/models/app_version.rs b/crates/tower-api/src/models/app_version.rs index ca14cc97..b1193b3c 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/authentication_context.rs b/crates/tower-api/src/models/authentication_context.rs index 2181be53..16e7d68b 100644 --- a/crates/tower-api/src/models/authentication_context.rs +++ b/crates/tower-api/src/models/authentication_context.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/batch_schedule_params.rs b/crates/tower-api/src/models/batch_schedule_params.rs index 5293caec..81e52aa1 100644 --- a/crates/tower-api/src/models/batch_schedule_params.rs +++ b/crates/tower-api/src/models/batch_schedule_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/batch_schedule_response.rs b/crates/tower-api/src/models/batch_schedule_response.rs index b4920ec3..09532e94 100644 --- a/crates/tower-api/src/models/batch_schedule_response.rs +++ b/crates/tower-api/src/models/batch_schedule_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 7abc7d07..d7c0e02a 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 d5531a9f..352181b2 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/catalog_credentials.rs b/crates/tower-api/src/models/catalog_credentials.rs index d810f815..284b8aee 100644 --- a/crates/tower-api/src/models/catalog_credentials.rs +++ b/crates/tower-api/src/models/catalog_credentials.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/catalog_fact.rs b/crates/tower-api/src/models/catalog_fact.rs new file mode 100644 index 00000000..7689d4d6 --- /dev/null +++ b/crates/tower-api/src/models/catalog_fact.rs @@ -0,0 +1,151 @@ +/* + * Tower API + * + * REST API to interact with Tower Services. + * + * The version of the OpenAPI document: v0.11.17 + * Contact: hello@tower.dev + * Generated by: https://openapi-generator.tech + */ +use crate::models; +use serde::{Deserialize, Deserializer, Serialize}; +use serde_with::{serde_as, DefaultOnNull}; + +#[serde_as] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CatalogFact { + #[serde( + rename = "body", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub body: Option>, + /// How trustworthy the fact is. + #[serde_as(as = "DefaultOnNull")] + #[serde(rename = "confidence")] + pub confidence: Confidence, + #[serde_as(as = "DefaultOnNull")] + #[serde(rename = "created_at")] + pub created_at: String, + /// The natural key of the fact within the catalog. + #[serde_as(as = "DefaultOnNull")] + #[serde(rename = "name")] + pub name: String, + /// Descriptive path to what the fact is about, e.g. \"bronze.runs.deleted_at\". Empty for catalog-scoped facts. + #[serde_as(as = "DefaultOnNull")] + #[serde(rename = "object")] + pub object: String, + /// What kind of object the fact is about. + #[serde_as(as = "DefaultOnNull")] + #[serde(rename = "scope")] + pub scope: Scope, + /// Where the fact came from (agent id, user, ...). + #[serde(rename = "source", skip_serializing_if = "Option::is_none")] + pub source: Option, + /// The human-readable meaning of the fact. + #[serde_as(as = "DefaultOnNull")] + #[serde(rename = "statement")] + pub statement: String, + #[serde_as(as = "DefaultOnNull")] + #[serde(rename = "updated_at")] + pub updated_at: String, +} + +impl CatalogFact { + pub fn new( + confidence: Confidence, + created_at: String, + name: String, + object: String, + scope: Scope, + statement: String, + updated_at: String, + ) -> CatalogFact { + CatalogFact { + body: None, + confidence, + created_at, + name, + object, + scope, + source: None, + statement, + updated_at, + } + } +} +/// How trustworthy the fact is. +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize)] +pub enum Confidence { + #[serde(rename = "confirmed")] + Confirmed, + #[serde(rename = "heuristic")] + Heuristic, + #[serde(rename = "inferred")] + Inferred, +} + +impl Default for Confidence { + fn default() -> Confidence { + Self::Confirmed + } +} + +impl<'de> Deserialize<'de> for Confidence { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + let s = String::deserialize(deserializer)?; + match s.to_lowercase().as_str() { + "confirmed" => Ok(Self::Confirmed), + "heuristic" => Ok(Self::Heuristic), + "inferred" => Ok(Self::Inferred), + _ => Err(serde::de::Error::unknown_variant( + &s, + &["confirmed", "heuristic", "inferred"], + )), + } + } +} +/// What kind of object the fact is about. +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize)] +pub enum Scope { + #[serde(rename = "catalog")] + Catalog, + #[serde(rename = "namespace")] + Namespace, + #[serde(rename = "table")] + Table, + #[serde(rename = "column")] + Column, + #[serde(rename = "metric")] + Metric, +} + +impl Default for Scope { + fn default() -> Scope { + Self::Catalog + } +} + +impl<'de> Deserialize<'de> for Scope { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + let s = String::deserialize(deserializer)?; + match s.to_lowercase().as_str() { + "catalog" => Ok(Self::Catalog), + "namespace" => Ok(Self::Namespace), + "table" => Ok(Self::Table), + "column" => Ok(Self::Column), + "metric" => Ok(Self::Metric), + _ => Err(serde::de::Error::unknown_variant( + &s, + &["catalog", "namespace", "table", "column", "metric"], + )), + } + } +} diff --git a/crates/tower-api/src/models/catalog_property.rs b/crates/tower-api/src/models/catalog_property.rs index 8201ef42..4b15bd7e 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 a6a83c70..0c5bf058 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 30ee0910..327fa284 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 8c0491b5..7aa1327d 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 fed0ebf7..66d4c825 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 248fad0d..bbed8fba 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 613dfc27..4f026c03 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 9c08f6b5..c90b282b 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 39f5bacb..77b91935 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -27,6 +27,25 @@ pub struct CreateAppParams { #[serde_as(as = "DefaultOnNull")] #[serde(rename = "name")] pub name: String, + /// The amount of time in seconds that runs of this app can stay in pending state before being marked as failed. + #[serde( + rename = "pending_timeout", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub pending_timeout: Option>, + /// The retry policy for failed runs of this app. Defines different retry behavior for infrastructure (errored) vs application (crashed) failures. + #[serde(rename = "retry_policy", skip_serializing_if = "Option::is_none")] + pub retry_policy: Option, + /// The amount of time in seconds that runs of this app can stay in running state before being marked as failed. + #[serde( + rename = "running_timeout", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub running_timeout: Option>, /// A description of the app. #[serde(rename = "short_description", skip_serializing_if = "Option::is_none")] pub short_description: Option, @@ -41,6 +60,9 @@ pub struct CreateAppParams { skip_serializing_if = "Option::is_none" )] pub subdomain: Option>, + /// The tags for this app. + #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] + pub tags: Option>, } impl CreateAppParams { @@ -49,9 +71,13 @@ impl CreateAppParams { schema: None, is_externally_accessible: None, name, + pending_timeout: None, + retry_policy: None, + running_timeout: None, short_description: None, slug: None, subdomain: None, + tags: None, } } } diff --git a/crates/tower-api/src/models/create_app_response.rs b/crates/tower-api/src/models/create_app_response.rs index e2a487e2..e1cac520 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 15de539e..33196ef6 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 183311b6..f4bb0866 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 f896d8ed..1da72fec 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_environment_params.rs b/crates/tower-api/src/models/create_environment_params.rs index 5b722297..b1e70989 100644 --- a/crates/tower-api/src/models/create_environment_params.rs +++ b/crates/tower-api/src/models/create_environment_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_environment_response.rs b/crates/tower-api/src/models/create_environment_response.rs index 8a5ef1e5..0aed4bf2 100644 --- a/crates/tower-api/src/models/create_environment_response.rs +++ b/crates/tower-api/src/models/create_environment_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_guest_params.rs b/crates/tower-api/src/models/create_guest_params.rs index d3a8dc7c..7afc6838 100644 --- a/crates/tower-api/src/models/create_guest_params.rs +++ b/crates/tower-api/src/models/create_guest_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_guest_response.rs b/crates/tower-api/src/models/create_guest_response.rs index 3026a350..d5df6972 100644 --- a/crates/tower-api/src/models/create_guest_response.rs +++ b/crates/tower-api/src/models/create_guest_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_sandbox_secrets_params.rs b/crates/tower-api/src/models/create_sandbox_secrets_params.rs index 981ddaea..3918e1de 100644 --- a/crates/tower-api/src/models/create_sandbox_secrets_params.rs +++ b/crates/tower-api/src/models/create_sandbox_secrets_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_sandbox_secrets_response.rs b/crates/tower-api/src/models/create_sandbox_secrets_response.rs index 139af10e..46ac8d02 100644 --- a/crates/tower-api/src/models/create_sandbox_secrets_response.rs +++ b/crates/tower-api/src/models/create_sandbox_secrets_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 bda61ef2..791809b0 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 02539f8a..a95ab056 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 b71a4966..6e27c3ea 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 2e340862..3a8f27ed 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_service_account_api_key_params.rs b/crates/tower-api/src/models/create_service_account_api_key_params.rs index 51f48e40..a45d8088 100644 --- a/crates/tower-api/src/models/create_service_account_api_key_params.rs +++ b/crates/tower-api/src/models/create_service_account_api_key_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_service_account_api_key_response.rs b/crates/tower-api/src/models/create_service_account_api_key_response.rs index e8300707..47758632 100644 --- a/crates/tower-api/src/models/create_service_account_api_key_response.rs +++ b/crates/tower-api/src/models/create_service_account_api_key_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_service_account_params.rs b/crates/tower-api/src/models/create_service_account_params.rs index 59afb120..799df04a 100644 --- a/crates/tower-api/src/models/create_service_account_params.rs +++ b/crates/tower-api/src/models/create_service_account_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_service_account_response.rs b/crates/tower-api/src/models/create_service_account_response.rs index cb3a0624..2c84d6f4 100644 --- a/crates/tower-api/src/models/create_service_account_response.rs +++ b/crates/tower-api/src/models/create_service_account_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 5afa1060..c6259b64 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 4e82c314..a5239d45 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 dedfe555..58119629 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 10836b9f..9bdd10c4 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_webhook_params.rs b/crates/tower-api/src/models/create_webhook_params.rs index 9ba5fb01..490bfabb 100644 --- a/crates/tower-api/src/models/create_webhook_params.rs +++ b/crates/tower-api/src/models/create_webhook_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/create_webhook_response.rs b/crates/tower-api/src/models/create_webhook_response.rs index ae0c04af..045ef73e 100644 --- a/crates/tower-api/src/models/create_webhook_response.rs +++ b/crates/tower-api/src/models/create_webhook_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 8441f665..499f72a9 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 58af156e..39ac6a3e 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 091e8397..2946b48a 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 f2d6fc9e..1affd044 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/delete_environment_response.rs b/crates/tower-api/src/models/delete_environment_response.rs index a245751e..24bbd310 100644 --- a/crates/tower-api/src/models/delete_environment_response.rs +++ b/crates/tower-api/src/models/delete_environment_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/delete_guest_output_body.rs b/crates/tower-api/src/models/delete_guest_output_body.rs index a874b86b..fc40e6b7 100644 --- a/crates/tower-api/src/models/delete_guest_output_body.rs +++ b/crates/tower-api/src/models/delete_guest_output_body.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/delete_schedule_params.rs b/crates/tower-api/src/models/delete_schedule_params.rs index 1ef1718e..cc5546ac 100644 --- a/crates/tower-api/src/models/delete_schedule_params.rs +++ b/crates/tower-api/src/models/delete_schedule_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 6ca154fc..0a830666 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 46af28c9..4ca7b11f 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/delete_service_account_api_key_params.rs b/crates/tower-api/src/models/delete_service_account_api_key_params.rs index 60a91ac5..16ebdbaa 100644 --- a/crates/tower-api/src/models/delete_service_account_api_key_params.rs +++ b/crates/tower-api/src/models/delete_service_account_api_key_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/delete_session_params.rs b/crates/tower-api/src/models/delete_session_params.rs index 4f6ac79a..de8f855f 100644 --- a/crates/tower-api/src/models/delete_session_params.rs +++ b/crates/tower-api/src/models/delete_session_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/delete_session_response.rs b/crates/tower-api/src/models/delete_session_response.rs index 0b1713b9..d7fc8575 100644 --- a/crates/tower-api/src/models/delete_session_response.rs +++ b/crates/tower-api/src/models/delete_session_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 7262f936..96a895b4 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 add0d639..ca73daa0 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 00810799..e8175fa4 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 45477a73..fcfc256f 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/delete_webhook_response.rs b/crates/tower-api/src/models/delete_webhook_response.rs index 7d0979dc..a0b3d6a6 100644 --- a/crates/tower-api/src/models/delete_webhook_response.rs +++ b/crates/tower-api/src/models/delete_webhook_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/deploy_app_request.rs b/crates/tower-api/src/models/deploy_app_request.rs index bc5124da..2f2de5cc 100644 --- a/crates/tower-api/src/models/deploy_app_request.rs +++ b/crates/tower-api/src/models/deploy_app_request.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 5918af15..ec69374d 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/describe_account_body.rs b/crates/tower-api/src/models/describe_account_body.rs index 9e78b0cd..3cdef8a6 100644 --- a/crates/tower-api/src/models/describe_account_body.rs +++ b/crates/tower-api/src/models/describe_account_body.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 14e258e4..38666c9e 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 b088230a..3258f6fd 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/describe_authentication_context_body.rs b/crates/tower-api/src/models/describe_authentication_context_body.rs index 3c6f4cf7..c55cdd00 100644 --- a/crates/tower-api/src/models/describe_authentication_context_body.rs +++ b/crates/tower-api/src/models/describe_authentication_context_body.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/describe_catalog_fact_response.rs b/crates/tower-api/src/models/describe_catalog_fact_response.rs new file mode 100644 index 00000000..04cde236 --- /dev/null +++ b/crates/tower-api/src/models/describe_catalog_fact_response.rs @@ -0,0 +1,29 @@ +/* + * Tower API + * + * REST API to interact with Tower Services. + * + * The version of the OpenAPI document: v0.11.17 + * Contact: hello@tower.dev + * Generated by: https://openapi-generator.tech + */ +use crate::models; +use serde::{Deserialize, Deserializer, Serialize}; +use serde_with::{serde_as, DefaultOnNull}; + +#[serde_as] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct DescribeCatalogFactResponse { + /// A URL to the JSON Schema for this object. + #[serde(rename = "$schema", skip_serializing_if = "Option::is_none")] + pub schema: Option, + #[serde_as(as = "DefaultOnNull")] + #[serde(rename = "fact")] + pub fact: models::CatalogFact, +} + +impl DescribeCatalogFactResponse { + pub fn new(fact: models::CatalogFact) -> DescribeCatalogFactResponse { + DescribeCatalogFactResponse { schema: None, fact } + } +} diff --git a/crates/tower-api/src/models/describe_catalog_response.rs b/crates/tower-api/src/models/describe_catalog_response.rs index e6ef2cd8..bf1f98cf 100644 --- a/crates/tower-api/src/models/describe_catalog_response.rs +++ b/crates/tower-api/src/models/describe_catalog_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 253bc4fe..5a6bbf0b 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/describe_email_preferences_body.rs b/crates/tower-api/src/models/describe_email_preferences_body.rs index fe820ed9..befb4ee8 100644 --- a/crates/tower-api/src/models/describe_email_preferences_body.rs +++ b/crates/tower-api/src/models/describe_email_preferences_body.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/describe_environment_response.rs b/crates/tower-api/src/models/describe_environment_response.rs index fc8478f3..1657cafb 100644 --- a/crates/tower-api/src/models/describe_environment_response.rs +++ b/crates/tower-api/src/models/describe_environment_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/describe_plan_response.rs b/crates/tower-api/src/models/describe_plan_response.rs index 78d72ef0..5bf3b864 100644 --- a/crates/tower-api/src/models/describe_plan_response.rs +++ b/crates/tower-api/src/models/describe_plan_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/describe_run_graph_response.rs b/crates/tower-api/src/models/describe_run_graph_response.rs index 15e947e4..1d21caf4 100644 --- a/crates/tower-api/src/models/describe_run_graph_response.rs +++ b/crates/tower-api/src/models/describe_run_graph_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/describe_run_links.rs b/crates/tower-api/src/models/describe_run_links.rs index c3b0afd4..2cf98a00 100644 --- a/crates/tower-api/src/models/describe_run_links.rs +++ b/crates/tower-api/src/models/describe_run_links.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 438199cb..da5664b9 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 4e77add1..23d86c2d 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 bb6637c2..9090dba3 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/describe_service_account_response.rs b/crates/tower-api/src/models/describe_service_account_response.rs index 0ffb8535..668a4127 100644 --- a/crates/tower-api/src/models/describe_service_account_response.rs +++ b/crates/tower-api/src/models/describe_service_account_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 d59ee872..33bc35b7 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/describe_team_response.rs b/crates/tower-api/src/models/describe_team_response.rs index 0cc217f5..b4a5d58c 100644 --- a/crates/tower-api/src/models/describe_team_response.rs +++ b/crates/tower-api/src/models/describe_team_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/describe_webhook_response.rs b/crates/tower-api/src/models/describe_webhook_response.rs index d001a97a..99277e52 100644 --- a/crates/tower-api/src/models/describe_webhook_response.rs +++ b/crates/tower-api/src/models/describe_webhook_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/describe_whoami_response.rs b/crates/tower-api/src/models/describe_whoami_response.rs index cd115003..9dae2606 100644 --- a/crates/tower-api/src/models/describe_whoami_response.rs +++ b/crates/tower-api/src/models/describe_whoami_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/email_subscriptions.rs b/crates/tower-api/src/models/email_subscriptions.rs index 1376571b..de02f82c 100644 --- a/crates/tower-api/src/models/email_subscriptions.rs +++ b/crates/tower-api/src/models/email_subscriptions.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 37b6e2ed..3c953566 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/environment.rs b/crates/tower-api/src/models/environment.rs index 76d8ee3a..a84b27ea 100644 --- a/crates/tower-api/src/models/environment.rs +++ b/crates/tower-api/src/models/environment.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 3f750453..d67f1289 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 1e3c29bb..32c65920 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/event_alert.rs b/crates/tower-api/src/models/event_alert.rs index 7289bb4d..423dde06 100644 --- a/crates/tower-api/src/models/event_alert.rs +++ b/crates/tower-api/src/models/event_alert.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/event_error.rs b/crates/tower-api/src/models/event_error.rs index cc41e8e2..ad65d975 100644 --- a/crates/tower-api/src/models/event_error.rs +++ b/crates/tower-api/src/models/event_error.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/event_log.rs b/crates/tower-api/src/models/event_log.rs index 12e718ab..7a0ca024 100644 --- a/crates/tower-api/src/models/event_log.rs +++ b/crates/tower-api/src/models/event_log.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/event_shouldertap.rs b/crates/tower-api/src/models/event_shouldertap.rs index b236d798..170626c5 100644 --- a/crates/tower-api/src/models/event_shouldertap.rs +++ b/crates/tower-api/src/models/event_shouldertap.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/event_warning.rs b/crates/tower-api/src/models/event_warning.rs index de0d3471..fc49ee89 100644 --- a/crates/tower-api/src/models/event_warning.rs +++ b/crates/tower-api/src/models/event_warning.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 84ccdd1d..413ccc54 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 fe1502b5..16f13f08 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 de5e9205..3b61f881 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 b7bc20c1..95a898a1 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 796b183b..ec48600c 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 c6602b40..ee03db06 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 5d8d5c88..d81128da 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/feature.rs b/crates/tower-api/src/models/feature.rs index 889933c5..a4b8ac57 100644 --- a/crates/tower-api/src/models/feature.rs +++ b/crates/tower-api/src/models/feature.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 c60b490f..e5fbe8ad 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 19798eed..5d8b8db5 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/generate_organization_usage_time_series_response.rs b/crates/tower-api/src/models/generate_organization_usage_time_series_response.rs index 7a9175be..d6c64432 100644 --- a/crates/tower-api/src/models/generate_organization_usage_time_series_response.rs +++ b/crates/tower-api/src/models/generate_organization_usage_time_series_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 00b5c52c..1d1c46de 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 a26c9e30..a39529f9 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/get_feature_flag_response_body.rs b/crates/tower-api/src/models/get_feature_flag_response_body.rs index 74aaf154..6e19cb36 100644 --- a/crates/tower-api/src/models/get_feature_flag_response_body.rs +++ b/crates/tower-api/src/models/get_feature_flag_response_body.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/guest.rs b/crates/tower-api/src/models/guest.rs index f7bdedc5..8ca0a8a7 100644 --- a/crates/tower-api/src/models/guest.rs +++ b/crates/tower-api/src/models/guest.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 347388e5..db6c84f9 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 6e900adc..4d0d6d17 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 ad6cfa68..8b8856d4 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 e392ad06..6af2496d 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 9fe80bfb..af4f1ba6 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 c03cace2..9101caf8 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 9b4e3bd7..0ce2f3d4 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 5e53b323..622c25b4 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/list_catalog_facts_response.rs b/crates/tower-api/src/models/list_catalog_facts_response.rs new file mode 100644 index 00000000..41c21216 --- /dev/null +++ b/crates/tower-api/src/models/list_catalog_facts_response.rs @@ -0,0 +1,32 @@ +/* + * Tower API + * + * REST API to interact with Tower Services. + * + * The version of the OpenAPI document: v0.11.17 + * Contact: hello@tower.dev + * Generated by: https://openapi-generator.tech + */ +use crate::models; +use serde::{Deserialize, Deserializer, Serialize}; +use serde_with::{serde_as, DefaultOnNull}; + +#[serde_as] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ListCatalogFactsResponse { + /// A URL to the JSON Schema for this object. + #[serde(rename = "$schema", skip_serializing_if = "Option::is_none")] + pub schema: Option, + #[serde_as(as = "DefaultOnNull")] + #[serde(rename = "facts")] + pub facts: Vec, +} + +impl ListCatalogFactsResponse { + pub fn new(facts: Vec) -> ListCatalogFactsResponse { + ListCatalogFactsResponse { + schema: None, + facts, + } + } +} diff --git a/crates/tower-api/src/models/list_catalogs_response.rs b/crates/tower-api/src/models/list_catalogs_response.rs index 7cea77a4..c21d39c4 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/list_environments_response.rs b/crates/tower-api/src/models/list_environments_response.rs index 790e360a..e9f268fc 100644 --- a/crates/tower-api/src/models/list_environments_response.rs +++ b/crates/tower-api/src/models/list_environments_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/list_guests_response.rs b/crates/tower-api/src/models/list_guests_response.rs index c977c610..a0870acc 100644 --- a/crates/tower-api/src/models/list_guests_response.rs +++ b/crates/tower-api/src/models/list_guests_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 a4728346..e4a43c25 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/list_runners_response.rs b/crates/tower-api/src/models/list_runners_response.rs index df28b50c..7aac8cf1 100644 --- a/crates/tower-api/src/models/list_runners_response.rs +++ b/crates/tower-api/src/models/list_runners_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 5f696f6c..f86ede42 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 bad406fd..ded64720 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 15d64352..a2337e8d 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 66f040f7..a3eb54e3 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/list_service_account_api_keys_response.rs b/crates/tower-api/src/models/list_service_account_api_keys_response.rs index d09973bc..2df25684 100644 --- a/crates/tower-api/src/models/list_service_account_api_keys_response.rs +++ b/crates/tower-api/src/models/list_service_account_api_keys_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/list_service_accounts_response.rs b/crates/tower-api/src/models/list_service_accounts_response.rs index fe6f1a3b..87fa954d 100644 --- a/crates/tower-api/src/models/list_service_accounts_response.rs +++ b/crates/tower-api/src/models/list_service_accounts_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 838e8933..cae3cd39 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 a73fe28d..231c2daa 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 55a4e01e..f4cd0cd6 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/list_webhooks_response.rs b/crates/tower-api/src/models/list_webhooks_response.rs index 23388d78..23bb637e 100644 --- a/crates/tower-api/src/models/list_webhooks_response.rs +++ b/crates/tower-api/src/models/list_webhooks_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 df23e3d5..bdcad19e 100644 --- a/crates/tower-api/src/models/mod.rs +++ b/crates/tower-api/src/models/mod.rs @@ -16,6 +16,8 @@ pub mod app_statistics; pub use self::app_statistics::AppStatistics; pub mod app_summary; pub use self::app_summary::AppSummary; +pub mod app_tag; +pub use self::app_tag::AppTag; pub mod app_version; pub use self::app_version::AppVersion; pub mod authentication_context; @@ -30,6 +32,8 @@ pub mod catalog; pub use self::catalog::Catalog; pub mod catalog_credentials; pub use self::catalog_credentials::CatalogCredentials; +pub mod catalog_fact; +pub use self::catalog_fact::CatalogFact; pub mod catalog_property; pub use self::catalog_property::CatalogProperty; pub mod claim_device_login_ticket_params; @@ -142,6 +146,8 @@ pub mod describe_app_version_response; pub use self::describe_app_version_response::DescribeAppVersionResponse; pub mod describe_authentication_context_body; pub use self::describe_authentication_context_body::DescribeAuthenticationContextBody; +pub mod describe_catalog_fact_response; +pub use self::describe_catalog_fact_response::DescribeCatalogFactResponse; pub mod describe_catalog_response; pub use self::describe_catalog_response::DescribeCatalogResponse; pub mod describe_device_login_session_response; @@ -238,6 +244,8 @@ pub mod list_app_versions_response; pub use self::list_app_versions_response::ListAppVersionsResponse; pub mod list_apps_response; pub use self::list_apps_response::ListAppsResponse; +pub mod list_catalog_facts_response; +pub use self::list_catalog_facts_response::ListCatalogFactsResponse; pub mod list_catalogs_response; pub use self::list_catalogs_response::ListCatalogsResponse; pub mod list_environments_response; @@ -362,6 +370,8 @@ pub mod sse_warning; pub use self::sse_warning::SseWarning; pub mod statistics_settings; pub use self::statistics_settings::StatisticsSettings; +pub mod tag_filter; +pub use self::tag_filter::TagFilter; pub mod team; pub use self::team::Team; pub mod team_invitation; @@ -384,6 +394,10 @@ pub mod update_app_params; pub use self::update_app_params::UpdateAppParams; pub mod update_app_response; pub use self::update_app_response::UpdateAppResponse; +pub mod update_catalog_fact_body; +pub use self::update_catalog_fact_body::UpdateCatalogFactBody; +pub mod update_catalog_fact_response; +pub use self::update_catalog_fact_response::UpdateCatalogFactResponse; pub mod update_catalog_params; pub use self::update_catalog_params::UpdateCatalogParams; pub mod update_catalog_response; diff --git a/crates/tower-api/src/models/organization.rs b/crates/tower-api/src/models/organization.rs index 3de9b3d0..61247d6b 100644 --- a/crates/tower-api/src/models/organization.rs +++ b/crates/tower-api/src/models/organization.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/organization_usage.rs b/crates/tower-api/src/models/organization_usage.rs index 9eeed669..18026159 100644 --- a/crates/tower-api/src/models/organization_usage.rs +++ b/crates/tower-api/src/models/organization_usage.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 54715275..9cd2012f 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 afa6ec60..0226331c 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/plan.rs b/crates/tower-api/src/models/plan.rs index 02ed2d1b..9daedc53 100644 --- a/crates/tower-api/src/models/plan.rs +++ b/crates/tower-api/src/models/plan.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 4982f6e9..21101fff 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 b3240290..cc00dc96 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/regenerate_guest_login_url_params.rs b/crates/tower-api/src/models/regenerate_guest_login_url_params.rs index e1d7659b..a512b9c8 100644 --- a/crates/tower-api/src/models/regenerate_guest_login_url_params.rs +++ b/crates/tower-api/src/models/regenerate_guest_login_url_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/regenerate_guest_login_url_response.rs b/crates/tower-api/src/models/regenerate_guest_login_url_response.rs index 94edb91f..f0a97ee9 100644 --- a/crates/tower-api/src/models/regenerate_guest_login_url_response.rs +++ b/crates/tower-api/src/models/regenerate_guest_login_url_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 0be8c14d..96d83918 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 d79905c7..a11492fe 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 deb4b7e6..4691e655 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 10dd58ec..17313fc5 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 b516fa44..2e38e158 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/run_app_initiator_data.rs b/crates/tower-api/src/models/run_app_initiator_data.rs index 7ba43d7a..37ee9516 100644 --- a/crates/tower-api/src/models/run_app_initiator_data.rs +++ b/crates/tower-api/src/models/run_app_initiator_data.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/run_app_params.rs b/crates/tower-api/src/models/run_app_params.rs index 105f1498..9917741f 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 ceb758b7..4deee56f 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/run_attempt.rs b/crates/tower-api/src/models/run_attempt.rs index 24f406b2..b1e88712 100644 --- a/crates/tower-api/src/models/run_attempt.rs +++ b/crates/tower-api/src/models/run_attempt.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/run_creator.rs b/crates/tower-api/src/models/run_creator.rs index 2a6359cc..6139b8cd 100644 --- a/crates/tower-api/src/models/run_creator.rs +++ b/crates/tower-api/src/models/run_creator.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 5c2ef780..340b228e 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/run_graph_node.rs b/crates/tower-api/src/models/run_graph_node.rs index dc0dc02c..2ccaafc9 100644 --- a/crates/tower-api/src/models/run_graph_node.rs +++ b/crates/tower-api/src/models/run_graph_node.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/run_graph_run_id.rs b/crates/tower-api/src/models/run_graph_run_id.rs index 5570a7f6..60a9dc3a 100644 --- a/crates/tower-api/src/models/run_graph_run_id.rs +++ b/crates/tower-api/src/models/run_graph_run_id.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/run_initiator.rs b/crates/tower-api/src/models/run_initiator.rs index b0fb7e90..c859adec 100644 --- a/crates/tower-api/src/models/run_initiator.rs +++ b/crates/tower-api/src/models/run_initiator.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/run_initiator_details.rs b/crates/tower-api/src/models/run_initiator_details.rs index 85d8f1cb..5787e17f 100644 --- a/crates/tower-api/src/models/run_initiator_details.rs +++ b/crates/tower-api/src/models/run_initiator_details.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 25210cb2..5f85622f 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 5b411ba1..92c5e901 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 4482a64f..bb2d2185 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/run_retry_policy.rs b/crates/tower-api/src/models/run_retry_policy.rs index 0a2bd848..fb9beaa9 100644 --- a/crates/tower-api/src/models/run_retry_policy.rs +++ b/crates/tower-api/src/models/run_retry_policy.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/run_run_initiator_details.rs b/crates/tower-api/src/models/run_run_initiator_details.rs index 14261608..8cc3e977 100644 --- a/crates/tower-api/src/models/run_run_initiator_details.rs +++ b/crates/tower-api/src/models/run_run_initiator_details.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 97081109..9e3daa52 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 0b6b9813..38cb0a6f 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/runner.rs b/crates/tower-api/src/models/runner.rs index cb1d78ff..d7d50001 100644 --- a/crates/tower-api/src/models/runner.rs +++ b/crates/tower-api/src/models/runner.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 e88eb6a2..d6a356b5 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 b3068d9e..bfe69267 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/schedule_owner.rs b/crates/tower-api/src/models/schedule_owner.rs index 021ef974..fa51d221 100644 --- a/crates/tower-api/src/models/schedule_owner.rs +++ b/crates/tower-api/src/models/schedule_owner.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/schedule_run_initiator_details.rs b/crates/tower-api/src/models/schedule_run_initiator_details.rs index 7f7a154e..31177899 100644 --- a/crates/tower-api/src/models/schedule_run_initiator_details.rs +++ b/crates/tower-api/src/models/schedule_run_initiator_details.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 4d3c49f5..46525224 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 31f571e1..875456c3 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/server_sent_events_inner.rs b/crates/tower-api/src/models/server_sent_events_inner.rs index 28899f2d..500613a8 100644 --- a/crates/tower-api/src/models/server_sent_events_inner.rs +++ b/crates/tower-api/src/models/server_sent_events_inner.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/server_sent_events_inner_1.rs b/crates/tower-api/src/models/server_sent_events_inner_1.rs index 90daa796..3a685e7c 100644 --- a/crates/tower-api/src/models/server_sent_events_inner_1.rs +++ b/crates/tower-api/src/models/server_sent_events_inner_1.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/server_sent_events_inner_2.rs b/crates/tower-api/src/models/server_sent_events_inner_2.rs index 21a9914f..acd3ee24 100644 --- a/crates/tower-api/src/models/server_sent_events_inner_2.rs +++ b/crates/tower-api/src/models/server_sent_events_inner_2.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/service_account.rs b/crates/tower-api/src/models/service_account.rs index 09ca2f8e..af725e1e 100644 --- a/crates/tower-api/src/models/service_account.rs +++ b/crates/tower-api/src/models/service_account.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/service_account_creator.rs b/crates/tower-api/src/models/service_account_creator.rs index e87eba0f..6b932206 100644 --- a/crates/tower-api/src/models/service_account_creator.rs +++ b/crates/tower-api/src/models/service_account_creator.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 48f7d769..e50b4821 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/shoulder_tap.rs b/crates/tower-api/src/models/shoulder_tap.rs index f42f14d1..a1402155 100644 --- a/crates/tower-api/src/models/shoulder_tap.rs +++ b/crates/tower-api/src/models/shoulder_tap.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 69ff569b..93724481 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 78c10fed..1b928471 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/tag_filter.rs b/crates/tower-api/src/models/tag_filter.rs new file mode 100644 index 00000000..f398dd19 --- /dev/null +++ b/crates/tower-api/src/models/tag_filter.rs @@ -0,0 +1,75 @@ +/* + * Tower API + * + * REST API to interact with Tower Services. + * + * The version of the OpenAPI document: v0.11.17 + * Contact: hello@tower.dev + * Generated by: https://openapi-generator.tech + */ +use crate::models; +use serde::{Deserialize, Deserializer, Serialize}; +use serde_with::{serde_as, DefaultOnNull}; + +#[serde_as] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TagFilter { + /// The tag name to search. + #[serde_as(as = "DefaultOnNull")] + #[serde(rename = "name")] + pub name: String, + #[serde_as(as = "DefaultOnNull")] + #[serde(rename = "op")] + pub op: Op, + /// Required if operator is eq + #[serde(rename = "value", skip_serializing_if = "Option::is_none")] + pub value: Option, + /// Required if operator is in or notIn + #[serde(rename = "values", skip_serializing_if = "Option::is_none")] + pub values: Option>, +} + +impl TagFilter { + pub fn new(name: String, op: Op) -> TagFilter { + TagFilter { + name, + op, + value: None, + values: None, + } + } +} +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize)] +pub enum Op { + #[serde(rename = "eq")] + Eq, + #[serde(rename = "in")] + In, + #[serde(rename = "notIn")] + NotIn, +} + +impl Default for Op { + fn default() -> Op { + Self::Eq + } +} + +impl<'de> Deserialize<'de> for Op { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + let s = String::deserialize(deserializer)?; + match s.to_lowercase().as_str() { + "eq" => Ok(Self::Eq), + "in" => Ok(Self::In), + "notIn" => Ok(Self::NotIn), + _ => Err(serde::de::Error::unknown_variant( + &s, + &["eq", "in", "notIn"], + )), + } + } +} diff --git a/crates/tower-api/src/models/team.rs b/crates/tower-api/src/models/team.rs index bf1ea3d1..1a3378ae 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 50f3b889..cb2d6174 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/team_membership.rs b/crates/tower-api/src/models/team_membership.rs index 87df841b..54703232 100644 --- a/crates/tower-api/src/models/team_membership.rs +++ b/crates/tower-api/src/models/team_membership.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/test_webhook_response.rs b/crates/tower-api/src/models/test_webhook_response.rs index d3bb267d..fd43fd86 100644 --- a/crates/tower-api/src/models/test_webhook_response.rs +++ b/crates/tower-api/src/models/test_webhook_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 22d36299..e6619048 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_account_params.rs b/crates/tower-api/src/models/update_account_params.rs index b53d1373..531f2c4d 100644 --- a/crates/tower-api/src/models/update_account_params.rs +++ b/crates/tower-api/src/models/update_account_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -50,6 +50,8 @@ pub enum ExecutionRegion { UsEast1, #[serde(rename = "us-west-2")] UsWest2, + #[serde(rename = "eu-west-1")] + EuWest1, } impl Default for ExecutionRegion { @@ -68,9 +70,10 @@ impl<'de> Deserialize<'de> for ExecutionRegion { "eu-central-1" => Ok(Self::EuCentral1), "us-east-1" => Ok(Self::UsEast1), "us-west-2" => Ok(Self::UsWest2), + "eu-west-1" => Ok(Self::EuWest1), _ => Err(serde::de::Error::unknown_variant( &s, - &["eu-central-1", "us-east-1", "us-west-2"], + &["eu-central-1", "us-east-1", "us-west-2", "eu-west-1"], )), } } diff --git a/crates/tower-api/src/models/update_account_response.rs b/crates/tower-api/src/models/update_account_response.rs index 0c5c98e3..d1f93fa3 100644 --- a/crates/tower-api/src/models/update_account_response.rs +++ b/crates/tower-api/src/models/update_account_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_app_environment_params.rs b/crates/tower-api/src/models/update_app_environment_params.rs index b443cfe1..15576bad 100644 --- a/crates/tower-api/src/models/update_app_environment_params.rs +++ b/crates/tower-api/src/models/update_app_environment_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_app_environment_response.rs b/crates/tower-api/src/models/update_app_environment_response.rs index 87636db2..56f4df95 100644 --- a/crates/tower-api/src/models/update_app_environment_response.rs +++ b/crates/tower-api/src/models/update_app_environment_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 5dda3098..0097d767 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -17,7 +17,7 @@ pub struct UpdateAppParams { /// A URL to the JSON Schema for this object. #[serde(rename = "$schema", skip_serializing_if = "Option::is_none")] pub schema: Option, - /// New description for the App + /// Deprecated: use short_description instead. #[serde( rename = "description", default, @@ -52,6 +52,14 @@ pub struct UpdateAppParams { skip_serializing_if = "Option::is_none" )] pub running_timeout: Option>, + /// New description for the app. + #[serde( + rename = "short_description", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub short_description: Option>, /// New status for the App #[serde( rename = "status", @@ -68,6 +76,9 @@ pub struct UpdateAppParams { skip_serializing_if = "Option::is_none" )] pub subdomain: Option>, + /// The tags for this app. + #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] + pub tags: Option>, } impl UpdateAppParams { @@ -79,8 +90,10 @@ impl UpdateAppParams { pending_timeout: None, retry_policy: None, running_timeout: None, + short_description: None, status: None, subdomain: None, + tags: None, } } } diff --git a/crates/tower-api/src/models/update_app_response.rs b/crates/tower-api/src/models/update_app_response.rs index 72d20b2e..b7cdab5f 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_catalog_fact_body.rs b/crates/tower-api/src/models/update_catalog_fact_body.rs new file mode 100644 index 00000000..70942a3b --- /dev/null +++ b/crates/tower-api/src/models/update_catalog_fact_body.rs @@ -0,0 +1,129 @@ +/* + * Tower API + * + * REST API to interact with Tower Services. + * + * The version of the OpenAPI document: v0.11.17 + * Contact: hello@tower.dev + * Generated by: https://openapi-generator.tech + */ +use crate::models; +use serde::{Deserialize, Deserializer, Serialize}; +use serde_with::{serde_as, DefaultOnNull}; + +#[serde_as] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct UpdateCatalogFactBody { + /// A URL to the JSON Schema for this object. + #[serde(rename = "$schema", skip_serializing_if = "Option::is_none")] + pub schema: Option, + /// Optional structured payload (SQL, unit, enum values) as a JSON string. + #[serde(rename = "body", skip_serializing_if = "Option::is_none")] + pub body: Option, + /// How trustworthy the fact is. + #[serde_as(as = "DefaultOnNull")] + #[serde(rename = "confidence")] + pub confidence: Confidence, + /// Descriptive path to what the fact is about, e.g. \"bronze.runs.deleted_at\". Empty for catalog-scoped facts. + #[serde(rename = "object", skip_serializing_if = "Option::is_none")] + pub object: Option, + /// What kind of object the fact is about. + #[serde_as(as = "DefaultOnNull")] + #[serde(rename = "scope")] + pub scope: Scope, + /// Where the fact came from (agent id, user, ...). + #[serde(rename = "source", skip_serializing_if = "Option::is_none")] + pub source: Option, + /// The human-readable meaning of the fact. + #[serde_as(as = "DefaultOnNull")] + #[serde(rename = "statement")] + pub statement: String, +} + +impl UpdateCatalogFactBody { + pub fn new(confidence: Confidence, scope: Scope, statement: String) -> UpdateCatalogFactBody { + UpdateCatalogFactBody { + schema: None, + body: None, + confidence, + object: None, + scope, + source: None, + statement, + } + } +} +/// How trustworthy the fact is. +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize)] +pub enum Confidence { + #[serde(rename = "confirmed")] + Confirmed, + #[serde(rename = "heuristic")] + Heuristic, + #[serde(rename = "inferred")] + Inferred, +} + +impl Default for Confidence { + fn default() -> Confidence { + Self::Confirmed + } +} + +impl<'de> Deserialize<'de> for Confidence { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + let s = String::deserialize(deserializer)?; + match s.to_lowercase().as_str() { + "confirmed" => Ok(Self::Confirmed), + "heuristic" => Ok(Self::Heuristic), + "inferred" => Ok(Self::Inferred), + _ => Err(serde::de::Error::unknown_variant( + &s, + &["confirmed", "heuristic", "inferred"], + )), + } + } +} +/// What kind of object the fact is about. +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize)] +pub enum Scope { + #[serde(rename = "catalog")] + Catalog, + #[serde(rename = "namespace")] + Namespace, + #[serde(rename = "table")] + Table, + #[serde(rename = "column")] + Column, + #[serde(rename = "metric")] + Metric, +} + +impl Default for Scope { + fn default() -> Scope { + Self::Catalog + } +} + +impl<'de> Deserialize<'de> for Scope { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + let s = String::deserialize(deserializer)?; + match s.to_lowercase().as_str() { + "catalog" => Ok(Self::Catalog), + "namespace" => Ok(Self::Namespace), + "table" => Ok(Self::Table), + "column" => Ok(Self::Column), + "metric" => Ok(Self::Metric), + _ => Err(serde::de::Error::unknown_variant( + &s, + &["catalog", "namespace", "table", "column", "metric"], + )), + } + } +} diff --git a/crates/tower-api/src/models/update_catalog_fact_response.rs b/crates/tower-api/src/models/update_catalog_fact_response.rs new file mode 100644 index 00000000..a880eafd --- /dev/null +++ b/crates/tower-api/src/models/update_catalog_fact_response.rs @@ -0,0 +1,29 @@ +/* + * Tower API + * + * REST API to interact with Tower Services. + * + * The version of the OpenAPI document: v0.11.17 + * Contact: hello@tower.dev + * Generated by: https://openapi-generator.tech + */ +use crate::models; +use serde::{Deserialize, Deserializer, Serialize}; +use serde_with::{serde_as, DefaultOnNull}; + +#[serde_as] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct UpdateCatalogFactResponse { + /// A URL to the JSON Schema for this object. + #[serde(rename = "$schema", skip_serializing_if = "Option::is_none")] + pub schema: Option, + #[serde_as(as = "DefaultOnNull")] + #[serde(rename = "fact")] + pub fact: models::CatalogFact, +} + +impl UpdateCatalogFactResponse { + pub fn new(fact: models::CatalogFact) -> UpdateCatalogFactResponse { + UpdateCatalogFactResponse { schema: None, fact } + } +} diff --git a/crates/tower-api/src/models/update_catalog_params.rs b/crates/tower-api/src/models/update_catalog_params.rs index 253f762c..98c75a2c 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 0e0a354f..012a5405 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_email_preferences_body.rs b/crates/tower-api/src/models/update_email_preferences_body.rs index a37dc305..0110b72d 100644 --- a/crates/tower-api/src/models/update_email_preferences_body.rs +++ b/crates/tower-api/src/models/update_email_preferences_body.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_environment_params.rs b/crates/tower-api/src/models/update_environment_params.rs index 1406bad2..3dbfaab2 100644 --- a/crates/tower-api/src/models/update_environment_params.rs +++ b/crates/tower-api/src/models/update_environment_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_environment_response.rs b/crates/tower-api/src/models/update_environment_response.rs index 8f4c546a..77acbdee 100644 --- a/crates/tower-api/src/models/update_environment_response.rs +++ b/crates/tower-api/src/models/update_environment_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 704e34c8..4d410c0e 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 984f765d..7b89b844 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_organization_params.rs b/crates/tower-api/src/models/update_organization_params.rs index 5f9dfc8a..a7928d5b 100644 --- a/crates/tower-api/src/models/update_organization_params.rs +++ b/crates/tower-api/src/models/update_organization_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_organization_response.rs b/crates/tower-api/src/models/update_organization_response.rs index 835b1e85..8d3b9342 100644 --- a/crates/tower-api/src/models/update_organization_response.rs +++ b/crates/tower-api/src/models/update_organization_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_plan_params.rs b/crates/tower-api/src/models/update_plan_params.rs index 1a59564d..8d5453c6 100644 --- a/crates/tower-api/src/models/update_plan_params.rs +++ b/crates/tower-api/src/models/update_plan_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_plan_response.rs b/crates/tower-api/src/models/update_plan_response.rs index 5fc6a07c..ac46aa70 100644 --- a/crates/tower-api/src/models/update_plan_response.rs +++ b/crates/tower-api/src/models/update_plan_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 e3ba4d2a..353fee57 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 cf991e41..25c07220 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 35d0a4f4..24022a3a 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 2dcc7fca..6fe7b48c 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_service_account_params.rs b/crates/tower-api/src/models/update_service_account_params.rs index 56ca33f9..e6a748ee 100644 --- a/crates/tower-api/src/models/update_service_account_params.rs +++ b/crates/tower-api/src/models/update_service_account_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_service_account_response.rs b/crates/tower-api/src/models/update_service_account_response.rs index 4102c0da..2ae9c535 100644 --- a/crates/tower-api/src/models/update_service_account_response.rs +++ b/crates/tower-api/src/models/update_service_account_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_team_member_params.rs b/crates/tower-api/src/models/update_team_member_params.rs index 90f25229..bec1cf7e 100644 --- a/crates/tower-api/src/models/update_team_member_params.rs +++ b/crates/tower-api/src/models/update_team_member_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_team_member_response.rs b/crates/tower-api/src/models/update_team_member_response.rs index 81a883b6..c8afc1b3 100644 --- a/crates/tower-api/src/models/update_team_member_response.rs +++ b/crates/tower-api/src/models/update_team_member_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 1cdd488e..9a91486e 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ @@ -43,6 +43,8 @@ pub enum ExecutionRegion { UsEast1, #[serde(rename = "us-west-2")] UsWest2, + #[serde(rename = "eu-west-1")] + EuWest1, } impl Default for ExecutionRegion { @@ -61,9 +63,10 @@ impl<'de> Deserialize<'de> for ExecutionRegion { "eu-central-1" => Ok(Self::EuCentral1), "us-east-1" => Ok(Self::UsEast1), "us-west-2" => Ok(Self::UsWest2), + "eu-west-1" => Ok(Self::EuWest1), _ => Err(serde::de::Error::unknown_variant( &s, - &["eu-central-1", "us-east-1", "us-west-2"], + &["eu-central-1", "us-east-1", "us-west-2", "eu-west-1"], )), } } diff --git a/crates/tower-api/src/models/update_team_response.rs b/crates/tower-api/src/models/update_team_response.rs index de2fd4ed..1d3606a8 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 66bf1d7d..2f2c68e1 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.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 7748e56e..051691c7 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_webhook_params.rs b/crates/tower-api/src/models/update_webhook_params.rs index 56457448..1bb54639 100644 --- a/crates/tower-api/src/models/update_webhook_params.rs +++ b/crates/tower-api/src/models/update_webhook_params.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/update_webhook_response.rs b/crates/tower-api/src/models/update_webhook_response.rs index 5495cce1..1a75fd49 100644 --- a/crates/tower-api/src/models/update_webhook_response.rs +++ b/crates/tower-api/src/models/update_webhook_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/usage_limit.rs b/crates/tower-api/src/models/usage_limit.rs index 3a9ec254..9726cf29 100644 --- a/crates/tower-api/src/models/usage_limit.rs +++ b/crates/tower-api/src/models/usage_limit.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/usage_metric_time_series_point.rs b/crates/tower-api/src/models/usage_metric_time_series_point.rs index e23c2210..6c4bdef2 100644 --- a/crates/tower-api/src/models/usage_metric_time_series_point.rs +++ b/crates/tower-api/src/models/usage_metric_time_series_point.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * 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 219f1814..e96c7257 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.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/vend_catalog_credentials_body.rs b/crates/tower-api/src/models/vend_catalog_credentials_body.rs index 0848bd39..6c54274a 100644 --- a/crates/tower-api/src/models/vend_catalog_credentials_body.rs +++ b/crates/tower-api/src/models/vend_catalog_credentials_body.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/vend_catalog_credentials_response.rs b/crates/tower-api/src/models/vend_catalog_credentials_response.rs index c2a8bdaf..461dd693 100644 --- a/crates/tower-api/src/models/vend_catalog_credentials_response.rs +++ b/crates/tower-api/src/models/vend_catalog_credentials_response.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-api/src/models/webhook.rs b/crates/tower-api/src/models/webhook.rs index 88690ab8..3f6031bd 100644 --- a/crates/tower-api/src/models/webhook.rs +++ b/crates/tower-api/src/models/webhook.rs @@ -3,7 +3,7 @@ * * REST API to interact with Tower Services. * - * The version of the OpenAPI document: v0.11.12 + * The version of the OpenAPI document: v0.11.17 * Contact: hello@tower.dev * Generated by: https://openapi-generator.tech */ diff --git a/crates/tower-cmd/src/api.rs b/crates/tower-cmd/src/api.rs index ae6a3507..8e40bf07 100644 --- a/crates/tower-cmd/src/api.rs +++ b/crates/tower-cmd/src/api.rs @@ -179,6 +179,7 @@ pub async fn list_apps( num_runs: Some(0), sort: None, filter: None, + tag_filter: None, environment: environment.clone(), }; unwrap_api_response(tower_api::apis::default_api::list_apps(api_config, params)).await @@ -204,6 +205,10 @@ pub async fn create_app( slug: None, is_externally_accessible: None, subdomain: None, + pending_timeout: None, + retry_policy: None, + running_timeout: None, + tags: None, }, }; @@ -259,6 +264,8 @@ pub async fn describe_run_logs( name: name.to_string(), seq, start_at: None, + head: None, + tail: None, }; unwrap_api_response(tower_api::apis::default_api::describe_run_logs( @@ -426,6 +433,103 @@ pub async fn describe_catalog( .await } +pub async fn list_catalog_facts( + config: &Config, + catalog: &str, + env: &str, + scope: Option<&str>, + object: Option<&str>, +) -> Result< + tower_api::models::ListCatalogFactsResponse, + Error, +> { + let api_config = &config.into(); + + let params = tower_api::apis::default_api::ListCatalogFactsParams { + catalog: catalog.to_string(), + environment: Some(env.to_string()), + scope: scope.map(str::to_string), + object: object.map(str::to_string), + }; + + unwrap_api_response(tower_api::apis::default_api::list_catalog_facts( + api_config, params, + )) + .await +} + +pub async fn describe_catalog_fact( + config: &Config, + catalog: &str, + name: &str, + env: &str, +) -> Result< + tower_api::models::DescribeCatalogFactResponse, + Error, +> { + let api_config = &config.into(); + + let params = tower_api::apis::default_api::DescribeCatalogFactParams { + catalog: catalog.to_string(), + name: name.to_string(), + environment: Some(env.to_string()), + }; + + unwrap_api_response(tower_api::apis::default_api::describe_catalog_fact( + api_config, params, + )) + .await +} + +/// Upserts a catalog fact: the server creates the fact under `name` when it +/// doesn't exist yet and replaces it otherwise. +pub async fn update_catalog_fact( + config: &Config, + catalog: &str, + name: &str, + env: &str, + body: tower_api::models::UpdateCatalogFactBody, +) -> Result< + tower_api::models::UpdateCatalogFactResponse, + Error, +> { + let api_config = &config.into(); + + let params = tower_api::apis::default_api::UpdateCatalogFactParams { + catalog: catalog.to_string(), + name: name.to_string(), + environment: Some(env.to_string()), + update_catalog_fact_body: body, + }; + + unwrap_api_response(tower_api::apis::default_api::update_catalog_fact( + api_config, params, + )) + .await +} + +/// Deletes a catalog fact. The endpoint responds 204 with no body, which +/// `unwrap_api_response` would treat as an error, so success maps to `()` +/// directly; the generated client already surfaces 4xx/5xx as `Err`. +pub async fn delete_catalog_fact( + config: &Config, + catalog: &str, + name: &str, + env: &str, +) -> Result<(), Error> { + let api_config = &config.into(); + + let params = tower_api::apis::default_api::DeleteCatalogFactParams { + catalog: catalog.to_string(), + name: name.to_string(), + environment: Some(env.to_string()), + }; + + tower_api::apis::default_api::delete_catalog_fact(api_config, params) + .await + .map(|_| ()) +} + pub async fn list_secrets( config: &Config, env: &str, @@ -900,6 +1004,39 @@ impl ResponseEntity for tower_api::apis::default_api::DescribeCatalogSuccess { } } +impl ResponseEntity for tower_api::apis::default_api::ListCatalogFactsSuccess { + type Data = tower_api::models::ListCatalogFactsResponse; + + fn extract_data(self) -> Option { + match self { + Self::Status200(data) => Some(data), + Self::UnknownValue(_) => None, + } + } +} + +impl ResponseEntity for tower_api::apis::default_api::DescribeCatalogFactSuccess { + type Data = tower_api::models::DescribeCatalogFactResponse; + + fn extract_data(self) -> Option { + match self { + Self::Status200(data) => Some(data), + Self::UnknownValue(_) => None, + } + } +} + +impl ResponseEntity for tower_api::apis::default_api::UpdateCatalogFactSuccess { + type Data = tower_api::models::UpdateCatalogFactResponse; + + fn extract_data(self) -> Option { + match self { + Self::Status200(data) => Some(data), + Self::UnknownValue(_) => None, + } + } +} + impl ResponseEntity for tower_api::apis::default_api::VendCatalogCredentialsSuccess { type Data = tower_api::models::VendCatalogCredentialsResponse; diff --git a/crates/tower-cmd/src/catalogs.rs b/crates/tower-cmd/src/catalogs.rs index 4dcf6fd7..c3178aeb 100644 --- a/crates/tower-cmd/src/catalogs.rs +++ b/crates/tower-cmd/src/catalogs.rs @@ -5,7 +5,8 @@ use futures_util::StreamExt; use std::io::{IsTerminal, Read}; use std::time::{Duration, Instant}; use tower_api::models::{ - vend_catalog_credentials_body, CatalogCredentials, DescribeCatalogResponse, + catalog_fact, update_catalog_fact_body, vend_catalog_credentials_body, CatalogCredentials, + CatalogFact, DescribeCatalogResponse, UpdateCatalogFactBody, }; use tower_telemetry::debug; @@ -164,6 +165,130 @@ pub fn catalogs_cmd() -> Command { "Reference tables as .., e.g.:\n tower catalogs query default --sql 'SELECT * FROM \"default\".my_namespace.my_table LIMIT 10'", ), ) + .subcommand(facts_cmd()) +} + +/// The values `--scope` accepts, mirroring `catalog_fact::Scope`. +const FACT_SCOPES: [&str; 5] = ["catalog", "namespace", "table", "column", "metric"]; + +/// The values `--confidence` accepts, mirroring `catalog_fact::Confidence`. +const FACT_CONFIDENCES: [&str; 3] = ["confirmed", "heuristic", "inferred"]; + +fn facts_cmd() -> Command { + let catalog_arg = Arg::new("catalog_name") + .value_parser(value_parser!(String)) + .index(1) + .required(true) + .help("Name of the catalog"); + let fact_name_arg = Arg::new("fact_name") + .value_parser(value_parser!(String)) + .index(2) + .required(true) + .help("Name of the fact"); + let environment_arg = Arg::new("environment") + .short('e') + .long("environment") + .default_value("default") + .value_parser(value_parser!(String)) + .help("Environment the catalog belongs to") + .action(ArgAction::Set); + + Command::new("facts") + .about(beta::STORAGE.short_about( + "Store and retrieve facts about the semantics of the data in a catalog", + )) + .after_help( + "Facts let agents (and people) record context about a catalog's data — \ + semantics, ontology, conventions — scoped to the catalog itself or to a \ + namespace, table, column, or metric within it.", + ) + .arg_required_else_help(true) + .subcommand( + Command::new("list") + .arg(catalog_arg.clone()) + .arg(environment_arg.clone()) + .arg( + Arg::new("scope") + .long("scope") + .value_parser(FACT_SCOPES) + .help("Only list facts with this scope") + .action(ArgAction::Set), + ) + .arg( + Arg::new("object") + .long("object") + .value_parser(value_parser!(String)) + .help("Only list facts about this object path, e.g. bronze.runs.deleted_at") + .action(ArgAction::Set), + ) + .about("List the facts recorded for a catalog"), + ) + .subcommand( + Command::new("show") + .arg(catalog_arg.clone()) + .arg(fact_name_arg.clone()) + .arg(environment_arg.clone()) + .about("Show the full details of a fact, including its body"), + ) + .subcommand( + Command::new("set") + .arg(catalog_arg.clone()) + .arg(fact_name_arg.clone()) + .arg(environment_arg.clone()) + .arg( + Arg::new("statement") + .long("statement") + .value_parser(value_parser!(String)) + .required(true) + .help("The human-readable meaning of the fact") + .action(ArgAction::Set), + ) + .arg( + Arg::new("scope") + .long("scope") + .default_value("catalog") + .value_parser(FACT_SCOPES) + .help("What kind of object the fact is about") + .action(ArgAction::Set), + ) + .arg( + Arg::new("object") + .long("object") + .value_parser(value_parser!(String)) + .help("Path to what the fact is about, e.g. bronze.runs.deleted_at; omit for catalog-scoped facts") + .action(ArgAction::Set), + ) + .arg( + Arg::new("confidence") + .long("confidence") + .default_value("confirmed") + .value_parser(FACT_CONFIDENCES) + .help("How trustworthy the fact is") + .action(ArgAction::Set), + ) + .arg( + Arg::new("source") + .long("source") + .value_parser(value_parser!(String)) + .help("Where the fact came from (agent id, user, ...)") + .action(ArgAction::Set), + ) + .arg( + Arg::new("body") + .long("body") + .value_parser(value_parser!(String)) + .help("Optional structured payload (SQL, unit, enum values) as a JSON string") + .action(ArgAction::Set), + ) + .about("Create a fact, or replace it if one with the same name exists"), + ) + .subcommand( + Command::new("delete") + .arg(catalog_arg) + .arg(fact_name_arg) + .arg(environment_arg) + .about("Delete a fact from a catalog"), + ) } pub async fn do_list(out: &output::Out, config: Config, args: &ArgMatches) { @@ -521,6 +646,221 @@ async fn execute_catalog_query( } } +pub async fn do_facts_list(out: &output::Out, config: Config, args: &ArgMatches) { + beta::notify_once(out, &beta::STORAGE); + + let catalog = args + .get_one::("catalog_name") + .expect("catalog_name is required"); + let env = cmd::get_string_flag(args, "environment"); + let scope = args.get_one::("scope").map(String::as_str); + let object = args.get_one::("object").map(String::as_str); + + let response = out + .with_spinner( + "Listing facts", + api::list_catalog_facts(&config, catalog, &env, scope, object), + ) + .await; + + let headers = vec!["Name", "Scope", "Object", "Confidence", "Statement"] + .into_iter() + .map(str::to_string) + .collect(); + let data = response + .facts + .iter() + .map(|fact| { + vec![ + fact.name.clone(), + fact_scope_str(fact.scope).to_string(), + fact.object.clone(), + fact_confidence_str(fact.confidence).to_string(), + truncate_statement(&fact.statement, 80), + ] + }) + .collect(); + out.table(headers, data, Some(&response.facts)); +} + +pub async fn do_facts_show(out: &output::Out, config: Config, args: &ArgMatches) { + beta::notify_once(out, &beta::STORAGE); + + let catalog = args + .get_one::("catalog_name") + .expect("catalog_name is required"); + let name = args + .get_one::("fact_name") + .expect("fact_name is required"); + let env = cmd::get_string_flag(args, "environment"); + + let response = out + .with_spinner( + "Fetching fact", + api::describe_catalog_fact(&config, catalog, name, &env), + ) + .await; + + let human = fact_details_text(catalog, &env, &response.fact); + out.text(&human, &response); +} + +pub async fn do_facts_set(out: &output::Out, config: Config, args: &ArgMatches) { + beta::notify_once(out, &beta::STORAGE); + + let catalog = args + .get_one::("catalog_name") + .expect("catalog_name is required"); + let name = args + .get_one::("fact_name") + .expect("fact_name is required"); + let env = cmd::get_string_flag(args, "environment"); + let statement = cmd::get_string_flag(args, "statement"); + let scope = cmd::get_string_flag(args, "scope"); + let confidence = cmd::get_string_flag(args, "confidence"); + let object = args.get_one::("object").cloned(); + let source = args.get_one::("source").cloned(); + let body = args.get_one::("body").cloned(); + + // The API carries the body as a JSON string; catch malformed JSON here so + // the error names the flag instead of surfacing as a server-side 400. + if let Some(body) = &body { + if let Err(err) = serde_json::from_str::(body) { + out.die(&format!("--body is not valid JSON: {}", err)); + } + } + + let fact_body = UpdateCatalogFactBody { + schema: None, + body, + confidence: parse_fact_confidence(&confidence), + object, + scope: parse_fact_scope(&scope), + source, + statement, + }; + + let response = out + .with_spinner( + "Saving fact", + api::update_catalog_fact(&config, catalog, name, &env, fact_body), + ) + .await; + + out.success_with_data( + &format!("Fact '{}' saved in catalog '{}'", name, catalog), + Some(&response), + ); +} + +pub async fn do_facts_delete(out: &output::Out, config: Config, args: &ArgMatches) { + beta::notify_once(out, &beta::STORAGE); + + let catalog = args + .get_one::("catalog_name") + .expect("catalog_name is required"); + let name = args + .get_one::("fact_name") + .expect("fact_name is required"); + let env = cmd::get_string_flag(args, "environment"); + + out.with_spinner( + "Deleting fact", + api::delete_catalog_fact(&config, catalog, name, &env), + ) + .await; + + out.success(&format!( + "Fact '{}' deleted from catalog '{}'", + name, catalog + )); +} + +fn fact_scope_str(scope: catalog_fact::Scope) -> &'static str { + match scope { + catalog_fact::Scope::Catalog => "catalog", + catalog_fact::Scope::Namespace => "namespace", + catalog_fact::Scope::Table => "table", + catalog_fact::Scope::Column => "column", + catalog_fact::Scope::Metric => "metric", + } +} + +fn fact_confidence_str(confidence: catalog_fact::Confidence) -> &'static str { + match confidence { + catalog_fact::Confidence::Confirmed => "confirmed", + catalog_fact::Confidence::Heuristic => "heuristic", + catalog_fact::Confidence::Inferred => "inferred", + } +} + +fn parse_fact_scope(scope: &str) -> update_catalog_fact_body::Scope { + match scope { + "namespace" => update_catalog_fact_body::Scope::Namespace, + "table" => update_catalog_fact_body::Scope::Table, + "column" => update_catalog_fact_body::Scope::Column, + "metric" => update_catalog_fact_body::Scope::Metric, + _ => update_catalog_fact_body::Scope::Catalog, + } +} + +fn parse_fact_confidence(confidence: &str) -> update_catalog_fact_body::Confidence { + match confidence { + "heuristic" => update_catalog_fact_body::Confidence::Heuristic, + "inferred" => update_catalog_fact_body::Confidence::Inferred, + _ => update_catalog_fact_body::Confidence::Confirmed, + } +} + +/// Trims a statement to fit a table cell, on a char boundary, marking the cut +/// with an ellipsis. The full statement is always in the JSON output. +fn truncate_statement(statement: &str, max_chars: usize) -> String { + if statement.chars().count() <= max_chars { + statement.to_string() + } else { + let truncated: String = statement + .chars() + .take(max_chars.saturating_sub(1)) + .collect(); + format!("{}…", truncated) + } +} + +fn fact_details_text(catalog: &str, env: &str, fact: &CatalogFact) -> String { + let mut out = String::new(); + + out.push_str(&detail_line("Fact", &fact.name)); + out.push_str(&detail_line("Catalog", catalog)); + out.push_str(&detail_line("Environment", env)); + out.push_str(&detail_line("Scope", fact_scope_str(fact.scope))); + if !fact.object.is_empty() { + out.push_str(&detail_line("Object", &fact.object)); + } + out.push_str(&detail_line( + "Confidence", + fact_confidence_str(fact.confidence), + )); + if let Some(source) = fact.source.as_deref().filter(|s| !s.is_empty()) { + out.push_str(&detail_line("Source", source)); + } + out.push_str(&detail_line("Created", &fact.created_at)); + out.push_str(&detail_line("Updated", &fact.updated_at)); + + out.push('\n'); + out.push_str(&header_line("Statement")); + out.push_str(&fact.statement); + out.push('\n'); + + if let Some(body) = fact.body.as_ref().and_then(|b| b.as_ref()) { + out.push('\n'); + out.push_str(&header_line("Body")); + out.push_str(&serde_json::to_string_pretty(body).unwrap_or_else(|_| body.to_string())); + out.push('\n'); + } + + out +} + fn read_sql_from_stdin(out: &output::Out) -> String { let mut stdin = std::io::stdin(); if stdin.is_terminal() { @@ -718,7 +1058,10 @@ async fn fetch_catalog_columns_via_rest( rows.sort_by(|a, b| { let key = |row: &[serde_json::Value]| { ( - row.first().and_then(|v| v.as_str()).unwrap_or("").to_owned(), + row.first() + .and_then(|v| v.as_str()) + .unwrap_or("") + .to_owned(), row.get(1).and_then(|v| v.as_str()).unwrap_or("").to_owned(), ) }; @@ -961,7 +1304,10 @@ fn iceberg_type_to_display(ty: &serde_json::Value) -> String { format!("LIST({})", element) } Some("map") => { - let key = obj.get("key").map(iceberg_type_to_display).unwrap_or_default(); + let key = obj + .get("key") + .map(iceberg_type_to_display) + .unwrap_or_default(); let value = obj .get("value") .map(iceberg_type_to_display) @@ -1852,6 +2198,258 @@ mod tests { assert!(!snippets[0].body.contains("secret-token")); } + #[test] + fn facts_list_accepts_filters() { + let matches = catalogs_cmd() + .try_get_matches_from([ + "catalogs", + "facts", + "list", + "my-catalog", + "--scope", + "table", + "--object", + "bronze.runs", + "-e", + "production", + ]) + .expect("facts list should parse"); + + let (_, facts_args) = matches.subcommand().expect("expected facts subcommand"); + let (_, list_args) = facts_args.subcommand().expect("expected list subcommand"); + + assert_eq!( + list_args.get_one::("catalog_name").unwrap(), + "my-catalog" + ); + assert_eq!(list_args.get_one::("scope").unwrap(), "table"); + assert_eq!( + list_args.get_one::("object").unwrap(), + "bronze.runs" + ); + assert_eq!( + list_args.get_one::("environment").unwrap(), + "production" + ); + } + + #[test] + fn facts_list_rejects_invalid_scope() { + let result = catalogs_cmd().try_get_matches_from([ + "catalogs", + "facts", + "list", + "my-catalog", + "--scope", + "bogus", + ]); + assert!(result.is_err()); + } + + #[test] + fn facts_show_requires_catalog_and_fact_name() { + let result = + catalogs_cmd().try_get_matches_from(["catalogs", "facts", "show", "my-catalog"]); + assert!(result.is_err()); + + let matches = catalogs_cmd() + .try_get_matches_from(["catalogs", "facts", "show", "my-catalog", "my-fact"]) + .expect("facts show should parse"); + let (_, facts_args) = matches.subcommand().expect("expected facts subcommand"); + let (_, show_args) = facts_args.subcommand().expect("expected show subcommand"); + assert_eq!(show_args.get_one::("fact_name").unwrap(), "my-fact"); + assert_eq!( + show_args.get_one::("environment").unwrap(), + "default" + ); + } + + #[test] + fn facts_set_requires_statement() { + let result = + catalogs_cmd().try_get_matches_from(["catalogs", "facts", "set", "my-catalog", "f"]); + assert!(result.is_err()); + } + + #[test] + fn facts_set_defaults_scope_and_confidence() { + let matches = catalogs_cmd() + .try_get_matches_from([ + "catalogs", + "facts", + "set", + "my-catalog", + "my-fact", + "--statement", + "deleted_at is a soft-delete marker", + ]) + .expect("facts set should parse"); + + let (_, facts_args) = matches.subcommand().expect("expected facts subcommand"); + let (_, set_args) = facts_args.subcommand().expect("expected set subcommand"); + + assert_eq!(set_args.get_one::("scope").unwrap(), "catalog"); + assert_eq!( + set_args.get_one::("confidence").unwrap(), + "confirmed" + ); + assert!(set_args.get_one::("object").is_none()); + assert!(set_args.get_one::("source").is_none()); + assert!(set_args.get_one::("body").is_none()); + } + + #[test] + fn facts_set_accepts_all_fields() { + let matches = catalogs_cmd() + .try_get_matches_from([ + "catalogs", + "facts", + "set", + "my-catalog", + "my-fact", + "--statement", + "deleted_at marks soft-deleted rows", + "--scope", + "column", + "--object", + "bronze.runs.deleted_at", + "--confidence", + "inferred", + "--source", + "agent-42", + "--body", + "{\"sql\": \"deleted_at IS NULL\"}", + ]) + .expect("facts set with all flags should parse"); + + let (_, facts_args) = matches.subcommand().expect("expected facts subcommand"); + let (_, set_args) = facts_args.subcommand().expect("expected set subcommand"); + + assert_eq!(set_args.get_one::("scope").unwrap(), "column"); + assert_eq!( + set_args.get_one::("object").unwrap(), + "bronze.runs.deleted_at" + ); + assert_eq!( + set_args.get_one::("confidence").unwrap(), + "inferred" + ); + assert_eq!(set_args.get_one::("source").unwrap(), "agent-42"); + assert_eq!( + set_args.get_one::("body").unwrap(), + "{\"sql\": \"deleted_at IS NULL\"}" + ); + } + + #[test] + fn facts_delete_accepts_catalog_and_fact_name() { + let matches = catalogs_cmd() + .try_get_matches_from(["catalogs", "facts", "delete", "my-catalog", "my-fact"]) + .expect("facts delete should parse"); + + let (_, facts_args) = matches.subcommand().expect("expected facts subcommand"); + let (_, delete_args) = facts_args.subcommand().expect("expected delete subcommand"); + assert_eq!( + delete_args.get_one::("catalog_name").unwrap(), + "my-catalog" + ); + assert_eq!( + delete_args.get_one::("fact_name").unwrap(), + "my-fact" + ); + } + + #[test] + fn fact_scope_and_confidence_round_trip() { + use tower_api::models::{catalog_fact, update_catalog_fact_body}; + + for scope in super::FACT_SCOPES { + let parsed = super::parse_fact_scope(scope); + let rendered = match parsed { + update_catalog_fact_body::Scope::Catalog => catalog_fact::Scope::Catalog, + update_catalog_fact_body::Scope::Namespace => catalog_fact::Scope::Namespace, + update_catalog_fact_body::Scope::Table => catalog_fact::Scope::Table, + update_catalog_fact_body::Scope::Column => catalog_fact::Scope::Column, + update_catalog_fact_body::Scope::Metric => catalog_fact::Scope::Metric, + }; + assert_eq!(super::fact_scope_str(rendered), scope); + } + + for confidence in super::FACT_CONFIDENCES { + let parsed = super::parse_fact_confidence(confidence); + let rendered = match parsed { + update_catalog_fact_body::Confidence::Confirmed => { + catalog_fact::Confidence::Confirmed + } + update_catalog_fact_body::Confidence::Heuristic => { + catalog_fact::Confidence::Heuristic + } + update_catalog_fact_body::Confidence::Inferred => { + catalog_fact::Confidence::Inferred + } + }; + assert_eq!(super::fact_confidence_str(rendered), confidence); + } + } + + #[test] + fn truncate_statement_preserves_short_and_marks_long() { + assert_eq!(super::truncate_statement("short", 80), "short"); + let long = "x".repeat(100); + let truncated = super::truncate_statement(&long, 80); + assert_eq!(truncated.chars().count(), 80); + assert!(truncated.ends_with('…')); + } + + #[test] + fn fact_details_text_includes_body_and_optional_fields() { + use tower_api::models::{catalog_fact, CatalogFact}; + + let mut fact = CatalogFact::new( + catalog_fact::Confidence::Inferred, + "2026-07-22T00:00:00Z".to_string(), + "soft-deletes".to_string(), + "bronze.runs.deleted_at".to_string(), + catalog_fact::Scope::Column, + "deleted_at marks soft-deleted rows".to_string(), + "2026-07-22T01:00:00Z".to_string(), + ); + fact.source = Some("agent-42".to_string()); + fact.body = Some(Some(serde_json::json!({"sql": "deleted_at IS NULL"}))); + + let text = super::fact_details_text("my-catalog", "production", &fact); + + assert!(text.contains("soft-deletes")); + assert!(text.contains("my-catalog")); + assert!(text.contains("production")); + assert!(text.contains("column")); + assert!(text.contains("bronze.runs.deleted_at")); + assert!(text.contains("inferred")); + assert!(text.contains("agent-42")); + assert!(text.contains("deleted_at marks soft-deleted rows")); + assert!(text.contains("deleted_at IS NULL")); + + // Optional fields drop out when absent. + fact.source = None; + fact.body = None; + fact.object = String::new(); + let text = super::fact_details_text("my-catalog", "production", &fact); + assert!(!text.contains("Source")); + assert!(!text.contains("Body")); + assert!(!text.contains("Object")); + } + + #[test] + fn facts_command_is_marked_beta() { + let mut command = catalogs_cmd(); + let facts_help = command + .find_subcommand_mut("facts") + .expect("facts command should exist") + .render_help() + .to_string(); + assert!(facts_help.contains("[beta]")); + } + #[test] fn all_snippet_templates_fully_render() { let credentials = CatalogCredentials::new( diff --git a/crates/tower-cmd/src/lib.rs b/crates/tower-cmd/src/lib.rs index a4d8b48f..a30813de 100644 --- a/crates/tower-cmd/src/lib.rs +++ b/crates/tower-cmd/src/lib.rs @@ -154,6 +154,24 @@ impl App { Some(("query", args)) => { catalogs::do_query(&out, sessionized_config, args).await } + Some(("facts", facts_matches)) => match facts_matches.subcommand() { + Some(("list", args)) => { + catalogs::do_facts_list(&out, sessionized_config, args).await + } + Some(("show", args)) => { + catalogs::do_facts_show(&out, sessionized_config, args).await + } + Some(("set", args)) => { + catalogs::do_facts_set(&out, sessionized_config, args).await + } + Some(("delete", args)) => { + catalogs::do_facts_delete(&out, sessionized_config, args).await + } + _ => { + catalogs::catalogs_cmd().print_help().unwrap(); + std::process::exit(2); + } + }, _ => { catalogs::catalogs_cmd().print_help().unwrap(); std::process::exit(2); diff --git a/crates/tower-cmd/src/util/apps.rs b/crates/tower-cmd/src/util/apps.rs index 4cadce8a..bedcec17 100644 --- a/crates/tower-cmd/src/util/apps.rs +++ b/crates/tower-cmd/src/util/apps.rs @@ -85,6 +85,10 @@ pub async fn ensure_app_exists( slug: None, is_externally_accessible: None, subdomain: None, + pending_timeout: None, + retry_policy: None, + running_timeout: None, + tags: None, }, }, )