diff --git a/sdks/full/go/cloud/version/matchmaker/types.go b/sdks/full/go/cloud/version/matchmaker/types.go index bd35c28e98..62db53a43a 100644 --- a/sdks/full/go/cloud/version/matchmaker/types.go +++ b/sdks/full/go/cloud/version/matchmaker/types.go @@ -208,7 +208,11 @@ func (p PortProtocol) Ptr() *PortProtocol { return &p } -// Range of ports that can be connected to. Note that the port range values returned by /find +// Range of ports that can be connected to. +// If configured, `network_mode` must equal `host`. +// Port ranges may overlap between containers, it is the responsibility of the developer to ensure ports are available before using. +// Read more about host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking). +// Only available on Rivet Open Source & Enterprise. // // ### Related // @@ -246,7 +250,9 @@ func (p *PortRange) String() string { return fmt.Sprintf("%#v", p) } -// Denotes what type of proxying to use for ports. Rivet GameGuard adds DoS and DDoS mitigation to incoming connections. +// Range of ports that can be connected to. +// `game_guard` (default) proxies all traffic through [Game Guard](https://rivet.gg/docs/dynamic-servers/concepts/game-guard) to mitigate DDoS attacks and provide TLS termination. +// `none` sends traffic directly to the game server. If configured, `network_mode` must equal `host`. Read more about host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking). Only available on Rivet Open Source & Enterprise. // // ### Related - /docs/dynamic-servers/concepts/game-guard - cloud.version.matchmaker.PortProtocol type ProxyKind string diff --git a/sdks/full/openapi/openapi.yml b/sdks/full/openapi/openapi.yml index 004b97df0f..5fac3a8702 100644 --- a/sdks/full/openapi/openapi.yml +++ b/sdks/full/openapi/openapi.yml @@ -11015,8 +11015,17 @@ components: CloudVersionMatchmakerPortRange: type: object description: >- - Range of ports that can be connected to. Note that the port range values - returned by /find + Range of ports that can be connected to. + + If configured, `network_mode` must equal `host`. + + Port ranges may overlap between containers, it is the responsibility of + the developer to ensure ports are available before using. + + Read more about host networking + [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking). + + Only available on Rivet Open Source & Enterprise. ### Related @@ -11070,8 +11079,16 @@ components: - none - game_guard description: >- - Denotes what type of proxying to use for ports. Rivet GameGuard adds DoS - and DDoS mitigation to incoming connections. + Range of ports that can be connected to. + + `game_guard` (default) proxies all traffic through [Game + Guard](https://rivet.gg/docs/dynamic-servers/concepts/game-guard) to + mitigate DDoS attacks and provide TLS termination. + + `none` sends traffic directly to the game server. If configured, + `network_mode` must equal `host`. Read more about host networking + [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking). + Only available on Rivet Open Source & Enterprise. ### Related - /docs/dynamic-servers/concepts/game-guard - diff --git a/sdks/full/openapi_compat/openapi.yml b/sdks/full/openapi_compat/openapi.yml index 237569ca00..29b28790f8 100644 --- a/sdks/full/openapi_compat/openapi.yml +++ b/sdks/full/openapi_compat/openapi.yml @@ -2416,8 +2416,16 @@ components: - udp type: string CloudVersionMatchmakerPortRange: - description: 'Range of ports that can be connected to. Note that the port range - values returned by /find + description: 'Range of ports that can be connected to. + + If configured, `network_mode` must equal `host`. + + Port ranges may overlap between containers, it is the responsibility of the + developer to ensure ports are available before using. + + Read more about host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking). + + Only available on Rivet Open Source & Enterprise. ### Related @@ -2438,8 +2446,14 @@ components: - max type: object CloudVersionMatchmakerProxyKind: - description: 'Denotes what type of proxying to use for ports. Rivet GameGuard - adds DoS and DDoS mitigation to incoming connections. + description: 'Range of ports that can be connected to. + + `game_guard` (default) proxies all traffic through [Game Guard](https://rivet.gg/docs/dynamic-servers/concepts/game-guard) + to mitigate DDoS attacks and provide TLS termination. + + `none` sends traffic directly to the game server. If configured, `network_mode` + must equal `host`. Read more about host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking). + Only available on Rivet Open Source & Enterprise. ### Related - /docs/dynamic-servers/concepts/game-guard - cloud.version.matchmaker.PortProtocol' diff --git a/sdks/full/rust-cli/src/models/cloud_version_matchmaker_port_range.rs b/sdks/full/rust-cli/src/models/cloud_version_matchmaker_port_range.rs index 9d97a5c6f9..f77a0d3ed1 100644 --- a/sdks/full/rust-cli/src/models/cloud_version_matchmaker_port_range.rs +++ b/sdks/full/rust-cli/src/models/cloud_version_matchmaker_port_range.rs @@ -8,7 +8,7 @@ * Generated by: https://openapi-generator.tech */ -/// CloudVersionMatchmakerPortRange : Range of ports that can be connected to. Note that the port range values returned by /find ### Related - cloud.version.matchmaker.PortProtocol - cloud.version.matchmaker.ProxyKind +/// CloudVersionMatchmakerPortRange : Range of ports that can be connected to. If configured, `network_mode` must equal `host`. Port ranges may overlap between containers, it is the responsibility of the developer to ensure ports are available before using. Read more about host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking). Only available on Rivet Open Source & Enterprise. ### Related - cloud.version.matchmaker.PortProtocol - cloud.version.matchmaker.ProxyKind @@ -24,7 +24,7 @@ pub struct CloudVersionMatchmakerPortRange { } impl CloudVersionMatchmakerPortRange { - /// Range of ports that can be connected to. Note that the port range values returned by /find ### Related - cloud.version.matchmaker.PortProtocol - cloud.version.matchmaker.ProxyKind + /// Range of ports that can be connected to. If configured, `network_mode` must equal `host`. Port ranges may overlap between containers, it is the responsibility of the developer to ensure ports are available before using. Read more about host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking). Only available on Rivet Open Source & Enterprise. ### Related - cloud.version.matchmaker.PortProtocol - cloud.version.matchmaker.ProxyKind pub fn new(max: i32, min: i32) -> CloudVersionMatchmakerPortRange { CloudVersionMatchmakerPortRange { max, diff --git a/sdks/full/rust-cli/src/models/cloud_version_matchmaker_proxy_kind.rs b/sdks/full/rust-cli/src/models/cloud_version_matchmaker_proxy_kind.rs index bd68087379..9482e5af6b 100644 --- a/sdks/full/rust-cli/src/models/cloud_version_matchmaker_proxy_kind.rs +++ b/sdks/full/rust-cli/src/models/cloud_version_matchmaker_proxy_kind.rs @@ -8,9 +8,9 @@ * Generated by: https://openapi-generator.tech */ -/// CloudVersionMatchmakerProxyKind : Denotes what type of proxying to use for ports. Rivet GameGuard adds DoS and DDoS mitigation to incoming connections. ### Related - /docs/dynamic-servers/concepts/game-guard - cloud.version.matchmaker.PortProtocol +/// CloudVersionMatchmakerProxyKind : Range of ports that can be connected to. `game_guard` (default) proxies all traffic through [Game Guard](https://rivet.gg/docs/dynamic-servers/concepts/game-guard) to mitigate DDoS attacks and provide TLS termination. `none` sends traffic directly to the game server. If configured, `network_mode` must equal `host`. Read more about host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking). Only available on Rivet Open Source & Enterprise. ### Related - /docs/dynamic-servers/concepts/game-guard - cloud.version.matchmaker.PortProtocol -/// Denotes what type of proxying to use for ports. Rivet GameGuard adds DoS and DDoS mitigation to incoming connections. ### Related - /docs/dynamic-servers/concepts/game-guard - cloud.version.matchmaker.PortProtocol +/// Range of ports that can be connected to. `game_guard` (default) proxies all traffic through [Game Guard](https://rivet.gg/docs/dynamic-servers/concepts/game-guard) to mitigate DDoS attacks and provide TLS termination. `none` sends traffic directly to the game server. If configured, `network_mode` must equal `host`. Read more about host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking). Only available on Rivet Open Source & Enterprise. ### Related - /docs/dynamic-servers/concepts/game-guard - cloud.version.matchmaker.PortProtocol #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] #[serde(deny_unknown_fields)] pub enum CloudVersionMatchmakerProxyKind { diff --git a/sdks/full/rust/src/models/cloud_version_matchmaker_port_range.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_port_range.rs index 80f8fbd6f6..97b716690d 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_port_range.rs +++ b/sdks/full/rust/src/models/cloud_version_matchmaker_port_range.rs @@ -8,7 +8,7 @@ * Generated by: https://openapi-generator.tech */ -/// CloudVersionMatchmakerPortRange : Range of ports that can be connected to. Note that the port range values returned by /find ### Related - cloud.version.matchmaker.PortProtocol - cloud.version.matchmaker.ProxyKind +/// CloudVersionMatchmakerPortRange : Range of ports that can be connected to. If configured, `network_mode` must equal `host`. Port ranges may overlap between containers, it is the responsibility of the developer to ensure ports are available before using. Read more about host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking). Only available on Rivet Open Source & Enterprise. ### Related - cloud.version.matchmaker.PortProtocol - cloud.version.matchmaker.ProxyKind @@ -23,7 +23,7 @@ pub struct CloudVersionMatchmakerPortRange { } impl CloudVersionMatchmakerPortRange { - /// Range of ports that can be connected to. Note that the port range values returned by /find ### Related - cloud.version.matchmaker.PortProtocol - cloud.version.matchmaker.ProxyKind + /// Range of ports that can be connected to. If configured, `network_mode` must equal `host`. Port ranges may overlap between containers, it is the responsibility of the developer to ensure ports are available before using. Read more about host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking). Only available on Rivet Open Source & Enterprise. ### Related - cloud.version.matchmaker.PortProtocol - cloud.version.matchmaker.ProxyKind pub fn new(max: i32, min: i32) -> CloudVersionMatchmakerPortRange { CloudVersionMatchmakerPortRange { max, diff --git a/sdks/full/rust/src/models/cloud_version_matchmaker_proxy_kind.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_proxy_kind.rs index 004a94ffe0..f2d1f0de49 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_proxy_kind.rs +++ b/sdks/full/rust/src/models/cloud_version_matchmaker_proxy_kind.rs @@ -8,9 +8,9 @@ * Generated by: https://openapi-generator.tech */ -/// CloudVersionMatchmakerProxyKind : Denotes what type of proxying to use for ports. Rivet GameGuard adds DoS and DDoS mitigation to incoming connections. ### Related - /docs/dynamic-servers/concepts/game-guard - cloud.version.matchmaker.PortProtocol +/// CloudVersionMatchmakerProxyKind : Range of ports that can be connected to. `game_guard` (default) proxies all traffic through [Game Guard](https://rivet.gg/docs/dynamic-servers/concepts/game-guard) to mitigate DDoS attacks and provide TLS termination. `none` sends traffic directly to the game server. If configured, `network_mode` must equal `host`. Read more about host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking). Only available on Rivet Open Source & Enterprise. ### Related - /docs/dynamic-servers/concepts/game-guard - cloud.version.matchmaker.PortProtocol -/// Denotes what type of proxying to use for ports. Rivet GameGuard adds DoS and DDoS mitigation to incoming connections. ### Related - /docs/dynamic-servers/concepts/game-guard - cloud.version.matchmaker.PortProtocol +/// Range of ports that can be connected to. `game_guard` (default) proxies all traffic through [Game Guard](https://rivet.gg/docs/dynamic-servers/concepts/game-guard) to mitigate DDoS attacks and provide TLS termination. `none` sends traffic directly to the game server. If configured, `network_mode` must equal `host`. Read more about host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking). Only available on Rivet Open Source & Enterprise. ### Related - /docs/dynamic-servers/concepts/game-guard - cloud.version.matchmaker.PortProtocol #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudVersionMatchmakerProxyKind { #[serde(rename = "none")] diff --git a/sdks/full/typescript/archive.tgz b/sdks/full/typescript/archive.tgz index ff6d24c4ad..14b8aafde3 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:aa1ed530c1aaf93d16f537e48995340f17208e8db00a1c5dc796703900a4cd07 -size 621697 +oid sha256:45796b2daf08a25437675733211a8aca19216c8dbc729e43106d3583a3d64413 +size 623096 diff --git a/sdks/full/typescript/src/api/resources/admin/resources/cluster/client/Client.ts b/sdks/full/typescript/src/api/resources/admin/resources/cluster/client/Client.ts index 2a14016646..3481df43cf 100644 --- a/sdks/full/typescript/src/api/resources/admin/resources/cluster/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/admin/resources/cluster/client/Client.ts @@ -55,7 +55,6 @@ export class Cluster { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "X-Fern-Language": "JavaScript", }, contentType: "application/json", queryParameters: _queryParams, diff --git a/sdks/full/typescript/src/api/resources/provision/resources/servers/client/Client.ts b/sdks/full/typescript/src/api/resources/provision/resources/servers/client/Client.ts index 66dfcc6858..36b14b9acb 100644 --- a/sdks/full/typescript/src/api/resources/provision/resources/servers/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/provision/resources/servers/client/Client.ts @@ -45,7 +45,6 @@ export class Servers { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "X-Fern-Language": "JavaScript", }, contentType: "application/json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, diff --git a/sdks/runtime/go/matchmaker/lobbies/client.go b/sdks/runtime/go/matchmaker/lobbies/client.go index b06528d216..a67a635bbe 100644 --- a/sdks/runtime/go/matchmaker/lobbies/client.go +++ b/sdks/runtime/go/matchmaker/lobbies/client.go @@ -36,6 +36,7 @@ func NewClient(opts ...core.ClientOption) *Client { } // Marks the current lobby as ready to accept connections. Players will not be able to connect to this lobby until the lobby is flagged as ready. +// This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) for mock responses. When running on Rivet servers, you can access the given lobby token from the [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. func (c *Client) Ready(ctx context.Context) error { baseURL := "https://api.rivet.gg" if c.baseURL != "" { @@ -115,6 +116,11 @@ func (c *Client) Ready(ctx context.Context) error { // join using the /join endpoint (this can be disabled by the developer by rejecting all new connections // after setting the lobby to closed). // Does not shutdown the lobby. +// +// This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for +// authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) +// for mock responses. When running on Rivet servers, you can access the given lobby token from the +// [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. func (c *Client) SetClosed(ctx context.Context, request *matchmaker.SetLobbyClosedRequest) error { baseURL := "https://api.rivet.gg" if c.baseURL != "" { @@ -191,6 +197,12 @@ func (c *Client) SetClosed(ctx context.Context, request *matchmaker.SetLobbyClos return nil } +// Sets the state JSON of the current lobby. +// +// This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for +// authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) +// for mock responses. When running on Rivet servers, you can access the given lobby token from the +// [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. func (c *Client) SetState(ctx context.Context, request interface{}) error { baseURL := "https://api.rivet.gg" if c.baseURL != "" { @@ -267,6 +279,12 @@ func (c *Client) SetState(ctx context.Context, request interface{}) error { return nil } +// Get the state of any lobby. +// +// This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for +// authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) +// for mock responses. When running on Rivet servers, you can access the given lobby token from the +// [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. func (c *Client) GetState(ctx context.Context, lobbyId uuid.UUID) (interface{}, error) { baseURL := "https://api.rivet.gg" if c.baseURL != "" { @@ -348,6 +366,12 @@ func (c *Client) GetState(ctx context.Context, lobbyId uuid.UUID) (interface{}, // Finds a lobby based on the given criteria. // If a lobby is not found and `prevent_auto_create_lobby` is `false`, // a new lobby will be created. +// +// When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) is enabled in +// your game namespace, this endpoint does not require a token to authenticate. Otherwise, a +// [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used +// for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) +// can be used for general authentication. func (c *Client) Find(ctx context.Context, request *matchmaker.FindLobbyRequest) (*matchmaker.FindLobbyResponse, error) { baseURL := "https://api.rivet.gg" if c.baseURL != "" { @@ -434,6 +458,12 @@ func (c *Client) Find(ctx context.Context, request *matchmaker.FindLobbyRequest) // Joins a specific lobby. // This request will use the direct player count configured for the // lobby group. +// +// When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) is enabled in +// your game namespace, this endpoint does not require a token to authenticate. Otherwise, a +// [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used +// for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) +// can be used for general authentication. func (c *Client) Join(ctx context.Context, request *matchmaker.JoinLobbyRequest) (*matchmaker.JoinLobbyResponse, error) { baseURL := "https://api.rivet.gg" if c.baseURL != "" { @@ -513,6 +543,12 @@ func (c *Client) Join(ctx context.Context, request *matchmaker.JoinLobbyRequest) } // Creates a custom lobby. +// +// When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) is enabled in +// your game namespace, this endpoint does not require a token to authenticate. Otherwise, a +// [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used +// for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) +// can be used for general authentication. func (c *Client) Create(ctx context.Context, request *matchmaker.CreateLobbyRequest) (*matchmaker.CreateLobbyResponse, error) { baseURL := "https://api.rivet.gg" if c.baseURL != "" { @@ -592,6 +628,12 @@ func (c *Client) Create(ctx context.Context, request *matchmaker.CreateLobbyRequ } // Lists all open lobbies. +// +// When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) is enabled in +// your game namespace, this endpoint does not require a token to authenticate. Otherwise, a +// [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used +// for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) +// can be used for general authentication. func (c *Client) List(ctx context.Context, request *matchmaker.ListLobbiesRequest) (*matchmaker.ListLobbiesResponse, error) { baseURL := "https://api.rivet.gg" if c.baseURL != "" { diff --git a/sdks/runtime/go/matchmaker/types.go b/sdks/runtime/go/matchmaker/types.go index 3fac4ac025..b172126aeb 100644 --- a/sdks/runtime/go/matchmaker/types.go +++ b/sdks/runtime/go/matchmaker/types.go @@ -112,10 +112,10 @@ type JoinPort struct { Host *string `json:"host,omitempty"` Hostname string `json:"hostname"` // The port number for this lobby. Will be null if using a port range. - Port *int `json:"port,omitempty"` - // Whether or not this lobby port uses TLS. You cannot mix a non-TLS and TLS ports. + Port *int `json:"port,omitempty"` PortRange *JoinPortRange `json:"port_range,omitempty"` - IsTls bool `json:"is_tls"` + // Whether or not this lobby port uses TLS. You cannot mix a non-TLS and TLS ports. + IsTls bool `json:"is_tls"` _rawJSON json.RawMessage } diff --git a/sdks/runtime/openapi/openapi.yml b/sdks/runtime/openapi/openapi.yml index 8b4e09855f..b81c9b33c5 100644 --- a/sdks/runtime/openapi/openapi.yml +++ b/sdks/runtime/openapi/openapi.yml @@ -425,6 +425,15 @@ paths: description: >- Marks the current lobby as ready to accept connections. Players will not be able to connect to this lobby until the lobby is flagged as ready. + + This endpoint requires a [lobby + token](/docs/general/concepts/token-types#matchmaker-lobby) for + authentication, or a [development namespace + token](/docs/general/concepts/token-types#namespace-development) for + mock responses. When running on Rivet servers, you can access the given + lobby token from the + [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment + variable. operationId: matchmaker_lobbies_ready tags: - MatchmakerLobbies @@ -481,6 +490,19 @@ paths: after setting the lobby to closed). Does not shutdown the lobby. + + + This endpoint requires a [lobby + token](/docs/general/concepts/token-types#matchmaker-lobby) for + + authentication, or a [development namespace + token](/docs/general/concepts/token-types#namespace-development) + + for mock responses. When running on Rivet servers, you can access the + given lobby token from the + + [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment + variable. operationId: matchmaker_lobbies_setClosed tags: - MatchmakerLobbies @@ -538,6 +560,21 @@ paths: - is_closed /matchmaker/lobbies/state: put: + description: >- + Sets the state JSON of the current lobby. + + + This endpoint requires a [lobby + token](/docs/general/concepts/token-types#matchmaker-lobby) for + + authentication, or a [development namespace + token](/docs/general/concepts/token-types#namespace-development) + + for mock responses. When running on Rivet servers, you can access the + given lobby token from the + + [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment + variable. operationId: matchmaker_lobbies_setState tags: - MatchmakerLobbies @@ -589,6 +626,21 @@ paths: schema: {} /matchmaker/lobbies/{lobby_id}/state: get: + description: >- + Get the state of any lobby. + + + This endpoint requires a [lobby + token](/docs/general/concepts/token-types#matchmaker-lobby) for + + authentication, or a [development namespace + token](/docs/general/concepts/token-types#namespace-development) + + for mock responses. When running on Rivet servers, you can access the + given lobby token from the + + [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment + variable. operationId: matchmaker_lobbies_getState tags: - MatchmakerLobbies @@ -644,10 +696,29 @@ paths: security: *ref_0 /matchmaker/lobbies/find: post: - description: |- + description: >- Finds a lobby based on the given criteria. + If a lobby is not found and `prevent_auto_create_lobby` is `false`, + a new lobby will be created. + + + When [tokenless + authentication](/docs/general/concepts/tokenless-authentication/web) is + enabled in + + your game namespace, this endpoint does not require a token to + authenticate. Otherwise, a + + [development namespace + token](/docs/general/concepts/token-types#namespace-development) can be + used + + for mock responses and a [public namespace + token](/docs/general/concepts/token-types#namespace-public) + + can be used for general authentication. operationId: matchmaker_lobbies_find tags: - MatchmakerLobbies @@ -731,10 +802,29 @@ paths: - game_modes /matchmaker/lobbies/join: post: - description: |- + description: >- Joins a specific lobby. + This request will use the direct player count configured for the + lobby group. + + + When [tokenless + authentication](/docs/general/concepts/tokenless-authentication/web) is + enabled in + + your game namespace, this endpoint does not require a token to + authenticate. Otherwise, a + + [development namespace + token](/docs/general/concepts/token-types#namespace-development) can be + used + + for mock responses and a [public namespace + token](/docs/general/concepts/token-types#namespace-public) + + can be used for general authentication. operationId: matchmaker_lobbies_join tags: - MatchmakerLobbies @@ -799,7 +889,25 @@ paths: - lobby_id /matchmaker/lobbies/create: post: - description: Creates a custom lobby. + description: >- + Creates a custom lobby. + + + When [tokenless + authentication](/docs/general/concepts/tokenless-authentication/web) is + enabled in + + your game namespace, this endpoint does not require a token to + authenticate. Otherwise, a + + [development namespace + token](/docs/general/concepts/token-types#namespace-development) can be + used + + for mock responses and a [public namespace + token](/docs/general/concepts/token-types#namespace-public) + + can be used for general authentication. operationId: matchmaker_lobbies_create tags: - MatchmakerLobbies @@ -875,7 +983,25 @@ paths: - game_mode /matchmaker/lobbies/list: get: - description: Lists all open lobbies. + description: >- + Lists all open lobbies. + + + When [tokenless + authentication](/docs/general/concepts/tokenless-authentication/web) is + enabled in + + your game namespace, this endpoint does not require a token to + authenticate. Otherwise, a + + [development namespace + token](/docs/general/concepts/token-types#namespace-development) can be + used + + for mock responses and a [public namespace + token](/docs/general/concepts/token-types#namespace-public) + + can be used for general authentication. operationId: matchmaker_lobbies_list tags: - MatchmakerLobbies @@ -1528,11 +1654,11 @@ components: description: The port number for this lobby. Will be null if using a port range. port_range: $ref: '#/components/schemas/MatchmakerJoinPortRange' + is_tls: + type: boolean description: >- Whether or not this lobby port uses TLS. You cannot mix a non-TLS and TLS ports. - is_tls: - type: boolean required: - hostname - is_tls diff --git a/sdks/runtime/openapi_compat/openapi.yml b/sdks/runtime/openapi_compat/openapi.yml index 97e238f325..b3c953aa49 100644 --- a/sdks/runtime/openapi_compat/openapi.yml +++ b/sdks/runtime/openapi_compat/openapi.yml @@ -307,6 +307,8 @@ components: hostname: type: string is_tls: + description: Whether or not this lobby port uses TLS. You cannot mix a non-TLS + and TLS ports. type: boolean port: description: The port number for this lobby. Will be null if using a port @@ -314,8 +316,6 @@ components: type: integer port_range: $ref: '#/components/schemas/MatchmakerJoinPortRange' - description: Whether or not this lobby port uses TLS. You cannot mix a non-TLS - and TLS ports. required: - hostname - is_tls @@ -875,7 +875,18 @@ paths: after setting the lobby to closed). - Does not shutdown the lobby.' + Does not shutdown the lobby. + + + This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) + for + + authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) + + for mock responses. When running on Rivet servers, you can access the given + lobby token from the + + [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable.' operationId: matchmaker_lobbies_setClosed parameters: [] requestBody: @@ -933,7 +944,21 @@ paths: - MatchmakerLobbies /matchmaker/lobbies/create: post: - description: Creates a custom lobby. + description: 'Creates a custom lobby. + + + When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) + is enabled in + + your game namespace, this endpoint does not require a token to authenticate. + Otherwise, a + + [development namespace token](/docs/general/concepts/token-types#namespace-development) + can be used + + for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) + + can be used for general authentication.' operationId: matchmaker_lobbies_create parameters: [] requestBody: @@ -1013,7 +1038,21 @@ paths: If a lobby is not found and `prevent_auto_create_lobby` is `false`, - a new lobby will be created.' + a new lobby will be created. + + + When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) + is enabled in + + your game namespace, this endpoint does not require a token to authenticate. + Otherwise, a + + [development namespace token](/docs/general/concepts/token-types#namespace-development) + can be used + + for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) + + can be used for general authentication.' operationId: matchmaker_lobbies_find parameters: - in: header @@ -1101,7 +1140,21 @@ paths: This request will use the direct player count configured for the - lobby group.' + lobby group. + + + When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) + is enabled in + + your game namespace, this endpoint does not require a token to authenticate. + Otherwise, a + + [development namespace token](/docs/general/concepts/token-types#namespace-development) + can be used + + for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) + + can be used for general authentication.' operationId: matchmaker_lobbies_join parameters: [] requestBody: @@ -1166,7 +1219,21 @@ paths: - MatchmakerLobbies /matchmaker/lobbies/list: get: - description: Lists all open lobbies. + description: 'Lists all open lobbies. + + + When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) + is enabled in + + your game namespace, this endpoint does not require a token to authenticate. + Otherwise, a + + [development namespace token](/docs/general/concepts/token-types#namespace-development) + can be used + + for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) + + can be used for general authentication.' operationId: matchmaker_lobbies_list parameters: - in: query @@ -1222,8 +1289,14 @@ paths: - MatchmakerLobbies /matchmaker/lobbies/ready: post: - description: Marks the current lobby as ready to accept connections. Players + description: 'Marks the current lobby as ready to accept connections. Players will not be able to connect to this lobby until the lobby is flagged as ready. + + This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) + for authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) + for mock responses. When running on Rivet servers, you can access the given + lobby token from the [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) + environment variable.' operationId: matchmaker_lobbies_ready parameters: [] responses: @@ -1270,6 +1343,18 @@ paths: - MatchmakerLobbies /matchmaker/lobbies/state: put: + description: 'Sets the state JSON of the current lobby. + + + This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) + for + + authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) + + for mock responses. When running on Rivet servers, you can access the given + lobby token from the + + [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable.' operationId: matchmaker_lobbies_setState parameters: [] requestBody: @@ -1321,6 +1406,18 @@ paths: - MatchmakerLobbies /matchmaker/lobbies/{lobby_id}/state: get: + description: 'Get the state of any lobby. + + + This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) + for + + authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) + + for mock responses. When running on Rivet servers, you can access the given + lobby token from the + + [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable.' operationId: matchmaker_lobbies_getState parameters: - in: path diff --git a/sdks/runtime/rust/docs/MatchmakerJoinPort.md b/sdks/runtime/rust/docs/MatchmakerJoinPort.md index 48dcaeb9f9..d32c534f6b 100644 --- a/sdks/runtime/rust/docs/MatchmakerJoinPort.md +++ b/sdks/runtime/rust/docs/MatchmakerJoinPort.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **host** | Option<**String**> | The host for the given port. Will be null if using a port range. | [optional] **hostname** | **String** | | -**is_tls** | **bool** | | +**is_tls** | **bool** | Whether or not this lobby port uses TLS. You cannot mix a non-TLS and TLS ports. | **port** | Option<**i32**> | The port number for this lobby. Will be null if using a port range. | [optional] **port_range** | Option<[**crate::models::MatchmakerJoinPortRange**](MatchmakerJoinPortRange.md)> | | [optional] diff --git a/sdks/runtime/rust/docs/MatchmakerLobbiesApi.md b/sdks/runtime/rust/docs/MatchmakerLobbiesApi.md index 985aac05ba..cbecd8d12f 100644 --- a/sdks/runtime/rust/docs/MatchmakerLobbiesApi.md +++ b/sdks/runtime/rust/docs/MatchmakerLobbiesApi.md @@ -20,7 +20,7 @@ Method | HTTP request | Description > crate::models::MatchmakerCreateLobbyResponse matchmaker_lobbies_create(matchmaker_lobbies_create_request) -Creates a custom lobby. +Creates a custom lobby. When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) is enabled in your game namespace, this endpoint does not require a token to authenticate. Otherwise, a [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) can be used for general authentication. ### Parameters @@ -50,7 +50,7 @@ Name | Type | Description | Required | Notes > crate::models::MatchmakerFindLobbyResponse matchmaker_lobbies_find(matchmaker_lobbies_find_request, origin) -Finds a lobby based on the given criteria. If a lobby is not found and `prevent_auto_create_lobby` is `false`, a new lobby will be created. +Finds a lobby based on the given criteria. If a lobby is not found and `prevent_auto_create_lobby` is `false`, a new lobby will be created. When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) is enabled in your game namespace, this endpoint does not require a token to authenticate. Otherwise, a [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) can be used for general authentication. ### Parameters @@ -81,6 +81,8 @@ Name | Type | Description | Required | Notes > serde_json::Value matchmaker_lobbies_get_state(lobby_id) +Get the state of any lobby. This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) for mock responses. When running on Rivet servers, you can access the given lobby token from the [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. + ### Parameters @@ -109,7 +111,7 @@ Name | Type | Description | Required | Notes > crate::models::MatchmakerJoinLobbyResponse matchmaker_lobbies_join(matchmaker_lobbies_join_request) -Joins a specific lobby. This request will use the direct player count configured for the lobby group. +Joins a specific lobby. This request will use the direct player count configured for the lobby group. When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) is enabled in your game namespace, this endpoint does not require a token to authenticate. Otherwise, a [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) can be used for general authentication. ### Parameters @@ -139,7 +141,7 @@ Name | Type | Description | Required | Notes > crate::models::MatchmakerListLobbiesResponse matchmaker_lobbies_list(include_state) -Lists all open lobbies. +Lists all open lobbies. When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) is enabled in your game namespace, this endpoint does not require a token to authenticate. Otherwise, a [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) can be used for general authentication. ### Parameters @@ -169,7 +171,7 @@ Name | Type | Description | Required | Notes > matchmaker_lobbies_ready() -Marks the current lobby as ready to accept connections. Players will not be able to connect to this lobby until the lobby is flagged as ready. +Marks the current lobby as ready to accept connections. Players will not be able to connect to this lobby until the lobby is flagged as ready. This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) for mock responses. When running on Rivet servers, you can access the given lobby token from the [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. ### Parameters @@ -196,7 +198,7 @@ This endpoint does not need any parameter. > matchmaker_lobbies_set_closed(matchmaker_lobbies_set_closed_request) -If `is_closed` is `true`, the matchmaker will no longer route players to the lobby. Players can still join using the /join endpoint (this can be disabled by the developer by rejecting all new connections after setting the lobby to closed). Does not shutdown the lobby. +If `is_closed` is `true`, the matchmaker will no longer route players to the lobby. Players can still join using the /join endpoint (this can be disabled by the developer by rejecting all new connections after setting the lobby to closed). Does not shutdown the lobby. This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) for mock responses. When running on Rivet servers, you can access the given lobby token from the [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. ### Parameters @@ -226,6 +228,8 @@ Name | Type | Description | Required | Notes > matchmaker_lobbies_set_state(body) +Sets the state JSON of the current lobby. This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) for mock responses. When running on Rivet servers, you can access the given lobby token from the [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. + ### Parameters diff --git a/sdks/runtime/rust/src/apis/matchmaker_lobbies_api.rs b/sdks/runtime/rust/src/apis/matchmaker_lobbies_api.rs index 8b67ff6563..50c2f0f0c6 100644 --- a/sdks/runtime/rust/src/apis/matchmaker_lobbies_api.rs +++ b/sdks/runtime/rust/src/apis/matchmaker_lobbies_api.rs @@ -120,7 +120,7 @@ pub enum MatchmakerLobbiesSetStateError { } -/// Creates a custom lobby. +/// Creates a custom lobby. When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) is enabled in your game namespace, this endpoint does not require a token to authenticate. Otherwise, a [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) can be used for general authentication. pub async fn matchmaker_lobbies_create(configuration: &configuration::Configuration, matchmaker_lobbies_create_request: crate::models::MatchmakerLobbiesCreateRequest) -> Result> { let local_var_configuration = configuration; @@ -152,7 +152,7 @@ pub async fn matchmaker_lobbies_create(configuration: &configuration::Configurat } } -/// Finds a lobby based on the given criteria. If a lobby is not found and `prevent_auto_create_lobby` is `false`, a new lobby will be created. +/// Finds a lobby based on the given criteria. If a lobby is not found and `prevent_auto_create_lobby` is `false`, a new lobby will be created. When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) is enabled in your game namespace, this endpoint does not require a token to authenticate. Otherwise, a [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) can be used for general authentication. pub async fn matchmaker_lobbies_find(configuration: &configuration::Configuration, matchmaker_lobbies_find_request: crate::models::MatchmakerLobbiesFindRequest, origin: Option<&str>) -> Result> { let local_var_configuration = configuration; @@ -187,6 +187,7 @@ pub async fn matchmaker_lobbies_find(configuration: &configuration::Configuratio } } +/// Get the state of any lobby. This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) for mock responses. When running on Rivet servers, you can access the given lobby token from the [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. pub async fn matchmaker_lobbies_get_state(configuration: &configuration::Configuration, lobby_id: &str) -> Result> { let local_var_configuration = configuration; @@ -217,7 +218,7 @@ pub async fn matchmaker_lobbies_get_state(configuration: &configuration::Configu } } -/// Joins a specific lobby. This request will use the direct player count configured for the lobby group. +/// Joins a specific lobby. This request will use the direct player count configured for the lobby group. When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) is enabled in your game namespace, this endpoint does not require a token to authenticate. Otherwise, a [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) can be used for general authentication. pub async fn matchmaker_lobbies_join(configuration: &configuration::Configuration, matchmaker_lobbies_join_request: crate::models::MatchmakerLobbiesJoinRequest) -> Result> { let local_var_configuration = configuration; @@ -249,7 +250,7 @@ pub async fn matchmaker_lobbies_join(configuration: &configuration::Configuratio } } -/// Lists all open lobbies. +/// Lists all open lobbies. When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) is enabled in your game namespace, this endpoint does not require a token to authenticate. Otherwise, a [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) can be used for general authentication. pub async fn matchmaker_lobbies_list(configuration: &configuration::Configuration, include_state: Option) -> Result> { let local_var_configuration = configuration; @@ -283,7 +284,7 @@ pub async fn matchmaker_lobbies_list(configuration: &configuration::Configuratio } } -/// Marks the current lobby as ready to accept connections. Players will not be able to connect to this lobby until the lobby is flagged as ready. +/// Marks the current lobby as ready to accept connections. Players will not be able to connect to this lobby until the lobby is flagged as ready. This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) for mock responses. When running on Rivet servers, you can access the given lobby token from the [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. pub async fn matchmaker_lobbies_ready(configuration: &configuration::Configuration, ) -> Result<(), Error> { let local_var_configuration = configuration; @@ -314,7 +315,7 @@ pub async fn matchmaker_lobbies_ready(configuration: &configuration::Configurati } } -/// If `is_closed` is `true`, the matchmaker will no longer route players to the lobby. Players can still join using the /join endpoint (this can be disabled by the developer by rejecting all new connections after setting the lobby to closed). Does not shutdown the lobby. +/// If `is_closed` is `true`, the matchmaker will no longer route players to the lobby. Players can still join using the /join endpoint (this can be disabled by the developer by rejecting all new connections after setting the lobby to closed). Does not shutdown the lobby. This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) for mock responses. When running on Rivet servers, you can access the given lobby token from the [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. pub async fn matchmaker_lobbies_set_closed(configuration: &configuration::Configuration, matchmaker_lobbies_set_closed_request: crate::models::MatchmakerLobbiesSetClosedRequest) -> Result<(), Error> { let local_var_configuration = configuration; @@ -346,6 +347,7 @@ pub async fn matchmaker_lobbies_set_closed(configuration: &configuration::Config } } +/// Sets the state JSON of the current lobby. This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) for mock responses. When running on Rivet servers, you can access the given lobby token from the [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. pub async fn matchmaker_lobbies_set_state(configuration: &configuration::Configuration, body: Option) -> Result<(), Error> { let local_var_configuration = configuration; diff --git a/sdks/runtime/rust/src/models/matchmaker_join_port.rs b/sdks/runtime/rust/src/models/matchmaker_join_port.rs index 900b3980e7..86e07f170a 100644 --- a/sdks/runtime/rust/src/models/matchmaker_join_port.rs +++ b/sdks/runtime/rust/src/models/matchmaker_join_port.rs @@ -18,6 +18,7 @@ pub struct MatchmakerJoinPort { pub host: Option, #[serde(rename = "hostname")] pub hostname: String, + /// Whether or not this lobby port uses TLS. You cannot mix a non-TLS and TLS ports. #[serde(rename = "is_tls")] pub is_tls: bool, /// The port number for this lobby. Will be null if using a port range. diff --git a/sdks/runtime/typescript/src/api/resources/kv/client/Client.ts b/sdks/runtime/typescript/src/api/resources/kv/client/Client.ts index 75096067ba..2b8d581aae 100644 --- a/sdks/runtime/typescript/src/api/resources/kv/client/Client.ts +++ b/sdks/runtime/typescript/src/api/resources/kv/client/Client.ts @@ -57,7 +57,6 @@ export class Kv { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "X-Fern-Language": "JavaScript", }, contentType: "application/json", queryParameters: _queryParams, @@ -177,7 +176,6 @@ export class Kv { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "X-Fern-Language": "JavaScript", }, contentType: "application/json", body: await serializers.kv.PutRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), @@ -298,7 +296,6 @@ export class Kv { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "X-Fern-Language": "JavaScript", }, contentType: "application/json", queryParameters: _queryParams, @@ -419,7 +416,6 @@ export class Kv { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "X-Fern-Language": "JavaScript", }, contentType: "application/json", queryParameters: _queryParams, @@ -558,7 +554,6 @@ export class Kv { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "X-Fern-Language": "JavaScript", }, contentType: "application/json", queryParameters: _queryParams, @@ -678,7 +673,6 @@ export class Kv { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "X-Fern-Language": "JavaScript", }, contentType: "application/json", body: await serializers.kv.PutBatchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), @@ -804,7 +798,6 @@ export class Kv { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "X-Fern-Language": "JavaScript", }, contentType: "application/json", queryParameters: _queryParams, diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/JoinPort.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/JoinPort.ts index 281ab8f1d3..92a05b6beb 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/JoinPort.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/JoinPort.ts @@ -10,7 +10,7 @@ export interface JoinPort { hostname: string; /** The port number for this lobby. Will be null if using a port range. */ port?: number; - /** Whether or not this lobby port uses TLS. You cannot mix a non-TLS and TLS ports. */ portRange?: Rivet.matchmaker.JoinPortRange; + /** Whether or not this lobby port uses TLS. You cannot mix a non-TLS and TLS ports. */ isTls: boolean; } diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/Client.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/Client.ts index bf27db7338..728b7aa4e1 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/Client.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/Client.ts @@ -27,6 +27,7 @@ export class Lobbies { /** * Marks the current lobby as ready to accept connections. Players will not be able to connect to this lobby until the lobby is flagged as ready. + * This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) for mock responses. When running on Rivet servers, you can access the given lobby token from the [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} @@ -43,7 +44,6 @@ export class Lobbies { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "X-Fern-Language": "JavaScript", }, contentType: "application/json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, @@ -143,6 +143,11 @@ export class Lobbies { * join using the /join endpoint (this can be disabled by the developer by rejecting all new connections * after setting the lobby to closed). * Does not shutdown the lobby. + * + * This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for + * authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) + * for mock responses. When running on Rivet servers, you can access the given lobby token from the + * [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} @@ -162,7 +167,6 @@ export class Lobbies { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "X-Fern-Language": "JavaScript", }, contentType: "application/json", body: await serializers.matchmaker.SetLobbyClosedRequest.jsonOrThrow(request, { @@ -261,6 +265,12 @@ export class Lobbies { } /** + * Sets the state JSON of the current lobby. + * + * This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for + * authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) + * for mock responses. When running on Rivet servers, you can access the given lobby token from the + * [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} @@ -277,7 +287,6 @@ export class Lobbies { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "X-Fern-Language": "JavaScript", }, contentType: "application/json", body: @@ -379,6 +388,12 @@ export class Lobbies { } /** + * Get the state of any lobby. + * + * This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for + * authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) + * for mock responses. When running on Rivet servers, you can access the given lobby token from the + * [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} @@ -395,7 +410,6 @@ export class Lobbies { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "X-Fern-Language": "JavaScript", }, contentType: "application/json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, @@ -500,6 +514,12 @@ export class Lobbies { * Finds a lobby based on the given criteria. * If a lobby is not found and `prevent_auto_create_lobby` is `false`, * a new lobby will be created. + * + * When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) is enabled in + * your game namespace, this endpoint does not require a token to authenticate. Otherwise, a + * [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used + * for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) + * can be used for general authentication. * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} @@ -520,7 +540,6 @@ export class Lobbies { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "X-Fern-Language": "JavaScript", origin: origin != null ? origin : undefined, }, contentType: "application/json", @@ -627,6 +646,12 @@ export class Lobbies { * Joins a specific lobby. * This request will use the direct player count configured for the * lobby group. + * + * When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) is enabled in + * your game namespace, this endpoint does not require a token to authenticate. Otherwise, a + * [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used + * for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) + * can be used for general authentication. * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} @@ -646,7 +671,6 @@ export class Lobbies { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "X-Fern-Language": "JavaScript", }, contentType: "application/json", body: await serializers.matchmaker.JoinLobbyRequest.jsonOrThrow(request, { @@ -752,6 +776,12 @@ export class Lobbies { /** * Creates a custom lobby. + * + * When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) is enabled in + * your game namespace, this endpoint does not require a token to authenticate. Otherwise, a + * [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used + * for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) + * can be used for general authentication. * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} @@ -771,7 +801,6 @@ export class Lobbies { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "X-Fern-Language": "JavaScript", }, contentType: "application/json", body: await serializers.matchmaker.CreateLobbyRequest.jsonOrThrow(request, { @@ -877,6 +906,12 @@ export class Lobbies { /** * Lists all open lobbies. + * + * When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) is enabled in + * your game namespace, this endpoint does not require a token to authenticate. Otherwise, a + * [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used + * for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) + * can be used for general authentication. * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} @@ -902,7 +937,6 @@ export class Lobbies { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "X-Fern-Language": "JavaScript", }, contentType: "application/json", queryParameters: _queryParams, diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/client/Client.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/client/Client.ts index 613fd16304..7d32e0edd6 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/client/Client.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/client/Client.ts @@ -80,7 +80,6 @@ export class Players { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "X-Fern-Language": "JavaScript", }, contentType: "application/json", body: await serializers.matchmaker.PlayerConnectedRequest.jsonOrThrow(request, { @@ -199,7 +198,6 @@ export class Players { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "X-Fern-Language": "JavaScript", }, contentType: "application/json", body: await serializers.matchmaker.PlayerDisconnectedRequest.jsonOrThrow(request, { @@ -317,7 +315,6 @@ export class Players { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "X-Fern-Language": "JavaScript", }, contentType: "application/json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/regions/client/Client.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/regions/client/Client.ts index da34c7981a..aa6e05cbaa 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/regions/client/Client.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/regions/client/Client.ts @@ -45,7 +45,6 @@ export class Regions { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "X-Fern-Language": "JavaScript", }, contentType: "application/json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, diff --git a/sdks/runtime/typescript/src/core/fetcher/Fetcher.ts b/sdks/runtime/typescript/src/core/fetcher/Fetcher.ts index e25819afbd..19de5d475e 100644 --- a/sdks/runtime/typescript/src/core/fetcher/Fetcher.ts +++ b/sdks/runtime/typescript/src/core/fetcher/Fetcher.ts @@ -2,10 +2,6 @@ import { default as FormData } from "form-data"; import qs from "qs"; import { APIResponse } from "./APIResponse"; -if (typeof window === "undefined") { - global.fetch = require("node-fetch"); -} - export type FetchFunction = (args: Fetcher.Args) => Promise>; export declare namespace Fetcher { @@ -77,18 +73,20 @@ async function fetcherImpl(args: Fetcher.Args): Promise => { const controller = new AbortController(); let abortId = undefined; if (args.timeoutMs != null) { abortId = setTimeout(() => controller.abort(), args.timeoutMs); } - const response = await fetch(url, { + const response = await fetchFn(url, { method: args.method, headers, body, signal: controller.signal, - credentials: args.withCredentials ? "same-origin" : undefined, + credentials: args.withCredentials ? "include" : undefined, }); if (abortId != null) { clearTimeout(abortId); @@ -119,18 +117,21 @@ async function fetcherImpl(args: Fetcher.Args): Promise 0) { + try { + body = JSON.parse(text); + } catch (err) { + return { + ok: false, + error: { + reason: "non-json", + statusCode: response.status, + rawBody: text, + }, + }; + } } } diff --git a/sdks/runtime/typescript/yarn.lock b/sdks/runtime/typescript/yarn.lock new file mode 100644 index 0000000000..fb57ccd13a --- /dev/null +++ b/sdks/runtime/typescript/yarn.lock @@ -0,0 +1,4 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + +