From a9bee68608655201665937a62b485f44c57e7754 Mon Sep 17 00:00:00 2001 From: MasterPtato Date: Wed, 25 Sep 2024 20:05:37 +0000 Subject: [PATCH] feat: add hash to bootstrap --- fern/definition/cloud/__package__.yml | 1 + lib/bolt/core/src/context/service.rs | 61 +++++++++++-------- lib/convert/src/impls/admin.rs | 2 +- sdks/full/go/admin/clusters/types.go | 12 ++-- sdks/full/go/cloud/cloud.go | 1 + sdks/full/go/servers/builds/client.go | 8 +-- sdks/full/go/servers/datacenters/client.go | 2 +- sdks/full/go/servers/logs/client.go | 2 +- sdks/full/openapi/openapi.yml | 19 +++--- sdks/full/openapi_compat/openapi.yml | 19 +++--- sdks/full/rust-cli/README.md | 12 ++-- sdks/full/rust-cli/docs/AdminClustersPool.md | 2 +- .../rust-cli/docs/CloudBootstrapResponse.md | 1 + sdks/full/rust-cli/docs/ServersBuildsApi.md | 24 ++++---- .../rust-cli/docs/ServersDatacentersApi.md | 6 +- sdks/full/rust-cli/docs/ServersLogsApi.md | 6 +- .../rust-cli/src/apis/servers_builds_api.rs | 32 +++++----- .../src/apis/servers_datacenters_api.rs | 8 +-- .../rust-cli/src/apis/servers_logs_api.rs | 8 +-- .../src/models/admin_clusters_pool.rs | 8 +-- .../src/models/cloud_bootstrap_response.rs | 5 +- sdks/full/rust/README.md | 12 ++-- sdks/full/rust/docs/AdminClustersPool.md | 2 +- sdks/full/rust/docs/CloudBootstrapResponse.md | 1 + sdks/full/rust/docs/ServersBuildsApi.md | 24 ++++---- sdks/full/rust/docs/ServersDatacentersApi.md | 6 +- sdks/full/rust/docs/ServersLogsApi.md | 6 +- sdks/full/rust/src/apis/servers_builds_api.rs | 32 +++++----- .../rust/src/apis/servers_datacenters_api.rs | 8 +-- sdks/full/rust/src/apis/servers_logs_api.rs | 8 +-- .../rust/src/models/admin_clusters_pool.rs | 8 +-- .../src/models/cloud_bootstrap_response.rs | 5 +- sdks/full/typescript/archive.tgz | 4 +- .../cloud/types/BootstrapResponse.ts | 1 + .../servers/resources/builds/client/Client.ts | 16 ++--- .../resources/datacenters/client/Client.ts | 4 +- .../servers/resources/logs/client/Client.ts | 4 +- .../cloud/types/BootstrapResponse.ts | 2 + .../clusters/resources/common/types/Pool.d.ts | 2 +- .../cloud/types/BootstrapResponse.d.ts | 1 + .../clusters/resources/common/types/Pool.d.ts | 2 +- .../cloud/types/BootstrapResponse.d.ts | 1 + svc/api/cloud/src/route/bootstrap.rs | 3 +- svc/api/cloud/src/route/groups.rs | 2 +- svc/api/group/src/route/groups.rs | 2 +- 45 files changed, 212 insertions(+), 183 deletions(-) diff --git a/fern/definition/cloud/__package__.yml b/fern/definition/cloud/__package__.yml index f313f24bd5..26596ac750 100644 --- a/fern/definition/cloud/__package__.yml +++ b/fern/definition/cloud/__package__.yml @@ -19,6 +19,7 @@ types: origins: BootstrapOrigins captcha: BootstrapCaptcha login_methods: BootstrapLoginMethods + deploy_hash: string BootstrapCluster: docs: The type of cluster that the backend is currently running. diff --git a/lib/bolt/core/src/context/service.rs b/lib/bolt/core/src/context/service.rs index d4e5d4c99d..72f99c36d7 100644 --- a/lib/bolt/core/src/context/service.rs +++ b/lib/bolt/core/src/context/service.rs @@ -510,33 +510,35 @@ impl ServiceContextData { ); } - let can_depend = - if self.is_monolith_worker() { - matches!( - dep.config().kind, - ServiceKind::Database { .. } - | ServiceKind::Cache { .. } | ServiceKind::Operation { .. } - | ServiceKind::Package { .. } - | ServiceKind::Consumer { .. } - ) - } else if matches!(self.config().kind, ServiceKind::Api { .. }) { - matches!( - dep.config().kind, - ServiceKind::Database { .. } - | ServiceKind::Cache { .. } | ServiceKind::Operation { .. } - | ServiceKind::Package { .. } - | ServiceKind::ApiRoutes { .. } - | ServiceKind::Consumer { .. } - ) - } else { - matches!( - dep.config().kind, - ServiceKind::Database { .. } - | ServiceKind::Cache { .. } | ServiceKind::Operation { .. } - | ServiceKind::Package { .. } - | ServiceKind::Consumer { .. } - ) - }; + let can_depend = if self.is_monolith_worker() { + matches!( + dep.config().kind, + ServiceKind::Database { .. } + | ServiceKind::Cache { .. } + | ServiceKind::Operation { .. } + | ServiceKind::Package { .. } + | ServiceKind::Consumer { .. } + ) + } else if matches!(self.config().kind, ServiceKind::Api { .. }) { + matches!( + dep.config().kind, + ServiceKind::Database { .. } + | ServiceKind::Cache { .. } + | ServiceKind::Operation { .. } + | ServiceKind::Package { .. } + | ServiceKind::ApiRoutes { .. } + | ServiceKind::Consumer { .. } + ) + } else { + matches!( + dep.config().kind, + ServiceKind::Database { .. } + | ServiceKind::Cache { .. } + | ServiceKind::Operation { .. } + | ServiceKind::Package { .. } + | ServiceKind::Consumer { .. } + ) + }; if !can_depend { panic!( @@ -771,6 +773,11 @@ impl ServiceContextData { let source_hash = self.source_hash_dev(&BuildOptimization::Debug).await?; env.insert("RIVET_SOURCE_HASH".into(), source_hash.clone()); + env.insert( + "RIVET_PROJECT_SOURCE_HASH".into(), + project_ctx.source_hash(), + ); + let ns_service_config = self.ns_service_config().await; env.insert( "TOKIO_WORKER_THREADS".into(), diff --git a/lib/convert/src/impls/admin.rs b/lib/convert/src/impls/admin.rs index 2091f072f9..d4e0271015 100644 --- a/lib/convert/src/impls/admin.rs +++ b/lib/convert/src/impls/admin.rs @@ -96,7 +96,7 @@ impl ApiTryFrom for models::AdminClustersDatacenter .map(|p| { Ok(models::AdminClustersPool { desired_count: p.desired_count.try_into()?, - drain_timeout: p.drain_timeout.try_into()?, + drain_timeout_ms: p.drain_timeout.try_into()?, hardware: p .hardware .iter() diff --git a/sdks/full/go/admin/clusters/types.go b/sdks/full/go/admin/clusters/types.go index 81f0fcebc9..7847932451 100644 --- a/sdks/full/go/admin/clusters/types.go +++ b/sdks/full/go/admin/clusters/types.go @@ -130,12 +130,12 @@ func (h *Hardware) String() string { } type Pool struct { - PoolType PoolType `json:"pool_type,omitempty"` - Hardware []*Hardware `json:"hardware,omitempty"` - DesiredCount int `json:"desired_count"` - MinCount int `json:"min_count"` - MaxCount int `json:"max_count"` - DrainTimeout int64 `json:"drain_timeout"` + PoolType PoolType `json:"pool_type,omitempty"` + Hardware []*Hardware `json:"hardware,omitempty"` + DesiredCount int `json:"desired_count"` + MinCount int `json:"min_count"` + MaxCount int `json:"max_count"` + DrainTimeoutMs int64 `json:"drain_timeout_ms"` _rawJSON json.RawMessage } diff --git a/sdks/full/go/cloud/cloud.go b/sdks/full/go/cloud/cloud.go index 91925c3e04..185b0b8b43 100644 --- a/sdks/full/go/cloud/cloud.go +++ b/sdks/full/go/cloud/cloud.go @@ -15,6 +15,7 @@ type BootstrapResponse struct { Origins *BootstrapOrigins `json:"origins,omitempty"` Captcha *BootstrapCaptcha `json:"captcha,omitempty"` LoginMethods *BootstrapLoginMethods `json:"login_methods,omitempty"` + DeployHash string `json:"deploy_hash"` _rawJSON json.RawMessage } diff --git a/sdks/full/go/servers/builds/client.go b/sdks/full/go/servers/builds/client.go index 7cff242000..b949d9910a 100644 --- a/sdks/full/go/servers/builds/client.go +++ b/sdks/full/go/servers/builds/client.go @@ -36,7 +36,7 @@ func NewClient(opts ...core.ClientOption) *Client { } // Lists all builds of the game associated with the token used. Can be filtered by tags in the query string. -func (c *Client) GetBuild(ctx context.Context, gameId uuid.UUID, environmentId uuid.UUID, buildId uuid.UUID, request *servers.GetBuildRequest) (*servers.GetBuildResponse, error) { +func (c *Client) Get(ctx context.Context, gameId uuid.UUID, environmentId uuid.UUID, buildId uuid.UUID, request *servers.GetBuildRequest) (*servers.GetBuildResponse, error) { baseURL := "https://api.rivet.gg" if c.baseURL != "" { baseURL = c.baseURL @@ -122,7 +122,7 @@ func (c *Client) GetBuild(ctx context.Context, gameId uuid.UUID, environmentId u } // Lists all builds of the game associated with the token used. Can be filtered by tags in the query string. -func (c *Client) ListBuilds(ctx context.Context, gameId uuid.UUID, environmentId uuid.UUID, request *servers.ListBuildsRequest) (*servers.ListBuildsResponse, error) { +func (c *Client) List(ctx context.Context, gameId uuid.UUID, environmentId uuid.UUID, request *servers.ListBuildsRequest) (*servers.ListBuildsResponse, error) { baseURL := "https://api.rivet.gg" if c.baseURL != "" { baseURL = c.baseURL @@ -286,7 +286,7 @@ func (c *Client) PatchTags(ctx context.Context, gameId uuid.UUID, environmentId } // Creates a new game build for the given game. -func (c *Client) PrepareBuild(ctx context.Context, gameId uuid.UUID, environmentId uuid.UUID, request *servers.CreateBuildRequest) (*servers.CreateBuildResponse, error) { +func (c *Client) Prepare(ctx context.Context, gameId uuid.UUID, environmentId uuid.UUID, request *servers.CreateBuildRequest) (*servers.CreateBuildResponse, error) { baseURL := "https://api.rivet.gg" if c.baseURL != "" { baseURL = c.baseURL @@ -365,7 +365,7 @@ func (c *Client) PrepareBuild(ctx context.Context, gameId uuid.UUID, environment } // Marks an upload as complete. -func (c *Client) CompleteBuild(ctx context.Context, gameId uuid.UUID, environmentId uuid.UUID, buildId uuid.UUID) error { +func (c *Client) Complete(ctx context.Context, gameId uuid.UUID, environmentId uuid.UUID, buildId uuid.UUID) error { baseURL := "https://api.rivet.gg" if c.baseURL != "" { baseURL = c.baseURL diff --git a/sdks/full/go/servers/datacenters/client.go b/sdks/full/go/servers/datacenters/client.go index 91506e1336..1828c0ee22 100644 --- a/sdks/full/go/servers/datacenters/client.go +++ b/sdks/full/go/servers/datacenters/client.go @@ -34,7 +34,7 @@ func NewClient(opts ...core.ClientOption) *Client { } } -func (c *Client) ListDatacenters(ctx context.Context, gameId uuid.UUID, environmentId uuid.UUID) (*servers.ListDatacentersResponse, error) { +func (c *Client) List(ctx context.Context, gameId uuid.UUID, environmentId uuid.UUID) (*servers.ListDatacentersResponse, error) { baseURL := "https://api.rivet.gg" if c.baseURL != "" { baseURL = c.baseURL diff --git a/sdks/full/go/servers/logs/client.go b/sdks/full/go/servers/logs/client.go index c4ccc28963..c7c8e123d4 100644 --- a/sdks/full/go/servers/logs/client.go +++ b/sdks/full/go/servers/logs/client.go @@ -36,7 +36,7 @@ func NewClient(opts ...core.ClientOption) *Client { } // Returns the logs for a given server. -func (c *Client) GetServerLogs(ctx context.Context, gameId uuid.UUID, environmentId uuid.UUID, serverId uuid.UUID, request *servers.GetServerLogsRequest) (*servers.GetServerLogsResponse, error) { +func (c *Client) Get(ctx context.Context, gameId uuid.UUID, environmentId uuid.UUID, serverId uuid.UUID, request *servers.GetServerLogsRequest) (*servers.GetServerLogsResponse, error) { baseURL := "https://api.rivet.gg" if c.baseURL != "" { baseURL = c.baseURL diff --git a/sdks/full/openapi/openapi.yml b/sdks/full/openapi/openapi.yml index d4228f5e7e..be57289770 100644 --- a/sdks/full/openapi/openapi.yml +++ b/sdks/full/openapi/openapi.yml @@ -9363,7 +9363,7 @@ paths: description: >- Lists all builds of the game associated with the token used. Can be filtered by tags in the query string. - operationId: servers_builds_getBuild + operationId: servers_builds_get tags: - ServersBuilds parameters: @@ -9439,7 +9439,7 @@ paths: description: >- Lists all builds of the game associated with the token used. Can be filtered by tags in the query string. - operationId: servers_builds_listBuilds + operationId: servers_builds_list tags: - ServersBuilds parameters: @@ -9581,7 +9581,7 @@ paths: /games/{game_id}/environments/{environment_id}/builds/prepare: post: description: Creates a new game build for the given game. - operationId: servers_builds_prepareBuild + operationId: servers_builds_prepare tags: - ServersBuilds parameters: @@ -9650,7 +9650,7 @@ paths: /games/{game_id}/environments/{environment_id}/builds/{build_id}/complete: post: description: Marks an upload as complete. - operationId: servers_builds_completeBuild + operationId: servers_builds_complete tags: - ServersBuilds parameters: @@ -9714,7 +9714,7 @@ paths: security: *ref_0 /games/{game_id}/environments/{environment_id}/datacenters: get: - operationId: servers_datacenters_listDatacenters + operationId: servers_datacenters_list tags: - ServersDatacenters parameters: @@ -9777,7 +9777,7 @@ paths: /games/{game_id}/environments/{environment_id}/servers/{server_id}/logs: get: description: Returns the logs for a given server. - operationId: servers_logs_getServerLogs + operationId: servers_logs_get tags: - ServersLogs parameters: @@ -9912,12 +9912,15 @@ components: $ref: '#/components/schemas/CloudBootstrapCaptcha' login_methods: $ref: '#/components/schemas/CloudBootstrapLoginMethods' + deploy_hash: + type: string required: - cluster - access - origins - captcha - login_methods + - deploy_hash CloudBootstrapCluster: type: string enum: @@ -11098,7 +11101,7 @@ components: type: integer max_count: type: integer - drain_timeout: + drain_timeout_ms: type: integer format: int64 required: @@ -11107,7 +11110,7 @@ components: - desired_count - min_count - max_count - - drain_timeout + - drain_timeout_ms AdminClustersHardware: type: object properties: diff --git a/sdks/full/openapi_compat/openapi.yml b/sdks/full/openapi_compat/openapi.yml index aaa67cca65..c94646ecde 100644 --- a/sdks/full/openapi_compat/openapi.yml +++ b/sdks/full/openapi_compat/openapi.yml @@ -146,7 +146,7 @@ components: properties: desired_count: type: integer - drain_timeout: + drain_timeout_ms: format: int64 type: integer hardware: @@ -165,7 +165,7 @@ components: - desired_count - min_count - max_count - - drain_timeout + - drain_timeout_ms type: object AdminClustersPoolType: enum: @@ -441,6 +441,8 @@ components: $ref: '#/components/schemas/CloudBootstrapCaptcha' cluster: $ref: '#/components/schemas/CloudBootstrapCluster' + deploy_hash: + type: string domains: $ref: '#/components/schemas/CloudBootstrapDomains' login_methods: @@ -453,6 +455,7 @@ components: - origins - captcha - login_methods + - deploy_hash type: object CloudBuildSummary: description: A build summary. @@ -9070,7 +9073,7 @@ paths: get: description: Lists all builds of the game associated with the token used. Can be filtered by tags in the query string. - operationId: servers_builds_listBuilds + operationId: servers_builds_list parameters: - in: path name: game_id @@ -9138,7 +9141,7 @@ paths: /games/{game_id}/environments/{environment_id}/builds/prepare: post: description: Creates a new game build for the given game. - operationId: servers_builds_prepareBuild + operationId: servers_builds_prepare parameters: - in: path name: game_id @@ -9208,7 +9211,7 @@ paths: get: description: Lists all builds of the game associated with the token used. Can be filtered by tags in the query string. - operationId: servers_builds_getBuild + operationId: servers_builds_get parameters: - in: path name: game_id @@ -9282,7 +9285,7 @@ paths: /games/{game_id}/environments/{environment_id}/builds/{build_id}/complete: post: description: Marks an upload as complete. - operationId: servers_builds_completeBuild + operationId: servers_builds_complete parameters: - in: path name: game_id @@ -9420,7 +9423,7 @@ paths: - ServersBuilds /games/{game_id}/environments/{environment_id}/datacenters: get: - operationId: servers_datacenters_listDatacenters + operationId: servers_datacenters_list parameters: - in: path name: game_id @@ -9779,7 +9782,7 @@ paths: /games/{game_id}/environments/{environment_id}/servers/{server_id}/logs: get: description: Returns the logs for a given server. - operationId: servers_logs_getServerLogs + operationId: servers_logs_get parameters: - in: path name: game_id diff --git a/sdks/full/rust-cli/README.md b/sdks/full/rust-cli/README.md index ffe8ca964f..b2c45ca2b4 100644 --- a/sdks/full/rust-cli/README.md +++ b/sdks/full/rust-cli/README.md @@ -173,13 +173,13 @@ Class | Method | HTTP request | Description *ServersApi* | [**servers_destroy**](docs/ServersApi.md#servers_destroy) | **DELETE** /games/{game_id}/environments/{environment_id}/servers/{server_id} | *ServersApi* | [**servers_get**](docs/ServersApi.md#servers_get) | **GET** /games/{game_id}/environments/{environment_id}/servers/{server_id} | *ServersApi* | [**servers_list**](docs/ServersApi.md#servers_list) | **GET** /games/{game_id}/environments/{environment_id}/servers | -*ServersBuildsApi* | [**servers_builds_complete_build**](docs/ServersBuildsApi.md#servers_builds_complete_build) | **POST** /games/{game_id}/environments/{environment_id}/builds/{build_id}/complete | -*ServersBuildsApi* | [**servers_builds_get_build**](docs/ServersBuildsApi.md#servers_builds_get_build) | **GET** /games/{game_id}/environments/{environment_id}/builds/{build_id} | -*ServersBuildsApi* | [**servers_builds_list_builds**](docs/ServersBuildsApi.md#servers_builds_list_builds) | **GET** /games/{game_id}/environments/{environment_id}/builds | +*ServersBuildsApi* | [**servers_builds_complete**](docs/ServersBuildsApi.md#servers_builds_complete) | **POST** /games/{game_id}/environments/{environment_id}/builds/{build_id}/complete | +*ServersBuildsApi* | [**servers_builds_get**](docs/ServersBuildsApi.md#servers_builds_get) | **GET** /games/{game_id}/environments/{environment_id}/builds/{build_id} | +*ServersBuildsApi* | [**servers_builds_list**](docs/ServersBuildsApi.md#servers_builds_list) | **GET** /games/{game_id}/environments/{environment_id}/builds | *ServersBuildsApi* | [**servers_builds_patch_tags**](docs/ServersBuildsApi.md#servers_builds_patch_tags) | **PATCH** /games/{game_id}/environments/{environment_id}/builds/{build_id}/tags | -*ServersBuildsApi* | [**servers_builds_prepare_build**](docs/ServersBuildsApi.md#servers_builds_prepare_build) | **POST** /games/{game_id}/environments/{environment_id}/builds/prepare | -*ServersDatacentersApi* | [**servers_datacenters_list_datacenters**](docs/ServersDatacentersApi.md#servers_datacenters_list_datacenters) | **GET** /games/{game_id}/environments/{environment_id}/datacenters | -*ServersLogsApi* | [**servers_logs_get_server_logs**](docs/ServersLogsApi.md#servers_logs_get_server_logs) | **GET** /games/{game_id}/environments/{environment_id}/servers/{server_id}/logs | +*ServersBuildsApi* | [**servers_builds_prepare**](docs/ServersBuildsApi.md#servers_builds_prepare) | **POST** /games/{game_id}/environments/{environment_id}/builds/prepare | +*ServersDatacentersApi* | [**servers_datacenters_list**](docs/ServersDatacentersApi.md#servers_datacenters_list) | **GET** /games/{game_id}/environments/{environment_id}/datacenters | +*ServersLogsApi* | [**servers_logs_get**](docs/ServersLogsApi.md#servers_logs_get) | **GET** /games/{game_id}/environments/{environment_id}/servers/{server_id}/logs | ## Documentation For Models diff --git a/sdks/full/rust-cli/docs/AdminClustersPool.md b/sdks/full/rust-cli/docs/AdminClustersPool.md index 85b3e15347..46919ea7d8 100644 --- a/sdks/full/rust-cli/docs/AdminClustersPool.md +++ b/sdks/full/rust-cli/docs/AdminClustersPool.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **desired_count** | **i32** | | -**drain_timeout** | **i64** | | +**drain_timeout_ms** | **i64** | | **hardware** | [**Vec**](AdminClustersHardware.md) | | **max_count** | **i32** | | **min_count** | **i32** | | diff --git a/sdks/full/rust-cli/docs/CloudBootstrapResponse.md b/sdks/full/rust-cli/docs/CloudBootstrapResponse.md index 59b6d5d897..6ed08ff492 100644 --- a/sdks/full/rust-cli/docs/CloudBootstrapResponse.md +++ b/sdks/full/rust-cli/docs/CloudBootstrapResponse.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **access** | [**crate::models::CloudBootstrapAccess**](CloudBootstrapAccess.md) | | **captcha** | [**crate::models::CloudBootstrapCaptcha**](CloudBootstrapCaptcha.md) | | **cluster** | [**crate::models::CloudBootstrapCluster**](CloudBootstrapCluster.md) | | +**deploy_hash** | **String** | | **domains** | Option<[**crate::models::CloudBootstrapDomains**](CloudBootstrapDomains.md)> | | [optional] **login_methods** | [**crate::models::CloudBootstrapLoginMethods**](CloudBootstrapLoginMethods.md) | | **origins** | [**crate::models::CloudBootstrapOrigins**](CloudBootstrapOrigins.md) | | diff --git a/sdks/full/rust-cli/docs/ServersBuildsApi.md b/sdks/full/rust-cli/docs/ServersBuildsApi.md index 0e66fb7aca..e098d03a16 100644 --- a/sdks/full/rust-cli/docs/ServersBuildsApi.md +++ b/sdks/full/rust-cli/docs/ServersBuildsApi.md @@ -4,17 +4,17 @@ All URIs are relative to *https://api.rivet.gg* Method | HTTP request | Description ------------- | ------------- | ------------- -[**servers_builds_complete_build**](ServersBuildsApi.md#servers_builds_complete_build) | **POST** /games/{game_id}/environments/{environment_id}/builds/{build_id}/complete | -[**servers_builds_get_build**](ServersBuildsApi.md#servers_builds_get_build) | **GET** /games/{game_id}/environments/{environment_id}/builds/{build_id} | -[**servers_builds_list_builds**](ServersBuildsApi.md#servers_builds_list_builds) | **GET** /games/{game_id}/environments/{environment_id}/builds | +[**servers_builds_complete**](ServersBuildsApi.md#servers_builds_complete) | **POST** /games/{game_id}/environments/{environment_id}/builds/{build_id}/complete | +[**servers_builds_get**](ServersBuildsApi.md#servers_builds_get) | **GET** /games/{game_id}/environments/{environment_id}/builds/{build_id} | +[**servers_builds_list**](ServersBuildsApi.md#servers_builds_list) | **GET** /games/{game_id}/environments/{environment_id}/builds | [**servers_builds_patch_tags**](ServersBuildsApi.md#servers_builds_patch_tags) | **PATCH** /games/{game_id}/environments/{environment_id}/builds/{build_id}/tags | -[**servers_builds_prepare_build**](ServersBuildsApi.md#servers_builds_prepare_build) | **POST** /games/{game_id}/environments/{environment_id}/builds/prepare | +[**servers_builds_prepare**](ServersBuildsApi.md#servers_builds_prepare) | **POST** /games/{game_id}/environments/{environment_id}/builds/prepare | -## servers_builds_complete_build +## servers_builds_complete -> servers_builds_complete_build(game_id, environment_id, build_id) +> servers_builds_complete(game_id, environment_id, build_id) Marks an upload as complete. @@ -44,9 +44,9 @@ 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) -## servers_builds_get_build +## servers_builds_get -> crate::models::ServersGetBuildResponse servers_builds_get_build(game_id, environment_id, build_id, tags_json) +> crate::models::ServersGetBuildResponse servers_builds_get(game_id, environment_id, build_id, tags_json) Lists all builds of the game associated with the token used. Can be filtered by tags in the query string. @@ -77,9 +77,9 @@ 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) -## servers_builds_list_builds +## servers_builds_list -> crate::models::ServersListBuildsResponse servers_builds_list_builds(game_id, environment_id, tags_json) +> crate::models::ServersListBuildsResponse servers_builds_list(game_id, environment_id, tags_json) Lists all builds of the game associated with the token used. Can be filtered by tags in the query string. @@ -140,9 +140,9 @@ 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) -## servers_builds_prepare_build +## servers_builds_prepare -> crate::models::ServersCreateBuildResponse servers_builds_prepare_build(game_id, environment_id, servers_create_build_request) +> crate::models::ServersCreateBuildResponse servers_builds_prepare(game_id, environment_id, servers_create_build_request) Creates a new game build for the given game. diff --git a/sdks/full/rust-cli/docs/ServersDatacentersApi.md b/sdks/full/rust-cli/docs/ServersDatacentersApi.md index c9f707681a..565fb365df 100644 --- a/sdks/full/rust-cli/docs/ServersDatacentersApi.md +++ b/sdks/full/rust-cli/docs/ServersDatacentersApi.md @@ -4,13 +4,13 @@ All URIs are relative to *https://api.rivet.gg* Method | HTTP request | Description ------------- | ------------- | ------------- -[**servers_datacenters_list_datacenters**](ServersDatacentersApi.md#servers_datacenters_list_datacenters) | **GET** /games/{game_id}/environments/{environment_id}/datacenters | +[**servers_datacenters_list**](ServersDatacentersApi.md#servers_datacenters_list) | **GET** /games/{game_id}/environments/{environment_id}/datacenters | -## servers_datacenters_list_datacenters +## servers_datacenters_list -> crate::models::ServersListDatacentersResponse servers_datacenters_list_datacenters(game_id, environment_id) +> crate::models::ServersListDatacentersResponse servers_datacenters_list(game_id, environment_id) ### Parameters diff --git a/sdks/full/rust-cli/docs/ServersLogsApi.md b/sdks/full/rust-cli/docs/ServersLogsApi.md index b0f8b700a7..4727cba190 100644 --- a/sdks/full/rust-cli/docs/ServersLogsApi.md +++ b/sdks/full/rust-cli/docs/ServersLogsApi.md @@ -4,13 +4,13 @@ All URIs are relative to *https://api.rivet.gg* Method | HTTP request | Description ------------- | ------------- | ------------- -[**servers_logs_get_server_logs**](ServersLogsApi.md#servers_logs_get_server_logs) | **GET** /games/{game_id}/environments/{environment_id}/servers/{server_id}/logs | +[**servers_logs_get**](ServersLogsApi.md#servers_logs_get) | **GET** /games/{game_id}/environments/{environment_id}/servers/{server_id}/logs | -## servers_logs_get_server_logs +## servers_logs_get -> crate::models::ServersGetServerLogsResponse servers_logs_get_server_logs(game_id, environment_id, server_id, stream, watch_index) +> crate::models::ServersGetServerLogsResponse servers_logs_get(game_id, environment_id, server_id, stream, watch_index) Returns the logs for a given server. diff --git a/sdks/full/rust-cli/src/apis/servers_builds_api.rs b/sdks/full/rust-cli/src/apis/servers_builds_api.rs index bee4607fd8..1dcd704434 100644 --- a/sdks/full/rust-cli/src/apis/servers_builds_api.rs +++ b/sdks/full/rust-cli/src/apis/servers_builds_api.rs @@ -15,10 +15,10 @@ use crate::apis::ResponseContent; use super::{Error, configuration}; -/// struct for typed errors of method [`servers_builds_complete_build`] +/// struct for typed errors of method [`servers_builds_complete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ServersBuildsCompleteBuildError { +pub enum ServersBuildsCompleteError { Status400(crate::models::ErrorBody), Status403(crate::models::ErrorBody), Status404(crate::models::ErrorBody), @@ -28,10 +28,10 @@ pub enum ServersBuildsCompleteBuildError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`servers_builds_get_build`] +/// struct for typed errors of method [`servers_builds_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ServersBuildsGetBuildError { +pub enum ServersBuildsGetError { Status400(crate::models::ErrorBody), Status403(crate::models::ErrorBody), Status404(crate::models::ErrorBody), @@ -41,10 +41,10 @@ pub enum ServersBuildsGetBuildError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`servers_builds_list_builds`] +/// struct for typed errors of method [`servers_builds_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ServersBuildsListBuildsError { +pub enum ServersBuildsListError { Status400(crate::models::ErrorBody), Status403(crate::models::ErrorBody), Status404(crate::models::ErrorBody), @@ -67,10 +67,10 @@ pub enum ServersBuildsPatchTagsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`servers_builds_prepare_build`] +/// struct for typed errors of method [`servers_builds_prepare`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ServersBuildsPrepareBuildError { +pub enum ServersBuildsPrepareError { Status400(crate::models::ErrorBody), Status403(crate::models::ErrorBody), Status404(crate::models::ErrorBody), @@ -82,7 +82,7 @@ pub enum ServersBuildsPrepareBuildError { /// Marks an upload as complete. -pub async fn servers_builds_complete_build(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, build_id: &str) -> Result<(), Error> { +pub async fn servers_builds_complete(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, build_id: &str) -> Result<(), Error> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; @@ -106,14 +106,14 @@ pub async fn servers_builds_complete_build(configuration: &configuration::Config 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_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 builds of the game associated with the token used. Can be filtered by tags in the query string. -pub async fn servers_builds_get_build(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, build_id: &str, tags_json: Option<&str>) -> Result> { +pub async fn servers_builds_get(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, build_id: &str, tags_json: Option<&str>) -> Result> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; @@ -140,14 +140,14 @@ pub async fn servers_builds_get_build(configuration: &configuration::Configurati 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_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 builds of the game associated with the token used. Can be filtered by tags in the query string. -pub async fn servers_builds_list_builds(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, tags_json: Option<&str>) -> Result> { +pub async fn servers_builds_list(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, tags_json: Option<&str>) -> Result> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; @@ -174,7 +174,7 @@ pub async fn servers_builds_list_builds(configuration: &configuration::Configura 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_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)) } @@ -212,7 +212,7 @@ pub async fn servers_builds_patch_tags(configuration: &configuration::Configurat } /// Creates a new game build for the given game. -pub async fn servers_builds_prepare_build(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, servers_create_build_request: crate::models::ServersCreateBuildRequest) -> Result> { +pub async fn servers_builds_prepare(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, servers_create_build_request: crate::models::ServersCreateBuildRequest) -> Result> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; @@ -237,7 +237,7 @@ pub async fn servers_builds_prepare_build(configuration: &configuration::Configu 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_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/servers_datacenters_api.rs b/sdks/full/rust-cli/src/apis/servers_datacenters_api.rs index a99e1abb23..5bb388081f 100644 --- a/sdks/full/rust-cli/src/apis/servers_datacenters_api.rs +++ b/sdks/full/rust-cli/src/apis/servers_datacenters_api.rs @@ -15,10 +15,10 @@ use crate::apis::ResponseContent; use super::{Error, configuration}; -/// struct for typed errors of method [`servers_datacenters_list_datacenters`] +/// struct for typed errors of method [`servers_datacenters_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ServersDatacentersListDatacentersError { +pub enum ServersDatacentersListError { Status400(crate::models::ErrorBody), Status403(crate::models::ErrorBody), Status404(crate::models::ErrorBody), @@ -29,7 +29,7 @@ pub enum ServersDatacentersListDatacentersError { } -pub async fn servers_datacenters_list_datacenters(configuration: &configuration::Configuration, game_id: &str, environment_id: &str) -> Result> { +pub async fn servers_datacenters_list(configuration: &configuration::Configuration, game_id: &str, environment_id: &str) -> Result> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; @@ -53,7 +53,7 @@ pub async fn servers_datacenters_list_datacenters(configuration: &configuration: 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_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/servers_logs_api.rs b/sdks/full/rust-cli/src/apis/servers_logs_api.rs index cc69865868..d0233ea3a7 100644 --- a/sdks/full/rust-cli/src/apis/servers_logs_api.rs +++ b/sdks/full/rust-cli/src/apis/servers_logs_api.rs @@ -15,10 +15,10 @@ use crate::apis::ResponseContent; use super::{Error, configuration}; -/// struct for typed errors of method [`servers_logs_get_server_logs`] +/// struct for typed errors of method [`servers_logs_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ServersLogsGetServerLogsError { +pub enum ServersLogsGetError { Status400(crate::models::ErrorBody), Status403(crate::models::ErrorBody), Status404(crate::models::ErrorBody), @@ -30,7 +30,7 @@ pub enum ServersLogsGetServerLogsError { /// Returns the logs for a given server. -pub async fn servers_logs_get_server_logs(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, server_id: &str, stream: crate::models::ServersLogStream, watch_index: Option<&str>) -> Result> { +pub async fn servers_logs_get(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, server_id: &str, stream: crate::models::ServersLogStream, watch_index: Option<&str>) -> Result> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; @@ -58,7 +58,7 @@ pub async fn servers_logs_get_server_logs(configuration: &configuration::Configu 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_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/models/admin_clusters_pool.rs b/sdks/full/rust-cli/src/models/admin_clusters_pool.rs index d1baf2e6d1..9718906025 100644 --- a/sdks/full/rust-cli/src/models/admin_clusters_pool.rs +++ b/sdks/full/rust-cli/src/models/admin_clusters_pool.rs @@ -15,8 +15,8 @@ pub struct AdminClustersPool { #[serde(rename = "desired_count")] pub desired_count: i32, - #[serde(rename = "drain_timeout")] - pub drain_timeout: i64, + #[serde(rename = "drain_timeout_ms")] + pub drain_timeout_ms: i64, #[serde(rename = "hardware")] pub hardware: Vec, #[serde(rename = "max_count")] @@ -28,10 +28,10 @@ pub struct AdminClustersPool { } impl AdminClustersPool { - pub fn new(desired_count: i32, drain_timeout: i64, hardware: Vec, max_count: i32, min_count: i32, pool_type: crate::models::AdminClustersPoolType) -> AdminClustersPool { + pub fn new(desired_count: i32, drain_timeout_ms: i64, hardware: Vec, max_count: i32, min_count: i32, pool_type: crate::models::AdminClustersPoolType) -> AdminClustersPool { AdminClustersPool { desired_count, - drain_timeout, + drain_timeout_ms, hardware, max_count, min_count, diff --git a/sdks/full/rust-cli/src/models/cloud_bootstrap_response.rs b/sdks/full/rust-cli/src/models/cloud_bootstrap_response.rs index 523417b1e7..ddce34ac9f 100644 --- a/sdks/full/rust-cli/src/models/cloud_bootstrap_response.rs +++ b/sdks/full/rust-cli/src/models/cloud_bootstrap_response.rs @@ -19,6 +19,8 @@ pub struct CloudBootstrapResponse { pub captcha: Box, #[serde(rename = "cluster")] pub cluster: crate::models::CloudBootstrapCluster, + #[serde(rename = "deploy_hash")] + pub deploy_hash: String, #[serde(rename = "domains", skip_serializing_if = "Option::is_none")] pub domains: Option>, #[serde(rename = "login_methods")] @@ -28,11 +30,12 @@ pub struct CloudBootstrapResponse { } impl CloudBootstrapResponse { - pub fn new(access: crate::models::CloudBootstrapAccess, captcha: crate::models::CloudBootstrapCaptcha, cluster: crate::models::CloudBootstrapCluster, login_methods: crate::models::CloudBootstrapLoginMethods, origins: crate::models::CloudBootstrapOrigins) -> CloudBootstrapResponse { + pub fn new(access: crate::models::CloudBootstrapAccess, captcha: crate::models::CloudBootstrapCaptcha, cluster: crate::models::CloudBootstrapCluster, deploy_hash: String, login_methods: crate::models::CloudBootstrapLoginMethods, origins: crate::models::CloudBootstrapOrigins) -> CloudBootstrapResponse { CloudBootstrapResponse { access, captcha: Box::new(captcha), cluster, + deploy_hash, domains: None, login_methods: Box::new(login_methods), origins: Box::new(origins), diff --git a/sdks/full/rust/README.md b/sdks/full/rust/README.md index ffe8ca964f..b2c45ca2b4 100644 --- a/sdks/full/rust/README.md +++ b/sdks/full/rust/README.md @@ -173,13 +173,13 @@ Class | Method | HTTP request | Description *ServersApi* | [**servers_destroy**](docs/ServersApi.md#servers_destroy) | **DELETE** /games/{game_id}/environments/{environment_id}/servers/{server_id} | *ServersApi* | [**servers_get**](docs/ServersApi.md#servers_get) | **GET** /games/{game_id}/environments/{environment_id}/servers/{server_id} | *ServersApi* | [**servers_list**](docs/ServersApi.md#servers_list) | **GET** /games/{game_id}/environments/{environment_id}/servers | -*ServersBuildsApi* | [**servers_builds_complete_build**](docs/ServersBuildsApi.md#servers_builds_complete_build) | **POST** /games/{game_id}/environments/{environment_id}/builds/{build_id}/complete | -*ServersBuildsApi* | [**servers_builds_get_build**](docs/ServersBuildsApi.md#servers_builds_get_build) | **GET** /games/{game_id}/environments/{environment_id}/builds/{build_id} | -*ServersBuildsApi* | [**servers_builds_list_builds**](docs/ServersBuildsApi.md#servers_builds_list_builds) | **GET** /games/{game_id}/environments/{environment_id}/builds | +*ServersBuildsApi* | [**servers_builds_complete**](docs/ServersBuildsApi.md#servers_builds_complete) | **POST** /games/{game_id}/environments/{environment_id}/builds/{build_id}/complete | +*ServersBuildsApi* | [**servers_builds_get**](docs/ServersBuildsApi.md#servers_builds_get) | **GET** /games/{game_id}/environments/{environment_id}/builds/{build_id} | +*ServersBuildsApi* | [**servers_builds_list**](docs/ServersBuildsApi.md#servers_builds_list) | **GET** /games/{game_id}/environments/{environment_id}/builds | *ServersBuildsApi* | [**servers_builds_patch_tags**](docs/ServersBuildsApi.md#servers_builds_patch_tags) | **PATCH** /games/{game_id}/environments/{environment_id}/builds/{build_id}/tags | -*ServersBuildsApi* | [**servers_builds_prepare_build**](docs/ServersBuildsApi.md#servers_builds_prepare_build) | **POST** /games/{game_id}/environments/{environment_id}/builds/prepare | -*ServersDatacentersApi* | [**servers_datacenters_list_datacenters**](docs/ServersDatacentersApi.md#servers_datacenters_list_datacenters) | **GET** /games/{game_id}/environments/{environment_id}/datacenters | -*ServersLogsApi* | [**servers_logs_get_server_logs**](docs/ServersLogsApi.md#servers_logs_get_server_logs) | **GET** /games/{game_id}/environments/{environment_id}/servers/{server_id}/logs | +*ServersBuildsApi* | [**servers_builds_prepare**](docs/ServersBuildsApi.md#servers_builds_prepare) | **POST** /games/{game_id}/environments/{environment_id}/builds/prepare | +*ServersDatacentersApi* | [**servers_datacenters_list**](docs/ServersDatacentersApi.md#servers_datacenters_list) | **GET** /games/{game_id}/environments/{environment_id}/datacenters | +*ServersLogsApi* | [**servers_logs_get**](docs/ServersLogsApi.md#servers_logs_get) | **GET** /games/{game_id}/environments/{environment_id}/servers/{server_id}/logs | ## Documentation For Models diff --git a/sdks/full/rust/docs/AdminClustersPool.md b/sdks/full/rust/docs/AdminClustersPool.md index 85b3e15347..46919ea7d8 100644 --- a/sdks/full/rust/docs/AdminClustersPool.md +++ b/sdks/full/rust/docs/AdminClustersPool.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **desired_count** | **i32** | | -**drain_timeout** | **i64** | | +**drain_timeout_ms** | **i64** | | **hardware** | [**Vec**](AdminClustersHardware.md) | | **max_count** | **i32** | | **min_count** | **i32** | | diff --git a/sdks/full/rust/docs/CloudBootstrapResponse.md b/sdks/full/rust/docs/CloudBootstrapResponse.md index 59b6d5d897..6ed08ff492 100644 --- a/sdks/full/rust/docs/CloudBootstrapResponse.md +++ b/sdks/full/rust/docs/CloudBootstrapResponse.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **access** | [**crate::models::CloudBootstrapAccess**](CloudBootstrapAccess.md) | | **captcha** | [**crate::models::CloudBootstrapCaptcha**](CloudBootstrapCaptcha.md) | | **cluster** | [**crate::models::CloudBootstrapCluster**](CloudBootstrapCluster.md) | | +**deploy_hash** | **String** | | **domains** | Option<[**crate::models::CloudBootstrapDomains**](CloudBootstrapDomains.md)> | | [optional] **login_methods** | [**crate::models::CloudBootstrapLoginMethods**](CloudBootstrapLoginMethods.md) | | **origins** | [**crate::models::CloudBootstrapOrigins**](CloudBootstrapOrigins.md) | | diff --git a/sdks/full/rust/docs/ServersBuildsApi.md b/sdks/full/rust/docs/ServersBuildsApi.md index 0e66fb7aca..e098d03a16 100644 --- a/sdks/full/rust/docs/ServersBuildsApi.md +++ b/sdks/full/rust/docs/ServersBuildsApi.md @@ -4,17 +4,17 @@ All URIs are relative to *https://api.rivet.gg* Method | HTTP request | Description ------------- | ------------- | ------------- -[**servers_builds_complete_build**](ServersBuildsApi.md#servers_builds_complete_build) | **POST** /games/{game_id}/environments/{environment_id}/builds/{build_id}/complete | -[**servers_builds_get_build**](ServersBuildsApi.md#servers_builds_get_build) | **GET** /games/{game_id}/environments/{environment_id}/builds/{build_id} | -[**servers_builds_list_builds**](ServersBuildsApi.md#servers_builds_list_builds) | **GET** /games/{game_id}/environments/{environment_id}/builds | +[**servers_builds_complete**](ServersBuildsApi.md#servers_builds_complete) | **POST** /games/{game_id}/environments/{environment_id}/builds/{build_id}/complete | +[**servers_builds_get**](ServersBuildsApi.md#servers_builds_get) | **GET** /games/{game_id}/environments/{environment_id}/builds/{build_id} | +[**servers_builds_list**](ServersBuildsApi.md#servers_builds_list) | **GET** /games/{game_id}/environments/{environment_id}/builds | [**servers_builds_patch_tags**](ServersBuildsApi.md#servers_builds_patch_tags) | **PATCH** /games/{game_id}/environments/{environment_id}/builds/{build_id}/tags | -[**servers_builds_prepare_build**](ServersBuildsApi.md#servers_builds_prepare_build) | **POST** /games/{game_id}/environments/{environment_id}/builds/prepare | +[**servers_builds_prepare**](ServersBuildsApi.md#servers_builds_prepare) | **POST** /games/{game_id}/environments/{environment_id}/builds/prepare | -## servers_builds_complete_build +## servers_builds_complete -> servers_builds_complete_build(game_id, environment_id, build_id) +> servers_builds_complete(game_id, environment_id, build_id) Marks an upload as complete. @@ -44,9 +44,9 @@ 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) -## servers_builds_get_build +## servers_builds_get -> crate::models::ServersGetBuildResponse servers_builds_get_build(game_id, environment_id, build_id, tags_json) +> crate::models::ServersGetBuildResponse servers_builds_get(game_id, environment_id, build_id, tags_json) Lists all builds of the game associated with the token used. Can be filtered by tags in the query string. @@ -77,9 +77,9 @@ 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) -## servers_builds_list_builds +## servers_builds_list -> crate::models::ServersListBuildsResponse servers_builds_list_builds(game_id, environment_id, tags_json) +> crate::models::ServersListBuildsResponse servers_builds_list(game_id, environment_id, tags_json) Lists all builds of the game associated with the token used. Can be filtered by tags in the query string. @@ -140,9 +140,9 @@ 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) -## servers_builds_prepare_build +## servers_builds_prepare -> crate::models::ServersCreateBuildResponse servers_builds_prepare_build(game_id, environment_id, servers_create_build_request) +> crate::models::ServersCreateBuildResponse servers_builds_prepare(game_id, environment_id, servers_create_build_request) Creates a new game build for the given game. diff --git a/sdks/full/rust/docs/ServersDatacentersApi.md b/sdks/full/rust/docs/ServersDatacentersApi.md index c9f707681a..565fb365df 100644 --- a/sdks/full/rust/docs/ServersDatacentersApi.md +++ b/sdks/full/rust/docs/ServersDatacentersApi.md @@ -4,13 +4,13 @@ All URIs are relative to *https://api.rivet.gg* Method | HTTP request | Description ------------- | ------------- | ------------- -[**servers_datacenters_list_datacenters**](ServersDatacentersApi.md#servers_datacenters_list_datacenters) | **GET** /games/{game_id}/environments/{environment_id}/datacenters | +[**servers_datacenters_list**](ServersDatacentersApi.md#servers_datacenters_list) | **GET** /games/{game_id}/environments/{environment_id}/datacenters | -## servers_datacenters_list_datacenters +## servers_datacenters_list -> crate::models::ServersListDatacentersResponse servers_datacenters_list_datacenters(game_id, environment_id) +> crate::models::ServersListDatacentersResponse servers_datacenters_list(game_id, environment_id) ### Parameters diff --git a/sdks/full/rust/docs/ServersLogsApi.md b/sdks/full/rust/docs/ServersLogsApi.md index b0f8b700a7..4727cba190 100644 --- a/sdks/full/rust/docs/ServersLogsApi.md +++ b/sdks/full/rust/docs/ServersLogsApi.md @@ -4,13 +4,13 @@ All URIs are relative to *https://api.rivet.gg* Method | HTTP request | Description ------------- | ------------- | ------------- -[**servers_logs_get_server_logs**](ServersLogsApi.md#servers_logs_get_server_logs) | **GET** /games/{game_id}/environments/{environment_id}/servers/{server_id}/logs | +[**servers_logs_get**](ServersLogsApi.md#servers_logs_get) | **GET** /games/{game_id}/environments/{environment_id}/servers/{server_id}/logs | -## servers_logs_get_server_logs +## servers_logs_get -> crate::models::ServersGetServerLogsResponse servers_logs_get_server_logs(game_id, environment_id, server_id, stream, watch_index) +> crate::models::ServersGetServerLogsResponse servers_logs_get(game_id, environment_id, server_id, stream, watch_index) Returns the logs for a given server. diff --git a/sdks/full/rust/src/apis/servers_builds_api.rs b/sdks/full/rust/src/apis/servers_builds_api.rs index bee4607fd8..1dcd704434 100644 --- a/sdks/full/rust/src/apis/servers_builds_api.rs +++ b/sdks/full/rust/src/apis/servers_builds_api.rs @@ -15,10 +15,10 @@ use crate::apis::ResponseContent; use super::{Error, configuration}; -/// struct for typed errors of method [`servers_builds_complete_build`] +/// struct for typed errors of method [`servers_builds_complete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ServersBuildsCompleteBuildError { +pub enum ServersBuildsCompleteError { Status400(crate::models::ErrorBody), Status403(crate::models::ErrorBody), Status404(crate::models::ErrorBody), @@ -28,10 +28,10 @@ pub enum ServersBuildsCompleteBuildError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`servers_builds_get_build`] +/// struct for typed errors of method [`servers_builds_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ServersBuildsGetBuildError { +pub enum ServersBuildsGetError { Status400(crate::models::ErrorBody), Status403(crate::models::ErrorBody), Status404(crate::models::ErrorBody), @@ -41,10 +41,10 @@ pub enum ServersBuildsGetBuildError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`servers_builds_list_builds`] +/// struct for typed errors of method [`servers_builds_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ServersBuildsListBuildsError { +pub enum ServersBuildsListError { Status400(crate::models::ErrorBody), Status403(crate::models::ErrorBody), Status404(crate::models::ErrorBody), @@ -67,10 +67,10 @@ pub enum ServersBuildsPatchTagsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`servers_builds_prepare_build`] +/// struct for typed errors of method [`servers_builds_prepare`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ServersBuildsPrepareBuildError { +pub enum ServersBuildsPrepareError { Status400(crate::models::ErrorBody), Status403(crate::models::ErrorBody), Status404(crate::models::ErrorBody), @@ -82,7 +82,7 @@ pub enum ServersBuildsPrepareBuildError { /// Marks an upload as complete. -pub async fn servers_builds_complete_build(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, build_id: &str) -> Result<(), Error> { +pub async fn servers_builds_complete(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, build_id: &str) -> Result<(), Error> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; @@ -106,14 +106,14 @@ pub async fn servers_builds_complete_build(configuration: &configuration::Config 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_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 builds of the game associated with the token used. Can be filtered by tags in the query string. -pub async fn servers_builds_get_build(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, build_id: &str, tags_json: Option<&str>) -> Result> { +pub async fn servers_builds_get(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, build_id: &str, tags_json: Option<&str>) -> Result> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; @@ -140,14 +140,14 @@ pub async fn servers_builds_get_build(configuration: &configuration::Configurati 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_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 builds of the game associated with the token used. Can be filtered by tags in the query string. -pub async fn servers_builds_list_builds(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, tags_json: Option<&str>) -> Result> { +pub async fn servers_builds_list(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, tags_json: Option<&str>) -> Result> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; @@ -174,7 +174,7 @@ pub async fn servers_builds_list_builds(configuration: &configuration::Configura 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_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)) } @@ -212,7 +212,7 @@ pub async fn servers_builds_patch_tags(configuration: &configuration::Configurat } /// Creates a new game build for the given game. -pub async fn servers_builds_prepare_build(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, servers_create_build_request: crate::models::ServersCreateBuildRequest) -> Result> { +pub async fn servers_builds_prepare(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, servers_create_build_request: crate::models::ServersCreateBuildRequest) -> Result> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; @@ -237,7 +237,7 @@ pub async fn servers_builds_prepare_build(configuration: &configuration::Configu 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_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/servers_datacenters_api.rs b/sdks/full/rust/src/apis/servers_datacenters_api.rs index a99e1abb23..5bb388081f 100644 --- a/sdks/full/rust/src/apis/servers_datacenters_api.rs +++ b/sdks/full/rust/src/apis/servers_datacenters_api.rs @@ -15,10 +15,10 @@ use crate::apis::ResponseContent; use super::{Error, configuration}; -/// struct for typed errors of method [`servers_datacenters_list_datacenters`] +/// struct for typed errors of method [`servers_datacenters_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ServersDatacentersListDatacentersError { +pub enum ServersDatacentersListError { Status400(crate::models::ErrorBody), Status403(crate::models::ErrorBody), Status404(crate::models::ErrorBody), @@ -29,7 +29,7 @@ pub enum ServersDatacentersListDatacentersError { } -pub async fn servers_datacenters_list_datacenters(configuration: &configuration::Configuration, game_id: &str, environment_id: &str) -> Result> { +pub async fn servers_datacenters_list(configuration: &configuration::Configuration, game_id: &str, environment_id: &str) -> Result> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; @@ -53,7 +53,7 @@ pub async fn servers_datacenters_list_datacenters(configuration: &configuration: 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_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/servers_logs_api.rs b/sdks/full/rust/src/apis/servers_logs_api.rs index cc69865868..d0233ea3a7 100644 --- a/sdks/full/rust/src/apis/servers_logs_api.rs +++ b/sdks/full/rust/src/apis/servers_logs_api.rs @@ -15,10 +15,10 @@ use crate::apis::ResponseContent; use super::{Error, configuration}; -/// struct for typed errors of method [`servers_logs_get_server_logs`] +/// struct for typed errors of method [`servers_logs_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ServersLogsGetServerLogsError { +pub enum ServersLogsGetError { Status400(crate::models::ErrorBody), Status403(crate::models::ErrorBody), Status404(crate::models::ErrorBody), @@ -30,7 +30,7 @@ pub enum ServersLogsGetServerLogsError { /// Returns the logs for a given server. -pub async fn servers_logs_get_server_logs(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, server_id: &str, stream: crate::models::ServersLogStream, watch_index: Option<&str>) -> Result> { +pub async fn servers_logs_get(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, server_id: &str, stream: crate::models::ServersLogStream, watch_index: Option<&str>) -> Result> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; @@ -58,7 +58,7 @@ pub async fn servers_logs_get_server_logs(configuration: &configuration::Configu 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_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/models/admin_clusters_pool.rs b/sdks/full/rust/src/models/admin_clusters_pool.rs index d1baf2e6d1..9718906025 100644 --- a/sdks/full/rust/src/models/admin_clusters_pool.rs +++ b/sdks/full/rust/src/models/admin_clusters_pool.rs @@ -15,8 +15,8 @@ pub struct AdminClustersPool { #[serde(rename = "desired_count")] pub desired_count: i32, - #[serde(rename = "drain_timeout")] - pub drain_timeout: i64, + #[serde(rename = "drain_timeout_ms")] + pub drain_timeout_ms: i64, #[serde(rename = "hardware")] pub hardware: Vec, #[serde(rename = "max_count")] @@ -28,10 +28,10 @@ pub struct AdminClustersPool { } impl AdminClustersPool { - pub fn new(desired_count: i32, drain_timeout: i64, hardware: Vec, max_count: i32, min_count: i32, pool_type: crate::models::AdminClustersPoolType) -> AdminClustersPool { + pub fn new(desired_count: i32, drain_timeout_ms: i64, hardware: Vec, max_count: i32, min_count: i32, pool_type: crate::models::AdminClustersPoolType) -> AdminClustersPool { AdminClustersPool { desired_count, - drain_timeout, + drain_timeout_ms, hardware, max_count, min_count, diff --git a/sdks/full/rust/src/models/cloud_bootstrap_response.rs b/sdks/full/rust/src/models/cloud_bootstrap_response.rs index 523417b1e7..ddce34ac9f 100644 --- a/sdks/full/rust/src/models/cloud_bootstrap_response.rs +++ b/sdks/full/rust/src/models/cloud_bootstrap_response.rs @@ -19,6 +19,8 @@ pub struct CloudBootstrapResponse { pub captcha: Box, #[serde(rename = "cluster")] pub cluster: crate::models::CloudBootstrapCluster, + #[serde(rename = "deploy_hash")] + pub deploy_hash: String, #[serde(rename = "domains", skip_serializing_if = "Option::is_none")] pub domains: Option>, #[serde(rename = "login_methods")] @@ -28,11 +30,12 @@ pub struct CloudBootstrapResponse { } impl CloudBootstrapResponse { - pub fn new(access: crate::models::CloudBootstrapAccess, captcha: crate::models::CloudBootstrapCaptcha, cluster: crate::models::CloudBootstrapCluster, login_methods: crate::models::CloudBootstrapLoginMethods, origins: crate::models::CloudBootstrapOrigins) -> CloudBootstrapResponse { + pub fn new(access: crate::models::CloudBootstrapAccess, captcha: crate::models::CloudBootstrapCaptcha, cluster: crate::models::CloudBootstrapCluster, deploy_hash: String, login_methods: crate::models::CloudBootstrapLoginMethods, origins: crate::models::CloudBootstrapOrigins) -> CloudBootstrapResponse { CloudBootstrapResponse { access, captcha: Box::new(captcha), cluster, + deploy_hash, domains: None, login_methods: Box::new(login_methods), origins: Box::new(origins), diff --git a/sdks/full/typescript/archive.tgz b/sdks/full/typescript/archive.tgz index 1049378c7c..27b74e14e5 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:e70ecd98fdc0a55c5837f78ea443c123cb26350b3116d8fef271bdd3c3440e9d -size 543786 +oid sha256:3effd8a0ffe26cff52da13f24497afa784a918d7a8e1244bc39b163aab976d9d +size 543815 diff --git a/sdks/full/typescript/src/api/resources/cloud/types/BootstrapResponse.ts b/sdks/full/typescript/src/api/resources/cloud/types/BootstrapResponse.ts index 1a2b560013..b203d8fa0a 100644 --- a/sdks/full/typescript/src/api/resources/cloud/types/BootstrapResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/types/BootstrapResponse.ts @@ -11,4 +11,5 @@ export interface BootstrapResponse { origins: Rivet.cloud.BootstrapOrigins; captcha: Rivet.cloud.BootstrapCaptcha; loginMethods: Rivet.cloud.BootstrapLoginMethods; + deployHash: string; } diff --git a/sdks/full/typescript/src/api/resources/servers/resources/builds/client/Client.ts b/sdks/full/typescript/src/api/resources/servers/resources/builds/client/Client.ts index a169670c02..007cef5e34 100644 --- a/sdks/full/typescript/src/api/resources/servers/resources/builds/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/servers/resources/builds/client/Client.ts @@ -46,11 +46,11 @@ export class Builds { * @throws {@link Rivet.BadRequestError} * * @example - * await client.servers.builds.getBuild("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * await client.servers.builds.get("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { * tagsJson: "string" * }) */ - public async getBuild( + public async get( gameId: string, environmentId: string, buildId: string, @@ -192,11 +192,11 @@ export class Builds { * @throws {@link Rivet.BadRequestError} * * @example - * await client.servers.builds.listBuilds("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * await client.servers.builds.list("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { * tagsJson: "string" * }) */ - public async listBuilds( + public async list( gameId: string, environmentId: string, request: Rivet.servers.ListBuildsRequest = {}, @@ -477,7 +477,7 @@ export class Builds { * @throws {@link Rivet.BadRequestError} * * @example - * await client.servers.builds.prepareBuild("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * await client.servers.builds.prepare("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { * name: "string", * imageTag: "string", * imageFile: {}, @@ -486,7 +486,7 @@ export class Builds { * compression: Rivet.servers.BuildCompression.None * }) */ - public async prepareBuild( + public async prepare( gameId: string, environmentId: string, request: Rivet.servers.CreateBuildRequest, @@ -619,9 +619,9 @@ export class Builds { * @throws {@link Rivet.BadRequestError} * * @example - * await client.servers.builds.completeBuild("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") + * await client.servers.builds.complete("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ - public async completeBuild( + public async complete( gameId: string, environmentId: string, buildId: string, diff --git a/sdks/full/typescript/src/api/resources/servers/resources/datacenters/client/Client.ts b/sdks/full/typescript/src/api/resources/servers/resources/datacenters/client/Client.ts index a919af9724..62359f78e9 100644 --- a/sdks/full/typescript/src/api/resources/servers/resources/datacenters/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/servers/resources/datacenters/client/Client.ts @@ -42,9 +42,9 @@ export class Datacenters { * @throws {@link Rivet.BadRequestError} * * @example - * await client.servers.datacenters.listDatacenters("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") + * await client.servers.datacenters.list("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ - public async listDatacenters( + public async list( gameId: string, environmentId: string, requestOptions?: Datacenters.RequestOptions diff --git a/sdks/full/typescript/src/api/resources/servers/resources/logs/client/Client.ts b/sdks/full/typescript/src/api/resources/servers/resources/logs/client/Client.ts index 5a36ca85b3..d4846f286f 100644 --- a/sdks/full/typescript/src/api/resources/servers/resources/logs/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/servers/resources/logs/client/Client.ts @@ -46,12 +46,12 @@ export class Logs { * @throws {@link Rivet.BadRequestError} * * @example - * await client.servers.logs.getServerLogs("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * await client.servers.logs.get("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { * stream: Rivet.servers.LogStream.StdOut, * watchIndex: "string" * }) */ - public async getServerLogs( + public async get( gameId: string, environmentId: string, serverId: string, diff --git a/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapResponse.ts index 76732cf85d..3bf4eda0bb 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapResponse.ts @@ -23,6 +23,7 @@ export const BootstrapResponse: core.serialization.ObjectSchema< origins: cloud$$bootstrapOrigins, captcha: cloud$$bootstrapCaptcha, loginMethods: core.serialization.property("login_methods", cloud$$bootstrapLoginMethods), + deployHash: core.serialization.property("deploy_hash", core.serialization.string()), }); export declare namespace BootstrapResponse { @@ -33,5 +34,6 @@ export declare namespace BootstrapResponse { origins: cloud.BootstrapOrigins.Raw; captcha: cloud.BootstrapCaptcha.Raw; login_methods: cloud.BootstrapLoginMethods.Raw; + deploy_hash: string; } } diff --git a/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/common/types/Pool.d.ts b/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/common/types/Pool.d.ts index 067b9c9d3f..a57bc32654 100644 --- a/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/common/types/Pool.d.ts +++ b/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/common/types/Pool.d.ts @@ -8,5 +8,5 @@ export interface Pool { desiredCount: number; minCount: number; maxCount: number; - drainTimeout: number; + drainTimeoutMs: number; } diff --git a/sdks/full/typescript/types/api/resources/cloud/types/BootstrapResponse.d.ts b/sdks/full/typescript/types/api/resources/cloud/types/BootstrapResponse.d.ts index aba48f899d..5b50f26c79 100644 --- a/sdks/full/typescript/types/api/resources/cloud/types/BootstrapResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/types/BootstrapResponse.d.ts @@ -9,4 +9,5 @@ export interface BootstrapResponse { origins: Rivet.cloud.BootstrapOrigins; captcha: Rivet.cloud.BootstrapCaptcha; loginMethods: Rivet.cloud.BootstrapLoginMethods; + deployHash: string; } diff --git a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Pool.d.ts b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Pool.d.ts index ba3be9b637..a43d94d0b4 100644 --- a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Pool.d.ts +++ b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Pool.d.ts @@ -13,6 +13,6 @@ export declare namespace Pool { desired_count: number; min_count: number; max_count: number; - drain_timeout: number; + drain_timeout_ms: number; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapResponse.d.ts index 1d7d03e88b..0ff57151d2 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapResponse.d.ts @@ -14,5 +14,6 @@ export declare namespace BootstrapResponse { origins: cloud.BootstrapOrigins.Raw; captcha: cloud.BootstrapCaptcha.Raw; login_methods: cloud.BootstrapLoginMethods.Raw; + deploy_hash: string; } } diff --git a/svc/api/cloud/src/route/bootstrap.rs b/svc/api/cloud/src/route/bootstrap.rs index e05c2c711b..57427a7cc6 100644 --- a/svc/api/cloud/src/route/bootstrap.rs +++ b/svc/api/cloud/src/route/bootstrap.rs @@ -15,7 +15,7 @@ pub async fn get( pub async fn build_bootstrap_data() -> GlobalResult { Ok(models::CloudBootstrapResponse { cluster: models::CloudBootstrapCluster::Oss, - access: match unwrap!(util::env::var("RIVET_ACCESS_KIND").ok()).as_str() { + access: match util::env::var("RIVET_ACCESS_KIND")?.as_str() { "public" => models::CloudBootstrapAccess::Public, "private" => models::CloudBootstrapAccess::Private, _ => bail!("invalid RIVET_ACCESS_KIND"), @@ -46,5 +46,6 @@ pub async fn build_bootstrap_data() -> GlobalResult, body: models::CloudValidateGroupRequest, ) -> GlobalResult { - let publicity = unwrap!(std::env::var("RIVET_ACCESS_KIND").ok()); + let publicity = util::env::var("RIVET_ACCESS_KIND")?; match publicity.as_str() { "public" => {} "private" => { diff --git a/svc/api/group/src/route/groups.rs b/svc/api/group/src/route/groups.rs index b2592f4b9e..6cbe57ebd0 100644 --- a/svc/api/group/src/route/groups.rs +++ b/svc/api/group/src/route/groups.rs @@ -620,7 +620,7 @@ pub async fn create( ) -> GlobalResult { let (_, user_ent) = ctx.auth().user(ctx.op_ctx()).await?; - let publicity = unwrap!(std::env::var("RIVET_ACCESS_KIND").ok()); + let publicity = util::env::var("RIVET_ACCESS_KIND")?; match publicity.as_str() { "public" => {} "private" => {