diff --git a/packages/api/actor/src/route/actors.rs b/packages/api/actor/src/route/actors.rs index 687332da38..b2552aaefd 100644 --- a/packages/api/actor/src/route/actors.rs +++ b/packages/api/actor/src/route/actors.rs @@ -112,10 +112,24 @@ pub async fn create( routing: if let Some(routing) = p.routing { match *routing { models::ActorPortRouting { - game_guard: Some(_), + game_guard: Some(gg), host: None, } => ds::types::Routing::GameGuard { protocol: p.protocol.api_into(), + authorization: match gg.authorization.as_deref() { + Some(models::ActorPortAuthorization { + bearer: Some(token), + .. + }) => ds::types::PortAuthorization::Bearer(token.clone()), + Some(models::ActorPortAuthorization { + query: Some(query), + .. + }) => ds::types::PortAuthorization::Query( + query.key.clone(), + query.value.clone(), + ), + _ => ds::types::PortAuthorization::None, + }, }, models::ActorPortRouting { game_guard: None, @@ -130,6 +144,7 @@ pub async fn create( } else { ds::types::Routing::GameGuard { protocol: p.protocol.api_into(), + authorization: ds::types::PortAuthorization::None, } } } diff --git a/packages/api/actor/src/route/builds.rs b/packages/api/actor/src/route/builds.rs index 737ebed393..1e0c1f4e82 100644 --- a/packages/api/actor/src/route/builds.rs +++ b/packages/api/actor/src/route/builds.rs @@ -174,17 +174,13 @@ pub async fn create_build( let multipart_upload = body.multipart_upload.unwrap_or(false); let kind = match body.kind { - None | Some(models::ActorBuildKind::DockerImage) => { - backend::build::BuildKind::DockerImage - } + None | Some(models::ActorBuildKind::DockerImage) => backend::build::BuildKind::DockerImage, Some(models::ActorBuildKind::OciBundle) => backend::build::BuildKind::OciBundle, Some(models::ActorBuildKind::Javascript) => backend::build::BuildKind::JavaScript, }; let compression = match body.compression { - None | Some(models::ActorBuildCompression::None) => { - backend::build::BuildCompression::None - } + None | Some(models::ActorBuildCompression::None) => backend::build::BuildCompression::None, Some(models::ActorBuildCompression::Lz4) => backend::build::BuildCompression::Lz4, }; diff --git a/packages/api/traefik-provider/src/route/game_guard/dynamic_servers.rs b/packages/api/traefik-provider/src/route/game_guard/dynamic_servers.rs index 1065e59f56..6bac33fe65 100644 --- a/packages/api/traefik-provider/src/route/game_guard/dynamic_servers.rs +++ b/packages/api/traefik-provider/src/route/game_guard/dynamic_servers.rs @@ -1,28 +1,35 @@ use std::{ collections::hash_map::DefaultHasher, hash::{Hash, Hasher}, + fmt::Write, }; use api_helper::ctx::Ctx; use rivet_operation::prelude::*; use serde::{Deserialize, Serialize}; +use ds::types::{PortAuthorizationType, PortAuthorization, GameGuardProtocol}; use crate::{auth::Auth, types}; -// TODO: Rename to ProxiedPort since this is not 1:1 with servers #[derive(sqlx::FromRow, Clone, Debug, Serialize, Deserialize)] -struct DynamicServer { +struct DynamicServerProxiedPort { server_id: Uuid, datacenter_id: Uuid, + label: String, ip: String, + source: i64, gg_port: i64, port_name: String, protocol: i64, + + auth_type: Option, + auth_key: Option, + auth_value: Option, } -impl DynamicServer { +impl DynamicServerProxiedPort { fn parent_host(&self, config: &rivet_config::Config) -> GlobalResult { Ok(format!( "lobby.{}.{}", @@ -41,12 +48,12 @@ pub async fn build_ds( dc_id: Uuid, config: &mut types::TraefikConfigResponse, ) -> GlobalResult<()> { - let dynamic_servers = ctx + let proxied_ports = ctx .cache() .ttl(60_000) - .fetch_one_json("servers_ports", dc_id, |mut cache, dc_id| async move { + .fetch_one_json("ds_proxied_ports", dc_id, |mut cache, dc_id| async move { let rows = sql_fetch_all!( - [ctx, DynamicServer] + [ctx, DynamicServerProxiedPort] " SELECT s.server_id, @@ -56,7 +63,10 @@ pub async fn build_ds( pp.source, gg.gg_port, gg.port_name, - gg.protocol + gg.protocol, + gga.auth_type, + gga.auth_key, + gga.auth_value FROM db_ds.server_proxied_ports AS pp JOIN db_ds.servers AS s ON pp.server_id = s.server_id @@ -64,6 +74,10 @@ pub async fn build_ds( ON pp.server_id = gg.server_id AND pp.label = CONCAT('ds_', REPLACE(gg.port_name, '-', '_')) + LEFT JOIN db_ds.server_ports_gg_auth AS gga + ON + gg.server_id = gga.server_id AND + gg.port_name = gga.port_name WHERE s.datacenter_id = $1 AND s.destroy_ts IS NULL @@ -78,19 +92,6 @@ pub async fn build_ds( .await? .unwrap_or_default(); - // Process proxied ports - for dynamic_server in &dynamic_servers { - let server_id = dynamic_server.server_id; - let register_res = - ds_register_proxied_port(ctx.config(), server_id, dynamic_server, config); - match register_res { - Ok(_) => {} - Err(err) => { - tracing::error!(?err, "failed to register proxied port route") - } - } - } - config.http.middlewares.insert( "ds-rate-limit".to_owned(), types::TraefikMiddlewareHttp::RateLimit { @@ -115,28 +116,46 @@ pub async fn build_ds( }, ); - // TODO: add middleware & services & ports - // TODO: same as jobs, watch out for namespaces + // Process proxied ports + for proxied_port in &proxied_ports { + if let Err(err) = ds_register_proxied_port(ctx.config(), proxied_port, config) { + tracing::error!(?err, "failed to register proxied port") + } + } + + tracing::info!( + http_services = ?config.http.services.len(), + http_routers = ?config.http.routers.len(), + http_middlewares = ?config.http.middlewares.len(), + tcp_services = ?config.tcp.services.len(), + tcp_routers = ?config.tcp.routers.len(), + tcp_middlewares = ?config.tcp.middlewares.len(), + udp_services = ?config.udp.services.len(), + udp_routers = ?config.udp.routers.len(), + udp_middlewares = ?config.udp.middlewares.len(), + "dynamic servers traefik config" + ); + Ok(()) } #[tracing::instrument(skip(config))] fn ds_register_proxied_port( config: &rivet_config::Config, - server_id: Uuid, - proxied_port: &DynamicServer, + proxied_port: &DynamicServerProxiedPort, traefik_config: &mut types::TraefikConfigResponse, ) -> GlobalResult<()> { let ingress_port = proxied_port.gg_port; + let server_id = proxied_port.server_id; let target_port_label = proxied_port.label.clone(); - let service_id = format!("ds:{}:{}", server_id, target_port_label); - let proxy_protocol = unwrap!(ds::types::GameGuardProtocol::from_repr( + let service_id = format!("ds:{server_id}:{target_port_label}"); + let proxy_protocol = unwrap!(GameGuardProtocol::from_repr( proxied_port.protocol.try_into()? )); // Insert the relevant service match proxy_protocol { - ds::types::GameGuardProtocol::Http | ds::types::GameGuardProtocol::Https => { + GameGuardProtocol::Http | GameGuardProtocol::Https => { traefik_config.http.services.insert( service_id.clone(), types::TraefikService { @@ -153,7 +172,7 @@ fn ds_register_proxied_port( }, ); } - ds::types::GameGuardProtocol::Tcp | ds::types::GameGuardProtocol::TcpTls => { + GameGuardProtocol::Tcp | GameGuardProtocol::TcpTls => { traefik_config.tcp.services.insert( service_id.clone(), types::TraefikService { @@ -167,7 +186,7 @@ fn ds_register_proxied_port( }, ); } - ds::types::GameGuardProtocol::Udp => { + GameGuardProtocol::Udp => { traefik_config.udp.services.insert( service_id.clone(), types::TraefikService { @@ -185,7 +204,7 @@ fn ds_register_proxied_port( // Insert the relevant router match proxy_protocol { - ds::types::GameGuardProtocol::Http => { + GameGuardProtocol::Http => { // Generate config let middlewares = http_router_middlewares(); let rule = format_http_rule(config, proxied_port)?; @@ -208,7 +227,7 @@ fn ds_register_proxied_port( }, ); } - ds::types::GameGuardProtocol::Https => { + GameGuardProtocol::Https => { // Generate config let middlewares = http_router_middlewares(); let rule = format_http_rule(config, proxied_port)?; @@ -234,7 +253,7 @@ fn ds_register_proxied_port( }, ); } - ds::types::GameGuardProtocol::Tcp => { + GameGuardProtocol::Tcp => { traefik_config.tcp.routers.insert( format!("ds:{}:{}:tcp", server_id, target_port_label), types::TraefikRouter { @@ -247,7 +266,7 @@ fn ds_register_proxied_port( }, ); } - ds::types::GameGuardProtocol::TcpTls => { + GameGuardProtocol::TcpTls => { traefik_config.tcp.routers.insert( format!("ds:{}:{}:tcp-tls", server_id, target_port_label), types::TraefikRouter { @@ -263,7 +282,7 @@ fn ds_register_proxied_port( }, ); } - ds::types::GameGuardProtocol::Udp => { + GameGuardProtocol::Udp => { traefik_config.udp.routers.insert( format!("ds:{}:{}:udp", server_id, target_port_label), types::TraefikRouter { @@ -283,14 +302,49 @@ fn ds_register_proxied_port( fn format_http_rule( config: &rivet_config::Config, - proxied_port: &DynamicServer, + proxied_port: &DynamicServerProxiedPort, ) -> GlobalResult { - Ok(format!("Host(`{}`)", proxied_port.hostname(config)?)) + let authorization = { + let authorization_type = if let Some(auth_type) = proxied_port.auth_type { + unwrap!(PortAuthorizationType::from_repr(auth_type.try_into()?)) + } else { + PortAuthorizationType::None + }; + + match authorization_type { + PortAuthorizationType::None => PortAuthorization::None, + PortAuthorizationType::Bearer => { + PortAuthorization::Bearer(unwrap!(proxied_port.auth_value.clone())) + } + PortAuthorizationType::Query => PortAuthorization::Query( + unwrap!(proxied_port.auth_key.clone()), + unwrap!(proxied_port.auth_value.clone()), + ), + } + }; + + let mut rule = "(".to_string(); + + write!(&mut rule, "Host(`{}`)", proxied_port.hostname(config)?)?; + + match authorization { + PortAuthorization::None => {} + PortAuthorization::Bearer(token) => { + write!(&mut rule, "&& Header(`Authorization`, `Bearer {}`)", escape_input(&token))?; + } + PortAuthorization::Query(key, value) => { + write!(&mut rule, "&& Query(`{}`, `{}`)", escape_input(&key), escape_input(&value))?; + } + } + + rule.push_str(")"); + + Ok(rule) } fn build_tls_domains( config: &rivet_config::Config, - proxied_port: &DynamicServer, + proxied_port: &DynamicServerProxiedPort, ) -> GlobalResult> { // Derive TLS config. Jobs can specify their own ingress rules, so we // need to derive which domains to use for the job. @@ -312,3 +366,7 @@ fn http_router_middlewares() -> Vec { middlewares } + +fn escape_input(input: &str) -> String { + input.replace("`", "\\`") +} diff --git a/packages/services/admin/worker/Cargo.toml b/packages/services/admin/worker/Cargo.toml index a9ede43181..f33e3519d3 100644 --- a/packages/services/admin/worker/Cargo.toml +++ b/packages/services/admin/worker/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "cloud-worker" +name = "admin-worker" version = "0.0.1" edition = "2021" authors = ["Rivet Gaming, LLC "] @@ -12,7 +12,7 @@ rivet-health-checks = { path = "../../../common/health-checks" } rivet-metrics = { path = "../../../common/metrics" } rivet-runtime = { path = "../../../common/runtime" } -cloud-game-token-create = { path = "../ops/game-token-create" } +cloud-game-token-create = { path = "../../cloud/ops/game-token-create" } chrono = "0.4.31" rivet-config = { version = "0.1.0", path = "../../../common/config" } [dev-dependencies] diff --git a/packages/services/ds/db/servers/migrations/20241030122600_gg_port_auth.down.sql b/packages/services/ds/db/servers/migrations/20241030122600_gg_port_auth.down.sql new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/services/ds/db/servers/migrations/20241030122600_gg_port_auth.up.sql b/packages/services/ds/db/servers/migrations/20241030122600_gg_port_auth.up.sql new file mode 100644 index 0000000000..66388b739a --- /dev/null +++ b/packages/services/ds/db/servers/migrations/20241030122600_gg_port_auth.up.sql @@ -0,0 +1,10 @@ +CREATE TABLE server_ports_gg_auth ( + server_id UUID NOT NULL, + port_name UUID NOT NULL, + auth_type INT NOT NULL, + key TEXT, + value TEXT NOT NULL, + + FOREIGN KEY (server_id, port_name) REFERENCES server_ports_gg (server_id, port_name), + PRIMARY KEY (server_id, port_name) +); diff --git a/packages/services/ds/src/ops/server/get.rs b/packages/services/ds/src/ops/server/get.rs index a255d351de..b907d18b13 100644 --- a/packages/services/ds/src/ops/server/get.rs +++ b/packages/services/ds/src/ops/server/get.rs @@ -3,7 +3,8 @@ use std::{collections::HashMap, convert::TryInto, net::IpAddr}; use chirp_workflow::prelude::*; use crate::types::{ - GameGuardProtocol, HostProtocol, NetworkMode, Port, Routing, Server, ServerResources, + GameGuardProtocol, HostProtocol, NetworkMode, Port, PortAuthorization, PortAuthorizationType, + Routing, Server, ServerResources, }; #[derive(sqlx::FromRow)] @@ -33,6 +34,10 @@ struct ServerPortGg { port_number: Option, gg_port: i64, protocol: i64, + + auth_type: Option, + auth_key: Option, + auth_value: Option, } #[derive(sqlx::FromRow)] @@ -112,13 +117,20 @@ pub async fn ds_server_get(ctx: &OperationCtx, input: &Input) -> GlobalResult PortAuthorization::None, + PortAuthorizationType::Bearer => { + PortAuthorization::Bearer(unwrap!(gg_port.auth_value.clone())) + } + PortAuthorizationType::Query => PortAuthorization::Query( + unwrap!(gg_port.auth_key.clone()), + unwrap!(gg_port.auth_value.clone()), + ), + } + }, }, }) } diff --git a/packages/services/ds/src/types.rs b/packages/services/ds/src/types.rs index 1678abcfee..d4e9f12f69 100644 --- a/packages/services/ds/src/types.rs +++ b/packages/services/ds/src/types.rs @@ -50,8 +50,13 @@ pub struct Port { #[derive(Debug, Clone, Serialize, Deserialize, Hash)] pub enum Routing { - GameGuard { protocol: GameGuardProtocol }, - Host { protocol: HostProtocol }, + GameGuard { + protocol: GameGuardProtocol, + authorization: PortAuthorization, + }, + Host { + protocol: HostProtocol, + }, } #[derive(Serialize, Deserialize, Hash, Debug, Clone, Copy, PartialEq, Eq, FromRepr)] @@ -63,6 +68,20 @@ pub enum GameGuardProtocol { Udp = 4, } +#[derive(Debug, Clone, Serialize, Deserialize, Hash)] +pub enum PortAuthorization { + None, + Bearer(String), + Query(String, String), +} + +#[derive(Serialize, Deserialize, Hash, Debug, Clone, Copy, PartialEq, Eq, FromRepr)] +pub enum PortAuthorizationType { + None = 0, + Bearer = 1, + Query = 2, +} + #[derive(Serialize, Deserialize, Hash, Debug, Clone, Copy, PartialEq, Eq, FromRepr)] pub enum HostProtocol { Tcp = 0, @@ -158,10 +177,32 @@ impl ApiFrom for models::ActorNetworkMode { impl ApiFrom for models::ActorPort { fn api_from(value: Port) -> models::ActorPort { let (protocol, routing) = match &value.routing { - Routing::GameGuard { protocol } => ( + Routing::GameGuard { + protocol, + authorization, + } => ( (*protocol).api_into(), models::ActorPortRouting { - game_guard: Some(json!({})), + game_guard: Some(Box::new(models::ActorGameGuardRouting { + authorization: match authorization { + PortAuthorization::None => None, + PortAuthorization::Bearer(token) => { + Some(Box::new(models::ActorPortAuthorization { + bearer: Some(token.clone()), + ..Default::default() + })) + } + PortAuthorization::Query(key, value) => { + Some(Box::new(models::ActorPortAuthorization { + query: Some(Box::new(models::ActorPortQueryAuthorization { + key: key.clone(), + value: value.clone(), + })), + ..Default::default() + })) + } + }, + })), ..Default::default() }, ), diff --git a/packages/services/ds/src/workflows/server/mod.rs b/packages/services/ds/src/workflows/server/mod.rs index c8cec2f020..a1db027b86 100644 --- a/packages/services/ds/src/workflows/server/mod.rs +++ b/packages/services/ds/src/workflows/server/mod.rs @@ -13,7 +13,10 @@ use futures_util::FutureExt; use rand::Rng; use rivet_operation::prelude::proto::backend; -use crate::types::{GameGuardProtocol, NetworkMode, Routing, ServerResources, ServerRuntime}; +use crate::types::{ + GameGuardProtocol, NetworkMode, PortAuthorization, PortAuthorizationType, Routing, + ServerResources, ServerRuntime, +}; pub mod nomad; pub mod pegboard; @@ -25,21 +28,6 @@ const DRAIN_PADDING_MS: i64 = 10000; // TODO: Restructure traefik to get rid of this const TRAEFIK_GRACE_PERIOD: Duration = Duration::from_secs(2); -#[derive(Clone, Debug, Default)] -pub(crate) struct GameGuardUnnest { - pub port_names: Vec, - pub port_numbers: Vec>, - pub protocols: Vec, - pub gg_ports: Vec, -} - -#[derive(Clone, Debug, Default)] -pub(crate) struct HostUnnest { - pub port_names: Vec, - pub port_numbers: Vec>, - pub protocols: Vec, -} - #[derive(Debug, Serialize, Deserialize)] pub struct Input { pub server_id: Uuid, @@ -109,6 +97,29 @@ pub async fn ds_server(ctx: &mut WorkflowCtx, input: &Input) -> GlobalResult<()> } } +#[derive(Clone, Debug, Default)] +pub(crate) struct GameGuardUnnest { + pub port_names: Vec, + pub port_numbers: Vec>, + pub protocols: Vec, + pub gg_ports: Vec, +} + +#[derive(Clone, Debug, Default)] +pub(crate) struct GameGuardAuthUnnest { + pub port_names: Vec, + pub port_auth_types: Vec, + pub port_auth_keys: Vec>, + pub port_auth_values: Vec, +} + +#[derive(Clone, Debug, Default)] +pub(crate) struct HostUnnest { + pub port_names: Vec, + pub port_numbers: Vec>, + pub protocols: Vec, +} + #[derive(Debug, Clone, Serialize, Deserialize, Hash)] pub(crate) struct InsertDbInput { server_id: Uuid, @@ -128,11 +139,15 @@ pub(crate) struct InsertDbInput { #[activity(InsertDb)] pub(crate) async fn insert_db(ctx: &ActivityCtx, input: &InsertDbInput) -> GlobalResult<()> { let mut gg_unnest = GameGuardUnnest::default(); + let mut gg_auth_unnest = GameGuardAuthUnnest::default(); let mut host_unnest = HostUnnest::default(); for (name, port) in input.network_ports.iter() { match port.routing { - Routing::GameGuard { protocol } => { + Routing::GameGuard { + protocol, + ref authorization, + } => { gg_unnest.port_names.push(name.clone()); gg_unnest .port_numbers @@ -141,6 +156,26 @@ pub(crate) async fn insert_db(ctx: &ActivityCtx, input: &InsertDbInput) -> Globa gg_unnest .gg_ports .push(choose_ingress_port(ctx, protocol).await? as i32); + + match authorization { + PortAuthorization::None => {} + PortAuthorization::Bearer(token) => { + gg_auth_unnest.port_names.push(name.clone()); + gg_auth_unnest + .port_auth_types + .push(PortAuthorizationType::Bearer as i32); + gg_auth_unnest.port_auth_keys.push(None); + gg_auth_unnest.port_auth_values.push(token.clone()); + } + PortAuthorization::Query(key, value) => { + gg_auth_unnest.port_names.push(name.clone()); + gg_auth_unnest + .port_auth_types + .push(PortAuthorizationType::Query as i32); + gg_auth_unnest.port_auth_keys.push(Some(key.clone())); + gg_auth_unnest.port_auth_values.push(value.clone()); + } + } } Routing::Host { protocol } => { host_unnest.port_names.push(name.clone()); @@ -204,8 +239,18 @@ pub(crate) async fn insert_db(ctx: &ActivityCtx, input: &InsertDbInput) -> Globa ) SELECT $1, t.* FROM unnest($17, $18, $19, $20) AS t(port_name, port_number, protocol, gg_port) - -- Check if lists are empty - WHERE port_name IS NOT NULL + RETURNING 1 + ), + gg_port_auth AS ( + INSERT INTO db_ds.server_ports_gg_auth ( + server_id, + port_name, + auth_type, + auth_key, + auth_value + ) + SELECT $1, t.* + FROM unnest($17, $18, $19, $20) AS t(port_name, auth_type, auth_key, auth_value) RETURNING 1 ) SELECT 1 @@ -241,7 +286,7 @@ pub(crate) async fn insert_db(ctx: &ActivityCtx, input: &InsertDbInput) -> Globa // workflow step // Invalidate cache when new server is created ctx.cache() - .purge("servers_ports", [input.datacenter_id]) + .purge("ds_proxied_ports", [input.datacenter_id]) .await?; Ok(()) diff --git a/packages/services/ds/src/workflows/server/nomad/alloc_plan.rs b/packages/services/ds/src/workflows/server/nomad/alloc_plan.rs index 5661940a87..5fa678d76d 100644 --- a/packages/services/ds/src/workflows/server/nomad/alloc_plan.rs +++ b/packages/services/ds/src/workflows/server/nomad/alloc_plan.rs @@ -215,7 +215,7 @@ async fn update_db(ctx: &ActivityCtx, input: &UpdateDbInput) -> GlobalResult GlobalResult GlobalResult { + Routing::GameGuard { protocol, .. } => { TransportProtocol::from(protocol).as_cni_protocol() } Routing::Host { protocol } => TransportProtocol::from(protocol).as_cni_protocol(), @@ -377,25 +377,8 @@ async fn submit_job(ctx: &ActivityCtx, input: &SubmitJobInput) -> GlobalResult>>()?; // Also see util_ds:consts::DEFAULT_ENV_KEYS - let mut env = Vec::<(String, String)>::new() + let mut env = Vec::new() .into_iter() - // TODO - // .chain(if lobby_config { - // Some(( - // "RIVET_LOBBY_CONFIG".to_string(), - // template_env_var("NOMAD_META_LOBBY_CONFIG"), - // )) - // } else { - // None - // }) - // .chain(if lobby_tags { - // Some(( - // "RIVET_LOBBY_TAGS".to_string(), - // template_env_var("NOMAD_META_LOBBY_TAGS"), - // )) - // } else { - // None - // }) .chain([( "RIVET_API_ENDPOINT".to_string(), ctx.config() @@ -406,32 +389,7 @@ async fn submit_job(ctx: &ActivityCtx, input: &SubmitJobInput) -> GlobalResult>(); env.sort(); @@ -443,7 +401,7 @@ async fn submit_job(ctx: &ActivityCtx, input: &SubmitJobInput) -> GlobalResult TransportProtocol::from(protocol), + Routing::GameGuard { protocol, .. } => TransportProtocol::from(protocol), Routing::Host { protocol } => TransportProtocol::from(protocol), }; @@ -687,91 +645,6 @@ async fn submit_job(ctx: &ActivityCtx, input: &SubmitJobInput) -> GlobalResult Cleaning up job') - - res_json = None - with req('POST', f'{origin_api}/job/runs/cleanup', - data = json.dumps({{}}).encode(), - headers = {{ - 'Authorization': f'Bearer {{BEARER}}', - 'Content-Type': 'application/json' - }} - ) as res: - res_json = json.load(res) - - - print('\n> Finished') - "#, - origin_api = ctx.config().server()?.rivet.api_public.public_origin(), - )), - ..Template::new() - }]), - resources: Some(Box::new(Resources { - CPU: Some(util_job::TASK_CLEANUP_CPU), - memory_mb: Some(util_job::TASK_CLEANUP_MEMORY), - ..Resources::new() - })), - log_config: Some(Box::new(LogConfig { - max_files: Some(4), - max_file_size_mb: Some(2), - disabled: Some(false), - })), - ..Task::new() - }, ]), ..TaskGroup::new() }]), diff --git a/packages/services/ds/src/workflows/server/pegboard/destroy.rs b/packages/services/ds/src/workflows/server/pegboard/destroy.rs index 556f709172..09d7fc6eeb 100644 --- a/packages/services/ds/src/workflows/server/pegboard/destroy.rs +++ b/packages/services/ds/src/workflows/server/pegboard/destroy.rs @@ -110,7 +110,7 @@ async fn update_db(ctx: &ActivityCtx, input: &UpdateDbInput) -> GlobalResult GlobalResult { .network_ports .iter() .map(|(port_label, port)| match port.routing { - Routing::GameGuard { protocol } => Ok(( + Routing::GameGuard { protocol, .. } => Ok(( crate::util::format_port_label(port_label), pp::Port { target: port.internal_port, @@ -418,7 +418,7 @@ async fn update_ports(ctx: &ActivityCtx, input: &UpdatePortsInput) -> GlobalResu // Invalidate cache when ports are updated if !input.ports.is_empty() { ctx.cache() - .purge("servers_ports", [input.datacenter_id]) + .purge("ds_proxied_ports", [input.datacenter_id]) .await?; } diff --git a/sdks/fern/definition/actor/common.yml b/sdks/fern/definition/actor/common.yml index f77ce15612..46577bcc69 100644 --- a/sdks/fern/definition/actor/common.yml +++ b/sdks/fern/definition/actor/common.yml @@ -77,7 +77,18 @@ types: host: optional GameGuardRouting: - properties: {} + properties: + authorization: optional + + PortAuthorization: + properties: + bearer: optional + query: optional + + PortQueryAuthorization: + properties: + key: string + value: string HostRouting: properties: {} diff --git a/sdks/full/go/actor/types.go b/sdks/full/go/actor/types.go index a6c9b36ed7..f55398a6e6 100644 --- a/sdks/full/go/actor/types.go +++ b/sdks/full/go/actor/types.go @@ -179,6 +179,8 @@ func (d *Datacenter) String() string { } type GameGuardRouting struct { + Authorization *PortAuthorization `json:"authorization,omitempty"` + _rawJSON json.RawMessage } @@ -347,6 +349,36 @@ func (p *Port) String() string { return fmt.Sprintf("%#v", p) } +type PortAuthorization struct { + Bearer *string `json:"bearer,omitempty"` + Query *PortQueryAuthorization `json:"query,omitempty"` + + _rawJSON json.RawMessage +} + +func (p *PortAuthorization) UnmarshalJSON(data []byte) error { + type unmarshaler PortAuthorization + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PortAuthorization(value) + p._rawJSON = json.RawMessage(data) + return nil +} + +func (p *PortAuthorization) String() string { + if len(p._rawJSON) > 0 { + if value, err := core.StringifyJSON(p._rawJSON); err == nil { + return value + } + } + if value, err := core.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + type PortProtocol string const ( @@ -378,6 +410,36 @@ func (p PortProtocol) Ptr() *PortProtocol { return &p } +type PortQueryAuthorization struct { + Key string `json:"key"` + Value string `json:"value"` + + _rawJSON json.RawMessage +} + +func (p *PortQueryAuthorization) UnmarshalJSON(data []byte) error { + type unmarshaler PortQueryAuthorization + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PortQueryAuthorization(value) + p._rawJSON = json.RawMessage(data) + return nil +} + +func (p *PortQueryAuthorization) String() string { + if len(p._rawJSON) > 0 { + if value, err := core.StringifyJSON(p._rawJSON); err == nil { + return value + } + } + if value, err := core.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + type PortRouting struct { GameGuard *GameGuardRouting `json:"game_guard,omitempty"` Host *HostRouting `json:"host,omitempty"` diff --git a/sdks/full/go/client/client.go b/sdks/full/go/client/client.go index 593c0f7de4..5024034df6 100644 --- a/sdks/full/go/client/client.go +++ b/sdks/full/go/client/client.go @@ -13,7 +13,6 @@ import ( groupclient "sdk/group/client" identityclient "sdk/identity/client" jobclient "sdk/job/client" - kvclient "sdk/kv/client" matchmakerclient "sdk/matchmaker/client" portalclient "sdk/portal/client" provisionclient "sdk/provision/client" @@ -29,7 +28,6 @@ type Client struct { Cloud *cloudclient.Client Group *groupclient.Client Identity *identityclient.Client - Kv *kvclient.Client Provision *provisionclient.Client Auth *authclient.Client Games *gamesclient.Client @@ -52,7 +50,6 @@ func NewClient(opts ...core.ClientOption) *Client { Cloud: cloudclient.NewClient(opts...), Group: groupclient.NewClient(opts...), Identity: identityclient.NewClient(opts...), - Kv: kvclient.NewClient(opts...), Provision: provisionclient.NewClient(opts...), Auth: authclient.NewClient(opts...), Games: gamesclient.NewClient(opts...), diff --git a/sdks/full/go/group/client/client.go b/sdks/full/go/group/client/client.go index d73c2479ef..b4fd7aa871 100644 --- a/sdks/full/go/group/client/client.go +++ b/sdks/full/go/group/client/client.go @@ -366,96 +366,6 @@ func (c *Client) ValidateProfile(ctx context.Context, request *group.ValidatePro return response, nil } -// Fuzzy search for groups. -func (c *Client) Search(ctx context.Context, request *group.SearchRequest) (*group.SearchResponse, error) { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "group/groups/search" - - queryParams := make(url.Values) - queryParams.Add("query", fmt.Sprintf("%v", request.Query)) - if request.Anchor != nil { - queryParams.Add("anchor", fmt.Sprintf("%v", *request.Anchor)) - } - if request.Limit != nil { - queryParams.Add("limit", fmt.Sprintf("%v", *request.Limit)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - var response *group.SearchResponse - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return nil, err - } - return response, nil -} - // Completes an avatar image upload. Must be called after the file upload // process completes. // Call `rivet.api.group#PrepareAvatarUpload` first. diff --git a/sdks/full/go/group/group.go b/sdks/full/go/group/group.go index d2e3cfbb2e..e366fd0013 100644 --- a/sdks/full/go/group/group.go +++ b/sdks/full/go/group/group.go @@ -323,37 +323,6 @@ func (p *PrepareAvatarUploadResponse) String() string { return fmt.Sprintf("%#v", p) } -type SearchResponse struct { - // A list of group handles. - Groups []*group.Handle `json:"groups,omitempty"` - Anchor *string `json:"anchor,omitempty"` - - _rawJSON json.RawMessage -} - -func (s *SearchResponse) UnmarshalJSON(data []byte) error { - type unmarshaler SearchResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *s = SearchResponse(value) - s._rawJSON = json.RawMessage(data) - return nil -} - -func (s *SearchResponse) String() string { - if len(s._rawJSON) > 0 { - if value, err := core.StringifyJSON(s._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(s); err == nil { - return value - } - return fmt.Sprintf("%#v", s) -} - type TransferOwnershipRequest struct { // Identity to transfer the group to. // Must be a member of the group. diff --git a/sdks/full/go/group/types.go b/sdks/full/go/group/types.go index 578ffb2f6e..ebcc8b84e4 100644 --- a/sdks/full/go/group/types.go +++ b/sdks/full/go/group/types.go @@ -49,14 +49,6 @@ type ListSuggestedRequest struct { WatchIndex *string `json:"-"` } -type SearchRequest struct { - // The query to match group display names against. - Query string `json:"-"` - Anchor *string `json:"-"` - // Unsigned 32 bit integer. - Limit *float64 `json:"-"` -} - // A banned identity. type BannedIdentity struct { Identity *identity.Handle `json:"identity,omitempty"` diff --git a/sdks/full/go/identity/client/client.go b/sdks/full/go/identity/client/client.go index 3a51bc8fb7..fdcb941e07 100644 --- a/sdks/full/go/identity/client/client.go +++ b/sdks/full/go/identity/client/client.go @@ -17,7 +17,6 @@ import ( identity "sdk/identity" activities "sdk/identity/activities" events "sdk/identity/events" - links "sdk/identity/links" ) type Client struct { @@ -27,7 +26,6 @@ type Client struct { Activities *activities.Client Events *events.Client - Links *links.Client } func NewClient(opts ...core.ClientOption) *Client { @@ -41,7 +39,6 @@ func NewClient(opts ...core.ClientOption) *Client { header: options.ToHeader(), Activities: activities.NewClient(opts...), Events: events.NewClient(opts...), - Links: links.NewClient(opts...), } } @@ -624,96 +621,6 @@ func (c *Client) ValidateProfile(ctx context.Context, request *identity.Validate return nil } -// Fuzzy search for identities. -func (c *Client) Search(ctx context.Context, request *identity.SearchRequest) (*identity.SearchResponse, error) { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "identity/identities/search" - - queryParams := make(url.Values) - queryParams.Add("query", fmt.Sprintf("%v", request.Query)) - if request.Anchor != nil { - queryParams.Add("anchor", fmt.Sprintf("%v", *request.Anchor)) - } - if request.Limit != nil { - queryParams.Add("limit", fmt.Sprintf("%v", *request.Limit)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - var response *identity.SearchResponse - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return nil, err - } - return response, nil -} - // Sets the current identity's game activity. This activity will automatically be removed when the identity goes offline. func (c *Client) SetGameActivity(ctx context.Context, request *identity.SetGameActivityRequest) error { baseURL := "https://api.rivet.gg" @@ -944,158 +851,6 @@ func (c *Client) UpdateStatus(ctx context.Context, request *identity.UpdateStatu return nil } -// Follows the given identity. In order for identities to be "friends", the other identity has to also follow this identity. -func (c *Client) Follow(ctx context.Context, identityId uuid.UUID) error { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"identity/identities/%v/follow", identityId) - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return err - } - return nil -} - -// Unfollows the given identity. -func (c *Client) Unfollow(ctx context.Context, identityId uuid.UUID) error { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"identity/identities/%v/follow", identityId) - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodDelete, - Headers: c.header, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return err - } - return nil -} - // Prepares an avatar image upload. Complete upload with `CompleteIdentityAvatarUpload`. func (c *Client) PrepareAvatarUpload(ctx context.Context, request *identity.PrepareAvatarUploadRequest) (*identity.PrepareAvatarUploadResponse, error) { baseURL := "https://api.rivet.gg" @@ -1328,598 +1083,6 @@ func (c *Client) SignupForBeta(ctx context.Context, request *identity.SignupForB return nil } -// Creates an abuse report for an identity. -func (c *Client) Report(ctx context.Context, identityId uuid.UUID, request *identity.ReportRequest) error { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"identity/identities/%v/report", identityId) - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return err - } - return nil -} - -func (c *Client) ListFollowers(ctx context.Context, identityId uuid.UUID, request *identity.ListFollowersRequest) (*identity.ListFollowersResponse, error) { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"identity/identities/%v/followers", identityId) - - queryParams := make(url.Values) - if request.Anchor != nil { - queryParams.Add("anchor", fmt.Sprintf("%v", *request.Anchor)) - } - if request.Limit != nil { - queryParams.Add("limit", fmt.Sprintf("%v", *request.Limit)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - var response *identity.ListFollowersResponse - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return nil, err - } - return response, nil -} - -func (c *Client) ListFollowing(ctx context.Context, identityId uuid.UUID, request *identity.ListFollowingRequest) (*identity.ListFollowingResponse, error) { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"identity/identities/%v/following", identityId) - - queryParams := make(url.Values) - if request.Anchor != nil { - queryParams.Add("anchor", fmt.Sprintf("%v", *request.Anchor)) - } - if request.Limit != nil { - queryParams.Add("limit", fmt.Sprintf("%v", *request.Limit)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - var response *identity.ListFollowingResponse - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return nil, err - } - return response, nil -} - -func (c *Client) ListFriends(ctx context.Context, request *identity.ListFriendsRequest) (*identity.ListFriendsResponse, error) { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "identity/identities/self/friends" - - queryParams := make(url.Values) - if request.Anchor != nil { - queryParams.Add("anchor", fmt.Sprintf("%v", *request.Anchor)) - } - if request.Limit != nil { - queryParams.Add("limit", fmt.Sprintf("%v", *request.Limit)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - var response *identity.ListFriendsResponse - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return nil, err - } - return response, nil -} - -func (c *Client) ListMutualFriends(ctx context.Context, identityId uuid.UUID, request *identity.ListMutualFriendsRequest) (*identity.ListMutualFriendsResponse, error) { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"identity/identities/%v/mutual-friends", identityId) - - queryParams := make(url.Values) - if request.Anchor != nil { - queryParams.Add("anchor", fmt.Sprintf("%v", *request.Anchor)) - } - if request.Limit != nil { - queryParams.Add("limit", fmt.Sprintf("%v", *request.Limit)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - var response *identity.ListMutualFriendsResponse - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return nil, err - } - return response, nil -} - -func (c *Client) ListRecentFollowers(ctx context.Context, request *identity.ListRecentFollowersRequest) (*identity.ListRecentFollowersResponse, error) { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "identity/identities/self/recent-followers" - - queryParams := make(url.Values) - if request.Count != nil { - queryParams.Add("count", fmt.Sprintf("%v", *request.Count)) - } - if request.WatchIndex != nil { - queryParams.Add("watch_index", fmt.Sprintf("%v", *request.WatchIndex)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - var response *identity.ListRecentFollowersResponse - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return nil, err - } - return response, nil -} - -func (c *Client) IgnoreRecentFollower(ctx context.Context, identityId uuid.UUID) error { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"identity/identities/self/recent-followers/%v/ignore", identityId) - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return err - } - return nil -} - func (c *Client) MarkDeletion(ctx context.Context) error { baseURL := "https://api.rivet.gg" if c.baseURL != "" { diff --git a/sdks/full/go/identity/identity.go b/sdks/full/go/identity/identity.go index 6cb9dba053..7e1aa3f7c4 100644 --- a/sdks/full/go/identity/identity.go +++ b/sdks/full/go/identity/identity.go @@ -102,160 +102,6 @@ func (g *GetSummariesResponse) String() string { return fmt.Sprintf("%#v", g) } -type ListFollowersResponse struct { - Identities []*identity.Handle `json:"identities,omitempty"` - Anchor *string `json:"anchor,omitempty"` - Watch *sdk.WatchResponse `json:"watch,omitempty"` - - _rawJSON json.RawMessage -} - -func (l *ListFollowersResponse) UnmarshalJSON(data []byte) error { - type unmarshaler ListFollowersResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *l = ListFollowersResponse(value) - l._rawJSON = json.RawMessage(data) - return nil -} - -func (l *ListFollowersResponse) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(l); err == nil { - return value - } - return fmt.Sprintf("%#v", l) -} - -type ListFollowingResponse struct { - Identities []*identity.Handle `json:"identities,omitempty"` - Anchor *string `json:"anchor,omitempty"` - Watch *sdk.WatchResponse `json:"watch,omitempty"` - - _rawJSON json.RawMessage -} - -func (l *ListFollowingResponse) UnmarshalJSON(data []byte) error { - type unmarshaler ListFollowingResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *l = ListFollowingResponse(value) - l._rawJSON = json.RawMessage(data) - return nil -} - -func (l *ListFollowingResponse) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(l); err == nil { - return value - } - return fmt.Sprintf("%#v", l) -} - -type ListFriendsResponse struct { - Identities []*identity.Handle `json:"identities,omitempty"` - Anchor *string `json:"anchor,omitempty"` - Watch *sdk.WatchResponse `json:"watch,omitempty"` - - _rawJSON json.RawMessage -} - -func (l *ListFriendsResponse) UnmarshalJSON(data []byte) error { - type unmarshaler ListFriendsResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *l = ListFriendsResponse(value) - l._rawJSON = json.RawMessage(data) - return nil -} - -func (l *ListFriendsResponse) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(l); err == nil { - return value - } - return fmt.Sprintf("%#v", l) -} - -type ListMutualFriendsResponse struct { - Identities []*identity.Handle `json:"identities,omitempty"` - Anchor *string `json:"anchor,omitempty"` - - _rawJSON json.RawMessage -} - -func (l *ListMutualFriendsResponse) UnmarshalJSON(data []byte) error { - type unmarshaler ListMutualFriendsResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *l = ListMutualFriendsResponse(value) - l._rawJSON = json.RawMessage(data) - return nil -} - -func (l *ListMutualFriendsResponse) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(l); err == nil { - return value - } - return fmt.Sprintf("%#v", l) -} - -type ListRecentFollowersResponse struct { - Identities []*identity.Handle `json:"identities,omitempty"` - Anchor *string `json:"anchor,omitempty"` - Watch *sdk.WatchResponse `json:"watch,omitempty"` - - _rawJSON json.RawMessage -} - -func (l *ListRecentFollowersResponse) UnmarshalJSON(data []byte) error { - type unmarshaler ListRecentFollowersResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *l = ListRecentFollowersResponse(value) - l._rawJSON = json.RawMessage(data) - return nil -} - -func (l *ListRecentFollowersResponse) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(l); err == nil { - return value - } - return fmt.Sprintf("%#v", l) -} - type PrepareAvatarUploadResponse struct { UploadId uuid.UUID `json:"upload_id"` PresignedRequest *upload.PresignedRequest `json:"presigned_request,omitempty"` @@ -286,37 +132,6 @@ func (p *PrepareAvatarUploadResponse) String() string { return fmt.Sprintf("%#v", p) } -type SearchResponse struct { - Identities []*identity.Handle `json:"identities,omitempty"` - // The pagination anchor. - Anchor *string `json:"anchor,omitempty"` - - _rawJSON json.RawMessage -} - -func (s *SearchResponse) UnmarshalJSON(data []byte) error { - type unmarshaler SearchResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *s = SearchResponse(value) - s._rawJSON = json.RawMessage(data) - return nil -} - -func (s *SearchResponse) String() string { - if len(s._rawJSON) > 0 { - if value, err := core.StringifyJSON(s._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(s); err == nil { - return value - } - return fmt.Sprintf("%#v", s) -} - type SetupResponse struct { // Token used to authenticate the identity. // Should be stored somewhere permanent. diff --git a/sdks/full/go/identity/links.go b/sdks/full/go/identity/links.go deleted file mode 100644 index 51578a8e16..0000000000 --- a/sdks/full/go/identity/links.go +++ /dev/null @@ -1,140 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -package identity - -import ( - json "encoding/json" - fmt "fmt" - sdk "sdk" - game "sdk/common/game" - identity "sdk/common/identity" - core "sdk/core" -) - -type GetGameLinkRequest struct { - IdentityLinkToken sdk.Jwt `json:"-"` - WatchIndex sdk.WatchQuery `json:"-"` -} - -type CancelGameLinkRequest struct { - IdentityLinkToken sdk.Jwt `json:"identity_link_token"` - - _rawJSON json.RawMessage -} - -func (c *CancelGameLinkRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CancelGameLinkRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CancelGameLinkRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CancelGameLinkRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -type CompleteGameLinkRequest struct { - IdentityLinkToken sdk.Jwt `json:"identity_link_token"` - - _rawJSON json.RawMessage -} - -func (c *CompleteGameLinkRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CompleteGameLinkRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CompleteGameLinkRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CompleteGameLinkRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -type GetGameLinkResponse struct { - Status GameLinkStatus `json:"status,omitempty"` - Game *game.Handle `json:"game,omitempty"` - CurrentIdentity *identity.Handle `json:"current_identity,omitempty"` - NewIdentity *GetGameLinkNewIdentity `json:"new_identity,omitempty"` - Watch *sdk.WatchResponse `json:"watch,omitempty"` - - _rawJSON json.RawMessage -} - -func (g *GetGameLinkResponse) UnmarshalJSON(data []byte) error { - type unmarshaler GetGameLinkResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *g = GetGameLinkResponse(value) - g._rawJSON = json.RawMessage(data) - return nil -} - -func (g *GetGameLinkResponse) String() string { - if len(g._rawJSON) > 0 { - if value, err := core.StringifyJSON(g._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(g); err == nil { - return value - } - return fmt.Sprintf("%#v", g) -} - -type PrepareGameLinkResponse struct { - // Pass this to `GetGameLink` to get the linking status. Valid for 15 minutes. - IdentityLinkToken string `json:"identity_link_token"` - IdentityLinkUrl string `json:"identity_link_url"` - ExpireTs sdk.Timestamp `json:"expire_ts"` - - _rawJSON json.RawMessage -} - -func (p *PrepareGameLinkResponse) UnmarshalJSON(data []byte) error { - type unmarshaler PrepareGameLinkResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PrepareGameLinkResponse(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PrepareGameLinkResponse) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} diff --git a/sdks/full/go/identity/links/client.go b/sdks/full/go/identity/links/client.go deleted file mode 100644 index 136cd17764..0000000000 --- a/sdks/full/go/identity/links/client.go +++ /dev/null @@ -1,367 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -package links - -import ( - bytes "bytes" - context "context" - json "encoding/json" - errors "errors" - fmt "fmt" - io "io" - http "net/http" - url "net/url" - sdk "sdk" - core "sdk/core" - identity "sdk/identity" -) - -type Client struct { - baseURL string - caller *core.Caller - header http.Header -} - -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } - return &Client{ - baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), - } -} - -// Begins the process for linking an identity with the Rivet Hub. -// -// # Importance of Linking Identities -// -// When an identity is created via `rivet.api.identity#SetupIdentity`, the identity is temporary -// and is not shared with other games the user plays. -// In order to make the identity permanent and synchronize the identity with -// other games, the identity must be linked with the hub. -// -// # Linking Process -// -// The linking process works by opening `identity_link_url` in a browser then polling -// `rivet.api.identity#GetGameLink` to wait for it to complete. -// This is designed to be as flexible as possible so `identity_link_url` can be opened -// on any device. For example, when playing a console game, the user can scan a -// QR code for `identity_link_url` to authenticate on their phone. -func (c *Client) Prepare(ctx context.Context) (*identity.PrepareGameLinkResponse, error) { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "identity/game-links" - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - var response *identity.PrepareGameLinkResponse - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Response: &response, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return nil, err - } - return response, nil -} - -// Returns the current status of a linking process. Once `status` is `complete`, the identity's profile should be fetched again since they may have switched accounts. -func (c *Client) Get(ctx context.Context, request *identity.GetGameLinkRequest) (*identity.GetGameLinkResponse, error) { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "identity/game-links" - - queryParams := make(url.Values) - queryParams.Add("identity_link_token", fmt.Sprintf("%v", request.IdentityLinkToken)) - queryParams.Add("watch_index", fmt.Sprintf("%v", request.WatchIndex)) - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - var response *identity.GetGameLinkResponse - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return nil, err - } - return response, nil -} - -// Completes a game link process and returns whether or not the link is valid. -func (c *Client) Complete(ctx context.Context, request *identity.CompleteGameLinkRequest) error { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "identity/game-links/complete" - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return err - } - return nil -} - -// Cancels a game link. It can no longer be used to link after cancellation. -func (c *Client) Cancel(ctx context.Context, request *identity.CancelGameLinkRequest) error { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "identity/game-links/cancel" - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return err - } - return nil -} diff --git a/sdks/full/go/identity/types.go b/sdks/full/go/identity/types.go index a67e722a6f..40da32d22d 100644 --- a/sdks/full/go/identity/types.go +++ b/sdks/full/go/identity/types.go @@ -11,7 +11,6 @@ import ( group "sdk/common/group" identity "sdk/common/identity" core "sdk/core" - matchmaker "sdk/matchmaker" ) type GetHandlesRequest struct { @@ -30,35 +29,6 @@ type GetSummariesRequest struct { IdentityIds []string `json:"-"` } -type ListFollowersRequest struct { - Anchor *string `json:"-"` - // Range is between 1 and 32 (inclusive). - Limit *string `json:"-"` -} - -type ListFollowingRequest struct { - Anchor *string `json:"-"` - // Range is between 1 and 32 (inclusive). - Limit *string `json:"-"` -} - -type ListFriendsRequest struct { - Anchor *string `json:"-"` - // Range is between 1 and 32 (inclusive). - Limit *string `json:"-"` -} - -type ListMutualFriendsRequest struct { - Anchor *string `json:"-"` - // Range is between 1 and 32 (inclusive). - Limit *string `json:"-"` -} - -type ListRecentFollowersRequest struct { - Count *int `json:"-"` - WatchIndex *sdk.WatchQuery `json:"-"` -} - type PrepareAvatarUploadRequest struct { Path string `json:"path"` // See https://www.iana.org/assignments/media-types/media-types.xhtml @@ -66,19 +36,6 @@ type PrepareAvatarUploadRequest struct { ContentLength int64 `json:"content_length"` } -type ReportRequest struct { - Reason *string `json:"reason,omitempty"` -} - -type SearchRequest struct { - // The query to match identity display names and account numbers against. - Query string `json:"-"` - // How many identities to offset the search by. - Anchor *string `json:"-"` - // Amount of identities to return. Must be between 1 and 32 inclusive. - Limit *int `json:"-"` -} - type SetGameActivityRequest struct { GameActivity *UpdateGameActivity `json:"game_activity,omitempty"` } @@ -304,8 +261,7 @@ func (g *GlobalEventIdentityUpdate) String() string { } type GlobalEventKind struct { - IdentityUpdate *GlobalEventIdentityUpdate `json:"identity_update,omitempty"` - MatchmakerLobbyJoin *GlobalEventMatchmakerLobbyJoin `json:"matchmaker_lobby_join,omitempty"` + IdentityUpdate *GlobalEventIdentityUpdate `json:"identity_update,omitempty"` _rawJSON json.RawMessage } @@ -333,37 +289,6 @@ func (g *GlobalEventKind) String() string { return fmt.Sprintf("%#v", g) } -type GlobalEventMatchmakerLobbyJoin struct { - Lobby *matchmaker.JoinLobby `json:"lobby,omitempty"` - Ports map[string]*matchmaker.JoinPort `json:"ports,omitempty"` - Player *matchmaker.JoinPlayer `json:"player,omitempty"` - - _rawJSON json.RawMessage -} - -func (g *GlobalEventMatchmakerLobbyJoin) UnmarshalJSON(data []byte) error { - type unmarshaler GlobalEventMatchmakerLobbyJoin - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *g = GlobalEventMatchmakerLobbyJoin(value) - g._rawJSON = json.RawMessage(data) - return nil -} - -func (g *GlobalEventMatchmakerLobbyJoin) String() string { - if len(g._rawJSON) > 0 { - if value, err := core.StringifyJSON(g._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(g); err == nil { - return value - } - return fmt.Sprintf("%#v", g) -} - // Notifications represent information that should be presented to the user // immediately. // At the moment, only chat message events have associated notifications. @@ -641,37 +566,6 @@ func (u *UpdateGameActivity) String() string { return fmt.Sprintf("%#v", u) } -type GetGameLinkNewIdentity struct { - IdentityToken sdk.Jwt `json:"identity_token"` - IdentityTokenExpireTs sdk.Timestamp `json:"identity_token_expire_ts"` - Identity *Profile `json:"identity,omitempty"` - - _rawJSON json.RawMessage -} - -func (g *GetGameLinkNewIdentity) UnmarshalJSON(data []byte) error { - type unmarshaler GetGameLinkNewIdentity - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *g = GetGameLinkNewIdentity(value) - g._rawJSON = json.RawMessage(data) - return nil -} - -func (g *GetGameLinkNewIdentity) String() string { - if len(g._rawJSON) > 0 { - if value, err := core.StringifyJSON(g._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(g); err == nil { - return value - } - return fmt.Sprintf("%#v", g) -} - type ValidateProfileResponse struct { Errors []*sdk.ValidationError `json:"errors,omitempty"` diff --git a/sdks/full/go/kv/client/client.go b/sdks/full/go/kv/client/client.go deleted file mode 100644 index b76d18a0d3..0000000000 --- a/sdks/full/go/kv/client/client.go +++ /dev/null @@ -1,628 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -package client - -import ( - bytes "bytes" - context "context" - json "encoding/json" - errors "errors" - fmt "fmt" - io "io" - http "net/http" - url "net/url" - sdk "sdk" - core "sdk/core" - kv "sdk/kv" -) - -type Client struct { - baseURL string - caller *core.Caller - header http.Header -} - -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } - return &Client{ - baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), - } -} - -// Returns a specific key-value entry by key. -func (c *Client) Get(ctx context.Context, request *kv.GetOperationRequest) (*kv.GetResponse, error) { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "kv/entries" - - queryParams := make(url.Values) - queryParams.Add("key", fmt.Sprintf("%v", request.Key)) - if request.WatchIndex != nil { - queryParams.Add("watch_index", fmt.Sprintf("%v", *request.WatchIndex)) - } - if request.NamespaceId != nil { - queryParams.Add("namespace_id", fmt.Sprintf("%v", *request.NamespaceId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - var response *kv.GetResponse - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return nil, err - } - return response, nil -} - -// Puts (sets or overwrites) a key-value entry by key. -func (c *Client) Put(ctx context.Context, request *kv.PutRequest) error { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "kv/entries" - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPut, - Headers: c.header, - Request: request, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return err - } - return nil -} - -// Deletes a key-value entry by key. -func (c *Client) Delete(ctx context.Context, request *kv.DeleteOperationRequest) error { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "kv/entries" - - queryParams := make(url.Values) - queryParams.Add("key", fmt.Sprintf("%v", request.Key)) - if request.NamespaceId != nil { - queryParams.Add("namespace_id", fmt.Sprintf("%v", *request.NamespaceId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodDelete, - Headers: c.header, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return err - } - return nil -} - -// Lists all keys in a directory. -func (c *Client) List(ctx context.Context, request *kv.ListOperationRequest) (*kv.ListResponse, error) { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "kv/entries/list" - - queryParams := make(url.Values) - queryParams.Add("directory", fmt.Sprintf("%v", request.Directory)) - queryParams.Add("namespace_id", fmt.Sprintf("%v", request.NamespaceId)) - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - var response *kv.ListResponse - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return nil, err - } - return response, nil -} - -// Gets multiple key-value entries by key(s). -func (c *Client) GetBatch(ctx context.Context, request *kv.GetBatchRequest) (*kv.GetBatchResponse, error) { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "kv/entries/batch" - - queryParams := make(url.Values) - for _, value := range request.Keys { - queryParams.Add("keys", fmt.Sprintf("%v", value)) - } - if request.WatchIndex != nil { - queryParams.Add("watch_index", fmt.Sprintf("%v", *request.WatchIndex)) - } - if request.NamespaceId != nil { - queryParams.Add("namespace_id", fmt.Sprintf("%v", *request.NamespaceId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - var response *kv.GetBatchResponse - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return nil, err - } - return response, nil -} - -// Puts (sets or overwrites) multiple key-value entries by key(s). -func (c *Client) PutBatch(ctx context.Context, request *kv.PutBatchRequest) error { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "kv/entries/batch" - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPut, - Headers: c.header, - Request: request, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return err - } - return nil -} - -// Deletes multiple key-value entries by key(s). -func (c *Client) DeleteBatch(ctx context.Context, request *kv.DeleteBatchRequest) error { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "kv/entries/batch" - - queryParams := make(url.Values) - for _, value := range request.Keys { - queryParams.Add("keys", fmt.Sprintf("%v", value)) - } - if request.NamespaceId != nil { - queryParams.Add("namespace_id", fmt.Sprintf("%v", *request.NamespaceId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodDelete, - Headers: c.header, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return err - } - return nil -} diff --git a/sdks/full/go/kv/kv.go b/sdks/full/go/kv/kv.go deleted file mode 100644 index ce6bb13e1f..0000000000 --- a/sdks/full/go/kv/kv.go +++ /dev/null @@ -1,163 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -package kv - -import ( - json "encoding/json" - fmt "fmt" - uuid "github.com/google/uuid" - sdk "sdk" - core "sdk/core" -) - -type GetBatchResponse struct { - Entries []*Entry `json:"entries,omitempty"` - Watch *sdk.WatchResponse `json:"watch,omitempty"` - - _rawJSON json.RawMessage -} - -func (g *GetBatchResponse) UnmarshalJSON(data []byte) error { - type unmarshaler GetBatchResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *g = GetBatchResponse(value) - g._rawJSON = json.RawMessage(data) - return nil -} - -func (g *GetBatchResponse) String() string { - if len(g._rawJSON) > 0 { - if value, err := core.StringifyJSON(g._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(g); err == nil { - return value - } - return fmt.Sprintf("%#v", g) -} - -type GetResponse struct { - Value Value `json:"value,omitempty"` - // Whether or not the entry has been deleted. Only set when watching this endpoint. - Deleted *bool `json:"deleted,omitempty"` - Watch *sdk.WatchResponse `json:"watch,omitempty"` - - _rawJSON json.RawMessage -} - -func (g *GetResponse) UnmarshalJSON(data []byte) error { - type unmarshaler GetResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *g = GetResponse(value) - g._rawJSON = json.RawMessage(data) - return nil -} - -func (g *GetResponse) String() string { - if len(g._rawJSON) > 0 { - if value, err := core.StringifyJSON(g._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(g); err == nil { - return value - } - return fmt.Sprintf("%#v", g) -} - -type ListResponse struct { - Entries []*Entry `json:"entries,omitempty"` - - _rawJSON json.RawMessage -} - -func (l *ListResponse) UnmarshalJSON(data []byte) error { - type unmarshaler ListResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *l = ListResponse(value) - l._rawJSON = json.RawMessage(data) - return nil -} - -func (l *ListResponse) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(l); err == nil { - return value - } - return fmt.Sprintf("%#v", l) -} - -type PutBatchRequest struct { - NamespaceId *uuid.UUID `json:"namespace_id,omitempty"` - Entries []*PutEntry `json:"entries,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PutBatchRequest) UnmarshalJSON(data []byte) error { - type unmarshaler PutBatchRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PutBatchRequest(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PutBatchRequest) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PutRequest struct { - NamespaceId *uuid.UUID `json:"namespace_id,omitempty"` - Key Key `json:"key"` - Value Value `json:"value,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PutRequest) UnmarshalJSON(data []byte) error { - type unmarshaler PutRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PutRequest(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PutRequest) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} diff --git a/sdks/full/go/kv/types.go b/sdks/full/go/kv/types.go deleted file mode 100644 index 528222e4f0..0000000000 --- a/sdks/full/go/kv/types.go +++ /dev/null @@ -1,116 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -package kv - -import ( - json "encoding/json" - fmt "fmt" - uuid "github.com/google/uuid" - core "sdk/core" -) - -type DeleteOperationRequest struct { - Key Key `json:"-"` - NamespaceId *uuid.UUID `json:"-"` -} - -type DeleteBatchRequest struct { - Keys []Key `json:"-"` - NamespaceId *uuid.UUID `json:"-"` -} - -type GetOperationRequest struct { - Key Key `json:"-"` - // A query parameter denoting the requests watch index. - WatchIndex *string `json:"-"` - NamespaceId *uuid.UUID `json:"-"` -} - -type GetBatchRequest struct { - Keys []Key `json:"-"` - // A query parameter denoting the requests watch index. - WatchIndex *string `json:"-"` - NamespaceId *uuid.UUID `json:"-"` -} - -type ListOperationRequest struct { - Directory Directory `json:"-"` - NamespaceId uuid.UUID `json:"-"` -} - -type Directory = string - -// A key-value entry. -type Entry struct { - Key Key `json:"key"` - Value Value `json:"value,omitempty"` - Deleted *bool `json:"deleted,omitempty"` - - _rawJSON json.RawMessage -} - -func (e *Entry) UnmarshalJSON(data []byte) error { - type unmarshaler Entry - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *e = Entry(value) - e._rawJSON = json.RawMessage(data) - return nil -} - -func (e *Entry) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value - } - return fmt.Sprintf("%#v", e) -} - -// A string representing a key in the key-value database. -// Maximum length of 512 characters. -// _Recommended Key Path Format_ -// Key path components are split by a slash (e.g. `a/b/c` has the path components `["a", "b", "c"]`). Slashes can be escaped by using a backslash (e.g. `a/b\/c/d` has the path components `["a", "b/c", "d"]`). -// This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. -type Key = string - -// A new entry to insert into the key-value database. -type PutEntry struct { - Key Key `json:"key"` - Value Value `json:"value,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PutEntry) UnmarshalJSON(data []byte) error { - type unmarshaler PutEntry - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PutEntry(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PutEntry) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -// A JSON object stored in the KV database. -// A `null` value indicates the entry is deleted. -// Maximum length of 262,144 bytes when encoded. -type Value = interface{} diff --git a/sdks/full/openapi/openapi.yml b/sdks/full/openapi/openapi.yml index e69f5ca842..a796cfeff9 100644 --- a/sdks/full/openapi/openapi.yml +++ b/sdks/full/openapi/openapi.yml @@ -2309,75 +2309,6 @@ paths: application/json: schema: $ref: '#/components/schemas/GroupValidateProfileRequest' - /group/groups/search: - get: - description: Fuzzy search for groups. - operationId: group_search - tags: - - Group - parameters: - - name: query - in: query - description: The query to match group display names against. - required: true - schema: - type: string - - name: anchor - in: query - required: false - schema: - type: string - - name: limit - in: query - description: Unsigned 32 bit integer. - required: false - schema: - type: number - format: double - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/GroupSearchResponse' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 /group/groups/{group_id}/avatar-upload/{upload_id}/complete: post: description: |- @@ -3576,77 +3507,6 @@ paths: $ref: '#/components/schemas/AccountNumber' bio: $ref: '#/components/schemas/Bio' - /identity/identities/search: - get: - description: Fuzzy search for identities. - operationId: identity_search - tags: - - Identity - parameters: - - name: query - in: query - description: >- - The query to match identity display names and account numbers - against. - required: true - schema: - type: string - - name: anchor - in: query - description: How many identities to offset the search by. - required: false - schema: - type: string - - name: limit - in: query - description: Amount of identities to return. Must be between 1 and 32 inclusive. - required: false - schema: - type: integer - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/IdentitySearchResponse' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 /identity/identities/self/activity: post: description: >- @@ -3811,113 +3671,6 @@ paths: $ref: '#/components/schemas/IdentityStatus' required: - status - /identity/identities/{identity_id}/follow: - post: - description: >- - Follows the given identity. In order for identities to be "friends", the - other identity has to also follow this identity. - operationId: identity_follow - tags: - - Identity - parameters: - - name: identity_id - in: path - required: true - schema: - type: string - format: uuid - responses: - '204': - description: '' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 - delete: - description: Unfollows the given identity. - operationId: identity_unfollow - tags: - - Identity - parameters: - - name: identity_id - in: path - required: true - schema: - type: string - format: uuid - responses: - '204': - description: '' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 /identity/identities/avatar-upload/prepare: post: description: >- @@ -4097,866 +3850,32 @@ paths: $ref: '#/components/schemas/ErrorBody' security: *ref_0 requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - name: - type: string - company_name: - type: string - company_size: - type: string - preferred_tools: - type: string - goals: - type: string - required: - - name - - company_size - - preferred_tools - - goals - /identity/identities/{identity_id}/report: - post: - description: Creates an abuse report for an identity. - operationId: identity_report - tags: - - Identity - parameters: - - name: identity_id - in: path - required: true - schema: - type: string - format: uuid - responses: - '204': - description: '' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - reason: - type: string - /identity/identities/{identity_id}/followers: - get: - operationId: identity_listFollowers - tags: - - Identity - parameters: - - name: identity_id - in: path - required: true - schema: - type: string - format: uuid - - name: anchor - in: query - required: false - schema: - type: string - - name: limit - in: query - description: Range is between 1 and 32 (inclusive). - required: false - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/IdentityListFollowersResponse' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 - /identity/identities/{identity_id}/following: - get: - operationId: identity_listFollowing - tags: - - Identity - parameters: - - name: identity_id - in: path - required: true - schema: - type: string - format: uuid - - name: anchor - in: query - required: false - schema: - type: string - - name: limit - in: query - description: Range is between 1 and 32 (inclusive). - required: false - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/IdentityListFollowingResponse' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 - /identity/identities/self/friends: - get: - operationId: identity_listFriends - tags: - - Identity - parameters: - - name: anchor - in: query - required: false - schema: - type: string - - name: limit - in: query - description: Range is between 1 and 32 (inclusive). - required: false - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/IdentityListFriendsResponse' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 - /identity/identities/{identity_id}/mutual-friends: - get: - operationId: identity_listMutualFriends - tags: - - Identity - parameters: - - name: identity_id - in: path - required: true - schema: - type: string - format: uuid - - name: anchor - in: query - required: false - schema: - type: string - - name: limit - in: query - description: Range is between 1 and 32 (inclusive). - required: false - schema: - type: string - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/IdentityListMutualFriendsResponse' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 - /identity/identities/self/recent-followers: - get: - operationId: identity_listRecentFollowers - tags: - - Identity - parameters: - - name: count - in: query - required: false - schema: - type: integer - - name: watch_index - in: query - required: false - schema: - $ref: '#/components/schemas/WatchQuery' - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/IdentityListRecentFollowersResponse' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 - /identity/identities/self/recent-followers/{identity_id}/ignore: - post: - operationId: identity_ignoreRecentFollower - tags: - - Identity - parameters: - - name: identity_id - in: path - required: true - schema: - type: string - format: uuid - responses: - '204': - description: '' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 - /identity/identities/self/delete-request: - post: - operationId: identity_markDeletion - tags: - - Identity - parameters: [] - responses: - '204': - description: '' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 - delete: - operationId: identity_unmarkDeletion - tags: - - Identity - parameters: [] - responses: - '204': - description: '' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 - /kv/entries: - get: - description: Returns a specific key-value entry by key. - operationId: kv_get - tags: - - Kv - parameters: - - name: key - in: query - required: true - schema: - $ref: '#/components/schemas/KvKey' - - name: watch_index - in: query - description: A query parameter denoting the requests watch index. - required: false - schema: - type: string - - name: namespace_id - in: query - required: false - schema: - type: string - format: uuid - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/KvGetResponse' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 - put: - description: Puts (sets or overwrites) a key-value entry by key. - operationId: kv_put - tags: - - Kv - parameters: [] - responses: - '204': - description: '' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/KvPutRequest' - delete: - description: Deletes a key-value entry by key. - operationId: kv_delete - tags: - - Kv - parameters: - - name: key - in: query - required: true - schema: - $ref: '#/components/schemas/KvKey' - - name: namespace_id - in: query - required: false - schema: - type: string - format: uuid - responses: - '204': - description: '' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 - /kv/entries/list: - get: - description: Lists all keys in a directory. - operationId: kv_list - tags: - - Kv - parameters: - - name: directory - in: query - required: true - schema: - $ref: '#/components/schemas/KvDirectory' - - name: namespace_id - in: query - required: true - schema: - type: string - format: uuid - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/KvListResponse' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 - /kv/entries/batch: - get: - description: Gets multiple key-value entries by key(s). - operationId: kv_getBatch - tags: - - Kv - parameters: - - name: keys - in: query - required: true - schema: - $ref: '#/components/schemas/KvKey' - - name: watch_index - in: query - description: A query parameter denoting the requests watch index. - required: false - schema: - type: string - - name: namespace_id - in: query - required: false - schema: - type: string - format: uuid - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/KvGetBatchResponse' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 - put: - description: Puts (sets or overwrites) multiple key-value entries by key(s). - operationId: kv_putBatch + required: true + content: + application/json: + schema: + type: object + properties: + name: + type: string + company_name: + type: string + company_size: + type: string + preferred_tools: + type: string + goals: + type: string + required: + - name + - company_size + - preferred_tools + - goals + /identity/identities/self/delete-request: + post: + operationId: identity_markDeletion tags: - - Kv + - Identity parameters: [] responses: '204': @@ -4998,29 +3917,11 @@ paths: schema: $ref: '#/components/schemas/ErrorBody' security: *ref_0 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/KvPutBatchRequest' delete: - description: Deletes multiple key-value entries by key(s). - operationId: kv_deleteBatch + operationId: identity_unmarkDeletion tags: - - Kv - parameters: - - name: keys - in: query - required: true - schema: - $ref: '#/components/schemas/KvKey' - - name: namespace_id - in: query - required: false - schema: - type: string - format: uuid + - Identity + parameters: [] responses: '204': description: '' @@ -8450,265 +7351,14 @@ paths: in: query required: false schema: - $ref: '#/components/schemas/WatchQuery' - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/IdentityListActivitiesResponse' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 - /identity/events/live: - get: - description: Returns all events relative to the current identity. - operationId: identity_events_watch - tags: - - IdentityEvents - parameters: - - name: watch_index - in: query - required: false - schema: - $ref: '#/components/schemas/WatchQuery' - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/IdentityWatchEventsResponse' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 - /identity/game-links: - post: - description: >- - Begins the process for linking an identity with the Rivet Hub. - - - # Importance of Linking Identities - - - When an identity is created via `rivet.api.identity#SetupIdentity`, the - identity is temporary - - and is not shared with other games the user plays. - - In order to make the identity permanent and synchronize the identity - with - - other games, the identity must be linked with the hub. - - - # Linking Process - - - The linking process works by opening `identity_link_url` in a browser - then polling - - `rivet.api.identity#GetGameLink` to wait for it to complete. - - This is designed to be as flexible as possible so `identity_link_url` - can be opened - - on any device. For example, when playing a console game, the user can - scan a - - QR code for `identity_link_url` to authenticate on their phone. - operationId: identity_links_prepare - tags: - - IdentityLinks - parameters: [] - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/IdentityPrepareGameLinkResponse' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 - get: - description: >- - Returns the current status of a linking process. Once `status` is - `complete`, the identity's profile should be fetched again since they - may have switched accounts. - operationId: identity_links_get - tags: - - IdentityLinks - parameters: - - name: identity_link_token - in: query - required: true - schema: - $ref: '#/components/schemas/Jwt' - - name: watch_index - in: query - required: false - schema: - $ref: '#/components/schemas/WatchQuery' - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/IdentityGetGameLinkResponse' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': + $ref: '#/components/schemas/WatchQuery' + responses: + '200': description: '' content: application/json: schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 - /identity/game-links/complete: - post: - description: >- - Completes a game link process and returns whether or not the link is - valid. - operationId: identity_links_complete - tags: - - IdentityLinks - parameters: [] - responses: - '204': - description: '' + $ref: '#/components/schemas/IdentityListActivitiesResponse' '400': description: '' content: @@ -8746,24 +7396,25 @@ paths: schema: $ref: '#/components/schemas/ErrorBody' security: *ref_0 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/IdentityCompleteGameLinkRequest' - /identity/game-links/cancel: - post: - description: >- - Cancels a game link. It can no longer be used to link after - cancellation. - operationId: identity_links_cancel + /identity/events/live: + get: + description: Returns all events relative to the current identity. + operationId: identity_events_watch tags: - - IdentityLinks - parameters: [] + - IdentityEvents + parameters: + - name: watch_index + in: query + required: false + schema: + $ref: '#/components/schemas/WatchQuery' responses: - '204': + '200': description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/IdentityWatchEventsResponse' '400': description: '' content: @@ -8801,12 +7452,6 @@ paths: schema: $ref: '#/components/schemas/ErrorBody' security: *ref_0 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/IdentityCancelGameLinkRequest' /job/runs/cleanup: post: operationId: job_run_cleanup @@ -10704,18 +9349,6 @@ components: description: A list of validation errors. required: - errors - GroupSearchResponse: - type: object - properties: - groups: - type: array - items: - $ref: '#/components/schemas/GroupHandle' - description: A list of group handles. - anchor: - type: string - required: - - groups GroupGetBansResponse: type: object properties: @@ -10883,18 +9516,6 @@ components: $ref: '#/components/schemas/ValidationError' required: - errors - IdentitySearchResponse: - type: object - properties: - identities: - type: array - items: - $ref: '#/components/schemas/IdentityHandle' - anchor: - type: string - description: The pagination anchor. - required: - - identities IdentityPrepareAvatarUploadResponse: type: object properties: @@ -10906,134 +9527,6 @@ components: required: - upload_id - presigned_request - IdentityListFollowersResponse: - type: object - properties: - identities: - type: array - items: - $ref: '#/components/schemas/IdentityHandle' - anchor: - type: string - watch: - $ref: '#/components/schemas/WatchResponse' - required: - - identities - - watch - IdentityListFollowingResponse: - type: object - properties: - identities: - type: array - items: - $ref: '#/components/schemas/IdentityHandle' - anchor: - type: string - watch: - $ref: '#/components/schemas/WatchResponse' - required: - - identities - - watch - IdentityListRecentFollowersResponse: - type: object - properties: - identities: - type: array - items: - $ref: '#/components/schemas/IdentityHandle' - anchor: - type: string - watch: - $ref: '#/components/schemas/WatchResponse' - required: - - identities - - watch - IdentityListFriendsResponse: - type: object - properties: - identities: - type: array - items: - $ref: '#/components/schemas/IdentityHandle' - anchor: - type: string - watch: - $ref: '#/components/schemas/WatchResponse' - required: - - identities - - watch - IdentityListMutualFriendsResponse: - type: object - properties: - identities: - type: array - items: - $ref: '#/components/schemas/IdentityHandle' - anchor: - type: string - required: - - identities - KvGetResponse: - type: object - properties: - value: - $ref: '#/components/schemas/KvValue' - deleted: - type: boolean - description: >- - Whether or not the entry has been deleted. Only set when watching - this endpoint. - watch: - $ref: '#/components/schemas/WatchResponse' - required: - - value - - watch - KvPutRequest: - type: object - properties: - namespace_id: - type: string - format: uuid - key: - $ref: '#/components/schemas/KvKey' - value: - $ref: '#/components/schemas/KvValue' - required: - - key - - value - KvListResponse: - type: object - properties: - entries: - type: array - items: - $ref: '#/components/schemas/KvEntry' - required: - - entries - KvGetBatchResponse: - type: object - properties: - entries: - type: array - items: - $ref: '#/components/schemas/KvEntry' - watch: - $ref: '#/components/schemas/WatchResponse' - required: - - entries - - watch - KvPutBatchRequest: - type: object - properties: - namespace_id: - type: string - format: uuid - entries: - type: array - items: - $ref: '#/components/schemas/KvPutEntry' - required: - - entries ProvisionDatacentersGetTlsResponse: type: object properties: @@ -11280,7 +9773,26 @@ components: $ref: '#/components/schemas/ActorHostRouting' ActorGameGuardRouting: type: object - properties: {} + properties: + authorization: + $ref: '#/components/schemas/ActorPortAuthorization' + ActorPortAuthorization: + type: object + properties: + bearer: + type: string + query: + $ref: '#/components/schemas/ActorPortQueryAuthorization' + ActorPortQueryAuthorization: + type: object + properties: + key: + type: string + value: + type: string + required: + - key + - value ActorHostRouting: type: object properties: {} @@ -14006,8 +12518,6 @@ components: properties: identity_update: $ref: '#/components/schemas/IdentityGlobalEventIdentityUpdate' - matchmaker_lobby_join: - $ref: '#/components/schemas/IdentityGlobalEventMatchmakerLobbyJoin' IdentityGlobalEventNotification: type: object description: >- @@ -14078,21 +12588,6 @@ components: $ref: '#/components/schemas/IdentityProfile' required: - identity - IdentityGlobalEventMatchmakerLobbyJoin: - type: object - properties: - lobby: - $ref: '#/components/schemas/MatchmakerJoinLobby' - ports: - type: object - additionalProperties: - $ref: '#/components/schemas/MatchmakerJoinPort' - player: - $ref: '#/components/schemas/MatchmakerJoinPlayer' - required: - - lobby - - ports - - player IdentityUpdateGameActivity: type: object description: >- @@ -14356,113 +12851,6 @@ components: required: - events - watch - IdentityPrepareGameLinkResponse: - type: object - properties: - identity_link_token: - type: string - description: >- - Pass this to `GetGameLink` to get the linking status. Valid for 15 - minutes. - identity_link_url: - type: string - expire_ts: - $ref: '#/components/schemas/Timestamp' - required: - - identity_link_token - - identity_link_url - - expire_ts - IdentityGetGameLinkResponse: - type: object - properties: - status: - $ref: '#/components/schemas/IdentityGameLinkStatus' - game: - $ref: '#/components/schemas/GameHandle' - current_identity: - $ref: '#/components/schemas/IdentityHandle' - new_identity: - $ref: '#/components/schemas/IdentityGetGameLinkNewIdentity' - watch: - $ref: '#/components/schemas/WatchResponse' - required: - - status - - game - - current_identity - - watch - IdentityGetGameLinkNewIdentity: - type: object - properties: - identity_token: - $ref: '#/components/schemas/Jwt' - identity_token_expire_ts: - $ref: '#/components/schemas/Timestamp' - identity: - $ref: '#/components/schemas/IdentityProfile' - required: - - identity_token - - identity_token_expire_ts - - identity - IdentityCompleteGameLinkRequest: - type: object - properties: - identity_link_token: - $ref: '#/components/schemas/Jwt' - required: - - identity_link_token - IdentityCancelGameLinkRequest: - type: object - properties: - identity_link_token: - $ref: '#/components/schemas/Jwt' - required: - - identity_link_token - KvKey: - type: string - description: >- - A string representing a key in the key-value database. - - Maximum length of 512 characters. - - _Recommended Key Path Format_ - - Key path components are split by a slash (e.g. `a/b/c` has the path - components `["a", "b", "c"]`). Slashes can be escaped by using a - backslash (e.g. `a/b\/c/d` has the path components `["a", "b/c", "d"]`). - - This format is not enforced by Rivet, but the tools built around Rivet - KV work better if this format is used. - KvDirectory: - type: string - KvValue: - description: |- - A JSON object stored in the KV database. - A `null` value indicates the entry is deleted. - Maximum length of 262,144 bytes when encoded. - KvEntry: - type: object - description: A key-value entry. - properties: - key: - $ref: '#/components/schemas/KvKey' - value: - $ref: '#/components/schemas/KvValue' - deleted: - type: boolean - required: - - key - - value - KvPutEntry: - type: object - description: A new entry to insert into the key-value database. - properties: - key: - $ref: '#/components/schemas/KvKey' - value: - $ref: '#/components/schemas/KvValue' - required: - - key - - value MatchmakerLobbyInfo: type: object description: A public lobby in the lobby list. diff --git a/sdks/full/openapi_compat/openapi.yml b/sdks/full/openapi_compat/openapi.yml index 42443e9e0a..e1d0f6626d 100644 --- a/sdks/full/openapi_compat/openapi.yml +++ b/sdks/full/openapi_compat/openapi.yml @@ -202,7 +202,9 @@ components: properties: {} type: object ActorGameGuardRouting: - properties: {} + properties: + authorization: + $ref: '#/components/schemas/ActorPortAuthorization' type: object ActorGetActorLogsResponse: properties: @@ -329,6 +331,13 @@ components: - protocol - routing type: object + ActorPortAuthorization: + properties: + bearer: + type: string + query: + $ref: '#/components/schemas/ActorPortQueryAuthorization' + type: object ActorPortProtocol: enum: - http @@ -337,6 +346,16 @@ components: - tcp_tls - udp type: string + ActorPortQueryAuthorization: + properties: + key: + type: string + value: + type: string + required: + - key + - value + type: object ActorPortRouting: properties: game_guard: @@ -3631,18 +3650,6 @@ components: resolution: type: boolean type: object - GroupSearchResponse: - properties: - anchor: - type: string - groups: - description: A list of group handles. - items: - $ref: '#/components/schemas/GroupHandle' - type: array - required: - - groups - type: object GroupSummary: properties: avatar_url: @@ -3736,20 +3743,6 @@ components: required: - name type: object - IdentityCancelGameLinkRequest: - properties: - identity_link_token: - $ref: '#/components/schemas/Jwt' - required: - - identity_link_token - type: object - IdentityCompleteGameLinkRequest: - properties: - identity_link_token: - $ref: '#/components/schemas/Jwt' - required: - - identity_link_token - type: object IdentityDevState: description: The state of the given identity's developer status. enum: @@ -3800,37 +3793,6 @@ components: - complete - cancelled type: string - IdentityGetGameLinkNewIdentity: - properties: - identity: - $ref: '#/components/schemas/IdentityProfile' - identity_token: - $ref: '#/components/schemas/Jwt' - identity_token_expire_ts: - $ref: '#/components/schemas/Timestamp' - required: - - identity_token - - identity_token_expire_ts - - identity - type: object - IdentityGetGameLinkResponse: - properties: - current_identity: - $ref: '#/components/schemas/IdentityHandle' - game: - $ref: '#/components/schemas/GameHandle' - new_identity: - $ref: '#/components/schemas/IdentityGetGameLinkNewIdentity' - status: - $ref: '#/components/schemas/IdentityGameLinkStatus' - watch: - $ref: '#/components/schemas/WatchResponse' - required: - - status - - game - - current_identity - - watch - type: object IdentityGetHandlesResponse: properties: identities: @@ -3889,23 +3851,6 @@ components: properties: identity_update: $ref: '#/components/schemas/IdentityGlobalEventIdentityUpdate' - matchmaker_lobby_join: - $ref: '#/components/schemas/IdentityGlobalEventMatchmakerLobbyJoin' - type: object - IdentityGlobalEventMatchmakerLobbyJoin: - properties: - lobby: - $ref: '#/components/schemas/MatchmakerJoinLobby' - player: - $ref: '#/components/schemas/MatchmakerJoinPlayer' - ports: - additionalProperties: - $ref: '#/components/schemas/MatchmakerJoinPort' - type: object - required: - - lobby - - ports - - player type: object IdentityGlobalEventNotification: description: 'Notifications represent information that should be presented to @@ -4033,73 +3978,6 @@ components: - suggested_players - watch type: object - IdentityListFollowersResponse: - properties: - anchor: - type: string - identities: - items: - $ref: '#/components/schemas/IdentityHandle' - type: array - watch: - $ref: '#/components/schemas/WatchResponse' - required: - - identities - - watch - type: object - IdentityListFollowingResponse: - properties: - anchor: - type: string - identities: - items: - $ref: '#/components/schemas/IdentityHandle' - type: array - watch: - $ref: '#/components/schemas/WatchResponse' - required: - - identities - - watch - type: object - IdentityListFriendsResponse: - properties: - anchor: - type: string - identities: - items: - $ref: '#/components/schemas/IdentityHandle' - type: array - watch: - $ref: '#/components/schemas/WatchResponse' - required: - - identities - - watch - type: object - IdentityListMutualFriendsResponse: - properties: - anchor: - type: string - identities: - items: - $ref: '#/components/schemas/IdentityHandle' - type: array - required: - - identities - type: object - IdentityListRecentFollowersResponse: - properties: - anchor: - type: string - identities: - items: - $ref: '#/components/schemas/IdentityHandle' - type: array - watch: - $ref: '#/components/schemas/WatchResponse' - required: - - identities - - watch - type: object IdentityPrepareAvatarUploadResponse: properties: presigned_request: @@ -4111,21 +3989,6 @@ components: - upload_id - presigned_request type: object - IdentityPrepareGameLinkResponse: - properties: - expire_ts: - $ref: '#/components/schemas/Timestamp' - identity_link_token: - description: Pass this to `GetGameLink` to get the linking status. Valid - for 15 minutes. - type: string - identity_link_url: - type: string - required: - - identity_link_token - - identity_link_url - - expire_ts - type: object IdentityProfile: description: An identity profile. properties: @@ -4210,18 +4073,6 @@ components: - groups - games type: object - IdentitySearchResponse: - properties: - anchor: - description: The pagination anchor. - type: string - identities: - items: - $ref: '#/components/schemas/IdentityHandle' - type: array - required: - - identities - type: object IdentitySetupResponse: properties: game_id: @@ -4343,112 +4194,6 @@ components: Jwt: description: Documentation at https://jwt.io/ type: string - KvDirectory: - type: string - KvEntry: - description: A key-value entry. - properties: - deleted: - type: boolean - key: - $ref: '#/components/schemas/KvKey' - value: - $ref: '#/components/schemas/KvValue' - required: - - key - - value - type: object - KvGetBatchResponse: - properties: - entries: - items: - $ref: '#/components/schemas/KvEntry' - type: array - watch: - $ref: '#/components/schemas/WatchResponse' - required: - - entries - - watch - type: object - KvGetResponse: - properties: - deleted: - description: Whether or not the entry has been deleted. Only set when watching - this endpoint. - type: boolean - value: - $ref: '#/components/schemas/KvValue' - watch: - $ref: '#/components/schemas/WatchResponse' - required: - - value - - watch - type: object - KvKey: - description: 'A string representing a key in the key-value database. - - Maximum length of 512 characters. - - _Recommended Key Path Format_ - - Key path components are split by a slash (e.g. `a/b/c` has the path components - `["a", "b", "c"]`). Slashes can be escaped by using a backslash (e.g. `a/b\/c/d` - has the path components `["a", "b/c", "d"]`). - - This format is not enforced by Rivet, but the tools built around Rivet KV - work better if this format is used.' - type: string - KvListResponse: - properties: - entries: - items: - $ref: '#/components/schemas/KvEntry' - type: array - required: - - entries - type: object - KvPutBatchRequest: - properties: - entries: - items: - $ref: '#/components/schemas/KvPutEntry' - type: array - namespace_id: - format: uuid - type: string - required: - - entries - type: object - KvPutEntry: - description: A new entry to insert into the key-value database. - properties: - key: - $ref: '#/components/schemas/KvKey' - value: - $ref: '#/components/schemas/KvValue' - required: - - key - - value - type: object - KvPutRequest: - properties: - key: - $ref: '#/components/schemas/KvKey' - namespace_id: - format: uuid - type: string - value: - $ref: '#/components/schemas/KvValue' - required: - - key - - value - type: object - KvValue: - description: 'A JSON object stored in the KV database. - - A `null` value indicates the entry is deleted. - - Maximum length of 262,144 bytes when encoded.' MatchmakerCreateLobbyResponse: properties: lobby: @@ -10135,35 +9880,30 @@ paths: security: *id001 tags: - Group - /group/groups/search: - get: - description: Fuzzy search for groups. - operationId: group_search + /group/groups/{group_id}/avatar-upload/{upload_id}/complete: + post: + description: 'Completes an avatar image upload. Must be called after the file + upload + + process completes. + + Call `rivet.api.group#PrepareAvatarUpload` first.' + operationId: group_completeAvatarUpload parameters: - - description: The query to match group display names against. - in: query - name: query + - in: path + name: group_id required: true schema: + format: uuid type: string - - in: query - name: anchor - required: false + - in: path + name: upload_id + required: true schema: + format: uuid type: string - - description: Unsigned 32 bit integer. - in: query - name: limit - required: false - schema: - format: double - type: number responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/GroupSearchResponse' + '204': description: '' '400': content: @@ -10204,74 +9944,10 @@ paths: security: *id001 tags: - Group - /group/groups/{group_id}/avatar-upload/{upload_id}/complete: - post: - description: 'Completes an avatar image upload. Must be called after the file - upload - - process completes. - - Call `rivet.api.group#PrepareAvatarUpload` first.' - operationId: group_completeAvatarUpload - parameters: - - in: path - name: group_id - required: true - schema: - format: uuid - type: string - - in: path - name: upload_id - required: true - schema: - format: uuid - type: string - responses: - '204': - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Group - /group/groups/{group_id}/bans: - get: - description: Returns a group's bans. Must have valid permissions to view. - operationId: group_getBans + /group/groups/{group_id}/bans: + get: + description: Returns a group's bans. Must have valid permissions to view. + operationId: group_getBans parameters: - in: path name: group_id @@ -11377,29 +11053,43 @@ paths: security: *id001 tags: - IdentityEvents - /identity/game-links: - get: - description: Returns the current status of a linking process. Once `status` - is `complete`, the identity's profile should be fetched again since they may - have switched accounts. - operationId: identity_links_get - parameters: - - in: query - name: identity_link_token + /identity/identities: + post: + description: 'Gets or creates an identity. + + Passing an existing identity token in the body refreshes the token. + + Temporary Accounts + + Until the identity is linked with the Rivet Hub (see `PrepareGameLink`), this + identity will be temporary but still behave like all other identities. + + This is intended to allow users to play the game without signing up while + still having the benefits of having an account. When they are ready to save + their account, they should be instructed to link their account (see `PrepareGameLink`). + + Storing Token + + `identity_token` should be stored in some form of persistent storage. The + token should be read from storage and passed to `Setup` every time the client + starts.' + operationId: identity_setup + parameters: [] + requestBody: + content: + application/json: + schema: + properties: + existing_identity_token: + $ref: '#/components/schemas/Jwt' + type: object required: true - schema: - $ref: '#/components/schemas/Jwt' - - in: query - name: watch_index - required: false - schema: - $ref: '#/components/schemas/WatchQuery' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/IdentityGetGameLinkResponse' + $ref: '#/components/schemas/IdentitySetupResponse' description: '' '400': content: @@ -11439,47 +11129,37 @@ paths: description: '' security: *id001 tags: - - IdentityLinks + - Identity + /identity/identities/avatar-upload/prepare: post: - description: 'Begins the process for linking an identity with the Rivet Hub. - - - # Importance of Linking Identities - - - When an identity is created via `rivet.api.identity#SetupIdentity`, the identity - is temporary - - and is not shared with other games the user plays. - - In order to make the identity permanent and synchronize the identity with - - other games, the identity must be linked with the hub. - - - # Linking Process - - - The linking process works by opening `identity_link_url` in a browser then - polling - - `rivet.api.identity#GetGameLink` to wait for it to complete. - - This is designed to be as flexible as possible so `identity_link_url` can - be opened - - on any device. For example, when playing a console game, the user can scan - a - - QR code for `identity_link_url` to authenticate on their phone.' - operationId: identity_links_prepare + description: Prepares an avatar image upload. Complete upload with `CompleteIdentityAvatarUpload`. + operationId: identity_prepareAvatarUpload parameters: [] + requestBody: + content: + application/json: + schema: + properties: + content_length: + format: int64 + type: integer + mime: + description: See https://www.iana.org/assignments/media-types/media-types.xhtml + type: string + path: + type: string + required: + - path + - mime + - content_length + type: object + required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/IdentityPrepareGameLinkResponse' + $ref: '#/components/schemas/IdentityPrepareAvatarUploadResponse' description: '' '400': content: @@ -11519,18 +11199,19 @@ paths: description: '' security: *id001 tags: - - IdentityLinks - /identity/game-links/cancel: + - Identity + /identity/identities/avatar-upload/{upload_id}/complete: post: - description: Cancels a game link. It can no longer be used to link after cancellation. - operationId: identity_links_cancel - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/IdentityCancelGameLinkRequest' + description: Completes an avatar image upload. Must be called after the file + upload process completes. + operationId: identity_completeAvatarUpload + parameters: + - in: path + name: upload_id required: true + schema: + format: uuid + type: string responses: '204': description: '' @@ -11572,21 +11253,23 @@ paths: description: '' security: *id001 tags: - - IdentityLinks - /identity/game-links/complete: - post: - description: Completes a game link process and returns whether or not the link - is valid. - operationId: identity_links_complete - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/IdentityCompleteGameLinkRequest' + - Identity + /identity/identities/batch/handle: + get: + description: Fetches a list of identity handles. + operationId: identity_getHandles + parameters: + - in: query + name: identity_ids required: true + schema: + type: string responses: - '204': + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IdentityGetHandlesResponse' description: '' '400': content: @@ -11626,44 +11309,23 @@ paths: description: '' security: *id001 tags: - - IdentityLinks - /identity/identities: - post: - description: 'Gets or creates an identity. - - Passing an existing identity token in the body refreshes the token. - - Temporary Accounts - - Until the identity is linked with the Rivet Hub (see `PrepareGameLink`), this - identity will be temporary but still behave like all other identities. - - This is intended to allow users to play the game without signing up while - still having the benefits of having an account. When they are ready to save - their account, they should be instructed to link their account (see `PrepareGameLink`). - - Storing Token - - `identity_token` should be stored in some form of persistent storage. The - token should be read from storage and passed to `Setup` every time the client - starts.' - operationId: identity_setup - parameters: [] - requestBody: - content: - application/json: - schema: - properties: - existing_identity_token: - $ref: '#/components/schemas/Jwt' - type: object + - Identity + /identity/identities/batch/summary: + get: + description: Fetches a list of identity summaries. + operationId: identity_getSummaries + parameters: + - in: query + name: identity_ids required: true + schema: + type: string responses: '200': content: application/json: schema: - $ref: '#/components/schemas/IdentitySetupResponse' + $ref: '#/components/schemas/IdentityGetSummariesResponse' description: '' '400': content: @@ -11704,36 +11366,24 @@ paths: security: *id001 tags: - Identity - /identity/identities/avatar-upload/prepare: + /identity/identities/identities/self/status: post: - description: Prepares an avatar image upload. Complete upload with `CompleteIdentityAvatarUpload`. - operationId: identity_prepareAvatarUpload + description: Updates the current identity's status. + operationId: identity_updateStatus parameters: [] requestBody: content: application/json: schema: properties: - content_length: - format: int64 - type: integer - mime: - description: See https://www.iana.org/assignments/media-types/media-types.xhtml - type: string - path: - type: string + status: + $ref: '#/components/schemas/IdentityStatus' required: - - path - - mime - - content_length + - status type: object required: true responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/IdentityPrepareAvatarUploadResponse' + '204': description: '' '400': content: @@ -11774,1182 +11424,13 @@ paths: security: *id001 tags: - Identity - /identity/identities/avatar-upload/{upload_id}/complete: - post: - description: Completes an avatar image upload. Must be called after the file - upload process completes. - operationId: identity_completeAvatarUpload - parameters: - - in: path - name: upload_id - required: true - schema: - format: uuid - type: string - responses: - '204': - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Identity - /identity/identities/batch/handle: - get: - description: Fetches a list of identity handles. - operationId: identity_getHandles - parameters: - - in: query - name: identity_ids - required: true - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/IdentityGetHandlesResponse' - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Identity - /identity/identities/batch/summary: - get: - description: Fetches a list of identity summaries. - operationId: identity_getSummaries - parameters: - - in: query - name: identity_ids - required: true - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/IdentityGetSummariesResponse' - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Identity - /identity/identities/identities/self/status: - post: - description: Updates the current identity's status. - operationId: identity_updateStatus - parameters: [] - requestBody: - content: - application/json: - schema: - properties: - status: - $ref: '#/components/schemas/IdentityStatus' - required: - - status - type: object - required: true - responses: - '204': - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Identity - /identity/identities/search: - get: - description: Fuzzy search for identities. - operationId: identity_search - parameters: - - description: The query to match identity display names and account numbers - against. - in: query - name: query - required: true - schema: - type: string - - description: How many identities to offset the search by. - in: query - name: anchor - required: false - schema: - type: string - - description: Amount of identities to return. Must be between 1 and 32 inclusive. - in: query - name: limit - required: false - schema: - type: integer - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/IdentitySearchResponse' - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Identity - /identity/identities/self/activity: - delete: - description: Removes the current identity's game activity. - operationId: identity_removeGameActivity - parameters: [] - responses: - '204': - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Identity - post: - description: Sets the current identity's game activity. This activity will automatically - be removed when the identity goes offline. - operationId: identity_setGameActivity - parameters: [] - requestBody: - content: - application/json: - schema: - properties: - game_activity: - $ref: '#/components/schemas/IdentityUpdateGameActivity' - required: - - game_activity - type: object - required: true - responses: - '204': - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Identity - /identity/identities/self/beta-signup: - post: - description: Completes an avatar image upload. Must be called after the file - upload process completes. - operationId: identity_signupForBeta - parameters: [] - requestBody: - content: - application/json: - schema: - properties: - company_name: - type: string - company_size: - type: string - goals: - type: string - name: - type: string - preferred_tools: - type: string - required: - - name - - company_size - - preferred_tools - - goals - type: object - required: true - responses: - '204': - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Identity - /identity/identities/self/delete-request: - delete: - operationId: identity_unmarkDeletion - parameters: [] - responses: - '204': - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Identity - post: - operationId: identity_markDeletion - parameters: [] - responses: - '204': - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Identity - /identity/identities/self/friends: - get: - operationId: identity_listFriends - parameters: - - in: query - name: anchor - required: false - schema: - type: string - - description: Range is between 1 and 32 (inclusive). - in: query - name: limit - required: false - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/IdentityListFriendsResponse' - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Identity - /identity/identities/self/profile: - get: - description: Fetches the current identity's profile. - operationId: identity_getSelfProfile - parameters: - - in: query - name: watch_index - required: false - schema: - $ref: '#/components/schemas/WatchQuery' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/IdentityGetProfileResponse' - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Identity - post: - description: Updates profile of the current identity. - operationId: identity_updateProfile - parameters: [] - requestBody: - content: - application/json: - schema: - properties: - account_number: - $ref: '#/components/schemas/AccountNumber' - bio: - $ref: '#/components/schemas/Bio' - display_name: - $ref: '#/components/schemas/DisplayName' - type: object - required: true - responses: - '204': - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Identity - /identity/identities/self/profile/validate: - post: - description: Validate contents of identity profile. Use to provide immediate - feedback on profile changes before committing them. - operationId: identity_validateProfile - parameters: [] - requestBody: - content: - application/json: - schema: - properties: - account_number: - $ref: '#/components/schemas/AccountNumber' - bio: - $ref: '#/components/schemas/Bio' - display_name: - $ref: '#/components/schemas/DisplayName' - type: object - required: true - responses: - '204': - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Identity - /identity/identities/self/recent-followers: - get: - operationId: identity_listRecentFollowers - parameters: - - in: query - name: count - required: false - schema: - type: integer - - in: query - name: watch_index - required: false - schema: - $ref: '#/components/schemas/WatchQuery' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/IdentityListRecentFollowersResponse' - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Identity - /identity/identities/self/recent-followers/{identity_id}/ignore: - post: - operationId: identity_ignoreRecentFollower - parameters: - - in: path - name: identity_id - required: true - schema: - format: uuid - type: string - responses: - '204': - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Identity - /identity/identities/{identity_id}/follow: - delete: - description: Unfollows the given identity. - operationId: identity_unfollow - parameters: - - in: path - name: identity_id - required: true - schema: - format: uuid - type: string - responses: - '204': - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Identity - post: - description: Follows the given identity. In order for identities to be "friends", - the other identity has to also follow this identity. - operationId: identity_follow - parameters: - - in: path - name: identity_id - required: true - schema: - format: uuid - type: string - responses: - '204': - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Identity - /identity/identities/{identity_id}/followers: - get: - operationId: identity_listFollowers - parameters: - - in: path - name: identity_id - required: true - schema: - format: uuid - type: string - - in: query - name: anchor - required: false - schema: - type: string - - description: Range is between 1 and 32 (inclusive). - in: query - name: limit - required: false - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/IdentityListFollowersResponse' - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Identity - /identity/identities/{identity_id}/following: - get: - operationId: identity_listFollowing - parameters: - - in: path - name: identity_id - required: true - schema: - format: uuid - type: string - - in: query - name: anchor - required: false - schema: - type: string - - description: Range is between 1 and 32 (inclusive). - in: query - name: limit - required: false - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/IdentityListFollowingResponse' - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Identity - /identity/identities/{identity_id}/mutual-friends: - get: - operationId: identity_listMutualFriends - parameters: - - in: path - name: identity_id - required: true - schema: - format: uuid - type: string - - in: query - name: anchor - required: false - schema: - type: string - - description: Range is between 1 and 32 (inclusive). - in: query - name: limit - required: false - schema: - type: string + /identity/identities/self/activity: + delete: + description: Removes the current identity's game activity. + operationId: identity_removeGameActivity + parameters: [] responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/IdentityListMutualFriendsResponse' + '204': description: '' '400': content: @@ -12990,28 +11471,24 @@ paths: security: *id001 tags: - Identity - /identity/identities/{identity_id}/profile: - get: - description: Fetches an identity profile. - operationId: identity_getProfile - parameters: - - in: path - name: identity_id + post: + description: Sets the current identity's game activity. This activity will automatically + be removed when the identity goes offline. + operationId: identity_setGameActivity + parameters: [] + requestBody: + content: + application/json: + schema: + properties: + game_activity: + $ref: '#/components/schemas/IdentityUpdateGameActivity' + required: + - game_activity + type: object required: true - schema: - format: uuid - type: string - - in: query - name: watch_index - required: false - schema: - $ref: '#/components/schemas/WatchQuery' responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/IdentityGetProfileResponse' + '204': description: '' '400': content: @@ -13052,24 +11529,32 @@ paths: security: *id001 tags: - Identity - /identity/identities/{identity_id}/report: + /identity/identities/self/beta-signup: post: - description: Creates an abuse report for an identity. - operationId: identity_report - parameters: - - in: path - name: identity_id - required: true - schema: - format: uuid - type: string + description: Completes an avatar image upload. Must be called after the file + upload process completes. + operationId: identity_signupForBeta + parameters: [] requestBody: content: application/json: schema: properties: - reason: + company_name: + type: string + company_size: + type: string + goals: + type: string + name: + type: string + preferred_tools: type: string + required: + - name + - company_size + - preferred_tools + - goals type: object required: true responses: @@ -13114,9 +11599,9 @@ paths: security: *id001 tags: - Identity - /job/runs/cleanup: - post: - operationId: job_run_cleanup + /identity/identities/self/delete-request: + delete: + operationId: identity_unmarkDeletion parameters: [] responses: '204': @@ -13159,23 +11644,10 @@ paths: description: '' security: *id001 tags: - - JobRun - /kv/entries: - delete: - description: Deletes a key-value entry by key. - operationId: kv_delete - parameters: - - in: query - name: key - required: true - schema: - $ref: '#/components/schemas/KvKey' - - in: query - name: namespace_id - required: false - schema: - format: uuid - type: string + - Identity + post: + operationId: identity_markDeletion + parameters: [] responses: '204': description: '' @@ -13217,34 +11689,23 @@ paths: description: '' security: *id001 tags: - - Kv + - Identity + /identity/identities/self/profile: get: - description: Returns a specific key-value entry by key. - operationId: kv_get + description: Fetches the current identity's profile. + operationId: identity_getSelfProfile parameters: - in: query - name: key - required: true - schema: - $ref: '#/components/schemas/KvKey' - - description: A query parameter denoting the requests watch index. - in: query name: watch_index required: false schema: - type: string - - in: query - name: namespace_id - required: false - schema: - format: uuid - type: string + $ref: '#/components/schemas/WatchQuery' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/KvGetResponse' + $ref: '#/components/schemas/IdentityGetProfileResponse' description: '' '400': content: @@ -13284,16 +11745,23 @@ paths: description: '' security: *id001 tags: - - Kv - put: - description: Puts (sets or overwrites) a key-value entry by key. - operationId: kv_put + - Identity + post: + description: Updates profile of the current identity. + operationId: identity_updateProfile parameters: [] requestBody: content: application/json: schema: - $ref: '#/components/schemas/KvPutRequest' + properties: + account_number: + $ref: '#/components/schemas/AccountNumber' + bio: + $ref: '#/components/schemas/Bio' + display_name: + $ref: '#/components/schemas/DisplayName' + type: object required: true responses: '204': @@ -13336,23 +11804,26 @@ paths: description: '' security: *id001 tags: - - Kv - /kv/entries/batch: - delete: - description: Deletes multiple key-value entries by key(s). - operationId: kv_deleteBatch - parameters: - - in: query - name: keys + - Identity + /identity/identities/self/profile/validate: + post: + description: Validate contents of identity profile. Use to provide immediate + feedback on profile changes before committing them. + operationId: identity_validateProfile + parameters: [] + requestBody: + content: + application/json: + schema: + properties: + account_number: + $ref: '#/components/schemas/AccountNumber' + bio: + $ref: '#/components/schemas/Bio' + display_name: + $ref: '#/components/schemas/DisplayName' + type: object required: true - schema: - $ref: '#/components/schemas/KvKey' - - in: query - name: namespace_id - required: false - schema: - format: uuid - type: string responses: '204': description: '' @@ -13394,34 +11865,29 @@ paths: description: '' security: *id001 tags: - - Kv + - Identity + /identity/identities/{identity_id}/profile: get: - description: Gets multiple key-value entries by key(s). - operationId: kv_getBatch + description: Fetches an identity profile. + operationId: identity_getProfile parameters: - - in: query - name: keys + - in: path + name: identity_id required: true schema: - $ref: '#/components/schemas/KvKey' - - description: A query parameter denoting the requests watch index. - in: query - name: watch_index - required: false - schema: + format: uuid type: string - in: query - name: namespace_id + name: watch_index required: false schema: - format: uuid - type: string + $ref: '#/components/schemas/WatchQuery' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/KvGetBatchResponse' + $ref: '#/components/schemas/IdentityGetProfileResponse' description: '' '400': content: @@ -13461,17 +11927,11 @@ paths: description: '' security: *id001 tags: - - Kv - put: - description: Puts (sets or overwrites) multiple key-value entries by key(s). - operationId: kv_putBatch + - Identity + /job/runs/cleanup: + post: + operationId: job_run_cleanup parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/KvPutBatchRequest' - required: true responses: '204': description: '' @@ -13513,69 +11973,7 @@ paths: description: '' security: *id001 tags: - - Kv - /kv/entries/list: - get: - description: Lists all keys in a directory. - operationId: kv_list - parameters: - - in: query - name: directory - required: true - schema: - $ref: '#/components/schemas/KvDirectory' - - in: query - name: namespace_id - required: true - schema: - format: uuid - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/KvListResponse' - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Kv + - JobRun /matchmaker/lobbies/closed: put: description: 'If `is_closed` is `true`, the matchmaker will no longer route diff --git a/sdks/full/rust-cli/.openapi-generator/FILES b/sdks/full/rust-cli/.openapi-generator/FILES index 731a8ebfbf..88aedad638 100644 --- a/sdks/full/rust-cli/.openapi-generator/FILES +++ b/sdks/full/rust-cli/.openapi-generator/FILES @@ -18,6 +18,7 @@ docs/ActorCreateBuildRequest.md docs/ActorCreateBuildResponse.md docs/ActorDatacenter.md docs/ActorDatacentersApi.md +docs/ActorGameGuardRouting.md docs/ActorGetActorLogsResponse.md docs/ActorGetActorResponse.md docs/ActorGetBuildResponse.md @@ -31,7 +32,9 @@ docs/ActorNetwork.md docs/ActorNetworkMode.md docs/ActorPatchBuildTagsRequest.md docs/ActorPort.md +docs/ActorPortAuthorization.md docs/ActorPortProtocol.md +docs/ActorPortQueryAuthorization.md docs/ActorPortRouting.md docs/ActorResources.md docs/ActorRuntime.md @@ -280,7 +283,6 @@ docs/GroupPrepareAvatarUploadResponse.md docs/GroupProfile.md docs/GroupPublicity.md docs/GroupResolveJoinRequestRequest.md -docs/GroupSearchResponse.md docs/GroupSummary.md docs/GroupTransferOwnershipRequest.md docs/GroupUpdateProfileRequest.md @@ -289,40 +291,26 @@ docs/GroupValidateProfileResponse.md docs/IdentityAccessTokenLinkedAccount.md docs/IdentityActivitiesApi.md docs/IdentityApi.md -docs/IdentityCancelGameLinkRequest.md -docs/IdentityCompleteGameLinkRequest.md docs/IdentityDevState.md docs/IdentityEmailLinkedAccount.md docs/IdentityEventsApi.md docs/IdentityExternalLinks.md docs/IdentityGameActivity.md docs/IdentityGameLinkStatus.md -docs/IdentityGetGameLinkNewIdentity.md -docs/IdentityGetGameLinkResponse.md docs/IdentityGetHandlesResponse.md docs/IdentityGetProfileResponse.md docs/IdentityGetSummariesResponse.md docs/IdentityGlobalEvent.md docs/IdentityGlobalEventIdentityUpdate.md docs/IdentityGlobalEventKind.md -docs/IdentityGlobalEventMatchmakerLobbyJoin.md docs/IdentityGlobalEventNotification.md docs/IdentityGroup.md docs/IdentityHandle.md docs/IdentityLinkedAccount.md -docs/IdentityLinksApi.md docs/IdentityListActivitiesResponse.md -docs/IdentityListFollowersResponse.md -docs/IdentityListFollowingResponse.md -docs/IdentityListFriendsResponse.md -docs/IdentityListMutualFriendsResponse.md -docs/IdentityListRecentFollowersResponse.md docs/IdentityPrepareAvatarUploadRequest.md docs/IdentityPrepareAvatarUploadResponse.md -docs/IdentityPrepareGameLinkResponse.md docs/IdentityProfile.md -docs/IdentityReportRequest.md -docs/IdentitySearchResponse.md docs/IdentitySetGameActivityRequest.md docs/IdentitySetupRequest.md docs/IdentitySetupResponse.md @@ -335,14 +323,6 @@ docs/IdentityUpdateStatusRequest.md docs/IdentityValidateProfileResponse.md docs/IdentityWatchEventsResponse.md docs/JobRunApi.md -docs/KvApi.md -docs/KvEntry.md -docs/KvGetBatchResponse.md -docs/KvGetResponse.md -docs/KvListResponse.md -docs/KvPutBatchRequest.md -docs/KvPutEntry.md -docs/KvPutRequest.md docs/MatchmakerCreateLobbyResponse.md docs/MatchmakerCustomLobbyPublicity.md docs/MatchmakerFindLobbyResponse.md @@ -419,9 +399,7 @@ src/apis/group_join_requests_api.rs src/apis/identity_activities_api.rs src/apis/identity_api.rs src/apis/identity_events_api.rs -src/apis/identity_links_api.rs src/apis/job_run_api.rs -src/apis/kv_api.rs src/apis/matchmaker_lobbies_api.rs src/apis/matchmaker_players_api.rs src/apis/matchmaker_regions_api.rs @@ -442,6 +420,7 @@ src/models/actor_create_actor_runtime_request.rs src/models/actor_create_build_request.rs src/models/actor_create_build_response.rs src/models/actor_datacenter.rs +src/models/actor_game_guard_routing.rs src/models/actor_get_actor_logs_response.rs src/models/actor_get_actor_response.rs src/models/actor_get_build_response.rs @@ -454,7 +433,9 @@ src/models/actor_network.rs src/models/actor_network_mode.rs src/models/actor_patch_build_tags_request.rs src/models/actor_port.rs +src/models/actor_port_authorization.rs src/models/actor_port_protocol.rs +src/models/actor_port_query_authorization.rs src/models/actor_port_routing.rs src/models/actor_resources.rs src/models/actor_runtime.rs @@ -675,45 +656,31 @@ src/models/group_prepare_avatar_upload_response.rs src/models/group_profile.rs src/models/group_publicity.rs src/models/group_resolve_join_request_request.rs -src/models/group_search_response.rs src/models/group_summary.rs src/models/group_transfer_ownership_request.rs src/models/group_update_profile_request.rs src/models/group_validate_profile_request.rs src/models/group_validate_profile_response.rs src/models/identity_access_token_linked_account.rs -src/models/identity_cancel_game_link_request.rs -src/models/identity_complete_game_link_request.rs src/models/identity_dev_state.rs src/models/identity_email_linked_account.rs src/models/identity_external_links.rs src/models/identity_game_activity.rs src/models/identity_game_link_status.rs -src/models/identity_get_game_link_new_identity.rs -src/models/identity_get_game_link_response.rs src/models/identity_get_handles_response.rs src/models/identity_get_profile_response.rs src/models/identity_get_summaries_response.rs src/models/identity_global_event.rs src/models/identity_global_event_identity_update.rs src/models/identity_global_event_kind.rs -src/models/identity_global_event_matchmaker_lobby_join.rs src/models/identity_global_event_notification.rs src/models/identity_group.rs src/models/identity_handle.rs src/models/identity_linked_account.rs src/models/identity_list_activities_response.rs -src/models/identity_list_followers_response.rs -src/models/identity_list_following_response.rs -src/models/identity_list_friends_response.rs -src/models/identity_list_mutual_friends_response.rs -src/models/identity_list_recent_followers_response.rs src/models/identity_prepare_avatar_upload_request.rs src/models/identity_prepare_avatar_upload_response.rs -src/models/identity_prepare_game_link_response.rs src/models/identity_profile.rs -src/models/identity_report_request.rs -src/models/identity_search_response.rs src/models/identity_set_game_activity_request.rs src/models/identity_setup_request.rs src/models/identity_setup_response.rs @@ -725,13 +692,6 @@ src/models/identity_update_profile_request.rs src/models/identity_update_status_request.rs src/models/identity_validate_profile_response.rs src/models/identity_watch_events_response.rs -src/models/kv_entry.rs -src/models/kv_get_batch_response.rs -src/models/kv_get_response.rs -src/models/kv_list_response.rs -src/models/kv_put_batch_request.rs -src/models/kv_put_entry.rs -src/models/kv_put_request.rs src/models/matchmaker_create_lobby_response.rs src/models/matchmaker_custom_lobby_publicity.rs src/models/matchmaker_find_lobby_response.rs diff --git a/sdks/full/rust-cli/README.md b/sdks/full/rust-cli/README.md index b5878ce8c0..9bc3b8bee3 100644 --- a/sdks/full/rust-cli/README.md +++ b/sdks/full/rust-cli/README.md @@ -116,7 +116,6 @@ Class | Method | HTTP request | Description *GroupApi* | [**group_leave**](docs/GroupApi.md#group_leave) | **POST** /group/groups/{group_id}/leave | *GroupApi* | [**group_list_suggested**](docs/GroupApi.md#group_list_suggested) | **GET** /group/groups | *GroupApi* | [**group_prepare_avatar_upload**](docs/GroupApi.md#group_prepare_avatar_upload) | **POST** /group/groups/avatar-upload/prepare | -*GroupApi* | [**group_search**](docs/GroupApi.md#group_search) | **GET** /group/groups/search | *GroupApi* | [**group_transfer_ownership**](docs/GroupApi.md#group_transfer_ownership) | **POST** /group/groups/{group_id}/transfer-owner | *GroupApi* | [**group_unban_identity**](docs/GroupApi.md#group_unban_identity) | **DELETE** /group/groups/{group_id}/bans/{identity_id} | *GroupApi* | [**group_update_profile**](docs/GroupApi.md#group_update_profile) | **POST** /group/groups/{group_id}/profile | @@ -127,44 +126,23 @@ Class | Method | HTTP request | Description *GroupJoinRequestsApi* | [**group_join_requests_create_join_request**](docs/GroupJoinRequestsApi.md#group_join_requests_create_join_request) | **POST** /group/groups/{group_id}/join-request | *GroupJoinRequestsApi* | [**group_join_requests_resolve_join_request**](docs/GroupJoinRequestsApi.md#group_join_requests_resolve_join_request) | **POST** /group/groups/{group_id}/join-request/{identity_id} | *IdentityApi* | [**identity_complete_avatar_upload**](docs/IdentityApi.md#identity_complete_avatar_upload) | **POST** /identity/identities/avatar-upload/{upload_id}/complete | -*IdentityApi* | [**identity_follow**](docs/IdentityApi.md#identity_follow) | **POST** /identity/identities/{identity_id}/follow | *IdentityApi* | [**identity_get_handles**](docs/IdentityApi.md#identity_get_handles) | **GET** /identity/identities/batch/handle | *IdentityApi* | [**identity_get_profile**](docs/IdentityApi.md#identity_get_profile) | **GET** /identity/identities/{identity_id}/profile | *IdentityApi* | [**identity_get_self_profile**](docs/IdentityApi.md#identity_get_self_profile) | **GET** /identity/identities/self/profile | *IdentityApi* | [**identity_get_summaries**](docs/IdentityApi.md#identity_get_summaries) | **GET** /identity/identities/batch/summary | -*IdentityApi* | [**identity_ignore_recent_follower**](docs/IdentityApi.md#identity_ignore_recent_follower) | **POST** /identity/identities/self/recent-followers/{identity_id}/ignore | -*IdentityApi* | [**identity_list_followers**](docs/IdentityApi.md#identity_list_followers) | **GET** /identity/identities/{identity_id}/followers | -*IdentityApi* | [**identity_list_following**](docs/IdentityApi.md#identity_list_following) | **GET** /identity/identities/{identity_id}/following | -*IdentityApi* | [**identity_list_friends**](docs/IdentityApi.md#identity_list_friends) | **GET** /identity/identities/self/friends | -*IdentityApi* | [**identity_list_mutual_friends**](docs/IdentityApi.md#identity_list_mutual_friends) | **GET** /identity/identities/{identity_id}/mutual-friends | -*IdentityApi* | [**identity_list_recent_followers**](docs/IdentityApi.md#identity_list_recent_followers) | **GET** /identity/identities/self/recent-followers | *IdentityApi* | [**identity_mark_deletion**](docs/IdentityApi.md#identity_mark_deletion) | **POST** /identity/identities/self/delete-request | *IdentityApi* | [**identity_prepare_avatar_upload**](docs/IdentityApi.md#identity_prepare_avatar_upload) | **POST** /identity/identities/avatar-upload/prepare | *IdentityApi* | [**identity_remove_game_activity**](docs/IdentityApi.md#identity_remove_game_activity) | **DELETE** /identity/identities/self/activity | -*IdentityApi* | [**identity_report**](docs/IdentityApi.md#identity_report) | **POST** /identity/identities/{identity_id}/report | -*IdentityApi* | [**identity_search**](docs/IdentityApi.md#identity_search) | **GET** /identity/identities/search | *IdentityApi* | [**identity_set_game_activity**](docs/IdentityApi.md#identity_set_game_activity) | **POST** /identity/identities/self/activity | *IdentityApi* | [**identity_setup**](docs/IdentityApi.md#identity_setup) | **POST** /identity/identities | *IdentityApi* | [**identity_signup_for_beta**](docs/IdentityApi.md#identity_signup_for_beta) | **POST** /identity/identities/self/beta-signup | -*IdentityApi* | [**identity_unfollow**](docs/IdentityApi.md#identity_unfollow) | **DELETE** /identity/identities/{identity_id}/follow | *IdentityApi* | [**identity_unmark_deletion**](docs/IdentityApi.md#identity_unmark_deletion) | **DELETE** /identity/identities/self/delete-request | *IdentityApi* | [**identity_update_profile**](docs/IdentityApi.md#identity_update_profile) | **POST** /identity/identities/self/profile | *IdentityApi* | [**identity_update_status**](docs/IdentityApi.md#identity_update_status) | **POST** /identity/identities/identities/self/status | *IdentityApi* | [**identity_validate_profile**](docs/IdentityApi.md#identity_validate_profile) | **POST** /identity/identities/self/profile/validate | *IdentityActivitiesApi* | [**identity_activities_list**](docs/IdentityActivitiesApi.md#identity_activities_list) | **GET** /identity/activities | *IdentityEventsApi* | [**identity_events_watch**](docs/IdentityEventsApi.md#identity_events_watch) | **GET** /identity/events/live | -*IdentityLinksApi* | [**identity_links_cancel**](docs/IdentityLinksApi.md#identity_links_cancel) | **POST** /identity/game-links/cancel | -*IdentityLinksApi* | [**identity_links_complete**](docs/IdentityLinksApi.md#identity_links_complete) | **POST** /identity/game-links/complete | -*IdentityLinksApi* | [**identity_links_get**](docs/IdentityLinksApi.md#identity_links_get) | **GET** /identity/game-links | -*IdentityLinksApi* | [**identity_links_prepare**](docs/IdentityLinksApi.md#identity_links_prepare) | **POST** /identity/game-links | *JobRunApi* | [**job_run_cleanup**](docs/JobRunApi.md#job_run_cleanup) | **POST** /job/runs/cleanup | -*KvApi* | [**kv_delete**](docs/KvApi.md#kv_delete) | **DELETE** /kv/entries | -*KvApi* | [**kv_delete_batch**](docs/KvApi.md#kv_delete_batch) | **DELETE** /kv/entries/batch | -*KvApi* | [**kv_get**](docs/KvApi.md#kv_get) | **GET** /kv/entries | -*KvApi* | [**kv_get_batch**](docs/KvApi.md#kv_get_batch) | **GET** /kv/entries/batch | -*KvApi* | [**kv_list**](docs/KvApi.md#kv_list) | **GET** /kv/entries/list | -*KvApi* | [**kv_put**](docs/KvApi.md#kv_put) | **PUT** /kv/entries | -*KvApi* | [**kv_put_batch**](docs/KvApi.md#kv_put_batch) | **PUT** /kv/entries/batch | *MatchmakerLobbiesApi* | [**matchmaker_lobbies_create**](docs/MatchmakerLobbiesApi.md#matchmaker_lobbies_create) | **POST** /matchmaker/lobbies/create | *MatchmakerLobbiesApi* | [**matchmaker_lobbies_find**](docs/MatchmakerLobbiesApi.md#matchmaker_lobbies_find) | **POST** /matchmaker/lobbies/find | *MatchmakerLobbiesApi* | [**matchmaker_lobbies_get_state**](docs/MatchmakerLobbiesApi.md#matchmaker_lobbies_get_state) | **GET** /matchmaker/lobbies/{lobby_id}/state | @@ -196,6 +174,7 @@ Class | Method | HTTP request | Description - [ActorCreateBuildRequest](docs/ActorCreateBuildRequest.md) - [ActorCreateBuildResponse](docs/ActorCreateBuildResponse.md) - [ActorDatacenter](docs/ActorDatacenter.md) + - [ActorGameGuardRouting](docs/ActorGameGuardRouting.md) - [ActorGetActorLogsResponse](docs/ActorGetActorLogsResponse.md) - [ActorGetActorResponse](docs/ActorGetActorResponse.md) - [ActorGetBuildResponse](docs/ActorGetBuildResponse.md) @@ -208,7 +187,9 @@ Class | Method | HTTP request | Description - [ActorNetworkMode](docs/ActorNetworkMode.md) - [ActorPatchBuildTagsRequest](docs/ActorPatchBuildTagsRequest.md) - [ActorPort](docs/ActorPort.md) + - [ActorPortAuthorization](docs/ActorPortAuthorization.md) - [ActorPortProtocol](docs/ActorPortProtocol.md) + - [ActorPortQueryAuthorization](docs/ActorPortQueryAuthorization.md) - [ActorPortRouting](docs/ActorPortRouting.md) - [ActorResources](docs/ActorResources.md) - [ActorRuntime](docs/ActorRuntime.md) @@ -429,45 +410,31 @@ Class | Method | HTTP request | Description - [GroupProfile](docs/GroupProfile.md) - [GroupPublicity](docs/GroupPublicity.md) - [GroupResolveJoinRequestRequest](docs/GroupResolveJoinRequestRequest.md) - - [GroupSearchResponse](docs/GroupSearchResponse.md) - [GroupSummary](docs/GroupSummary.md) - [GroupTransferOwnershipRequest](docs/GroupTransferOwnershipRequest.md) - [GroupUpdateProfileRequest](docs/GroupUpdateProfileRequest.md) - [GroupValidateProfileRequest](docs/GroupValidateProfileRequest.md) - [GroupValidateProfileResponse](docs/GroupValidateProfileResponse.md) - [IdentityAccessTokenLinkedAccount](docs/IdentityAccessTokenLinkedAccount.md) - - [IdentityCancelGameLinkRequest](docs/IdentityCancelGameLinkRequest.md) - - [IdentityCompleteGameLinkRequest](docs/IdentityCompleteGameLinkRequest.md) - [IdentityDevState](docs/IdentityDevState.md) - [IdentityEmailLinkedAccount](docs/IdentityEmailLinkedAccount.md) - [IdentityExternalLinks](docs/IdentityExternalLinks.md) - [IdentityGameActivity](docs/IdentityGameActivity.md) - [IdentityGameLinkStatus](docs/IdentityGameLinkStatus.md) - - [IdentityGetGameLinkNewIdentity](docs/IdentityGetGameLinkNewIdentity.md) - - [IdentityGetGameLinkResponse](docs/IdentityGetGameLinkResponse.md) - [IdentityGetHandlesResponse](docs/IdentityGetHandlesResponse.md) - [IdentityGetProfileResponse](docs/IdentityGetProfileResponse.md) - [IdentityGetSummariesResponse](docs/IdentityGetSummariesResponse.md) - [IdentityGlobalEvent](docs/IdentityGlobalEvent.md) - [IdentityGlobalEventIdentityUpdate](docs/IdentityGlobalEventIdentityUpdate.md) - [IdentityGlobalEventKind](docs/IdentityGlobalEventKind.md) - - [IdentityGlobalEventMatchmakerLobbyJoin](docs/IdentityGlobalEventMatchmakerLobbyJoin.md) - [IdentityGlobalEventNotification](docs/IdentityGlobalEventNotification.md) - [IdentityGroup](docs/IdentityGroup.md) - [IdentityHandle](docs/IdentityHandle.md) - [IdentityLinkedAccount](docs/IdentityLinkedAccount.md) - [IdentityListActivitiesResponse](docs/IdentityListActivitiesResponse.md) - - [IdentityListFollowersResponse](docs/IdentityListFollowersResponse.md) - - [IdentityListFollowingResponse](docs/IdentityListFollowingResponse.md) - - [IdentityListFriendsResponse](docs/IdentityListFriendsResponse.md) - - [IdentityListMutualFriendsResponse](docs/IdentityListMutualFriendsResponse.md) - - [IdentityListRecentFollowersResponse](docs/IdentityListRecentFollowersResponse.md) - [IdentityPrepareAvatarUploadRequest](docs/IdentityPrepareAvatarUploadRequest.md) - [IdentityPrepareAvatarUploadResponse](docs/IdentityPrepareAvatarUploadResponse.md) - - [IdentityPrepareGameLinkResponse](docs/IdentityPrepareGameLinkResponse.md) - [IdentityProfile](docs/IdentityProfile.md) - - [IdentityReportRequest](docs/IdentityReportRequest.md) - - [IdentitySearchResponse](docs/IdentitySearchResponse.md) - [IdentitySetGameActivityRequest](docs/IdentitySetGameActivityRequest.md) - [IdentitySetupRequest](docs/IdentitySetupRequest.md) - [IdentitySetupResponse](docs/IdentitySetupResponse.md) @@ -479,13 +446,6 @@ Class | Method | HTTP request | Description - [IdentityUpdateStatusRequest](docs/IdentityUpdateStatusRequest.md) - [IdentityValidateProfileResponse](docs/IdentityValidateProfileResponse.md) - [IdentityWatchEventsResponse](docs/IdentityWatchEventsResponse.md) - - [KvEntry](docs/KvEntry.md) - - [KvGetBatchResponse](docs/KvGetBatchResponse.md) - - [KvGetResponse](docs/KvGetResponse.md) - - [KvListResponse](docs/KvListResponse.md) - - [KvPutBatchRequest](docs/KvPutBatchRequest.md) - - [KvPutEntry](docs/KvPutEntry.md) - - [KvPutRequest](docs/KvPutRequest.md) - [MatchmakerCreateLobbyResponse](docs/MatchmakerCreateLobbyResponse.md) - [MatchmakerCustomLobbyPublicity](docs/MatchmakerCustomLobbyPublicity.md) - [MatchmakerFindLobbyResponse](docs/MatchmakerFindLobbyResponse.md) diff --git a/sdks/full/rust-cli/docs/IdentityCancelGameLinkRequest.md b/sdks/full/rust-cli/docs/ActorGameGuardRouting.md similarity index 66% rename from sdks/full/rust-cli/docs/IdentityCancelGameLinkRequest.md rename to sdks/full/rust-cli/docs/ActorGameGuardRouting.md index fdc38ee3db..4e97cd2ecd 100644 --- a/sdks/full/rust-cli/docs/IdentityCancelGameLinkRequest.md +++ b/sdks/full/rust-cli/docs/ActorGameGuardRouting.md @@ -1,10 +1,10 @@ -# IdentityCancelGameLinkRequest +# ActorGameGuardRouting ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**identity_link_token** | **String** | Documentation at https://jwt.io/ | +**authorization** | Option<[**crate::models::ActorPortAuthorization**](ActorPortAuthorization.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/full/rust-cli/docs/GroupSearchResponse.md b/sdks/full/rust-cli/docs/ActorPortAuthorization.md similarity index 59% rename from sdks/full/rust-cli/docs/GroupSearchResponse.md rename to sdks/full/rust-cli/docs/ActorPortAuthorization.md index d7d5b596e0..4ba4fa9e78 100644 --- a/sdks/full/rust-cli/docs/GroupSearchResponse.md +++ b/sdks/full/rust-cli/docs/ActorPortAuthorization.md @@ -1,11 +1,11 @@ -# GroupSearchResponse +# ActorPortAuthorization ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**anchor** | Option<**String**> | | [optional] -**groups** | [**Vec**](GroupHandle.md) | A list of group handles. | +**bearer** | Option<**String**> | | [optional] +**query** | Option<[**crate::models::ActorPortQueryAuthorization**](ActorPortQueryAuthorization.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/full/rust-cli/docs/IdentityReportRequest.md b/sdks/full/rust-cli/docs/ActorPortQueryAuthorization.md similarity index 76% rename from sdks/full/rust-cli/docs/IdentityReportRequest.md rename to sdks/full/rust-cli/docs/ActorPortQueryAuthorization.md index d1b3022709..a0d2f11c8a 100644 --- a/sdks/full/rust-cli/docs/IdentityReportRequest.md +++ b/sdks/full/rust-cli/docs/ActorPortQueryAuthorization.md @@ -1,10 +1,11 @@ -# IdentityReportRequest +# ActorPortQueryAuthorization ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**reason** | Option<**String**> | | [optional] +**key** | **String** | | +**value** | **String** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/full/rust-cli/docs/ActorPortRouting.md b/sdks/full/rust-cli/docs/ActorPortRouting.md index 63441ba645..d58785562a 100644 --- a/sdks/full/rust-cli/docs/ActorPortRouting.md +++ b/sdks/full/rust-cli/docs/ActorPortRouting.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**game_guard** | Option<[**serde_json::Value**](.md)> | | [optional] +**game_guard** | Option<[**crate::models::ActorGameGuardRouting**](ActorGameGuardRouting.md)> | | [optional] **host** | Option<[**serde_json::Value**](.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/full/rust-cli/docs/GroupApi.md b/sdks/full/rust-cli/docs/GroupApi.md index b7042992fc..a57a559347 100644 --- a/sdks/full/rust-cli/docs/GroupApi.md +++ b/sdks/full/rust-cli/docs/GroupApi.md @@ -16,7 +16,6 @@ Method | HTTP request | Description [**group_leave**](GroupApi.md#group_leave) | **POST** /group/groups/{group_id}/leave | [**group_list_suggested**](GroupApi.md#group_list_suggested) | **GET** /group/groups | [**group_prepare_avatar_upload**](GroupApi.md#group_prepare_avatar_upload) | **POST** /group/groups/avatar-upload/prepare | -[**group_search**](GroupApi.md#group_search) | **GET** /group/groups/search | [**group_transfer_ownership**](GroupApi.md#group_transfer_ownership) | **POST** /group/groups/{group_id}/transfer-owner | [**group_unban_identity**](GroupApi.md#group_unban_identity) | **DELETE** /group/groups/{group_id}/bans/{identity_id} | [**group_update_profile**](GroupApi.md#group_update_profile) | **POST** /group/groups/{group_id}/profile | @@ -395,38 +394,6 @@ Name | Type | Description | Required | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## group_search - -> crate::models::GroupSearchResponse group_search(query, anchor, limit) - - -Fuzzy search for groups. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**query** | **String** | The query to match group display names against. | [required] | -**anchor** | Option<**String**> | | | -**limit** | Option<**f64**> | Unsigned 32 bit integer. | | - -### Return type - -[**crate::models::GroupSearchResponse**](GroupSearchResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - ## group_transfer_ownership > group_transfer_ownership(group_id, group_transfer_ownership_request) diff --git a/sdks/full/rust-cli/docs/IdentityApi.md b/sdks/full/rust-cli/docs/IdentityApi.md index ae0d55788f..218946d9c6 100644 --- a/sdks/full/rust-cli/docs/IdentityApi.md +++ b/sdks/full/rust-cli/docs/IdentityApi.md @@ -5,26 +5,16 @@ All URIs are relative to *https://api.rivet.gg* Method | HTTP request | Description ------------- | ------------- | ------------- [**identity_complete_avatar_upload**](IdentityApi.md#identity_complete_avatar_upload) | **POST** /identity/identities/avatar-upload/{upload_id}/complete | -[**identity_follow**](IdentityApi.md#identity_follow) | **POST** /identity/identities/{identity_id}/follow | [**identity_get_handles**](IdentityApi.md#identity_get_handles) | **GET** /identity/identities/batch/handle | [**identity_get_profile**](IdentityApi.md#identity_get_profile) | **GET** /identity/identities/{identity_id}/profile | [**identity_get_self_profile**](IdentityApi.md#identity_get_self_profile) | **GET** /identity/identities/self/profile | [**identity_get_summaries**](IdentityApi.md#identity_get_summaries) | **GET** /identity/identities/batch/summary | -[**identity_ignore_recent_follower**](IdentityApi.md#identity_ignore_recent_follower) | **POST** /identity/identities/self/recent-followers/{identity_id}/ignore | -[**identity_list_followers**](IdentityApi.md#identity_list_followers) | **GET** /identity/identities/{identity_id}/followers | -[**identity_list_following**](IdentityApi.md#identity_list_following) | **GET** /identity/identities/{identity_id}/following | -[**identity_list_friends**](IdentityApi.md#identity_list_friends) | **GET** /identity/identities/self/friends | -[**identity_list_mutual_friends**](IdentityApi.md#identity_list_mutual_friends) | **GET** /identity/identities/{identity_id}/mutual-friends | -[**identity_list_recent_followers**](IdentityApi.md#identity_list_recent_followers) | **GET** /identity/identities/self/recent-followers | [**identity_mark_deletion**](IdentityApi.md#identity_mark_deletion) | **POST** /identity/identities/self/delete-request | [**identity_prepare_avatar_upload**](IdentityApi.md#identity_prepare_avatar_upload) | **POST** /identity/identities/avatar-upload/prepare | [**identity_remove_game_activity**](IdentityApi.md#identity_remove_game_activity) | **DELETE** /identity/identities/self/activity | -[**identity_report**](IdentityApi.md#identity_report) | **POST** /identity/identities/{identity_id}/report | -[**identity_search**](IdentityApi.md#identity_search) | **GET** /identity/identities/search | [**identity_set_game_activity**](IdentityApi.md#identity_set_game_activity) | **POST** /identity/identities/self/activity | [**identity_setup**](IdentityApi.md#identity_setup) | **POST** /identity/identities | [**identity_signup_for_beta**](IdentityApi.md#identity_signup_for_beta) | **POST** /identity/identities/self/beta-signup | -[**identity_unfollow**](IdentityApi.md#identity_unfollow) | **DELETE** /identity/identities/{identity_id}/follow | [**identity_unmark_deletion**](IdentityApi.md#identity_unmark_deletion) | **DELETE** /identity/identities/self/delete-request | [**identity_update_profile**](IdentityApi.md#identity_update_profile) | **POST** /identity/identities/self/profile | [**identity_update_status**](IdentityApi.md#identity_update_status) | **POST** /identity/identities/identities/self/status | @@ -62,36 +52,6 @@ Name | Type | Description | Required | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## identity_follow - -> identity_follow(identity_id) - - -Follows the given identity. In order for identities to be \"friends\", the other identity has to also follow this identity. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**identity_id** | **uuid::Uuid** | | [required] | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - ## identity_get_handles > crate::models::IdentityGetHandlesResponse identity_get_handles(identity_ids) @@ -213,182 +173,6 @@ Name | Type | Description | Required | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## identity_ignore_recent_follower - -> identity_ignore_recent_follower(identity_id) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**identity_id** | **uuid::Uuid** | | [required] | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## identity_list_followers - -> crate::models::IdentityListFollowersResponse identity_list_followers(identity_id, anchor, limit) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**identity_id** | **uuid::Uuid** | | [required] | -**anchor** | Option<**String**> | | | -**limit** | Option<**String**> | Range is between 1 and 32 (inclusive). | | - -### Return type - -[**crate::models::IdentityListFollowersResponse**](IdentityListFollowersResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## identity_list_following - -> crate::models::IdentityListFollowingResponse identity_list_following(identity_id, anchor, limit) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**identity_id** | **uuid::Uuid** | | [required] | -**anchor** | Option<**String**> | | | -**limit** | Option<**String**> | Range is between 1 and 32 (inclusive). | | - -### Return type - -[**crate::models::IdentityListFollowingResponse**](IdentityListFollowingResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## identity_list_friends - -> crate::models::IdentityListFriendsResponse identity_list_friends(anchor, limit) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**anchor** | Option<**String**> | | | -**limit** | Option<**String**> | Range is between 1 and 32 (inclusive). | | - -### Return type - -[**crate::models::IdentityListFriendsResponse**](IdentityListFriendsResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## identity_list_mutual_friends - -> crate::models::IdentityListMutualFriendsResponse identity_list_mutual_friends(identity_id, anchor, limit) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**identity_id** | **uuid::Uuid** | | [required] | -**anchor** | Option<**String**> | | | -**limit** | Option<**String**> | Range is between 1 and 32 (inclusive). | | - -### Return type - -[**crate::models::IdentityListMutualFriendsResponse**](IdentityListMutualFriendsResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## identity_list_recent_followers - -> crate::models::IdentityListRecentFollowersResponse identity_list_recent_followers(count, watch_index) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**count** | Option<**i32**> | | | -**watch_index** | Option<**String**> | | | - -### Return type - -[**crate::models::IdentityListRecentFollowersResponse**](IdentityListRecentFollowersResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - ## identity_mark_deletion > identity_mark_deletion() @@ -471,69 +255,6 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## identity_report - -> identity_report(identity_id, identity_report_request) - - -Creates an abuse report for an identity. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**identity_id** | **uuid::Uuid** | | [required] | -**identity_report_request** | [**IdentityReportRequest**](IdentityReportRequest.md) | | [required] | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## identity_search - -> crate::models::IdentitySearchResponse identity_search(query, anchor, limit) - - -Fuzzy search for identities. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**query** | **String** | The query to match identity display names and account numbers against. | [required] | -**anchor** | Option<**String**> | How many identities to offset the search by. | | -**limit** | Option<**i32**> | Amount of identities to return. Must be between 1 and 32 inclusive. | | - -### Return type - -[**crate::models::IdentitySearchResponse**](IdentitySearchResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - ## identity_set_game_activity > identity_set_game_activity(identity_set_game_activity_request) @@ -624,36 +345,6 @@ Name | Type | Description | Required | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## identity_unfollow - -> identity_unfollow(identity_id) - - -Unfollows the given identity. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**identity_id** | **uuid::Uuid** | | [required] | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - ## identity_unmark_deletion > identity_unmark_deletion() diff --git a/sdks/full/rust-cli/docs/IdentityGetGameLinkNewIdentity.md b/sdks/full/rust-cli/docs/IdentityGetGameLinkNewIdentity.md deleted file mode 100644 index ca35a6612d..0000000000 --- a/sdks/full/rust-cli/docs/IdentityGetGameLinkNewIdentity.md +++ /dev/null @@ -1,13 +0,0 @@ -# IdentityGetGameLinkNewIdentity - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**identity** | [**crate::models::IdentityProfile**](IdentityProfile.md) | | -**identity_token** | **String** | Documentation at https://jwt.io/ | -**identity_token_expire_ts** | **String** | RFC3339 timestamp | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust-cli/docs/IdentityGetGameLinkResponse.md b/sdks/full/rust-cli/docs/IdentityGetGameLinkResponse.md deleted file mode 100644 index 0c4da269c7..0000000000 --- a/sdks/full/rust-cli/docs/IdentityGetGameLinkResponse.md +++ /dev/null @@ -1,15 +0,0 @@ -# IdentityGetGameLinkResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**current_identity** | [**crate::models::IdentityHandle**](IdentityHandle.md) | | -**game** | [**crate::models::GameHandle**](GameHandle.md) | | -**new_identity** | Option<[**crate::models::IdentityGetGameLinkNewIdentity**](IdentityGetGameLinkNewIdentity.md)> | | [optional] -**status** | [**crate::models::IdentityGameLinkStatus**](IdentityGameLinkStatus.md) | | -**watch** | [**crate::models::WatchResponse**](WatchResponse.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust-cli/docs/IdentityGlobalEventKind.md b/sdks/full/rust-cli/docs/IdentityGlobalEventKind.md index 86d3944414..0acac0e5d1 100644 --- a/sdks/full/rust-cli/docs/IdentityGlobalEventKind.md +++ b/sdks/full/rust-cli/docs/IdentityGlobalEventKind.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **identity_update** | Option<[**crate::models::IdentityGlobalEventIdentityUpdate**](IdentityGlobalEventIdentityUpdate.md)> | | [optional] -**matchmaker_lobby_join** | Option<[**crate::models::IdentityGlobalEventMatchmakerLobbyJoin**](IdentityGlobalEventMatchmakerLobbyJoin.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/full/rust-cli/docs/IdentityGlobalEventMatchmakerLobbyJoin.md b/sdks/full/rust-cli/docs/IdentityGlobalEventMatchmakerLobbyJoin.md deleted file mode 100644 index 3f6fa0a745..0000000000 --- a/sdks/full/rust-cli/docs/IdentityGlobalEventMatchmakerLobbyJoin.md +++ /dev/null @@ -1,13 +0,0 @@ -# IdentityGlobalEventMatchmakerLobbyJoin - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**lobby** | [**crate::models::MatchmakerJoinLobby**](MatchmakerJoinLobby.md) | | -**player** | [**crate::models::MatchmakerJoinPlayer**](MatchmakerJoinPlayer.md) | | -**ports** | [**::std::collections::HashMap**](MatchmakerJoinPort.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust-cli/docs/IdentityLinksApi.md b/sdks/full/rust-cli/docs/IdentityLinksApi.md deleted file mode 100644 index c1988a16f1..0000000000 --- a/sdks/full/rust-cli/docs/IdentityLinksApi.md +++ /dev/null @@ -1,130 +0,0 @@ -# \IdentityLinksApi - -All URIs are relative to *https://api.rivet.gg* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**identity_links_cancel**](IdentityLinksApi.md#identity_links_cancel) | **POST** /identity/game-links/cancel | -[**identity_links_complete**](IdentityLinksApi.md#identity_links_complete) | **POST** /identity/game-links/complete | -[**identity_links_get**](IdentityLinksApi.md#identity_links_get) | **GET** /identity/game-links | -[**identity_links_prepare**](IdentityLinksApi.md#identity_links_prepare) | **POST** /identity/game-links | - - - -## identity_links_cancel - -> identity_links_cancel(identity_cancel_game_link_request) - - -Cancels a game link. It can no longer be used to link after cancellation. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**identity_cancel_game_link_request** | [**IdentityCancelGameLinkRequest**](IdentityCancelGameLinkRequest.md) | | [required] | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## identity_links_complete - -> identity_links_complete(identity_complete_game_link_request) - - -Completes a game link process and returns whether or not the link is valid. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**identity_complete_game_link_request** | [**IdentityCompleteGameLinkRequest**](IdentityCompleteGameLinkRequest.md) | | [required] | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## identity_links_get - -> crate::models::IdentityGetGameLinkResponse identity_links_get(identity_link_token, watch_index) - - -Returns the current status of a linking process. Once `status` is `complete`, the identity's profile should be fetched again since they may have switched accounts. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**identity_link_token** | **String** | | [required] | -**watch_index** | Option<**String**> | | | - -### Return type - -[**crate::models::IdentityGetGameLinkResponse**](IdentityGetGameLinkResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## identity_links_prepare - -> crate::models::IdentityPrepareGameLinkResponse identity_links_prepare() - - -Begins the process for linking an identity with the Rivet Hub. # Importance of Linking Identities When an identity is created via `rivet.api.identity#SetupIdentity`, the identity is temporary and is not shared with other games the user plays. In order to make the identity permanent and synchronize the identity with other games, the identity must be linked with the hub. # Linking Process The linking process works by opening `identity_link_url` in a browser then polling `rivet.api.identity#GetGameLink` to wait for it to complete. This is designed to be as flexible as possible so `identity_link_url` can be opened on any device. For example, when playing a console game, the user can scan a QR code for `identity_link_url` to authenticate on their phone. - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**crate::models::IdentityPrepareGameLinkResponse**](IdentityPrepareGameLinkResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/sdks/full/rust-cli/docs/IdentityListFollowersResponse.md b/sdks/full/rust-cli/docs/IdentityListFollowersResponse.md deleted file mode 100644 index 6a90f8b2fd..0000000000 --- a/sdks/full/rust-cli/docs/IdentityListFollowersResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# IdentityListFollowersResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**anchor** | Option<**String**> | | [optional] -**identities** | [**Vec**](IdentityHandle.md) | | -**watch** | [**crate::models::WatchResponse**](WatchResponse.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust-cli/docs/IdentityListFollowingResponse.md b/sdks/full/rust-cli/docs/IdentityListFollowingResponse.md deleted file mode 100644 index b703055bcb..0000000000 --- a/sdks/full/rust-cli/docs/IdentityListFollowingResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# IdentityListFollowingResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**anchor** | Option<**String**> | | [optional] -**identities** | [**Vec**](IdentityHandle.md) | | -**watch** | [**crate::models::WatchResponse**](WatchResponse.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust-cli/docs/IdentityListFriendsResponse.md b/sdks/full/rust-cli/docs/IdentityListFriendsResponse.md deleted file mode 100644 index 7b35a28472..0000000000 --- a/sdks/full/rust-cli/docs/IdentityListFriendsResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# IdentityListFriendsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**anchor** | Option<**String**> | | [optional] -**identities** | [**Vec**](IdentityHandle.md) | | -**watch** | [**crate::models::WatchResponse**](WatchResponse.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust-cli/docs/IdentityListRecentFollowersResponse.md b/sdks/full/rust-cli/docs/IdentityListRecentFollowersResponse.md deleted file mode 100644 index 1c3a279307..0000000000 --- a/sdks/full/rust-cli/docs/IdentityListRecentFollowersResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# IdentityListRecentFollowersResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**anchor** | Option<**String**> | | [optional] -**identities** | [**Vec**](IdentityHandle.md) | | -**watch** | [**crate::models::WatchResponse**](WatchResponse.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust-cli/docs/IdentityPrepareGameLinkResponse.md b/sdks/full/rust-cli/docs/IdentityPrepareGameLinkResponse.md deleted file mode 100644 index dc6cd813f4..0000000000 --- a/sdks/full/rust-cli/docs/IdentityPrepareGameLinkResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# IdentityPrepareGameLinkResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**expire_ts** | **String** | RFC3339 timestamp | -**identity_link_token** | **String** | Pass this to `GetGameLink` to get the linking status. Valid for 15 minutes. | -**identity_link_url** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust-cli/docs/IdentitySearchResponse.md b/sdks/full/rust-cli/docs/IdentitySearchResponse.md deleted file mode 100644 index 38b9698305..0000000000 --- a/sdks/full/rust-cli/docs/IdentitySearchResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# IdentitySearchResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**anchor** | Option<**String**> | The pagination anchor. | [optional] -**identities** | [**Vec**](IdentityHandle.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust-cli/docs/KvApi.md b/sdks/full/rust-cli/docs/KvApi.md deleted file mode 100644 index acb99b4f9d..0000000000 --- a/sdks/full/rust-cli/docs/KvApi.md +++ /dev/null @@ -1,232 +0,0 @@ -# \KvApi - -All URIs are relative to *https://api.rivet.gg* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**kv_delete**](KvApi.md#kv_delete) | **DELETE** /kv/entries | -[**kv_delete_batch**](KvApi.md#kv_delete_batch) | **DELETE** /kv/entries/batch | -[**kv_get**](KvApi.md#kv_get) | **GET** /kv/entries | -[**kv_get_batch**](KvApi.md#kv_get_batch) | **GET** /kv/entries/batch | -[**kv_list**](KvApi.md#kv_list) | **GET** /kv/entries/list | -[**kv_put**](KvApi.md#kv_put) | **PUT** /kv/entries | -[**kv_put_batch**](KvApi.md#kv_put_batch) | **PUT** /kv/entries/batch | - - - -## kv_delete - -> kv_delete(key, namespace_id) - - -Deletes a key-value entry by key. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**key** | **String** | | [required] | -**namespace_id** | Option<**uuid::Uuid**> | | | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## kv_delete_batch - -> kv_delete_batch(keys, namespace_id) - - -Deletes multiple key-value entries by key(s). - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**keys** | **String** | | [required] | -**namespace_id** | Option<**uuid::Uuid**> | | | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## kv_get - -> crate::models::KvGetResponse kv_get(key, watch_index, namespace_id) - - -Returns a specific key-value entry by key. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**key** | **String** | | [required] | -**watch_index** | Option<**String**> | A query parameter denoting the requests watch index. | | -**namespace_id** | Option<**uuid::Uuid**> | | | - -### Return type - -[**crate::models::KvGetResponse**](KvGetResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## kv_get_batch - -> crate::models::KvGetBatchResponse kv_get_batch(keys, watch_index, namespace_id) - - -Gets multiple key-value entries by key(s). - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**keys** | **String** | | [required] | -**watch_index** | Option<**String**> | A query parameter denoting the requests watch index. | | -**namespace_id** | Option<**uuid::Uuid**> | | | - -### Return type - -[**crate::models::KvGetBatchResponse**](KvGetBatchResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## kv_list - -> crate::models::KvListResponse kv_list(directory, namespace_id) - - -Lists all keys in a directory. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**directory** | **String** | | [required] | -**namespace_id** | **uuid::Uuid** | | [required] | - -### Return type - -[**crate::models::KvListResponse**](KvListResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## kv_put - -> kv_put(kv_put_request) - - -Puts (sets or overwrites) a key-value entry by key. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**kv_put_request** | [**KvPutRequest**](KvPutRequest.md) | | [required] | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## kv_put_batch - -> kv_put_batch(kv_put_batch_request) - - -Puts (sets or overwrites) multiple key-value entries by key(s). - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**kv_put_batch_request** | [**KvPutBatchRequest**](KvPutBatchRequest.md) | | [required] | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/sdks/full/rust-cli/docs/KvEntry.md b/sdks/full/rust-cli/docs/KvEntry.md deleted file mode 100644 index 203241453f..0000000000 --- a/sdks/full/rust-cli/docs/KvEntry.md +++ /dev/null @@ -1,13 +0,0 @@ -# KvEntry - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**deleted** | Option<**bool**> | | [optional] -**key** | **String** | A string representing a key in the key-value database. Maximum length of 512 characters. _Recommended Key Path Format_ Key path components are split by a slash (e.g. `a/b/c` has the path components `[\"a\", \"b\", \"c\"]`). Slashes can be escaped by using a backslash (e.g. `a/b/c/d` has the path components `[\"a\", \"b/c\", \"d\"]`). This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. | -**value** | Option<[**serde_json::Value**](.md)> | A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust-cli/docs/KvGetBatchResponse.md b/sdks/full/rust-cli/docs/KvGetBatchResponse.md deleted file mode 100644 index 33ecbfdd4e..0000000000 --- a/sdks/full/rust-cli/docs/KvGetBatchResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# KvGetBatchResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**entries** | [**Vec**](KvEntry.md) | | -**watch** | [**crate::models::WatchResponse**](WatchResponse.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust-cli/docs/KvGetResponse.md b/sdks/full/rust-cli/docs/KvGetResponse.md deleted file mode 100644 index 323c9260e4..0000000000 --- a/sdks/full/rust-cli/docs/KvGetResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# KvGetResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**deleted** | Option<**bool**> | Whether or not the entry has been deleted. Only set when watching this endpoint. | [optional] -**value** | Option<[**serde_json::Value**](.md)> | A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. | -**watch** | [**crate::models::WatchResponse**](WatchResponse.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust-cli/docs/KvListResponse.md b/sdks/full/rust-cli/docs/KvListResponse.md deleted file mode 100644 index 2315cef877..0000000000 --- a/sdks/full/rust-cli/docs/KvListResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# KvListResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**entries** | [**Vec**](KvEntry.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust-cli/docs/KvPutBatchRequest.md b/sdks/full/rust-cli/docs/KvPutBatchRequest.md deleted file mode 100644 index 07c4ee6c7c..0000000000 --- a/sdks/full/rust-cli/docs/KvPutBatchRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# KvPutBatchRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**entries** | [**Vec**](KvPutEntry.md) | | -**namespace_id** | Option<[**uuid::Uuid**](uuid::Uuid.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust-cli/docs/KvPutEntry.md b/sdks/full/rust-cli/docs/KvPutEntry.md deleted file mode 100644 index 9e2d465b8c..0000000000 --- a/sdks/full/rust-cli/docs/KvPutEntry.md +++ /dev/null @@ -1,12 +0,0 @@ -# KvPutEntry - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | **String** | A string representing a key in the key-value database. Maximum length of 512 characters. _Recommended Key Path Format_ Key path components are split by a slash (e.g. `a/b/c` has the path components `[\"a\", \"b\", \"c\"]`). Slashes can be escaped by using a backslash (e.g. `a/b/c/d` has the path components `[\"a\", \"b/c\", \"d\"]`). This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. | -**value** | Option<[**serde_json::Value**](.md)> | A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust-cli/docs/KvPutRequest.md b/sdks/full/rust-cli/docs/KvPutRequest.md deleted file mode 100644 index 44af60b311..0000000000 --- a/sdks/full/rust-cli/docs/KvPutRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# KvPutRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | **String** | A string representing a key in the key-value database. Maximum length of 512 characters. _Recommended Key Path Format_ Key path components are split by a slash (e.g. `a/b/c` has the path components `[\"a\", \"b\", \"c\"]`). Slashes can be escaped by using a backslash (e.g. `a/b/c/d` has the path components `[\"a\", \"b/c\", \"d\"]`). This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. | -**namespace_id** | Option<[**uuid::Uuid**](uuid::Uuid.md)> | | [optional] -**value** | Option<[**serde_json::Value**](.md)> | A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust-cli/src/apis/group_api.rs b/sdks/full/rust-cli/src/apis/group_api.rs index cab1bd763a..a2e46b3ada 100644 --- a/sdks/full/rust-cli/src/apis/group_api.rs +++ b/sdks/full/rust-cli/src/apis/group_api.rs @@ -171,19 +171,6 @@ pub enum GroupPrepareAvatarUploadError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`group_search`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GroupSearchError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - /// struct for typed errors of method [`group_transfer_ownership`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -643,44 +630,6 @@ pub async fn group_prepare_avatar_upload(configuration: &configuration::Configur } } -/// Fuzzy search for groups. -pub async fn group_search(configuration: &configuration::Configuration, query: &str, anchor: Option<&str>, limit: Option) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/group/groups/search", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("query", &query.to_string())]); - if let Some(ref local_var_str) = anchor { - local_var_req_builder = local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - /// Transfers ownership of a group to another identity. pub async fn group_transfer_ownership(configuration: &configuration::Configuration, group_id: &str, group_transfer_ownership_request: crate::models::GroupTransferOwnershipRequest) -> Result<(), Error> { let local_var_configuration = configuration; diff --git a/sdks/full/rust-cli/src/apis/identity_api.rs b/sdks/full/rust-cli/src/apis/identity_api.rs index 15329c2b16..fc7ff309f7 100644 --- a/sdks/full/rust-cli/src/apis/identity_api.rs +++ b/sdks/full/rust-cli/src/apis/identity_api.rs @@ -28,19 +28,6 @@ pub enum IdentityCompleteAvatarUploadError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`identity_follow`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentityFollowError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - /// struct for typed errors of method [`identity_get_handles`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -93,84 +80,6 @@ pub enum IdentityGetSummariesError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`identity_ignore_recent_follower`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentityIgnoreRecentFollowerError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`identity_list_followers`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentityListFollowersError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`identity_list_following`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentityListFollowingError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`identity_list_friends`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentityListFriendsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`identity_list_mutual_friends`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentityListMutualFriendsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`identity_list_recent_followers`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentityListRecentFollowersError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - /// struct for typed errors of method [`identity_mark_deletion`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -210,32 +119,6 @@ pub enum IdentityRemoveGameActivityError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`identity_report`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentityReportError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`identity_search`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentitySearchError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - /// struct for typed errors of method [`identity_set_game_activity`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -275,19 +158,6 @@ pub enum IdentitySignupForBetaError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`identity_unfollow`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentityUnfollowError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - /// struct for typed errors of method [`identity_unmark_deletion`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -372,37 +242,6 @@ pub async fn identity_complete_avatar_upload(configuration: &configuration::Conf } } -/// Follows the given identity. In order for identities to be \"friends\", the other identity has to also follow this identity. -pub async fn identity_follow(configuration: &configuration::Configuration, identity_id: &str) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/{identity_id}/follow", local_var_configuration.base_path, identity_id=crate::apis::urlencode(identity_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - /// Fetches a list of identity handles. pub async fn identity_get_handles(configuration: &configuration::Configuration, identity_ids: &str) -> Result> { let local_var_configuration = configuration; @@ -535,216 +374,6 @@ pub async fn identity_get_summaries(configuration: &configuration::Configuration } } -pub async fn identity_ignore_recent_follower(configuration: &configuration::Configuration, identity_id: &str) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/self/recent-followers/{identity_id}/ignore", local_var_configuration.base_path, identity_id=crate::apis::urlencode(identity_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn identity_list_followers(configuration: &configuration::Configuration, identity_id: &str, anchor: Option<&str>, limit: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/{identity_id}/followers", local_var_configuration.base_path, identity_id=crate::apis::urlencode(identity_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = anchor { - local_var_req_builder = local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn identity_list_following(configuration: &configuration::Configuration, identity_id: &str, anchor: Option<&str>, limit: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/{identity_id}/following", local_var_configuration.base_path, identity_id=crate::apis::urlencode(identity_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = anchor { - local_var_req_builder = local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn identity_list_friends(configuration: &configuration::Configuration, anchor: Option<&str>, limit: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/self/friends", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = anchor { - local_var_req_builder = local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn identity_list_mutual_friends(configuration: &configuration::Configuration, identity_id: &str, anchor: Option<&str>, limit: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/{identity_id}/mutual-friends", local_var_configuration.base_path, identity_id=crate::apis::urlencode(identity_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = anchor { - local_var_req_builder = local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn identity_list_recent_followers(configuration: &configuration::Configuration, count: Option, watch_index: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/self/recent-followers", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = count { - local_var_req_builder = local_var_req_builder.query(&[("count", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - pub async fn identity_mark_deletion(configuration: &configuration::Configuration, ) -> Result<(), Error> { let local_var_configuration = configuration; @@ -838,76 +467,6 @@ pub async fn identity_remove_game_activity(configuration: &configuration::Config } } -/// Creates an abuse report for an identity. -pub async fn identity_report(configuration: &configuration::Configuration, identity_id: &str, identity_report_request: crate::models::IdentityReportRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/{identity_id}/report", local_var_configuration.base_path, identity_id=crate::apis::urlencode(identity_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&identity_report_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Fuzzy search for identities. -pub async fn identity_search(configuration: &configuration::Configuration, query: &str, anchor: Option<&str>, limit: Option) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/search", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("query", &query.to_string())]); - if let Some(ref local_var_str) = anchor { - local_var_req_builder = local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - /// Sets the current identity's game activity. This activity will automatically be removed when the identity goes offline. pub async fn identity_set_game_activity(configuration: &configuration::Configuration, identity_set_game_activity_request: crate::models::IdentitySetGameActivityRequest) -> Result<(), Error> { let local_var_configuration = configuration; @@ -1004,37 +563,6 @@ pub async fn identity_signup_for_beta(configuration: &configuration::Configurati } } -/// Unfollows the given identity. -pub async fn identity_unfollow(configuration: &configuration::Configuration, identity_id: &str) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/{identity_id}/follow", local_var_configuration.base_path, identity_id=crate::apis::urlencode(identity_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - pub async fn identity_unmark_deletion(configuration: &configuration::Configuration, ) -> Result<(), Error> { let local_var_configuration = configuration; diff --git a/sdks/full/rust-cli/src/apis/identity_links_api.rs b/sdks/full/rust-cli/src/apis/identity_links_api.rs deleted file mode 100644 index b15f92bb60..0000000000 --- a/sdks/full/rust-cli/src/apis/identity_links_api.rs +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - -use reqwest; - -use crate::apis::ResponseContent; -use super::{Error, configuration}; - - -/// struct for typed errors of method [`identity_links_cancel`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentityLinksCancelError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`identity_links_complete`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentityLinksCompleteError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`identity_links_get`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentityLinksGetError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`identity_links_prepare`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentityLinksPrepareError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - - -/// Cancels a game link. It can no longer be used to link after cancellation. -pub async fn identity_links_cancel(configuration: &configuration::Configuration, identity_cancel_game_link_request: crate::models::IdentityCancelGameLinkRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/game-links/cancel", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&identity_cancel_game_link_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Completes a game link process and returns whether or not the link is valid. -pub async fn identity_links_complete(configuration: &configuration::Configuration, identity_complete_game_link_request: crate::models::IdentityCompleteGameLinkRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/game-links/complete", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&identity_complete_game_link_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Returns the current status of a linking process. Once `status` is `complete`, the identity's profile should be fetched again since they may have switched accounts. -pub async fn identity_links_get(configuration: &configuration::Configuration, identity_link_token: &str, watch_index: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/game-links", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("identity_link_token", &identity_link_token.to_string())]); - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Begins the process for linking an identity with the Rivet Hub. # Importance of Linking Identities When an identity is created via `rivet.api.identity#SetupIdentity`, the identity is temporary and is not shared with other games the user plays. In order to make the identity permanent and synchronize the identity with other games, the identity must be linked with the hub. # Linking Process The linking process works by opening `identity_link_url` in a browser then polling `rivet.api.identity#GetGameLink` to wait for it to complete. This is designed to be as flexible as possible so `identity_link_url` can be opened on any device. For example, when playing a console game, the user can scan a QR code for `identity_link_url` to authenticate on their phone. -pub async fn identity_links_prepare(configuration: &configuration::Configuration, ) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/game-links", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - diff --git a/sdks/full/rust-cli/src/apis/kv_api.rs b/sdks/full/rust-cli/src/apis/kv_api.rs deleted file mode 100644 index e54f756b80..0000000000 --- a/sdks/full/rust-cli/src/apis/kv_api.rs +++ /dev/null @@ -1,352 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - -use reqwest; - -use crate::apis::ResponseContent; -use super::{Error, configuration}; - - -/// struct for typed errors of method [`kv_delete`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum KvDeleteError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`kv_delete_batch`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum KvDeleteBatchError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`kv_get`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum KvGetError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`kv_get_batch`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum KvGetBatchError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`kv_list`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum KvListError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`kv_put`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum KvPutError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`kv_put_batch`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum KvPutBatchError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - - -/// Deletes a key-value entry by key. -pub async fn kv_delete(configuration: &configuration::Configuration, key: &str, namespace_id: Option<&str>) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("key", &key.to_string())]); - if let Some(ref local_var_str) = namespace_id { - local_var_req_builder = local_var_req_builder.query(&[("namespace_id", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Deletes multiple key-value entries by key(s). -pub async fn kv_delete_batch(configuration: &configuration::Configuration, keys: &str, namespace_id: Option<&str>) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries/batch", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("keys", &keys.to_string())]); - if let Some(ref local_var_str) = namespace_id { - local_var_req_builder = local_var_req_builder.query(&[("namespace_id", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Returns a specific key-value entry by key. -pub async fn kv_get(configuration: &configuration::Configuration, key: &str, watch_index: Option<&str>, namespace_id: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("key", &key.to_string())]); - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = namespace_id { - local_var_req_builder = local_var_req_builder.query(&[("namespace_id", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Gets multiple key-value entries by key(s). -pub async fn kv_get_batch(configuration: &configuration::Configuration, keys: &str, watch_index: Option<&str>, namespace_id: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries/batch", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("keys", &keys.to_string())]); - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = namespace_id { - local_var_req_builder = local_var_req_builder.query(&[("namespace_id", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Lists all keys in a directory. -pub async fn kv_list(configuration: &configuration::Configuration, directory: &str, namespace_id: &str) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries/list", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("directory", &directory.to_string())]); - local_var_req_builder = local_var_req_builder.query(&[("namespace_id", &namespace_id.to_string())]); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Puts (sets or overwrites) a key-value entry by key. -pub async fn kv_put(configuration: &configuration::Configuration, kv_put_request: crate::models::KvPutRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&kv_put_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Puts (sets or overwrites) multiple key-value entries by key(s). -pub async fn kv_put_batch(configuration: &configuration::Configuration, kv_put_batch_request: crate::models::KvPutBatchRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries/batch", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&kv_put_batch_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - diff --git a/sdks/full/rust-cli/src/apis/mod.rs b/sdks/full/rust-cli/src/apis/mod.rs index 8925a0d223..addc259a0f 100644 --- a/sdks/full/rust-cli/src/apis/mod.rs +++ b/sdks/full/rust-cli/src/apis/mod.rs @@ -125,9 +125,7 @@ pub mod group_join_requests_api; pub mod identity_api; pub mod identity_activities_api; pub mod identity_events_api; -pub mod identity_links_api; pub mod job_run_api; -pub mod kv_api; pub mod matchmaker_lobbies_api; pub mod matchmaker_players_api; pub mod matchmaker_regions_api; diff --git a/sdks/full/rust-cli/src/models/kv_list_response.rs b/sdks/full/rust-cli/src/models/actor_game_guard_routing.rs similarity index 50% rename from sdks/full/rust-cli/src/models/kv_list_response.rs rename to sdks/full/rust-cli/src/models/actor_game_guard_routing.rs index 25cfadcf4a..b1a29406e2 100644 --- a/sdks/full/rust-cli/src/models/kv_list_response.rs +++ b/sdks/full/rust-cli/src/models/actor_game_guard_routing.rs @@ -12,15 +12,15 @@ #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct KvListResponse { - #[serde(rename = "entries")] - pub entries: Vec, +pub struct ActorGameGuardRouting { + #[serde(rename = "authorization", skip_serializing_if = "Option::is_none")] + pub authorization: Option>, } -impl KvListResponse { - pub fn new(entries: Vec) -> KvListResponse { - KvListResponse { - entries, +impl ActorGameGuardRouting { + pub fn new() -> ActorGameGuardRouting { + ActorGameGuardRouting { + authorization: None, } } } diff --git a/sdks/full/rust-cli/src/models/actor_port_authorization.rs b/sdks/full/rust-cli/src/models/actor_port_authorization.rs new file mode 100644 index 0000000000..c3962e01ac --- /dev/null +++ b/sdks/full/rust-cli/src/models/actor_port_authorization.rs @@ -0,0 +1,31 @@ +/* + * Rivet API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct ActorPortAuthorization { + #[serde(rename = "bearer", skip_serializing_if = "Option::is_none")] + pub bearer: Option, + #[serde(rename = "query", skip_serializing_if = "Option::is_none")] + pub query: Option>, +} + +impl ActorPortAuthorization { + pub fn new() -> ActorPortAuthorization { + ActorPortAuthorization { + bearer: None, + query: None, + } + } +} + + diff --git a/sdks/full/rust-cli/src/models/actor_port_query_authorization.rs b/sdks/full/rust-cli/src/models/actor_port_query_authorization.rs new file mode 100644 index 0000000000..ea8b447713 --- /dev/null +++ b/sdks/full/rust-cli/src/models/actor_port_query_authorization.rs @@ -0,0 +1,31 @@ +/* + * Rivet API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct ActorPortQueryAuthorization { + #[serde(rename = "key")] + pub key: String, + #[serde(rename = "value")] + pub value: String, +} + +impl ActorPortQueryAuthorization { + pub fn new(key: String, value: String) -> ActorPortQueryAuthorization { + ActorPortQueryAuthorization { + key, + value, + } + } +} + + diff --git a/sdks/full/rust-cli/src/models/actor_port_routing.rs b/sdks/full/rust-cli/src/models/actor_port_routing.rs index ae287481cc..11da800ef7 100644 --- a/sdks/full/rust-cli/src/models/actor_port_routing.rs +++ b/sdks/full/rust-cli/src/models/actor_port_routing.rs @@ -14,7 +14,7 @@ #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ActorPortRouting { #[serde(rename = "game_guard", skip_serializing_if = "Option::is_none")] - pub game_guard: Option, + pub game_guard: Option>, #[serde(rename = "host", skip_serializing_if = "Option::is_none")] pub host: Option, } diff --git a/sdks/full/rust-cli/src/models/group_search_response.rs b/sdks/full/rust-cli/src/models/group_search_response.rs deleted file mode 100644 index 15ddb31984..0000000000 --- a/sdks/full/rust-cli/src/models/group_search_response.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct GroupSearchResponse { - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - /// A list of group handles. - #[serde(rename = "groups")] - pub groups: Vec, -} - -impl GroupSearchResponse { - pub fn new(groups: Vec) -> GroupSearchResponse { - GroupSearchResponse { - anchor: None, - groups, - } - } -} - - diff --git a/sdks/full/rust-cli/src/models/identity_cancel_game_link_request.rs b/sdks/full/rust-cli/src/models/identity_cancel_game_link_request.rs deleted file mode 100644 index 31ed88eb54..0000000000 --- a/sdks/full/rust-cli/src/models/identity_cancel_game_link_request.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct IdentityCancelGameLinkRequest { - /// Documentation at https://jwt.io/ - #[serde(rename = "identity_link_token")] - pub identity_link_token: String, -} - -impl IdentityCancelGameLinkRequest { - pub fn new(identity_link_token: String) -> IdentityCancelGameLinkRequest { - IdentityCancelGameLinkRequest { - identity_link_token, - } - } -} - - diff --git a/sdks/full/rust-cli/src/models/identity_complete_game_link_request.rs b/sdks/full/rust-cli/src/models/identity_complete_game_link_request.rs deleted file mode 100644 index 5b9e67b24a..0000000000 --- a/sdks/full/rust-cli/src/models/identity_complete_game_link_request.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct IdentityCompleteGameLinkRequest { - /// Documentation at https://jwt.io/ - #[serde(rename = "identity_link_token")] - pub identity_link_token: String, -} - -impl IdentityCompleteGameLinkRequest { - pub fn new(identity_link_token: String) -> IdentityCompleteGameLinkRequest { - IdentityCompleteGameLinkRequest { - identity_link_token, - } - } -} - - diff --git a/sdks/full/rust-cli/src/models/identity_get_game_link_new_identity.rs b/sdks/full/rust-cli/src/models/identity_get_game_link_new_identity.rs deleted file mode 100644 index 7b61ef57b3..0000000000 --- a/sdks/full/rust-cli/src/models/identity_get_game_link_new_identity.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct IdentityGetGameLinkNewIdentity { - #[serde(rename = "identity")] - pub identity: Box, - /// Documentation at https://jwt.io/ - #[serde(rename = "identity_token")] - pub identity_token: String, - /// RFC3339 timestamp - #[serde(rename = "identity_token_expire_ts")] - pub identity_token_expire_ts: String, -} - -impl IdentityGetGameLinkNewIdentity { - pub fn new(identity: crate::models::IdentityProfile, identity_token: String, identity_token_expire_ts: String) -> IdentityGetGameLinkNewIdentity { - IdentityGetGameLinkNewIdentity { - identity: Box::new(identity), - identity_token, - identity_token_expire_ts, - } - } -} - - diff --git a/sdks/full/rust-cli/src/models/identity_get_game_link_response.rs b/sdks/full/rust-cli/src/models/identity_get_game_link_response.rs deleted file mode 100644 index fc93492c87..0000000000 --- a/sdks/full/rust-cli/src/models/identity_get_game_link_response.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct IdentityGetGameLinkResponse { - #[serde(rename = "current_identity")] - pub current_identity: Box, - #[serde(rename = "game")] - pub game: Box, - #[serde(rename = "new_identity", skip_serializing_if = "Option::is_none")] - pub new_identity: Option>, - #[serde(rename = "status")] - pub status: crate::models::IdentityGameLinkStatus, - #[serde(rename = "watch")] - pub watch: Box, -} - -impl IdentityGetGameLinkResponse { - pub fn new(current_identity: crate::models::IdentityHandle, game: crate::models::GameHandle, status: crate::models::IdentityGameLinkStatus, watch: crate::models::WatchResponse) -> IdentityGetGameLinkResponse { - IdentityGetGameLinkResponse { - current_identity: Box::new(current_identity), - game: Box::new(game), - new_identity: None, - status, - watch: Box::new(watch), - } - } -} - - diff --git a/sdks/full/rust-cli/src/models/identity_global_event_kind.rs b/sdks/full/rust-cli/src/models/identity_global_event_kind.rs index ccc10bae99..fab257077b 100644 --- a/sdks/full/rust-cli/src/models/identity_global_event_kind.rs +++ b/sdks/full/rust-cli/src/models/identity_global_event_kind.rs @@ -15,15 +15,12 @@ pub struct IdentityGlobalEventKind { #[serde(rename = "identity_update", skip_serializing_if = "Option::is_none")] pub identity_update: Option>, - #[serde(rename = "matchmaker_lobby_join", skip_serializing_if = "Option::is_none")] - pub matchmaker_lobby_join: Option>, } impl IdentityGlobalEventKind { pub fn new() -> IdentityGlobalEventKind { IdentityGlobalEventKind { identity_update: None, - matchmaker_lobby_join: None, } } } diff --git a/sdks/full/rust-cli/src/models/identity_global_event_matchmaker_lobby_join.rs b/sdks/full/rust-cli/src/models/identity_global_event_matchmaker_lobby_join.rs deleted file mode 100644 index ecc1053927..0000000000 --- a/sdks/full/rust-cli/src/models/identity_global_event_matchmaker_lobby_join.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct IdentityGlobalEventMatchmakerLobbyJoin { - #[serde(rename = "lobby")] - pub lobby: Box, - #[serde(rename = "player")] - pub player: Box, - #[serde(rename = "ports")] - pub ports: ::std::collections::HashMap, -} - -impl IdentityGlobalEventMatchmakerLobbyJoin { - pub fn new(lobby: crate::models::MatchmakerJoinLobby, player: crate::models::MatchmakerJoinPlayer, ports: ::std::collections::HashMap) -> IdentityGlobalEventMatchmakerLobbyJoin { - IdentityGlobalEventMatchmakerLobbyJoin { - lobby: Box::new(lobby), - player: Box::new(player), - ports, - } - } -} - - diff --git a/sdks/full/rust-cli/src/models/identity_list_followers_response.rs b/sdks/full/rust-cli/src/models/identity_list_followers_response.rs deleted file mode 100644 index 622fed1cb3..0000000000 --- a/sdks/full/rust-cli/src/models/identity_list_followers_response.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct IdentityListFollowersResponse { - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - #[serde(rename = "identities")] - pub identities: Vec, - #[serde(rename = "watch")] - pub watch: Box, -} - -impl IdentityListFollowersResponse { - pub fn new(identities: Vec, watch: crate::models::WatchResponse) -> IdentityListFollowersResponse { - IdentityListFollowersResponse { - anchor: None, - identities, - watch: Box::new(watch), - } - } -} - - diff --git a/sdks/full/rust-cli/src/models/identity_list_following_response.rs b/sdks/full/rust-cli/src/models/identity_list_following_response.rs deleted file mode 100644 index 1eb3898c72..0000000000 --- a/sdks/full/rust-cli/src/models/identity_list_following_response.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct IdentityListFollowingResponse { - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - #[serde(rename = "identities")] - pub identities: Vec, - #[serde(rename = "watch")] - pub watch: Box, -} - -impl IdentityListFollowingResponse { - pub fn new(identities: Vec, watch: crate::models::WatchResponse) -> IdentityListFollowingResponse { - IdentityListFollowingResponse { - anchor: None, - identities, - watch: Box::new(watch), - } - } -} - - diff --git a/sdks/full/rust-cli/src/models/identity_list_friends_response.rs b/sdks/full/rust-cli/src/models/identity_list_friends_response.rs deleted file mode 100644 index b4a5290915..0000000000 --- a/sdks/full/rust-cli/src/models/identity_list_friends_response.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct IdentityListFriendsResponse { - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - #[serde(rename = "identities")] - pub identities: Vec, - #[serde(rename = "watch")] - pub watch: Box, -} - -impl IdentityListFriendsResponse { - pub fn new(identities: Vec, watch: crate::models::WatchResponse) -> IdentityListFriendsResponse { - IdentityListFriendsResponse { - anchor: None, - identities, - watch: Box::new(watch), - } - } -} - - diff --git a/sdks/full/rust-cli/src/models/identity_list_mutual_friends_response.rs b/sdks/full/rust-cli/src/models/identity_list_mutual_friends_response.rs deleted file mode 100644 index 3be3871b74..0000000000 --- a/sdks/full/rust-cli/src/models/identity_list_mutual_friends_response.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct IdentityListMutualFriendsResponse { - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - #[serde(rename = "identities")] - pub identities: Vec, -} - -impl IdentityListMutualFriendsResponse { - pub fn new(identities: Vec) -> IdentityListMutualFriendsResponse { - IdentityListMutualFriendsResponse { - anchor: None, - identities, - } - } -} - - diff --git a/sdks/full/rust-cli/src/models/identity_list_recent_followers_response.rs b/sdks/full/rust-cli/src/models/identity_list_recent_followers_response.rs deleted file mode 100644 index d6990968f1..0000000000 --- a/sdks/full/rust-cli/src/models/identity_list_recent_followers_response.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct IdentityListRecentFollowersResponse { - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - #[serde(rename = "identities")] - pub identities: Vec, - #[serde(rename = "watch")] - pub watch: Box, -} - -impl IdentityListRecentFollowersResponse { - pub fn new(identities: Vec, watch: crate::models::WatchResponse) -> IdentityListRecentFollowersResponse { - IdentityListRecentFollowersResponse { - anchor: None, - identities, - watch: Box::new(watch), - } - } -} - - diff --git a/sdks/full/rust-cli/src/models/identity_prepare_game_link_response.rs b/sdks/full/rust-cli/src/models/identity_prepare_game_link_response.rs deleted file mode 100644 index cd0b41ea9d..0000000000 --- a/sdks/full/rust-cli/src/models/identity_prepare_game_link_response.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct IdentityPrepareGameLinkResponse { - /// RFC3339 timestamp - #[serde(rename = "expire_ts")] - pub expire_ts: String, - /// Pass this to `GetGameLink` to get the linking status. Valid for 15 minutes. - #[serde(rename = "identity_link_token")] - pub identity_link_token: String, - #[serde(rename = "identity_link_url")] - pub identity_link_url: String, -} - -impl IdentityPrepareGameLinkResponse { - pub fn new(expire_ts: String, identity_link_token: String, identity_link_url: String) -> IdentityPrepareGameLinkResponse { - IdentityPrepareGameLinkResponse { - expire_ts, - identity_link_token, - identity_link_url, - } - } -} - - diff --git a/sdks/full/rust-cli/src/models/identity_report_request.rs b/sdks/full/rust-cli/src/models/identity_report_request.rs deleted file mode 100644 index 01b6e025a0..0000000000 --- a/sdks/full/rust-cli/src/models/identity_report_request.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct IdentityReportRequest { - #[serde(rename = "reason", skip_serializing_if = "Option::is_none")] - pub reason: Option, -} - -impl IdentityReportRequest { - pub fn new() -> IdentityReportRequest { - IdentityReportRequest { - reason: None, - } - } -} - - diff --git a/sdks/full/rust-cli/src/models/identity_search_response.rs b/sdks/full/rust-cli/src/models/identity_search_response.rs deleted file mode 100644 index 32036502a4..0000000000 --- a/sdks/full/rust-cli/src/models/identity_search_response.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct IdentitySearchResponse { - /// The pagination anchor. - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - #[serde(rename = "identities")] - pub identities: Vec, -} - -impl IdentitySearchResponse { - pub fn new(identities: Vec) -> IdentitySearchResponse { - IdentitySearchResponse { - anchor: None, - identities, - } - } -} - - diff --git a/sdks/full/rust-cli/src/models/kv_entry.rs b/sdks/full/rust-cli/src/models/kv_entry.rs deleted file mode 100644 index 6d9e82a460..0000000000 --- a/sdks/full/rust-cli/src/models/kv_entry.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -/// KvEntry : A key-value entry. - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct KvEntry { - #[serde(rename = "deleted", skip_serializing_if = "Option::is_none")] - pub deleted: Option, - /// A string representing a key in the key-value database. Maximum length of 512 characters. _Recommended Key Path Format_ Key path components are split by a slash (e.g. `a/b/c` has the path components `[\"a\", \"b\", \"c\"]`). Slashes can be escaped by using a backslash (e.g. `a/b/c/d` has the path components `[\"a\", \"b/c\", \"d\"]`). This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. - #[serde(rename = "key")] - pub key: String, - /// A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. - #[serde(rename = "value", deserialize_with = "Option::deserialize")] - pub value: Option, -} - -impl KvEntry { - /// A key-value entry. - pub fn new(key: String, value: Option) -> KvEntry { - KvEntry { - deleted: None, - key, - value, - } - } -} - - diff --git a/sdks/full/rust-cli/src/models/kv_get_batch_response.rs b/sdks/full/rust-cli/src/models/kv_get_batch_response.rs deleted file mode 100644 index cf0a07971f..0000000000 --- a/sdks/full/rust-cli/src/models/kv_get_batch_response.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct KvGetBatchResponse { - #[serde(rename = "entries")] - pub entries: Vec, - #[serde(rename = "watch")] - pub watch: Box, -} - -impl KvGetBatchResponse { - pub fn new(entries: Vec, watch: crate::models::WatchResponse) -> KvGetBatchResponse { - KvGetBatchResponse { - entries, - watch: Box::new(watch), - } - } -} - - diff --git a/sdks/full/rust-cli/src/models/kv_get_response.rs b/sdks/full/rust-cli/src/models/kv_get_response.rs deleted file mode 100644 index 9386defb05..0000000000 --- a/sdks/full/rust-cli/src/models/kv_get_response.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct KvGetResponse { - /// Whether or not the entry has been deleted. Only set when watching this endpoint. - #[serde(rename = "deleted", skip_serializing_if = "Option::is_none")] - pub deleted: Option, - /// A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. - #[serde(rename = "value", deserialize_with = "Option::deserialize")] - pub value: Option, - #[serde(rename = "watch")] - pub watch: Box, -} - -impl KvGetResponse { - pub fn new(value: Option, watch: crate::models::WatchResponse) -> KvGetResponse { - KvGetResponse { - deleted: None, - value, - watch: Box::new(watch), - } - } -} - - diff --git a/sdks/full/rust-cli/src/models/kv_put_batch_request.rs b/sdks/full/rust-cli/src/models/kv_put_batch_request.rs deleted file mode 100644 index 2bac4cf812..0000000000 --- a/sdks/full/rust-cli/src/models/kv_put_batch_request.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct KvPutBatchRequest { - #[serde(rename = "entries")] - pub entries: Vec, - #[serde(rename = "namespace_id", skip_serializing_if = "Option::is_none")] - pub namespace_id: Option, -} - -impl KvPutBatchRequest { - pub fn new(entries: Vec) -> KvPutBatchRequest { - KvPutBatchRequest { - entries, - namespace_id: None, - } - } -} - - diff --git a/sdks/full/rust-cli/src/models/kv_put_entry.rs b/sdks/full/rust-cli/src/models/kv_put_entry.rs deleted file mode 100644 index 9d6ad9230e..0000000000 --- a/sdks/full/rust-cli/src/models/kv_put_entry.rs +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -/// KvPutEntry : A new entry to insert into the key-value database. - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct KvPutEntry { - /// A string representing a key in the key-value database. Maximum length of 512 characters. _Recommended Key Path Format_ Key path components are split by a slash (e.g. `a/b/c` has the path components `[\"a\", \"b\", \"c\"]`). Slashes can be escaped by using a backslash (e.g. `a/b/c/d` has the path components `[\"a\", \"b/c\", \"d\"]`). This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. - #[serde(rename = "key")] - pub key: String, - /// A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. - #[serde(rename = "value", deserialize_with = "Option::deserialize")] - pub value: Option, -} - -impl KvPutEntry { - /// A new entry to insert into the key-value database. - pub fn new(key: String, value: Option) -> KvPutEntry { - KvPutEntry { - key, - value, - } - } -} - - diff --git a/sdks/full/rust-cli/src/models/kv_put_request.rs b/sdks/full/rust-cli/src/models/kv_put_request.rs deleted file mode 100644 index d6bac35f58..0000000000 --- a/sdks/full/rust-cli/src/models/kv_put_request.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct KvPutRequest { - /// A string representing a key in the key-value database. Maximum length of 512 characters. _Recommended Key Path Format_ Key path components are split by a slash (e.g. `a/b/c` has the path components `[\"a\", \"b\", \"c\"]`). Slashes can be escaped by using a backslash (e.g. `a/b/c/d` has the path components `[\"a\", \"b/c\", \"d\"]`). This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. - #[serde(rename = "key")] - pub key: String, - #[serde(rename = "namespace_id", skip_serializing_if = "Option::is_none")] - pub namespace_id: Option, - /// A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. - #[serde(rename = "value", deserialize_with = "Option::deserialize")] - pub value: Option, -} - -impl KvPutRequest { - pub fn new(key: String, value: Option) -> KvPutRequest { - KvPutRequest { - key, - namespace_id: None, - value, - } - } -} - - diff --git a/sdks/full/rust-cli/src/models/mod.rs b/sdks/full/rust-cli/src/models/mod.rs index 99e8a25c36..5d45df2d53 100644 --- a/sdks/full/rust-cli/src/models/mod.rs +++ b/sdks/full/rust-cli/src/models/mod.rs @@ -22,6 +22,8 @@ pub mod actor_create_build_response; pub use self::actor_create_build_response::ActorCreateBuildResponse; pub mod actor_datacenter; pub use self::actor_datacenter::ActorDatacenter; +pub mod actor_game_guard_routing; +pub use self::actor_game_guard_routing::ActorGameGuardRouting; pub mod actor_get_actor_logs_response; pub use self::actor_get_actor_logs_response::ActorGetActorLogsResponse; pub mod actor_get_actor_response; @@ -46,8 +48,12 @@ pub mod actor_patch_build_tags_request; pub use self::actor_patch_build_tags_request::ActorPatchBuildTagsRequest; pub mod actor_port; pub use self::actor_port::ActorPort; +pub mod actor_port_authorization; +pub use self::actor_port_authorization::ActorPortAuthorization; pub mod actor_port_protocol; pub use self::actor_port_protocol::ActorPortProtocol; +pub mod actor_port_query_authorization; +pub use self::actor_port_query_authorization::ActorPortQueryAuthorization; pub mod actor_port_routing; pub use self::actor_port_routing::ActorPortRouting; pub mod actor_resources; @@ -488,8 +494,6 @@ pub mod group_publicity; pub use self::group_publicity::GroupPublicity; pub mod group_resolve_join_request_request; pub use self::group_resolve_join_request_request::GroupResolveJoinRequestRequest; -pub mod group_search_response; -pub use self::group_search_response::GroupSearchResponse; pub mod group_summary; pub use self::group_summary::GroupSummary; pub mod group_transfer_ownership_request; @@ -502,10 +506,6 @@ pub mod group_validate_profile_response; pub use self::group_validate_profile_response::GroupValidateProfileResponse; pub mod identity_access_token_linked_account; pub use self::identity_access_token_linked_account::IdentityAccessTokenLinkedAccount; -pub mod identity_cancel_game_link_request; -pub use self::identity_cancel_game_link_request::IdentityCancelGameLinkRequest; -pub mod identity_complete_game_link_request; -pub use self::identity_complete_game_link_request::IdentityCompleteGameLinkRequest; pub mod identity_dev_state; pub use self::identity_dev_state::IdentityDevState; pub mod identity_email_linked_account; @@ -516,10 +516,6 @@ pub mod identity_game_activity; pub use self::identity_game_activity::IdentityGameActivity; pub mod identity_game_link_status; pub use self::identity_game_link_status::IdentityGameLinkStatus; -pub mod identity_get_game_link_new_identity; -pub use self::identity_get_game_link_new_identity::IdentityGetGameLinkNewIdentity; -pub mod identity_get_game_link_response; -pub use self::identity_get_game_link_response::IdentityGetGameLinkResponse; pub mod identity_get_handles_response; pub use self::identity_get_handles_response::IdentityGetHandlesResponse; pub mod identity_get_profile_response; @@ -532,8 +528,6 @@ pub mod identity_global_event_identity_update; pub use self::identity_global_event_identity_update::IdentityGlobalEventIdentityUpdate; pub mod identity_global_event_kind; pub use self::identity_global_event_kind::IdentityGlobalEventKind; -pub mod identity_global_event_matchmaker_lobby_join; -pub use self::identity_global_event_matchmaker_lobby_join::IdentityGlobalEventMatchmakerLobbyJoin; pub mod identity_global_event_notification; pub use self::identity_global_event_notification::IdentityGlobalEventNotification; pub mod identity_group; @@ -544,28 +538,12 @@ pub mod identity_linked_account; pub use self::identity_linked_account::IdentityLinkedAccount; pub mod identity_list_activities_response; pub use self::identity_list_activities_response::IdentityListActivitiesResponse; -pub mod identity_list_followers_response; -pub use self::identity_list_followers_response::IdentityListFollowersResponse; -pub mod identity_list_following_response; -pub use self::identity_list_following_response::IdentityListFollowingResponse; -pub mod identity_list_friends_response; -pub use self::identity_list_friends_response::IdentityListFriendsResponse; -pub mod identity_list_mutual_friends_response; -pub use self::identity_list_mutual_friends_response::IdentityListMutualFriendsResponse; -pub mod identity_list_recent_followers_response; -pub use self::identity_list_recent_followers_response::IdentityListRecentFollowersResponse; pub mod identity_prepare_avatar_upload_request; pub use self::identity_prepare_avatar_upload_request::IdentityPrepareAvatarUploadRequest; pub mod identity_prepare_avatar_upload_response; pub use self::identity_prepare_avatar_upload_response::IdentityPrepareAvatarUploadResponse; -pub mod identity_prepare_game_link_response; -pub use self::identity_prepare_game_link_response::IdentityPrepareGameLinkResponse; pub mod identity_profile; pub use self::identity_profile::IdentityProfile; -pub mod identity_report_request; -pub use self::identity_report_request::IdentityReportRequest; -pub mod identity_search_response; -pub use self::identity_search_response::IdentitySearchResponse; pub mod identity_set_game_activity_request; pub use self::identity_set_game_activity_request::IdentitySetGameActivityRequest; pub mod identity_setup_request; @@ -588,20 +566,6 @@ pub mod identity_validate_profile_response; pub use self::identity_validate_profile_response::IdentityValidateProfileResponse; pub mod identity_watch_events_response; pub use self::identity_watch_events_response::IdentityWatchEventsResponse; -pub mod kv_entry; -pub use self::kv_entry::KvEntry; -pub mod kv_get_batch_response; -pub use self::kv_get_batch_response::KvGetBatchResponse; -pub mod kv_get_response; -pub use self::kv_get_response::KvGetResponse; -pub mod kv_list_response; -pub use self::kv_list_response::KvListResponse; -pub mod kv_put_batch_request; -pub use self::kv_put_batch_request::KvPutBatchRequest; -pub mod kv_put_entry; -pub use self::kv_put_entry::KvPutEntry; -pub mod kv_put_request; -pub use self::kv_put_request::KvPutRequest; pub mod matchmaker_create_lobby_response; pub use self::matchmaker_create_lobby_response::MatchmakerCreateLobbyResponse; pub mod matchmaker_custom_lobby_publicity; diff --git a/sdks/full/rust/.openapi-generator/FILES b/sdks/full/rust/.openapi-generator/FILES index 731a8ebfbf..88aedad638 100644 --- a/sdks/full/rust/.openapi-generator/FILES +++ b/sdks/full/rust/.openapi-generator/FILES @@ -18,6 +18,7 @@ docs/ActorCreateBuildRequest.md docs/ActorCreateBuildResponse.md docs/ActorDatacenter.md docs/ActorDatacentersApi.md +docs/ActorGameGuardRouting.md docs/ActorGetActorLogsResponse.md docs/ActorGetActorResponse.md docs/ActorGetBuildResponse.md @@ -31,7 +32,9 @@ docs/ActorNetwork.md docs/ActorNetworkMode.md docs/ActorPatchBuildTagsRequest.md docs/ActorPort.md +docs/ActorPortAuthorization.md docs/ActorPortProtocol.md +docs/ActorPortQueryAuthorization.md docs/ActorPortRouting.md docs/ActorResources.md docs/ActorRuntime.md @@ -280,7 +283,6 @@ docs/GroupPrepareAvatarUploadResponse.md docs/GroupProfile.md docs/GroupPublicity.md docs/GroupResolveJoinRequestRequest.md -docs/GroupSearchResponse.md docs/GroupSummary.md docs/GroupTransferOwnershipRequest.md docs/GroupUpdateProfileRequest.md @@ -289,40 +291,26 @@ docs/GroupValidateProfileResponse.md docs/IdentityAccessTokenLinkedAccount.md docs/IdentityActivitiesApi.md docs/IdentityApi.md -docs/IdentityCancelGameLinkRequest.md -docs/IdentityCompleteGameLinkRequest.md docs/IdentityDevState.md docs/IdentityEmailLinkedAccount.md docs/IdentityEventsApi.md docs/IdentityExternalLinks.md docs/IdentityGameActivity.md docs/IdentityGameLinkStatus.md -docs/IdentityGetGameLinkNewIdentity.md -docs/IdentityGetGameLinkResponse.md docs/IdentityGetHandlesResponse.md docs/IdentityGetProfileResponse.md docs/IdentityGetSummariesResponse.md docs/IdentityGlobalEvent.md docs/IdentityGlobalEventIdentityUpdate.md docs/IdentityGlobalEventKind.md -docs/IdentityGlobalEventMatchmakerLobbyJoin.md docs/IdentityGlobalEventNotification.md docs/IdentityGroup.md docs/IdentityHandle.md docs/IdentityLinkedAccount.md -docs/IdentityLinksApi.md docs/IdentityListActivitiesResponse.md -docs/IdentityListFollowersResponse.md -docs/IdentityListFollowingResponse.md -docs/IdentityListFriendsResponse.md -docs/IdentityListMutualFriendsResponse.md -docs/IdentityListRecentFollowersResponse.md docs/IdentityPrepareAvatarUploadRequest.md docs/IdentityPrepareAvatarUploadResponse.md -docs/IdentityPrepareGameLinkResponse.md docs/IdentityProfile.md -docs/IdentityReportRequest.md -docs/IdentitySearchResponse.md docs/IdentitySetGameActivityRequest.md docs/IdentitySetupRequest.md docs/IdentitySetupResponse.md @@ -335,14 +323,6 @@ docs/IdentityUpdateStatusRequest.md docs/IdentityValidateProfileResponse.md docs/IdentityWatchEventsResponse.md docs/JobRunApi.md -docs/KvApi.md -docs/KvEntry.md -docs/KvGetBatchResponse.md -docs/KvGetResponse.md -docs/KvListResponse.md -docs/KvPutBatchRequest.md -docs/KvPutEntry.md -docs/KvPutRequest.md docs/MatchmakerCreateLobbyResponse.md docs/MatchmakerCustomLobbyPublicity.md docs/MatchmakerFindLobbyResponse.md @@ -419,9 +399,7 @@ src/apis/group_join_requests_api.rs src/apis/identity_activities_api.rs src/apis/identity_api.rs src/apis/identity_events_api.rs -src/apis/identity_links_api.rs src/apis/job_run_api.rs -src/apis/kv_api.rs src/apis/matchmaker_lobbies_api.rs src/apis/matchmaker_players_api.rs src/apis/matchmaker_regions_api.rs @@ -442,6 +420,7 @@ src/models/actor_create_actor_runtime_request.rs src/models/actor_create_build_request.rs src/models/actor_create_build_response.rs src/models/actor_datacenter.rs +src/models/actor_game_guard_routing.rs src/models/actor_get_actor_logs_response.rs src/models/actor_get_actor_response.rs src/models/actor_get_build_response.rs @@ -454,7 +433,9 @@ src/models/actor_network.rs src/models/actor_network_mode.rs src/models/actor_patch_build_tags_request.rs src/models/actor_port.rs +src/models/actor_port_authorization.rs src/models/actor_port_protocol.rs +src/models/actor_port_query_authorization.rs src/models/actor_port_routing.rs src/models/actor_resources.rs src/models/actor_runtime.rs @@ -675,45 +656,31 @@ src/models/group_prepare_avatar_upload_response.rs src/models/group_profile.rs src/models/group_publicity.rs src/models/group_resolve_join_request_request.rs -src/models/group_search_response.rs src/models/group_summary.rs src/models/group_transfer_ownership_request.rs src/models/group_update_profile_request.rs src/models/group_validate_profile_request.rs src/models/group_validate_profile_response.rs src/models/identity_access_token_linked_account.rs -src/models/identity_cancel_game_link_request.rs -src/models/identity_complete_game_link_request.rs src/models/identity_dev_state.rs src/models/identity_email_linked_account.rs src/models/identity_external_links.rs src/models/identity_game_activity.rs src/models/identity_game_link_status.rs -src/models/identity_get_game_link_new_identity.rs -src/models/identity_get_game_link_response.rs src/models/identity_get_handles_response.rs src/models/identity_get_profile_response.rs src/models/identity_get_summaries_response.rs src/models/identity_global_event.rs src/models/identity_global_event_identity_update.rs src/models/identity_global_event_kind.rs -src/models/identity_global_event_matchmaker_lobby_join.rs src/models/identity_global_event_notification.rs src/models/identity_group.rs src/models/identity_handle.rs src/models/identity_linked_account.rs src/models/identity_list_activities_response.rs -src/models/identity_list_followers_response.rs -src/models/identity_list_following_response.rs -src/models/identity_list_friends_response.rs -src/models/identity_list_mutual_friends_response.rs -src/models/identity_list_recent_followers_response.rs src/models/identity_prepare_avatar_upload_request.rs src/models/identity_prepare_avatar_upload_response.rs -src/models/identity_prepare_game_link_response.rs src/models/identity_profile.rs -src/models/identity_report_request.rs -src/models/identity_search_response.rs src/models/identity_set_game_activity_request.rs src/models/identity_setup_request.rs src/models/identity_setup_response.rs @@ -725,13 +692,6 @@ src/models/identity_update_profile_request.rs src/models/identity_update_status_request.rs src/models/identity_validate_profile_response.rs src/models/identity_watch_events_response.rs -src/models/kv_entry.rs -src/models/kv_get_batch_response.rs -src/models/kv_get_response.rs -src/models/kv_list_response.rs -src/models/kv_put_batch_request.rs -src/models/kv_put_entry.rs -src/models/kv_put_request.rs src/models/matchmaker_create_lobby_response.rs src/models/matchmaker_custom_lobby_publicity.rs src/models/matchmaker_find_lobby_response.rs diff --git a/sdks/full/rust/README.md b/sdks/full/rust/README.md index b5878ce8c0..9bc3b8bee3 100644 --- a/sdks/full/rust/README.md +++ b/sdks/full/rust/README.md @@ -116,7 +116,6 @@ Class | Method | HTTP request | Description *GroupApi* | [**group_leave**](docs/GroupApi.md#group_leave) | **POST** /group/groups/{group_id}/leave | *GroupApi* | [**group_list_suggested**](docs/GroupApi.md#group_list_suggested) | **GET** /group/groups | *GroupApi* | [**group_prepare_avatar_upload**](docs/GroupApi.md#group_prepare_avatar_upload) | **POST** /group/groups/avatar-upload/prepare | -*GroupApi* | [**group_search**](docs/GroupApi.md#group_search) | **GET** /group/groups/search | *GroupApi* | [**group_transfer_ownership**](docs/GroupApi.md#group_transfer_ownership) | **POST** /group/groups/{group_id}/transfer-owner | *GroupApi* | [**group_unban_identity**](docs/GroupApi.md#group_unban_identity) | **DELETE** /group/groups/{group_id}/bans/{identity_id} | *GroupApi* | [**group_update_profile**](docs/GroupApi.md#group_update_profile) | **POST** /group/groups/{group_id}/profile | @@ -127,44 +126,23 @@ Class | Method | HTTP request | Description *GroupJoinRequestsApi* | [**group_join_requests_create_join_request**](docs/GroupJoinRequestsApi.md#group_join_requests_create_join_request) | **POST** /group/groups/{group_id}/join-request | *GroupJoinRequestsApi* | [**group_join_requests_resolve_join_request**](docs/GroupJoinRequestsApi.md#group_join_requests_resolve_join_request) | **POST** /group/groups/{group_id}/join-request/{identity_id} | *IdentityApi* | [**identity_complete_avatar_upload**](docs/IdentityApi.md#identity_complete_avatar_upload) | **POST** /identity/identities/avatar-upload/{upload_id}/complete | -*IdentityApi* | [**identity_follow**](docs/IdentityApi.md#identity_follow) | **POST** /identity/identities/{identity_id}/follow | *IdentityApi* | [**identity_get_handles**](docs/IdentityApi.md#identity_get_handles) | **GET** /identity/identities/batch/handle | *IdentityApi* | [**identity_get_profile**](docs/IdentityApi.md#identity_get_profile) | **GET** /identity/identities/{identity_id}/profile | *IdentityApi* | [**identity_get_self_profile**](docs/IdentityApi.md#identity_get_self_profile) | **GET** /identity/identities/self/profile | *IdentityApi* | [**identity_get_summaries**](docs/IdentityApi.md#identity_get_summaries) | **GET** /identity/identities/batch/summary | -*IdentityApi* | [**identity_ignore_recent_follower**](docs/IdentityApi.md#identity_ignore_recent_follower) | **POST** /identity/identities/self/recent-followers/{identity_id}/ignore | -*IdentityApi* | [**identity_list_followers**](docs/IdentityApi.md#identity_list_followers) | **GET** /identity/identities/{identity_id}/followers | -*IdentityApi* | [**identity_list_following**](docs/IdentityApi.md#identity_list_following) | **GET** /identity/identities/{identity_id}/following | -*IdentityApi* | [**identity_list_friends**](docs/IdentityApi.md#identity_list_friends) | **GET** /identity/identities/self/friends | -*IdentityApi* | [**identity_list_mutual_friends**](docs/IdentityApi.md#identity_list_mutual_friends) | **GET** /identity/identities/{identity_id}/mutual-friends | -*IdentityApi* | [**identity_list_recent_followers**](docs/IdentityApi.md#identity_list_recent_followers) | **GET** /identity/identities/self/recent-followers | *IdentityApi* | [**identity_mark_deletion**](docs/IdentityApi.md#identity_mark_deletion) | **POST** /identity/identities/self/delete-request | *IdentityApi* | [**identity_prepare_avatar_upload**](docs/IdentityApi.md#identity_prepare_avatar_upload) | **POST** /identity/identities/avatar-upload/prepare | *IdentityApi* | [**identity_remove_game_activity**](docs/IdentityApi.md#identity_remove_game_activity) | **DELETE** /identity/identities/self/activity | -*IdentityApi* | [**identity_report**](docs/IdentityApi.md#identity_report) | **POST** /identity/identities/{identity_id}/report | -*IdentityApi* | [**identity_search**](docs/IdentityApi.md#identity_search) | **GET** /identity/identities/search | *IdentityApi* | [**identity_set_game_activity**](docs/IdentityApi.md#identity_set_game_activity) | **POST** /identity/identities/self/activity | *IdentityApi* | [**identity_setup**](docs/IdentityApi.md#identity_setup) | **POST** /identity/identities | *IdentityApi* | [**identity_signup_for_beta**](docs/IdentityApi.md#identity_signup_for_beta) | **POST** /identity/identities/self/beta-signup | -*IdentityApi* | [**identity_unfollow**](docs/IdentityApi.md#identity_unfollow) | **DELETE** /identity/identities/{identity_id}/follow | *IdentityApi* | [**identity_unmark_deletion**](docs/IdentityApi.md#identity_unmark_deletion) | **DELETE** /identity/identities/self/delete-request | *IdentityApi* | [**identity_update_profile**](docs/IdentityApi.md#identity_update_profile) | **POST** /identity/identities/self/profile | *IdentityApi* | [**identity_update_status**](docs/IdentityApi.md#identity_update_status) | **POST** /identity/identities/identities/self/status | *IdentityApi* | [**identity_validate_profile**](docs/IdentityApi.md#identity_validate_profile) | **POST** /identity/identities/self/profile/validate | *IdentityActivitiesApi* | [**identity_activities_list**](docs/IdentityActivitiesApi.md#identity_activities_list) | **GET** /identity/activities | *IdentityEventsApi* | [**identity_events_watch**](docs/IdentityEventsApi.md#identity_events_watch) | **GET** /identity/events/live | -*IdentityLinksApi* | [**identity_links_cancel**](docs/IdentityLinksApi.md#identity_links_cancel) | **POST** /identity/game-links/cancel | -*IdentityLinksApi* | [**identity_links_complete**](docs/IdentityLinksApi.md#identity_links_complete) | **POST** /identity/game-links/complete | -*IdentityLinksApi* | [**identity_links_get**](docs/IdentityLinksApi.md#identity_links_get) | **GET** /identity/game-links | -*IdentityLinksApi* | [**identity_links_prepare**](docs/IdentityLinksApi.md#identity_links_prepare) | **POST** /identity/game-links | *JobRunApi* | [**job_run_cleanup**](docs/JobRunApi.md#job_run_cleanup) | **POST** /job/runs/cleanup | -*KvApi* | [**kv_delete**](docs/KvApi.md#kv_delete) | **DELETE** /kv/entries | -*KvApi* | [**kv_delete_batch**](docs/KvApi.md#kv_delete_batch) | **DELETE** /kv/entries/batch | -*KvApi* | [**kv_get**](docs/KvApi.md#kv_get) | **GET** /kv/entries | -*KvApi* | [**kv_get_batch**](docs/KvApi.md#kv_get_batch) | **GET** /kv/entries/batch | -*KvApi* | [**kv_list**](docs/KvApi.md#kv_list) | **GET** /kv/entries/list | -*KvApi* | [**kv_put**](docs/KvApi.md#kv_put) | **PUT** /kv/entries | -*KvApi* | [**kv_put_batch**](docs/KvApi.md#kv_put_batch) | **PUT** /kv/entries/batch | *MatchmakerLobbiesApi* | [**matchmaker_lobbies_create**](docs/MatchmakerLobbiesApi.md#matchmaker_lobbies_create) | **POST** /matchmaker/lobbies/create | *MatchmakerLobbiesApi* | [**matchmaker_lobbies_find**](docs/MatchmakerLobbiesApi.md#matchmaker_lobbies_find) | **POST** /matchmaker/lobbies/find | *MatchmakerLobbiesApi* | [**matchmaker_lobbies_get_state**](docs/MatchmakerLobbiesApi.md#matchmaker_lobbies_get_state) | **GET** /matchmaker/lobbies/{lobby_id}/state | @@ -196,6 +174,7 @@ Class | Method | HTTP request | Description - [ActorCreateBuildRequest](docs/ActorCreateBuildRequest.md) - [ActorCreateBuildResponse](docs/ActorCreateBuildResponse.md) - [ActorDatacenter](docs/ActorDatacenter.md) + - [ActorGameGuardRouting](docs/ActorGameGuardRouting.md) - [ActorGetActorLogsResponse](docs/ActorGetActorLogsResponse.md) - [ActorGetActorResponse](docs/ActorGetActorResponse.md) - [ActorGetBuildResponse](docs/ActorGetBuildResponse.md) @@ -208,7 +187,9 @@ Class | Method | HTTP request | Description - [ActorNetworkMode](docs/ActorNetworkMode.md) - [ActorPatchBuildTagsRequest](docs/ActorPatchBuildTagsRequest.md) - [ActorPort](docs/ActorPort.md) + - [ActorPortAuthorization](docs/ActorPortAuthorization.md) - [ActorPortProtocol](docs/ActorPortProtocol.md) + - [ActorPortQueryAuthorization](docs/ActorPortQueryAuthorization.md) - [ActorPortRouting](docs/ActorPortRouting.md) - [ActorResources](docs/ActorResources.md) - [ActorRuntime](docs/ActorRuntime.md) @@ -429,45 +410,31 @@ Class | Method | HTTP request | Description - [GroupProfile](docs/GroupProfile.md) - [GroupPublicity](docs/GroupPublicity.md) - [GroupResolveJoinRequestRequest](docs/GroupResolveJoinRequestRequest.md) - - [GroupSearchResponse](docs/GroupSearchResponse.md) - [GroupSummary](docs/GroupSummary.md) - [GroupTransferOwnershipRequest](docs/GroupTransferOwnershipRequest.md) - [GroupUpdateProfileRequest](docs/GroupUpdateProfileRequest.md) - [GroupValidateProfileRequest](docs/GroupValidateProfileRequest.md) - [GroupValidateProfileResponse](docs/GroupValidateProfileResponse.md) - [IdentityAccessTokenLinkedAccount](docs/IdentityAccessTokenLinkedAccount.md) - - [IdentityCancelGameLinkRequest](docs/IdentityCancelGameLinkRequest.md) - - [IdentityCompleteGameLinkRequest](docs/IdentityCompleteGameLinkRequest.md) - [IdentityDevState](docs/IdentityDevState.md) - [IdentityEmailLinkedAccount](docs/IdentityEmailLinkedAccount.md) - [IdentityExternalLinks](docs/IdentityExternalLinks.md) - [IdentityGameActivity](docs/IdentityGameActivity.md) - [IdentityGameLinkStatus](docs/IdentityGameLinkStatus.md) - - [IdentityGetGameLinkNewIdentity](docs/IdentityGetGameLinkNewIdentity.md) - - [IdentityGetGameLinkResponse](docs/IdentityGetGameLinkResponse.md) - [IdentityGetHandlesResponse](docs/IdentityGetHandlesResponse.md) - [IdentityGetProfileResponse](docs/IdentityGetProfileResponse.md) - [IdentityGetSummariesResponse](docs/IdentityGetSummariesResponse.md) - [IdentityGlobalEvent](docs/IdentityGlobalEvent.md) - [IdentityGlobalEventIdentityUpdate](docs/IdentityGlobalEventIdentityUpdate.md) - [IdentityGlobalEventKind](docs/IdentityGlobalEventKind.md) - - [IdentityGlobalEventMatchmakerLobbyJoin](docs/IdentityGlobalEventMatchmakerLobbyJoin.md) - [IdentityGlobalEventNotification](docs/IdentityGlobalEventNotification.md) - [IdentityGroup](docs/IdentityGroup.md) - [IdentityHandle](docs/IdentityHandle.md) - [IdentityLinkedAccount](docs/IdentityLinkedAccount.md) - [IdentityListActivitiesResponse](docs/IdentityListActivitiesResponse.md) - - [IdentityListFollowersResponse](docs/IdentityListFollowersResponse.md) - - [IdentityListFollowingResponse](docs/IdentityListFollowingResponse.md) - - [IdentityListFriendsResponse](docs/IdentityListFriendsResponse.md) - - [IdentityListMutualFriendsResponse](docs/IdentityListMutualFriendsResponse.md) - - [IdentityListRecentFollowersResponse](docs/IdentityListRecentFollowersResponse.md) - [IdentityPrepareAvatarUploadRequest](docs/IdentityPrepareAvatarUploadRequest.md) - [IdentityPrepareAvatarUploadResponse](docs/IdentityPrepareAvatarUploadResponse.md) - - [IdentityPrepareGameLinkResponse](docs/IdentityPrepareGameLinkResponse.md) - [IdentityProfile](docs/IdentityProfile.md) - - [IdentityReportRequest](docs/IdentityReportRequest.md) - - [IdentitySearchResponse](docs/IdentitySearchResponse.md) - [IdentitySetGameActivityRequest](docs/IdentitySetGameActivityRequest.md) - [IdentitySetupRequest](docs/IdentitySetupRequest.md) - [IdentitySetupResponse](docs/IdentitySetupResponse.md) @@ -479,13 +446,6 @@ Class | Method | HTTP request | Description - [IdentityUpdateStatusRequest](docs/IdentityUpdateStatusRequest.md) - [IdentityValidateProfileResponse](docs/IdentityValidateProfileResponse.md) - [IdentityWatchEventsResponse](docs/IdentityWatchEventsResponse.md) - - [KvEntry](docs/KvEntry.md) - - [KvGetBatchResponse](docs/KvGetBatchResponse.md) - - [KvGetResponse](docs/KvGetResponse.md) - - [KvListResponse](docs/KvListResponse.md) - - [KvPutBatchRequest](docs/KvPutBatchRequest.md) - - [KvPutEntry](docs/KvPutEntry.md) - - [KvPutRequest](docs/KvPutRequest.md) - [MatchmakerCreateLobbyResponse](docs/MatchmakerCreateLobbyResponse.md) - [MatchmakerCustomLobbyPublicity](docs/MatchmakerCustomLobbyPublicity.md) - [MatchmakerFindLobbyResponse](docs/MatchmakerFindLobbyResponse.md) diff --git a/sdks/full/rust-cli/docs/IdentityCompleteGameLinkRequest.md b/sdks/full/rust/docs/ActorGameGuardRouting.md similarity index 66% rename from sdks/full/rust-cli/docs/IdentityCompleteGameLinkRequest.md rename to sdks/full/rust/docs/ActorGameGuardRouting.md index 84a2a86451..4e97cd2ecd 100644 --- a/sdks/full/rust-cli/docs/IdentityCompleteGameLinkRequest.md +++ b/sdks/full/rust/docs/ActorGameGuardRouting.md @@ -1,10 +1,10 @@ -# IdentityCompleteGameLinkRequest +# ActorGameGuardRouting ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**identity_link_token** | **String** | Documentation at https://jwt.io/ | +**authorization** | Option<[**crate::models::ActorPortAuthorization**](ActorPortAuthorization.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/full/rust-cli/docs/IdentityListMutualFriendsResponse.md b/sdks/full/rust/docs/ActorPortAuthorization.md similarity index 59% rename from sdks/full/rust-cli/docs/IdentityListMutualFriendsResponse.md rename to sdks/full/rust/docs/ActorPortAuthorization.md index be14e66554..4ba4fa9e78 100644 --- a/sdks/full/rust-cli/docs/IdentityListMutualFriendsResponse.md +++ b/sdks/full/rust/docs/ActorPortAuthorization.md @@ -1,11 +1,11 @@ -# IdentityListMutualFriendsResponse +# ActorPortAuthorization ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**anchor** | Option<**String**> | | [optional] -**identities** | [**Vec**](IdentityHandle.md) | | +**bearer** | Option<**String**> | | [optional] +**query** | Option<[**crate::models::ActorPortQueryAuthorization**](ActorPortQueryAuthorization.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/full/rust/docs/IdentityReportRequest.md b/sdks/full/rust/docs/ActorPortQueryAuthorization.md similarity index 76% rename from sdks/full/rust/docs/IdentityReportRequest.md rename to sdks/full/rust/docs/ActorPortQueryAuthorization.md index d1b3022709..a0d2f11c8a 100644 --- a/sdks/full/rust/docs/IdentityReportRequest.md +++ b/sdks/full/rust/docs/ActorPortQueryAuthorization.md @@ -1,10 +1,11 @@ -# IdentityReportRequest +# ActorPortQueryAuthorization ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**reason** | Option<**String**> | | [optional] +**key** | **String** | | +**value** | **String** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/full/rust/docs/ActorPortRouting.md b/sdks/full/rust/docs/ActorPortRouting.md index 63441ba645..d58785562a 100644 --- a/sdks/full/rust/docs/ActorPortRouting.md +++ b/sdks/full/rust/docs/ActorPortRouting.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**game_guard** | Option<[**serde_json::Value**](.md)> | | [optional] +**game_guard** | Option<[**crate::models::ActorGameGuardRouting**](ActorGameGuardRouting.md)> | | [optional] **host** | Option<[**serde_json::Value**](.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/full/rust/docs/GroupApi.md b/sdks/full/rust/docs/GroupApi.md index b7042992fc..a57a559347 100644 --- a/sdks/full/rust/docs/GroupApi.md +++ b/sdks/full/rust/docs/GroupApi.md @@ -16,7 +16,6 @@ Method | HTTP request | Description [**group_leave**](GroupApi.md#group_leave) | **POST** /group/groups/{group_id}/leave | [**group_list_suggested**](GroupApi.md#group_list_suggested) | **GET** /group/groups | [**group_prepare_avatar_upload**](GroupApi.md#group_prepare_avatar_upload) | **POST** /group/groups/avatar-upload/prepare | -[**group_search**](GroupApi.md#group_search) | **GET** /group/groups/search | [**group_transfer_ownership**](GroupApi.md#group_transfer_ownership) | **POST** /group/groups/{group_id}/transfer-owner | [**group_unban_identity**](GroupApi.md#group_unban_identity) | **DELETE** /group/groups/{group_id}/bans/{identity_id} | [**group_update_profile**](GroupApi.md#group_update_profile) | **POST** /group/groups/{group_id}/profile | @@ -395,38 +394,6 @@ Name | Type | Description | Required | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## group_search - -> crate::models::GroupSearchResponse group_search(query, anchor, limit) - - -Fuzzy search for groups. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**query** | **String** | The query to match group display names against. | [required] | -**anchor** | Option<**String**> | | | -**limit** | Option<**f64**> | Unsigned 32 bit integer. | | - -### Return type - -[**crate::models::GroupSearchResponse**](GroupSearchResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - ## group_transfer_ownership > group_transfer_ownership(group_id, group_transfer_ownership_request) diff --git a/sdks/full/rust/docs/GroupSearchResponse.md b/sdks/full/rust/docs/GroupSearchResponse.md deleted file mode 100644 index d7d5b596e0..0000000000 --- a/sdks/full/rust/docs/GroupSearchResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GroupSearchResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**anchor** | Option<**String**> | | [optional] -**groups** | [**Vec**](GroupHandle.md) | A list of group handles. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust/docs/IdentityApi.md b/sdks/full/rust/docs/IdentityApi.md index ae0d55788f..218946d9c6 100644 --- a/sdks/full/rust/docs/IdentityApi.md +++ b/sdks/full/rust/docs/IdentityApi.md @@ -5,26 +5,16 @@ All URIs are relative to *https://api.rivet.gg* Method | HTTP request | Description ------------- | ------------- | ------------- [**identity_complete_avatar_upload**](IdentityApi.md#identity_complete_avatar_upload) | **POST** /identity/identities/avatar-upload/{upload_id}/complete | -[**identity_follow**](IdentityApi.md#identity_follow) | **POST** /identity/identities/{identity_id}/follow | [**identity_get_handles**](IdentityApi.md#identity_get_handles) | **GET** /identity/identities/batch/handle | [**identity_get_profile**](IdentityApi.md#identity_get_profile) | **GET** /identity/identities/{identity_id}/profile | [**identity_get_self_profile**](IdentityApi.md#identity_get_self_profile) | **GET** /identity/identities/self/profile | [**identity_get_summaries**](IdentityApi.md#identity_get_summaries) | **GET** /identity/identities/batch/summary | -[**identity_ignore_recent_follower**](IdentityApi.md#identity_ignore_recent_follower) | **POST** /identity/identities/self/recent-followers/{identity_id}/ignore | -[**identity_list_followers**](IdentityApi.md#identity_list_followers) | **GET** /identity/identities/{identity_id}/followers | -[**identity_list_following**](IdentityApi.md#identity_list_following) | **GET** /identity/identities/{identity_id}/following | -[**identity_list_friends**](IdentityApi.md#identity_list_friends) | **GET** /identity/identities/self/friends | -[**identity_list_mutual_friends**](IdentityApi.md#identity_list_mutual_friends) | **GET** /identity/identities/{identity_id}/mutual-friends | -[**identity_list_recent_followers**](IdentityApi.md#identity_list_recent_followers) | **GET** /identity/identities/self/recent-followers | [**identity_mark_deletion**](IdentityApi.md#identity_mark_deletion) | **POST** /identity/identities/self/delete-request | [**identity_prepare_avatar_upload**](IdentityApi.md#identity_prepare_avatar_upload) | **POST** /identity/identities/avatar-upload/prepare | [**identity_remove_game_activity**](IdentityApi.md#identity_remove_game_activity) | **DELETE** /identity/identities/self/activity | -[**identity_report**](IdentityApi.md#identity_report) | **POST** /identity/identities/{identity_id}/report | -[**identity_search**](IdentityApi.md#identity_search) | **GET** /identity/identities/search | [**identity_set_game_activity**](IdentityApi.md#identity_set_game_activity) | **POST** /identity/identities/self/activity | [**identity_setup**](IdentityApi.md#identity_setup) | **POST** /identity/identities | [**identity_signup_for_beta**](IdentityApi.md#identity_signup_for_beta) | **POST** /identity/identities/self/beta-signup | -[**identity_unfollow**](IdentityApi.md#identity_unfollow) | **DELETE** /identity/identities/{identity_id}/follow | [**identity_unmark_deletion**](IdentityApi.md#identity_unmark_deletion) | **DELETE** /identity/identities/self/delete-request | [**identity_update_profile**](IdentityApi.md#identity_update_profile) | **POST** /identity/identities/self/profile | [**identity_update_status**](IdentityApi.md#identity_update_status) | **POST** /identity/identities/identities/self/status | @@ -62,36 +52,6 @@ Name | Type | Description | Required | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## identity_follow - -> identity_follow(identity_id) - - -Follows the given identity. In order for identities to be \"friends\", the other identity has to also follow this identity. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**identity_id** | **uuid::Uuid** | | [required] | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - ## identity_get_handles > crate::models::IdentityGetHandlesResponse identity_get_handles(identity_ids) @@ -213,182 +173,6 @@ Name | Type | Description | Required | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## identity_ignore_recent_follower - -> identity_ignore_recent_follower(identity_id) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**identity_id** | **uuid::Uuid** | | [required] | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## identity_list_followers - -> crate::models::IdentityListFollowersResponse identity_list_followers(identity_id, anchor, limit) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**identity_id** | **uuid::Uuid** | | [required] | -**anchor** | Option<**String**> | | | -**limit** | Option<**String**> | Range is between 1 and 32 (inclusive). | | - -### Return type - -[**crate::models::IdentityListFollowersResponse**](IdentityListFollowersResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## identity_list_following - -> crate::models::IdentityListFollowingResponse identity_list_following(identity_id, anchor, limit) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**identity_id** | **uuid::Uuid** | | [required] | -**anchor** | Option<**String**> | | | -**limit** | Option<**String**> | Range is between 1 and 32 (inclusive). | | - -### Return type - -[**crate::models::IdentityListFollowingResponse**](IdentityListFollowingResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## identity_list_friends - -> crate::models::IdentityListFriendsResponse identity_list_friends(anchor, limit) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**anchor** | Option<**String**> | | | -**limit** | Option<**String**> | Range is between 1 and 32 (inclusive). | | - -### Return type - -[**crate::models::IdentityListFriendsResponse**](IdentityListFriendsResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## identity_list_mutual_friends - -> crate::models::IdentityListMutualFriendsResponse identity_list_mutual_friends(identity_id, anchor, limit) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**identity_id** | **uuid::Uuid** | | [required] | -**anchor** | Option<**String**> | | | -**limit** | Option<**String**> | Range is between 1 and 32 (inclusive). | | - -### Return type - -[**crate::models::IdentityListMutualFriendsResponse**](IdentityListMutualFriendsResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## identity_list_recent_followers - -> crate::models::IdentityListRecentFollowersResponse identity_list_recent_followers(count, watch_index) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**count** | Option<**i32**> | | | -**watch_index** | Option<**String**> | | | - -### Return type - -[**crate::models::IdentityListRecentFollowersResponse**](IdentityListRecentFollowersResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - ## identity_mark_deletion > identity_mark_deletion() @@ -471,69 +255,6 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## identity_report - -> identity_report(identity_id, identity_report_request) - - -Creates an abuse report for an identity. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**identity_id** | **uuid::Uuid** | | [required] | -**identity_report_request** | [**IdentityReportRequest**](IdentityReportRequest.md) | | [required] | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## identity_search - -> crate::models::IdentitySearchResponse identity_search(query, anchor, limit) - - -Fuzzy search for identities. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**query** | **String** | The query to match identity display names and account numbers against. | [required] | -**anchor** | Option<**String**> | How many identities to offset the search by. | | -**limit** | Option<**i32**> | Amount of identities to return. Must be between 1 and 32 inclusive. | | - -### Return type - -[**crate::models::IdentitySearchResponse**](IdentitySearchResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - ## identity_set_game_activity > identity_set_game_activity(identity_set_game_activity_request) @@ -624,36 +345,6 @@ Name | Type | Description | Required | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## identity_unfollow - -> identity_unfollow(identity_id) - - -Unfollows the given identity. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**identity_id** | **uuid::Uuid** | | [required] | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - ## identity_unmark_deletion > identity_unmark_deletion() diff --git a/sdks/full/rust/docs/IdentityCancelGameLinkRequest.md b/sdks/full/rust/docs/IdentityCancelGameLinkRequest.md deleted file mode 100644 index fdc38ee3db..0000000000 --- a/sdks/full/rust/docs/IdentityCancelGameLinkRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# IdentityCancelGameLinkRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**identity_link_token** | **String** | Documentation at https://jwt.io/ | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust/docs/IdentityCompleteGameLinkRequest.md b/sdks/full/rust/docs/IdentityCompleteGameLinkRequest.md deleted file mode 100644 index 84a2a86451..0000000000 --- a/sdks/full/rust/docs/IdentityCompleteGameLinkRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# IdentityCompleteGameLinkRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**identity_link_token** | **String** | Documentation at https://jwt.io/ | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust/docs/IdentityGetGameLinkNewIdentity.md b/sdks/full/rust/docs/IdentityGetGameLinkNewIdentity.md deleted file mode 100644 index ca35a6612d..0000000000 --- a/sdks/full/rust/docs/IdentityGetGameLinkNewIdentity.md +++ /dev/null @@ -1,13 +0,0 @@ -# IdentityGetGameLinkNewIdentity - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**identity** | [**crate::models::IdentityProfile**](IdentityProfile.md) | | -**identity_token** | **String** | Documentation at https://jwt.io/ | -**identity_token_expire_ts** | **String** | RFC3339 timestamp | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust/docs/IdentityGetGameLinkResponse.md b/sdks/full/rust/docs/IdentityGetGameLinkResponse.md deleted file mode 100644 index 0c4da269c7..0000000000 --- a/sdks/full/rust/docs/IdentityGetGameLinkResponse.md +++ /dev/null @@ -1,15 +0,0 @@ -# IdentityGetGameLinkResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**current_identity** | [**crate::models::IdentityHandle**](IdentityHandle.md) | | -**game** | [**crate::models::GameHandle**](GameHandle.md) | | -**new_identity** | Option<[**crate::models::IdentityGetGameLinkNewIdentity**](IdentityGetGameLinkNewIdentity.md)> | | [optional] -**status** | [**crate::models::IdentityGameLinkStatus**](IdentityGameLinkStatus.md) | | -**watch** | [**crate::models::WatchResponse**](WatchResponse.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust/docs/IdentityGlobalEventKind.md b/sdks/full/rust/docs/IdentityGlobalEventKind.md index 86d3944414..0acac0e5d1 100644 --- a/sdks/full/rust/docs/IdentityGlobalEventKind.md +++ b/sdks/full/rust/docs/IdentityGlobalEventKind.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **identity_update** | Option<[**crate::models::IdentityGlobalEventIdentityUpdate**](IdentityGlobalEventIdentityUpdate.md)> | | [optional] -**matchmaker_lobby_join** | Option<[**crate::models::IdentityGlobalEventMatchmakerLobbyJoin**](IdentityGlobalEventMatchmakerLobbyJoin.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/full/rust/docs/IdentityGlobalEventMatchmakerLobbyJoin.md b/sdks/full/rust/docs/IdentityGlobalEventMatchmakerLobbyJoin.md deleted file mode 100644 index 3f6fa0a745..0000000000 --- a/sdks/full/rust/docs/IdentityGlobalEventMatchmakerLobbyJoin.md +++ /dev/null @@ -1,13 +0,0 @@ -# IdentityGlobalEventMatchmakerLobbyJoin - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**lobby** | [**crate::models::MatchmakerJoinLobby**](MatchmakerJoinLobby.md) | | -**player** | [**crate::models::MatchmakerJoinPlayer**](MatchmakerJoinPlayer.md) | | -**ports** | [**::std::collections::HashMap**](MatchmakerJoinPort.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust/docs/IdentityLinksApi.md b/sdks/full/rust/docs/IdentityLinksApi.md deleted file mode 100644 index c1988a16f1..0000000000 --- a/sdks/full/rust/docs/IdentityLinksApi.md +++ /dev/null @@ -1,130 +0,0 @@ -# \IdentityLinksApi - -All URIs are relative to *https://api.rivet.gg* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**identity_links_cancel**](IdentityLinksApi.md#identity_links_cancel) | **POST** /identity/game-links/cancel | -[**identity_links_complete**](IdentityLinksApi.md#identity_links_complete) | **POST** /identity/game-links/complete | -[**identity_links_get**](IdentityLinksApi.md#identity_links_get) | **GET** /identity/game-links | -[**identity_links_prepare**](IdentityLinksApi.md#identity_links_prepare) | **POST** /identity/game-links | - - - -## identity_links_cancel - -> identity_links_cancel(identity_cancel_game_link_request) - - -Cancels a game link. It can no longer be used to link after cancellation. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**identity_cancel_game_link_request** | [**IdentityCancelGameLinkRequest**](IdentityCancelGameLinkRequest.md) | | [required] | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## identity_links_complete - -> identity_links_complete(identity_complete_game_link_request) - - -Completes a game link process and returns whether or not the link is valid. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**identity_complete_game_link_request** | [**IdentityCompleteGameLinkRequest**](IdentityCompleteGameLinkRequest.md) | | [required] | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## identity_links_get - -> crate::models::IdentityGetGameLinkResponse identity_links_get(identity_link_token, watch_index) - - -Returns the current status of a linking process. Once `status` is `complete`, the identity's profile should be fetched again since they may have switched accounts. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**identity_link_token** | **String** | | [required] | -**watch_index** | Option<**String**> | | | - -### Return type - -[**crate::models::IdentityGetGameLinkResponse**](IdentityGetGameLinkResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## identity_links_prepare - -> crate::models::IdentityPrepareGameLinkResponse identity_links_prepare() - - -Begins the process for linking an identity with the Rivet Hub. # Importance of Linking Identities When an identity is created via `rivet.api.identity#SetupIdentity`, the identity is temporary and is not shared with other games the user plays. In order to make the identity permanent and synchronize the identity with other games, the identity must be linked with the hub. # Linking Process The linking process works by opening `identity_link_url` in a browser then polling `rivet.api.identity#GetGameLink` to wait for it to complete. This is designed to be as flexible as possible so `identity_link_url` can be opened on any device. For example, when playing a console game, the user can scan a QR code for `identity_link_url` to authenticate on their phone. - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**crate::models::IdentityPrepareGameLinkResponse**](IdentityPrepareGameLinkResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/sdks/full/rust/docs/IdentityListFollowersResponse.md b/sdks/full/rust/docs/IdentityListFollowersResponse.md deleted file mode 100644 index 6a90f8b2fd..0000000000 --- a/sdks/full/rust/docs/IdentityListFollowersResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# IdentityListFollowersResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**anchor** | Option<**String**> | | [optional] -**identities** | [**Vec**](IdentityHandle.md) | | -**watch** | [**crate::models::WatchResponse**](WatchResponse.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust/docs/IdentityListFollowingResponse.md b/sdks/full/rust/docs/IdentityListFollowingResponse.md deleted file mode 100644 index b703055bcb..0000000000 --- a/sdks/full/rust/docs/IdentityListFollowingResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# IdentityListFollowingResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**anchor** | Option<**String**> | | [optional] -**identities** | [**Vec**](IdentityHandle.md) | | -**watch** | [**crate::models::WatchResponse**](WatchResponse.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust/docs/IdentityListFriendsResponse.md b/sdks/full/rust/docs/IdentityListFriendsResponse.md deleted file mode 100644 index 7b35a28472..0000000000 --- a/sdks/full/rust/docs/IdentityListFriendsResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# IdentityListFriendsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**anchor** | Option<**String**> | | [optional] -**identities** | [**Vec**](IdentityHandle.md) | | -**watch** | [**crate::models::WatchResponse**](WatchResponse.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust/docs/IdentityListMutualFriendsResponse.md b/sdks/full/rust/docs/IdentityListMutualFriendsResponse.md deleted file mode 100644 index be14e66554..0000000000 --- a/sdks/full/rust/docs/IdentityListMutualFriendsResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# IdentityListMutualFriendsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**anchor** | Option<**String**> | | [optional] -**identities** | [**Vec**](IdentityHandle.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust/docs/IdentityListRecentFollowersResponse.md b/sdks/full/rust/docs/IdentityListRecentFollowersResponse.md deleted file mode 100644 index 1c3a279307..0000000000 --- a/sdks/full/rust/docs/IdentityListRecentFollowersResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# IdentityListRecentFollowersResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**anchor** | Option<**String**> | | [optional] -**identities** | [**Vec**](IdentityHandle.md) | | -**watch** | [**crate::models::WatchResponse**](WatchResponse.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust/docs/IdentityPrepareGameLinkResponse.md b/sdks/full/rust/docs/IdentityPrepareGameLinkResponse.md deleted file mode 100644 index dc6cd813f4..0000000000 --- a/sdks/full/rust/docs/IdentityPrepareGameLinkResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# IdentityPrepareGameLinkResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**expire_ts** | **String** | RFC3339 timestamp | -**identity_link_token** | **String** | Pass this to `GetGameLink` to get the linking status. Valid for 15 minutes. | -**identity_link_url** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust/docs/IdentitySearchResponse.md b/sdks/full/rust/docs/IdentitySearchResponse.md deleted file mode 100644 index 38b9698305..0000000000 --- a/sdks/full/rust/docs/IdentitySearchResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# IdentitySearchResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**anchor** | Option<**String**> | The pagination anchor. | [optional] -**identities** | [**Vec**](IdentityHandle.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust/docs/KvApi.md b/sdks/full/rust/docs/KvApi.md deleted file mode 100644 index acb99b4f9d..0000000000 --- a/sdks/full/rust/docs/KvApi.md +++ /dev/null @@ -1,232 +0,0 @@ -# \KvApi - -All URIs are relative to *https://api.rivet.gg* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**kv_delete**](KvApi.md#kv_delete) | **DELETE** /kv/entries | -[**kv_delete_batch**](KvApi.md#kv_delete_batch) | **DELETE** /kv/entries/batch | -[**kv_get**](KvApi.md#kv_get) | **GET** /kv/entries | -[**kv_get_batch**](KvApi.md#kv_get_batch) | **GET** /kv/entries/batch | -[**kv_list**](KvApi.md#kv_list) | **GET** /kv/entries/list | -[**kv_put**](KvApi.md#kv_put) | **PUT** /kv/entries | -[**kv_put_batch**](KvApi.md#kv_put_batch) | **PUT** /kv/entries/batch | - - - -## kv_delete - -> kv_delete(key, namespace_id) - - -Deletes a key-value entry by key. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**key** | **String** | | [required] | -**namespace_id** | Option<**uuid::Uuid**> | | | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## kv_delete_batch - -> kv_delete_batch(keys, namespace_id) - - -Deletes multiple key-value entries by key(s). - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**keys** | **String** | | [required] | -**namespace_id** | Option<**uuid::Uuid**> | | | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## kv_get - -> crate::models::KvGetResponse kv_get(key, watch_index, namespace_id) - - -Returns a specific key-value entry by key. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**key** | **String** | | [required] | -**watch_index** | Option<**String**> | A query parameter denoting the requests watch index. | | -**namespace_id** | Option<**uuid::Uuid**> | | | - -### Return type - -[**crate::models::KvGetResponse**](KvGetResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## kv_get_batch - -> crate::models::KvGetBatchResponse kv_get_batch(keys, watch_index, namespace_id) - - -Gets multiple key-value entries by key(s). - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**keys** | **String** | | [required] | -**watch_index** | Option<**String**> | A query parameter denoting the requests watch index. | | -**namespace_id** | Option<**uuid::Uuid**> | | | - -### Return type - -[**crate::models::KvGetBatchResponse**](KvGetBatchResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## kv_list - -> crate::models::KvListResponse kv_list(directory, namespace_id) - - -Lists all keys in a directory. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**directory** | **String** | | [required] | -**namespace_id** | **uuid::Uuid** | | [required] | - -### Return type - -[**crate::models::KvListResponse**](KvListResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## kv_put - -> kv_put(kv_put_request) - - -Puts (sets or overwrites) a key-value entry by key. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**kv_put_request** | [**KvPutRequest**](KvPutRequest.md) | | [required] | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## kv_put_batch - -> kv_put_batch(kv_put_batch_request) - - -Puts (sets or overwrites) multiple key-value entries by key(s). - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**kv_put_batch_request** | [**KvPutBatchRequest**](KvPutBatchRequest.md) | | [required] | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/sdks/full/rust/docs/KvEntry.md b/sdks/full/rust/docs/KvEntry.md deleted file mode 100644 index 203241453f..0000000000 --- a/sdks/full/rust/docs/KvEntry.md +++ /dev/null @@ -1,13 +0,0 @@ -# KvEntry - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**deleted** | Option<**bool**> | | [optional] -**key** | **String** | A string representing a key in the key-value database. Maximum length of 512 characters. _Recommended Key Path Format_ Key path components are split by a slash (e.g. `a/b/c` has the path components `[\"a\", \"b\", \"c\"]`). Slashes can be escaped by using a backslash (e.g. `a/b/c/d` has the path components `[\"a\", \"b/c\", \"d\"]`). This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. | -**value** | Option<[**serde_json::Value**](.md)> | A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust/docs/KvGetBatchResponse.md b/sdks/full/rust/docs/KvGetBatchResponse.md deleted file mode 100644 index 33ecbfdd4e..0000000000 --- a/sdks/full/rust/docs/KvGetBatchResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# KvGetBatchResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**entries** | [**Vec**](KvEntry.md) | | -**watch** | [**crate::models::WatchResponse**](WatchResponse.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust/docs/KvGetResponse.md b/sdks/full/rust/docs/KvGetResponse.md deleted file mode 100644 index 323c9260e4..0000000000 --- a/sdks/full/rust/docs/KvGetResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# KvGetResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**deleted** | Option<**bool**> | Whether or not the entry has been deleted. Only set when watching this endpoint. | [optional] -**value** | Option<[**serde_json::Value**](.md)> | A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. | -**watch** | [**crate::models::WatchResponse**](WatchResponse.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust/docs/KvListResponse.md b/sdks/full/rust/docs/KvListResponse.md deleted file mode 100644 index 2315cef877..0000000000 --- a/sdks/full/rust/docs/KvListResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# KvListResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**entries** | [**Vec**](KvEntry.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust/docs/KvPutBatchRequest.md b/sdks/full/rust/docs/KvPutBatchRequest.md deleted file mode 100644 index 07c4ee6c7c..0000000000 --- a/sdks/full/rust/docs/KvPutBatchRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# KvPutBatchRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**entries** | [**Vec**](KvPutEntry.md) | | -**namespace_id** | Option<[**uuid::Uuid**](uuid::Uuid.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust/docs/KvPutEntry.md b/sdks/full/rust/docs/KvPutEntry.md deleted file mode 100644 index 9e2d465b8c..0000000000 --- a/sdks/full/rust/docs/KvPutEntry.md +++ /dev/null @@ -1,12 +0,0 @@ -# KvPutEntry - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | **String** | A string representing a key in the key-value database. Maximum length of 512 characters. _Recommended Key Path Format_ Key path components are split by a slash (e.g. `a/b/c` has the path components `[\"a\", \"b\", \"c\"]`). Slashes can be escaped by using a backslash (e.g. `a/b/c/d` has the path components `[\"a\", \"b/c\", \"d\"]`). This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. | -**value** | Option<[**serde_json::Value**](.md)> | A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust/docs/KvPutRequest.md b/sdks/full/rust/docs/KvPutRequest.md deleted file mode 100644 index 44af60b311..0000000000 --- a/sdks/full/rust/docs/KvPutRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# KvPutRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | **String** | A string representing a key in the key-value database. Maximum length of 512 characters. _Recommended Key Path Format_ Key path components are split by a slash (e.g. `a/b/c` has the path components `[\"a\", \"b\", \"c\"]`). Slashes can be escaped by using a backslash (e.g. `a/b/c/d` has the path components `[\"a\", \"b/c\", \"d\"]`). This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. | -**namespace_id** | Option<[**uuid::Uuid**](uuid::Uuid.md)> | | [optional] -**value** | Option<[**serde_json::Value**](.md)> | A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/full/rust/src/apis/group_api.rs b/sdks/full/rust/src/apis/group_api.rs index cab1bd763a..a2e46b3ada 100644 --- a/sdks/full/rust/src/apis/group_api.rs +++ b/sdks/full/rust/src/apis/group_api.rs @@ -171,19 +171,6 @@ pub enum GroupPrepareAvatarUploadError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`group_search`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GroupSearchError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - /// struct for typed errors of method [`group_transfer_ownership`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -643,44 +630,6 @@ pub async fn group_prepare_avatar_upload(configuration: &configuration::Configur } } -/// Fuzzy search for groups. -pub async fn group_search(configuration: &configuration::Configuration, query: &str, anchor: Option<&str>, limit: Option) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/group/groups/search", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("query", &query.to_string())]); - if let Some(ref local_var_str) = anchor { - local_var_req_builder = local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - /// Transfers ownership of a group to another identity. pub async fn group_transfer_ownership(configuration: &configuration::Configuration, group_id: &str, group_transfer_ownership_request: crate::models::GroupTransferOwnershipRequest) -> Result<(), Error> { let local_var_configuration = configuration; diff --git a/sdks/full/rust/src/apis/identity_api.rs b/sdks/full/rust/src/apis/identity_api.rs index 15329c2b16..fc7ff309f7 100644 --- a/sdks/full/rust/src/apis/identity_api.rs +++ b/sdks/full/rust/src/apis/identity_api.rs @@ -28,19 +28,6 @@ pub enum IdentityCompleteAvatarUploadError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`identity_follow`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentityFollowError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - /// struct for typed errors of method [`identity_get_handles`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -93,84 +80,6 @@ pub enum IdentityGetSummariesError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`identity_ignore_recent_follower`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentityIgnoreRecentFollowerError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`identity_list_followers`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentityListFollowersError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`identity_list_following`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentityListFollowingError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`identity_list_friends`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentityListFriendsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`identity_list_mutual_friends`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentityListMutualFriendsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`identity_list_recent_followers`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentityListRecentFollowersError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - /// struct for typed errors of method [`identity_mark_deletion`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -210,32 +119,6 @@ pub enum IdentityRemoveGameActivityError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`identity_report`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentityReportError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`identity_search`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentitySearchError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - /// struct for typed errors of method [`identity_set_game_activity`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -275,19 +158,6 @@ pub enum IdentitySignupForBetaError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`identity_unfollow`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentityUnfollowError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - /// struct for typed errors of method [`identity_unmark_deletion`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -372,37 +242,6 @@ pub async fn identity_complete_avatar_upload(configuration: &configuration::Conf } } -/// Follows the given identity. In order for identities to be \"friends\", the other identity has to also follow this identity. -pub async fn identity_follow(configuration: &configuration::Configuration, identity_id: &str) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/{identity_id}/follow", local_var_configuration.base_path, identity_id=crate::apis::urlencode(identity_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - /// Fetches a list of identity handles. pub async fn identity_get_handles(configuration: &configuration::Configuration, identity_ids: &str) -> Result> { let local_var_configuration = configuration; @@ -535,216 +374,6 @@ pub async fn identity_get_summaries(configuration: &configuration::Configuration } } -pub async fn identity_ignore_recent_follower(configuration: &configuration::Configuration, identity_id: &str) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/self/recent-followers/{identity_id}/ignore", local_var_configuration.base_path, identity_id=crate::apis::urlencode(identity_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn identity_list_followers(configuration: &configuration::Configuration, identity_id: &str, anchor: Option<&str>, limit: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/{identity_id}/followers", local_var_configuration.base_path, identity_id=crate::apis::urlencode(identity_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = anchor { - local_var_req_builder = local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn identity_list_following(configuration: &configuration::Configuration, identity_id: &str, anchor: Option<&str>, limit: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/{identity_id}/following", local_var_configuration.base_path, identity_id=crate::apis::urlencode(identity_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = anchor { - local_var_req_builder = local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn identity_list_friends(configuration: &configuration::Configuration, anchor: Option<&str>, limit: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/self/friends", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = anchor { - local_var_req_builder = local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn identity_list_mutual_friends(configuration: &configuration::Configuration, identity_id: &str, anchor: Option<&str>, limit: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/{identity_id}/mutual-friends", local_var_configuration.base_path, identity_id=crate::apis::urlencode(identity_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = anchor { - local_var_req_builder = local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn identity_list_recent_followers(configuration: &configuration::Configuration, count: Option, watch_index: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/self/recent-followers", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = count { - local_var_req_builder = local_var_req_builder.query(&[("count", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - pub async fn identity_mark_deletion(configuration: &configuration::Configuration, ) -> Result<(), Error> { let local_var_configuration = configuration; @@ -838,76 +467,6 @@ pub async fn identity_remove_game_activity(configuration: &configuration::Config } } -/// Creates an abuse report for an identity. -pub async fn identity_report(configuration: &configuration::Configuration, identity_id: &str, identity_report_request: crate::models::IdentityReportRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/{identity_id}/report", local_var_configuration.base_path, identity_id=crate::apis::urlencode(identity_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&identity_report_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Fuzzy search for identities. -pub async fn identity_search(configuration: &configuration::Configuration, query: &str, anchor: Option<&str>, limit: Option) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/search", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("query", &query.to_string())]); - if let Some(ref local_var_str) = anchor { - local_var_req_builder = local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - /// Sets the current identity's game activity. This activity will automatically be removed when the identity goes offline. pub async fn identity_set_game_activity(configuration: &configuration::Configuration, identity_set_game_activity_request: crate::models::IdentitySetGameActivityRequest) -> Result<(), Error> { let local_var_configuration = configuration; @@ -1004,37 +563,6 @@ pub async fn identity_signup_for_beta(configuration: &configuration::Configurati } } -/// Unfollows the given identity. -pub async fn identity_unfollow(configuration: &configuration::Configuration, identity_id: &str) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/{identity_id}/follow", local_var_configuration.base_path, identity_id=crate::apis::urlencode(identity_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - pub async fn identity_unmark_deletion(configuration: &configuration::Configuration, ) -> Result<(), Error> { let local_var_configuration = configuration; diff --git a/sdks/full/rust/src/apis/identity_links_api.rs b/sdks/full/rust/src/apis/identity_links_api.rs deleted file mode 100644 index b15f92bb60..0000000000 --- a/sdks/full/rust/src/apis/identity_links_api.rs +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - -use reqwest; - -use crate::apis::ResponseContent; -use super::{Error, configuration}; - - -/// struct for typed errors of method [`identity_links_cancel`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentityLinksCancelError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`identity_links_complete`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentityLinksCompleteError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`identity_links_get`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentityLinksGetError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`identity_links_prepare`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IdentityLinksPrepareError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - - -/// Cancels a game link. It can no longer be used to link after cancellation. -pub async fn identity_links_cancel(configuration: &configuration::Configuration, identity_cancel_game_link_request: crate::models::IdentityCancelGameLinkRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/game-links/cancel", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&identity_cancel_game_link_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Completes a game link process and returns whether or not the link is valid. -pub async fn identity_links_complete(configuration: &configuration::Configuration, identity_complete_game_link_request: crate::models::IdentityCompleteGameLinkRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/game-links/complete", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&identity_complete_game_link_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Returns the current status of a linking process. Once `status` is `complete`, the identity's profile should be fetched again since they may have switched accounts. -pub async fn identity_links_get(configuration: &configuration::Configuration, identity_link_token: &str, watch_index: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/game-links", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("identity_link_token", &identity_link_token.to_string())]); - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Begins the process for linking an identity with the Rivet Hub. # Importance of Linking Identities When an identity is created via `rivet.api.identity#SetupIdentity`, the identity is temporary and is not shared with other games the user plays. In order to make the identity permanent and synchronize the identity with other games, the identity must be linked with the hub. # Linking Process The linking process works by opening `identity_link_url` in a browser then polling `rivet.api.identity#GetGameLink` to wait for it to complete. This is designed to be as flexible as possible so `identity_link_url` can be opened on any device. For example, when playing a console game, the user can scan a QR code for `identity_link_url` to authenticate on their phone. -pub async fn identity_links_prepare(configuration: &configuration::Configuration, ) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/game-links", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - diff --git a/sdks/full/rust/src/apis/kv_api.rs b/sdks/full/rust/src/apis/kv_api.rs deleted file mode 100644 index e54f756b80..0000000000 --- a/sdks/full/rust/src/apis/kv_api.rs +++ /dev/null @@ -1,352 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - -use reqwest; - -use crate::apis::ResponseContent; -use super::{Error, configuration}; - - -/// struct for typed errors of method [`kv_delete`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum KvDeleteError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`kv_delete_batch`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum KvDeleteBatchError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`kv_get`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum KvGetError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`kv_get_batch`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum KvGetBatchError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`kv_list`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum KvListError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`kv_put`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum KvPutError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`kv_put_batch`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum KvPutBatchError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - - -/// Deletes a key-value entry by key. -pub async fn kv_delete(configuration: &configuration::Configuration, key: &str, namespace_id: Option<&str>) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("key", &key.to_string())]); - if let Some(ref local_var_str) = namespace_id { - local_var_req_builder = local_var_req_builder.query(&[("namespace_id", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Deletes multiple key-value entries by key(s). -pub async fn kv_delete_batch(configuration: &configuration::Configuration, keys: &str, namespace_id: Option<&str>) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries/batch", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("keys", &keys.to_string())]); - if let Some(ref local_var_str) = namespace_id { - local_var_req_builder = local_var_req_builder.query(&[("namespace_id", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Returns a specific key-value entry by key. -pub async fn kv_get(configuration: &configuration::Configuration, key: &str, watch_index: Option<&str>, namespace_id: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("key", &key.to_string())]); - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = namespace_id { - local_var_req_builder = local_var_req_builder.query(&[("namespace_id", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Gets multiple key-value entries by key(s). -pub async fn kv_get_batch(configuration: &configuration::Configuration, keys: &str, watch_index: Option<&str>, namespace_id: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries/batch", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("keys", &keys.to_string())]); - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = namespace_id { - local_var_req_builder = local_var_req_builder.query(&[("namespace_id", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Lists all keys in a directory. -pub async fn kv_list(configuration: &configuration::Configuration, directory: &str, namespace_id: &str) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries/list", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("directory", &directory.to_string())]); - local_var_req_builder = local_var_req_builder.query(&[("namespace_id", &namespace_id.to_string())]); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Puts (sets or overwrites) a key-value entry by key. -pub async fn kv_put(configuration: &configuration::Configuration, kv_put_request: crate::models::KvPutRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&kv_put_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Puts (sets or overwrites) multiple key-value entries by key(s). -pub async fn kv_put_batch(configuration: &configuration::Configuration, kv_put_batch_request: crate::models::KvPutBatchRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries/batch", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&kv_put_batch_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - diff --git a/sdks/full/rust/src/apis/mod.rs b/sdks/full/rust/src/apis/mod.rs index 8925a0d223..addc259a0f 100644 --- a/sdks/full/rust/src/apis/mod.rs +++ b/sdks/full/rust/src/apis/mod.rs @@ -125,9 +125,7 @@ pub mod group_join_requests_api; pub mod identity_api; pub mod identity_activities_api; pub mod identity_events_api; -pub mod identity_links_api; pub mod job_run_api; -pub mod kv_api; pub mod matchmaker_lobbies_api; pub mod matchmaker_players_api; pub mod matchmaker_regions_api; diff --git a/sdks/full/rust/src/models/identity_report_request.rs b/sdks/full/rust/src/models/actor_game_guard_routing.rs similarity index 50% rename from sdks/full/rust/src/models/identity_report_request.rs rename to sdks/full/rust/src/models/actor_game_guard_routing.rs index 01b6e025a0..b1a29406e2 100644 --- a/sdks/full/rust/src/models/identity_report_request.rs +++ b/sdks/full/rust/src/models/actor_game_guard_routing.rs @@ -12,15 +12,15 @@ #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct IdentityReportRequest { - #[serde(rename = "reason", skip_serializing_if = "Option::is_none")] - pub reason: Option, +pub struct ActorGameGuardRouting { + #[serde(rename = "authorization", skip_serializing_if = "Option::is_none")] + pub authorization: Option>, } -impl IdentityReportRequest { - pub fn new() -> IdentityReportRequest { - IdentityReportRequest { - reason: None, +impl ActorGameGuardRouting { + pub fn new() -> ActorGameGuardRouting { + ActorGameGuardRouting { + authorization: None, } } } diff --git a/sdks/full/rust/src/models/actor_port_authorization.rs b/sdks/full/rust/src/models/actor_port_authorization.rs new file mode 100644 index 0000000000..c3962e01ac --- /dev/null +++ b/sdks/full/rust/src/models/actor_port_authorization.rs @@ -0,0 +1,31 @@ +/* + * Rivet API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct ActorPortAuthorization { + #[serde(rename = "bearer", skip_serializing_if = "Option::is_none")] + pub bearer: Option, + #[serde(rename = "query", skip_serializing_if = "Option::is_none")] + pub query: Option>, +} + +impl ActorPortAuthorization { + pub fn new() -> ActorPortAuthorization { + ActorPortAuthorization { + bearer: None, + query: None, + } + } +} + + diff --git a/sdks/full/rust/src/models/actor_port_query_authorization.rs b/sdks/full/rust/src/models/actor_port_query_authorization.rs new file mode 100644 index 0000000000..ea8b447713 --- /dev/null +++ b/sdks/full/rust/src/models/actor_port_query_authorization.rs @@ -0,0 +1,31 @@ +/* + * Rivet API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct ActorPortQueryAuthorization { + #[serde(rename = "key")] + pub key: String, + #[serde(rename = "value")] + pub value: String, +} + +impl ActorPortQueryAuthorization { + pub fn new(key: String, value: String) -> ActorPortQueryAuthorization { + ActorPortQueryAuthorization { + key, + value, + } + } +} + + diff --git a/sdks/full/rust/src/models/actor_port_routing.rs b/sdks/full/rust/src/models/actor_port_routing.rs index ae287481cc..11da800ef7 100644 --- a/sdks/full/rust/src/models/actor_port_routing.rs +++ b/sdks/full/rust/src/models/actor_port_routing.rs @@ -14,7 +14,7 @@ #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ActorPortRouting { #[serde(rename = "game_guard", skip_serializing_if = "Option::is_none")] - pub game_guard: Option, + pub game_guard: Option>, #[serde(rename = "host", skip_serializing_if = "Option::is_none")] pub host: Option, } diff --git a/sdks/full/rust/src/models/group_search_response.rs b/sdks/full/rust/src/models/group_search_response.rs deleted file mode 100644 index 15ddb31984..0000000000 --- a/sdks/full/rust/src/models/group_search_response.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct GroupSearchResponse { - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - /// A list of group handles. - #[serde(rename = "groups")] - pub groups: Vec, -} - -impl GroupSearchResponse { - pub fn new(groups: Vec) -> GroupSearchResponse { - GroupSearchResponse { - anchor: None, - groups, - } - } -} - - diff --git a/sdks/full/rust/src/models/identity_cancel_game_link_request.rs b/sdks/full/rust/src/models/identity_cancel_game_link_request.rs deleted file mode 100644 index 31ed88eb54..0000000000 --- a/sdks/full/rust/src/models/identity_cancel_game_link_request.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct IdentityCancelGameLinkRequest { - /// Documentation at https://jwt.io/ - #[serde(rename = "identity_link_token")] - pub identity_link_token: String, -} - -impl IdentityCancelGameLinkRequest { - pub fn new(identity_link_token: String) -> IdentityCancelGameLinkRequest { - IdentityCancelGameLinkRequest { - identity_link_token, - } - } -} - - diff --git a/sdks/full/rust/src/models/identity_complete_game_link_request.rs b/sdks/full/rust/src/models/identity_complete_game_link_request.rs deleted file mode 100644 index 5b9e67b24a..0000000000 --- a/sdks/full/rust/src/models/identity_complete_game_link_request.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct IdentityCompleteGameLinkRequest { - /// Documentation at https://jwt.io/ - #[serde(rename = "identity_link_token")] - pub identity_link_token: String, -} - -impl IdentityCompleteGameLinkRequest { - pub fn new(identity_link_token: String) -> IdentityCompleteGameLinkRequest { - IdentityCompleteGameLinkRequest { - identity_link_token, - } - } -} - - diff --git a/sdks/full/rust/src/models/identity_get_game_link_new_identity.rs b/sdks/full/rust/src/models/identity_get_game_link_new_identity.rs deleted file mode 100644 index 7b61ef57b3..0000000000 --- a/sdks/full/rust/src/models/identity_get_game_link_new_identity.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct IdentityGetGameLinkNewIdentity { - #[serde(rename = "identity")] - pub identity: Box, - /// Documentation at https://jwt.io/ - #[serde(rename = "identity_token")] - pub identity_token: String, - /// RFC3339 timestamp - #[serde(rename = "identity_token_expire_ts")] - pub identity_token_expire_ts: String, -} - -impl IdentityGetGameLinkNewIdentity { - pub fn new(identity: crate::models::IdentityProfile, identity_token: String, identity_token_expire_ts: String) -> IdentityGetGameLinkNewIdentity { - IdentityGetGameLinkNewIdentity { - identity: Box::new(identity), - identity_token, - identity_token_expire_ts, - } - } -} - - diff --git a/sdks/full/rust/src/models/identity_get_game_link_response.rs b/sdks/full/rust/src/models/identity_get_game_link_response.rs deleted file mode 100644 index fc93492c87..0000000000 --- a/sdks/full/rust/src/models/identity_get_game_link_response.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct IdentityGetGameLinkResponse { - #[serde(rename = "current_identity")] - pub current_identity: Box, - #[serde(rename = "game")] - pub game: Box, - #[serde(rename = "new_identity", skip_serializing_if = "Option::is_none")] - pub new_identity: Option>, - #[serde(rename = "status")] - pub status: crate::models::IdentityGameLinkStatus, - #[serde(rename = "watch")] - pub watch: Box, -} - -impl IdentityGetGameLinkResponse { - pub fn new(current_identity: crate::models::IdentityHandle, game: crate::models::GameHandle, status: crate::models::IdentityGameLinkStatus, watch: crate::models::WatchResponse) -> IdentityGetGameLinkResponse { - IdentityGetGameLinkResponse { - current_identity: Box::new(current_identity), - game: Box::new(game), - new_identity: None, - status, - watch: Box::new(watch), - } - } -} - - diff --git a/sdks/full/rust/src/models/identity_global_event_kind.rs b/sdks/full/rust/src/models/identity_global_event_kind.rs index ccc10bae99..fab257077b 100644 --- a/sdks/full/rust/src/models/identity_global_event_kind.rs +++ b/sdks/full/rust/src/models/identity_global_event_kind.rs @@ -15,15 +15,12 @@ pub struct IdentityGlobalEventKind { #[serde(rename = "identity_update", skip_serializing_if = "Option::is_none")] pub identity_update: Option>, - #[serde(rename = "matchmaker_lobby_join", skip_serializing_if = "Option::is_none")] - pub matchmaker_lobby_join: Option>, } impl IdentityGlobalEventKind { pub fn new() -> IdentityGlobalEventKind { IdentityGlobalEventKind { identity_update: None, - matchmaker_lobby_join: None, } } } diff --git a/sdks/full/rust/src/models/identity_global_event_matchmaker_lobby_join.rs b/sdks/full/rust/src/models/identity_global_event_matchmaker_lobby_join.rs deleted file mode 100644 index ecc1053927..0000000000 --- a/sdks/full/rust/src/models/identity_global_event_matchmaker_lobby_join.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct IdentityGlobalEventMatchmakerLobbyJoin { - #[serde(rename = "lobby")] - pub lobby: Box, - #[serde(rename = "player")] - pub player: Box, - #[serde(rename = "ports")] - pub ports: ::std::collections::HashMap, -} - -impl IdentityGlobalEventMatchmakerLobbyJoin { - pub fn new(lobby: crate::models::MatchmakerJoinLobby, player: crate::models::MatchmakerJoinPlayer, ports: ::std::collections::HashMap) -> IdentityGlobalEventMatchmakerLobbyJoin { - IdentityGlobalEventMatchmakerLobbyJoin { - lobby: Box::new(lobby), - player: Box::new(player), - ports, - } - } -} - - diff --git a/sdks/full/rust/src/models/identity_list_followers_response.rs b/sdks/full/rust/src/models/identity_list_followers_response.rs deleted file mode 100644 index 622fed1cb3..0000000000 --- a/sdks/full/rust/src/models/identity_list_followers_response.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct IdentityListFollowersResponse { - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - #[serde(rename = "identities")] - pub identities: Vec, - #[serde(rename = "watch")] - pub watch: Box, -} - -impl IdentityListFollowersResponse { - pub fn new(identities: Vec, watch: crate::models::WatchResponse) -> IdentityListFollowersResponse { - IdentityListFollowersResponse { - anchor: None, - identities, - watch: Box::new(watch), - } - } -} - - diff --git a/sdks/full/rust/src/models/identity_list_following_response.rs b/sdks/full/rust/src/models/identity_list_following_response.rs deleted file mode 100644 index 1eb3898c72..0000000000 --- a/sdks/full/rust/src/models/identity_list_following_response.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct IdentityListFollowingResponse { - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - #[serde(rename = "identities")] - pub identities: Vec, - #[serde(rename = "watch")] - pub watch: Box, -} - -impl IdentityListFollowingResponse { - pub fn new(identities: Vec, watch: crate::models::WatchResponse) -> IdentityListFollowingResponse { - IdentityListFollowingResponse { - anchor: None, - identities, - watch: Box::new(watch), - } - } -} - - diff --git a/sdks/full/rust/src/models/identity_list_friends_response.rs b/sdks/full/rust/src/models/identity_list_friends_response.rs deleted file mode 100644 index b4a5290915..0000000000 --- a/sdks/full/rust/src/models/identity_list_friends_response.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct IdentityListFriendsResponse { - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - #[serde(rename = "identities")] - pub identities: Vec, - #[serde(rename = "watch")] - pub watch: Box, -} - -impl IdentityListFriendsResponse { - pub fn new(identities: Vec, watch: crate::models::WatchResponse) -> IdentityListFriendsResponse { - IdentityListFriendsResponse { - anchor: None, - identities, - watch: Box::new(watch), - } - } -} - - diff --git a/sdks/full/rust/src/models/identity_list_mutual_friends_response.rs b/sdks/full/rust/src/models/identity_list_mutual_friends_response.rs deleted file mode 100644 index 3be3871b74..0000000000 --- a/sdks/full/rust/src/models/identity_list_mutual_friends_response.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct IdentityListMutualFriendsResponse { - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - #[serde(rename = "identities")] - pub identities: Vec, -} - -impl IdentityListMutualFriendsResponse { - pub fn new(identities: Vec) -> IdentityListMutualFriendsResponse { - IdentityListMutualFriendsResponse { - anchor: None, - identities, - } - } -} - - diff --git a/sdks/full/rust/src/models/identity_list_recent_followers_response.rs b/sdks/full/rust/src/models/identity_list_recent_followers_response.rs deleted file mode 100644 index d6990968f1..0000000000 --- a/sdks/full/rust/src/models/identity_list_recent_followers_response.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct IdentityListRecentFollowersResponse { - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - #[serde(rename = "identities")] - pub identities: Vec, - #[serde(rename = "watch")] - pub watch: Box, -} - -impl IdentityListRecentFollowersResponse { - pub fn new(identities: Vec, watch: crate::models::WatchResponse) -> IdentityListRecentFollowersResponse { - IdentityListRecentFollowersResponse { - anchor: None, - identities, - watch: Box::new(watch), - } - } -} - - diff --git a/sdks/full/rust/src/models/identity_prepare_game_link_response.rs b/sdks/full/rust/src/models/identity_prepare_game_link_response.rs deleted file mode 100644 index cd0b41ea9d..0000000000 --- a/sdks/full/rust/src/models/identity_prepare_game_link_response.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct IdentityPrepareGameLinkResponse { - /// RFC3339 timestamp - #[serde(rename = "expire_ts")] - pub expire_ts: String, - /// Pass this to `GetGameLink` to get the linking status. Valid for 15 minutes. - #[serde(rename = "identity_link_token")] - pub identity_link_token: String, - #[serde(rename = "identity_link_url")] - pub identity_link_url: String, -} - -impl IdentityPrepareGameLinkResponse { - pub fn new(expire_ts: String, identity_link_token: String, identity_link_url: String) -> IdentityPrepareGameLinkResponse { - IdentityPrepareGameLinkResponse { - expire_ts, - identity_link_token, - identity_link_url, - } - } -} - - diff --git a/sdks/full/rust/src/models/identity_search_response.rs b/sdks/full/rust/src/models/identity_search_response.rs deleted file mode 100644 index 32036502a4..0000000000 --- a/sdks/full/rust/src/models/identity_search_response.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct IdentitySearchResponse { - /// The pagination anchor. - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - #[serde(rename = "identities")] - pub identities: Vec, -} - -impl IdentitySearchResponse { - pub fn new(identities: Vec) -> IdentitySearchResponse { - IdentitySearchResponse { - anchor: None, - identities, - } - } -} - - diff --git a/sdks/full/rust/src/models/kv_entry.rs b/sdks/full/rust/src/models/kv_entry.rs deleted file mode 100644 index 6d9e82a460..0000000000 --- a/sdks/full/rust/src/models/kv_entry.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -/// KvEntry : A key-value entry. - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct KvEntry { - #[serde(rename = "deleted", skip_serializing_if = "Option::is_none")] - pub deleted: Option, - /// A string representing a key in the key-value database. Maximum length of 512 characters. _Recommended Key Path Format_ Key path components are split by a slash (e.g. `a/b/c` has the path components `[\"a\", \"b\", \"c\"]`). Slashes can be escaped by using a backslash (e.g. `a/b/c/d` has the path components `[\"a\", \"b/c\", \"d\"]`). This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. - #[serde(rename = "key")] - pub key: String, - /// A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. - #[serde(rename = "value", deserialize_with = "Option::deserialize")] - pub value: Option, -} - -impl KvEntry { - /// A key-value entry. - pub fn new(key: String, value: Option) -> KvEntry { - KvEntry { - deleted: None, - key, - value, - } - } -} - - diff --git a/sdks/full/rust/src/models/kv_get_batch_response.rs b/sdks/full/rust/src/models/kv_get_batch_response.rs deleted file mode 100644 index cf0a07971f..0000000000 --- a/sdks/full/rust/src/models/kv_get_batch_response.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct KvGetBatchResponse { - #[serde(rename = "entries")] - pub entries: Vec, - #[serde(rename = "watch")] - pub watch: Box, -} - -impl KvGetBatchResponse { - pub fn new(entries: Vec, watch: crate::models::WatchResponse) -> KvGetBatchResponse { - KvGetBatchResponse { - entries, - watch: Box::new(watch), - } - } -} - - diff --git a/sdks/full/rust/src/models/kv_get_response.rs b/sdks/full/rust/src/models/kv_get_response.rs deleted file mode 100644 index 9386defb05..0000000000 --- a/sdks/full/rust/src/models/kv_get_response.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct KvGetResponse { - /// Whether or not the entry has been deleted. Only set when watching this endpoint. - #[serde(rename = "deleted", skip_serializing_if = "Option::is_none")] - pub deleted: Option, - /// A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. - #[serde(rename = "value", deserialize_with = "Option::deserialize")] - pub value: Option, - #[serde(rename = "watch")] - pub watch: Box, -} - -impl KvGetResponse { - pub fn new(value: Option, watch: crate::models::WatchResponse) -> KvGetResponse { - KvGetResponse { - deleted: None, - value, - watch: Box::new(watch), - } - } -} - - diff --git a/sdks/full/rust/src/models/kv_list_response.rs b/sdks/full/rust/src/models/kv_list_response.rs deleted file mode 100644 index 25cfadcf4a..0000000000 --- a/sdks/full/rust/src/models/kv_list_response.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct KvListResponse { - #[serde(rename = "entries")] - pub entries: Vec, -} - -impl KvListResponse { - pub fn new(entries: Vec) -> KvListResponse { - KvListResponse { - entries, - } - } -} - - diff --git a/sdks/full/rust/src/models/kv_put_batch_request.rs b/sdks/full/rust/src/models/kv_put_batch_request.rs deleted file mode 100644 index 2bac4cf812..0000000000 --- a/sdks/full/rust/src/models/kv_put_batch_request.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct KvPutBatchRequest { - #[serde(rename = "entries")] - pub entries: Vec, - #[serde(rename = "namespace_id", skip_serializing_if = "Option::is_none")] - pub namespace_id: Option, -} - -impl KvPutBatchRequest { - pub fn new(entries: Vec) -> KvPutBatchRequest { - KvPutBatchRequest { - entries, - namespace_id: None, - } - } -} - - diff --git a/sdks/full/rust/src/models/kv_put_entry.rs b/sdks/full/rust/src/models/kv_put_entry.rs deleted file mode 100644 index 9d6ad9230e..0000000000 --- a/sdks/full/rust/src/models/kv_put_entry.rs +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -/// KvPutEntry : A new entry to insert into the key-value database. - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct KvPutEntry { - /// A string representing a key in the key-value database. Maximum length of 512 characters. _Recommended Key Path Format_ Key path components are split by a slash (e.g. `a/b/c` has the path components `[\"a\", \"b\", \"c\"]`). Slashes can be escaped by using a backslash (e.g. `a/b/c/d` has the path components `[\"a\", \"b/c\", \"d\"]`). This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. - #[serde(rename = "key")] - pub key: String, - /// A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. - #[serde(rename = "value", deserialize_with = "Option::deserialize")] - pub value: Option, -} - -impl KvPutEntry { - /// A new entry to insert into the key-value database. - pub fn new(key: String, value: Option) -> KvPutEntry { - KvPutEntry { - key, - value, - } - } -} - - diff --git a/sdks/full/rust/src/models/kv_put_request.rs b/sdks/full/rust/src/models/kv_put_request.rs deleted file mode 100644 index d6bac35f58..0000000000 --- a/sdks/full/rust/src/models/kv_put_request.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct KvPutRequest { - /// A string representing a key in the key-value database. Maximum length of 512 characters. _Recommended Key Path Format_ Key path components are split by a slash (e.g. `a/b/c` has the path components `[\"a\", \"b\", \"c\"]`). Slashes can be escaped by using a backslash (e.g. `a/b/c/d` has the path components `[\"a\", \"b/c\", \"d\"]`). This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. - #[serde(rename = "key")] - pub key: String, - #[serde(rename = "namespace_id", skip_serializing_if = "Option::is_none")] - pub namespace_id: Option, - /// A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. - #[serde(rename = "value", deserialize_with = "Option::deserialize")] - pub value: Option, -} - -impl KvPutRequest { - pub fn new(key: String, value: Option) -> KvPutRequest { - KvPutRequest { - key, - namespace_id: None, - value, - } - } -} - - diff --git a/sdks/full/rust/src/models/mod.rs b/sdks/full/rust/src/models/mod.rs index 99e8a25c36..5d45df2d53 100644 --- a/sdks/full/rust/src/models/mod.rs +++ b/sdks/full/rust/src/models/mod.rs @@ -22,6 +22,8 @@ pub mod actor_create_build_response; pub use self::actor_create_build_response::ActorCreateBuildResponse; pub mod actor_datacenter; pub use self::actor_datacenter::ActorDatacenter; +pub mod actor_game_guard_routing; +pub use self::actor_game_guard_routing::ActorGameGuardRouting; pub mod actor_get_actor_logs_response; pub use self::actor_get_actor_logs_response::ActorGetActorLogsResponse; pub mod actor_get_actor_response; @@ -46,8 +48,12 @@ pub mod actor_patch_build_tags_request; pub use self::actor_patch_build_tags_request::ActorPatchBuildTagsRequest; pub mod actor_port; pub use self::actor_port::ActorPort; +pub mod actor_port_authorization; +pub use self::actor_port_authorization::ActorPortAuthorization; pub mod actor_port_protocol; pub use self::actor_port_protocol::ActorPortProtocol; +pub mod actor_port_query_authorization; +pub use self::actor_port_query_authorization::ActorPortQueryAuthorization; pub mod actor_port_routing; pub use self::actor_port_routing::ActorPortRouting; pub mod actor_resources; @@ -488,8 +494,6 @@ pub mod group_publicity; pub use self::group_publicity::GroupPublicity; pub mod group_resolve_join_request_request; pub use self::group_resolve_join_request_request::GroupResolveJoinRequestRequest; -pub mod group_search_response; -pub use self::group_search_response::GroupSearchResponse; pub mod group_summary; pub use self::group_summary::GroupSummary; pub mod group_transfer_ownership_request; @@ -502,10 +506,6 @@ pub mod group_validate_profile_response; pub use self::group_validate_profile_response::GroupValidateProfileResponse; pub mod identity_access_token_linked_account; pub use self::identity_access_token_linked_account::IdentityAccessTokenLinkedAccount; -pub mod identity_cancel_game_link_request; -pub use self::identity_cancel_game_link_request::IdentityCancelGameLinkRequest; -pub mod identity_complete_game_link_request; -pub use self::identity_complete_game_link_request::IdentityCompleteGameLinkRequest; pub mod identity_dev_state; pub use self::identity_dev_state::IdentityDevState; pub mod identity_email_linked_account; @@ -516,10 +516,6 @@ pub mod identity_game_activity; pub use self::identity_game_activity::IdentityGameActivity; pub mod identity_game_link_status; pub use self::identity_game_link_status::IdentityGameLinkStatus; -pub mod identity_get_game_link_new_identity; -pub use self::identity_get_game_link_new_identity::IdentityGetGameLinkNewIdentity; -pub mod identity_get_game_link_response; -pub use self::identity_get_game_link_response::IdentityGetGameLinkResponse; pub mod identity_get_handles_response; pub use self::identity_get_handles_response::IdentityGetHandlesResponse; pub mod identity_get_profile_response; @@ -532,8 +528,6 @@ pub mod identity_global_event_identity_update; pub use self::identity_global_event_identity_update::IdentityGlobalEventIdentityUpdate; pub mod identity_global_event_kind; pub use self::identity_global_event_kind::IdentityGlobalEventKind; -pub mod identity_global_event_matchmaker_lobby_join; -pub use self::identity_global_event_matchmaker_lobby_join::IdentityGlobalEventMatchmakerLobbyJoin; pub mod identity_global_event_notification; pub use self::identity_global_event_notification::IdentityGlobalEventNotification; pub mod identity_group; @@ -544,28 +538,12 @@ pub mod identity_linked_account; pub use self::identity_linked_account::IdentityLinkedAccount; pub mod identity_list_activities_response; pub use self::identity_list_activities_response::IdentityListActivitiesResponse; -pub mod identity_list_followers_response; -pub use self::identity_list_followers_response::IdentityListFollowersResponse; -pub mod identity_list_following_response; -pub use self::identity_list_following_response::IdentityListFollowingResponse; -pub mod identity_list_friends_response; -pub use self::identity_list_friends_response::IdentityListFriendsResponse; -pub mod identity_list_mutual_friends_response; -pub use self::identity_list_mutual_friends_response::IdentityListMutualFriendsResponse; -pub mod identity_list_recent_followers_response; -pub use self::identity_list_recent_followers_response::IdentityListRecentFollowersResponse; pub mod identity_prepare_avatar_upload_request; pub use self::identity_prepare_avatar_upload_request::IdentityPrepareAvatarUploadRequest; pub mod identity_prepare_avatar_upload_response; pub use self::identity_prepare_avatar_upload_response::IdentityPrepareAvatarUploadResponse; -pub mod identity_prepare_game_link_response; -pub use self::identity_prepare_game_link_response::IdentityPrepareGameLinkResponse; pub mod identity_profile; pub use self::identity_profile::IdentityProfile; -pub mod identity_report_request; -pub use self::identity_report_request::IdentityReportRequest; -pub mod identity_search_response; -pub use self::identity_search_response::IdentitySearchResponse; pub mod identity_set_game_activity_request; pub use self::identity_set_game_activity_request::IdentitySetGameActivityRequest; pub mod identity_setup_request; @@ -588,20 +566,6 @@ pub mod identity_validate_profile_response; pub use self::identity_validate_profile_response::IdentityValidateProfileResponse; pub mod identity_watch_events_response; pub use self::identity_watch_events_response::IdentityWatchEventsResponse; -pub mod kv_entry; -pub use self::kv_entry::KvEntry; -pub mod kv_get_batch_response; -pub use self::kv_get_batch_response::KvGetBatchResponse; -pub mod kv_get_response; -pub use self::kv_get_response::KvGetResponse; -pub mod kv_list_response; -pub use self::kv_list_response::KvListResponse; -pub mod kv_put_batch_request; -pub use self::kv_put_batch_request::KvPutBatchRequest; -pub mod kv_put_entry; -pub use self::kv_put_entry::KvPutEntry; -pub mod kv_put_request; -pub use self::kv_put_request::KvPutRequest; pub mod matchmaker_create_lobby_response; pub use self::matchmaker_create_lobby_response::MatchmakerCreateLobbyResponse; pub mod matchmaker_custom_lobby_publicity; diff --git a/sdks/full/typescript/archive.tgz b/sdks/full/typescript/archive.tgz index dd168ad838..14fb242de2 100644 --- a/sdks/full/typescript/archive.tgz +++ b/sdks/full/typescript/archive.tgz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d61e1def79943fcb5b1bcba990883bd89eaa8e32b1baaa451e9c3df939fc816d -size 542926 +oid sha256:e5293fb5c90d09571cd8263f1d3d12429abf97e04ce6dd6461e966081bccdae3 +size 529054 diff --git a/sdks/full/typescript/src/Client.ts b/sdks/full/typescript/src/Client.ts index ec9563ffe9..48688da755 100644 --- a/sdks/full/typescript/src/Client.ts +++ b/sdks/full/typescript/src/Client.ts @@ -9,7 +9,6 @@ import { Admin } from "./api/resources/admin/client/Client"; import { Cloud } from "./api/resources/cloud/client/Client"; import { Group } from "./api/resources/group/client/Client"; import { Identity } from "./api/resources/identity/client/Client"; -import { Kv } from "./api/resources/kv/client/Client"; import { Provision } from "./api/resources/provision/client/Client"; import { Auth } from "./api/resources/auth/client/Client"; import { Games } from "./api/resources/games/client/Client"; @@ -67,12 +66,6 @@ export class RivetClient { return (this._identity ??= new Identity(this._options)); } - protected _kv: Kv | undefined; - - public get kv(): Kv { - return (this._kv ??= new Kv(this._options)); - } - protected _provision: Provision | undefined; public get provision(): Provision { diff --git a/sdks/full/typescript/src/api/resources/actor/resources/common/types/GameGuardRouting.ts b/sdks/full/typescript/src/api/resources/actor/resources/common/types/GameGuardRouting.ts index 7c0dd5eba1..09ae9549d4 100644 --- a/sdks/full/typescript/src/api/resources/actor/resources/common/types/GameGuardRouting.ts +++ b/sdks/full/typescript/src/api/resources/actor/resources/common/types/GameGuardRouting.ts @@ -2,4 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -export interface GameGuardRouting {} +import * as Rivet from "../../../../../index"; + +export interface GameGuardRouting { + authorization?: Rivet.actor.PortAuthorization; +} diff --git a/sdks/full/typescript/src/api/resources/actor/resources/common/types/index.ts b/sdks/full/typescript/src/api/resources/actor/resources/common/types/index.ts index 6ec7383456..d33b0c574c 100644 --- a/sdks/full/typescript/src/api/resources/actor/resources/common/types/index.ts +++ b/sdks/full/typescript/src/api/resources/actor/resources/common/types/index.ts @@ -8,6 +8,8 @@ export * from "./Port"; export * from "./PortProtocol"; export * from "./PortRouting"; export * from "./GameGuardRouting"; +export * from "./PortAuthorization"; +export * from "./PortQueryAuthorization"; export * from "./HostRouting"; export * from "./Build"; export * from "./Datacenter"; diff --git a/sdks/full/typescript/src/api/resources/group/client/Client.ts b/sdks/full/typescript/src/api/resources/group/client/Client.ts index 48f80c436a..a987950bd3 100644 --- a/sdks/full/typescript/src/api/resources/group/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/group/client/Client.ts @@ -576,152 +576,6 @@ export class Group { } } - /** - * Fuzzy search for groups. - * - * @param {Rivet.group.SearchRequest} request - * @param {Group.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.group.search({ - * query: "string", - * anchor: "string", - * limit: 1.1 - * }) - */ - public async search( - request: Rivet.group.SearchRequest, - requestOptions?: Group.RequestOptions - ): Promise { - const { query, anchor, limit } = request; - const _queryParams: Record = {}; - _queryParams["query"] = query; - if (anchor != null) { - _queryParams["anchor"] = anchor; - } - - if (limit != null) { - _queryParams["limit"] = limit.toString(); - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - "/group/groups/search" - ), - method: "GET", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - queryParameters: _queryParams, - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return serializers.group.SearchResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - /** * Completes an avatar image upload. Must be called after the file upload * process completes. diff --git a/sdks/full/typescript/src/api/resources/group/client/requests/SearchRequest.ts b/sdks/full/typescript/src/api/resources/group/client/requests/SearchRequest.ts deleted file mode 100644 index 7ea822c96f..0000000000 --- a/sdks/full/typescript/src/api/resources/group/client/requests/SearchRequest.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * query: "string", - * anchor: "string", - * limit: 1.1 - * } - */ -export interface SearchRequest { - /** - * The query to match group display names against. - */ - query: string; - anchor?: string; - /** - * Unsigned 32 bit integer. - */ - limit?: number; -} diff --git a/sdks/full/typescript/src/api/resources/group/client/requests/index.ts b/sdks/full/typescript/src/api/resources/group/client/requests/index.ts index de4b90b874..4420d3df32 100644 --- a/sdks/full/typescript/src/api/resources/group/client/requests/index.ts +++ b/sdks/full/typescript/src/api/resources/group/client/requests/index.ts @@ -1,5 +1,4 @@ export { type ListSuggestedRequest } from "./ListSuggestedRequest"; -export { type SearchRequest } from "./SearchRequest"; export { type GetBansRequest } from "./GetBansRequest"; export { type GetJoinRequestsRequest } from "./GetJoinRequestsRequest"; export { type GetMembersRequest } from "./GetMembersRequest"; diff --git a/sdks/full/typescript/src/api/resources/group/types/SearchResponse.ts b/sdks/full/typescript/src/api/resources/group/types/SearchResponse.ts deleted file mode 100644 index 13a23d784a..0000000000 --- a/sdks/full/typescript/src/api/resources/group/types/SearchResponse.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface SearchResponse { - /** A list of group handles. */ - groups: Rivet.group.Handle[]; - anchor?: string; -} diff --git a/sdks/full/typescript/src/api/resources/group/types/index.ts b/sdks/full/typescript/src/api/resources/group/types/index.ts index 1c7da6f7f8..bbb5c4b821 100644 --- a/sdks/full/typescript/src/api/resources/group/types/index.ts +++ b/sdks/full/typescript/src/api/resources/group/types/index.ts @@ -5,7 +5,6 @@ export * from "./PrepareAvatarUploadRequest"; export * from "./PrepareAvatarUploadResponse"; export * from "./ValidateProfileRequest"; export * from "./ValidateProfileResponse"; -export * from "./SearchResponse"; export * from "./GetBansResponse"; export * from "./GetJoinRequestsResponse"; export * from "./GetMembersResponse"; diff --git a/sdks/full/typescript/src/api/resources/identity/client/Client.ts b/sdks/full/typescript/src/api/resources/identity/client/Client.ts index 5fbfdaf0cf..452c43a915 100644 --- a/sdks/full/typescript/src/api/resources/identity/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/identity/client/Client.ts @@ -10,7 +10,6 @@ import urlJoin from "url-join"; import * as errors from "../../../../errors/index"; import { Activities } from "../resources/activities/client/Client"; import { Events } from "../resources/events/client/Client"; -import { Links } from "../resources/links/client/Client"; export declare namespace Identity { interface Options { @@ -991,152 +990,6 @@ export class Identity { } } - /** - * Fuzzy search for identities. - * - * @param {Rivet.identity.SearchRequest} request - * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.identity.search({ - * query: "string", - * anchor: "string", - * limit: 1 - * }) - */ - public async search( - request: Rivet.identity.SearchRequest, - requestOptions?: Identity.RequestOptions - ): Promise { - const { query, anchor, limit } = request; - const _queryParams: Record = {}; - _queryParams["query"] = query; - if (anchor != null) { - _queryParams["anchor"] = anchor; - } - - if (limit != null) { - _queryParams["limit"] = limit.toString(); - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - "/identity/identities/search" - ), - method: "GET", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - queryParameters: _queryParams, - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return serializers.identity.SearchResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - /** * Sets the current identity's game activity. This activity will automatically be removed when the identity goes offline. * @@ -1520,9 +1373,9 @@ export class Identity { } /** - * Follows the given identity. In order for identities to be "friends", the other identity has to also follow this identity. + * Prepares an avatar image upload. Complete upload with `CompleteIdentityAvatarUpload`. * - * @param {string} identityId + * @param {Rivet.identity.PrepareAvatarUploadRequest} request * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Rivet.InternalError} @@ -1533,13 +1386,20 @@ export class Identity { * @throws {@link Rivet.BadRequestError} * * @example - * await client.identity.follow("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") + * await client.identity.prepareAvatarUpload({ + * path: "string", + * mime: "string", + * contentLength: 1000000 + * }) */ - public async follow(identityId: string, requestOptions?: Identity.RequestOptions): Promise { + public async prepareAvatarUpload( + request: Rivet.identity.PrepareAvatarUploadRequest, + requestOptions?: Identity.RequestOptions + ): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/identity/identities/${encodeURIComponent(identityId)}/follow` + "/identity/identities/avatar-upload/prepare" ), method: "POST", headers: { @@ -1547,12 +1407,21 @@ export class Identity { }, contentType: "application/json", requestType: "json", + body: serializers.identity.PrepareAvatarUploadRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "strip", + }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return; + return serializers.identity.PrepareAvatarUploadResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); } if (_response.error.reason === "status-code") { @@ -1641,9 +1510,9 @@ export class Identity { } /** - * Unfollows the given identity. + * Completes an avatar image upload. Must be called after the file upload process completes. * - * @param {string} identityId + * @param {string} uploadId * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Rivet.InternalError} @@ -1654,15 +1523,15 @@ export class Identity { * @throws {@link Rivet.BadRequestError} * * @example - * await client.identity.unfollow("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") + * await client.identity.completeAvatarUpload("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ - public async unfollow(identityId: string, requestOptions?: Identity.RequestOptions): Promise { + public async completeAvatarUpload(uploadId: string, requestOptions?: Identity.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/identity/identities/${encodeURIComponent(identityId)}/follow` + `/identity/identities/avatar-upload/${encodeURIComponent(uploadId)}/complete` ), - method: "DELETE", + method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, @@ -1762,9 +1631,9 @@ export class Identity { } /** - * Prepares an avatar image upload. Complete upload with `CompleteIdentityAvatarUpload`. + * Completes an avatar image upload. Must be called after the file upload process completes. * - * @param {Rivet.identity.PrepareAvatarUploadRequest} request + * @param {Rivet.identity.SignupForBetaRequest} request * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Rivet.InternalError} @@ -1775,20 +1644,22 @@ export class Identity { * @throws {@link Rivet.BadRequestError} * * @example - * await client.identity.prepareAvatarUpload({ - * path: "string", - * mime: "string", - * contentLength: 1000000 + * await client.identity.signupForBeta({ + * name: "string", + * companyName: "string", + * companySize: "string", + * preferredTools: "string", + * goals: "string" * }) */ - public async prepareAvatarUpload( - request: Rivet.identity.PrepareAvatarUploadRequest, + public async signupForBeta( + request: Rivet.identity.SignupForBetaRequest, requestOptions?: Identity.RequestOptions - ): Promise { + ): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - "/identity/identities/avatar-upload/prepare" + "/identity/identities/self/beta-signup" ), method: "POST", headers: { @@ -1796,21 +1667,13 @@ export class Identity { }, contentType: "application/json", requestType: "json", - body: serializers.identity.PrepareAvatarUploadRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + body: serializers.identity.SignupForBetaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.identity.PrepareAvatarUploadResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return; } if (_response.error.reason === "status-code") { @@ -1899,9 +1762,6 @@ export class Identity { } /** - * Completes an avatar image upload. Must be called after the file upload process completes. - * - * @param {string} uploadId * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Rivet.InternalError} @@ -1912,13 +1772,13 @@ export class Identity { * @throws {@link Rivet.BadRequestError} * * @example - * await client.identity.completeAvatarUpload("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") + * await client.identity.markDeletion() */ - public async completeAvatarUpload(uploadId: string, requestOptions?: Identity.RequestOptions): Promise { + public async markDeletion(requestOptions?: Identity.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/identity/identities/avatar-upload/${encodeURIComponent(uploadId)}/complete` + "/identity/identities/self/delete-request" ), method: "POST", headers: { @@ -2020,9 +1880,6 @@ export class Identity { } /** - * Completes an avatar image upload. Must be called after the file upload process completes. - * - * @param {Rivet.identity.SignupForBetaRequest} request * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Rivet.InternalError} @@ -2033,1225 +1890,15 @@ export class Identity { * @throws {@link Rivet.BadRequestError} * * @example - * await client.identity.signupForBeta({ - * name: "string", - * companyName: "string", - * companySize: "string", - * preferredTools: "string", - * goals: "string" - * }) + * await client.identity.unmarkDeletion() */ - public async signupForBeta( - request: Rivet.identity.SignupForBetaRequest, - requestOptions?: Identity.RequestOptions - ): Promise { + public async unmarkDeletion(requestOptions?: Identity.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - "/identity/identities/self/beta-signup" + "/identity/identities/self/delete-request" ), - method: "POST", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - requestType: "json", - body: serializers.identity.SignupForBetaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * Creates an abuse report for an identity. - * - * @param {string} identityId - * @param {Rivet.identity.ReportRequest} request - * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.identity.report("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { - * reason: "string" - * }) - */ - public async report( - identityId: string, - request: Rivet.identity.ReportRequest = {}, - requestOptions?: Identity.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/identity/identities/${encodeURIComponent(identityId)}/report` - ), - method: "POST", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - requestType: "json", - body: serializers.identity.ReportRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * @param {string} identityId - * @param {Rivet.identity.ListFollowersRequest} request - * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.identity.listFollowers("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { - * anchor: "string", - * limit: "string" - * }) - */ - public async listFollowers( - identityId: string, - request: Rivet.identity.ListFollowersRequest = {}, - requestOptions?: Identity.RequestOptions - ): Promise { - const { anchor, limit } = request; - const _queryParams: Record = {}; - if (anchor != null) { - _queryParams["anchor"] = anchor; - } - - if (limit != null) { - _queryParams["limit"] = limit; - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/identity/identities/${encodeURIComponent(identityId)}/followers` - ), - method: "GET", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - queryParameters: _queryParams, - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return serializers.identity.ListFollowersResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * @param {string} identityId - * @param {Rivet.identity.ListFollowingRequest} request - * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.identity.listFollowing("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { - * anchor: "string", - * limit: "string" - * }) - */ - public async listFollowing( - identityId: string, - request: Rivet.identity.ListFollowingRequest = {}, - requestOptions?: Identity.RequestOptions - ): Promise { - const { anchor, limit } = request; - const _queryParams: Record = {}; - if (anchor != null) { - _queryParams["anchor"] = anchor; - } - - if (limit != null) { - _queryParams["limit"] = limit; - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/identity/identities/${encodeURIComponent(identityId)}/following` - ), - method: "GET", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - queryParameters: _queryParams, - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return serializers.identity.ListFollowingResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * @param {Rivet.identity.ListFriendsRequest} request - * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.identity.listFriends({ - * anchor: "string", - * limit: "string" - * }) - */ - public async listFriends( - request: Rivet.identity.ListFriendsRequest = {}, - requestOptions?: Identity.RequestOptions - ): Promise { - const { anchor, limit } = request; - const _queryParams: Record = {}; - if (anchor != null) { - _queryParams["anchor"] = anchor; - } - - if (limit != null) { - _queryParams["limit"] = limit; - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - "/identity/identities/self/friends" - ), - method: "GET", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - queryParameters: _queryParams, - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return serializers.identity.ListFriendsResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * @param {string} identityId - * @param {Rivet.identity.ListMutualFriendsRequest} request - * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.identity.listMutualFriends("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { - * anchor: "string", - * limit: "string" - * }) - */ - public async listMutualFriends( - identityId: string, - request: Rivet.identity.ListMutualFriendsRequest = {}, - requestOptions?: Identity.RequestOptions - ): Promise { - const { anchor, limit } = request; - const _queryParams: Record = {}; - if (anchor != null) { - _queryParams["anchor"] = anchor; - } - - if (limit != null) { - _queryParams["limit"] = limit; - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/identity/identities/${encodeURIComponent(identityId)}/mutual-friends` - ), - method: "GET", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - queryParameters: _queryParams, - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return serializers.identity.ListMutualFriendsResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * @param {Rivet.identity.ListRecentFollowersRequest} request - * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.identity.listRecentFollowers({ - * count: 1, - * watchIndex: "string" - * }) - */ - public async listRecentFollowers( - request: Rivet.identity.ListRecentFollowersRequest = {}, - requestOptions?: Identity.RequestOptions - ): Promise { - const { count, watchIndex } = request; - const _queryParams: Record = {}; - if (count != null) { - _queryParams["count"] = count.toString(); - } - - if (watchIndex != null) { - _queryParams["watch_index"] = watchIndex; - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - "/identity/identities/self/recent-followers" - ), - method: "GET", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - queryParameters: _queryParams, - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return serializers.identity.ListRecentFollowersResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * @param {string} identityId - * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.identity.ignoreRecentFollower("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") - */ - public async ignoreRecentFollower(identityId: string, requestOptions?: Identity.RequestOptions): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/identity/identities/self/recent-followers/${encodeURIComponent(identityId)}/ignore` - ), - method: "POST", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.identity.markDeletion() - */ - public async markDeletion(requestOptions?: Identity.RequestOptions): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - "/identity/identities/self/delete-request" - ), - method: "POST", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.identity.unmarkDeletion() - */ - public async unmarkDeletion(requestOptions?: Identity.RequestOptions): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - "/identity/identities/self/delete-request" - ), - method: "DELETE", + method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), }, @@ -3362,12 +2009,6 @@ export class Identity { return (this._events ??= new Events(this._options)); } - protected _links: Links | undefined; - - public get links(): Links { - return (this._links ??= new Links(this._options)); - } - protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/ListFollowersRequest.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/ListFollowersRequest.ts deleted file mode 100644 index 945efc9a76..0000000000 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/ListFollowersRequest.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * anchor: "string", - * limit: "string" - * } - */ -export interface ListFollowersRequest { - anchor?: string; - /** - * Range is between 1 and 32 (inclusive). - */ - limit?: string; -} diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/ListFollowingRequest.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/ListFollowingRequest.ts deleted file mode 100644 index 8cb60299a7..0000000000 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/ListFollowingRequest.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * anchor: "string", - * limit: "string" - * } - */ -export interface ListFollowingRequest { - anchor?: string; - /** - * Range is between 1 and 32 (inclusive). - */ - limit?: string; -} diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/ListFriendsRequest.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/ListFriendsRequest.ts deleted file mode 100644 index 83f9c1ee7e..0000000000 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/ListFriendsRequest.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * anchor: "string", - * limit: "string" - * } - */ -export interface ListFriendsRequest { - anchor?: string; - /** - * Range is between 1 and 32 (inclusive). - */ - limit?: string; -} diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/ListMutualFriendsRequest.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/ListMutualFriendsRequest.ts deleted file mode 100644 index db428822c0..0000000000 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/ListMutualFriendsRequest.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * anchor: "string", - * limit: "string" - * } - */ -export interface ListMutualFriendsRequest { - anchor?: string; - /** - * Range is between 1 and 32 (inclusive). - */ - limit?: string; -} diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/ListRecentFollowersRequest.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/ListRecentFollowersRequest.ts deleted file mode 100644 index cb037159b6..0000000000 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/ListRecentFollowersRequest.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../index"; - -/** - * @example - * { - * count: 1, - * watchIndex: "string" - * } - */ -export interface ListRecentFollowersRequest { - count?: number; - watchIndex?: Rivet.WatchQuery | undefined; -} diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/ReportRequest.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/ReportRequest.ts deleted file mode 100644 index 80687e87b4..0000000000 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/ReportRequest.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * reason: "string" - * } - */ -export interface ReportRequest { - reason?: string; -} diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/SearchRequest.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/SearchRequest.ts deleted file mode 100644 index 9a0c9f6bd6..0000000000 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/SearchRequest.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * query: "string", - * anchor: "string", - * limit: 1 - * } - */ -export interface SearchRequest { - /** - * The query to match identity display names and account numbers against. - */ - query: string; - /** - * How many identities to offset the search by. - */ - anchor?: string; - /** - * Amount of identities to return. Must be between 1 and 32 inclusive. - */ - limit?: number; -} diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/index.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/index.ts index bdb301a5fc..def7679850 100644 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/index.ts +++ b/sdks/full/typescript/src/api/resources/identity/client/requests/index.ts @@ -5,14 +5,7 @@ export { type GetHandlesRequest } from "./GetHandlesRequest"; export { type GetSummariesRequest } from "./GetSummariesRequest"; export { type UpdateProfileRequest } from "./UpdateProfileRequest"; export { type ValidateProfileRequest } from "./ValidateProfileRequest"; -export { type SearchRequest } from "./SearchRequest"; export { type SetGameActivityRequest } from "./SetGameActivityRequest"; export { type UpdateStatusRequest } from "./UpdateStatusRequest"; export { type PrepareAvatarUploadRequest } from "./PrepareAvatarUploadRequest"; export { type SignupForBetaRequest } from "./SignupForBetaRequest"; -export { type ReportRequest } from "./ReportRequest"; -export { type ListFollowersRequest } from "./ListFollowersRequest"; -export { type ListFollowingRequest } from "./ListFollowingRequest"; -export { type ListFriendsRequest } from "./ListFriendsRequest"; -export { type ListMutualFriendsRequest } from "./ListMutualFriendsRequest"; -export { type ListRecentFollowersRequest } from "./ListRecentFollowersRequest"; diff --git a/sdks/full/typescript/src/api/resources/identity/resources/common/types/GlobalEventKind.ts b/sdks/full/typescript/src/api/resources/identity/resources/common/types/GlobalEventKind.ts index 63f741dbcc..3d08bc15b4 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/common/types/GlobalEventKind.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/common/types/GlobalEventKind.ts @@ -6,5 +6,4 @@ import * as Rivet from "../../../../../index"; export interface GlobalEventKind { identityUpdate?: Rivet.identity.GlobalEventIdentityUpdate; - matchmakerLobbyJoin?: Rivet.identity.GlobalEventMatchmakerLobbyJoin; } diff --git a/sdks/full/typescript/src/api/resources/identity/resources/common/types/GlobalEventMatchmakerLobbyJoin.ts b/sdks/full/typescript/src/api/resources/identity/resources/common/types/GlobalEventMatchmakerLobbyJoin.ts deleted file mode 100644 index 1841f81bc5..0000000000 --- a/sdks/full/typescript/src/api/resources/identity/resources/common/types/GlobalEventMatchmakerLobbyJoin.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../../index"; - -export interface GlobalEventMatchmakerLobbyJoin { - lobby: Rivet.matchmaker.JoinLobby; - ports: Record; - player: Rivet.matchmaker.JoinPlayer; -} diff --git a/sdks/full/typescript/src/api/resources/identity/resources/common/types/index.ts b/sdks/full/typescript/src/api/resources/identity/resources/common/types/index.ts index 02242e7a8f..e0f5ea54fe 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/common/types/index.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/common/types/index.ts @@ -2,7 +2,6 @@ export * from "./GlobalEvent"; export * from "./GlobalEventKind"; export * from "./GlobalEventNotification"; export * from "./GlobalEventIdentityUpdate"; -export * from "./GlobalEventMatchmakerLobbyJoin"; export * from "./UpdateGameActivity"; export * from "./Handle"; export * from "./Summary"; diff --git a/sdks/full/typescript/src/api/resources/identity/resources/index.ts b/sdks/full/typescript/src/api/resources/identity/resources/index.ts index 441a66503c..6d8e8d453f 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/index.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/index.ts @@ -4,8 +4,5 @@ export * as common from "./common"; export * from "./common/types"; export * as events from "./events"; export * from "./events/types"; -export * as links from "./links"; -export * from "./links/types"; export * from "./activities/client/requests"; export * from "./events/client/requests"; -export * from "./links/client/requests"; diff --git a/sdks/full/typescript/src/api/resources/identity/resources/links/client/Client.ts b/sdks/full/typescript/src/api/resources/identity/resources/links/client/Client.ts deleted file mode 100644 index 9951e3b68e..0000000000 --- a/sdks/full/typescript/src/api/resources/identity/resources/links/client/Client.ts +++ /dev/null @@ -1,578 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as environments from "../../../../../../environments"; -import * as core from "../../../../../../core"; -import * as Rivet from "../../../../../index"; -import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization/index"; -import * as errors from "../../../../../../errors/index"; - -export declare namespace Links { - interface Options { - environment?: core.Supplier; - token?: core.Supplier; - fetcher?: core.FetchFunction; - } - - interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - } -} - -export class Links { - constructor(protected readonly _options: Links.Options = {}) {} - - /** - * Begins the process for linking an identity with the Rivet Hub. - * - * # Importance of Linking Identities - * - * When an identity is created via `rivet.api.identity#SetupIdentity`, the identity is temporary - * and is not shared with other games the user plays. - * In order to make the identity permanent and synchronize the identity with - * other games, the identity must be linked with the hub. - * - * # Linking Process - * - * The linking process works by opening `identity_link_url` in a browser then polling - * `rivet.api.identity#GetGameLink` to wait for it to complete. - * This is designed to be as flexible as possible so `identity_link_url` can be opened - * on any device. For example, when playing a console game, the user can scan a - * QR code for `identity_link_url` to authenticate on their phone. - * - * @param {Links.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.identity.links.prepare() - */ - public async prepare(requestOptions?: Links.RequestOptions): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - "/identity/game-links" - ), - method: "POST", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return serializers.identity.PrepareGameLinkResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * Returns the current status of a linking process. Once `status` is `complete`, the identity's profile should be fetched again since they may have switched accounts. - * - * @param {Rivet.identity.GetGameLinkRequest} request - * @param {Links.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.identity.links.get({ - * identityLinkToken: "string", - * watchIndex: "string" - * }) - */ - public async get( - request: Rivet.identity.GetGameLinkRequest, - requestOptions?: Links.RequestOptions - ): Promise { - const { identityLinkToken, watchIndex } = request; - const _queryParams: Record = {}; - _queryParams["identity_link_token"] = identityLinkToken; - if (watchIndex != null) { - _queryParams["watch_index"] = watchIndex; - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - "/identity/game-links" - ), - method: "GET", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - queryParameters: _queryParams, - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return serializers.identity.GetGameLinkResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * Completes a game link process and returns whether or not the link is valid. - * - * @param {Rivet.identity.CompleteGameLinkRequest} request - * @param {Links.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.identity.links.complete({ - * identityLinkToken: "string" - * }) - */ - public async complete( - request: Rivet.identity.CompleteGameLinkRequest, - requestOptions?: Links.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - "/identity/game-links/complete" - ), - method: "POST", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - requestType: "json", - body: serializers.identity.CompleteGameLinkRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * Cancels a game link. It can no longer be used to link after cancellation. - * - * @param {Rivet.identity.CancelGameLinkRequest} request - * @param {Links.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.identity.links.cancel({ - * identityLinkToken: "string" - * }) - */ - public async cancel( - request: Rivet.identity.CancelGameLinkRequest, - requestOptions?: Links.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - "/identity/game-links/cancel" - ), - method: "POST", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - requestType: "json", - body: serializers.identity.CancelGameLinkRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - protected async _getAuthorizationHeader(): Promise { - const bearer = await core.Supplier.get(this._options.token); - if (bearer != null) { - return `Bearer ${bearer}`; - } - - return undefined; - } -} diff --git a/sdks/full/typescript/src/api/resources/identity/resources/links/client/index.ts b/sdks/full/typescript/src/api/resources/identity/resources/links/client/index.ts deleted file mode 100644 index 415726b7fe..0000000000 --- a/sdks/full/typescript/src/api/resources/identity/resources/links/client/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./requests"; diff --git a/sdks/full/typescript/src/api/resources/identity/resources/links/client/requests/GetGameLinkRequest.ts b/sdks/full/typescript/src/api/resources/identity/resources/links/client/requests/GetGameLinkRequest.ts deleted file mode 100644 index 9229a690ca..0000000000 --- a/sdks/full/typescript/src/api/resources/identity/resources/links/client/requests/GetGameLinkRequest.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../../../index"; - -/** - * @example - * { - * identityLinkToken: "string", - * watchIndex: "string" - * } - */ -export interface GetGameLinkRequest { - identityLinkToken: Rivet.Jwt; - watchIndex?: Rivet.WatchQuery; -} diff --git a/sdks/full/typescript/src/api/resources/identity/resources/links/client/requests/index.ts b/sdks/full/typescript/src/api/resources/identity/resources/links/client/requests/index.ts deleted file mode 100644 index ed39f0a4c8..0000000000 --- a/sdks/full/typescript/src/api/resources/identity/resources/links/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type GetGameLinkRequest } from "./GetGameLinkRequest"; diff --git a/sdks/full/typescript/src/api/resources/identity/resources/links/index.ts b/sdks/full/typescript/src/api/resources/identity/resources/links/index.ts deleted file mode 100644 index c9240f83b4..0000000000 --- a/sdks/full/typescript/src/api/resources/identity/resources/links/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./types"; -export * from "./client"; diff --git a/sdks/full/typescript/src/api/resources/identity/resources/links/types/CancelGameLinkRequest.ts b/sdks/full/typescript/src/api/resources/identity/resources/links/types/CancelGameLinkRequest.ts deleted file mode 100644 index c5d2141b72..0000000000 --- a/sdks/full/typescript/src/api/resources/identity/resources/links/types/CancelGameLinkRequest.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../../index"; - -export interface CancelGameLinkRequest { - identityLinkToken: Rivet.Jwt; -} diff --git a/sdks/full/typescript/src/api/resources/identity/resources/links/types/CompleteGameLinkRequest.ts b/sdks/full/typescript/src/api/resources/identity/resources/links/types/CompleteGameLinkRequest.ts deleted file mode 100644 index 5ac0c83191..0000000000 --- a/sdks/full/typescript/src/api/resources/identity/resources/links/types/CompleteGameLinkRequest.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../../index"; - -export interface CompleteGameLinkRequest { - identityLinkToken: Rivet.Jwt; -} diff --git a/sdks/full/typescript/src/api/resources/identity/resources/links/types/GetGameLinkNewIdentity.ts b/sdks/full/typescript/src/api/resources/identity/resources/links/types/GetGameLinkNewIdentity.ts deleted file mode 100644 index 76ed6bc28c..0000000000 --- a/sdks/full/typescript/src/api/resources/identity/resources/links/types/GetGameLinkNewIdentity.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../../index"; - -export interface GetGameLinkNewIdentity { - identityToken: Rivet.Jwt; - identityTokenExpireTs: Rivet.Timestamp; - identity: Rivet.identity.Profile; -} diff --git a/sdks/full/typescript/src/api/resources/identity/resources/links/types/GetGameLinkResponse.ts b/sdks/full/typescript/src/api/resources/identity/resources/links/types/GetGameLinkResponse.ts deleted file mode 100644 index a5336cddf4..0000000000 --- a/sdks/full/typescript/src/api/resources/identity/resources/links/types/GetGameLinkResponse.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../../index"; - -export interface GetGameLinkResponse { - status: Rivet.identity.GameLinkStatus; - game: Rivet.game.Handle; - currentIdentity: Rivet.identity.Handle; - newIdentity?: Rivet.identity.GetGameLinkNewIdentity; - watch: Rivet.WatchResponse; -} diff --git a/sdks/full/typescript/src/api/resources/identity/resources/links/types/PrepareGameLinkResponse.ts b/sdks/full/typescript/src/api/resources/identity/resources/links/types/PrepareGameLinkResponse.ts deleted file mode 100644 index 97bd70ecdb..0000000000 --- a/sdks/full/typescript/src/api/resources/identity/resources/links/types/PrepareGameLinkResponse.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../../index"; - -export interface PrepareGameLinkResponse { - /** Pass this to `GetGameLink` to get the linking status. Valid for 15 minutes. */ - identityLinkToken: string; - identityLinkUrl: string; - expireTs: Rivet.Timestamp; -} diff --git a/sdks/full/typescript/src/api/resources/identity/resources/links/types/index.ts b/sdks/full/typescript/src/api/resources/identity/resources/links/types/index.ts deleted file mode 100644 index 675bb866ca..0000000000 --- a/sdks/full/typescript/src/api/resources/identity/resources/links/types/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from "./PrepareGameLinkResponse"; -export * from "./GetGameLinkResponse"; -export * from "./GetGameLinkNewIdentity"; -export * from "./CompleteGameLinkRequest"; -export * from "./CancelGameLinkRequest"; diff --git a/sdks/full/typescript/src/api/resources/identity/types/ListFollowersResponse.ts b/sdks/full/typescript/src/api/resources/identity/types/ListFollowersResponse.ts deleted file mode 100644 index e90651ac0b..0000000000 --- a/sdks/full/typescript/src/api/resources/identity/types/ListFollowersResponse.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface ListFollowersResponse { - identities: Rivet.identity.Handle[]; - anchor?: string; - watch: Rivet.WatchResponse; -} diff --git a/sdks/full/typescript/src/api/resources/identity/types/ListFollowingResponse.ts b/sdks/full/typescript/src/api/resources/identity/types/ListFollowingResponse.ts deleted file mode 100644 index b58b7633ab..0000000000 --- a/sdks/full/typescript/src/api/resources/identity/types/ListFollowingResponse.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface ListFollowingResponse { - identities: Rivet.identity.Handle[]; - anchor?: string; - watch: Rivet.WatchResponse; -} diff --git a/sdks/full/typescript/src/api/resources/identity/types/ListFriendsResponse.ts b/sdks/full/typescript/src/api/resources/identity/types/ListFriendsResponse.ts deleted file mode 100644 index 87c12ca58a..0000000000 --- a/sdks/full/typescript/src/api/resources/identity/types/ListFriendsResponse.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface ListFriendsResponse { - identities: Rivet.identity.Handle[]; - anchor?: string; - watch: Rivet.WatchResponse; -} diff --git a/sdks/full/typescript/src/api/resources/identity/types/ListMutualFriendsResponse.ts b/sdks/full/typescript/src/api/resources/identity/types/ListMutualFriendsResponse.ts deleted file mode 100644 index 2ae2cef249..0000000000 --- a/sdks/full/typescript/src/api/resources/identity/types/ListMutualFriendsResponse.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface ListMutualFriendsResponse { - identities: Rivet.identity.Handle[]; - anchor?: string; -} diff --git a/sdks/full/typescript/src/api/resources/identity/types/ListRecentFollowersResponse.ts b/sdks/full/typescript/src/api/resources/identity/types/ListRecentFollowersResponse.ts deleted file mode 100644 index 8d591e4b59..0000000000 --- a/sdks/full/typescript/src/api/resources/identity/types/ListRecentFollowersResponse.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface ListRecentFollowersResponse { - identities: Rivet.identity.Handle[]; - anchor?: string; - watch: Rivet.WatchResponse; -} diff --git a/sdks/full/typescript/src/api/resources/identity/types/SearchResponse.ts b/sdks/full/typescript/src/api/resources/identity/types/SearchResponse.ts deleted file mode 100644 index 81b3e3c382..0000000000 --- a/sdks/full/typescript/src/api/resources/identity/types/SearchResponse.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface SearchResponse { - identities: Rivet.identity.Handle[]; - /** The pagination anchor. */ - anchor?: string; -} diff --git a/sdks/full/typescript/src/api/resources/identity/types/index.ts b/sdks/full/typescript/src/api/resources/identity/types/index.ts index fc0e4d976d..3a4306097a 100644 --- a/sdks/full/typescript/src/api/resources/identity/types/index.ts +++ b/sdks/full/typescript/src/api/resources/identity/types/index.ts @@ -3,10 +3,4 @@ export * from "./GetProfileResponse"; export * from "./GetHandlesResponse"; export * from "./GetSummariesResponse"; export * from "./ValidateProfileResponse"; -export * from "./SearchResponse"; export * from "./PrepareAvatarUploadResponse"; -export * from "./ListFollowersResponse"; -export * from "./ListFollowingResponse"; -export * from "./ListRecentFollowersResponse"; -export * from "./ListFriendsResponse"; -export * from "./ListMutualFriendsResponse"; diff --git a/sdks/full/typescript/src/api/resources/index.ts b/sdks/full/typescript/src/api/resources/index.ts index a1937ff338..ffb6f3510d 100644 --- a/sdks/full/typescript/src/api/resources/index.ts +++ b/sdks/full/typescript/src/api/resources/index.ts @@ -3,7 +3,6 @@ export * as admin from "./admin"; export * as cloud from "./cloud"; export * as group from "./group"; export * as identity from "./identity"; -export * as kv from "./kv"; export * as provision from "./provision"; export * as auth from "./auth"; export * as captcha from "./captcha"; diff --git a/sdks/full/typescript/src/api/resources/kv/client/Client.ts b/sdks/full/typescript/src/api/resources/kv/client/Client.ts deleted file mode 100644 index 7d45a871fa..0000000000 --- a/sdks/full/typescript/src/api/resources/kv/client/Client.ts +++ /dev/null @@ -1,997 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as environments from "../../../../environments"; -import * as core from "../../../../core"; -import * as Rivet from "../../../index"; -import urlJoin from "url-join"; -import * as serializers from "../../../../serialization/index"; -import * as errors from "../../../../errors/index"; - -export declare namespace Kv { - interface Options { - environment?: core.Supplier; - token?: core.Supplier; - fetcher?: core.FetchFunction; - } - - interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - } -} - -export class Kv { - constructor(protected readonly _options: Kv.Options = {}) {} - - /** - * Returns a specific key-value entry by key. - * - * @param {Rivet.kv.GetOperationRequest} request - * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.kv.get({ - * key: "string", - * watchIndex: "string", - * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" - * }) - */ - public async get( - request: Rivet.kv.GetOperationRequest, - requestOptions?: Kv.RequestOptions - ): Promise { - const { key, watchIndex, namespaceId } = request; - const _queryParams: Record = {}; - _queryParams["key"] = key; - if (watchIndex != null) { - _queryParams["watch_index"] = watchIndex; - } - - if (namespaceId != null) { - _queryParams["namespace_id"] = namespaceId; - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - "/kv/entries" - ), - method: "GET", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - queryParameters: _queryParams, - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return serializers.kv.GetResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * Puts (sets or overwrites) a key-value entry by key. - * - * @param {Rivet.kv.PutRequest} request - * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.kv.put({ - * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", - * key: "string", - * value: { - * "key": "value" - * } - * }) - */ - public async put(request: Rivet.kv.PutRequest, requestOptions?: Kv.RequestOptions): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - "/kv/entries" - ), - method: "PUT", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - requestType: "json", - body: serializers.kv.PutRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * Deletes a key-value entry by key. - * - * @param {Rivet.kv.DeleteOperationRequest} request - * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.kv.delete({ - * key: "string", - * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" - * }) - */ - public async delete(request: Rivet.kv.DeleteOperationRequest, requestOptions?: Kv.RequestOptions): Promise { - const { key, namespaceId } = request; - const _queryParams: Record = {}; - _queryParams["key"] = key; - if (namespaceId != null) { - _queryParams["namespace_id"] = namespaceId; - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - "/kv/entries" - ), - method: "DELETE", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - queryParameters: _queryParams, - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * Lists all keys in a directory. - * - * @param {Rivet.kv.ListOperationRequest} request - * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.kv.list({ - * directory: "string", - * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" - * }) - */ - public async list( - request: Rivet.kv.ListOperationRequest, - requestOptions?: Kv.RequestOptions - ): Promise { - const { directory, namespaceId } = request; - const _queryParams: Record = {}; - _queryParams["directory"] = directory; - _queryParams["namespace_id"] = namespaceId; - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - "/kv/entries/list" - ), - method: "GET", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - queryParameters: _queryParams, - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return serializers.kv.ListResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * Gets multiple key-value entries by key(s). - * - * @param {Rivet.kv.GetBatchRequest} request - * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.kv.getBatch({ - * keys: "string", - * watchIndex: "string", - * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" - * }) - */ - public async getBatch( - request: Rivet.kv.GetBatchRequest, - requestOptions?: Kv.RequestOptions - ): Promise { - const { keys, watchIndex, namespaceId } = request; - const _queryParams: Record = {}; - if (Array.isArray(keys)) { - _queryParams["keys"] = keys.map((item) => item); - } else { - _queryParams["keys"] = keys; - } - - if (watchIndex != null) { - _queryParams["watch_index"] = watchIndex; - } - - if (namespaceId != null) { - _queryParams["namespace_id"] = namespaceId; - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - "/kv/entries/batch" - ), - method: "GET", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - queryParameters: _queryParams, - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return serializers.kv.GetBatchResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * Puts (sets or overwrites) multiple key-value entries by key(s). - * - * @param {Rivet.kv.PutBatchRequest} request - * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.kv.putBatch({ - * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", - * entries: [{}] - * }) - */ - public async putBatch(request: Rivet.kv.PutBatchRequest, requestOptions?: Kv.RequestOptions): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - "/kv/entries/batch" - ), - method: "PUT", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - requestType: "json", - body: serializers.kv.PutBatchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * Deletes multiple key-value entries by key(s). - * - * @param {Rivet.kv.DeleteBatchRequest} request - * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.kv.deleteBatch({ - * keys: "string", - * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" - * }) - */ - public async deleteBatch(request: Rivet.kv.DeleteBatchRequest, requestOptions?: Kv.RequestOptions): Promise { - const { keys, namespaceId } = request; - const _queryParams: Record = {}; - if (Array.isArray(keys)) { - _queryParams["keys"] = keys.map((item) => item); - } else { - _queryParams["keys"] = keys; - } - - if (namespaceId != null) { - _queryParams["namespace_id"] = namespaceId; - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - "/kv/entries/batch" - ), - method: "DELETE", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - queryParameters: _queryParams, - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - protected async _getAuthorizationHeader(): Promise { - const bearer = await core.Supplier.get(this._options.token); - if (bearer != null) { - return `Bearer ${bearer}`; - } - - return undefined; - } -} diff --git a/sdks/full/typescript/src/api/resources/kv/client/index.ts b/sdks/full/typescript/src/api/resources/kv/client/index.ts deleted file mode 100644 index 415726b7fe..0000000000 --- a/sdks/full/typescript/src/api/resources/kv/client/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./requests"; diff --git a/sdks/full/typescript/src/api/resources/kv/client/requests/DeleteBatchRequest.ts b/sdks/full/typescript/src/api/resources/kv/client/requests/DeleteBatchRequest.ts deleted file mode 100644 index 06a8f40701..0000000000 --- a/sdks/full/typescript/src/api/resources/kv/client/requests/DeleteBatchRequest.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../index"; - -/** - * @example - * { - * keys: "string", - * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" - * } - */ -export interface DeleteBatchRequest { - keys: Rivet.kv.Key | Rivet.kv.Key[]; - namespaceId?: string; -} diff --git a/sdks/full/typescript/src/api/resources/kv/client/requests/DeleteOperationRequest.ts b/sdks/full/typescript/src/api/resources/kv/client/requests/DeleteOperationRequest.ts deleted file mode 100644 index 4a4acf3119..0000000000 --- a/sdks/full/typescript/src/api/resources/kv/client/requests/DeleteOperationRequest.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../index"; - -/** - * @example - * { - * key: "string", - * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" - * } - */ -export interface DeleteOperationRequest { - key: Rivet.kv.Key; - namespaceId?: string; -} diff --git a/sdks/full/typescript/src/api/resources/kv/client/requests/GetBatchRequest.ts b/sdks/full/typescript/src/api/resources/kv/client/requests/GetBatchRequest.ts deleted file mode 100644 index dee7e0ecf0..0000000000 --- a/sdks/full/typescript/src/api/resources/kv/client/requests/GetBatchRequest.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../index"; - -/** - * @example - * { - * keys: "string", - * watchIndex: "string", - * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" - * } - */ -export interface GetBatchRequest { - keys: Rivet.kv.Key | Rivet.kv.Key[]; - /** - * A query parameter denoting the requests watch index. - */ - watchIndex?: string; - namespaceId?: string; -} diff --git a/sdks/full/typescript/src/api/resources/kv/client/requests/GetOperationRequest.ts b/sdks/full/typescript/src/api/resources/kv/client/requests/GetOperationRequest.ts deleted file mode 100644 index c41a9a3add..0000000000 --- a/sdks/full/typescript/src/api/resources/kv/client/requests/GetOperationRequest.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../index"; - -/** - * @example - * { - * key: "string", - * watchIndex: "string", - * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" - * } - */ -export interface GetOperationRequest { - key: Rivet.kv.Key; - /** - * A query parameter denoting the requests watch index. - */ - watchIndex?: string; - namespaceId?: string; -} diff --git a/sdks/full/typescript/src/api/resources/kv/client/requests/ListOperationRequest.ts b/sdks/full/typescript/src/api/resources/kv/client/requests/ListOperationRequest.ts deleted file mode 100644 index ac3740b405..0000000000 --- a/sdks/full/typescript/src/api/resources/kv/client/requests/ListOperationRequest.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../index"; - -/** - * @example - * { - * directory: "string", - * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" - * } - */ -export interface ListOperationRequest { - directory: Rivet.kv.Directory; - namespaceId: string; -} diff --git a/sdks/full/typescript/src/api/resources/kv/client/requests/index.ts b/sdks/full/typescript/src/api/resources/kv/client/requests/index.ts deleted file mode 100644 index 2dc02e572b..0000000000 --- a/sdks/full/typescript/src/api/resources/kv/client/requests/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { type GetOperationRequest } from "./GetOperationRequest"; -export { type DeleteOperationRequest } from "./DeleteOperationRequest"; -export { type ListOperationRequest } from "./ListOperationRequest"; -export { type GetBatchRequest } from "./GetBatchRequest"; -export { type DeleteBatchRequest } from "./DeleteBatchRequest"; diff --git a/sdks/full/typescript/src/api/resources/kv/index.ts b/sdks/full/typescript/src/api/resources/kv/index.ts deleted file mode 100644 index a931b36375..0000000000 --- a/sdks/full/typescript/src/api/resources/kv/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./types"; -export * from "./resources"; -export * from "./client"; diff --git a/sdks/full/typescript/src/api/resources/kv/resources/common/index.ts b/sdks/full/typescript/src/api/resources/kv/resources/common/index.ts deleted file mode 100644 index eea524d655..0000000000 --- a/sdks/full/typescript/src/api/resources/kv/resources/common/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./types"; diff --git a/sdks/full/typescript/src/api/resources/kv/resources/common/types/Directory.ts b/sdks/full/typescript/src/api/resources/kv/resources/common/types/Directory.ts deleted file mode 100644 index d556fdf0dd..0000000000 --- a/sdks/full/typescript/src/api/resources/kv/resources/common/types/Directory.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type Directory = string; diff --git a/sdks/full/typescript/src/api/resources/kv/resources/common/types/Entry.ts b/sdks/full/typescript/src/api/resources/kv/resources/common/types/Entry.ts deleted file mode 100644 index 73548a04d2..0000000000 --- a/sdks/full/typescript/src/api/resources/kv/resources/common/types/Entry.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../../index"; - -/** - * A key-value entry. - */ -export interface Entry { - key: Rivet.kv.Key; - value?: Rivet.kv.Value; - deleted?: boolean; -} diff --git a/sdks/full/typescript/src/api/resources/kv/resources/common/types/Key.ts b/sdks/full/typescript/src/api/resources/kv/resources/common/types/Key.ts deleted file mode 100644 index 362cc5df58..0000000000 --- a/sdks/full/typescript/src/api/resources/kv/resources/common/types/Key.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * A string representing a key in the key-value database. - * Maximum length of 512 characters. - * _Recommended Key Path Format_ - * Key path components are split by a slash (e.g. `a/b/c` has the path components `["a", "b", "c"]`). Slashes can be escaped by using a backslash (e.g. `a/b\/c/d` has the path components `["a", "b/c", "d"]`). - * This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. - */ -export type Key = string; diff --git a/sdks/full/typescript/src/api/resources/kv/resources/common/types/PutEntry.ts b/sdks/full/typescript/src/api/resources/kv/resources/common/types/PutEntry.ts deleted file mode 100644 index b675c847a9..0000000000 --- a/sdks/full/typescript/src/api/resources/kv/resources/common/types/PutEntry.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../../index"; - -/** - * A new entry to insert into the key-value database. - */ -export interface PutEntry { - key: Rivet.kv.Key; - value?: Rivet.kv.Value; -} diff --git a/sdks/full/typescript/src/api/resources/kv/resources/common/types/Value.ts b/sdks/full/typescript/src/api/resources/kv/resources/common/types/Value.ts deleted file mode 100644 index 4f1f92d335..0000000000 --- a/sdks/full/typescript/src/api/resources/kv/resources/common/types/Value.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * A JSON object stored in the KV database. - * A `null` value indicates the entry is deleted. - * Maximum length of 262,144 bytes when encoded. - */ -export type Value = unknown; diff --git a/sdks/full/typescript/src/api/resources/kv/resources/common/types/index.ts b/sdks/full/typescript/src/api/resources/kv/resources/common/types/index.ts deleted file mode 100644 index f88e3ccae9..0000000000 --- a/sdks/full/typescript/src/api/resources/kv/resources/common/types/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from "./Key"; -export * from "./Directory"; -export * from "./Value"; -export * from "./Entry"; -export * from "./PutEntry"; diff --git a/sdks/full/typescript/src/api/resources/kv/resources/index.ts b/sdks/full/typescript/src/api/resources/kv/resources/index.ts deleted file mode 100644 index 3ed465041b..0000000000 --- a/sdks/full/typescript/src/api/resources/kv/resources/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * as common from "./common"; -export * from "./common/types"; diff --git a/sdks/full/typescript/src/api/resources/kv/types/GetBatchResponse.ts b/sdks/full/typescript/src/api/resources/kv/types/GetBatchResponse.ts deleted file mode 100644 index 3d7bc9ed00..0000000000 --- a/sdks/full/typescript/src/api/resources/kv/types/GetBatchResponse.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface GetBatchResponse { - entries: Rivet.kv.Entry[]; - watch: Rivet.WatchResponse; -} diff --git a/sdks/full/typescript/src/api/resources/kv/types/GetResponse.ts b/sdks/full/typescript/src/api/resources/kv/types/GetResponse.ts deleted file mode 100644 index 7b8ee46b50..0000000000 --- a/sdks/full/typescript/src/api/resources/kv/types/GetResponse.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface GetResponse { - value?: Rivet.kv.Value; - /** Whether or not the entry has been deleted. Only set when watching this endpoint. */ - deleted?: boolean; - watch: Rivet.WatchResponse; -} diff --git a/sdks/full/typescript/src/api/resources/kv/types/ListResponse.ts b/sdks/full/typescript/src/api/resources/kv/types/ListResponse.ts deleted file mode 100644 index 5389e9e4c9..0000000000 --- a/sdks/full/typescript/src/api/resources/kv/types/ListResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface ListResponse { - entries: Rivet.kv.Entry[]; -} diff --git a/sdks/full/typescript/src/api/resources/kv/types/PutBatchRequest.ts b/sdks/full/typescript/src/api/resources/kv/types/PutBatchRequest.ts deleted file mode 100644 index cd7e884c65..0000000000 --- a/sdks/full/typescript/src/api/resources/kv/types/PutBatchRequest.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface PutBatchRequest { - namespaceId?: string; - entries: Rivet.kv.PutEntry[]; -} diff --git a/sdks/full/typescript/src/api/resources/kv/types/PutRequest.ts b/sdks/full/typescript/src/api/resources/kv/types/PutRequest.ts deleted file mode 100644 index 08cca59818..0000000000 --- a/sdks/full/typescript/src/api/resources/kv/types/PutRequest.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface PutRequest { - namespaceId?: string; - key: Rivet.kv.Key; - value?: Rivet.kv.Value; -} diff --git a/sdks/full/typescript/src/api/resources/kv/types/index.ts b/sdks/full/typescript/src/api/resources/kv/types/index.ts deleted file mode 100644 index e4596df6de..0000000000 --- a/sdks/full/typescript/src/api/resources/kv/types/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from "./GetResponse"; -export * from "./PutRequest"; -export * from "./ListResponse"; -export * from "./GetBatchResponse"; -export * from "./PutBatchRequest"; diff --git a/sdks/full/typescript/src/serialization/resources/actor/resources/common/types/GameGuardRouting.ts b/sdks/full/typescript/src/serialization/resources/actor/resources/common/types/GameGuardRouting.ts index 2e22752bda..0814215f40 100644 --- a/sdks/full/typescript/src/serialization/resources/actor/resources/common/types/GameGuardRouting.ts +++ b/sdks/full/typescript/src/serialization/resources/actor/resources/common/types/GameGuardRouting.ts @@ -5,12 +5,18 @@ import * as serializers from "../../../../../index"; import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { PortAuthorization as actor_common$$portAuthorization } from "./PortAuthorization"; +import { actor } from "../../../../index"; export const GameGuardRouting: core.serialization.ObjectSchema< serializers.actor.GameGuardRouting.Raw, Rivet.actor.GameGuardRouting -> = core.serialization.object({}); +> = core.serialization.object({ + authorization: actor_common$$portAuthorization.optional(), +}); export declare namespace GameGuardRouting { - interface Raw {} + interface Raw { + authorization?: actor.PortAuthorization.Raw | null; + } } diff --git a/sdks/full/typescript/src/serialization/resources/actor/resources/common/types/index.ts b/sdks/full/typescript/src/serialization/resources/actor/resources/common/types/index.ts index 6ec7383456..d33b0c574c 100644 --- a/sdks/full/typescript/src/serialization/resources/actor/resources/common/types/index.ts +++ b/sdks/full/typescript/src/serialization/resources/actor/resources/common/types/index.ts @@ -8,6 +8,8 @@ export * from "./Port"; export * from "./PortProtocol"; export * from "./PortRouting"; export * from "./GameGuardRouting"; +export * from "./PortAuthorization"; +export * from "./PortQueryAuthorization"; export * from "./HostRouting"; export * from "./Build"; export * from "./Datacenter"; diff --git a/sdks/full/typescript/src/serialization/resources/group/types/SearchResponse.ts b/sdks/full/typescript/src/serialization/resources/group/types/SearchResponse.ts deleted file mode 100644 index e18057fe57..0000000000 --- a/sdks/full/typescript/src/serialization/resources/group/types/SearchResponse.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { Handle as group_common$$handle } from "../resources/common/types/Handle"; -import { group } from "../../index"; - -export const SearchResponse: core.serialization.ObjectSchema< - serializers.group.SearchResponse.Raw, - Rivet.group.SearchResponse -> = core.serialization.object({ - groups: core.serialization.list(group_common$$handle), - anchor: core.serialization.string().optional(), -}); - -export declare namespace SearchResponse { - interface Raw { - groups: group.Handle.Raw[]; - anchor?: string | null; - } -} diff --git a/sdks/full/typescript/src/serialization/resources/group/types/index.ts b/sdks/full/typescript/src/serialization/resources/group/types/index.ts index 1c7da6f7f8..bbb5c4b821 100644 --- a/sdks/full/typescript/src/serialization/resources/group/types/index.ts +++ b/sdks/full/typescript/src/serialization/resources/group/types/index.ts @@ -5,7 +5,6 @@ export * from "./PrepareAvatarUploadRequest"; export * from "./PrepareAvatarUploadResponse"; export * from "./ValidateProfileRequest"; export * from "./ValidateProfileResponse"; -export * from "./SearchResponse"; export * from "./GetBansResponse"; export * from "./GetJoinRequestsResponse"; export * from "./GetMembersResponse"; diff --git a/sdks/full/typescript/src/serialization/resources/identity/client/requests/ReportRequest.ts b/sdks/full/typescript/src/serialization/resources/identity/client/requests/ReportRequest.ts deleted file mode 100644 index 5a5d13eeb1..0000000000 --- a/sdks/full/typescript/src/serialization/resources/identity/client/requests/ReportRequest.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../index"; -import * as Rivet from "../../../../../api/index"; -import * as core from "../../../../../core"; - -export const ReportRequest: core.serialization.Schema< - serializers.identity.ReportRequest.Raw, - Rivet.identity.ReportRequest -> = core.serialization.object({ - reason: core.serialization.string().optional(), -}); - -export declare namespace ReportRequest { - interface Raw { - reason?: string | null; - } -} diff --git a/sdks/full/typescript/src/serialization/resources/identity/client/requests/index.ts b/sdks/full/typescript/src/serialization/resources/identity/client/requests/index.ts index 0bd40dd05f..245b1d7764 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/client/requests/index.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/client/requests/index.ts @@ -5,4 +5,3 @@ export { SetGameActivityRequest } from "./SetGameActivityRequest"; export { UpdateStatusRequest } from "./UpdateStatusRequest"; export { PrepareAvatarUploadRequest } from "./PrepareAvatarUploadRequest"; export { SignupForBetaRequest } from "./SignupForBetaRequest"; -export { ReportRequest } from "./ReportRequest"; diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEventKind.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEventKind.ts index b82bb5b88e..a11078fd82 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEventKind.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEventKind.ts @@ -6,7 +6,6 @@ import * as serializers from "../../../../../index"; import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; import { GlobalEventIdentityUpdate as identity_common$$globalEventIdentityUpdate } from "./GlobalEventIdentityUpdate"; -import { GlobalEventMatchmakerLobbyJoin as identity_common$$globalEventMatchmakerLobbyJoin } from "./GlobalEventMatchmakerLobbyJoin"; import { identity } from "../../../../index"; export const GlobalEventKind: core.serialization.ObjectSchema< @@ -17,15 +16,10 @@ export const GlobalEventKind: core.serialization.ObjectSchema< "identity_update", identity_common$$globalEventIdentityUpdate.optional() ), - matchmakerLobbyJoin: core.serialization.property( - "matchmaker_lobby_join", - identity_common$$globalEventMatchmakerLobbyJoin.optional() - ), }); export declare namespace GlobalEventKind { interface Raw { identity_update?: identity.GlobalEventIdentityUpdate.Raw | null; - matchmaker_lobby_join?: identity.GlobalEventMatchmakerLobbyJoin.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEventMatchmakerLobbyJoin.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEventMatchmakerLobbyJoin.ts deleted file mode 100644 index dc53870a35..0000000000 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEventMatchmakerLobbyJoin.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; -import { JoinLobby as matchmaker_common$$joinLobby } from "../../../../matchmaker/resources/common/types/JoinLobby"; -import { JoinPort as matchmaker_common$$joinPort } from "../../../../matchmaker/resources/common/types/JoinPort"; -import { JoinPlayer as matchmaker_common$$joinPlayer } from "../../../../matchmaker/resources/common/types/JoinPlayer"; -import { matchmaker } from "../../../../index"; - -export const GlobalEventMatchmakerLobbyJoin: core.serialization.ObjectSchema< - serializers.identity.GlobalEventMatchmakerLobbyJoin.Raw, - Rivet.identity.GlobalEventMatchmakerLobbyJoin -> = core.serialization.object({ - lobby: matchmaker_common$$joinLobby, - ports: core.serialization.record(core.serialization.string(), matchmaker_common$$joinPort), - player: matchmaker_common$$joinPlayer, -}); - -export declare namespace GlobalEventMatchmakerLobbyJoin { - interface Raw { - lobby: matchmaker.JoinLobby.Raw; - ports: Record; - player: matchmaker.JoinPlayer.Raw; - } -} diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/index.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/index.ts index 02242e7a8f..e0f5ea54fe 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/index.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/index.ts @@ -2,7 +2,6 @@ export * from "./GlobalEvent"; export * from "./GlobalEventKind"; export * from "./GlobalEventNotification"; export * from "./GlobalEventIdentityUpdate"; -export * from "./GlobalEventMatchmakerLobbyJoin"; export * from "./UpdateGameActivity"; export * from "./Handle"; export * from "./Summary"; diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/index.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/index.ts index f60dc8ca1f..1a88b1e415 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/index.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/index.ts @@ -4,5 +4,3 @@ export * as common from "./common"; export * from "./common/types"; export * as events from "./events"; export * from "./events/types"; -export * as links from "./links"; -export * from "./links/types"; diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/links/index.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/links/index.ts deleted file mode 100644 index eea524d655..0000000000 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/links/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./types"; diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/CancelGameLinkRequest.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/CancelGameLinkRequest.ts deleted file mode 100644 index 804f9b23a8..0000000000 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/CancelGameLinkRequest.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; -import { Jwt as common$$jwt } from "../../../../common/types/Jwt"; -import { common } from "../../../../index"; - -export const CancelGameLinkRequest: core.serialization.ObjectSchema< - serializers.identity.CancelGameLinkRequest.Raw, - Rivet.identity.CancelGameLinkRequest -> = core.serialization.object({ - identityLinkToken: core.serialization.property("identity_link_token", common$$jwt), -}); - -export declare namespace CancelGameLinkRequest { - interface Raw { - identity_link_token: common.Jwt.Raw; - } -} diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/CompleteGameLinkRequest.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/CompleteGameLinkRequest.ts deleted file mode 100644 index 979a50a5db..0000000000 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/CompleteGameLinkRequest.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; -import { Jwt as common$$jwt } from "../../../../common/types/Jwt"; -import { common } from "../../../../index"; - -export const CompleteGameLinkRequest: core.serialization.ObjectSchema< - serializers.identity.CompleteGameLinkRequest.Raw, - Rivet.identity.CompleteGameLinkRequest -> = core.serialization.object({ - identityLinkToken: core.serialization.property("identity_link_token", common$$jwt), -}); - -export declare namespace CompleteGameLinkRequest { - interface Raw { - identity_link_token: common.Jwt.Raw; - } -} diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/GetGameLinkNewIdentity.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/GetGameLinkNewIdentity.ts deleted file mode 100644 index b01643157e..0000000000 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/GetGameLinkNewIdentity.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; -import { Jwt as common$$jwt } from "../../../../common/types/Jwt"; -import { Timestamp as common$$timestamp } from "../../../../common/types/Timestamp"; -import { Profile as identity_common$$profile } from "../../common/types/Profile"; -import { common, identity } from "../../../../index"; - -export const GetGameLinkNewIdentity: core.serialization.ObjectSchema< - serializers.identity.GetGameLinkNewIdentity.Raw, - Rivet.identity.GetGameLinkNewIdentity -> = core.serialization.object({ - identityToken: core.serialization.property("identity_token", common$$jwt), - identityTokenExpireTs: core.serialization.property("identity_token_expire_ts", common$$timestamp), - identity: identity_common$$profile, -}); - -export declare namespace GetGameLinkNewIdentity { - interface Raw { - identity_token: common.Jwt.Raw; - identity_token_expire_ts: common.Timestamp.Raw; - identity: identity.Profile.Raw; - } -} diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/GetGameLinkResponse.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/GetGameLinkResponse.ts deleted file mode 100644 index ac18e4e9cb..0000000000 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/GetGameLinkResponse.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; -import { GameLinkStatus as identity_common$$gameLinkStatus } from "../../common/types/GameLinkStatus"; -import { Handle as game_common$$handle } from "../../../../game/resources/common/types/Handle"; -import { Handle as identity_common$$handle } from "../../common/types/Handle"; -import { GetGameLinkNewIdentity as identity_links$$getGameLinkNewIdentity } from "./GetGameLinkNewIdentity"; -import { WatchResponse as common$$watchResponse } from "../../../../common/types/WatchResponse"; -import { identity, game, common } from "../../../../index"; - -export const GetGameLinkResponse: core.serialization.ObjectSchema< - serializers.identity.GetGameLinkResponse.Raw, - Rivet.identity.GetGameLinkResponse -> = core.serialization.object({ - status: identity_common$$gameLinkStatus, - game: game_common$$handle, - currentIdentity: core.serialization.property("current_identity", identity_common$$handle), - newIdentity: core.serialization.property("new_identity", identity_links$$getGameLinkNewIdentity.optional()), - watch: common$$watchResponse, -}); - -export declare namespace GetGameLinkResponse { - interface Raw { - status: identity.GameLinkStatus.Raw; - game: game.Handle.Raw; - current_identity: identity.Handle.Raw; - new_identity?: identity.GetGameLinkNewIdentity.Raw | null; - watch: common.WatchResponse.Raw; - } -} diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/PrepareGameLinkResponse.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/PrepareGameLinkResponse.ts deleted file mode 100644 index eeefc68a68..0000000000 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/PrepareGameLinkResponse.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; -import { Timestamp as common$$timestamp } from "../../../../common/types/Timestamp"; -import { common } from "../../../../index"; - -export const PrepareGameLinkResponse: core.serialization.ObjectSchema< - serializers.identity.PrepareGameLinkResponse.Raw, - Rivet.identity.PrepareGameLinkResponse -> = core.serialization.object({ - identityLinkToken: core.serialization.property("identity_link_token", core.serialization.string()), - identityLinkUrl: core.serialization.property("identity_link_url", core.serialization.string()), - expireTs: core.serialization.property("expire_ts", common$$timestamp), -}); - -export declare namespace PrepareGameLinkResponse { - interface Raw { - identity_link_token: string; - identity_link_url: string; - expire_ts: common.Timestamp.Raw; - } -} diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/index.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/index.ts deleted file mode 100644 index 675bb866ca..0000000000 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from "./PrepareGameLinkResponse"; -export * from "./GetGameLinkResponse"; -export * from "./GetGameLinkNewIdentity"; -export * from "./CompleteGameLinkRequest"; -export * from "./CancelGameLinkRequest"; diff --git a/sdks/full/typescript/src/serialization/resources/identity/types/ListFollowersResponse.ts b/sdks/full/typescript/src/serialization/resources/identity/types/ListFollowersResponse.ts deleted file mode 100644 index 0638b930c0..0000000000 --- a/sdks/full/typescript/src/serialization/resources/identity/types/ListFollowersResponse.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { Handle as identity_common$$handle } from "../resources/common/types/Handle"; -import { WatchResponse as common$$watchResponse } from "../../common/types/WatchResponse"; -import { identity, common } from "../../index"; - -export const ListFollowersResponse: core.serialization.ObjectSchema< - serializers.identity.ListFollowersResponse.Raw, - Rivet.identity.ListFollowersResponse -> = core.serialization.object({ - identities: core.serialization.list(identity_common$$handle), - anchor: core.serialization.string().optional(), - watch: common$$watchResponse, -}); - -export declare namespace ListFollowersResponse { - interface Raw { - identities: identity.Handle.Raw[]; - anchor?: string | null; - watch: common.WatchResponse.Raw; - } -} diff --git a/sdks/full/typescript/src/serialization/resources/identity/types/ListFollowingResponse.ts b/sdks/full/typescript/src/serialization/resources/identity/types/ListFollowingResponse.ts deleted file mode 100644 index 99230345b1..0000000000 --- a/sdks/full/typescript/src/serialization/resources/identity/types/ListFollowingResponse.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { Handle as identity_common$$handle } from "../resources/common/types/Handle"; -import { WatchResponse as common$$watchResponse } from "../../common/types/WatchResponse"; -import { identity, common } from "../../index"; - -export const ListFollowingResponse: core.serialization.ObjectSchema< - serializers.identity.ListFollowingResponse.Raw, - Rivet.identity.ListFollowingResponse -> = core.serialization.object({ - identities: core.serialization.list(identity_common$$handle), - anchor: core.serialization.string().optional(), - watch: common$$watchResponse, -}); - -export declare namespace ListFollowingResponse { - interface Raw { - identities: identity.Handle.Raw[]; - anchor?: string | null; - watch: common.WatchResponse.Raw; - } -} diff --git a/sdks/full/typescript/src/serialization/resources/identity/types/ListFriendsResponse.ts b/sdks/full/typescript/src/serialization/resources/identity/types/ListFriendsResponse.ts deleted file mode 100644 index c10b03297e..0000000000 --- a/sdks/full/typescript/src/serialization/resources/identity/types/ListFriendsResponse.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { Handle as identity_common$$handle } from "../resources/common/types/Handle"; -import { WatchResponse as common$$watchResponse } from "../../common/types/WatchResponse"; -import { identity, common } from "../../index"; - -export const ListFriendsResponse: core.serialization.ObjectSchema< - serializers.identity.ListFriendsResponse.Raw, - Rivet.identity.ListFriendsResponse -> = core.serialization.object({ - identities: core.serialization.list(identity_common$$handle), - anchor: core.serialization.string().optional(), - watch: common$$watchResponse, -}); - -export declare namespace ListFriendsResponse { - interface Raw { - identities: identity.Handle.Raw[]; - anchor?: string | null; - watch: common.WatchResponse.Raw; - } -} diff --git a/sdks/full/typescript/src/serialization/resources/identity/types/ListMutualFriendsResponse.ts b/sdks/full/typescript/src/serialization/resources/identity/types/ListMutualFriendsResponse.ts deleted file mode 100644 index 839ffe20ce..0000000000 --- a/sdks/full/typescript/src/serialization/resources/identity/types/ListMutualFriendsResponse.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { Handle as identity_common$$handle } from "../resources/common/types/Handle"; -import { identity } from "../../index"; - -export const ListMutualFriendsResponse: core.serialization.ObjectSchema< - serializers.identity.ListMutualFriendsResponse.Raw, - Rivet.identity.ListMutualFriendsResponse -> = core.serialization.object({ - identities: core.serialization.list(identity_common$$handle), - anchor: core.serialization.string().optional(), -}); - -export declare namespace ListMutualFriendsResponse { - interface Raw { - identities: identity.Handle.Raw[]; - anchor?: string | null; - } -} diff --git a/sdks/full/typescript/src/serialization/resources/identity/types/ListRecentFollowersResponse.ts b/sdks/full/typescript/src/serialization/resources/identity/types/ListRecentFollowersResponse.ts deleted file mode 100644 index 4b88cf40f3..0000000000 --- a/sdks/full/typescript/src/serialization/resources/identity/types/ListRecentFollowersResponse.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { Handle as identity_common$$handle } from "../resources/common/types/Handle"; -import { WatchResponse as common$$watchResponse } from "../../common/types/WatchResponse"; -import { identity, common } from "../../index"; - -export const ListRecentFollowersResponse: core.serialization.ObjectSchema< - serializers.identity.ListRecentFollowersResponse.Raw, - Rivet.identity.ListRecentFollowersResponse -> = core.serialization.object({ - identities: core.serialization.list(identity_common$$handle), - anchor: core.serialization.string().optional(), - watch: common$$watchResponse, -}); - -export declare namespace ListRecentFollowersResponse { - interface Raw { - identities: identity.Handle.Raw[]; - anchor?: string | null; - watch: common.WatchResponse.Raw; - } -} diff --git a/sdks/full/typescript/src/serialization/resources/identity/types/SearchResponse.ts b/sdks/full/typescript/src/serialization/resources/identity/types/SearchResponse.ts deleted file mode 100644 index b9a01e2ccf..0000000000 --- a/sdks/full/typescript/src/serialization/resources/identity/types/SearchResponse.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { Handle as identity_common$$handle } from "../resources/common/types/Handle"; -import { identity } from "../../index"; - -export const SearchResponse: core.serialization.ObjectSchema< - serializers.identity.SearchResponse.Raw, - Rivet.identity.SearchResponse -> = core.serialization.object({ - identities: core.serialization.list(identity_common$$handle), - anchor: core.serialization.string().optional(), -}); - -export declare namespace SearchResponse { - interface Raw { - identities: identity.Handle.Raw[]; - anchor?: string | null; - } -} diff --git a/sdks/full/typescript/src/serialization/resources/identity/types/index.ts b/sdks/full/typescript/src/serialization/resources/identity/types/index.ts index fc0e4d976d..3a4306097a 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/types/index.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/types/index.ts @@ -3,10 +3,4 @@ export * from "./GetProfileResponse"; export * from "./GetHandlesResponse"; export * from "./GetSummariesResponse"; export * from "./ValidateProfileResponse"; -export * from "./SearchResponse"; export * from "./PrepareAvatarUploadResponse"; -export * from "./ListFollowersResponse"; -export * from "./ListFollowingResponse"; -export * from "./ListRecentFollowersResponse"; -export * from "./ListFriendsResponse"; -export * from "./ListMutualFriendsResponse"; diff --git a/sdks/full/typescript/src/serialization/resources/index.ts b/sdks/full/typescript/src/serialization/resources/index.ts index 9e36dd61cf..181cdc0d0d 100644 --- a/sdks/full/typescript/src/serialization/resources/index.ts +++ b/sdks/full/typescript/src/serialization/resources/index.ts @@ -3,7 +3,6 @@ export * as admin from "./admin"; export * as cloud from "./cloud"; export * as group from "./group"; export * as identity from "./identity"; -export * as kv from "./kv"; export * as provision from "./provision"; export * as auth from "./auth"; export * as captcha from "./captcha"; diff --git a/sdks/full/typescript/src/serialization/resources/kv/index.ts b/sdks/full/typescript/src/serialization/resources/kv/index.ts deleted file mode 100644 index 3ce0a3e38e..0000000000 --- a/sdks/full/typescript/src/serialization/resources/kv/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./types"; -export * from "./resources"; diff --git a/sdks/full/typescript/src/serialization/resources/kv/resources/common/index.ts b/sdks/full/typescript/src/serialization/resources/kv/resources/common/index.ts deleted file mode 100644 index eea524d655..0000000000 --- a/sdks/full/typescript/src/serialization/resources/kv/resources/common/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./types"; diff --git a/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Directory.ts b/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Directory.ts deleted file mode 100644 index f11ee98039..0000000000 --- a/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Directory.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; - -export const Directory: core.serialization.Schema = - core.serialization.string(); - -export declare namespace Directory { - type Raw = string; -} diff --git a/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Entry.ts b/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Entry.ts deleted file mode 100644 index 2cefd67728..0000000000 --- a/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Entry.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; -import { Key as kv_common$$key } from "./Key"; -import { Value as kv_common$$value } from "./Value"; -import { kv } from "../../../../index"; - -export const Entry: core.serialization.ObjectSchema = - core.serialization.object({ - key: kv_common$$key, - value: kv_common$$value, - deleted: core.serialization.boolean().optional(), - }); - -export declare namespace Entry { - interface Raw { - key: kv.Key.Raw; - value?: kv.Value.Raw; - deleted?: boolean | null; - } -} diff --git a/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Key.ts b/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Key.ts deleted file mode 100644 index 5d31f57255..0000000000 --- a/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Key.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; - -export const Key: core.serialization.Schema = core.serialization.string(); - -export declare namespace Key { - type Raw = string; -} diff --git a/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/PutEntry.ts b/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/PutEntry.ts deleted file mode 100644 index d7a197d311..0000000000 --- a/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/PutEntry.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; -import { Key as kv_common$$key } from "./Key"; -import { Value as kv_common$$value } from "./Value"; -import { kv } from "../../../../index"; - -export const PutEntry: core.serialization.ObjectSchema = - core.serialization.object({ - key: kv_common$$key, - value: kv_common$$value, - }); - -export declare namespace PutEntry { - interface Raw { - key: kv.Key.Raw; - value?: kv.Value.Raw; - } -} diff --git a/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Value.ts b/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Value.ts deleted file mode 100644 index 8862823529..0000000000 --- a/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Value.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; - -export const Value: core.serialization.Schema = core.serialization.unknown(); - -export declare namespace Value { - type Raw = unknown; -} diff --git a/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/index.ts b/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/index.ts deleted file mode 100644 index f88e3ccae9..0000000000 --- a/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from "./Key"; -export * from "./Directory"; -export * from "./Value"; -export * from "./Entry"; -export * from "./PutEntry"; diff --git a/sdks/full/typescript/src/serialization/resources/kv/resources/index.ts b/sdks/full/typescript/src/serialization/resources/kv/resources/index.ts deleted file mode 100644 index 3ed465041b..0000000000 --- a/sdks/full/typescript/src/serialization/resources/kv/resources/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * as common from "./common"; -export * from "./common/types"; diff --git a/sdks/full/typescript/src/serialization/resources/kv/types/GetBatchResponse.ts b/sdks/full/typescript/src/serialization/resources/kv/types/GetBatchResponse.ts deleted file mode 100644 index 41741a1e54..0000000000 --- a/sdks/full/typescript/src/serialization/resources/kv/types/GetBatchResponse.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { Entry as kv_common$$entry } from "../resources/common/types/Entry"; -import { WatchResponse as common$$watchResponse } from "../../common/types/WatchResponse"; -import { kv, common } from "../../index"; - -export const GetBatchResponse: core.serialization.ObjectSchema< - serializers.kv.GetBatchResponse.Raw, - Rivet.kv.GetBatchResponse -> = core.serialization.object({ - entries: core.serialization.list(kv_common$$entry), - watch: common$$watchResponse, -}); - -export declare namespace GetBatchResponse { - interface Raw { - entries: kv.Entry.Raw[]; - watch: common.WatchResponse.Raw; - } -} diff --git a/sdks/full/typescript/src/serialization/resources/kv/types/GetResponse.ts b/sdks/full/typescript/src/serialization/resources/kv/types/GetResponse.ts deleted file mode 100644 index 23e14dcd81..0000000000 --- a/sdks/full/typescript/src/serialization/resources/kv/types/GetResponse.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { Value as kv_common$$value } from "../resources/common/types/Value"; -import { WatchResponse as common$$watchResponse } from "../../common/types/WatchResponse"; -import { kv, common } from "../../index"; - -export const GetResponse: core.serialization.ObjectSchema = - core.serialization.object({ - value: kv_common$$value, - deleted: core.serialization.boolean().optional(), - watch: common$$watchResponse, - }); - -export declare namespace GetResponse { - interface Raw { - value?: kv.Value.Raw; - deleted?: boolean | null; - watch: common.WatchResponse.Raw; - } -} diff --git a/sdks/full/typescript/src/serialization/resources/kv/types/ListResponse.ts b/sdks/full/typescript/src/serialization/resources/kv/types/ListResponse.ts deleted file mode 100644 index 3316e0fd71..0000000000 --- a/sdks/full/typescript/src/serialization/resources/kv/types/ListResponse.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { Entry as kv_common$$entry } from "../resources/common/types/Entry"; -import { kv } from "../../index"; - -export const ListResponse: core.serialization.ObjectSchema = - core.serialization.object({ - entries: core.serialization.list(kv_common$$entry), - }); - -export declare namespace ListResponse { - interface Raw { - entries: kv.Entry.Raw[]; - } -} diff --git a/sdks/full/typescript/src/serialization/resources/kv/types/PutBatchRequest.ts b/sdks/full/typescript/src/serialization/resources/kv/types/PutBatchRequest.ts deleted file mode 100644 index 7f45dc3a59..0000000000 --- a/sdks/full/typescript/src/serialization/resources/kv/types/PutBatchRequest.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { PutEntry as kv_common$$putEntry } from "../resources/common/types/PutEntry"; -import { kv } from "../../index"; - -export const PutBatchRequest: core.serialization.ObjectSchema< - serializers.kv.PutBatchRequest.Raw, - Rivet.kv.PutBatchRequest -> = core.serialization.object({ - namespaceId: core.serialization.property("namespace_id", core.serialization.string().optional()), - entries: core.serialization.list(kv_common$$putEntry), -}); - -export declare namespace PutBatchRequest { - interface Raw { - namespace_id?: string | null; - entries: kv.PutEntry.Raw[]; - } -} diff --git a/sdks/full/typescript/src/serialization/resources/kv/types/PutRequest.ts b/sdks/full/typescript/src/serialization/resources/kv/types/PutRequest.ts deleted file mode 100644 index b2cf72018b..0000000000 --- a/sdks/full/typescript/src/serialization/resources/kv/types/PutRequest.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { Key as kv_common$$key } from "../resources/common/types/Key"; -import { Value as kv_common$$value } from "../resources/common/types/Value"; -import { kv } from "../../index"; - -export const PutRequest: core.serialization.ObjectSchema = - core.serialization.object({ - namespaceId: core.serialization.property("namespace_id", core.serialization.string().optional()), - key: kv_common$$key, - value: kv_common$$value, - }); - -export declare namespace PutRequest { - interface Raw { - namespace_id?: string | null; - key: kv.Key.Raw; - value?: kv.Value.Raw; - } -} diff --git a/sdks/full/typescript/src/serialization/resources/kv/types/index.ts b/sdks/full/typescript/src/serialization/resources/kv/types/index.ts deleted file mode 100644 index e4596df6de..0000000000 --- a/sdks/full/typescript/src/serialization/resources/kv/types/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from "./GetResponse"; -export * from "./PutRequest"; -export * from "./ListResponse"; -export * from "./GetBatchResponse"; -export * from "./PutBatchRequest"; diff --git a/sdks/full/typescript/types/Client.d.ts b/sdks/full/typescript/types/Client.d.ts index 3e73de2a45..8ea8f1606c 100644 --- a/sdks/full/typescript/types/Client.d.ts +++ b/sdks/full/typescript/types/Client.d.ts @@ -8,7 +8,6 @@ import { Admin } from "./api/resources/admin/client/Client"; import { Cloud } from "./api/resources/cloud/client/Client"; import { Group } from "./api/resources/group/client/Client"; import { Identity } from "./api/resources/identity/client/Client"; -import { Kv } from "./api/resources/kv/client/Client"; import { Provision } from "./api/resources/provision/client/Client"; import { Auth } from "./api/resources/auth/client/Client"; import { Games } from "./api/resources/games/client/Client"; @@ -43,8 +42,6 @@ export declare class RivetClient { get group(): Group; protected _identity: Identity | undefined; get identity(): Identity; - protected _kv: Kv | undefined; - get kv(): Kv; protected _provision: Provision | undefined; get provision(): Provision; protected _auth: Auth | undefined; diff --git a/sdks/full/typescript/types/api/resources/actor/resources/common/types/GameGuardRouting.d.ts b/sdks/full/typescript/types/api/resources/actor/resources/common/types/GameGuardRouting.d.ts index fa04d5f844..9c0e71be31 100644 --- a/sdks/full/typescript/types/api/resources/actor/resources/common/types/GameGuardRouting.d.ts +++ b/sdks/full/typescript/types/api/resources/actor/resources/common/types/GameGuardRouting.d.ts @@ -1,5 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ +import * as Rivet from "../../../../../index"; export interface GameGuardRouting { + authorization?: Rivet.actor.PortAuthorization; } diff --git a/sdks/full/typescript/types/api/resources/actor/resources/common/types/index.d.ts b/sdks/full/typescript/types/api/resources/actor/resources/common/types/index.d.ts index 6ec7383456..d33b0c574c 100644 --- a/sdks/full/typescript/types/api/resources/actor/resources/common/types/index.d.ts +++ b/sdks/full/typescript/types/api/resources/actor/resources/common/types/index.d.ts @@ -8,6 +8,8 @@ export * from "./Port"; export * from "./PortProtocol"; export * from "./PortRouting"; export * from "./GameGuardRouting"; +export * from "./PortAuthorization"; +export * from "./PortQueryAuthorization"; export * from "./HostRouting"; export * from "./Build"; export * from "./Datacenter"; diff --git a/sdks/full/typescript/types/api/resources/group/client/Client.d.ts b/sdks/full/typescript/types/api/resources/group/client/Client.d.ts index a0f4fd87f8..892e3de94f 100644 --- a/sdks/full/typescript/types/api/resources/group/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/group/client/Client.d.ts @@ -105,27 +105,6 @@ export declare class Group { * }) */ validateProfile(request: Rivet.group.ValidateProfileRequest, requestOptions?: Group.RequestOptions): Promise; - /** - * Fuzzy search for groups. - * - * @param {Rivet.group.SearchRequest} request - * @param {Group.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.group.search({ - * query: "string", - * anchor: "string", - * limit: 1.1 - * }) - */ - search(request: Rivet.group.SearchRequest, requestOptions?: Group.RequestOptions): Promise; /** * Completes an avatar image upload. Must be called after the file upload * process completes. diff --git a/sdks/full/typescript/types/api/resources/group/client/requests/index.d.ts b/sdks/full/typescript/types/api/resources/group/client/requests/index.d.ts index de4b90b874..4420d3df32 100644 --- a/sdks/full/typescript/types/api/resources/group/client/requests/index.d.ts +++ b/sdks/full/typescript/types/api/resources/group/client/requests/index.d.ts @@ -1,5 +1,4 @@ export { type ListSuggestedRequest } from "./ListSuggestedRequest"; -export { type SearchRequest } from "./SearchRequest"; export { type GetBansRequest } from "./GetBansRequest"; export { type GetJoinRequestsRequest } from "./GetJoinRequestsRequest"; export { type GetMembersRequest } from "./GetMembersRequest"; diff --git a/sdks/full/typescript/types/api/resources/group/types/index.d.ts b/sdks/full/typescript/types/api/resources/group/types/index.d.ts index 1c7da6f7f8..bbb5c4b821 100644 --- a/sdks/full/typescript/types/api/resources/group/types/index.d.ts +++ b/sdks/full/typescript/types/api/resources/group/types/index.d.ts @@ -5,7 +5,6 @@ export * from "./PrepareAvatarUploadRequest"; export * from "./PrepareAvatarUploadResponse"; export * from "./ValidateProfileRequest"; export * from "./ValidateProfileResponse"; -export * from "./SearchResponse"; export * from "./GetBansResponse"; export * from "./GetJoinRequestsResponse"; export * from "./GetMembersResponse"; diff --git a/sdks/full/typescript/types/api/resources/identity/client/Client.d.ts b/sdks/full/typescript/types/api/resources/identity/client/Client.d.ts index 0272cc9f22..b86d925379 100644 --- a/sdks/full/typescript/types/api/resources/identity/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/client/Client.d.ts @@ -6,7 +6,6 @@ import * as core from "../../../../core"; import * as Rivet from "../../../index"; import { Activities } from "../resources/activities/client/Client"; import { Events } from "../resources/events/client/Client"; -import { Links } from "../resources/links/client/Client"; export declare namespace Identity { interface Options { environment?: core.Supplier; @@ -169,27 +168,6 @@ export declare class Identity { * }) */ validateProfile(request?: Rivet.identity.ValidateProfileRequest, requestOptions?: Identity.RequestOptions): Promise; - /** - * Fuzzy search for identities. - * - * @param {Rivet.identity.SearchRequest} request - * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.identity.search({ - * query: "string", - * anchor: "string", - * limit: 1 - * }) - */ - search(request: Rivet.identity.SearchRequest, requestOptions?: Identity.RequestOptions): Promise; /** * Sets the current identity's game activity. This activity will automatically be removed when the identity goes offline. * @@ -252,40 +230,6 @@ export declare class Identity { * }) */ updateStatus(request: Rivet.identity.UpdateStatusRequest, requestOptions?: Identity.RequestOptions): Promise; - /** - * Follows the given identity. In order for identities to be "friends", the other identity has to also follow this identity. - * - * @param {string} identityId - * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.identity.follow("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") - */ - follow(identityId: string, requestOptions?: Identity.RequestOptions): Promise; - /** - * Unfollows the given identity. - * - * @param {string} identityId - * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.identity.unfollow("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") - */ - unfollow(identityId: string, requestOptions?: Identity.RequestOptions): Promise; /** * Prepares an avatar image upload. Complete upload with `CompleteIdentityAvatarUpload`. * @@ -347,134 +291,6 @@ export declare class Identity { * }) */ signupForBeta(request: Rivet.identity.SignupForBetaRequest, requestOptions?: Identity.RequestOptions): Promise; - /** - * Creates an abuse report for an identity. - * - * @param {string} identityId - * @param {Rivet.identity.ReportRequest} request - * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.identity.report("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { - * reason: "string" - * }) - */ - report(identityId: string, request?: Rivet.identity.ReportRequest, requestOptions?: Identity.RequestOptions): Promise; - /** - * @param {string} identityId - * @param {Rivet.identity.ListFollowersRequest} request - * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.identity.listFollowers("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { - * anchor: "string", - * limit: "string" - * }) - */ - listFollowers(identityId: string, request?: Rivet.identity.ListFollowersRequest, requestOptions?: Identity.RequestOptions): Promise; - /** - * @param {string} identityId - * @param {Rivet.identity.ListFollowingRequest} request - * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.identity.listFollowing("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { - * anchor: "string", - * limit: "string" - * }) - */ - listFollowing(identityId: string, request?: Rivet.identity.ListFollowingRequest, requestOptions?: Identity.RequestOptions): Promise; - /** - * @param {Rivet.identity.ListFriendsRequest} request - * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.identity.listFriends({ - * anchor: "string", - * limit: "string" - * }) - */ - listFriends(request?: Rivet.identity.ListFriendsRequest, requestOptions?: Identity.RequestOptions): Promise; - /** - * @param {string} identityId - * @param {Rivet.identity.ListMutualFriendsRequest} request - * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.identity.listMutualFriends("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { - * anchor: "string", - * limit: "string" - * }) - */ - listMutualFriends(identityId: string, request?: Rivet.identity.ListMutualFriendsRequest, requestOptions?: Identity.RequestOptions): Promise; - /** - * @param {Rivet.identity.ListRecentFollowersRequest} request - * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.identity.listRecentFollowers({ - * count: 1, - * watchIndex: "string" - * }) - */ - listRecentFollowers(request?: Rivet.identity.ListRecentFollowersRequest, requestOptions?: Identity.RequestOptions): Promise; - /** - * @param {string} identityId - * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.identity.ignoreRecentFollower("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") - */ - ignoreRecentFollower(identityId: string, requestOptions?: Identity.RequestOptions): Promise; /** * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. * @@ -507,7 +323,5 @@ export declare class Identity { get activities(): Activities; protected _events: Events | undefined; get events(): Events; - protected _links: Links | undefined; - get links(): Links; protected _getAuthorizationHeader(): Promise; } diff --git a/sdks/full/typescript/types/api/resources/identity/client/requests/index.d.ts b/sdks/full/typescript/types/api/resources/identity/client/requests/index.d.ts index bdb301a5fc..def7679850 100644 --- a/sdks/full/typescript/types/api/resources/identity/client/requests/index.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/client/requests/index.d.ts @@ -5,14 +5,7 @@ export { type GetHandlesRequest } from "./GetHandlesRequest"; export { type GetSummariesRequest } from "./GetSummariesRequest"; export { type UpdateProfileRequest } from "./UpdateProfileRequest"; export { type ValidateProfileRequest } from "./ValidateProfileRequest"; -export { type SearchRequest } from "./SearchRequest"; export { type SetGameActivityRequest } from "./SetGameActivityRequest"; export { type UpdateStatusRequest } from "./UpdateStatusRequest"; export { type PrepareAvatarUploadRequest } from "./PrepareAvatarUploadRequest"; export { type SignupForBetaRequest } from "./SignupForBetaRequest"; -export { type ReportRequest } from "./ReportRequest"; -export { type ListFollowersRequest } from "./ListFollowersRequest"; -export { type ListFollowingRequest } from "./ListFollowingRequest"; -export { type ListFriendsRequest } from "./ListFriendsRequest"; -export { type ListMutualFriendsRequest } from "./ListMutualFriendsRequest"; -export { type ListRecentFollowersRequest } from "./ListRecentFollowersRequest"; diff --git a/sdks/full/typescript/types/api/resources/identity/resources/common/types/GlobalEventKind.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/common/types/GlobalEventKind.d.ts index 4d148f312e..6e0fbc8e84 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/common/types/GlobalEventKind.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/common/types/GlobalEventKind.d.ts @@ -4,5 +4,4 @@ import * as Rivet from "../../../../../index"; export interface GlobalEventKind { identityUpdate?: Rivet.identity.GlobalEventIdentityUpdate; - matchmakerLobbyJoin?: Rivet.identity.GlobalEventMatchmakerLobbyJoin; } diff --git a/sdks/full/typescript/types/api/resources/identity/resources/common/types/index.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/common/types/index.d.ts index 02242e7a8f..e0f5ea54fe 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/common/types/index.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/common/types/index.d.ts @@ -2,7 +2,6 @@ export * from "./GlobalEvent"; export * from "./GlobalEventKind"; export * from "./GlobalEventNotification"; export * from "./GlobalEventIdentityUpdate"; -export * from "./GlobalEventMatchmakerLobbyJoin"; export * from "./UpdateGameActivity"; export * from "./Handle"; export * from "./Summary"; diff --git a/sdks/full/typescript/types/api/resources/identity/resources/index.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/index.d.ts index 441a66503c..6d8e8d453f 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/index.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/index.d.ts @@ -4,8 +4,5 @@ export * as common from "./common"; export * from "./common/types"; export * as events from "./events"; export * from "./events/types"; -export * as links from "./links"; -export * from "./links/types"; export * from "./activities/client/requests"; export * from "./events/client/requests"; -export * from "./links/client/requests"; diff --git a/sdks/full/typescript/types/api/resources/identity/types/index.d.ts b/sdks/full/typescript/types/api/resources/identity/types/index.d.ts index fc0e4d976d..3a4306097a 100644 --- a/sdks/full/typescript/types/api/resources/identity/types/index.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/types/index.d.ts @@ -3,10 +3,4 @@ export * from "./GetProfileResponse"; export * from "./GetHandlesResponse"; export * from "./GetSummariesResponse"; export * from "./ValidateProfileResponse"; -export * from "./SearchResponse"; export * from "./PrepareAvatarUploadResponse"; -export * from "./ListFollowersResponse"; -export * from "./ListFollowingResponse"; -export * from "./ListRecentFollowersResponse"; -export * from "./ListFriendsResponse"; -export * from "./ListMutualFriendsResponse"; diff --git a/sdks/full/typescript/types/api/resources/index.d.ts b/sdks/full/typescript/types/api/resources/index.d.ts index a1937ff338..ffb6f3510d 100644 --- a/sdks/full/typescript/types/api/resources/index.d.ts +++ b/sdks/full/typescript/types/api/resources/index.d.ts @@ -3,7 +3,6 @@ export * as admin from "./admin"; export * as cloud from "./cloud"; export * as group from "./group"; export * as identity from "./identity"; -export * as kv from "./kv"; export * as provision from "./provision"; export * as auth from "./auth"; export * as captcha from "./captcha"; diff --git a/sdks/full/typescript/types/serialization/resources/actor/resources/common/types/GameGuardRouting.d.ts b/sdks/full/typescript/types/serialization/resources/actor/resources/common/types/GameGuardRouting.d.ts index c1f97d2cfe..98af23f7b5 100644 --- a/sdks/full/typescript/types/serialization/resources/actor/resources/common/types/GameGuardRouting.d.ts +++ b/sdks/full/typescript/types/serialization/resources/actor/resources/common/types/GameGuardRouting.d.ts @@ -4,8 +4,10 @@ import * as serializers from "../../../../../index"; import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { actor } from "../../../../index"; export declare const GameGuardRouting: core.serialization.ObjectSchema; export declare namespace GameGuardRouting { interface Raw { + authorization?: actor.PortAuthorization.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/actor/resources/common/types/index.d.ts b/sdks/full/typescript/types/serialization/resources/actor/resources/common/types/index.d.ts index 6ec7383456..d33b0c574c 100644 --- a/sdks/full/typescript/types/serialization/resources/actor/resources/common/types/index.d.ts +++ b/sdks/full/typescript/types/serialization/resources/actor/resources/common/types/index.d.ts @@ -8,6 +8,8 @@ export * from "./Port"; export * from "./PortProtocol"; export * from "./PortRouting"; export * from "./GameGuardRouting"; +export * from "./PortAuthorization"; +export * from "./PortQueryAuthorization"; export * from "./HostRouting"; export * from "./Build"; export * from "./Datacenter"; diff --git a/sdks/full/typescript/types/serialization/resources/group/types/index.d.ts b/sdks/full/typescript/types/serialization/resources/group/types/index.d.ts index 1c7da6f7f8..bbb5c4b821 100644 --- a/sdks/full/typescript/types/serialization/resources/group/types/index.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/types/index.d.ts @@ -5,7 +5,6 @@ export * from "./PrepareAvatarUploadRequest"; export * from "./PrepareAvatarUploadResponse"; export * from "./ValidateProfileRequest"; export * from "./ValidateProfileResponse"; -export * from "./SearchResponse"; export * from "./GetBansResponse"; export * from "./GetJoinRequestsResponse"; export * from "./GetMembersResponse"; diff --git a/sdks/full/typescript/types/serialization/resources/identity/client/requests/index.d.ts b/sdks/full/typescript/types/serialization/resources/identity/client/requests/index.d.ts index 0bd40dd05f..245b1d7764 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/client/requests/index.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/client/requests/index.d.ts @@ -5,4 +5,3 @@ export { SetGameActivityRequest } from "./SetGameActivityRequest"; export { UpdateStatusRequest } from "./UpdateStatusRequest"; export { PrepareAvatarUploadRequest } from "./PrepareAvatarUploadRequest"; export { SignupForBetaRequest } from "./SignupForBetaRequest"; -export { ReportRequest } from "./ReportRequest"; diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GlobalEventKind.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GlobalEventKind.d.ts index 64780f9966..cc79f68208 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GlobalEventKind.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GlobalEventKind.d.ts @@ -9,6 +9,5 @@ export declare const GlobalEventKind: core.serialization.ObjectSchema 0 { - endpointURL += "?" + queryParams.Encode() - } - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - var response *kv.GetResponse - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return nil, err - } - return response, nil -} - -// Puts (sets or overwrites) a key-value entry by key. -func (c *Client) Put(ctx context.Context, request *kv.PutRequest) error { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "kv/entries" - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPut, - Headers: c.header, - Request: request, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return err - } - return nil -} - -// Deletes a key-value entry by key. -func (c *Client) Delete(ctx context.Context, request *kv.DeleteOperationRequest) error { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "kv/entries" - - queryParams := make(url.Values) - queryParams.Add("key", fmt.Sprintf("%v", request.Key)) - if request.NamespaceId != nil { - queryParams.Add("namespace_id", fmt.Sprintf("%v", *request.NamespaceId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodDelete, - Headers: c.header, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return err - } - return nil -} - -// Lists all keys in a directory. -func (c *Client) List(ctx context.Context, request *kv.ListOperationRequest) (*kv.ListResponse, error) { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "kv/entries/list" - - queryParams := make(url.Values) - queryParams.Add("directory", fmt.Sprintf("%v", request.Directory)) - queryParams.Add("namespace_id", fmt.Sprintf("%v", request.NamespaceId)) - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - var response *kv.ListResponse - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return nil, err - } - return response, nil -} - -// Gets multiple key-value entries by key(s). -func (c *Client) GetBatch(ctx context.Context, request *kv.GetBatchRequest) (*kv.GetBatchResponse, error) { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "kv/entries/batch" - - queryParams := make(url.Values) - for _, value := range request.Keys { - queryParams.Add("keys", fmt.Sprintf("%v", value)) - } - if request.WatchIndex != nil { - queryParams.Add("watch_index", fmt.Sprintf("%v", *request.WatchIndex)) - } - if request.NamespaceId != nil { - queryParams.Add("namespace_id", fmt.Sprintf("%v", *request.NamespaceId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - var response *kv.GetBatchResponse - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return nil, err - } - return response, nil -} - -// Puts (sets or overwrites) multiple key-value entries by key(s). -func (c *Client) PutBatch(ctx context.Context, request *kv.PutBatchRequest) error { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "kv/entries/batch" - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPut, - Headers: c.header, - Request: request, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return err - } - return nil -} - -// Deletes multiple key-value entries by key(s). -func (c *Client) DeleteBatch(ctx context.Context, request *kv.DeleteBatchRequest) error { - baseURL := "https://api.rivet.gg" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "kv/entries/batch" - - queryParams := make(url.Values) - for _, value := range request.Keys { - queryParams.Add("keys", fmt.Sprintf("%v", value)) - } - if request.NamespaceId != nil { - queryParams.Add("namespace_id", fmt.Sprintf("%v", *request.NamespaceId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - errorDecoder := func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return err - } - apiError := core.NewAPIError(statusCode, errors.New(string(raw))) - decoder := json.NewDecoder(bytes.NewReader(raw)) - switch statusCode { - case 500: - value := new(sdk.InternalError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 429: - value := new(sdk.RateLimitError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 403: - value := new(sdk.ForbiddenError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 408: - value := new(sdk.UnauthorizedError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 404: - value := new(sdk.NotFoundError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - case 400: - value := new(sdk.BadRequestError) - value.APIError = apiError - if err := decoder.Decode(value); err != nil { - return apiError - } - return value - } - return apiError - } - - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodDelete, - Headers: c.header, - ErrorDecoder: errorDecoder, - }, - ); err != nil { - return err - } - return nil -} diff --git a/sdks/runtime/go/kv/kv.go b/sdks/runtime/go/kv/kv.go deleted file mode 100644 index ce6bb13e1f..0000000000 --- a/sdks/runtime/go/kv/kv.go +++ /dev/null @@ -1,163 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -package kv - -import ( - json "encoding/json" - fmt "fmt" - uuid "github.com/google/uuid" - sdk "sdk" - core "sdk/core" -) - -type GetBatchResponse struct { - Entries []*Entry `json:"entries,omitempty"` - Watch *sdk.WatchResponse `json:"watch,omitempty"` - - _rawJSON json.RawMessage -} - -func (g *GetBatchResponse) UnmarshalJSON(data []byte) error { - type unmarshaler GetBatchResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *g = GetBatchResponse(value) - g._rawJSON = json.RawMessage(data) - return nil -} - -func (g *GetBatchResponse) String() string { - if len(g._rawJSON) > 0 { - if value, err := core.StringifyJSON(g._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(g); err == nil { - return value - } - return fmt.Sprintf("%#v", g) -} - -type GetResponse struct { - Value Value `json:"value,omitempty"` - // Whether or not the entry has been deleted. Only set when watching this endpoint. - Deleted *bool `json:"deleted,omitempty"` - Watch *sdk.WatchResponse `json:"watch,omitempty"` - - _rawJSON json.RawMessage -} - -func (g *GetResponse) UnmarshalJSON(data []byte) error { - type unmarshaler GetResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *g = GetResponse(value) - g._rawJSON = json.RawMessage(data) - return nil -} - -func (g *GetResponse) String() string { - if len(g._rawJSON) > 0 { - if value, err := core.StringifyJSON(g._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(g); err == nil { - return value - } - return fmt.Sprintf("%#v", g) -} - -type ListResponse struct { - Entries []*Entry `json:"entries,omitempty"` - - _rawJSON json.RawMessage -} - -func (l *ListResponse) UnmarshalJSON(data []byte) error { - type unmarshaler ListResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *l = ListResponse(value) - l._rawJSON = json.RawMessage(data) - return nil -} - -func (l *ListResponse) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(l); err == nil { - return value - } - return fmt.Sprintf("%#v", l) -} - -type PutBatchRequest struct { - NamespaceId *uuid.UUID `json:"namespace_id,omitempty"` - Entries []*PutEntry `json:"entries,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PutBatchRequest) UnmarshalJSON(data []byte) error { - type unmarshaler PutBatchRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PutBatchRequest(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PutBatchRequest) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PutRequest struct { - NamespaceId *uuid.UUID `json:"namespace_id,omitempty"` - Key Key `json:"key"` - Value Value `json:"value,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PutRequest) UnmarshalJSON(data []byte) error { - type unmarshaler PutRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PutRequest(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PutRequest) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} diff --git a/sdks/runtime/go/kv/types.go b/sdks/runtime/go/kv/types.go deleted file mode 100644 index 528222e4f0..0000000000 --- a/sdks/runtime/go/kv/types.go +++ /dev/null @@ -1,116 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -package kv - -import ( - json "encoding/json" - fmt "fmt" - uuid "github.com/google/uuid" - core "sdk/core" -) - -type DeleteOperationRequest struct { - Key Key `json:"-"` - NamespaceId *uuid.UUID `json:"-"` -} - -type DeleteBatchRequest struct { - Keys []Key `json:"-"` - NamespaceId *uuid.UUID `json:"-"` -} - -type GetOperationRequest struct { - Key Key `json:"-"` - // A query parameter denoting the requests watch index. - WatchIndex *string `json:"-"` - NamespaceId *uuid.UUID `json:"-"` -} - -type GetBatchRequest struct { - Keys []Key `json:"-"` - // A query parameter denoting the requests watch index. - WatchIndex *string `json:"-"` - NamespaceId *uuid.UUID `json:"-"` -} - -type ListOperationRequest struct { - Directory Directory `json:"-"` - NamespaceId uuid.UUID `json:"-"` -} - -type Directory = string - -// A key-value entry. -type Entry struct { - Key Key `json:"key"` - Value Value `json:"value,omitempty"` - Deleted *bool `json:"deleted,omitempty"` - - _rawJSON json.RawMessage -} - -func (e *Entry) UnmarshalJSON(data []byte) error { - type unmarshaler Entry - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *e = Entry(value) - e._rawJSON = json.RawMessage(data) - return nil -} - -func (e *Entry) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value - } - return fmt.Sprintf("%#v", e) -} - -// A string representing a key in the key-value database. -// Maximum length of 512 characters. -// _Recommended Key Path Format_ -// Key path components are split by a slash (e.g. `a/b/c` has the path components `["a", "b", "c"]`). Slashes can be escaped by using a backslash (e.g. `a/b\/c/d` has the path components `["a", "b/c", "d"]`). -// This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. -type Key = string - -// A new entry to insert into the key-value database. -type PutEntry struct { - Key Key `json:"key"` - Value Value `json:"value,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PutEntry) UnmarshalJSON(data []byte) error { - type unmarshaler PutEntry - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PutEntry(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PutEntry) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -// A JSON object stored in the KV database. -// A `null` value indicates the entry is deleted. -// Maximum length of 262,144 bytes when encoded. -type Value = interface{} diff --git a/sdks/runtime/go/types.go b/sdks/runtime/go/types.go index fefe11d8c8..0aff886c97 100644 --- a/sdks/runtime/go/types.go +++ b/sdks/runtime/go/types.go @@ -52,35 +52,3 @@ type Identifier = string // Documentation at https://jwt.io/ type Jwt = string - -// Provided by watchable endpoints used in blocking loops. -type WatchResponse struct { - // Index indicating the version of the data responded. - // Pass this to `WatchQuery` to block and wait for the next response. - Index string `json:"index"` - - _rawJSON json.RawMessage -} - -func (w *WatchResponse) UnmarshalJSON(data []byte) error { - type unmarshaler WatchResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *w = WatchResponse(value) - w._rawJSON = json.RawMessage(data) - return nil -} - -func (w *WatchResponse) String() string { - if len(w._rawJSON) > 0 { - if value, err := core.StringifyJSON(w._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(w); err == nil { - return value - } - return fmt.Sprintf("%#v", w) -} diff --git a/sdks/runtime/openapi/openapi.yml b/sdks/runtime/openapi/openapi.yml index fe701e23b6..06659b0695 100644 --- a/sdks/runtime/openapi/openapi.yml +++ b/sdks/runtime/openapi/openapi.yml @@ -3,423 +3,6 @@ info: title: Rivet API version: '' paths: - /kv/entries: - get: - description: Returns a specific key-value entry by key. - operationId: kv_get - tags: - - Kv - parameters: - - name: key - in: query - required: true - schema: - $ref: '#/components/schemas/KvKey' - - name: watch_index - in: query - description: A query parameter denoting the requests watch index. - required: false - schema: - type: string - - name: namespace_id - in: query - required: false - schema: - type: string - format: uuid - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/KvGetResponse' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: &ref_0 - - BearerAuth: [] - put: - description: Puts (sets or overwrites) a key-value entry by key. - operationId: kv_put - tags: - - Kv - parameters: [] - responses: - '204': - description: '' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/KvPutRequest' - delete: - description: Deletes a key-value entry by key. - operationId: kv_delete - tags: - - Kv - parameters: - - name: key - in: query - required: true - schema: - $ref: '#/components/schemas/KvKey' - - name: namespace_id - in: query - required: false - schema: - type: string - format: uuid - responses: - '204': - description: '' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 - /kv/entries/list: - get: - description: Lists all keys in a directory. - operationId: kv_list - tags: - - Kv - parameters: - - name: directory - in: query - required: true - schema: - $ref: '#/components/schemas/KvDirectory' - - name: namespace_id - in: query - required: true - schema: - type: string - format: uuid - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/KvListResponse' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 - /kv/entries/batch: - get: - description: Gets multiple key-value entries by key(s). - operationId: kv_getBatch - tags: - - Kv - parameters: - - name: keys - in: query - required: true - schema: - $ref: '#/components/schemas/KvKey' - - name: watch_index - in: query - description: A query parameter denoting the requests watch index. - required: false - schema: - type: string - - name: namespace_id - in: query - required: false - schema: - type: string - format: uuid - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/KvGetBatchResponse' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 - put: - description: Puts (sets or overwrites) multiple key-value entries by key(s). - operationId: kv_putBatch - tags: - - Kv - parameters: [] - responses: - '204': - description: '' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/KvPutBatchRequest' - delete: - description: Deletes multiple key-value entries by key(s). - operationId: kv_deleteBatch - tags: - - Kv - parameters: - - name: keys - in: query - required: true - schema: - $ref: '#/components/schemas/KvKey' - - name: namespace_id - in: query - required: false - schema: - type: string - format: uuid - responses: - '204': - description: '' - '400': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '403': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '404': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '408': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '429': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - '500': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - security: *ref_0 /matchmaker/lobbies/ready: post: description: >- @@ -477,7 +60,8 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorBody' - security: *ref_0 + security: &ref_0 + - BearerAuth: [] /matchmaker/lobbies/closed: put: description: >- @@ -1356,67 +940,6 @@ paths: security: *ref_0 components: schemas: - KvGetResponse: - type: object - properties: - value: - $ref: '#/components/schemas/KvValue' - deleted: - type: boolean - description: >- - Whether or not the entry has been deleted. Only set when watching - this endpoint. - watch: - $ref: '#/components/schemas/WatchResponse' - required: - - value - - watch - KvPutRequest: - type: object - properties: - namespace_id: - type: string - format: uuid - key: - $ref: '#/components/schemas/KvKey' - value: - $ref: '#/components/schemas/KvValue' - required: - - key - - value - KvListResponse: - type: object - properties: - entries: - type: array - items: - $ref: '#/components/schemas/KvEntry' - required: - - entries - KvGetBatchResponse: - type: object - properties: - entries: - type: array - items: - $ref: '#/components/schemas/KvEntry' - watch: - $ref: '#/components/schemas/WatchResponse' - required: - - entries - - watch - KvPutBatchRequest: - type: object - properties: - namespace_id: - type: string - format: uuid - entries: - type: array - items: - $ref: '#/components/schemas/KvPutEntry' - required: - - entries CaptchaConfig: type: object description: Methods to verify a captcha @@ -1451,17 +974,6 @@ components: Jwt: type: string description: Documentation at https://jwt.io/ - WatchResponse: - type: object - description: Provided by watchable endpoints used in blocking loops. - properties: - index: - type: string - description: |- - Index indicating the version of the data responded. - Pass this to `WatchQuery` to block and wait for the next response. - required: - - index DisplayName: type: string description: Represent a resource's readable display name. @@ -1510,52 +1022,6 @@ components: required: - kilometers - miles - KvKey: - type: string - description: >- - A string representing a key in the key-value database. - - Maximum length of 512 characters. - - _Recommended Key Path Format_ - - Key path components are split by a slash (e.g. `a/b/c` has the path - components `["a", "b", "c"]`). Slashes can be escaped by using a - backslash (e.g. `a/b\/c/d` has the path components `["a", "b/c", "d"]`). - - This format is not enforced by Rivet, but the tools built around Rivet - KV work better if this format is used. - KvDirectory: - type: string - KvValue: - description: |- - A JSON object stored in the KV database. - A `null` value indicates the entry is deleted. - Maximum length of 262,144 bytes when encoded. - KvEntry: - type: object - description: A key-value entry. - properties: - key: - $ref: '#/components/schemas/KvKey' - value: - $ref: '#/components/schemas/KvValue' - deleted: - type: boolean - required: - - key - - value - KvPutEntry: - type: object - description: A new entry to insert into the key-value database. - properties: - key: - $ref: '#/components/schemas/KvKey' - value: - $ref: '#/components/schemas/KvValue' - required: - - key - - value MatchmakerLobbyInfo: type: object description: A public lobby in the lobby list. diff --git a/sdks/runtime/openapi_compat/openapi.yml b/sdks/runtime/openapi_compat/openapi.yml index 69615373a7..d28e3aa8c4 100644 --- a/sdks/runtime/openapi_compat/openapi.yml +++ b/sdks/runtime/openapi_compat/openapi.yml @@ -81,112 +81,6 @@ components: Jwt: description: Documentation at https://jwt.io/ type: string - KvDirectory: - type: string - KvEntry: - description: A key-value entry. - properties: - deleted: - type: boolean - key: - $ref: '#/components/schemas/KvKey' - value: - $ref: '#/components/schemas/KvValue' - required: - - key - - value - type: object - KvGetBatchResponse: - properties: - entries: - items: - $ref: '#/components/schemas/KvEntry' - type: array - watch: - $ref: '#/components/schemas/WatchResponse' - required: - - entries - - watch - type: object - KvGetResponse: - properties: - deleted: - description: Whether or not the entry has been deleted. Only set when watching - this endpoint. - type: boolean - value: - $ref: '#/components/schemas/KvValue' - watch: - $ref: '#/components/schemas/WatchResponse' - required: - - value - - watch - type: object - KvKey: - description: 'A string representing a key in the key-value database. - - Maximum length of 512 characters. - - _Recommended Key Path Format_ - - Key path components are split by a slash (e.g. `a/b/c` has the path components - `["a", "b", "c"]`). Slashes can be escaped by using a backslash (e.g. `a/b\/c/d` - has the path components `["a", "b/c", "d"]`). - - This format is not enforced by Rivet, but the tools built around Rivet KV - work better if this format is used.' - type: string - KvListResponse: - properties: - entries: - items: - $ref: '#/components/schemas/KvEntry' - type: array - required: - - entries - type: object - KvPutBatchRequest: - properties: - entries: - items: - $ref: '#/components/schemas/KvPutEntry' - type: array - namespace_id: - format: uuid - type: string - required: - - entries - type: object - KvPutEntry: - description: A new entry to insert into the key-value database. - properties: - key: - $ref: '#/components/schemas/KvKey' - value: - $ref: '#/components/schemas/KvValue' - required: - - key - - value - type: object - KvPutRequest: - properties: - key: - $ref: '#/components/schemas/KvKey' - namespace_id: - format: uuid - type: string - value: - $ref: '#/components/schemas/KvValue' - required: - - key - - value - type: object - KvValue: - description: 'A JSON object stored in the KV database. - - A `null` value indicates the entry is deleted. - - Maximum length of 262,144 bytes when encoded.' MatchmakerCreateLobbyResponse: properties: lobby: @@ -432,17 +326,6 @@ components: required: - player_count type: object - WatchResponse: - description: Provided by watchable endpoints used in blocking loops. - properties: - index: - description: 'Index indicating the version of the data responded. - - Pass this to `WatchQuery` to block and wait for the next response.' - type: string - required: - - index - type: object securitySchemes: BearerAuth: scheme: bearer @@ -452,423 +335,6 @@ info: version: 0.0.1 openapi: 3.0.1 paths: - /kv/entries: - delete: - description: Deletes a key-value entry by key. - operationId: kv_delete - parameters: - - in: query - name: key - required: true - schema: - $ref: '#/components/schemas/KvKey' - - in: query - name: namespace_id - required: false - schema: - format: uuid - type: string - responses: - '204': - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: &id001 - - BearerAuth: [] - tags: - - Kv - get: - description: Returns a specific key-value entry by key. - operationId: kv_get - parameters: - - in: query - name: key - required: true - schema: - $ref: '#/components/schemas/KvKey' - - description: A query parameter denoting the requests watch index. - in: query - name: watch_index - required: false - schema: - type: string - - in: query - name: namespace_id - required: false - schema: - format: uuid - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/KvGetResponse' - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Kv - put: - description: Puts (sets or overwrites) a key-value entry by key. - operationId: kv_put - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/KvPutRequest' - required: true - responses: - '204': - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Kv - /kv/entries/batch: - delete: - description: Deletes multiple key-value entries by key(s). - operationId: kv_deleteBatch - parameters: - - in: query - name: keys - required: true - schema: - $ref: '#/components/schemas/KvKey' - - in: query - name: namespace_id - required: false - schema: - format: uuid - type: string - responses: - '204': - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Kv - get: - description: Gets multiple key-value entries by key(s). - operationId: kv_getBatch - parameters: - - in: query - name: keys - required: true - schema: - $ref: '#/components/schemas/KvKey' - - description: A query parameter denoting the requests watch index. - in: query - name: watch_index - required: false - schema: - type: string - - in: query - name: namespace_id - required: false - schema: - format: uuid - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/KvGetBatchResponse' - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Kv - put: - description: Puts (sets or overwrites) multiple key-value entries by key(s). - operationId: kv_putBatch - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/KvPutBatchRequest' - required: true - responses: - '204': - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Kv - /kv/entries/list: - get: - description: Lists all keys in a directory. - operationId: kv_list - parameters: - - in: query - name: directory - required: true - schema: - $ref: '#/components/schemas/KvDirectory' - - in: query - name: namespace_id - required: true - schema: - format: uuid - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/KvListResponse' - description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '429': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorBody' - description: '' - security: *id001 - tags: - - Kv /matchmaker/lobbies/closed: put: description: 'If `is_closed` is `true`, the matchmaker will no longer route @@ -943,7 +409,8 @@ paths: schema: $ref: '#/components/schemas/ErrorBody' description: '' - security: *id001 + security: &id001 + - BearerAuth: [] tags: - MatchmakerLobbies /matchmaker/lobbies/create: diff --git a/sdks/runtime/rust/.openapi-generator/FILES b/sdks/runtime/rust/.openapi-generator/FILES index 03746837a0..3ae89dda8f 100644 --- a/sdks/runtime/rust/.openapi-generator/FILES +++ b/sdks/runtime/rust/.openapi-generator/FILES @@ -9,14 +9,6 @@ docs/CaptchaConfigTurnstile.md docs/ErrorBody.md docs/GeoCoord.md docs/GeoDistance.md -docs/KvApi.md -docs/KvEntry.md -docs/KvGetBatchResponse.md -docs/KvGetResponse.md -docs/KvListResponse.md -docs/KvPutBatchRequest.md -docs/KvPutEntry.md -docs/KvPutRequest.md docs/MatchmakerCreateLobbyResponse.md docs/MatchmakerCustomLobbyPublicity.md docs/MatchmakerFindLobbyResponse.md @@ -42,10 +34,8 @@ docs/MatchmakerPlayersConnectedRequest.md docs/MatchmakerRegionInfo.md docs/MatchmakerRegionStatistics.md docs/MatchmakerRegionsApi.md -docs/WatchResponse.md git_push.sh src/apis/configuration.rs -src/apis/kv_api.rs src/apis/matchmaker_lobbies_api.rs src/apis/matchmaker_players_api.rs src/apis/matchmaker_regions_api.rs @@ -57,13 +47,6 @@ src/models/captcha_config_turnstile.rs src/models/error_body.rs src/models/geo_coord.rs src/models/geo_distance.rs -src/models/kv_entry.rs -src/models/kv_get_batch_response.rs -src/models/kv_get_response.rs -src/models/kv_list_response.rs -src/models/kv_put_batch_request.rs -src/models/kv_put_entry.rs -src/models/kv_put_request.rs src/models/matchmaker_create_lobby_response.rs src/models/matchmaker_custom_lobby_publicity.rs src/models/matchmaker_find_lobby_response.rs @@ -87,4 +70,3 @@ src/models/matchmaker_players_connected_request.rs src/models/matchmaker_region_info.rs src/models/matchmaker_region_statistics.rs src/models/mod.rs -src/models/watch_response.rs diff --git a/sdks/runtime/rust/README.md b/sdks/runtime/rust/README.md index 49cd8d55dc..85ce7f37aa 100644 --- a/sdks/runtime/rust/README.md +++ b/sdks/runtime/rust/README.md @@ -25,13 +25,6 @@ All URIs are relative to *https://api.rivet.gg* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*KvApi* | [**kv_delete**](docs/KvApi.md#kv_delete) | **DELETE** /kv/entries | -*KvApi* | [**kv_delete_batch**](docs/KvApi.md#kv_delete_batch) | **DELETE** /kv/entries/batch | -*KvApi* | [**kv_get**](docs/KvApi.md#kv_get) | **GET** /kv/entries | -*KvApi* | [**kv_get_batch**](docs/KvApi.md#kv_get_batch) | **GET** /kv/entries/batch | -*KvApi* | [**kv_list**](docs/KvApi.md#kv_list) | **GET** /kv/entries/list | -*KvApi* | [**kv_put**](docs/KvApi.md#kv_put) | **PUT** /kv/entries | -*KvApi* | [**kv_put_batch**](docs/KvApi.md#kv_put_batch) | **PUT** /kv/entries/batch | *MatchmakerLobbiesApi* | [**matchmaker_lobbies_create**](docs/MatchmakerLobbiesApi.md#matchmaker_lobbies_create) | **POST** /matchmaker/lobbies/create | *MatchmakerLobbiesApi* | [**matchmaker_lobbies_find**](docs/MatchmakerLobbiesApi.md#matchmaker_lobbies_find) | **POST** /matchmaker/lobbies/find | *MatchmakerLobbiesApi* | [**matchmaker_lobbies_get_state**](docs/MatchmakerLobbiesApi.md#matchmaker_lobbies_get_state) | **GET** /matchmaker/lobbies/{lobby_id}/state | @@ -54,13 +47,6 @@ Class | Method | HTTP request | Description - [ErrorBody](docs/ErrorBody.md) - [GeoCoord](docs/GeoCoord.md) - [GeoDistance](docs/GeoDistance.md) - - [KvEntry](docs/KvEntry.md) - - [KvGetBatchResponse](docs/KvGetBatchResponse.md) - - [KvGetResponse](docs/KvGetResponse.md) - - [KvListResponse](docs/KvListResponse.md) - - [KvPutBatchRequest](docs/KvPutBatchRequest.md) - - [KvPutEntry](docs/KvPutEntry.md) - - [KvPutRequest](docs/KvPutRequest.md) - [MatchmakerCreateLobbyResponse](docs/MatchmakerCreateLobbyResponse.md) - [MatchmakerCustomLobbyPublicity](docs/MatchmakerCustomLobbyPublicity.md) - [MatchmakerFindLobbyResponse](docs/MatchmakerFindLobbyResponse.md) @@ -83,7 +69,6 @@ Class | Method | HTTP request | Description - [MatchmakerPlayersConnectedRequest](docs/MatchmakerPlayersConnectedRequest.md) - [MatchmakerRegionInfo](docs/MatchmakerRegionInfo.md) - [MatchmakerRegionStatistics](docs/MatchmakerRegionStatistics.md) - - [WatchResponse](docs/WatchResponse.md) To get access to the crate's generated documentation, use: diff --git a/sdks/runtime/rust/docs/KvApi.md b/sdks/runtime/rust/docs/KvApi.md deleted file mode 100644 index acb99b4f9d..0000000000 --- a/sdks/runtime/rust/docs/KvApi.md +++ /dev/null @@ -1,232 +0,0 @@ -# \KvApi - -All URIs are relative to *https://api.rivet.gg* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**kv_delete**](KvApi.md#kv_delete) | **DELETE** /kv/entries | -[**kv_delete_batch**](KvApi.md#kv_delete_batch) | **DELETE** /kv/entries/batch | -[**kv_get**](KvApi.md#kv_get) | **GET** /kv/entries | -[**kv_get_batch**](KvApi.md#kv_get_batch) | **GET** /kv/entries/batch | -[**kv_list**](KvApi.md#kv_list) | **GET** /kv/entries/list | -[**kv_put**](KvApi.md#kv_put) | **PUT** /kv/entries | -[**kv_put_batch**](KvApi.md#kv_put_batch) | **PUT** /kv/entries/batch | - - - -## kv_delete - -> kv_delete(key, namespace_id) - - -Deletes a key-value entry by key. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**key** | **String** | | [required] | -**namespace_id** | Option<**uuid::Uuid**> | | | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## kv_delete_batch - -> kv_delete_batch(keys, namespace_id) - - -Deletes multiple key-value entries by key(s). - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**keys** | **String** | | [required] | -**namespace_id** | Option<**uuid::Uuid**> | | | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## kv_get - -> crate::models::KvGetResponse kv_get(key, watch_index, namespace_id) - - -Returns a specific key-value entry by key. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**key** | **String** | | [required] | -**watch_index** | Option<**String**> | A query parameter denoting the requests watch index. | | -**namespace_id** | Option<**uuid::Uuid**> | | | - -### Return type - -[**crate::models::KvGetResponse**](KvGetResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## kv_get_batch - -> crate::models::KvGetBatchResponse kv_get_batch(keys, watch_index, namespace_id) - - -Gets multiple key-value entries by key(s). - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**keys** | **String** | | [required] | -**watch_index** | Option<**String**> | A query parameter denoting the requests watch index. | | -**namespace_id** | Option<**uuid::Uuid**> | | | - -### Return type - -[**crate::models::KvGetBatchResponse**](KvGetBatchResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## kv_list - -> crate::models::KvListResponse kv_list(directory, namespace_id) - - -Lists all keys in a directory. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**directory** | **String** | | [required] | -**namespace_id** | **uuid::Uuid** | | [required] | - -### Return type - -[**crate::models::KvListResponse**](KvListResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## kv_put - -> kv_put(kv_put_request) - - -Puts (sets or overwrites) a key-value entry by key. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**kv_put_request** | [**KvPutRequest**](KvPutRequest.md) | | [required] | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -## kv_put_batch - -> kv_put_batch(kv_put_batch_request) - - -Puts (sets or overwrites) multiple key-value entries by key(s). - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**kv_put_batch_request** | [**KvPutBatchRequest**](KvPutBatchRequest.md) | | [required] | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/sdks/runtime/rust/docs/KvEntry.md b/sdks/runtime/rust/docs/KvEntry.md deleted file mode 100644 index 203241453f..0000000000 --- a/sdks/runtime/rust/docs/KvEntry.md +++ /dev/null @@ -1,13 +0,0 @@ -# KvEntry - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**deleted** | Option<**bool**> | | [optional] -**key** | **String** | A string representing a key in the key-value database. Maximum length of 512 characters. _Recommended Key Path Format_ Key path components are split by a slash (e.g. `a/b/c` has the path components `[\"a\", \"b\", \"c\"]`). Slashes can be escaped by using a backslash (e.g. `a/b/c/d` has the path components `[\"a\", \"b/c\", \"d\"]`). This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. | -**value** | Option<[**serde_json::Value**](.md)> | A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/runtime/rust/docs/KvGetBatchResponse.md b/sdks/runtime/rust/docs/KvGetBatchResponse.md deleted file mode 100644 index 33ecbfdd4e..0000000000 --- a/sdks/runtime/rust/docs/KvGetBatchResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# KvGetBatchResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**entries** | [**Vec**](KvEntry.md) | | -**watch** | [**crate::models::WatchResponse**](WatchResponse.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/runtime/rust/docs/KvGetResponse.md b/sdks/runtime/rust/docs/KvGetResponse.md deleted file mode 100644 index 323c9260e4..0000000000 --- a/sdks/runtime/rust/docs/KvGetResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# KvGetResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**deleted** | Option<**bool**> | Whether or not the entry has been deleted. Only set when watching this endpoint. | [optional] -**value** | Option<[**serde_json::Value**](.md)> | A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. | -**watch** | [**crate::models::WatchResponse**](WatchResponse.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/runtime/rust/docs/KvListResponse.md b/sdks/runtime/rust/docs/KvListResponse.md deleted file mode 100644 index 2315cef877..0000000000 --- a/sdks/runtime/rust/docs/KvListResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# KvListResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**entries** | [**Vec**](KvEntry.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/runtime/rust/docs/KvPutBatchRequest.md b/sdks/runtime/rust/docs/KvPutBatchRequest.md deleted file mode 100644 index 07c4ee6c7c..0000000000 --- a/sdks/runtime/rust/docs/KvPutBatchRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# KvPutBatchRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**entries** | [**Vec**](KvPutEntry.md) | | -**namespace_id** | Option<[**uuid::Uuid**](uuid::Uuid.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/runtime/rust/docs/KvPutEntry.md b/sdks/runtime/rust/docs/KvPutEntry.md deleted file mode 100644 index 9e2d465b8c..0000000000 --- a/sdks/runtime/rust/docs/KvPutEntry.md +++ /dev/null @@ -1,12 +0,0 @@ -# KvPutEntry - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | **String** | A string representing a key in the key-value database. Maximum length of 512 characters. _Recommended Key Path Format_ Key path components are split by a slash (e.g. `a/b/c` has the path components `[\"a\", \"b\", \"c\"]`). Slashes can be escaped by using a backslash (e.g. `a/b/c/d` has the path components `[\"a\", \"b/c\", \"d\"]`). This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. | -**value** | Option<[**serde_json::Value**](.md)> | A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/runtime/rust/docs/KvPutRequest.md b/sdks/runtime/rust/docs/KvPutRequest.md deleted file mode 100644 index 44af60b311..0000000000 --- a/sdks/runtime/rust/docs/KvPutRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# KvPutRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | **String** | A string representing a key in the key-value database. Maximum length of 512 characters. _Recommended Key Path Format_ Key path components are split by a slash (e.g. `a/b/c` has the path components `[\"a\", \"b\", \"c\"]`). Slashes can be escaped by using a backslash (e.g. `a/b/c/d` has the path components `[\"a\", \"b/c\", \"d\"]`). This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. | -**namespace_id** | Option<[**uuid::Uuid**](uuid::Uuid.md)> | | [optional] -**value** | Option<[**serde_json::Value**](.md)> | A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/runtime/rust/docs/WatchResponse.md b/sdks/runtime/rust/docs/WatchResponse.md deleted file mode 100644 index 9b64aba4f0..0000000000 --- a/sdks/runtime/rust/docs/WatchResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# WatchResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**index** | **String** | Index indicating the version of the data responded. Pass this to `WatchQuery` to block and wait for the next response. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/runtime/rust/src/apis/kv_api.rs b/sdks/runtime/rust/src/apis/kv_api.rs deleted file mode 100644 index e54f756b80..0000000000 --- a/sdks/runtime/rust/src/apis/kv_api.rs +++ /dev/null @@ -1,352 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - -use reqwest; - -use crate::apis::ResponseContent; -use super::{Error, configuration}; - - -/// struct for typed errors of method [`kv_delete`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum KvDeleteError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`kv_delete_batch`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum KvDeleteBatchError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`kv_get`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum KvGetError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`kv_get_batch`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum KvGetBatchError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`kv_list`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum KvListError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`kv_put`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum KvPutError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`kv_put_batch`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum KvPutBatchError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), -} - - -/// Deletes a key-value entry by key. -pub async fn kv_delete(configuration: &configuration::Configuration, key: &str, namespace_id: Option<&str>) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("key", &key.to_string())]); - if let Some(ref local_var_str) = namespace_id { - local_var_req_builder = local_var_req_builder.query(&[("namespace_id", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Deletes multiple key-value entries by key(s). -pub async fn kv_delete_batch(configuration: &configuration::Configuration, keys: &str, namespace_id: Option<&str>) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries/batch", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("keys", &keys.to_string())]); - if let Some(ref local_var_str) = namespace_id { - local_var_req_builder = local_var_req_builder.query(&[("namespace_id", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Returns a specific key-value entry by key. -pub async fn kv_get(configuration: &configuration::Configuration, key: &str, watch_index: Option<&str>, namespace_id: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("key", &key.to_string())]); - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = namespace_id { - local_var_req_builder = local_var_req_builder.query(&[("namespace_id", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Gets multiple key-value entries by key(s). -pub async fn kv_get_batch(configuration: &configuration::Configuration, keys: &str, watch_index: Option<&str>, namespace_id: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries/batch", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("keys", &keys.to_string())]); - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = namespace_id { - local_var_req_builder = local_var_req_builder.query(&[("namespace_id", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Lists all keys in a directory. -pub async fn kv_list(configuration: &configuration::Configuration, directory: &str, namespace_id: &str) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries/list", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("directory", &directory.to_string())]); - local_var_req_builder = local_var_req_builder.query(&[("namespace_id", &namespace_id.to_string())]); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Puts (sets or overwrites) a key-value entry by key. -pub async fn kv_put(configuration: &configuration::Configuration, kv_put_request: crate::models::KvPutRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&kv_put_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Puts (sets or overwrites) multiple key-value entries by key(s). -pub async fn kv_put_batch(configuration: &configuration::Configuration, kv_put_batch_request: crate::models::KvPutBatchRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries/batch", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&kv_put_batch_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - diff --git a/sdks/runtime/rust/src/apis/mod.rs b/sdks/runtime/rust/src/apis/mod.rs index b37b4b6cc8..4a8fe5ba73 100644 --- a/sdks/runtime/rust/src/apis/mod.rs +++ b/sdks/runtime/rust/src/apis/mod.rs @@ -90,7 +90,6 @@ pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String unimplemented!("Only objects are supported with style=deepObject") } -pub mod kv_api; pub mod matchmaker_lobbies_api; pub mod matchmaker_players_api; pub mod matchmaker_regions_api; diff --git a/sdks/runtime/rust/src/models/kv_entry.rs b/sdks/runtime/rust/src/models/kv_entry.rs deleted file mode 100644 index 6d9e82a460..0000000000 --- a/sdks/runtime/rust/src/models/kv_entry.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -/// KvEntry : A key-value entry. - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct KvEntry { - #[serde(rename = "deleted", skip_serializing_if = "Option::is_none")] - pub deleted: Option, - /// A string representing a key in the key-value database. Maximum length of 512 characters. _Recommended Key Path Format_ Key path components are split by a slash (e.g. `a/b/c` has the path components `[\"a\", \"b\", \"c\"]`). Slashes can be escaped by using a backslash (e.g. `a/b/c/d` has the path components `[\"a\", \"b/c\", \"d\"]`). This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. - #[serde(rename = "key")] - pub key: String, - /// A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. - #[serde(rename = "value", deserialize_with = "Option::deserialize")] - pub value: Option, -} - -impl KvEntry { - /// A key-value entry. - pub fn new(key: String, value: Option) -> KvEntry { - KvEntry { - deleted: None, - key, - value, - } - } -} - - diff --git a/sdks/runtime/rust/src/models/kv_get_batch_response.rs b/sdks/runtime/rust/src/models/kv_get_batch_response.rs deleted file mode 100644 index cf0a07971f..0000000000 --- a/sdks/runtime/rust/src/models/kv_get_batch_response.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct KvGetBatchResponse { - #[serde(rename = "entries")] - pub entries: Vec, - #[serde(rename = "watch")] - pub watch: Box, -} - -impl KvGetBatchResponse { - pub fn new(entries: Vec, watch: crate::models::WatchResponse) -> KvGetBatchResponse { - KvGetBatchResponse { - entries, - watch: Box::new(watch), - } - } -} - - diff --git a/sdks/runtime/rust/src/models/kv_get_response.rs b/sdks/runtime/rust/src/models/kv_get_response.rs deleted file mode 100644 index 9386defb05..0000000000 --- a/sdks/runtime/rust/src/models/kv_get_response.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct KvGetResponse { - /// Whether or not the entry has been deleted. Only set when watching this endpoint. - #[serde(rename = "deleted", skip_serializing_if = "Option::is_none")] - pub deleted: Option, - /// A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. - #[serde(rename = "value", deserialize_with = "Option::deserialize")] - pub value: Option, - #[serde(rename = "watch")] - pub watch: Box, -} - -impl KvGetResponse { - pub fn new(value: Option, watch: crate::models::WatchResponse) -> KvGetResponse { - KvGetResponse { - deleted: None, - value, - watch: Box::new(watch), - } - } -} - - diff --git a/sdks/runtime/rust/src/models/kv_list_response.rs b/sdks/runtime/rust/src/models/kv_list_response.rs deleted file mode 100644 index 25cfadcf4a..0000000000 --- a/sdks/runtime/rust/src/models/kv_list_response.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct KvListResponse { - #[serde(rename = "entries")] - pub entries: Vec, -} - -impl KvListResponse { - pub fn new(entries: Vec) -> KvListResponse { - KvListResponse { - entries, - } - } -} - - diff --git a/sdks/runtime/rust/src/models/kv_put_batch_request.rs b/sdks/runtime/rust/src/models/kv_put_batch_request.rs deleted file mode 100644 index 2bac4cf812..0000000000 --- a/sdks/runtime/rust/src/models/kv_put_batch_request.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct KvPutBatchRequest { - #[serde(rename = "entries")] - pub entries: Vec, - #[serde(rename = "namespace_id", skip_serializing_if = "Option::is_none")] - pub namespace_id: Option, -} - -impl KvPutBatchRequest { - pub fn new(entries: Vec) -> KvPutBatchRequest { - KvPutBatchRequest { - entries, - namespace_id: None, - } - } -} - - diff --git a/sdks/runtime/rust/src/models/kv_put_entry.rs b/sdks/runtime/rust/src/models/kv_put_entry.rs deleted file mode 100644 index 9d6ad9230e..0000000000 --- a/sdks/runtime/rust/src/models/kv_put_entry.rs +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -/// KvPutEntry : A new entry to insert into the key-value database. - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct KvPutEntry { - /// A string representing a key in the key-value database. Maximum length of 512 characters. _Recommended Key Path Format_ Key path components are split by a slash (e.g. `a/b/c` has the path components `[\"a\", \"b\", \"c\"]`). Slashes can be escaped by using a backslash (e.g. `a/b/c/d` has the path components `[\"a\", \"b/c\", \"d\"]`). This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. - #[serde(rename = "key")] - pub key: String, - /// A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. - #[serde(rename = "value", deserialize_with = "Option::deserialize")] - pub value: Option, -} - -impl KvPutEntry { - /// A new entry to insert into the key-value database. - pub fn new(key: String, value: Option) -> KvPutEntry { - KvPutEntry { - key, - value, - } - } -} - - diff --git a/sdks/runtime/rust/src/models/kv_put_request.rs b/sdks/runtime/rust/src/models/kv_put_request.rs deleted file mode 100644 index d6bac35f58..0000000000 --- a/sdks/runtime/rust/src/models/kv_put_request.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct KvPutRequest { - /// A string representing a key in the key-value database. Maximum length of 512 characters. _Recommended Key Path Format_ Key path components are split by a slash (e.g. `a/b/c` has the path components `[\"a\", \"b\", \"c\"]`). Slashes can be escaped by using a backslash (e.g. `a/b/c/d` has the path components `[\"a\", \"b/c\", \"d\"]`). This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. - #[serde(rename = "key")] - pub key: String, - #[serde(rename = "namespace_id", skip_serializing_if = "Option::is_none")] - pub namespace_id: Option, - /// A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. - #[serde(rename = "value", deserialize_with = "Option::deserialize")] - pub value: Option, -} - -impl KvPutRequest { - pub fn new(key: String, value: Option) -> KvPutRequest { - KvPutRequest { - key, - namespace_id: None, - value, - } - } -} - - diff --git a/sdks/runtime/rust/src/models/mod.rs b/sdks/runtime/rust/src/models/mod.rs index 13e12bc4cb..7a3f446b64 100644 --- a/sdks/runtime/rust/src/models/mod.rs +++ b/sdks/runtime/rust/src/models/mod.rs @@ -10,20 +10,6 @@ pub mod geo_coord; pub use self::geo_coord::GeoCoord; pub mod geo_distance; pub use self::geo_distance::GeoDistance; -pub mod kv_entry; -pub use self::kv_entry::KvEntry; -pub mod kv_get_batch_response; -pub use self::kv_get_batch_response::KvGetBatchResponse; -pub mod kv_get_response; -pub use self::kv_get_response::KvGetResponse; -pub mod kv_list_response; -pub use self::kv_list_response::KvListResponse; -pub mod kv_put_batch_request; -pub use self::kv_put_batch_request::KvPutBatchRequest; -pub mod kv_put_entry; -pub use self::kv_put_entry::KvPutEntry; -pub mod kv_put_request; -pub use self::kv_put_request::KvPutRequest; pub mod matchmaker_create_lobby_response; pub use self::matchmaker_create_lobby_response::MatchmakerCreateLobbyResponse; pub mod matchmaker_custom_lobby_publicity; @@ -68,5 +54,3 @@ pub mod matchmaker_region_info; pub use self::matchmaker_region_info::MatchmakerRegionInfo; pub mod matchmaker_region_statistics; pub use self::matchmaker_region_statistics::MatchmakerRegionStatistics; -pub mod watch_response; -pub use self::watch_response::WatchResponse; diff --git a/sdks/runtime/rust/src/models/watch_response.rs b/sdks/runtime/rust/src/models/watch_response.rs deleted file mode 100644 index d1ca872c6c..0000000000 --- a/sdks/runtime/rust/src/models/watch_response.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -/// WatchResponse : Provided by watchable endpoints used in blocking loops. - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct WatchResponse { - /// Index indicating the version of the data responded. Pass this to `WatchQuery` to block and wait for the next response. - #[serde(rename = "index")] - pub index: String, -} - -impl WatchResponse { - /// Provided by watchable endpoints used in blocking loops. - pub fn new(index: String) -> WatchResponse { - WatchResponse { - index, - } - } -} - - diff --git a/sdks/runtime/typescript/archive.tgz b/sdks/runtime/typescript/archive.tgz index 259e40e9b4..b632f1c261 100644 --- a/sdks/runtime/typescript/archive.tgz +++ b/sdks/runtime/typescript/archive.tgz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9f6077fa779864716075cf214e78b1ef9b079dd8731fc073ea99658ea84764a8 -size 282509 +oid sha256:7fc703e9bee0b5ecf0d345021136f8359c6fe3a331cbec1d2e551a76f9164368 +size 276993 diff --git a/sdks/runtime/typescript/src/Client.ts b/sdks/runtime/typescript/src/Client.ts index af05da7466..c569205f09 100644 --- a/sdks/runtime/typescript/src/Client.ts +++ b/sdks/runtime/typescript/src/Client.ts @@ -4,7 +4,6 @@ import * as environments from "./environments"; import * as core from "./core"; -import { Kv } from "./api/resources/kv/client/Client"; import { Matchmaker } from "./api/resources/matchmaker/client/Client"; export declare namespace RivetClient { @@ -27,12 +26,6 @@ export declare namespace RivetClient { export class RivetClient { constructor(protected readonly _options: RivetClient.Options) {} - protected _kv: Kv | undefined; - - public get kv(): Kv { - return (this._kv ??= new Kv(this._options)); - } - protected _matchmaker: Matchmaker | undefined; public get matchmaker(): Matchmaker { diff --git a/sdks/runtime/typescript/src/api/resources/common/types/WatchResponse.ts b/sdks/runtime/typescript/src/api/resources/common/types/WatchResponse.ts deleted file mode 100644 index 9b74a009b3..0000000000 --- a/sdks/runtime/typescript/src/api/resources/common/types/WatchResponse.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * Provided by watchable endpoints used in blocking loops. - */ -export interface WatchResponse { - /** - * Index indicating the version of the data responded. - * Pass this to `WatchQuery` to block and wait for the next response. - */ - index: string; -} diff --git a/sdks/runtime/typescript/src/api/resources/common/types/index.ts b/sdks/runtime/typescript/src/api/resources/common/types/index.ts index 3731e6ed3a..f7e3891adb 100644 --- a/sdks/runtime/typescript/src/api/resources/common/types/index.ts +++ b/sdks/runtime/typescript/src/api/resources/common/types/index.ts @@ -1,6 +1,5 @@ export * from "./Identifier"; export * from "./Jwt"; -export * from "./WatchResponse"; export * from "./DisplayName"; export * from "./ErrorMetadata"; export * from "./ErrorBody"; diff --git a/sdks/runtime/typescript/src/api/resources/index.ts b/sdks/runtime/typescript/src/api/resources/index.ts index dfcdecc4ab..6222bce3e8 100644 --- a/sdks/runtime/typescript/src/api/resources/index.ts +++ b/sdks/runtime/typescript/src/api/resources/index.ts @@ -1,4 +1,3 @@ -export * as kv from "./kv"; export * as captcha from "./captcha"; export * as common from "./common"; export * from "./common/types"; diff --git a/sdks/runtime/typescript/src/api/resources/kv/client/Client.ts b/sdks/runtime/typescript/src/api/resources/kv/client/Client.ts deleted file mode 100644 index 534b11177e..0000000000 --- a/sdks/runtime/typescript/src/api/resources/kv/client/Client.ts +++ /dev/null @@ -1,992 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as environments from "../../../../environments"; -import * as core from "../../../../core"; -import * as Rivet from "../../../index"; -import urlJoin from "url-join"; -import * as serializers from "../../../../serialization/index"; -import * as errors from "../../../../errors/index"; - -export declare namespace Kv { - interface Options { - environment?: core.Supplier; - token: core.Supplier; - fetcher?: core.FetchFunction; - } - - interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - } -} - -export class Kv { - constructor(protected readonly _options: Kv.Options) {} - - /** - * Returns a specific key-value entry by key. - * - * @param {Rivet.kv.GetOperationRequest} request - * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.kv.get({ - * key: "string", - * watchIndex: "string", - * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" - * }) - */ - public async get( - request: Rivet.kv.GetOperationRequest, - requestOptions?: Kv.RequestOptions - ): Promise { - const { key, watchIndex, namespaceId } = request; - const _queryParams: Record = {}; - _queryParams["key"] = key; - if (watchIndex != null) { - _queryParams["watch_index"] = watchIndex; - } - - if (namespaceId != null) { - _queryParams["namespace_id"] = namespaceId; - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - "/kv/entries" - ), - method: "GET", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - queryParameters: _queryParams, - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return serializers.kv.GetResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * Puts (sets or overwrites) a key-value entry by key. - * - * @param {Rivet.kv.PutRequest} request - * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.kv.put({ - * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", - * key: "string", - * value: { - * "key": "value" - * } - * }) - */ - public async put(request: Rivet.kv.PutRequest, requestOptions?: Kv.RequestOptions): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - "/kv/entries" - ), - method: "PUT", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - requestType: "json", - body: serializers.kv.PutRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * Deletes a key-value entry by key. - * - * @param {Rivet.kv.DeleteOperationRequest} request - * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.kv.delete({ - * key: "string", - * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" - * }) - */ - public async delete(request: Rivet.kv.DeleteOperationRequest, requestOptions?: Kv.RequestOptions): Promise { - const { key, namespaceId } = request; - const _queryParams: Record = {}; - _queryParams["key"] = key; - if (namespaceId != null) { - _queryParams["namespace_id"] = namespaceId; - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - "/kv/entries" - ), - method: "DELETE", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - queryParameters: _queryParams, - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * Lists all keys in a directory. - * - * @param {Rivet.kv.ListOperationRequest} request - * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.kv.list({ - * directory: "string", - * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" - * }) - */ - public async list( - request: Rivet.kv.ListOperationRequest, - requestOptions?: Kv.RequestOptions - ): Promise { - const { directory, namespaceId } = request; - const _queryParams: Record = {}; - _queryParams["directory"] = directory; - _queryParams["namespace_id"] = namespaceId; - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - "/kv/entries/list" - ), - method: "GET", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - queryParameters: _queryParams, - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return serializers.kv.ListResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * Gets multiple key-value entries by key(s). - * - * @param {Rivet.kv.GetBatchRequest} request - * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.kv.getBatch({ - * keys: "string", - * watchIndex: "string", - * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" - * }) - */ - public async getBatch( - request: Rivet.kv.GetBatchRequest, - requestOptions?: Kv.RequestOptions - ): Promise { - const { keys, watchIndex, namespaceId } = request; - const _queryParams: Record = {}; - if (Array.isArray(keys)) { - _queryParams["keys"] = keys.map((item) => item); - } else { - _queryParams["keys"] = keys; - } - - if (watchIndex != null) { - _queryParams["watch_index"] = watchIndex; - } - - if (namespaceId != null) { - _queryParams["namespace_id"] = namespaceId; - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - "/kv/entries/batch" - ), - method: "GET", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - queryParameters: _queryParams, - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return serializers.kv.GetBatchResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * Puts (sets or overwrites) multiple key-value entries by key(s). - * - * @param {Rivet.kv.PutBatchRequest} request - * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.kv.putBatch({ - * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", - * entries: [{}] - * }) - */ - public async putBatch(request: Rivet.kv.PutBatchRequest, requestOptions?: Kv.RequestOptions): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - "/kv/entries/batch" - ), - method: "PUT", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - requestType: "json", - body: serializers.kv.PutBatchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - /** - * Deletes multiple key-value entries by key(s). - * - * @param {Rivet.kv.DeleteBatchRequest} request - * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Rivet.InternalError} - * @throws {@link Rivet.RateLimitError} - * @throws {@link Rivet.ForbiddenError} - * @throws {@link Rivet.UnauthorizedError} - * @throws {@link Rivet.NotFoundError} - * @throws {@link Rivet.BadRequestError} - * - * @example - * await client.kv.deleteBatch({ - * keys: "string", - * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" - * }) - */ - public async deleteBatch(request: Rivet.kv.DeleteBatchRequest, requestOptions?: Kv.RequestOptions): Promise { - const { keys, namespaceId } = request; - const _queryParams: Record = {}; - if (Array.isArray(keys)) { - _queryParams["keys"] = keys.map((item) => item); - } else { - _queryParams["keys"] = keys; - } - - if (namespaceId != null) { - _queryParams["namespace_id"] = namespaceId; - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - "/kv/entries/batch" - ), - method: "DELETE", - headers: { - Authorization: await this._getAuthorizationHeader(), - }, - contentType: "application/json", - queryParameters: _queryParams, - requestType: "json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 500: - throw new Rivet.InternalError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 429: - throw new Rivet.RateLimitError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 403: - throw new Rivet.ForbiddenError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 408: - throw new Rivet.UnauthorizedError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 404: - throw new Rivet.NotFoundError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - case 400: - throw new Rivet.BadRequestError( - serializers.ErrorBody.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }) - ); - default: - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.RivetError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.RivetTimeoutError(); - case "unknown": - throw new errors.RivetError({ - message: _response.error.errorMessage, - }); - } - } - - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; - } -} diff --git a/sdks/runtime/typescript/src/api/resources/kv/client/index.ts b/sdks/runtime/typescript/src/api/resources/kv/client/index.ts deleted file mode 100644 index 415726b7fe..0000000000 --- a/sdks/runtime/typescript/src/api/resources/kv/client/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./requests"; diff --git a/sdks/runtime/typescript/src/api/resources/kv/client/requests/DeleteBatchRequest.ts b/sdks/runtime/typescript/src/api/resources/kv/client/requests/DeleteBatchRequest.ts deleted file mode 100644 index 06a8f40701..0000000000 --- a/sdks/runtime/typescript/src/api/resources/kv/client/requests/DeleteBatchRequest.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../index"; - -/** - * @example - * { - * keys: "string", - * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" - * } - */ -export interface DeleteBatchRequest { - keys: Rivet.kv.Key | Rivet.kv.Key[]; - namespaceId?: string; -} diff --git a/sdks/runtime/typescript/src/api/resources/kv/client/requests/DeleteOperationRequest.ts b/sdks/runtime/typescript/src/api/resources/kv/client/requests/DeleteOperationRequest.ts deleted file mode 100644 index 4a4acf3119..0000000000 --- a/sdks/runtime/typescript/src/api/resources/kv/client/requests/DeleteOperationRequest.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../index"; - -/** - * @example - * { - * key: "string", - * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" - * } - */ -export interface DeleteOperationRequest { - key: Rivet.kv.Key; - namespaceId?: string; -} diff --git a/sdks/runtime/typescript/src/api/resources/kv/client/requests/GetBatchRequest.ts b/sdks/runtime/typescript/src/api/resources/kv/client/requests/GetBatchRequest.ts deleted file mode 100644 index dee7e0ecf0..0000000000 --- a/sdks/runtime/typescript/src/api/resources/kv/client/requests/GetBatchRequest.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../index"; - -/** - * @example - * { - * keys: "string", - * watchIndex: "string", - * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" - * } - */ -export interface GetBatchRequest { - keys: Rivet.kv.Key | Rivet.kv.Key[]; - /** - * A query parameter denoting the requests watch index. - */ - watchIndex?: string; - namespaceId?: string; -} diff --git a/sdks/runtime/typescript/src/api/resources/kv/client/requests/GetOperationRequest.ts b/sdks/runtime/typescript/src/api/resources/kv/client/requests/GetOperationRequest.ts deleted file mode 100644 index c41a9a3add..0000000000 --- a/sdks/runtime/typescript/src/api/resources/kv/client/requests/GetOperationRequest.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../index"; - -/** - * @example - * { - * key: "string", - * watchIndex: "string", - * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" - * } - */ -export interface GetOperationRequest { - key: Rivet.kv.Key; - /** - * A query parameter denoting the requests watch index. - */ - watchIndex?: string; - namespaceId?: string; -} diff --git a/sdks/runtime/typescript/src/api/resources/kv/client/requests/ListOperationRequest.ts b/sdks/runtime/typescript/src/api/resources/kv/client/requests/ListOperationRequest.ts deleted file mode 100644 index ac3740b405..0000000000 --- a/sdks/runtime/typescript/src/api/resources/kv/client/requests/ListOperationRequest.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../index"; - -/** - * @example - * { - * directory: "string", - * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" - * } - */ -export interface ListOperationRequest { - directory: Rivet.kv.Directory; - namespaceId: string; -} diff --git a/sdks/runtime/typescript/src/api/resources/kv/client/requests/index.ts b/sdks/runtime/typescript/src/api/resources/kv/client/requests/index.ts deleted file mode 100644 index 2dc02e572b..0000000000 --- a/sdks/runtime/typescript/src/api/resources/kv/client/requests/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { type GetOperationRequest } from "./GetOperationRequest"; -export { type DeleteOperationRequest } from "./DeleteOperationRequest"; -export { type ListOperationRequest } from "./ListOperationRequest"; -export { type GetBatchRequest } from "./GetBatchRequest"; -export { type DeleteBatchRequest } from "./DeleteBatchRequest"; diff --git a/sdks/runtime/typescript/src/api/resources/kv/index.ts b/sdks/runtime/typescript/src/api/resources/kv/index.ts deleted file mode 100644 index a931b36375..0000000000 --- a/sdks/runtime/typescript/src/api/resources/kv/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./types"; -export * from "./resources"; -export * from "./client"; diff --git a/sdks/runtime/typescript/src/api/resources/kv/resources/common/index.ts b/sdks/runtime/typescript/src/api/resources/kv/resources/common/index.ts deleted file mode 100644 index eea524d655..0000000000 --- a/sdks/runtime/typescript/src/api/resources/kv/resources/common/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./types"; diff --git a/sdks/runtime/typescript/src/api/resources/kv/resources/common/types/Directory.ts b/sdks/runtime/typescript/src/api/resources/kv/resources/common/types/Directory.ts deleted file mode 100644 index d556fdf0dd..0000000000 --- a/sdks/runtime/typescript/src/api/resources/kv/resources/common/types/Directory.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type Directory = string; diff --git a/sdks/runtime/typescript/src/api/resources/kv/resources/common/types/Entry.ts b/sdks/runtime/typescript/src/api/resources/kv/resources/common/types/Entry.ts deleted file mode 100644 index 73548a04d2..0000000000 --- a/sdks/runtime/typescript/src/api/resources/kv/resources/common/types/Entry.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../../index"; - -/** - * A key-value entry. - */ -export interface Entry { - key: Rivet.kv.Key; - value?: Rivet.kv.Value; - deleted?: boolean; -} diff --git a/sdks/runtime/typescript/src/api/resources/kv/resources/common/types/Key.ts b/sdks/runtime/typescript/src/api/resources/kv/resources/common/types/Key.ts deleted file mode 100644 index 362cc5df58..0000000000 --- a/sdks/runtime/typescript/src/api/resources/kv/resources/common/types/Key.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * A string representing a key in the key-value database. - * Maximum length of 512 characters. - * _Recommended Key Path Format_ - * Key path components are split by a slash (e.g. `a/b/c` has the path components `["a", "b", "c"]`). Slashes can be escaped by using a backslash (e.g. `a/b\/c/d` has the path components `["a", "b/c", "d"]`). - * This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. - */ -export type Key = string; diff --git a/sdks/runtime/typescript/src/api/resources/kv/resources/common/types/PutEntry.ts b/sdks/runtime/typescript/src/api/resources/kv/resources/common/types/PutEntry.ts deleted file mode 100644 index b675c847a9..0000000000 --- a/sdks/runtime/typescript/src/api/resources/kv/resources/common/types/PutEntry.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../../index"; - -/** - * A new entry to insert into the key-value database. - */ -export interface PutEntry { - key: Rivet.kv.Key; - value?: Rivet.kv.Value; -} diff --git a/sdks/runtime/typescript/src/api/resources/kv/resources/common/types/Value.ts b/sdks/runtime/typescript/src/api/resources/kv/resources/common/types/Value.ts deleted file mode 100644 index 4f1f92d335..0000000000 --- a/sdks/runtime/typescript/src/api/resources/kv/resources/common/types/Value.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * A JSON object stored in the KV database. - * A `null` value indicates the entry is deleted. - * Maximum length of 262,144 bytes when encoded. - */ -export type Value = unknown; diff --git a/sdks/runtime/typescript/src/api/resources/kv/resources/common/types/index.ts b/sdks/runtime/typescript/src/api/resources/kv/resources/common/types/index.ts deleted file mode 100644 index f88e3ccae9..0000000000 --- a/sdks/runtime/typescript/src/api/resources/kv/resources/common/types/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from "./Key"; -export * from "./Directory"; -export * from "./Value"; -export * from "./Entry"; -export * from "./PutEntry"; diff --git a/sdks/runtime/typescript/src/api/resources/kv/resources/index.ts b/sdks/runtime/typescript/src/api/resources/kv/resources/index.ts deleted file mode 100644 index 3ed465041b..0000000000 --- a/sdks/runtime/typescript/src/api/resources/kv/resources/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * as common from "./common"; -export * from "./common/types"; diff --git a/sdks/runtime/typescript/src/api/resources/kv/types/GetBatchResponse.ts b/sdks/runtime/typescript/src/api/resources/kv/types/GetBatchResponse.ts deleted file mode 100644 index 3d7bc9ed00..0000000000 --- a/sdks/runtime/typescript/src/api/resources/kv/types/GetBatchResponse.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface GetBatchResponse { - entries: Rivet.kv.Entry[]; - watch: Rivet.WatchResponse; -} diff --git a/sdks/runtime/typescript/src/api/resources/kv/types/GetResponse.ts b/sdks/runtime/typescript/src/api/resources/kv/types/GetResponse.ts deleted file mode 100644 index 7b8ee46b50..0000000000 --- a/sdks/runtime/typescript/src/api/resources/kv/types/GetResponse.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface GetResponse { - value?: Rivet.kv.Value; - /** Whether or not the entry has been deleted. Only set when watching this endpoint. */ - deleted?: boolean; - watch: Rivet.WatchResponse; -} diff --git a/sdks/runtime/typescript/src/api/resources/kv/types/ListResponse.ts b/sdks/runtime/typescript/src/api/resources/kv/types/ListResponse.ts deleted file mode 100644 index 5389e9e4c9..0000000000 --- a/sdks/runtime/typescript/src/api/resources/kv/types/ListResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface ListResponse { - entries: Rivet.kv.Entry[]; -} diff --git a/sdks/runtime/typescript/src/api/resources/kv/types/PutBatchRequest.ts b/sdks/runtime/typescript/src/api/resources/kv/types/PutBatchRequest.ts deleted file mode 100644 index cd7e884c65..0000000000 --- a/sdks/runtime/typescript/src/api/resources/kv/types/PutBatchRequest.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface PutBatchRequest { - namespaceId?: string; - entries: Rivet.kv.PutEntry[]; -} diff --git a/sdks/runtime/typescript/src/api/resources/kv/types/PutRequest.ts b/sdks/runtime/typescript/src/api/resources/kv/types/PutRequest.ts deleted file mode 100644 index 08cca59818..0000000000 --- a/sdks/runtime/typescript/src/api/resources/kv/types/PutRequest.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface PutRequest { - namespaceId?: string; - key: Rivet.kv.Key; - value?: Rivet.kv.Value; -} diff --git a/sdks/runtime/typescript/src/api/resources/kv/types/index.ts b/sdks/runtime/typescript/src/api/resources/kv/types/index.ts deleted file mode 100644 index e4596df6de..0000000000 --- a/sdks/runtime/typescript/src/api/resources/kv/types/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from "./GetResponse"; -export * from "./PutRequest"; -export * from "./ListResponse"; -export * from "./GetBatchResponse"; -export * from "./PutBatchRequest"; diff --git a/sdks/runtime/typescript/src/serialization/resources/common/types/WatchResponse.ts b/sdks/runtime/typescript/src/serialization/resources/common/types/WatchResponse.ts deleted file mode 100644 index 9180fc3b44..0000000000 --- a/sdks/runtime/typescript/src/serialization/resources/common/types/WatchResponse.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; - -export const WatchResponse: core.serialization.ObjectSchema = - core.serialization.object({ - index: core.serialization.string(), - }); - -export declare namespace WatchResponse { - interface Raw { - index: string; - } -} diff --git a/sdks/runtime/typescript/src/serialization/resources/common/types/index.ts b/sdks/runtime/typescript/src/serialization/resources/common/types/index.ts index 3731e6ed3a..f7e3891adb 100644 --- a/sdks/runtime/typescript/src/serialization/resources/common/types/index.ts +++ b/sdks/runtime/typescript/src/serialization/resources/common/types/index.ts @@ -1,6 +1,5 @@ export * from "./Identifier"; export * from "./Jwt"; -export * from "./WatchResponse"; export * from "./DisplayName"; export * from "./ErrorMetadata"; export * from "./ErrorBody"; diff --git a/sdks/runtime/typescript/src/serialization/resources/index.ts b/sdks/runtime/typescript/src/serialization/resources/index.ts index 5904907d2f..ba5cb3d62a 100644 --- a/sdks/runtime/typescript/src/serialization/resources/index.ts +++ b/sdks/runtime/typescript/src/serialization/resources/index.ts @@ -1,4 +1,3 @@ -export * as kv from "./kv"; export * as captcha from "./captcha"; export * as common from "./common"; export * from "./common/types"; diff --git a/sdks/runtime/typescript/src/serialization/resources/kv/index.ts b/sdks/runtime/typescript/src/serialization/resources/kv/index.ts deleted file mode 100644 index 3ce0a3e38e..0000000000 --- a/sdks/runtime/typescript/src/serialization/resources/kv/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./types"; -export * from "./resources"; diff --git a/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/index.ts b/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/index.ts deleted file mode 100644 index eea524d655..0000000000 --- a/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./types"; diff --git a/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Directory.ts b/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Directory.ts deleted file mode 100644 index f11ee98039..0000000000 --- a/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Directory.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; - -export const Directory: core.serialization.Schema = - core.serialization.string(); - -export declare namespace Directory { - type Raw = string; -} diff --git a/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Entry.ts b/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Entry.ts deleted file mode 100644 index 2cefd67728..0000000000 --- a/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Entry.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; -import { Key as kv_common$$key } from "./Key"; -import { Value as kv_common$$value } from "./Value"; -import { kv } from "../../../../index"; - -export const Entry: core.serialization.ObjectSchema = - core.serialization.object({ - key: kv_common$$key, - value: kv_common$$value, - deleted: core.serialization.boolean().optional(), - }); - -export declare namespace Entry { - interface Raw { - key: kv.Key.Raw; - value?: kv.Value.Raw; - deleted?: boolean | null; - } -} diff --git a/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Key.ts b/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Key.ts deleted file mode 100644 index 5d31f57255..0000000000 --- a/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Key.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; - -export const Key: core.serialization.Schema = core.serialization.string(); - -export declare namespace Key { - type Raw = string; -} diff --git a/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/PutEntry.ts b/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/PutEntry.ts deleted file mode 100644 index d7a197d311..0000000000 --- a/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/PutEntry.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; -import { Key as kv_common$$key } from "./Key"; -import { Value as kv_common$$value } from "./Value"; -import { kv } from "../../../../index"; - -export const PutEntry: core.serialization.ObjectSchema = - core.serialization.object({ - key: kv_common$$key, - value: kv_common$$value, - }); - -export declare namespace PutEntry { - interface Raw { - key: kv.Key.Raw; - value?: kv.Value.Raw; - } -} diff --git a/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Value.ts b/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Value.ts deleted file mode 100644 index 8862823529..0000000000 --- a/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Value.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; - -export const Value: core.serialization.Schema = core.serialization.unknown(); - -export declare namespace Value { - type Raw = unknown; -} diff --git a/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/index.ts b/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/index.ts deleted file mode 100644 index f88e3ccae9..0000000000 --- a/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from "./Key"; -export * from "./Directory"; -export * from "./Value"; -export * from "./Entry"; -export * from "./PutEntry"; diff --git a/sdks/runtime/typescript/src/serialization/resources/kv/resources/index.ts b/sdks/runtime/typescript/src/serialization/resources/kv/resources/index.ts deleted file mode 100644 index 3ed465041b..0000000000 --- a/sdks/runtime/typescript/src/serialization/resources/kv/resources/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * as common from "./common"; -export * from "./common/types"; diff --git a/sdks/runtime/typescript/src/serialization/resources/kv/types/GetBatchResponse.ts b/sdks/runtime/typescript/src/serialization/resources/kv/types/GetBatchResponse.ts deleted file mode 100644 index 41741a1e54..0000000000 --- a/sdks/runtime/typescript/src/serialization/resources/kv/types/GetBatchResponse.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { Entry as kv_common$$entry } from "../resources/common/types/Entry"; -import { WatchResponse as common$$watchResponse } from "../../common/types/WatchResponse"; -import { kv, common } from "../../index"; - -export const GetBatchResponse: core.serialization.ObjectSchema< - serializers.kv.GetBatchResponse.Raw, - Rivet.kv.GetBatchResponse -> = core.serialization.object({ - entries: core.serialization.list(kv_common$$entry), - watch: common$$watchResponse, -}); - -export declare namespace GetBatchResponse { - interface Raw { - entries: kv.Entry.Raw[]; - watch: common.WatchResponse.Raw; - } -} diff --git a/sdks/runtime/typescript/src/serialization/resources/kv/types/GetResponse.ts b/sdks/runtime/typescript/src/serialization/resources/kv/types/GetResponse.ts deleted file mode 100644 index 23e14dcd81..0000000000 --- a/sdks/runtime/typescript/src/serialization/resources/kv/types/GetResponse.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { Value as kv_common$$value } from "../resources/common/types/Value"; -import { WatchResponse as common$$watchResponse } from "../../common/types/WatchResponse"; -import { kv, common } from "../../index"; - -export const GetResponse: core.serialization.ObjectSchema = - core.serialization.object({ - value: kv_common$$value, - deleted: core.serialization.boolean().optional(), - watch: common$$watchResponse, - }); - -export declare namespace GetResponse { - interface Raw { - value?: kv.Value.Raw; - deleted?: boolean | null; - watch: common.WatchResponse.Raw; - } -} diff --git a/sdks/runtime/typescript/src/serialization/resources/kv/types/ListResponse.ts b/sdks/runtime/typescript/src/serialization/resources/kv/types/ListResponse.ts deleted file mode 100644 index 3316e0fd71..0000000000 --- a/sdks/runtime/typescript/src/serialization/resources/kv/types/ListResponse.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { Entry as kv_common$$entry } from "../resources/common/types/Entry"; -import { kv } from "../../index"; - -export const ListResponse: core.serialization.ObjectSchema = - core.serialization.object({ - entries: core.serialization.list(kv_common$$entry), - }); - -export declare namespace ListResponse { - interface Raw { - entries: kv.Entry.Raw[]; - } -} diff --git a/sdks/runtime/typescript/src/serialization/resources/kv/types/PutBatchRequest.ts b/sdks/runtime/typescript/src/serialization/resources/kv/types/PutBatchRequest.ts deleted file mode 100644 index 7f45dc3a59..0000000000 --- a/sdks/runtime/typescript/src/serialization/resources/kv/types/PutBatchRequest.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { PutEntry as kv_common$$putEntry } from "../resources/common/types/PutEntry"; -import { kv } from "../../index"; - -export const PutBatchRequest: core.serialization.ObjectSchema< - serializers.kv.PutBatchRequest.Raw, - Rivet.kv.PutBatchRequest -> = core.serialization.object({ - namespaceId: core.serialization.property("namespace_id", core.serialization.string().optional()), - entries: core.serialization.list(kv_common$$putEntry), -}); - -export declare namespace PutBatchRequest { - interface Raw { - namespace_id?: string | null; - entries: kv.PutEntry.Raw[]; - } -} diff --git a/sdks/runtime/typescript/src/serialization/resources/kv/types/PutRequest.ts b/sdks/runtime/typescript/src/serialization/resources/kv/types/PutRequest.ts deleted file mode 100644 index b2cf72018b..0000000000 --- a/sdks/runtime/typescript/src/serialization/resources/kv/types/PutRequest.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { Key as kv_common$$key } from "../resources/common/types/Key"; -import { Value as kv_common$$value } from "../resources/common/types/Value"; -import { kv } from "../../index"; - -export const PutRequest: core.serialization.ObjectSchema = - core.serialization.object({ - namespaceId: core.serialization.property("namespace_id", core.serialization.string().optional()), - key: kv_common$$key, - value: kv_common$$value, - }); - -export declare namespace PutRequest { - interface Raw { - namespace_id?: string | null; - key: kv.Key.Raw; - value?: kv.Value.Raw; - } -} diff --git a/sdks/runtime/typescript/src/serialization/resources/kv/types/index.ts b/sdks/runtime/typescript/src/serialization/resources/kv/types/index.ts deleted file mode 100644 index e4596df6de..0000000000 --- a/sdks/runtime/typescript/src/serialization/resources/kv/types/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from "./GetResponse"; -export * from "./PutRequest"; -export * from "./ListResponse"; -export * from "./GetBatchResponse"; -export * from "./PutBatchRequest"; diff --git a/sdks/runtime/typescript/types/Client.d.ts b/sdks/runtime/typescript/types/Client.d.ts index b9f7d800d1..fe50a9eeb0 100644 --- a/sdks/runtime/typescript/types/Client.d.ts +++ b/sdks/runtime/typescript/types/Client.d.ts @@ -3,7 +3,6 @@ */ import * as environments from "./environments"; import * as core from "./core"; -import { Kv } from "./api/resources/kv/client/Client"; import { Matchmaker } from "./api/resources/matchmaker/client/Client"; export declare namespace RivetClient { interface Options { @@ -23,8 +22,6 @@ export declare namespace RivetClient { export declare class RivetClient { protected readonly _options: RivetClient.Options; constructor(_options: RivetClient.Options); - protected _kv: Kv | undefined; - get kv(): Kv; protected _matchmaker: Matchmaker | undefined; get matchmaker(): Matchmaker; } diff --git a/sdks/runtime/typescript/types/api/resources/common/types/index.d.ts b/sdks/runtime/typescript/types/api/resources/common/types/index.d.ts index 3731e6ed3a..f7e3891adb 100644 --- a/sdks/runtime/typescript/types/api/resources/common/types/index.d.ts +++ b/sdks/runtime/typescript/types/api/resources/common/types/index.d.ts @@ -1,6 +1,5 @@ export * from "./Identifier"; export * from "./Jwt"; -export * from "./WatchResponse"; export * from "./DisplayName"; export * from "./ErrorMetadata"; export * from "./ErrorBody"; diff --git a/sdks/runtime/typescript/types/api/resources/index.d.ts b/sdks/runtime/typescript/types/api/resources/index.d.ts index dfcdecc4ab..6222bce3e8 100644 --- a/sdks/runtime/typescript/types/api/resources/index.d.ts +++ b/sdks/runtime/typescript/types/api/resources/index.d.ts @@ -1,4 +1,3 @@ -export * as kv from "./kv"; export * as captcha from "./captcha"; export * as common from "./common"; export * from "./common/types"; diff --git a/sdks/runtime/typescript/types/serialization/resources/common/types/index.d.ts b/sdks/runtime/typescript/types/serialization/resources/common/types/index.d.ts index 3731e6ed3a..f7e3891adb 100644 --- a/sdks/runtime/typescript/types/serialization/resources/common/types/index.d.ts +++ b/sdks/runtime/typescript/types/serialization/resources/common/types/index.d.ts @@ -1,6 +1,5 @@ export * from "./Identifier"; export * from "./Jwt"; -export * from "./WatchResponse"; export * from "./DisplayName"; export * from "./ErrorMetadata"; export * from "./ErrorBody"; diff --git a/sdks/runtime/typescript/types/serialization/resources/index.d.ts b/sdks/runtime/typescript/types/serialization/resources/index.d.ts index 5904907d2f..ba5cb3d62a 100644 --- a/sdks/runtime/typescript/types/serialization/resources/index.d.ts +++ b/sdks/runtime/typescript/types/serialization/resources/index.d.ts @@ -1,4 +1,3 @@ -export * as kv from "./kv"; export * as captcha from "./captcha"; export * as common from "./common"; export * from "./common/types";