diff --git a/cli/cli/Services/Web/CodeGen/TsProperty.cs b/cli/cli/Services/Web/CodeGen/TsProperty.cs index 34263f4209..9d0a95356a 100644 --- a/cli/cli/Services/Web/CodeGen/TsProperty.cs +++ b/cli/cli/Services/Web/CodeGen/TsProperty.cs @@ -1,3 +1,5 @@ +using cli.Services.Web.Helpers; + namespace cli.Services.Web.CodeGen; /// @@ -148,7 +150,7 @@ public override void Write(TsCodeWriter writer) if (Modifiers.HasFlag(TsModifier.Abstract)) writer.Write($"{TsModifierExtensions.Abstract} "); - writer.Write(Name); + writer.Write(StringHelper.QuoteIfNeeded(Name)); if (IsOptional) writer.Write("?"); diff --git a/cli/cli/Services/Web/CodeGen/TsType.cs b/cli/cli/Services/Web/CodeGen/TsType.cs index 4876aad7be..d787926dca 100644 --- a/cli/cli/Services/Web/CodeGen/TsType.cs +++ b/cli/cli/Services/Web/CodeGen/TsType.cs @@ -1,3 +1,5 @@ +using cli.Services.Web.Helpers; + namespace cli.Services.Web.CodeGen; /// @@ -322,7 +324,7 @@ public override void Write(TsCodeWriter w) for (int i = 0; i < _props.Length; i++) { - w.Write(_props[i].name); + w.Write(StringHelper.QuoteIfNeeded(_props[i].name)); if (_props[i].propType == PropType.Optional) w.Write("?"); diff --git a/cli/cli/Services/Web/Helpers/OpenApiMethodNameGenerator.cs b/cli/cli/Services/Web/Helpers/OpenApiMethodNameGenerator.cs index ea952cd661..44acd4250b 100644 --- a/cli/cli/Services/Web/Helpers/OpenApiMethodNameGenerator.cs +++ b/cli/cli/Services/Web/Helpers/OpenApiMethodNameGenerator.cs @@ -145,6 +145,7 @@ private static string HttpVerbPrefix(string verb) "POST" => "Post", "PUT" => "Put", "DELETE" => "Delete", + "PATCH" => "Patch", _ => "Get" }; } diff --git a/cli/cli/Services/Web/Helpers/StringHelper.cs b/cli/cli/Services/Web/Helpers/StringHelper.cs index 9ef9a7a84a..60704a524f 100644 --- a/cli/cli/Services/Web/Helpers/StringHelper.cs +++ b/cli/cli/Services/Web/Helpers/StringHelper.cs @@ -18,6 +18,19 @@ public static string ToSafeIdentifier(string input) return sanitized; } + /// + /// Returns true if the input is NOT a valid unquoted TypeScript identifier. + /// + public static bool NeedsQuoting(string input) + => string.IsNullOrEmpty(input) || !Regex.IsMatch(input, @"^[A-Za-z_$][A-Za-z0-9_$]*$"); + + /// + /// Returns the property name quoted if it contains characters invalid for + /// an unquoted TypeScript identifier, otherwise returns it as-is. + /// + public static string QuoteIfNeeded(string name) + => NeedsQuoting(name) ? $"\"{name}\"" : name; + /// /// Converts a string to a PascalCase identifier. /// diff --git a/cli/cli/Services/Web/Helpers/WebApi.cs b/cli/cli/Services/Web/Helpers/WebApi.cs index 417c0164a5..4699dedc30 100644 --- a/cli/cli/Services/Web/Helpers/WebApi.cs +++ b/cli/cli/Services/Web/Helpers/WebApi.cs @@ -121,6 +121,8 @@ private static void GenerateApiMethod(OpenApiDocument document, Dictionary p.In == ParameterLocation.Header) // Exclude 'X-BEAM-SCOPE' header; it is set by default via the Beam Web SDK. .Where(p => p.Name != "X-BEAM-SCOPE") + // Only include headers that makeApiRequest supports (currently just X-BEAM-GAMERTAG). + .Where(p => p.Name == "X-BEAM-GAMERTAG") .ToList(); foreach (var (httpMethod, operation) in pathItem.Operations) @@ -247,7 +249,9 @@ private static (bool requiresAuth, string requiresAuthRemarks) DetermineAuth( var requiresAuth = !serviceType.Equals("basic", StringComparison.InvariantCultureIgnoreCase) || serviceName.Contains("inventory", StringComparison.InvariantCultureIgnoreCase) || (operation.Security.Count >= 1 && - operation.Security[0].Any(kvp => kvp.Key.Reference.Id == "user")); + operation.Security[0].Any(kvp => + kvp.Key.Reference?.Id is "user" or "auth" || + kvp.Key.Scheme?.Equals("bearer", StringComparison.OrdinalIgnoreCase) == true)); var remarks = requiresAuth ? "@remarks\n**Authentication:**\nThis method requires a valid bearer token in the `Authorization` header.\n\n" : string.Empty; diff --git a/web/CHANGELOG.md b/web/CHANGELOG.md index 5833b38846..e23f77fb97 100644 --- a/web/CHANGELOG.md +++ b/web/CHANGELOG.md @@ -5,6 +5,27 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Added + +- Web SDK: `codegen` script in `package.json` to regenerate TypeScript API types from OpenAPI specs via the CLI. +- Web SDK: New generated APIs: `BillingApi`, `CustomerApi`, `PlayerSessionApi`, `PlayerStatsApi`. +- Web SDK: `BeamWebSocket` now sends a `session-start` frame as the first message after connecting, carrying device and platform info that browsers cannot set via WebSocket upgrade headers. + +### Fixed + +- Web SDK: Code generator now quotes TypeScript property names that contain invalid identifier characters (e.g., `x5t#S256`). +- Web SDK: Code generator now produces distinct method names for PATCH endpoints instead of colliding with GET. +- `tsdown.config.ts` updated to use `import.meta.url` instead of `__dirname` for ES module compatibility. +- Web SDK: Code generator now correctly emits `w: true` (auth flag) for endpoints that require a bearer token. Previously, after the `ForcePlayerScopedAuth` OpenAPI processor renamed the security scheme from `user` to `auth` and `Reserailize` stripped reference info, `DetermineAuth` failed to detect auth requirements for all `basic` service endpoints — causing the SDK to omit the `Authorization` header on calls like `GET /basic/accounts/me`. +- Web SDK: HTTP response parsing now preserves precision for int64 values (e.g., player IDs, gamer tags). Previously `JSON.parse` rounded large integers before the reviver could convert them to `BigInt`, producing incorrect IDs like `70820408384930820` instead of `70820408384930816`. A new `BeamJsonUtils.parse` pre-quotes integers >10 digits before parsing so they reach the reviver as strings. + +### Changed + +- Web SDK: Updated auto-generated APIs and schemas to latest OpenAPI specs. +- Web SDK: Web code generator now only emits header parameters that `makeApiRequest` actually supports (currently `X-BEAM-GAMERTAG`); unsupported headers like `X-BEAM-TIMEOUT` are no longer added to generated method signatures. + ## [1.0.0] - 2025-11-19 ### Added diff --git a/web/package.json b/web/package.json index ee03708666..a22f44020d 100644 --- a/web/package.json +++ b/web/package.json @@ -19,6 +19,7 @@ "test": "vitest", "lint": "eslint --ext .ts src tests", "format": "prettier --write .", + "codegen": "WEB_DIR=$PWD && cd \"$WEB_DIR/..\" && [ -f build-number.txt ] || echo 0 > build-number.txt && dotnet run -f net10.0 --project ./cli/cli -- --host https://dev.api.beamable.com oapi generate --engine web --conflict-strategy RenameUncommonConflicts --output \"$WEB_DIR/src/__generated__\"", "doc": "node ./generateDocs.mjs", "release": "node ./update-version.mjs && pnpm build", "prepublishOnly": "pnpm build" diff --git a/web/samples/WordWiz/package.json b/web/samples/WordWiz/package.json index 2d11ee55aa..78f9ccdb62 100644 --- a/web/samples/WordWiz/package.json +++ b/web/samples/WordWiz/package.json @@ -43,5 +43,6 @@ "vite-plugin-mkcert": "^1.17.8", "vite-tsconfig-paths": "^5.1.4", "vitest": "^3.2.4" - } -} + }, + "packageManager": "pnpm@10.33.0" +} \ No newline at end of file diff --git a/web/src/__generated__/apis/AuthApi.ts b/web/src/__generated__/apis/AuthApi.ts index 2998a838e1..3d35658f3e 100644 --- a/web/src/__generated__/apis/AuthApi.ts +++ b/web/src/__generated__/apis/AuthApi.ts @@ -3,25 +3,85 @@ * All manual edits will be lost when this file is regenerated. */ +import { DELETE } from '@/constants'; +import { endpointEncoder } from '@/utils/endpointEncoder'; import { GET } from '@/constants'; import { makeApiRequest } from '@/utils/makeApiRequest'; import { POST } from '@/constants'; import { PUT } from '@/constants'; -import type { AuthResponse } from '@/__generated__/schemas/AuthResponse'; +import { tokenIdPlaceholder } from '@/__generated__/apis/constants'; +import type { AuthV2AuthCode } from '@/__generated__/schemas/AuthV2AuthCode'; +import type { AuthV2AuthCodeRequest } from '@/__generated__/schemas/AuthV2AuthCodeRequest'; +import type { AuthV2AuthorizationCodeAuthRequest } from '@/__generated__/schemas/AuthV2AuthorizationCodeAuthRequest'; +import type { AuthV2AuthResponse } from '@/__generated__/schemas/AuthV2AuthResponse'; +import type { AuthV2DeviceIdAuthRequest } from '@/__generated__/schemas/AuthV2DeviceIdAuthRequest'; +import type { AuthV2EmptyMessage } from '@/__generated__/schemas/AuthV2EmptyMessage'; +import type { AuthV2ExternalAuthRequest } from '@/__generated__/schemas/AuthV2ExternalAuthRequest'; +import type { AuthV2ExternalAuthResponse } from '@/__generated__/schemas/AuthV2ExternalAuthResponse'; +import type { AuthV2GuestAuthRequest } from '@/__generated__/schemas/AuthV2GuestAuthRequest'; +import type { AuthV2JsonWebKeySet } from '@/__generated__/schemas/AuthV2JsonWebKeySet'; +import type { AuthV2LegacyAccessToken } from '@/__generated__/schemas/AuthV2LegacyAccessToken'; +import type { AuthV2ListTokensResponse } from '@/__generated__/schemas/AuthV2ListTokensResponse'; +import type { AuthV2OpenIdConfigResponse } from '@/__generated__/schemas/AuthV2OpenIdConfigResponse'; +import type { AuthV2PasswordAuthRequest } from '@/__generated__/schemas/AuthV2PasswordAuthRequest'; +import type { AuthV2RefreshToken } from '@/__generated__/schemas/AuthV2RefreshToken'; +import type { AuthV2RefreshTokenAuthRequest } from '@/__generated__/schemas/AuthV2RefreshTokenAuthRequest'; +import type { AuthV2RevokeRefreshTokensRequest } from '@/__generated__/schemas/AuthV2RevokeRefreshTokensRequest'; +import type { AuthV2ServerTokenAuthRequest } from '@/__generated__/schemas/AuthV2ServerTokenAuthRequest'; +import type { AuthV2ServerTokenResponse } from '@/__generated__/schemas/AuthV2ServerTokenResponse'; import type { CommonResponse } from '@/__generated__/schemas/CommonResponse'; -import type { GuestAuthRequest } from '@/__generated__/schemas/GuestAuthRequest'; import type { HttpRequester } from '@/network/http/types/HttpRequester'; import type { HttpResponse } from '@/network/http/types/HttpResponse'; import type { ListTokenResponse } from '@/__generated__/schemas/ListTokenResponse'; -import type { PasswordAuthRequest } from '@/__generated__/schemas/PasswordAuthRequest'; -import type { RefreshTokenAuthRequest } from '@/__generated__/schemas/RefreshTokenAuthRequest'; import type { RevokeTokenRequest } from '@/__generated__/schemas/RevokeTokenRequest'; -import type { ServerTokenAuthRequest } from '@/__generated__/schemas/ServerTokenAuthRequest'; -import type { ServerTokenResponse } from '@/__generated__/schemas/ServerTokenResponse'; import type { Token } from '@/__generated__/schemas/Token'; import type { TokenRequestWrapper } from '@/__generated__/schemas/TokenRequestWrapper'; import type { TokenResponse } from '@/__generated__/schemas/TokenResponse'; +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function wellKnownGetOpenidConfiguration(requester: HttpRequester, gamertag?: string): Promise> { + let endpoint = "/api/.well-known/openid-configuration"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: GET, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function authGetKeys(requester: HttpRequester, gamertag?: string): Promise> { + let endpoint = "/api/auth/keys"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: GET, + g: gamertag, + w: true + }); +} + /** * @remarks * **Authentication:** @@ -31,15 +91,15 @@ import type { TokenResponse } from '@/__generated__/schemas/TokenResponse'; * This API method is deprecated and may be removed in future versions. * * @param requester - The `HttpRequester` type to use for the API request. - * @param payload - The `RefreshTokenAuthRequest` instance to use for the API request + * @param payload - The `AuthV2RefreshTokenAuthRequest` instance to use for the API request * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ -export async function authPostRefreshToken(requester: HttpRequester, payload: RefreshTokenAuthRequest, gamertag?: string): Promise> { +export async function authPostRefreshToken(requester: HttpRequester, payload: AuthV2RefreshTokenAuthRequest, gamertag?: string): Promise> { let endpoint = "/api/auth/refresh-token"; // Make the API request - return makeApiRequest({ + return makeApiRequest({ r: requester, e: endpoint, m: POST, @@ -55,15 +115,15 @@ export async function authPostRefreshToken(requester: HttpRequester, payload: Re * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param payload - The `RefreshTokenAuthRequest` instance to use for the API request + * @param payload - The `AuthV2RefreshTokenAuthRequest` instance to use for the API request * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ -export async function authPostTokensRefreshToken(requester: HttpRequester, payload: RefreshTokenAuthRequest, gamertag?: string): Promise> { +export async function authPostTokensRefreshToken(requester: HttpRequester, payload: AuthV2RefreshTokenAuthRequest, gamertag?: string): Promise> { let endpoint = "/api/auth/tokens/refresh-token"; // Make the API request - return makeApiRequest({ + return makeApiRequest({ r: requester, e: endpoint, m: POST, @@ -79,15 +139,15 @@ export async function authPostTokensRefreshToken(requester: HttpRequester, paylo * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param payload - The `GuestAuthRequest` instance to use for the API request + * @param payload - The `AuthV2GuestAuthRequest` instance to use for the API request * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ -export async function authPostTokensGuest(requester: HttpRequester, payload: GuestAuthRequest, gamertag?: string): Promise> { +export async function authPostTokensGuest(requester: HttpRequester, payload: AuthV2GuestAuthRequest, gamertag?: string): Promise> { let endpoint = "/api/auth/tokens/guest"; // Make the API request - return makeApiRequest({ + return makeApiRequest({ r: requester, e: endpoint, m: POST, @@ -103,15 +163,217 @@ export async function authPostTokensGuest(requester: HttpRequester, payload: Gue * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param payload - The `PasswordAuthRequest` instance to use for the API request + * @param payload - The `AuthV2PasswordAuthRequest` instance to use for the API request * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ -export async function authPostTokensPassword(requester: HttpRequester, payload: PasswordAuthRequest, gamertag?: string): Promise> { +export async function authPostTokensPassword(requester: HttpRequester, payload: AuthV2PasswordAuthRequest, gamertag?: string): Promise> { let endpoint = "/api/auth/tokens/password"; // Make the API request - return makeApiRequest({ + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + p: payload, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `AuthV2ExternalAuthRequest` instance to use for the API request + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function authPostTokensExternal(requester: HttpRequester, payload: AuthV2ExternalAuthRequest, gamertag?: string): Promise> { + let endpoint = "/api/auth/tokens/external"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + p: payload, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `AuthV2DeviceIdAuthRequest` instance to use for the API request + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function authPostTokensDeviceId(requester: HttpRequester, payload: AuthV2DeviceIdAuthRequest, gamertag?: string): Promise> { + let endpoint = "/api/auth/tokens/device-id"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + p: payload, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param limit - Max number of items to return + * @param playerIdOrAccountId - The gamer tag or account ID to list tokens for + * @param skip - Skips N items + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function authGetTokens(requester: HttpRequester, limit?: number, playerIdOrAccountId?: string, skip?: number, gamertag?: string): Promise> { + let endpoint = "/api/auth/tokens"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: GET, + q: { + limit, + playerIdOrAccountId, + skip + }, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `AuthV2RevokeRefreshTokensRequest` instance to use for the API request + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function authDeleteTokens(requester: HttpRequester, payload: AuthV2RevokeRefreshTokensRequest, gamertag?: string): Promise> { + let endpoint = "/api/auth/tokens"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: DELETE, + p: payload, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param tokenId - The refresh token id to look up + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function authGetTokensByTokenId(requester: HttpRequester, tokenId: string, gamertag?: string): Promise> { + let endpoint = "/api/auth/tokens/{tokenId}".replace(tokenIdPlaceholder, endpointEncoder(tokenId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: GET, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param tokenId - The access token to validate + * @param customerId - Customer ID + * @param realmId - Realm ID + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function authGetTokensAccessByTokenId(requester: HttpRequester, tokenId: string, customerId?: string, realmId?: string, gamertag?: string): Promise> { + let endpoint = "/api/auth/tokens/access/{tokenId}".replace(tokenIdPlaceholder, endpointEncoder(tokenId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: GET, + q: { + customerId, + realmId + }, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `AuthV2AuthorizationCodeAuthRequest` instance to use for the API request + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function authPostTokensAuthCode(requester: HttpRequester, payload: AuthV2AuthorizationCodeAuthRequest, gamertag?: string): Promise> { + let endpoint = "/api/auth/tokens/auth-code"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + p: payload, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `AuthV2AuthCodeRequest` instance to use for the API request + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function authPostAuthCodes(requester: HttpRequester, payload: AuthV2AuthCodeRequest, gamertag?: string): Promise> { + let endpoint = "/api/auth/auth-codes"; + + // Make the API request + return makeApiRequest({ r: requester, e: endpoint, m: POST, @@ -127,15 +389,15 @@ export async function authPostTokensPassword(requester: HttpRequester, payload: * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param payload - The `ServerTokenAuthRequest` instance to use for the API request + * @param payload - The `AuthV2ServerTokenAuthRequest` instance to use for the API request * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ -export async function authPostServer(requester: HttpRequester, payload: ServerTokenAuthRequest, gamertag?: string): Promise> { +export async function authPostServer(requester: HttpRequester, payload: AuthV2ServerTokenAuthRequest, gamertag?: string): Promise> { let endpoint = "/api/auth/server"; // Make the API request - return makeApiRequest({ + return makeApiRequest({ r: requester, e: endpoint, m: POST, diff --git a/web/src/__generated__/apis/BeamoApi.ts b/web/src/__generated__/apis/BeamoApi.ts index 287afb7274..9f59bd209d 100644 --- a/web/src/__generated__/apis/BeamoApi.ts +++ b/web/src/__generated__/apis/BeamoApi.ts @@ -20,6 +20,7 @@ import type { BeamoV2ConnectionStringResponse } from '@/__generated__/schemas/Be import type { BeamoV2DeleteRegistrationRequest } from '@/__generated__/schemas/BeamoV2DeleteRegistrationRequest'; import type { BeamoV2EmptyMessage } from '@/__generated__/schemas/BeamoV2EmptyMessage'; import type { BeamoV2FederationRegistrationResponse } from '@/__generated__/schemas/BeamoV2FederationRegistrationResponse'; +import type { BeamoV2GetAllServiceLoggingContexts } from '@/__generated__/schemas/BeamoV2GetAllServiceLoggingContexts'; import type { BeamoV2GetManifestsResponse } from '@/__generated__/schemas/BeamoV2GetManifestsResponse'; import type { BeamoV2GetMetricsRequest } from '@/__generated__/schemas/BeamoV2GetMetricsRequest'; import type { BeamoV2GetServiceSecretResponse } from '@/__generated__/schemas/BeamoV2GetServiceSecretResponse'; @@ -30,6 +31,7 @@ import type { BeamoV2ManifestChecksum } from '@/__generated__/schemas/BeamoV2Man import type { BeamoV2PostManifestRequest } from '@/__generated__/schemas/BeamoV2PostManifestRequest'; import type { BeamoV2PromoteBeamoManifestRequest } from '@/__generated__/schemas/BeamoV2PromoteBeamoManifestRequest'; import type { BeamoV2QueryResponse } from '@/__generated__/schemas/BeamoV2QueryResponse'; +import type { BeamoV2ServiceLoggingContext } from '@/__generated__/schemas/BeamoV2ServiceLoggingContext'; import type { BeamoV2ServiceRegistrationQuery } from '@/__generated__/schemas/BeamoV2ServiceRegistrationQuery'; import type { BeamoV2ServiceRegistrationRequest } from '@/__generated__/schemas/BeamoV2ServiceRegistrationRequest'; import type { BeamoV2ServiceRegistrationResponse } from '@/__generated__/schemas/BeamoV2ServiceRegistrationResponse'; @@ -97,9 +99,9 @@ export async function beamoPostManifests(requester: HttpRequester, payload: Beam * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param archived - The `archived` parameter to include in the API request. - * @param limit - The `limit` parameter to include in the API request. - * @param offset - The `offset` parameter to include in the API request. + * @param archived - Whether to include archived manifests. Defaults to true. + * @param limit - Maximum number of items to return. + * @param offset - Number of items to skip. * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ @@ -127,8 +129,8 @@ export async function beamoGetManifests(requester: HttpRequester, archived?: boo * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param manifestId - The `manifestId` parameter to include in the API request. - * @param archived - The `archived` parameter to include in the API request. + * @param manifestId - GUID identifier of the manifest. + * @param archived - Whether to include archived manifests. Defaults to true. * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ @@ -154,7 +156,7 @@ export async function beamoGetManifestsByManifestId(requester: HttpRequester, ma * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param archived - The `archived` parameter to include in the API request. + * @param archived - Whether to include archived manifests. Defaults to true. * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ @@ -344,7 +346,7 @@ export async function beamoPostServicesFederation(requester: HttpRequester, payl * * @param requester - The `HttpRequester` type to use for the API request. * @param payload - The `BeamoV2ServiceRegistrationRequest` instance to use for the API request - * @param serviceName - The `serviceName` parameter to include in the API request. + * @param serviceName - Name of the service to register federation for. * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ @@ -369,7 +371,7 @@ export async function beamoPutServicesFederationTrafficByServiceName(requester: * * @param requester - The `HttpRequester` type to use for the API request. * @param payload - The `BeamoV2DeleteRegistrationRequest` instance to use for the API request - * @param serviceName - The `serviceName` parameter to include in the API request. + * @param serviceName - Name of the service to remove the registration from. * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ @@ -394,7 +396,7 @@ export async function beamoDeleteServicesFederationTrafficByServiceName(requeste * * @param requester - The `HttpRequester` type to use for the API request. * @param payload - The `BeamoV2GetMetricsRequest` instance to use for the API request - * @param serviceName - The `serviceName` parameter to include in the API request. + * @param serviceName - Name of the service to fetch metrics for. * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ @@ -419,7 +421,7 @@ export async function beamoPostServicesMetricsRequestByServiceName(requester: Ht * * @param requester - The `HttpRequester` type to use for the API request. * @param payload - The `BeamoV2StartServiceLogsRequest` instance to use for the API request - * @param serviceName - The `serviceName` parameter to include in the API request. + * @param serviceName - Name of the service to query logs for. * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ @@ -443,7 +445,7 @@ export async function beamoPostServicesLogsQueryByServiceName(requester: HttpReq * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param queryId - The `queryId` parameter to include in the API request. + * @param queryId - ID of the query to stop. * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ @@ -466,7 +468,7 @@ export async function beamoDeleteServicesLogsQueryByQueryId(requester: HttpReque * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param queryId - The `queryId` parameter to include in the API request. + * @param queryId - ID of the completed query. * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ @@ -536,7 +538,7 @@ export async function beamoGetStorageConnection(requester: HttpRequester, gamert * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param storageObjectName - The `storageObjectName` parameter to include in the API request. + * @param storageObjectName - Name of the storage object (collection) to query. * @param EndTime - The `EndTime` parameter to include in the API request. * @param Granularity - The `Granularity` parameter to include in the API request. * @param Period - The `Period` parameter to include in the API request. @@ -563,6 +565,107 @@ export async function beamoGetStoragePerformanceByStorageObjectName(requester: H }); } +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param serviceName - Name of the service. + * @param routingKey - Optional routing key for multi-instance services. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function beamoGetServicesLogsContextByServiceName(requester: HttpRequester, serviceName: string, routingKey?: string, gamertag?: string): Promise> { + let endpoint = "/api/beamo/services/{serviceName}/logs/context".replace(serviceNamePlaceholder, endpointEncoder(serviceName)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: GET, + q: { + routingKey + }, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `BeamoV2ServiceLoggingContext` instance to use for the API request + * @param serviceName - Name of the service. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function beamoPutServicesLogsContextByServiceName(requester: HttpRequester, serviceName: string, payload: BeamoV2ServiceLoggingContext, gamertag?: string): Promise> { + let endpoint = "/api/beamo/services/{serviceName}/logs/context".replace(serviceNamePlaceholder, endpointEncoder(serviceName)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: PUT, + p: payload, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param serviceName - Name of the service. + * @param routingKey - Routing key identifying the logging context to delete. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function beamoDeleteServicesLogsContextByServiceName(requester: HttpRequester, serviceName: string, routingKey?: string, gamertag?: string): Promise> { + let endpoint = "/api/beamo/services/{serviceName}/logs/context".replace(serviceNamePlaceholder, endpointEncoder(serviceName)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: DELETE, + q: { + routingKey + }, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function beamoGetServicesLogsContext(requester: HttpRequester, gamertag?: string): Promise> { + let endpoint = "/api/beamo/services/logs/context"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: GET, + g: gamertag, + w: true + }); +} + /** * @remarks * **Authentication:** diff --git a/web/src/__generated__/apis/BeamoOtelApi.ts b/web/src/__generated__/apis/BeamoOtelApi.ts index bdd740cd42..182ccc18e9 100644 --- a/web/src/__generated__/apis/BeamoOtelApi.ts +++ b/web/src/__generated__/apis/BeamoOtelApi.ts @@ -24,7 +24,7 @@ import type { UpdateOtelViewRequest } from '@/__generated__/schemas/UpdateOtelVi * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param playerId - The `playerId` parameter to include in the API request. + * @param playerId - Player ID to retrieve views for. * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ @@ -74,7 +74,7 @@ export async function beamoPostOtelViews(requester: HttpRequester, payload: Otel * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param viewId - The `viewId` parameter to include in the API request. + * @param viewId - ID of the view to delete. * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ @@ -98,7 +98,7 @@ export async function beamoDeleteOtelViewsByViewId(requester: HttpRequester, vie * * @param requester - The `HttpRequester` type to use for the API request. * @param payload - The `UpdateOtelViewRequest` instance to use for the API request - * @param viewId - The `viewId` parameter to include in the API request. + * @param viewId - ID of the view to update. * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ diff --git a/web/src/__generated__/apis/BillingApi.ts b/web/src/__generated__/apis/BillingApi.ts new file mode 100644 index 0000000000..a10c9c799f --- /dev/null +++ b/web/src/__generated__/apis/BillingApi.ts @@ -0,0 +1,32 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import { makeApiRequest } from '@/utils/makeApiRequest'; +import { POST } from '@/constants'; +import type { HttpRequester } from '@/network/http/types/HttpRequester'; +import type { HttpResponse } from '@/network/http/types/HttpResponse'; +import type { PortalSessionResponse } from '@/__generated__/schemas/PortalSessionResponse'; + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function billingPostPortalSession(requester: HttpRequester, gamertag?: string): Promise> { + let endpoint = "/api/billing/portal-session"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + g: gamertag, + w: true + }); +} diff --git a/web/src/__generated__/apis/CommerceApi.ts b/web/src/__generated__/apis/CommerceApi.ts index ec64dd2984..8323fc467e 100644 --- a/web/src/__generated__/apis/CommerceApi.ts +++ b/web/src/__generated__/apis/CommerceApi.ts @@ -21,6 +21,7 @@ import type { GetTotalCouponResponse } from '@/__generated__/schemas/GetTotalCou import type { GiveCouponReq } from '@/__generated__/schemas/GiveCouponReq'; import type { HttpRequester } from '@/network/http/types/HttpRequester'; import type { HttpResponse } from '@/network/http/types/HttpResponse'; +import type { InventoryUpdateResponse } from '@/__generated__/schemas/InventoryUpdateResponse'; import type { PurchaseRequest } from '@/__generated__/schemas/PurchaseRequest'; import type { ReportPurchaseRequest } from '@/__generated__/schemas/ReportPurchaseRequest'; import type { ResultResponse } from '@/__generated__/schemas/ResultResponse'; @@ -240,11 +241,11 @@ export async function commerceGetOffersAdminByObjectId(requester: HttpRequester, * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ -export async function commercePostPurchaseByObjectId(requester: HttpRequester, objectId: bigint | string, payload: PurchaseRequest, gamertag?: string): Promise> { +export async function commercePostPurchaseByObjectId(requester: HttpRequester, objectId: bigint | string, payload: PurchaseRequest, gamertag?: string): Promise> { let endpoint = "/object/commerce/{objectId}/purchase".replace(objectIdPlaceholder, endpointEncoder(objectId)); // Make the API request - return makeApiRequest({ + return makeApiRequest({ r: requester, e: endpoint, m: POST, diff --git a/web/src/__generated__/apis/ContentApi.ts b/web/src/__generated__/apis/ContentApi.ts index 6799f78c84..1fc342bf39 100644 --- a/web/src/__generated__/apis/ContentApi.ts +++ b/web/src/__generated__/apis/ContentApi.ts @@ -19,6 +19,8 @@ import type { ContentBasicManifestChecksums } from '@/__generated__/schemas/Cont import type { ContentOrText } from '@/__generated__/schemas/ContentOrText'; import type { DeleteLocalizationRequest } from '@/__generated__/schemas/DeleteLocalizationRequest'; import type { EmptyResponse } from '@/__generated__/schemas/EmptyResponse'; +import type { GetBinaryDownloadUrlsRequest } from '@/__generated__/schemas/GetBinaryDownloadUrlsRequest'; +import type { GetBinaryDownloadUrlsResponse } from '@/__generated__/schemas/GetBinaryDownloadUrlsResponse'; import type { GetLocalizationsResponse } from '@/__generated__/schemas/GetLocalizationsResponse'; import type { GetManifestDiffsResponse } from '@/__generated__/schemas/GetManifestDiffsResponse'; import type { GetManifestHistoryResponse } from '@/__generated__/schemas/GetManifestHistoryResponse'; @@ -595,6 +597,30 @@ export async function contentGetManifestChecksumsBasic(requester: HttpRequester, }); } +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `GetBinaryDownloadUrlsRequest` instance to use for the API request + * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. + * + */ +export async function contentPostBinaryPrivateUrlsBasic(requester: HttpRequester, payload: GetBinaryDownloadUrlsRequest, gamertag?: string): Promise> { + let endpoint = "/basic/content/binary/private/urls"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + p: payload, + g: gamertag, + w: true + }); +} + /** * @param requester - The `HttpRequester` type to use for the API request. * @param id - ID of the content manifest diff --git a/web/src/__generated__/apis/CustomerApi.ts b/web/src/__generated__/apis/CustomerApi.ts new file mode 100644 index 0000000000..031e932886 --- /dev/null +++ b/web/src/__generated__/apis/CustomerApi.ts @@ -0,0 +1,649 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import { aliasPlaceholder } from '@/__generated__/apis/constants'; +import { customerIdPlaceholder } from '@/__generated__/apis/constants'; +import { DELETE } from '@/constants'; +import { destinationRealmIdPlaceholder } from '@/__generated__/apis/constants'; +import { endpointEncoder } from '@/utils/endpointEncoder'; +import { gameIdPlaceholder } from '@/__generated__/apis/constants'; +import { GET } from '@/constants'; +import { makeApiRequest } from '@/utils/makeApiRequest'; +import { PATCH } from '@/constants'; +import { POST } from '@/constants'; +import { PUT } from '@/constants'; +import { realmIdPlaceholder } from '@/__generated__/apis/constants'; +import type { ApiCustomersActivatePutCustomerResponse } from '@/__generated__/schemas/ApiCustomersActivatePutCustomerResponse'; +import type { CreateRealmRequest } from '@/__generated__/schemas/CreateRealmRequest'; +import type { CustomerActorAliasAvailableResponse } from '@/__generated__/schemas/CustomerActorAliasAvailableResponse'; +import type { CustomerActorCustomer } from '@/__generated__/schemas/CustomerActorCustomer'; +import type { CustomerActorCustomersResponse } from '@/__generated__/schemas/CustomerActorCustomersResponse'; +import type { CustomerActorCustomerView } from '@/__generated__/schemas/CustomerActorCustomerView'; +import type { CustomerActorNewCustomerRequest } from '@/__generated__/schemas/CustomerActorNewCustomerRequest'; +import type { CustomerActorNewCustomerResponse } from '@/__generated__/schemas/CustomerActorNewCustomerResponse'; +import type { CustomerActorNewGameRequest } from '@/__generated__/schemas/CustomerActorNewGameRequest'; +import type { CustomerActorPromoteRealmRequest } from '@/__generated__/schemas/CustomerActorPromoteRealmRequest'; +import type { CustomerActorPromoteRealmResponse } from '@/__generated__/schemas/CustomerActorPromoteRealmResponse'; +import type { CustomerActorRealmConfigResponse } from '@/__generated__/schemas/CustomerActorRealmConfigResponse'; +import type { CustomerActorRealmConfigSaveRequest } from '@/__generated__/schemas/CustomerActorRealmConfigSaveRequest'; +import type { CustomerActorRealmConfiguration } from '@/__generated__/schemas/CustomerActorRealmConfiguration'; +import type { CustomerActorUpdateGameHierarchyRequest } from '@/__generated__/schemas/CustomerActorUpdateGameHierarchyRequest'; +import type { EmptyMessage } from '@/__generated__/schemas/EmptyMessage'; +import type { GetGamesResponse } from '@/__generated__/schemas/GetGamesResponse'; +import type { HttpRequester } from '@/network/http/types/HttpRequester'; +import type { HttpResponse } from '@/network/http/types/HttpResponse'; +import type { RealmConfigChangeRequest } from '@/__generated__/schemas/RealmConfigChangeRequest'; +import type { RealmView } from '@/__generated__/schemas/RealmView'; +import type { RenameRealmRequest } from '@/__generated__/schemas/RenameRealmRequest'; +import type { StripeSubscriptionResponse } from '@/__generated__/schemas/StripeSubscriptionResponse'; +import type { UpdateRealmRequest } from '@/__generated__/schemas/UpdateRealmRequest'; + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `CustomerActorNewCustomerRequest` instance to use for the API request + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function customersPost(requester: HttpRequester, payload: CustomerActorNewCustomerRequest, gamertag?: string): Promise> { + let endpoint = "/api/customers"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + p: payload, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param showHiddenRealms - Whether to include hidden realms in the response. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function customersGet(requester: HttpRequester, showHiddenRealms?: boolean, gamertag?: string): Promise> { + let endpoint = "/api/customers"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: GET, + q: { + showHiddenRealms + }, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `CustomerActorNewCustomerRequest` instance to use for the API request + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function customersPostVerify(requester: HttpRequester, payload: CustomerActorNewCustomerRequest, gamertag?: string): Promise> { + let endpoint = "/api/customers/verify"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + p: payload, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function customersPutActivate(requester: HttpRequester, gamertag?: string): Promise> { + let endpoint = "/api/customers/activate"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: PUT, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param customerId - The customer ID to look up. + * @param showHiddenRealms - Whether to include hidden realms in the response. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function customersGetByCustomerId(requester: HttpRequester, customerId: string, showHiddenRealms?: boolean, gamertag?: string): Promise> { + let endpoint = "/api/customers/{customerId}".replace(customerIdPlaceholder, endpointEncoder(customerId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: GET, + q: { + showHiddenRealms + }, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param customerId - The customer ID to look up. + * @param showHiddenRealms - Whether to include hidden realms in the response. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function customersGetAdminViewByCustomerId(requester: HttpRequester, customerId: string, showHiddenRealms?: boolean, gamertag?: string): Promise> { + let endpoint = "/api/customers/{customerId}/admin-view".replace(customerIdPlaceholder, endpointEncoder(customerId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: GET, + q: { + showHiddenRealms + }, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param customerId - ID of the customer. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function customersGetStripeSubscriptionByCustomerId(requester: HttpRequester, customerId: string, gamertag?: string): Promise> { + let endpoint = "/api/customers/{customerId}/stripe/subscription".replace(customerIdPlaceholder, endpointEncoder(customerId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: GET, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `UpdateRealmRequest` instance to use for the API request + * @param customerId - ID of the customer that owns the realm. + * @param realmId - ID of the realm to update. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function customersPutRealms(requester: HttpRequester, customerId: string, realmId: string, payload: UpdateRealmRequest, gamertag?: string): Promise> { + let endpoint = "/api/customers/{customerId}/realms/{realmId}".replace(customerIdPlaceholder, endpointEncoder(customerId)).replace(realmIdPlaceholder, endpointEncoder(realmId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: PUT, + p: payload, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param customerId - ID of the customer. + * @param realmId - ID of the realm to retrieve. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function customersGetRealms(requester: HttpRequester, customerId: string, realmId: string, gamertag?: string): Promise> { + let endpoint = "/api/customers/{customerId}/realms/{realmId}".replace(customerIdPlaceholder, endpointEncoder(customerId)).replace(realmIdPlaceholder, endpointEncoder(realmId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: GET, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param customerId - ID of the customer that owns the realm. + * @param realmId - ID of the realm to archive. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function customersDeleteRealms(requester: HttpRequester, customerId: string, realmId: string, gamertag?: string): Promise> { + let endpoint = "/api/customers/{customerId}/realms/{realmId}".replace(customerIdPlaceholder, endpointEncoder(customerId)).replace(realmIdPlaceholder, endpointEncoder(realmId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: DELETE, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param customerId - ID of the customer to retrieve config for. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function customersGetConfigByCustomerId(requester: HttpRequester, customerId: string, gamertag?: string): Promise> { + let endpoint = "/api/customers/{customerId}/config".replace(customerIdPlaceholder, endpointEncoder(customerId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: GET, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param customerId - ID of the customer. + * @param showHiddenRealms - Whether to include hidden realms. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function customersGetGamesByCustomerId(requester: HttpRequester, customerId: string, showHiddenRealms?: boolean, gamertag?: string): Promise> { + let endpoint = "/api/customers/{customerId}/games".replace(customerIdPlaceholder, endpointEncoder(customerId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: GET, + q: { + showHiddenRealms + }, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `CustomerActorNewGameRequest` instance to use for the API request + * @param customerId - ID of the customer to create the game under. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function customersPostGamesByCustomerId(requester: HttpRequester, customerId: string, payload: CustomerActorNewGameRequest, gamertag?: string): Promise> { + let endpoint = "/api/customers/{customerId}/games".replace(customerIdPlaceholder, endpointEncoder(customerId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + p: payload, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param customerId - ID of the customer. + * @param gameId - ID of the game realm to retrieve realms for. + * @param showHiddenRealms - Whether to include hidden realms. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function customersGetGames(requester: HttpRequester, customerId: string, gameId: string, showHiddenRealms?: boolean, gamertag?: string): Promise> { + let endpoint = "/api/customers/{customerId}/games/{gameId}".replace(customerIdPlaceholder, endpointEncoder(customerId)).replace(gameIdPlaceholder, endpointEncoder(gameId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: GET, + q: { + showHiddenRealms + }, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `CustomerActorUpdateGameHierarchyRequest` instance to use for the API request + * @param customerId - ID of the customer. + * @param gameId - ID of the game realm to update. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function customersPutGames(requester: HttpRequester, customerId: string, gameId: string, payload: CustomerActorUpdateGameHierarchyRequest, gamertag?: string): Promise> { + let endpoint = "/api/customers/{customerId}/games/{gameId}".replace(customerIdPlaceholder, endpointEncoder(customerId)).replace(gameIdPlaceholder, endpointEncoder(gameId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: PUT, + p: payload, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `CreateRealmRequest` instance to use for the API request + * @param customerId - ID of the customer to create the realm under. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function customersPostRealmsByCustomerId(requester: HttpRequester, customerId: string, payload: CreateRealmRequest, gamertag?: string): Promise> { + let endpoint = "/api/customers/{customerId}/realms".replace(customerIdPlaceholder, endpointEncoder(customerId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + p: payload, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `RenameRealmRequest` instance to use for the API request + * @param customerId - ID of the customer that owns the realm. + * @param realmId - ID of the realm to rename. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function customersPutRealmsRename(requester: HttpRequester, customerId: string, realmId: string, payload: RenameRealmRequest, gamertag?: string): Promise> { + let endpoint = "/api/customers/{customerId}/realms/{realmId}/rename".replace(customerIdPlaceholder, endpointEncoder(customerId)).replace(realmIdPlaceholder, endpointEncoder(realmId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: PUT, + p: payload, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param customerId - ID of the customer. + * @param realmId - ID of the realm to retrieve config for. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function customersGetRealmsConfig(requester: HttpRequester, customerId: string, realmId: string, gamertag?: string): Promise> { + let endpoint = "/api/customers/{customerId}/realms/{realmId}/config".replace(customerIdPlaceholder, endpointEncoder(customerId)).replace(realmIdPlaceholder, endpointEncoder(realmId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: GET, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `CustomerActorRealmConfigSaveRequest` instance to use for the API request + * @param customerId - ID of the customer. + * @param realmId - ID of the realm to update. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function customersPutRealmsConfig(requester: HttpRequester, customerId: string, realmId: string, payload: CustomerActorRealmConfigSaveRequest, gamertag?: string): Promise> { + let endpoint = "/api/customers/{customerId}/realms/{realmId}/config".replace(customerIdPlaceholder, endpointEncoder(customerId)).replace(realmIdPlaceholder, endpointEncoder(realmId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: PUT, + p: payload, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `RealmConfigChangeRequest` instance to use for the API request + * @param customerId - ID of the customer. + * @param realmId - ID of the realm to update. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function customersPatchRealmsConfig(requester: HttpRequester, customerId: string, realmId: string, payload: RealmConfigChangeRequest, gamertag?: string): Promise> { + let endpoint = "/api/customers/{customerId}/realms/{realmId}/config".replace(customerIdPlaceholder, endpointEncoder(customerId)).replace(realmIdPlaceholder, endpointEncoder(realmId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: PATCH, + p: payload, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param customerId - ID of the customer. + * @param realmId - ID of the realm. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function customersGetRealmsClientDefaults(requester: HttpRequester, customerId: string, realmId: string, gamertag?: string): Promise> { + let endpoint = "/api/customers/{customerId}/realms/{realmId}/client-defaults".replace(customerIdPlaceholder, endpointEncoder(customerId)).replace(realmIdPlaceholder, endpointEncoder(realmId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: GET, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `CustomerActorPromoteRealmRequest` instance to use for the API request + * @param customerId - ID of the customer. + * @param destinationRealmId - ID of the realm to promote content into. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function customersPostRealmsPromotion(requester: HttpRequester, customerId: string, destinationRealmId: string, payload: CustomerActorPromoteRealmRequest, gamertag?: string): Promise> { + let endpoint = "/api/customers/{customerId}/realms/{destinationRealmId}/promotion".replace(customerIdPlaceholder, endpointEncoder(customerId)).replace(destinationRealmIdPlaceholder, endpointEncoder(destinationRealmId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + p: payload, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param customerId - ID of the customer. + * @param destinationRealmId - ID of the destination realm. + * @param contentIds - Comma-separated list of content IDs to filter by. + * @param promotables - Comma-separated list of promotable types to include. + * @param sourceRealmId - ID of the source realm. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function customersGetRealmsPromotion(requester: HttpRequester, customerId: string, destinationRealmId: string, contentIds?: string, promotables?: string, sourceRealmId?: string, gamertag?: string): Promise> { + let endpoint = "/api/customers/{customerId}/realms/{destinationRealmId}/promotion".replace(customerIdPlaceholder, endpointEncoder(customerId)).replace(destinationRealmIdPlaceholder, endpointEncoder(destinationRealmId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: GET, + q: { + contentIds, + promotables, + sourceRealmId + }, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param alias - The alias to check. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function customersGetAliasesByAlias(requester: HttpRequester, alias: string, gamertag?: string): Promise> { + let endpoint = "/api/customers/aliases/{alias}".replace(aliasPlaceholder, endpointEncoder(alias)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: GET, + g: gamertag, + w: true + }); +} diff --git a/web/src/__generated__/apis/InventoryApi.ts b/web/src/__generated__/apis/InventoryApi.ts index 8e89c40d6a..06f627c6e4 100644 --- a/web/src/__generated__/apis/InventoryApi.ts +++ b/web/src/__generated__/apis/InventoryApi.ts @@ -17,6 +17,7 @@ import type { HttpRequester } from '@/network/http/types/HttpRequester'; import type { HttpResponse } from '@/network/http/types/HttpResponse'; import type { InventoryQueryRequest } from '@/__generated__/schemas/InventoryQueryRequest'; import type { InventoryUpdateRequest } from '@/__generated__/schemas/InventoryUpdateRequest'; +import type { InventoryUpdateResponse } from '@/__generated__/schemas/InventoryUpdateResponse'; import type { InventoryView } from '@/__generated__/schemas/InventoryView'; import type { ItemContentResponse } from '@/__generated__/schemas/ItemContentResponse'; import type { MultipliersGetResponse } from '@/__generated__/schemas/MultipliersGetResponse'; @@ -203,11 +204,11 @@ export async function inventoryPostByObjectId(requester: HttpRequester, objectId * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ -export async function inventoryPutByObjectId(requester: HttpRequester, objectId: bigint | string, payload: InventoryUpdateRequest, gamertag?: string): Promise> { +export async function inventoryPutByObjectId(requester: HttpRequester, objectId: bigint | string, payload: InventoryUpdateRequest, gamertag?: string): Promise> { let endpoint = "/object/inventory/{objectId}/".replace(objectIdPlaceholder, endpointEncoder(objectId)); // Make the API request - return makeApiRequest({ + return makeApiRequest({ r: requester, e: endpoint, m: PUT, diff --git a/web/src/__generated__/apis/LeaderboardsApi.ts b/web/src/__generated__/apis/LeaderboardsApi.ts index 19bc455188..738a21afb1 100644 --- a/web/src/__generated__/apis/LeaderboardsApi.ts +++ b/web/src/__generated__/apis/LeaderboardsApi.ts @@ -142,7 +142,7 @@ export async function leaderboardsGetUidBasic(requester: HttpRequester, gamertag * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param objectId - Gamertag of the player. + * @param objectId - Leaderboard ID * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ @@ -165,7 +165,7 @@ export async function leaderboardsDeleteEntriesByObjectId(requester: HttpRequest * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param objectId - Gamertag of the player. + * @param objectId - Leaderboard ID * @param playerId - The `playerId` parameter to include in the API request. * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * @@ -192,7 +192,7 @@ export async function leaderboardsGetMembershipByObjectId(requester: HttpRequest * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param objectId - Gamertag of the player. + * @param objectId - Leaderboard ID * @param ids - The `ids` parameter to include in the API request. * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * @@ -219,7 +219,7 @@ export async function leaderboardsGetRanksByObjectId(requester: HttpRequester, o * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param objectId - Gamertag of the player. + * @param objectId - Leaderboard ID * @param playerId - The `playerId` parameter to include in the API request. * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * @@ -246,7 +246,7 @@ export async function leaderboardsGetPartitionByObjectId(requester: HttpRequeste * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param objectId - Gamertag of the player. + * @param objectId - Leaderboard ID * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ @@ -270,7 +270,7 @@ export async function leaderboardsGetFriendsByObjectId(requester: HttpRequester, * * @param requester - The `HttpRequester` type to use for the API request. * @param payload - The `LeaderboardCreateRequest` instance to use for the API request - * @param objectId - Gamertag of the player. + * @param objectId - Leaderboard ID * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ @@ -294,7 +294,7 @@ export async function leaderboardsPostByObjectId(requester: HttpRequester, objec * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param objectId - Gamertag of the player. + * @param objectId - Leaderboard ID * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ @@ -317,7 +317,7 @@ export async function leaderboardsDeleteByObjectId(requester: HttpRequester, obj * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param objectId - Gamertag of the player. + * @param objectId - Leaderboard ID * @param poolSize - The `poolSize` parameter to include in the API request. * @param windowSize - The `windowSize` parameter to include in the API request. * @param windows - The `windows` parameter to include in the API request. @@ -348,7 +348,7 @@ export async function leaderboardsGetMatchesByObjectId(requester: HttpRequester, * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param objectId - Gamertag of the player. + * @param objectId - Leaderboard ID * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ @@ -372,7 +372,7 @@ export async function leaderboardsGetAssignmentByObjectId(requester: HttpRequest * * @param requester - The `HttpRequester` type to use for the API request. * @param payload - The `LeaderboardRemoveCacheEntryRequest` instance to use for the API request - * @param objectId - Gamertag of the player. + * @param objectId - Leaderboard ID * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ @@ -397,7 +397,7 @@ export async function leaderboardsDeleteAssignmentByObjectId(requester: HttpRequ * * @param requester - The `HttpRequester` type to use for the API request. * @param payload - The `LeaderboardAddRequest` instance to use for the API request - * @param objectId - Gamertag of the player. + * @param objectId - Leaderboard ID * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ @@ -422,7 +422,7 @@ export async function leaderboardsPutEntryByObjectId(requester: HttpRequester, o * * @param requester - The `HttpRequester` type to use for the API request. * @param payload - The `LeaderboardRemoveEntryRequest` instance to use for the API request - * @param objectId - Gamertag of the player. + * @param objectId - Leaderboard ID * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ @@ -446,7 +446,7 @@ export async function leaderboardsDeleteEntryByObjectId(requester: HttpRequester * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param objectId - Gamertag of the player. + * @param objectId - Leaderboard ID * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ @@ -469,7 +469,30 @@ export async function leaderboardsPutFreezeByObjectId(requester: HttpRequester, * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param objectId - Gamertag of the player. + * @param objectId - Leaderboard ID + * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. + * + */ +export async function leaderboardsDeleteFreezeByObjectId(requester: HttpRequester, objectId: string, gamertag?: string): Promise> { + let endpoint = "/object/leaderboards/{objectId}/freeze".replace(objectIdPlaceholder, endpointEncoder(objectId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: DELETE, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param objectId - Leaderboard ID * @param from - The `from` parameter to include in the API request. * @param max - The `max` parameter to include in the API request. * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. @@ -498,7 +521,7 @@ export async function leaderboardsGetDetailsByObjectId(requester: HttpRequester, * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param objectId - Gamertag of the player. + * @param objectId - Leaderboard ID * @param focus - The `focus` parameter to include in the API request. * @param friends - The `friends` parameter to include in the API request. * @param from - The `from` parameter to include in the API request. @@ -536,7 +559,7 @@ export async function leaderboardsGetViewByObjectId(requester: HttpRequester, ob * * @param requester - The `HttpRequester` type to use for the API request. * @param payload - The `LeaderboardSwapRequest` instance to use for the API request - * @param objectId - Gamertag of the player. + * @param objectId - Leaderboard ID * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ diff --git a/web/src/__generated__/apis/MatchmakingApi.ts b/web/src/__generated__/apis/MatchmakingApi.ts index 9c66605c39..10f15551fa 100644 --- a/web/src/__generated__/apis/MatchmakingApi.ts +++ b/web/src/__generated__/apis/MatchmakingApi.ts @@ -126,7 +126,7 @@ export async function matchmakingGetTicketsById(requester: HttpRequester, id: st * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param id - The `id` parameter to include in the API request. + * @param id - Ticket ID to cancel. * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ diff --git a/web/src/__generated__/apis/NotificationApi.ts b/web/src/__generated__/apis/NotificationApi.ts index 9694c82b8f..85f142ebcb 100644 --- a/web/src/__generated__/apis/NotificationApi.ts +++ b/web/src/__generated__/apis/NotificationApi.ts @@ -133,6 +133,30 @@ export async function notificationPostGenericBasic(requester: HttpRequester, pay }); } +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `ServerEvent` instance to use for the API request + * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. + * + */ +export async function notificationPostServiceBasic(requester: HttpRequester, payload: ServerEvent, gamertag?: string): Promise> { + let endpoint = "/basic/notification/service"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + p: payload, + g: gamertag, + w: true + }); +} + /** * @remarks * **Authentication:** diff --git a/web/src/__generated__/apis/PartyApi.ts b/web/src/__generated__/apis/PartyApi.ts index 7e6a535725..b620bd08fa 100644 --- a/web/src/__generated__/apis/PartyApi.ts +++ b/web/src/__generated__/apis/PartyApi.ts @@ -20,8 +20,10 @@ import type { HttpResponse } from '@/network/http/types/HttpResponse'; import type { InviteToParty } from '@/__generated__/schemas/InviteToParty'; import type { LeaveParty } from '@/__generated__/schemas/LeaveParty'; import type { Party } from '@/__generated__/schemas/Party'; +import type { PartyMemberTags } from '@/__generated__/schemas/PartyMemberTags'; import type { PromoteNewLeader } from '@/__generated__/schemas/PromoteNewLeader'; import type { UpdateParty } from '@/__generated__/schemas/UpdateParty'; +import type { UpdatePartyTags } from '@/__generated__/schemas/UpdatePartyTags'; /** * @remarks @@ -47,6 +49,30 @@ export async function partiesPost(requester: HttpRequester, payload: CreateParty }); } +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `Party` instance to use for the API request + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function partiesPut(requester: HttpRequester, payload: Party, gamertag?: string): Promise> { + let endpoint = "/api/parties"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: PUT, + p: payload, + g: gamertag, + w: true + }); +} + /** * @remarks * **Authentication:** @@ -101,18 +127,20 @@ export async function partiesGetById(requester: HttpRequester, id: string, gamer * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `PartyMemberTags` instance to use for the API request * @param id - Id of the party * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ -export async function partiesPutById(requester: HttpRequester, id: string, gamertag?: string): Promise> { +export async function partiesPutById(requester: HttpRequester, id: string, payload: PartyMemberTags, gamertag?: string): Promise> { let endpoint = "/api/parties/{id}".replace(idPlaceholder, endpointEncoder(id)); // Make the API request - return makeApiRequest({ + return makeApiRequest({ r: requester, e: endpoint, m: PUT, + p: payload, g: gamertag, w: true }); @@ -217,3 +245,28 @@ export async function partiesDeleteMembersById(requester: HttpRequester, id: str w: true }); } + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `UpdatePartyTags` instance to use for the API request + * @param id - Id of the party + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function partiesPutTagsById(requester: HttpRequester, id: string, payload: UpdatePartyTags, gamertag?: string): Promise> { + let endpoint = "/api/parties/{id}/tags".replace(idPlaceholder, endpointEncoder(id)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: PUT, + p: payload, + g: gamertag, + w: true + }); +} diff --git a/web/src/__generated__/apis/PaymentsApi.ts b/web/src/__generated__/apis/PaymentsApi.ts index d63e59e327..24e31dbf9f 100644 --- a/web/src/__generated__/apis/PaymentsApi.ts +++ b/web/src/__generated__/apis/PaymentsApi.ts @@ -1250,7 +1250,7 @@ export async function paymentsPostItunesPurchaseTrackBasic(requester: HttpReques * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param objectId - Gamertag of the player.Underlying objectId type is integer in format int64. + * @param objectId - Transaction ID.Underlying objectId type is integer in format int64. * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ diff --git a/web/src/__generated__/apis/PlayerApi.ts b/web/src/__generated__/apis/PlayerApi.ts index 919fe9b5e3..bf1b012b30 100644 --- a/web/src/__generated__/apis/PlayerApi.ts +++ b/web/src/__generated__/apis/PlayerApi.ts @@ -20,7 +20,7 @@ import type { SetPresenceStatusRequest } from '@/__generated__/schemas/SetPresen * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param playerId - The `playerId` parameter to include in the API request. + * @param playerId - The player ID to heartbeat. Must match the authenticated player. * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ @@ -43,7 +43,7 @@ export async function playersPutPresenceByPlayerId(requester: HttpRequester, pla * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param playerId - The `playerId` parameter to include in the API request. + * @param playerId - Player ID to retrieve online status for. * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ @@ -67,7 +67,7 @@ export async function playersGetPresenceByPlayerId(requester: HttpRequester, pla * * @param requester - The `HttpRequester` type to use for the API request. * @param payload - The `SetPresenceStatusRequest` instance to use for the API request - * @param playerId - The `playerId` parameter to include in the API request. + * @param playerId - The player ID to update. Must match the authenticated player. * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ diff --git a/web/src/__generated__/apis/PlayerSessionApi.ts b/web/src/__generated__/apis/PlayerSessionApi.ts new file mode 100644 index 0000000000..f6fe19e33d --- /dev/null +++ b/web/src/__generated__/apis/PlayerSessionApi.ts @@ -0,0 +1,71 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import { endpointEncoder } from '@/utils/endpointEncoder'; +import { GET } from '@/constants'; +import { makeApiRequest } from '@/utils/makeApiRequest'; +import { playerIdPlaceholder } from '@/__generated__/apis/constants'; +import type { HttpRequester } from '@/network/http/types/HttpRequester'; +import type { HttpResponse } from '@/network/http/types/HttpResponse'; +import type { PlayerSessionActorSessionClientHistoryResponse } from '@/__generated__/schemas/PlayerSessionActorSessionClientHistoryResponse'; +import type { PlayerSessionActorSessionHistoryResponse } from '@/__generated__/schemas/PlayerSessionActorSessionHistoryResponse'; + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param playerId - The `playerId` parameter to include in the API request. + * @param month - The `month` parameter to include in the API request. + * @param year - The `year` parameter to include in the API request. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function playersGetSessionsByPlayerId(requester: HttpRequester, playerId: string, month?: number, year?: number, gamertag?: string): Promise> { + let endpoint = "/api/players/{playerId}/sessions".replace(playerIdPlaceholder, endpointEncoder(playerId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: GET, + q: { + month, + year + }, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param playerId - The `playerId` parameter to include in the API request. + * @param month - The `month` parameter to include in the API request. + * @param year - The `year` parameter to include in the API request. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function playersGetSessionsClientByPlayerId(requester: HttpRequester, playerId: string, month?: number, year?: number, gamertag?: string): Promise> { + let endpoint = "/api/players/{playerId}/sessions/client".replace(playerIdPlaceholder, endpointEncoder(playerId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: GET, + q: { + month, + year + }, + g: gamertag, + w: true + }); +} diff --git a/web/src/__generated__/apis/PlayerStatsApi.ts b/web/src/__generated__/apis/PlayerStatsApi.ts new file mode 100644 index 0000000000..cd0df4fd13 --- /dev/null +++ b/web/src/__generated__/apis/PlayerStatsApi.ts @@ -0,0 +1,109 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import { DELETE } from '@/constants'; +import { endpointEncoder } from '@/utils/endpointEncoder'; +import { GET } from '@/constants'; +import { makeApiRequest } from '@/utils/makeApiRequest'; +import { playerIdPlaceholder } from '@/__generated__/apis/constants'; +import { POST } from '@/constants'; +import type { GetStatsResponse } from '@/__generated__/schemas/GetStatsResponse'; +import type { HttpRequester } from '@/network/http/types/HttpRequester'; +import type { HttpResponse } from '@/network/http/types/HttpResponse'; +import type { PlayerStatsActorCommonResponse } from '@/__generated__/schemas/PlayerStatsActorCommonResponse'; +import type { SetStatsRequest } from '@/__generated__/schemas/SetStatsRequest'; + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param playerId - The `playerId` parameter to include in the API request. + * @param domain - The `domain` parameter to include in the API request. + * @param keys - The `keys` parameter to include in the API request. + * @param visibility - The `visibility` parameter to include in the API request. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function playersGetStatsByPlayerId(requester: HttpRequester, playerId: string, domain?: string, keys?: string[], visibility?: unknown, gamertag?: string): Promise> { + let endpoint = "/api/players/{playerId}/stats".replace(playerIdPlaceholder, endpointEncoder(playerId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: GET, + q: { + domain, + keys, + visibility + }, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `SetStatsRequest` instance to use for the API request + * @param playerId - The `playerId` parameter to include in the API request. + * @param domain - The `domain` parameter to include in the API request. + * @param visibility - The `visibility` parameter to include in the API request. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function playersPostStatsByPlayerId(requester: HttpRequester, playerId: string, payload: SetStatsRequest, domain?: string, visibility?: unknown, gamertag?: string): Promise> { + let endpoint = "/api/players/{playerId}/stats".replace(playerIdPlaceholder, endpointEncoder(playerId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + q: { + domain, + visibility + }, + p: payload, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param playerId - The `playerId` parameter to include in the API request. + * @param domain - The `domain` parameter to include in the API request. + * @param keys - The `keys` parameter to include in the API request. + * @param visibility - The `visibility` parameter to include in the API request. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function playersDeleteStatsByPlayerId(requester: HttpRequester, playerId: string, domain?: string, keys?: string[], visibility?: unknown, gamertag?: string): Promise> { + let endpoint = "/api/players/{playerId}/stats".replace(playerIdPlaceholder, endpointEncoder(playerId)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: DELETE, + q: { + domain, + keys, + visibility + }, + g: gamertag, + w: true + }); +} diff --git a/web/src/__generated__/apis/RealmsApi.ts b/web/src/__generated__/apis/RealmsApi.ts index 20bca5436d..48298fe75c 100644 --- a/web/src/__generated__/apis/RealmsApi.ts +++ b/web/src/__generated__/apis/RealmsApi.ts @@ -8,7 +8,6 @@ import { GET } from '@/constants'; import { makeApiRequest } from '@/utils/makeApiRequest'; import { POST } from '@/constants'; import { PUT } from '@/constants'; -import type { AliasAvailableResponse } from '@/__generated__/schemas/AliasAvailableResponse'; import type { ArchiveProjectRequest } from '@/__generated__/schemas/ArchiveProjectRequest'; import type { BatchDeleteInFlightRequest } from '@/__generated__/schemas/BatchDeleteInFlightRequest'; import type { CommonResponse } from '@/__generated__/schemas/CommonResponse'; @@ -16,7 +15,6 @@ import type { CreateLaunchMessageRequest } from '@/__generated__/schemas/CreateL import type { CreatePlanRequest } from '@/__generated__/schemas/CreatePlanRequest'; import type { CreateProjectRequest } from '@/__generated__/schemas/CreateProjectRequest'; import type { CustomerResponse } from '@/__generated__/schemas/CustomerResponse'; -import type { CustomersResponse } from '@/__generated__/schemas/CustomersResponse'; import type { CustomerViewResponse } from '@/__generated__/schemas/CustomerViewResponse'; import type { EmptyResponse } from '@/__generated__/schemas/EmptyResponse'; import type { GetGameResponse } from '@/__generated__/schemas/GetGameResponse'; @@ -25,22 +23,24 @@ import type { HttpRequester } from '@/network/http/types/HttpRequester'; import type { HttpResponse } from '@/network/http/types/HttpResponse'; import type { InFlightFailureResponse } from '@/__generated__/schemas/InFlightFailureResponse'; import type { LaunchMessageListResponse } from '@/__generated__/schemas/LaunchMessageListResponse'; -import type { NewCustomerRequest } from '@/__generated__/schemas/NewCustomerRequest'; -import type { NewCustomerResponse } from '@/__generated__/schemas/NewCustomerResponse'; -import type { NewGameRequest } from '@/__generated__/schemas/NewGameRequest'; import type { ProjectView } from '@/__generated__/schemas/ProjectView'; -import type { PromoteRealmRequest } from '@/__generated__/schemas/PromoteRealmRequest'; -import type { PromoteRealmResponse } from '@/__generated__/schemas/PromoteRealmResponse'; import type { PromoteRealmResponseOld } from '@/__generated__/schemas/PromoteRealmResponseOld'; import type { RealmConfigChangeRequest } from '@/__generated__/schemas/RealmConfigChangeRequest'; -import type { RealmConfigResponse } from '@/__generated__/schemas/RealmConfigResponse'; -import type { RealmConfigSaveRequest } from '@/__generated__/schemas/RealmConfigSaveRequest'; -import type { RealmConfiguration } from '@/__generated__/schemas/RealmConfiguration'; +import type { RealmsBasicAliasAvailableResponse } from '@/__generated__/schemas/RealmsBasicAliasAvailableResponse'; +import type { RealmsBasicCustomersResponse } from '@/__generated__/schemas/RealmsBasicCustomersResponse'; +import type { RealmsBasicNewCustomerRequest } from '@/__generated__/schemas/RealmsBasicNewCustomerRequest'; +import type { RealmsBasicNewCustomerResponse } from '@/__generated__/schemas/RealmsBasicNewCustomerResponse'; +import type { RealmsBasicNewGameRequest } from '@/__generated__/schemas/RealmsBasicNewGameRequest'; +import type { RealmsBasicPromoteRealmRequest } from '@/__generated__/schemas/RealmsBasicPromoteRealmRequest'; +import type { RealmsBasicPromoteRealmResponse } from '@/__generated__/schemas/RealmsBasicPromoteRealmResponse'; +import type { RealmsBasicRealmConfigResponse } from '@/__generated__/schemas/RealmsBasicRealmConfigResponse'; +import type { RealmsBasicRealmConfigSaveRequest } from '@/__generated__/schemas/RealmsBasicRealmConfigSaveRequest'; +import type { RealmsBasicRealmConfiguration } from '@/__generated__/schemas/RealmsBasicRealmConfiguration'; +import type { RealmsBasicUpdateGameHierarchyRequest } from '@/__generated__/schemas/RealmsBasicUpdateGameHierarchyRequest'; import type { RemoveLaunchMessageRequest } from '@/__generated__/schemas/RemoveLaunchMessageRequest'; import type { RenameProjectRequest } from '@/__generated__/schemas/RenameProjectRequest'; import type { ServicePlansResponse } from '@/__generated__/schemas/ServicePlansResponse'; import type { UnarchiveProjectRequest } from '@/__generated__/schemas/UnarchiveProjectRequest'; -import type { UpdateGameHierarchyRequest } from '@/__generated__/schemas/UpdateGameHierarchyRequest'; /** * @param requester - The `HttpRequester` type to use for the API request. @@ -95,11 +95,11 @@ export async function realmsPostProjectBeamableBasic(requester: HttpRequester, p * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ -export async function realmsGetCustomerAliasAvailableBasic(requester: HttpRequester, alias: string, gamertag?: string): Promise> { +export async function realmsGetCustomerAliasAvailableBasic(requester: HttpRequester, alias: string, gamertag?: string): Promise> { let endpoint = "/basic/realms/customer/alias/available"; // Make the API request - return makeApiRequest({ + return makeApiRequest({ r: requester, e: endpoint, m: GET, @@ -201,15 +201,15 @@ export async function realmsDeleteProjectBasic(requester: HttpRequester, payload /** * @param requester - The `HttpRequester` type to use for the API request. - * @param payload - The `NewCustomerRequest` instance to use for the API request + * @param payload - The `RealmsBasicNewCustomerRequest` instance to use for the API request * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ -export async function realmsPostCustomerVerifyBasic(requester: HttpRequester, payload: NewCustomerRequest, gamertag?: string): Promise> { +export async function realmsPostCustomerVerifyBasic(requester: HttpRequester, payload: RealmsBasicNewCustomerRequest, gamertag?: string): Promise> { let endpoint = "/basic/realms/customer/verify"; // Make the API request - return makeApiRequest({ + return makeApiRequest({ r: requester, e: endpoint, m: POST, @@ -249,11 +249,11 @@ export async function realmsGetGamesBasic(requester: HttpRequester, gamertag?: s * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ -export async function realmsGetConfigBasic(requester: HttpRequester, gamertag?: string): Promise> { +export async function realmsGetConfigBasic(requester: HttpRequester, gamertag?: string): Promise> { let endpoint = "/basic/realms/config"; // Make the API request - return makeApiRequest({ + return makeApiRequest({ r: requester, e: endpoint, m: GET, @@ -292,15 +292,15 @@ export async function realmsPostConfigBasic(requester: HttpRequester, payload: R * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param payload - The `RealmConfigSaveRequest` instance to use for the API request + * @param payload - The `RealmsBasicRealmConfigSaveRequest` instance to use for the API request * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ -export async function realmsPutConfigBasic(requester: HttpRequester, payload: RealmConfigSaveRequest, gamertag?: string): Promise> { +export async function realmsPutConfigBasic(requester: HttpRequester, payload: RealmsBasicRealmConfigSaveRequest, gamertag?: string): Promise> { let endpoint = "/basic/realms/config"; // Make the API request - return makeApiRequest({ + return makeApiRequest({ r: requester, e: endpoint, m: PUT, @@ -385,11 +385,11 @@ export async function realmsPostPlansBasic(requester: HttpRequester, payload: Cr * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ -export async function realmsGetClientDefaultsBasic(requester: HttpRequester, gamertag?: string): Promise> { +export async function realmsGetClientDefaultsBasic(requester: HttpRequester, gamertag?: string): Promise> { let endpoint = "/basic/realms/client/defaults"; // Make the API request - return makeApiRequest({ + return makeApiRequest({ r: requester, e: endpoint, m: GET, @@ -421,15 +421,15 @@ export async function realmsGetCustomerBasic(requester: HttpRequester, gamertag? /** * @param requester - The `HttpRequester` type to use for the API request. - * @param payload - The `NewCustomerRequest` instance to use for the API request + * @param payload - The `RealmsBasicNewCustomerRequest` instance to use for the API request * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ -export async function realmsPostCustomerBasic(requester: HttpRequester, payload: NewCustomerRequest, gamertag?: string): Promise> { +export async function realmsPostCustomerBasic(requester: HttpRequester, payload: RealmsBasicNewCustomerRequest, gamertag?: string): Promise> { let endpoint = "/basic/realms/customer"; // Make the API request - return makeApiRequest({ + return makeApiRequest({ r: requester, e: endpoint, m: POST, @@ -631,15 +631,15 @@ export async function realmsGetGameBasic(requester: HttpRequester, rootPID: stri * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param payload - The `NewGameRequest` instance to use for the API request + * @param payload - The `RealmsBasicNewGameRequest` instance to use for the API request * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ -export async function realmsPostGameBasic(requester: HttpRequester, payload: NewGameRequest, gamertag?: string): Promise> { +export async function realmsPostGameBasic(requester: HttpRequester, payload: RealmsBasicNewGameRequest, gamertag?: string): Promise> { let endpoint = "/basic/realms/game"; // Make the API request - return makeApiRequest({ + return makeApiRequest({ r: requester, e: endpoint, m: POST, @@ -655,15 +655,15 @@ export async function realmsPostGameBasic(requester: HttpRequester, payload: New * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param payload - The `UpdateGameHierarchyRequest` instance to use for the API request + * @param payload - The `RealmsBasicUpdateGameHierarchyRequest` instance to use for the API request * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ -export async function realmsPutGameBasic(requester: HttpRequester, payload: UpdateGameHierarchyRequest, gamertag?: string): Promise> { +export async function realmsPutGameBasic(requester: HttpRequester, payload: RealmsBasicUpdateGameHierarchyRequest, gamertag?: string): Promise> { let endpoint = "/basic/realms/game"; // Make the API request - return makeApiRequest({ + return makeApiRequest({ r: requester, e: endpoint, m: PUT, @@ -709,15 +709,15 @@ export async function realmsGetProjectPromoteBasic(requester: HttpRequester, sou * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param payload - The `PromoteRealmRequest` instance to use for the API request + * @param payload - The `RealmsBasicPromoteRealmRequest` instance to use for the API request * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ -export async function realmsPostProjectPromoteBasic(requester: HttpRequester, payload: PromoteRealmRequest, gamertag?: string): Promise> { +export async function realmsPostProjectPromoteBasic(requester: HttpRequester, payload: RealmsBasicPromoteRealmRequest, gamertag?: string): Promise> { let endpoint = "/basic/realms/project/promote"; // Make the API request - return makeApiRequest({ + return makeApiRequest({ r: requester, e: endpoint, m: POST, @@ -732,11 +732,11 @@ export async function realmsPostProjectPromoteBasic(requester: HttpRequester, pa * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ -export async function realmsGetCustomersBasic(requester: HttpRequester, gamertag?: string): Promise> { +export async function realmsGetCustomersBasic(requester: HttpRequester, gamertag?: string): Promise> { let endpoint = "/basic/realms/customers"; // Make the API request - return makeApiRequest({ + return makeApiRequest({ r: requester, e: endpoint, m: GET, @@ -756,11 +756,11 @@ export async function realmsGetCustomersBasic(requester: HttpRequester, gamertag * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ -export async function realmsGetPromotionBasic(requester: HttpRequester, sourcePid: string, contentManifestIds?: string[], promotions?: string[], gamertag?: string): Promise> { +export async function realmsGetPromotionBasic(requester: HttpRequester, sourcePid: string, contentManifestIds?: string[], promotions?: string[], gamertag?: string): Promise> { let endpoint = "/basic/realms/promotion"; // Make the API request - return makeApiRequest({ + return makeApiRequest({ r: requester, e: endpoint, m: GET, @@ -780,15 +780,15 @@ export async function realmsGetPromotionBasic(requester: HttpRequester, sourcePi * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param payload - The `PromoteRealmRequest` instance to use for the API request + * @param payload - The `RealmsBasicPromoteRealmRequest` instance to use for the API request * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ -export async function realmsPostPromotionBasic(requester: HttpRequester, payload: PromoteRealmRequest, gamertag?: string): Promise> { +export async function realmsPostPromotionBasic(requester: HttpRequester, payload: RealmsBasicPromoteRealmRequest, gamertag?: string): Promise> { let endpoint = "/basic/realms/promotion"; // Make the API request - return makeApiRequest({ + return makeApiRequest({ r: requester, e: endpoint, m: POST, diff --git a/web/src/__generated__/apis/SchedulerApi.ts b/web/src/__generated__/apis/SchedulerApi.ts index 03b9615a9e..98150111bc 100644 --- a/web/src/__generated__/apis/SchedulerApi.ts +++ b/web/src/__generated__/apis/SchedulerApi.ts @@ -15,13 +15,13 @@ import type { ApiSchedulerJobCancelPutSchedulerResponse } from '@/__generated__/ import type { ApiSchedulerJobDeleteSchedulerResponse } from '@/__generated__/schemas/ApiSchedulerJobDeleteSchedulerResponse'; import type { ApiSchedulerJobNextExecutionsGetSchedulerResponse } from '@/__generated__/schemas/ApiSchedulerJobNextExecutionsGetSchedulerResponse'; import type { ApiSchedulerJobsGetSchedulerResponse } from '@/__generated__/schemas/ApiSchedulerJobsGetSchedulerResponse'; +import type { ExecuteJobRequest } from '@/__generated__/schemas/ExecuteJobRequest'; import type { HttpRequester } from '@/network/http/types/HttpRequester'; import type { HttpResponse } from '@/network/http/types/HttpResponse'; import type { JobActivityViewCursorPagedResult } from '@/__generated__/schemas/JobActivityViewCursorPagedResult'; import type { JobDefinitionSaveRequest } from '@/__generated__/schemas/JobDefinitionSaveRequest'; import type { JobDefinitionView } from '@/__generated__/schemas/JobDefinitionView'; import type { JobDefinitionViewCursorPagedResult } from '@/__generated__/schemas/JobDefinitionViewCursorPagedResult'; -import type { JobExecutionEvent } from '@/__generated__/schemas/JobExecutionEvent'; import type { JobExecutionResult } from '@/__generated__/schemas/JobExecutionResult'; /** @@ -30,15 +30,15 @@ import type { JobExecutionResult } from '@/__generated__/schemas/JobExecutionRes * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param payload - The `JobExecutionEvent` instance to use for the API request + * @param payload - The `ExecuteJobRequest` instance to use for the API request * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ -export async function schedulerPostJobExecuteInternal(requester: HttpRequester, payload: JobExecutionEvent, gamertag?: string): Promise> { +export async function schedulerPostJobExecuteInternal(requester: HttpRequester, payload: ExecuteJobRequest, gamertag?: string): Promise> { let endpoint = "/api/internal/scheduler/job/execute"; // Make the API request - return makeApiRequest({ + return makeApiRequest({ r: requester, e: endpoint, m: POST, @@ -105,9 +105,9 @@ export async function schedulerPostJobInternal(requester: HttpRequester, payload * This API method is deprecated and may be removed in future versions. * * @param requester - The `HttpRequester` type to use for the API request. - * @param limit - The `limit` parameter to include in the API request. - * @param name - The `name` parameter to include in the API request. - * @param source - The `source` parameter to include in the API request. + * @param limit - Maximum number of results. Cannot exceed 10000. + * @param name - Optional name filter. + * @param source - Optional source filter. * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ @@ -135,10 +135,10 @@ export async function schedulerGetJobs(requester: HttpRequester, limit?: number, * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param cursor - The `cursor` parameter to include in the API request. - * @param name - The `name` parameter to include in the API request. - * @param onlyUnique - The `onlyUnique` parameter to include in the API request. - * @param source - The `source` parameter to include in the API request. + * @param cursor - Pagination cursor from a previous response. + * @param name - Optional name filter. + * @param onlyUnique - When true, only returns unique jobs. + * @param source - Optional source filter. * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ @@ -167,8 +167,8 @@ export async function schedulerGetJobsPaged(requester: HttpRequester, cursor?: s * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param cursor - The `cursor` parameter to include in the API request. - * @param from - The `from` parameter to include in the API request. + * @param cursor - Pagination cursor from a previous response. Mutually exclusive with from. + * @param from - Return jobs suspended from this datetime. Mutually exclusive with cursor. * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ @@ -195,7 +195,7 @@ export async function schedulerGetJobsSuspended(requester: HttpRequester, cursor * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param jobId - The `jobId` parameter to include in the API request. + * @param jobId - ID of the job to retrieve. * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ @@ -218,7 +218,7 @@ export async function schedulerGetJobByJobId(requester: HttpRequester, jobId: st * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param jobId - The `jobId` parameter to include in the API request. + * @param jobId - ID of the job to delete. * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ @@ -244,8 +244,8 @@ export async function schedulerDeleteJobByJobId(requester: HttpRequester, jobId: * This API method is deprecated and may be removed in future versions. * * @param requester - The `HttpRequester` type to use for the API request. - * @param jobId - The `jobId` parameter to include in the API request. - * @param limit - The `limit` parameter to include in the API request. + * @param jobId - ID of the job to retrieve activity for. + * @param limit - Maximum number of results. Cannot exceed 10000. * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ @@ -271,8 +271,8 @@ export async function schedulerGetJobActivityByJobId(requester: HttpRequester, j * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param jobId - The `jobId` parameter to include in the API request. - * @param cursor - The `cursor` parameter to include in the API request. + * @param jobId - ID of the job to retrieve activity for. + * @param cursor - Pagination cursor from a previous response. * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ @@ -298,7 +298,7 @@ export async function schedulerGetJobActivityPagedByJobId(requester: HttpRequest * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param cursor - The `cursor` parameter to include in the API request. + * @param cursor - Pagination cursor from a previous response. * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ @@ -324,9 +324,9 @@ export async function schedulerGetJobsActivityPaged(requester: HttpRequester, cu * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param jobId - The `jobId` parameter to include in the API request. - * @param from - The `from` parameter to include in the API request. - * @param limit - The `limit` parameter to include in the API request. + * @param jobId - ID of the job to compute schedules for. + * @param from - Start time for the schedule preview. Defaults to now. + * @param limit - Maximum number of executions to return. Cannot exceed 1000. * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ @@ -353,7 +353,7 @@ export async function schedulerGetJobNextExecutionsByJobId(requester: HttpReques * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param jobId - The `jobId` parameter to include in the API request. + * @param jobId - ID of the job to cancel. * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. * */ diff --git a/web/src/__generated__/apis/SessionApi.ts b/web/src/__generated__/apis/SessionApi.ts index bb52951dc2..a0bcbb1915 100644 --- a/web/src/__generated__/apis/SessionApi.ts +++ b/web/src/__generated__/apis/SessionApi.ts @@ -6,15 +6,102 @@ import { GET } from '@/constants'; import { makeApiRequest } from '@/utils/makeApiRequest'; import { POST } from '@/constants'; +import type { ApiSessionsHeartbeatPostSessionResponse } from '@/__generated__/schemas/ApiSessionsHeartbeatPostSessionResponse'; +import type { ApiSessionsPostSessionResponse } from '@/__generated__/schemas/ApiSessionsPostSessionResponse'; +import type { ApiSessionsStatusGetSessionResponse } from '@/__generated__/schemas/ApiSessionsStatusGetSessionResponse'; import type { HttpRequester } from '@/network/http/types/HttpRequester'; import type { HttpResponse } from '@/network/http/types/HttpResponse'; import type { OnlineStatusResponses } from '@/__generated__/schemas/OnlineStatusResponses'; -import type { SessionClientHistoryResponse } from '@/__generated__/schemas/SessionClientHistoryResponse'; +import type { SessionActorStartSessionRequest } from '@/__generated__/schemas/SessionActorStartSessionRequest'; +import type { SessionBasicSessionClientHistoryResponse } from '@/__generated__/schemas/SessionBasicSessionClientHistoryResponse'; +import type { SessionBasicSessionHistoryResponse } from '@/__generated__/schemas/SessionBasicSessionHistoryResponse'; +import type { SessionBasicStartSessionRequest } from '@/__generated__/schemas/SessionBasicStartSessionRequest'; import type { SessionHeartbeat } from '@/__generated__/schemas/SessionHeartbeat'; -import type { SessionHistoryResponse } from '@/__generated__/schemas/SessionHistoryResponse'; -import type { StartSessionRequest } from '@/__generated__/schemas/StartSessionRequest'; import type { StartSessionResponse } from '@/__generated__/schemas/StartSessionResponse'; +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @deprecated + * This API method is deprecated and may be removed in future versions. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `SessionActorStartSessionRequest` instance to use for the API request + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function sessionsPost(requester: HttpRequester, payload: SessionActorStartSessionRequest, gamertag?: string): Promise> { + let endpoint = "/api/sessions"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + p: payload, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @deprecated + * This API method is deprecated and may be removed in future versions. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function sessionsPostHeartbeat(requester: HttpRequester, gamertag?: string): Promise> { + let endpoint = "/api/sessions/heartbeat"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @deprecated + * This API method is deprecated and may be removed in future versions. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param intervalSecs - The `intervalSecs` parameter to include in the API request. + * @param playerIds - The `playerIds` parameter to include in the API request. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function sessionsGetStatus(requester: HttpRequester, intervalSecs?: bigint | string, playerIds?: string, gamertag?: string): Promise> { + let endpoint = "/api/sessions/status"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: GET, + q: { + intervalSecs, + playerIds + }, + g: gamertag, + w: true + }); +} + /** * @remarks * **Authentication:** @@ -49,11 +136,11 @@ export async function sessionPostHeartbeatBasic(requester: HttpRequester, gamert * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ -export async function sessionGetHistoryBasic(requester: HttpRequester, dbid: bigint | string, month?: number, year?: number, gamertag?: string): Promise> { +export async function sessionGetHistoryBasic(requester: HttpRequester, dbid: bigint | string, month?: number, year?: number, gamertag?: string): Promise> { let endpoint = "/basic/session/history"; // Make the API request - return makeApiRequest({ + return makeApiRequest({ r: requester, e: endpoint, m: GET, @@ -106,11 +193,11 @@ export async function sessionGetStatusBasic(requester: HttpRequester, intervalSe * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ -export async function sessionGetClientHistoryBasic(requester: HttpRequester, month?: number, year?: number, gamertag?: string): Promise> { +export async function sessionGetClientHistoryBasic(requester: HttpRequester, month?: number, year?: number, gamertag?: string): Promise> { let endpoint = "/basic/session/client/history"; // Make the API request - return makeApiRequest({ + return makeApiRequest({ r: requester, e: endpoint, m: GET, @@ -129,15 +216,15 @@ export async function sessionGetClientHistoryBasic(requester: HttpRequester, mon * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param payload - The `StartSessionRequest` instance to use for the API request + * @param payload - The `SessionBasicStartSessionRequest` instance to use for the API request * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ -export async function sessionPostBasic(requester: HttpRequester, payload: StartSessionRequest, gamertag?: string): Promise> { +export async function sessionPostBasic(requester: HttpRequester, payload: SessionBasicStartSessionRequest, gamertag?: string): Promise> { let endpoint = "/basic/session/"; // Make the API request - return makeApiRequest({ + return makeApiRequest({ r: requester, e: endpoint, m: POST, diff --git a/web/src/__generated__/apis/StatsApi.ts b/web/src/__generated__/apis/StatsApi.ts index 60e374e838..177f28cdf6 100644 --- a/web/src/__generated__/apis/StatsApi.ts +++ b/web/src/__generated__/apis/StatsApi.ts @@ -6,27 +6,280 @@ import { DELETE } from '@/constants'; import { endpointEncoder } from '@/utils/endpointEncoder'; import { GET } from '@/constants'; +import { idPlaceholder } from '@/__generated__/apis/constants'; +import { itemTypePlaceholder } from '@/__generated__/apis/constants'; import { makeApiRequest } from '@/utils/makeApiRequest'; import { objectIdPlaceholder } from '@/__generated__/apis/constants'; import { POST } from '@/constants'; import { PUT } from '@/constants'; +import type { BatchGetRequest } from '@/__generated__/schemas/BatchGetRequest'; +import type { BatchGetStatsResponse } from '@/__generated__/schemas/BatchGetStatsResponse'; import type { BatchReadStatsResponse } from '@/__generated__/schemas/BatchReadStatsResponse'; import type { BatchSetStatsRequest } from '@/__generated__/schemas/BatchSetStatsRequest'; +import type { BatchWriteRequest } from '@/__generated__/schemas/BatchWriteRequest'; import type { CommonResponse } from '@/__generated__/schemas/CommonResponse'; import type { EmptyResponse } from '@/__generated__/schemas/EmptyResponse'; +import type { GetStatsResponse } from '@/__generated__/schemas/GetStatsResponse'; import type { HttpRequester } from '@/network/http/types/HttpRequester'; import type { HttpResponse } from '@/network/http/types/HttpResponse'; import type { SearchExtendedRequest } from '@/__generated__/schemas/SearchExtendedRequest'; import type { SearchExtendedResponse } from '@/__generated__/schemas/SearchExtendedResponse'; +import type { SetStatsRequest } from '@/__generated__/schemas/SetStatsRequest'; import type { StatRequest } from '@/__generated__/schemas/StatRequest'; +import type { StatsActorCommonResponse } from '@/__generated__/schemas/StatsActorCommonResponse'; +import type { StatsActorStatsSearchRequest } from '@/__generated__/schemas/StatsActorStatsSearchRequest'; +import type { StatsActorStatsSearchResponse } from '@/__generated__/schemas/StatsActorStatsSearchResponse'; +import type { StatsBasicStatsSearchRequest } from '@/__generated__/schemas/StatsBasicStatsSearchRequest'; +import type { StatsBasicStatsSearchResponse } from '@/__generated__/schemas/StatsBasicStatsSearchResponse'; import type { StatsResponse } from '@/__generated__/schemas/StatsResponse'; -import type { StatsSearchRequest } from '@/__generated__/schemas/StatsSearchRequest'; -import type { StatsSearchResponse } from '@/__generated__/schemas/StatsSearchResponse'; +import type { StatsSearchExtendedRequest } from '@/__generated__/schemas/StatsSearchExtendedRequest'; +import type { StatsSearchExtendedResponse } from '@/__generated__/schemas/StatsSearchExtendedResponse'; import type { StatsSubscribeRequest } from '@/__generated__/schemas/StatsSubscribeRequest'; import type { StatsUnsubscribeRequest } from '@/__generated__/schemas/StatsUnsubscribeRequest'; +import type { StatsVisibility } from '@/__generated__/schemas/enums/StatsVisibility'; import type { StatUpdateRequest } from '@/__generated__/schemas/StatUpdateRequest'; import type { StatUpdateRequestStringListFormat } from '@/__generated__/schemas/StatUpdateRequestStringListFormat'; +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param id - The `id` parameter to include in the API request. + * @param itemType - The `itemType` parameter to include in the API request. + * @param domain - The `domain` parameter to include in the API request. + * @param keys - The `keys` parameter to include in the API request. + * @param visibility - The `visibility` parameter to include in the API request. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function statsGet(requester: HttpRequester, id: string, itemType: string, domain?: string, keys?: string[], visibility?: StatsVisibility, gamertag?: string): Promise> { + let endpoint = "/api/stats/{itemType}/{id}".replace(idPlaceholder, endpointEncoder(id)).replace(itemTypePlaceholder, endpointEncoder(itemType)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: GET, + q: { + domain, + keys, + visibility + }, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `SetStatsRequest` instance to use for the API request + * @param id - The `id` parameter to include in the API request. + * @param itemType - The `itemType` parameter to include in the API request. + * @param domain - The `domain` parameter to include in the API request. + * @param visibility - The `visibility` parameter to include in the API request. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function statsPost(requester: HttpRequester, id: string, itemType: string, payload: SetStatsRequest, domain?: string, visibility?: StatsVisibility, gamertag?: string): Promise> { + let endpoint = "/api/stats/{itemType}/{id}".replace(idPlaceholder, endpointEncoder(id)).replace(itemTypePlaceholder, endpointEncoder(itemType)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + q: { + domain, + visibility + }, + p: payload, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param id - The `id` parameter to include in the API request. + * @param itemType - The `itemType` parameter to include in the API request. + * @param domain - The `domain` parameter to include in the API request. + * @param keys - The `keys` parameter to include in the API request. + * @param visibility - The `visibility` parameter to include in the API request. + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function statsDelete(requester: HttpRequester, id: string, itemType: string, domain?: string, keys?: string[], visibility?: StatsVisibility, gamertag?: string): Promise> { + let endpoint = "/api/stats/{itemType}/{id}".replace(idPlaceholder, endpointEncoder(id)).replace(itemTypePlaceholder, endpointEncoder(itemType)); + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: DELETE, + q: { + domain, + keys, + visibility + }, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `StatsSubscribeRequest` instance to use for the API request + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function statsPutSubscription(requester: HttpRequester, payload: StatsSubscribeRequest, gamertag?: string): Promise> { + let endpoint = "/api/stats/subscription"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: PUT, + p: payload, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `StatsUnsubscribeRequest` instance to use for the API request + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function statsDeleteSubscription(requester: HttpRequester, payload: StatsUnsubscribeRequest, gamertag?: string): Promise> { + let endpoint = "/api/stats/subscription"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: DELETE, + p: payload, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `BatchGetRequest` instance to use for the API request + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function statsPostBatch(requester: HttpRequester, payload: BatchGetRequest, gamertag?: string): Promise> { + let endpoint = "/api/stats/batch"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + p: payload, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `BatchWriteRequest` instance to use for the API request + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function statsPutBatch(requester: HttpRequester, payload: BatchWriteRequest, gamertag?: string): Promise> { + let endpoint = "/api/stats/batch"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: PUT, + p: payload, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `StatsActorStatsSearchRequest` instance to use for the API request + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function statsPostQuery(requester: HttpRequester, payload: StatsActorStatsSearchRequest, gamertag?: string): Promise> { + let endpoint = "/api/stats/query"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + p: payload, + g: gamertag, + w: true + }); +} + +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `StatsSearchExtendedRequest` instance to use for the API request + * @param gamertag - Override the playerId of the requester. This is only necessary when not using a JWT bearer token. + * + */ +export async function statsPostQueryExtended(requester: HttpRequester, payload: StatsSearchExtendedRequest, gamertag?: string): Promise> { + let endpoint = "/api/stats/query/extended"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + p: payload, + g: gamertag, + w: true + }); +} + /** * @remarks * **Authentication:** @@ -130,15 +383,15 @@ export async function statsPostBatchBasic(requester: HttpRequester, payload: Bat * This method requires a valid bearer token in the `Authorization` header. * * @param requester - The `HttpRequester` type to use for the API request. - * @param payload - The `StatsSearchRequest` instance to use for the API request + * @param payload - The `StatsBasicStatsSearchRequest` instance to use for the API request * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ -export async function statsPostSearchBasic(requester: HttpRequester, payload: StatsSearchRequest, gamertag?: string): Promise> { +export async function statsPostSearchBasic(requester: HttpRequester, payload: StatsBasicStatsSearchRequest, gamertag?: string): Promise> { let endpoint = "/basic/stats/search"; // Make the API request - return makeApiRequest({ + return makeApiRequest({ r: requester, e: endpoint, m: POST, diff --git a/web/src/__generated__/apis/constants.ts b/web/src/__generated__/apis/constants.ts index 694dda2d21..839722f891 100644 --- a/web/src/__generated__/apis/constants.ts +++ b/web/src/__generated__/apis/constants.ts @@ -3,6 +3,8 @@ * All manual edits will be lost when this file is regenerated. */ +export const tokenIdPlaceholder = "{tokenId}"; + export const manifestIdPlaceholder = "{manifestId}"; export const serviceNamePlaceholder = "{serviceName}"; @@ -13,10 +15,22 @@ export const storageObjectNamePlaceholder = "{storageObjectName}"; export const viewIdPlaceholder = "{viewId}"; +export const customerIdPlaceholder = "{customerId}"; + +export const realmIdPlaceholder = "{realmId}"; + +export const gameIdPlaceholder = "{gameId}"; + +export const destinationRealmIdPlaceholder = "{destinationRealmId}"; + +export const aliasPlaceholder = "{alias}"; + export const idPlaceholder = "{id}"; export const playerIdPlaceholder = "{playerId}"; export const jobIdPlaceholder = "{jobId}"; +export const itemTypePlaceholder = "{itemType}"; + export const objectIdPlaceholder = "{objectId}"; diff --git a/web/src/__generated__/apis/index.ts b/web/src/__generated__/apis/index.ts index c4cbbbacd3..44098e697d 100644 --- a/web/src/__generated__/apis/index.ts +++ b/web/src/__generated__/apis/index.ts @@ -8,10 +8,12 @@ export * from './AnnouncementsApi'; export * from './AuthApi'; export * from './BeamoApi'; export * from './BeamoOtelApi'; +export * from './BillingApi'; export * from './CalendarsApi'; export * from './CloudsavingApi'; export * from './CommerceApi'; export * from './ContentApi'; +export * from './CustomerApi'; export * from './EventPlayersApi'; export * from './EventsApi'; export * from './GroupsApi'; @@ -28,6 +30,8 @@ export * from './PaymentsApi'; export * from './PlayerApi'; export * from './PlayerLobbyApi'; export * from './PlayerPartyApi'; +export * from './PlayerSessionApi'; +export * from './PlayerStatsApi'; export * from './PlayerTicketApi'; export * from './PresenceApi'; export * from './PushApi'; diff --git a/web/src/__generated__/schemas/StatsSearchResponse.ts b/web/src/__generated__/schemas/ApiCustomersActivatePutCustomerResponse.ts similarity index 67% rename from web/src/__generated__/schemas/StatsSearchResponse.ts rename to web/src/__generated__/schemas/ApiCustomersActivatePutCustomerResponse.ts index 1a32dc1ca5..002c1d5d7f 100644 --- a/web/src/__generated__/schemas/StatsSearchResponse.ts +++ b/web/src/__generated__/schemas/ApiCustomersActivatePutCustomerResponse.ts @@ -3,6 +3,5 @@ * All manual edits will be lost when this file is regenerated. */ -export type StatsSearchResponse = { - ids: (bigint | string)[]; +export type ApiCustomersActivatePutCustomerResponse = { }; diff --git a/web/src/__generated__/schemas/ApiSessionsHeartbeatPostSessionResponse.ts b/web/src/__generated__/schemas/ApiSessionsHeartbeatPostSessionResponse.ts new file mode 100644 index 0000000000..074095bde3 --- /dev/null +++ b/web/src/__generated__/schemas/ApiSessionsHeartbeatPostSessionResponse.ts @@ -0,0 +1,7 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type ApiSessionsHeartbeatPostSessionResponse = { +}; diff --git a/web/src/__generated__/schemas/ApiSessionsPostSessionResponse.ts b/web/src/__generated__/schemas/ApiSessionsPostSessionResponse.ts new file mode 100644 index 0000000000..f912e7789f --- /dev/null +++ b/web/src/__generated__/schemas/ApiSessionsPostSessionResponse.ts @@ -0,0 +1,7 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type ApiSessionsPostSessionResponse = { +}; diff --git a/web/src/__generated__/schemas/ApiSessionsStatusGetSessionResponse.ts b/web/src/__generated__/schemas/ApiSessionsStatusGetSessionResponse.ts new file mode 100644 index 0000000000..5134fe5c17 --- /dev/null +++ b/web/src/__generated__/schemas/ApiSessionsStatusGetSessionResponse.ts @@ -0,0 +1,7 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type ApiSessionsStatusGetSessionResponse = { +}; diff --git a/web/src/__generated__/schemas/AuthV2AuthCode.ts b/web/src/__generated__/schemas/AuthV2AuthCode.ts new file mode 100644 index 0000000000..d827af83a4 --- /dev/null +++ b/web/src/__generated__/schemas/AuthV2AuthCode.ts @@ -0,0 +1,13 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type AuthV2AuthCode = { + accountId: bigint | string; + code: string; + redirectUri: string; + createdAt?: Date; + scopes?: string[] | null; + ttl?: Date | null; +}; diff --git a/web/src/__generated__/schemas/AuthV2AuthCodeRequest.ts b/web/src/__generated__/schemas/AuthV2AuthCodeRequest.ts new file mode 100644 index 0000000000..49adef2c55 --- /dev/null +++ b/web/src/__generated__/schemas/AuthV2AuthCodeRequest.ts @@ -0,0 +1,15 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { AuthV2ContextInfo } from './AuthV2ContextInfo'; + +export type AuthV2AuthCodeRequest = { + accountId?: string | null; + context?: AuthV2ContextInfo; + customerId?: string | null; + realmId?: string | null; + redirectUri?: string | null; + scopes?: string[] | null; +}; diff --git a/web/src/__generated__/schemas/AuthV2AuthResponse.ts b/web/src/__generated__/schemas/AuthV2AuthResponse.ts new file mode 100644 index 0000000000..f89b723a27 --- /dev/null +++ b/web/src/__generated__/schemas/AuthV2AuthResponse.ts @@ -0,0 +1,9 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type AuthV2AuthResponse = { + accessToken?: string | null; + refreshToken?: string | null; +}; diff --git a/web/src/__generated__/schemas/AuthV2AuthorizationCodeAuthRequest.ts b/web/src/__generated__/schemas/AuthV2AuthorizationCodeAuthRequest.ts new file mode 100644 index 0000000000..5ca091a179 --- /dev/null +++ b/web/src/__generated__/schemas/AuthV2AuthorizationCodeAuthRequest.ts @@ -0,0 +1,16 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { AuthV2ContextInfo } from './AuthV2ContextInfo'; + +export type AuthV2AuthorizationCodeAuthRequest = { + clientId?: string | null; + code?: string | null; + context?: AuthV2ContextInfo; + customerId?: string | null; + realmId?: string | null; + redirectUri?: string | null; + scope?: string | null; +}; diff --git a/web/src/__generated__/schemas/AuthV2ChallengeSolution.ts b/web/src/__generated__/schemas/AuthV2ChallengeSolution.ts new file mode 100644 index 0000000000..87e69e1268 --- /dev/null +++ b/web/src/__generated__/schemas/AuthV2ChallengeSolution.ts @@ -0,0 +1,9 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type AuthV2ChallengeSolution = { + challengeToken?: string | null; + solution?: string | null; +}; diff --git a/web/src/__generated__/schemas/AuthActorContextInfo.ts b/web/src/__generated__/schemas/AuthV2ContextInfo.ts similarity index 83% rename from web/src/__generated__/schemas/AuthActorContextInfo.ts rename to web/src/__generated__/schemas/AuthV2ContextInfo.ts index dc52016bc3..593d581b79 100644 --- a/web/src/__generated__/schemas/AuthActorContextInfo.ts +++ b/web/src/__generated__/schemas/AuthV2ContextInfo.ts @@ -3,7 +3,7 @@ * All manual edits will be lost when this file is regenerated. */ -export type AuthActorContextInfo = { +export type AuthV2ContextInfo = { device?: string | null; platform?: string | null; }; diff --git a/web/src/__generated__/schemas/AuthV2DeviceIdAuthRequest.ts b/web/src/__generated__/schemas/AuthV2DeviceIdAuthRequest.ts new file mode 100644 index 0000000000..7a2e32b175 --- /dev/null +++ b/web/src/__generated__/schemas/AuthV2DeviceIdAuthRequest.ts @@ -0,0 +1,14 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { AuthV2ContextInfo } from './AuthV2ContextInfo'; + +export type AuthV2DeviceIdAuthRequest = { + context?: AuthV2ContextInfo; + customerId?: string | null; + deviceId?: string | null; + realmId?: string | null; + scope?: string | null; +}; diff --git a/web/src/__generated__/schemas/AuthV2EmptyMessage.ts b/web/src/__generated__/schemas/AuthV2EmptyMessage.ts new file mode 100644 index 0000000000..46e87c9c42 --- /dev/null +++ b/web/src/__generated__/schemas/AuthV2EmptyMessage.ts @@ -0,0 +1,7 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type AuthV2EmptyMessage = { +}; diff --git a/web/src/__generated__/schemas/AuthV2ExternalAuthRequest.ts b/web/src/__generated__/schemas/AuthV2ExternalAuthRequest.ts new file mode 100644 index 0000000000..4b15e4fa71 --- /dev/null +++ b/web/src/__generated__/schemas/AuthV2ExternalAuthRequest.ts @@ -0,0 +1,19 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { AuthV2ChallengeSolution } from './AuthV2ChallengeSolution'; +import type { AuthV2ContextInfo } from './AuthV2ContextInfo'; + +export type AuthV2ExternalAuthRequest = { + challengeSolution?: AuthV2ChallengeSolution; + context?: AuthV2ContextInfo; + customerId?: string | null; + hasProviderNamespace?: boolean; + provider?: string | null; + providerNamespace?: string | null; + realmId?: string | null; + scope?: string | null; + token?: string | null; +}; diff --git a/web/src/__generated__/schemas/AuthV2ExternalAuthResponse.ts b/web/src/__generated__/schemas/AuthV2ExternalAuthResponse.ts new file mode 100644 index 0000000000..d51fce9c51 --- /dev/null +++ b/web/src/__generated__/schemas/AuthV2ExternalAuthResponse.ts @@ -0,0 +1,15 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type AuthV2ExternalAuthResponse = { + accessToken?: string | null; + challengeToken?: string | null; + expiresInMs?: bigint | string; + hasAccessToken?: boolean; + hasChallengeToken?: boolean; + hasExpiresInMs?: boolean; + hasRefreshToken?: boolean; + refreshToken?: string | null; +}; diff --git a/web/src/__generated__/schemas/GuestAuthRequest.ts b/web/src/__generated__/schemas/AuthV2GuestAuthRequest.ts similarity index 67% rename from web/src/__generated__/schemas/GuestAuthRequest.ts rename to web/src/__generated__/schemas/AuthV2GuestAuthRequest.ts index 8abb73e319..74a74d748d 100644 --- a/web/src/__generated__/schemas/GuestAuthRequest.ts +++ b/web/src/__generated__/schemas/AuthV2GuestAuthRequest.ts @@ -3,10 +3,10 @@ * All manual edits will be lost when this file is regenerated. */ -import type { AuthActorContextInfo } from './AuthActorContextInfo'; +import type { AuthV2ContextInfo } from './AuthV2ContextInfo'; -export type GuestAuthRequest = { - context?: AuthActorContextInfo; +export type AuthV2GuestAuthRequest = { + context?: AuthV2ContextInfo; customerId?: string | null; initProperties?: Record | null; realmId?: string | null; diff --git a/web/src/__generated__/schemas/AuthV2JsonWebKey.ts b/web/src/__generated__/schemas/AuthV2JsonWebKey.ts new file mode 100644 index 0000000000..ce36907c1d --- /dev/null +++ b/web/src/__generated__/schemas/AuthV2JsonWebKey.ts @@ -0,0 +1,29 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type AuthV2JsonWebKey = { + alg?: string | null; + crv?: string | null; + d?: string | null; + dp?: string | null; + dq?: string | null; + e?: string | null; + k?: string | null; + key_ops?: string[] | null; + kid?: string | null; + kty?: string | null; + n?: string | null; + oth?: string[] | null; + p?: string | null; + q?: string | null; + qi?: string | null; + use?: string | null; + x?: string | null; + x5c?: string[] | null; + x5t?: string | null; + "x5t#S256"?: string | null; + x5u?: string | null; + y?: string | null; +}; diff --git a/web/src/__generated__/schemas/AuthV2JsonWebKeySet.ts b/web/src/__generated__/schemas/AuthV2JsonWebKeySet.ts new file mode 100644 index 0000000000..34bf1ee2a6 --- /dev/null +++ b/web/src/__generated__/schemas/AuthV2JsonWebKeySet.ts @@ -0,0 +1,10 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { AuthV2JsonWebKey } from './AuthV2JsonWebKey'; + +export type AuthV2JsonWebKeySet = { + keys?: AuthV2JsonWebKey[] | null; +}; diff --git a/web/src/__generated__/schemas/AuthV2LegacyAccessToken.ts b/web/src/__generated__/schemas/AuthV2LegacyAccessToken.ts new file mode 100644 index 0000000000..63113024a1 --- /dev/null +++ b/web/src/__generated__/schemas/AuthV2LegacyAccessToken.ts @@ -0,0 +1,23 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type AuthV2LegacyAccessToken = { + accountId?: string | null; + accountIdRaw?: bigint | string | null; + cid?: bigint | string; + created?: Date; + customerId?: string; + deviceId?: string | null; + expiresMs?: bigint | string | null; + gameId?: string | null; + gamerTag?: bigint | string | null; + platform?: string | null; + playerId?: string | null; + realmId?: string | null; + revoked?: boolean | null; + token?: string; + ttl?: Date | null; + type?: string; +}; diff --git a/web/src/__generated__/schemas/AuthV2ListTokensResponse.ts b/web/src/__generated__/schemas/AuthV2ListTokensResponse.ts new file mode 100644 index 0000000000..6e35bce854 --- /dev/null +++ b/web/src/__generated__/schemas/AuthV2ListTokensResponse.ts @@ -0,0 +1,10 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { AuthV2RefreshTokenResponse } from './AuthV2RefreshTokenResponse'; + +export type AuthV2ListTokensResponse = { + tokens?: AuthV2RefreshTokenResponse[] | null; +}; diff --git a/web/src/__generated__/schemas/AuthV2OpenIdConfigResponse.ts b/web/src/__generated__/schemas/AuthV2OpenIdConfigResponse.ts new file mode 100644 index 0000000000..b9f7cb456d --- /dev/null +++ b/web/src/__generated__/schemas/AuthV2OpenIdConfigResponse.ts @@ -0,0 +1,9 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type AuthV2OpenIdConfigResponse = { + issuer: string; + jwks_uri: string; +}; diff --git a/web/src/__generated__/schemas/PasswordAuthRequest.ts b/web/src/__generated__/schemas/AuthV2PasswordAuthRequest.ts similarity index 66% rename from web/src/__generated__/schemas/PasswordAuthRequest.ts rename to web/src/__generated__/schemas/AuthV2PasswordAuthRequest.ts index fd0e64a863..5ff013a6a1 100644 --- a/web/src/__generated__/schemas/PasswordAuthRequest.ts +++ b/web/src/__generated__/schemas/AuthV2PasswordAuthRequest.ts @@ -3,10 +3,10 @@ * All manual edits will be lost when this file is regenerated. */ -import type { AuthActorContextInfo } from './AuthActorContextInfo'; +import type { AuthV2ContextInfo } from './AuthV2ContextInfo'; -export type PasswordAuthRequest = { - context?: AuthActorContextInfo; +export type AuthV2PasswordAuthRequest = { + context?: AuthV2ContextInfo; customerId?: string | null; email?: string | null; password?: string | null; diff --git a/web/src/__generated__/schemas/AuthV2ProtoError.ts b/web/src/__generated__/schemas/AuthV2ProtoError.ts new file mode 100644 index 0000000000..e77f9999f1 --- /dev/null +++ b/web/src/__generated__/schemas/AuthV2ProtoError.ts @@ -0,0 +1,10 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type AuthV2ProtoError = { + description?: string | null; + error?: string | null; + status?: number; +}; diff --git a/web/src/__generated__/schemas/AuthV2RefreshToken.ts b/web/src/__generated__/schemas/AuthV2RefreshToken.ts new file mode 100644 index 0000000000..6febab8748 --- /dev/null +++ b/web/src/__generated__/schemas/AuthV2RefreshToken.ts @@ -0,0 +1,23 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type AuthV2RefreshToken = { + accountId?: string | null; + accountIdRaw?: bigint | string | null; + cid?: bigint | string; + created?: Date; + customerId?: string; + deviceId?: string | null; + expiresMs?: bigint | string | null; + gameId?: string | null; + gamerTag?: bigint | string | null; + platform?: string | null; + playerId?: string | null; + realmId?: string | null; + revoked?: boolean | null; + token?: string; + ttl?: Date | null; + type?: string; +}; diff --git a/web/src/__generated__/schemas/RefreshTokenAuthRequest.ts b/web/src/__generated__/schemas/AuthV2RefreshTokenAuthRequest.ts similarity index 61% rename from web/src/__generated__/schemas/RefreshTokenAuthRequest.ts rename to web/src/__generated__/schemas/AuthV2RefreshTokenAuthRequest.ts index 4a913ced20..e62a47dd48 100644 --- a/web/src/__generated__/schemas/RefreshTokenAuthRequest.ts +++ b/web/src/__generated__/schemas/AuthV2RefreshTokenAuthRequest.ts @@ -3,10 +3,10 @@ * All manual edits will be lost when this file is regenerated. */ -import type { AuthActorContextInfo } from './AuthActorContextInfo'; +import type { AuthV2ContextInfo } from './AuthV2ContextInfo'; -export type RefreshTokenAuthRequest = { - context?: AuthActorContextInfo; +export type AuthV2RefreshTokenAuthRequest = { + context?: AuthV2ContextInfo; customerId?: string | null; realmId?: string | null; refreshToken?: string | null; diff --git a/web/src/__generated__/schemas/AuthV2RefreshTokenResponse.ts b/web/src/__generated__/schemas/AuthV2RefreshTokenResponse.ts new file mode 100644 index 0000000000..b93c6d48d5 --- /dev/null +++ b/web/src/__generated__/schemas/AuthV2RefreshTokenResponse.ts @@ -0,0 +1,9 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type AuthV2RefreshTokenResponse = { + created?: Date | null; + token?: string | null; +}; diff --git a/web/src/__generated__/schemas/AuthV2RevokeRefreshTokensRequest.ts b/web/src/__generated__/schemas/AuthV2RevokeRefreshTokensRequest.ts new file mode 100644 index 0000000000..d9ab3e47c8 --- /dev/null +++ b/web/src/__generated__/schemas/AuthV2RevokeRefreshTokensRequest.ts @@ -0,0 +1,8 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type AuthV2RevokeRefreshTokensRequest = { + tokens: string[]; +}; diff --git a/web/src/__generated__/schemas/ServerTokenAuthRequest.ts b/web/src/__generated__/schemas/AuthV2ServerTokenAuthRequest.ts similarity index 84% rename from web/src/__generated__/schemas/ServerTokenAuthRequest.ts rename to web/src/__generated__/schemas/AuthV2ServerTokenAuthRequest.ts index 66bc0e2742..dd04a662fd 100644 --- a/web/src/__generated__/schemas/ServerTokenAuthRequest.ts +++ b/web/src/__generated__/schemas/AuthV2ServerTokenAuthRequest.ts @@ -3,7 +3,7 @@ * All manual edits will be lost when this file is regenerated. */ -export type ServerTokenAuthRequest = { +export type AuthV2ServerTokenAuthRequest = { clientId?: string | null; clientSecret?: string | null; customerId?: string | null; diff --git a/web/src/__generated__/schemas/ServerTokenResponse.ts b/web/src/__generated__/schemas/AuthV2ServerTokenResponse.ts similarity index 79% rename from web/src/__generated__/schemas/ServerTokenResponse.ts rename to web/src/__generated__/schemas/AuthV2ServerTokenResponse.ts index 183a54d3de..45b0051063 100644 --- a/web/src/__generated__/schemas/ServerTokenResponse.ts +++ b/web/src/__generated__/schemas/AuthV2ServerTokenResponse.ts @@ -3,6 +3,6 @@ * All manual edits will be lost when this file is regenerated. */ -export type ServerTokenResponse = { +export type AuthV2ServerTokenResponse = { accessToken?: string | null; }; diff --git a/web/src/__generated__/schemas/BatchGetItem.ts b/web/src/__generated__/schemas/BatchGetItem.ts new file mode 100644 index 0000000000..d42903afc1 --- /dev/null +++ b/web/src/__generated__/schemas/BatchGetItem.ts @@ -0,0 +1,11 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { StatsTarget } from './StatsTarget'; + +export type BatchGetItem = { + target: StatsTarget; + keys?: string[] | null; +}; diff --git a/web/src/__generated__/schemas/BatchGetRequest.ts b/web/src/__generated__/schemas/BatchGetRequest.ts new file mode 100644 index 0000000000..e687aa2290 --- /dev/null +++ b/web/src/__generated__/schemas/BatchGetRequest.ts @@ -0,0 +1,10 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { BatchGetItem } from './BatchGetItem'; + +export type BatchGetRequest = { + requests: BatchGetItem[]; +}; diff --git a/web/src/__generated__/schemas/BatchGetStatsResponse.ts b/web/src/__generated__/schemas/BatchGetStatsResponse.ts new file mode 100644 index 0000000000..baa287e2f4 --- /dev/null +++ b/web/src/__generated__/schemas/BatchGetStatsResponse.ts @@ -0,0 +1,10 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { GetStatsResponse } from './GetStatsResponse'; + +export type BatchGetStatsResponse = { + results: GetStatsResponse[]; +}; diff --git a/web/src/__generated__/schemas/BatchWriteItem.ts b/web/src/__generated__/schemas/BatchWriteItem.ts new file mode 100644 index 0000000000..6042182815 --- /dev/null +++ b/web/src/__generated__/schemas/BatchWriteItem.ts @@ -0,0 +1,12 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { SetStatsRequest } from './SetStatsRequest'; +import type { StatsTarget } from './StatsTarget'; + +export type BatchWriteItem = { + request: SetStatsRequest; + target: StatsTarget; +}; diff --git a/web/src/__generated__/schemas/BatchWriteRequest.ts b/web/src/__generated__/schemas/BatchWriteRequest.ts new file mode 100644 index 0000000000..8cd1500010 --- /dev/null +++ b/web/src/__generated__/schemas/BatchWriteRequest.ts @@ -0,0 +1,10 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { BatchWriteItem } from './BatchWriteItem'; + +export type BatchWriteRequest = { + requests: BatchWriteItem[]; +}; diff --git a/web/src/__generated__/schemas/BeamoV2ContextRuleFilter.ts b/web/src/__generated__/schemas/BeamoV2ContextRuleFilter.ts new file mode 100644 index 0000000000..e58370e893 --- /dev/null +++ b/web/src/__generated__/schemas/BeamoV2ContextRuleFilter.ts @@ -0,0 +1,14 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { BeamoV2PathRuleOperationType } from './enums/BeamoV2PathRuleOperationType'; +import type { BeamoV2PlayerRuleOperationType } from './enums/BeamoV2PlayerRuleOperationType'; + +export type BeamoV2ContextRuleFilter = { + paths?: string[]; + pathsOperationType?: BeamoV2PathRuleOperationType; + playerIdOperationType?: BeamoV2PlayerRuleOperationType; + playerIds?: (bigint | string)[]; +}; diff --git a/web/src/__generated__/schemas/BeamoV2ExtensionContentReference.ts b/web/src/__generated__/schemas/BeamoV2ExtensionContentReference.ts new file mode 100644 index 0000000000..5954bc8ae9 --- /dev/null +++ b/web/src/__generated__/schemas/BeamoV2ExtensionContentReference.ts @@ -0,0 +1,10 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type BeamoV2ExtensionContentReference = { + contentId?: string; + name?: string; + version?: string; +}; diff --git a/web/src/__generated__/schemas/BeamoV2GetAllServiceLoggingContexts.ts b/web/src/__generated__/schemas/BeamoV2GetAllServiceLoggingContexts.ts new file mode 100644 index 0000000000..3caa18dd13 --- /dev/null +++ b/web/src/__generated__/schemas/BeamoV2GetAllServiceLoggingContexts.ts @@ -0,0 +1,10 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { BeamoV2ServiceLoggingContext } from './BeamoV2ServiceLoggingContext'; + +export type BeamoV2GetAllServiceLoggingContexts = { + contexts?: BeamoV2ServiceLoggingContext[]; +}; diff --git a/web/src/__generated__/schemas/BeamoV2LogContextRule.ts b/web/src/__generated__/schemas/BeamoV2LogContextRule.ts new file mode 100644 index 0000000000..a6c316ab86 --- /dev/null +++ b/web/src/__generated__/schemas/BeamoV2LogContextRule.ts @@ -0,0 +1,22 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { BeamoV2ContextRuleFilter } from './BeamoV2ContextRuleFilter'; +import type { BeamoV2LogContextRuleAuthor } from './BeamoV2LogContextRuleAuthor'; +import type { BeamoV2LogLevel } from './enums/BeamoV2LogLevel'; + +export type BeamoV2LogContextRule = { + enabled: boolean; + logLevel: BeamoV2LogLevel; + ruleFilters: BeamoV2ContextRuleFilter[]; + author?: BeamoV2LogContextRuleAuthor; + createdAt?: bigint | string; + description?: string | null; + expiresAt?: bigint | string | null; + name?: string | null; + ruleId?: string; + updatedAt?: bigint | string; + whoLastEdit?: BeamoV2LogContextRuleAuthor; +}; diff --git a/web/src/__generated__/schemas/BeamoV2LogContextRuleAuthor.ts b/web/src/__generated__/schemas/BeamoV2LogContextRuleAuthor.ts new file mode 100644 index 0000000000..851422167f --- /dev/null +++ b/web/src/__generated__/schemas/BeamoV2LogContextRuleAuthor.ts @@ -0,0 +1,9 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type BeamoV2LogContextRuleAuthor = { + accountId: string; + email?: string | null; +}; diff --git a/web/src/__generated__/schemas/BeamoV2Manifest.ts b/web/src/__generated__/schemas/BeamoV2Manifest.ts index 464832e922..778da6044a 100644 --- a/web/src/__generated__/schemas/BeamoV2Manifest.ts +++ b/web/src/__generated__/schemas/BeamoV2Manifest.ts @@ -3,6 +3,7 @@ * All manual edits will be lost when this file is regenerated. */ +import type { BeamoV2PortalExtensionReference } from './BeamoV2PortalExtensionReference'; import type { BeamoV2ServiceReference } from './BeamoV2ServiceReference'; import type { BeamoV2ServiceStorageReference } from './BeamoV2ServiceStorageReference'; @@ -12,6 +13,7 @@ export type BeamoV2Manifest = { created?: bigint | string; createdByAccountId?: bigint | string | null; id?: string; + portalExtensionReferences?: BeamoV2PortalExtensionReference[]; serviceReferences?: BeamoV2ServiceReference[]; storageGroupId?: string | null; storageReferences?: BeamoV2ServiceStorageReference[]; diff --git a/web/src/__generated__/schemas/BeamoV2PortalExtensionReference.ts b/web/src/__generated__/schemas/BeamoV2PortalExtensionReference.ts new file mode 100644 index 0000000000..e58d68b463 --- /dev/null +++ b/web/src/__generated__/schemas/BeamoV2PortalExtensionReference.ts @@ -0,0 +1,16 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { BeamoV2ExtensionContentReference } from './BeamoV2ExtensionContentReference'; + +export type BeamoV2PortalExtensionReference = { + archived?: boolean; + attributes?: Record; + checksum?: string; + dependencies?: string[] | null; + enabled?: boolean; + files?: BeamoV2ExtensionContentReference[]; + name?: string; +}; diff --git a/web/src/__generated__/schemas/BeamoV2PostManifestRequest.ts b/web/src/__generated__/schemas/BeamoV2PostManifestRequest.ts index c92a41bbb0..27d38b278d 100644 --- a/web/src/__generated__/schemas/BeamoV2PostManifestRequest.ts +++ b/web/src/__generated__/schemas/BeamoV2PostManifestRequest.ts @@ -3,6 +3,7 @@ * All manual edits will be lost when this file is regenerated. */ +import type { BeamoV2PortalExtensionReference } from './BeamoV2PortalExtensionReference'; import type { BeamoV2ServiceReference } from './BeamoV2ServiceReference'; import type { BeamoV2ServiceStorageReference } from './BeamoV2ServiceStorageReference'; @@ -10,5 +11,6 @@ export type BeamoV2PostManifestRequest = { autoDeploy?: boolean; comments?: string | null; manifest?: BeamoV2ServiceReference[]; + portalExtensionReferences?: BeamoV2PortalExtensionReference[] | null; storageReferences?: BeamoV2ServiceStorageReference[]; }; diff --git a/web/src/__generated__/schemas/BeamoV2ServiceLoggingContext.ts b/web/src/__generated__/schemas/BeamoV2ServiceLoggingContext.ts new file mode 100644 index 0000000000..dbe3b91af7 --- /dev/null +++ b/web/src/__generated__/schemas/BeamoV2ServiceLoggingContext.ts @@ -0,0 +1,15 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { BeamoV2LogContextRule } from './BeamoV2LogContextRule'; +import type { BeamoV2LogLevel } from './enums/BeamoV2LogLevel'; + +export type BeamoV2ServiceLoggingContext = { + defaultLogLevel: BeamoV2LogLevel; + routingKey: string; + serviceName: string; + id?: string; + rules?: BeamoV2LogContextRule[]; +}; diff --git a/web/src/__generated__/schemas/BeamoV2ServiceReference.ts b/web/src/__generated__/schemas/BeamoV2ServiceReference.ts index 21d2b2f488..bc40275c65 100644 --- a/web/src/__generated__/schemas/BeamoV2ServiceReference.ts +++ b/web/src/__generated__/schemas/BeamoV2ServiceReference.ts @@ -5,6 +5,7 @@ import type { BeamoV2ServiceComponent } from './BeamoV2ServiceComponent'; import type { BeamoV2ServiceDependencyReference } from './BeamoV2ServiceDependencyReference'; +import type { BeamoV2LogProvider } from './enums/BeamoV2LogProvider'; export type BeamoV2ServiceReference = { archived?: boolean; @@ -16,6 +17,7 @@ export type BeamoV2ServiceReference = { enabled?: boolean; imageCpuArch?: string | null; imageId?: string; + logProvider?: BeamoV2LogProvider; serviceName?: string; templateId?: string; }; diff --git a/web/src/__generated__/schemas/BinaryContentReference.ts b/web/src/__generated__/schemas/BinaryContentReference.ts new file mode 100644 index 0000000000..031c5f8ff0 --- /dev/null +++ b/web/src/__generated__/schemas/BinaryContentReference.ts @@ -0,0 +1,10 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type BinaryContentReference = { + contentId: string; + url: string; + version: string; +}; diff --git a/web/src/__generated__/schemas/BinaryDefinition.ts b/web/src/__generated__/schemas/BinaryDefinition.ts index 4b87d1b545..9ab914cfdc 100644 --- a/web/src/__generated__/schemas/BinaryDefinition.ts +++ b/web/src/__generated__/schemas/BinaryDefinition.ts @@ -8,4 +8,5 @@ export type BinaryDefinition = { id: string; uploadContentType: string; tags?: string[]; + visibility?: string; }; diff --git a/web/src/__generated__/schemas/ContentBasicManifest.ts b/web/src/__generated__/schemas/ContentBasicManifest.ts index 8be27260a1..27ff30e69c 100644 --- a/web/src/__generated__/schemas/ContentBasicManifest.ts +++ b/web/src/__generated__/schemas/ContentBasicManifest.ts @@ -8,6 +8,7 @@ import type { ContentReference } from './ContentReference'; import type { TextReference } from './TextReference'; export type ContentBasicManifest = { + affectedContentIds: string; checksum: string; created: bigint | string; id: string; diff --git a/web/src/__generated__/schemas/ContentTagFilter.ts b/web/src/__generated__/schemas/ContentTagFilter.ts new file mode 100644 index 0000000000..ac7f935bfc --- /dev/null +++ b/web/src/__generated__/schemas/ContentTagFilter.ts @@ -0,0 +1,10 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type ContentTagFilter = { + allOf: string[]; + anyOf: string[]; + noneOf: string[]; +}; diff --git a/web/src/__generated__/schemas/AuthBasicContextInfo.ts b/web/src/__generated__/schemas/ContextInfo.ts similarity index 82% rename from web/src/__generated__/schemas/AuthBasicContextInfo.ts rename to web/src/__generated__/schemas/ContextInfo.ts index 6d57489b7f..cc81336679 100644 --- a/web/src/__generated__/schemas/AuthBasicContextInfo.ts +++ b/web/src/__generated__/schemas/ContextInfo.ts @@ -3,7 +3,7 @@ * All manual edits will be lost when this file is regenerated. */ -export type AuthBasicContextInfo = { +export type ContextInfo = { device: string; platform: string; }; diff --git a/web/src/__generated__/schemas/CreateLobby.ts b/web/src/__generated__/schemas/CreateLobby.ts index 14afc48eb8..957fd69995 100644 --- a/web/src/__generated__/schemas/CreateLobby.ts +++ b/web/src/__generated__/schemas/CreateLobby.ts @@ -9,6 +9,12 @@ import type { LobbyRestriction } from './enums/LobbyRestriction'; export type CreateLobby = { data?: Record | null; description?: string | null; + hasDescription?: boolean; + hasMatchType?: boolean; + hasMaxPlayers?: boolean; + hasName?: boolean; + hasPasscodeLength?: boolean; + hasRestriction?: boolean; matchType?: string | null; maxPlayers?: number; name?: string | null; diff --git a/web/src/__generated__/schemas/CreateParty.ts b/web/src/__generated__/schemas/CreateParty.ts index 1a4a0dd414..8f6f243df0 100644 --- a/web/src/__generated__/schemas/CreateParty.ts +++ b/web/src/__generated__/schemas/CreateParty.ts @@ -3,8 +3,11 @@ * All manual edits will be lost when this file is regenerated. */ +import type { Tag } from './Tag'; + export type CreateParty = { leader?: string | null; maxSize?: number; + memberTags?: Tag[] | null; restriction?: string | null; }; diff --git a/web/src/__generated__/schemas/CreateRealmRequest.ts b/web/src/__generated__/schemas/CreateRealmRequest.ts new file mode 100644 index 0000000000..935db84cd3 --- /dev/null +++ b/web/src/__generated__/schemas/CreateRealmRequest.ts @@ -0,0 +1,12 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type CreateRealmRequest = { + name: string; + isHidden?: boolean | null; + parent?: string | null; + plan?: string | null; + sharded?: boolean | null; +}; diff --git a/web/src/__generated__/schemas/CurrencyDelta.ts b/web/src/__generated__/schemas/CurrencyDelta.ts new file mode 100644 index 0000000000..ada85247f8 --- /dev/null +++ b/web/src/__generated__/schemas/CurrencyDelta.ts @@ -0,0 +1,12 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { PropertyDelta } from './PropertyDelta'; + +export type CurrencyDelta = { + after: bigint | string; + before: bigint | string; + properties?: Record; +}; diff --git a/web/src/__generated__/schemas/CustomerActorAccount.ts b/web/src/__generated__/schemas/CustomerActorAccount.ts new file mode 100644 index 0000000000..0c317fdc49 --- /dev/null +++ b/web/src/__generated__/schemas/CustomerActorAccount.ts @@ -0,0 +1,28 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { CustomerActorExternalIdentity } from './CustomerActorExternalIdentity'; +import type { CustomerActorThirdPartyAssociation } from './CustomerActorThirdPartyAssociation'; +import type { RealmAssociation } from './RealmAssociation'; +import type { RoleAssociation } from './RoleAssociation'; + +export type CustomerActorAccount = { + accountId?: bigint | string; + country?: string | null; + createdTimeMs?: bigint | string; + deviceIds?: string[] | null; + email?: string | null; + external?: CustomerActorExternalIdentity[] | null; + language?: string | null; + password?: string | null; + passwordRaw?: string | null; + realmAssociations?: RealmAssociation[]; + realmId?: string | null; + roleString?: string | null; + roles?: RoleAssociation[] | null; + thirdPartyAssociations?: CustomerActorThirdPartyAssociation[]; + updatedTimeMs?: bigint | string; + username?: string | null; +}; diff --git a/web/src/__generated__/schemas/CustomerActorAliasAvailableResponse.ts b/web/src/__generated__/schemas/CustomerActorAliasAvailableResponse.ts new file mode 100644 index 0000000000..ca28e60db7 --- /dev/null +++ b/web/src/__generated__/schemas/CustomerActorAliasAvailableResponse.ts @@ -0,0 +1,10 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type CustomerActorAliasAvailableResponse = { + alias: string; + available: boolean; + customerId?: string | null; +}; diff --git a/web/src/__generated__/schemas/CustomerActorCustomer.ts b/web/src/__generated__/schemas/CustomerActorCustomer.ts new file mode 100644 index 0000000000..0df472a8ba --- /dev/null +++ b/web/src/__generated__/schemas/CustomerActorCustomer.ts @@ -0,0 +1,25 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { CustomerActorAccount } from './CustomerActorAccount'; +import type { Realm } from './Realm'; +import type { ActivationStatus } from './enums/ActivationStatus'; +import type { PaymentStatus } from './enums/PaymentStatus'; + +export type CustomerActorCustomer = { + customerId: bigint | string; + name: string; + accounts?: CustomerActorAccount[]; + activationStatus?: ActivationStatus; + alias?: string | null; + config?: Record; + contact?: string | null; + created?: Date; + paymentStatus?: PaymentStatus; + realms?: Realm[]; + requiresCustomTier?: boolean; + stripeCustomerId?: string | null; + updated?: Date; +}; diff --git a/web/src/__generated__/schemas/CustomerActorCustomerView.ts b/web/src/__generated__/schemas/CustomerActorCustomerView.ts new file mode 100644 index 0000000000..4c1953bb45 --- /dev/null +++ b/web/src/__generated__/schemas/CustomerActorCustomerView.ts @@ -0,0 +1,13 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { RealmView } from './RealmView'; + +export type CustomerActorCustomerView = { + customerId: string; + name: string; + alias?: string | null; + realms?: RealmView[]; +}; diff --git a/web/src/__generated__/schemas/CustomerActorCustomersResponse.ts b/web/src/__generated__/schemas/CustomerActorCustomersResponse.ts new file mode 100644 index 0000000000..009924cd34 --- /dev/null +++ b/web/src/__generated__/schemas/CustomerActorCustomersResponse.ts @@ -0,0 +1,10 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { CustomerActorCustomer } from './CustomerActorCustomer'; + +export type CustomerActorCustomersResponse = { + customers?: CustomerActorCustomer[]; +}; diff --git a/web/src/__generated__/schemas/CustomerActorExternalIdentity.ts b/web/src/__generated__/schemas/CustomerActorExternalIdentity.ts new file mode 100644 index 0000000000..2257dbb148 --- /dev/null +++ b/web/src/__generated__/schemas/CustomerActorExternalIdentity.ts @@ -0,0 +1,10 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type CustomerActorExternalIdentity = { + providerNamespace?: string; + providerService?: string; + userId?: string; +}; diff --git a/web/src/__generated__/schemas/CustomerActorNewCustomerRequest.ts b/web/src/__generated__/schemas/CustomerActorNewCustomerRequest.ts new file mode 100644 index 0000000000..01e32fd2f7 --- /dev/null +++ b/web/src/__generated__/schemas/CustomerActorNewCustomerRequest.ts @@ -0,0 +1,13 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type CustomerActorNewCustomerRequest = { + email: string; + password: string; + realmName: string; + alias?: string | null; + customerName?: string | null; + hierarchy?: boolean; +}; diff --git a/web/src/__generated__/schemas/CustomerActorNewCustomerResponse.ts b/web/src/__generated__/schemas/CustomerActorNewCustomerResponse.ts new file mode 100644 index 0000000000..3d7a9f3e5c --- /dev/null +++ b/web/src/__generated__/schemas/CustomerActorNewCustomerResponse.ts @@ -0,0 +1,16 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { AuthResponse } from './AuthResponse'; + +export type CustomerActorNewCustomerResponse = { + customerId: string; + name: string; + realmId: string; + realmName: string; + token: AuthResponse; + activationPending?: boolean; + alias?: string | null; +}; diff --git a/web/src/__generated__/schemas/CustomerActorNewGameRequest.ts b/web/src/__generated__/schemas/CustomerActorNewGameRequest.ts new file mode 100644 index 0000000000..2a01f28d5d --- /dev/null +++ b/web/src/__generated__/schemas/CustomerActorNewGameRequest.ts @@ -0,0 +1,9 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type CustomerActorNewGameRequest = { + gameName: string; + isHidden?: boolean | null; +}; diff --git a/web/src/__generated__/schemas/CustomerActorPromoteRealmRequest.ts b/web/src/__generated__/schemas/CustomerActorPromoteRealmRequest.ts new file mode 100644 index 0000000000..659f8ff1f7 --- /dev/null +++ b/web/src/__generated__/schemas/CustomerActorPromoteRealmRequest.ts @@ -0,0 +1,12 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { PromotableType } from './enums/PromotableType'; + +export type CustomerActorPromoteRealmRequest = { + sourceRealmId: string; + contentManifestIds?: string[] | null; + promotions?: PromotableType[] | null; +}; diff --git a/web/src/__generated__/schemas/CustomerActorPromoteRealmResponse.ts b/web/src/__generated__/schemas/CustomerActorPromoteRealmResponse.ts new file mode 100644 index 0000000000..a597981f66 --- /dev/null +++ b/web/src/__generated__/schemas/CustomerActorPromoteRealmResponse.ts @@ -0,0 +1,11 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { CustomerActorPromotionScope } from './CustomerActorPromotionScope'; + +export type CustomerActorPromoteRealmResponse = { + sourceRealmId: string; + scopes?: CustomerActorPromotionScope[]; +}; diff --git a/web/src/__generated__/schemas/CustomerActorPromotionScope.ts b/web/src/__generated__/schemas/CustomerActorPromotionScope.ts new file mode 100644 index 0000000000..3ddfbff97f --- /dev/null +++ b/web/src/__generated__/schemas/CustomerActorPromotionScope.ts @@ -0,0 +1,12 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { Promotion } from './Promotion'; +import type { PromotableType } from './enums/PromotableType'; + +export type CustomerActorPromotionScope = { + name: PromotableType; + promotions?: Promotion[]; +}; diff --git a/web/src/__generated__/schemas/CustomerActorRealmConfigResponse.ts b/web/src/__generated__/schemas/CustomerActorRealmConfigResponse.ts new file mode 100644 index 0000000000..b678cc7ad6 --- /dev/null +++ b/web/src/__generated__/schemas/CustomerActorRealmConfigResponse.ts @@ -0,0 +1,8 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type CustomerActorRealmConfigResponse = { + config?: Record; +}; diff --git a/web/src/__generated__/schemas/CustomerActorRealmConfigSaveRequest.ts b/web/src/__generated__/schemas/CustomerActorRealmConfigSaveRequest.ts new file mode 100644 index 0000000000..d27e955436 --- /dev/null +++ b/web/src/__generated__/schemas/CustomerActorRealmConfigSaveRequest.ts @@ -0,0 +1,8 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type CustomerActorRealmConfigSaveRequest = { + config?: Record; +}; diff --git a/web/src/__generated__/schemas/CustomerActorRealmConfiguration.ts b/web/src/__generated__/schemas/CustomerActorRealmConfiguration.ts new file mode 100644 index 0000000000..1fc1ad16ae --- /dev/null +++ b/web/src/__generated__/schemas/CustomerActorRealmConfiguration.ts @@ -0,0 +1,15 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { CustomerActorWebSocketConfiguration } from './CustomerActorWebSocketConfiguration'; + +export type CustomerActorRealmConfiguration = { + environment: string; + microserviceEcrUri: string; + microserviceUri: string; + portalUri: string; + storageBrowserUri: string; + websocketConfig: CustomerActorWebSocketConfiguration; +}; diff --git a/web/src/__generated__/schemas/CustomerActorThirdPartyAssociation.ts b/web/src/__generated__/schemas/CustomerActorThirdPartyAssociation.ts new file mode 100644 index 0000000000..efbea5fdd4 --- /dev/null +++ b/web/src/__generated__/schemas/CustomerActorThirdPartyAssociation.ts @@ -0,0 +1,13 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type CustomerActorThirdPartyAssociation = { + appId?: string; + email?: string | null; + meta?: Record; + name?: string; + userAppId?: string; + userBusinessId?: string | null; +}; diff --git a/web/src/__generated__/schemas/CustomerActorUpdateGameHierarchyRequest.ts b/web/src/__generated__/schemas/CustomerActorUpdateGameHierarchyRequest.ts new file mode 100644 index 0000000000..6b0c2effd6 --- /dev/null +++ b/web/src/__generated__/schemas/CustomerActorUpdateGameHierarchyRequest.ts @@ -0,0 +1,10 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { RealmView } from './RealmView'; + +export type CustomerActorUpdateGameHierarchyRequest = { + realms: RealmView[]; +}; diff --git a/web/src/__generated__/schemas/CustomerActorWebSocketConfiguration.ts b/web/src/__generated__/schemas/CustomerActorWebSocketConfiguration.ts new file mode 100644 index 0000000000..2c9b288b1d --- /dev/null +++ b/web/src/__generated__/schemas/CustomerActorWebSocketConfiguration.ts @@ -0,0 +1,9 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type CustomerActorWebSocketConfiguration = { + provider?: string; + uri?: string | null; +}; diff --git a/web/src/__generated__/schemas/CustomerResponse.ts b/web/src/__generated__/schemas/CustomerResponse.ts index f2b98b8fce..a99e96594a 100644 --- a/web/src/__generated__/schemas/CustomerResponse.ts +++ b/web/src/__generated__/schemas/CustomerResponse.ts @@ -3,8 +3,8 @@ * All manual edits will be lost when this file is regenerated. */ -import type { Customer } from './Customer'; +import type { RealmsBasicCustomer } from './RealmsBasicCustomer'; export type CustomerResponse = { - customer: Customer; + customer: RealmsBasicCustomer; }; diff --git a/web/src/__generated__/schemas/CustomerViewResponse.ts b/web/src/__generated__/schemas/CustomerViewResponse.ts index 1774f84125..9d256b1931 100644 --- a/web/src/__generated__/schemas/CustomerViewResponse.ts +++ b/web/src/__generated__/schemas/CustomerViewResponse.ts @@ -3,8 +3,8 @@ * All manual edits will be lost when this file is regenerated. */ -import type { CustomerView } from './CustomerView'; +import type { RealmsBasicCustomerView } from './RealmsBasicCustomerView'; export type CustomerViewResponse = { - customer: CustomerView; + customer: RealmsBasicCustomerView; }; diff --git a/web/src/__generated__/schemas/EmptyMessage.ts b/web/src/__generated__/schemas/EmptyMessage.ts new file mode 100644 index 0000000000..227d441e51 --- /dev/null +++ b/web/src/__generated__/schemas/EmptyMessage.ts @@ -0,0 +1,7 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type EmptyMessage = { +}; diff --git a/web/src/__generated__/schemas/JobExecutionEvent.ts b/web/src/__generated__/schemas/ExecuteJobRequest.ts similarity index 59% rename from web/src/__generated__/schemas/JobExecutionEvent.ts rename to web/src/__generated__/schemas/ExecuteJobRequest.ts index 79e6d041a1..9b188fa753 100644 --- a/web/src/__generated__/schemas/JobExecutionEvent.ts +++ b/web/src/__generated__/schemas/ExecuteJobRequest.ts @@ -4,14 +4,9 @@ */ import type { JobDefinition } from './JobDefinition'; -import type { JobRetryPolicy } from './JobRetryPolicy'; -export type JobExecutionEvent = { +export type ExecuteJobRequest = { executionId?: string | null; - executionKey?: string; executionTime?: Date; jobDefinition?: JobDefinition; - jobId?: string; - retryCount?: number; - retryPolicy?: JobRetryPolicy; }; diff --git a/web/src/__generated__/schemas/GetBinaryDownloadUrlsRequest.ts b/web/src/__generated__/schemas/GetBinaryDownloadUrlsRequest.ts new file mode 100644 index 0000000000..d9d341f081 --- /dev/null +++ b/web/src/__generated__/schemas/GetBinaryDownloadUrlsRequest.ts @@ -0,0 +1,11 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { GetContentRequest } from './GetContentRequest'; + +export type GetBinaryDownloadUrlsRequest = { + requests: GetContentRequest[]; + expirationSeconds?: bigint | string; +}; diff --git a/web/src/__generated__/schemas/GetBinaryDownloadUrlsResponse.ts b/web/src/__generated__/schemas/GetBinaryDownloadUrlsResponse.ts new file mode 100644 index 0000000000..87875e33d8 --- /dev/null +++ b/web/src/__generated__/schemas/GetBinaryDownloadUrlsResponse.ts @@ -0,0 +1,10 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { BinaryContentReference } from './BinaryContentReference'; + +export type GetBinaryDownloadUrlsResponse = { + urls: BinaryContentReference[]; +}; diff --git a/web/src/__generated__/schemas/CustomersResponse.ts b/web/src/__generated__/schemas/GetGamesResponse.ts similarity index 56% rename from web/src/__generated__/schemas/CustomersResponse.ts rename to web/src/__generated__/schemas/GetGamesResponse.ts index 5d186f141e..4665e26899 100644 --- a/web/src/__generated__/schemas/CustomersResponse.ts +++ b/web/src/__generated__/schemas/GetGamesResponse.ts @@ -3,8 +3,8 @@ * All manual edits will be lost when this file is regenerated. */ -import type { Customer } from './Customer'; +import type { RealmView } from './RealmView'; -export type CustomersResponse = { - result: Customer[]; +export type GetGamesResponse = { + realms?: RealmView[]; }; diff --git a/web/src/__generated__/schemas/GetStatsResponse.ts b/web/src/__generated__/schemas/GetStatsResponse.ts new file mode 100644 index 0000000000..ed8947eea4 --- /dev/null +++ b/web/src/__generated__/schemas/GetStatsResponse.ts @@ -0,0 +1,11 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { StatsValue } from './StatsValue'; + +export type GetStatsResponse = { + id?: string | null; + stats?: Record | null; +}; diff --git a/web/src/__generated__/schemas/InventoryFiltersDTO.ts b/web/src/__generated__/schemas/InventoryFiltersDTO.ts new file mode 100644 index 0000000000..b21b4f7715 --- /dev/null +++ b/web/src/__generated__/schemas/InventoryFiltersDTO.ts @@ -0,0 +1,16 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { ContentTagFilter } from './ContentTagFilter'; +import type { PropertyFilterDTO } from './PropertyFilterDTO'; +import type { TimeRange } from './TimeRange'; + +export type InventoryFiltersDTO = { + contentTagFilter?: ContentTagFilter; + createdAt?: TimeRange; + propertyFilters?: PropertyFilterDTO[]; + proxyIds?: string[]; + updatedAt?: TimeRange; +}; diff --git a/web/src/__generated__/schemas/InventoryQueryRequest.ts b/web/src/__generated__/schemas/InventoryQueryRequest.ts index 48b5397d0c..ed333e6ab2 100644 --- a/web/src/__generated__/schemas/InventoryQueryRequest.ts +++ b/web/src/__generated__/schemas/InventoryQueryRequest.ts @@ -3,6 +3,9 @@ * All manual edits will be lost when this file is regenerated. */ +import type { InventoryFiltersDTO } from './InventoryFiltersDTO'; + export type InventoryQueryRequest = { + itemFilters?: InventoryFiltersDTO; scopes?: string[]; }; diff --git a/web/src/__generated__/schemas/InventoryUpdateDelta.ts b/web/src/__generated__/schemas/InventoryUpdateDelta.ts new file mode 100644 index 0000000000..8f0106e714 --- /dev/null +++ b/web/src/__generated__/schemas/InventoryUpdateDelta.ts @@ -0,0 +1,12 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { CurrencyDelta } from './CurrencyDelta'; +import type { ItemDeltas } from './ItemDeltas'; + +export type InventoryUpdateDelta = { + currencies: Record; + items: ItemDeltas; +}; diff --git a/web/src/__generated__/schemas/InventoryUpdateRequest.ts b/web/src/__generated__/schemas/InventoryUpdateRequest.ts index 8a5f77ba4c..4bee0259d6 100644 --- a/web/src/__generated__/schemas/InventoryUpdateRequest.ts +++ b/web/src/__generated__/schemas/InventoryUpdateRequest.ts @@ -13,7 +13,9 @@ export type InventoryUpdateRequest = { currencies?: Record; currencyProperties?: Record; deleteItems?: ItemDeleteRequest[]; + includeDeltas?: boolean; newItems?: ItemCreateRequest[]; + scopes?: string[]; transaction?: string; updateItems?: ItemUpdateRequest[]; }; diff --git a/web/src/__generated__/schemas/InventoryUpdateResponse.ts b/web/src/__generated__/schemas/InventoryUpdateResponse.ts new file mode 100644 index 0000000000..9deadab7ea --- /dev/null +++ b/web/src/__generated__/schemas/InventoryUpdateResponse.ts @@ -0,0 +1,12 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { InventoryUpdateDelta } from './InventoryUpdateDelta'; + +export type InventoryUpdateResponse = { + data: Record; + result: string; + deltas?: InventoryUpdateDelta; +}; diff --git a/web/src/__generated__/schemas/InventoryView.ts b/web/src/__generated__/schemas/InventoryView.ts index f6423a1da2..1734ac3948 100644 --- a/web/src/__generated__/schemas/InventoryView.ts +++ b/web/src/__generated__/schemas/InventoryView.ts @@ -4,10 +4,12 @@ */ import type { CurrencyView } from './CurrencyView'; +import type { InventoryFiltersDTO } from './InventoryFiltersDTO'; import type { ItemGroup } from './ItemGroup'; export type InventoryView = { currencies: CurrencyView[]; items: ItemGroup[]; + itemFilters?: InventoryFiltersDTO; scope?: string; }; diff --git a/web/src/__generated__/schemas/ItemDeltas.ts b/web/src/__generated__/schemas/ItemDeltas.ts new file mode 100644 index 0000000000..0ccbff0fa5 --- /dev/null +++ b/web/src/__generated__/schemas/ItemDeltas.ts @@ -0,0 +1,12 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { ItemPropertiesDelta } from './ItemPropertiesDelta'; + +export type ItemDeltas = { + created: ItemPropertiesDelta[]; + deleted: ItemPropertiesDelta[]; + updated: ItemPropertiesDelta[]; +}; diff --git a/web/src/__generated__/schemas/ItemPropertiesDelta.ts b/web/src/__generated__/schemas/ItemPropertiesDelta.ts new file mode 100644 index 0000000000..4e6a3e5b05 --- /dev/null +++ b/web/src/__generated__/schemas/ItemPropertiesDelta.ts @@ -0,0 +1,12 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { PropertyDelta } from './PropertyDelta'; + +export type ItemPropertiesDelta = { + contentId: string; + itemId: bigint | string; + properties?: Record; +}; diff --git a/web/src/__generated__/schemas/ManifestDiffSummary.ts b/web/src/__generated__/schemas/ManifestDiffSummary.ts index e8131eb835..d2c111eb9e 100644 --- a/web/src/__generated__/schemas/ManifestDiffSummary.ts +++ b/web/src/__generated__/schemas/ManifestDiffSummary.ts @@ -4,7 +4,9 @@ */ export type ManifestDiffSummary = { + affectedContentIds: string[]; createdDate: bigint | string; - diffUrl: string; manifestUid: string; + publishedBy?: string; + publishedByName?: string; }; diff --git a/web/src/__generated__/schemas/MessageRequest.ts b/web/src/__generated__/schemas/MessageRequest.ts index 547a0721ee..d2f6696a99 100644 --- a/web/src/__generated__/schemas/MessageRequest.ts +++ b/web/src/__generated__/schemas/MessageRequest.ts @@ -6,7 +6,13 @@ export type MessageRequest = { body?: string | null; channel?: string | null; + hasChannel?: boolean; + hasPid?: boolean; + hasPlayerId?: boolean; + hasRealmId?: boolean; + hasSingleDelivery?: boolean; pid?: string | null; playerId?: string | null; realmId?: string | null; + singleDelivery?: boolean; }; diff --git a/web/src/__generated__/schemas/Party.ts b/web/src/__generated__/schemas/Party.ts index a362a9ca9e..11f24c49af 100644 --- a/web/src/__generated__/schemas/Party.ts +++ b/web/src/__generated__/schemas/Party.ts @@ -3,11 +3,15 @@ * All manual edits will be lost when this file is regenerated. */ +import type { TagList } from './TagList'; + export type Party = { + created?: Date | null; id?: string | null; leader?: string | null; maxSize?: number; members?: string[] | null; + membersTags?: Record | null; pendingInvites?: string[] | null; restriction?: string | null; }; diff --git a/web/src/__generated__/schemas/PartyMemberTags.ts b/web/src/__generated__/schemas/PartyMemberTags.ts new file mode 100644 index 0000000000..24f721efa6 --- /dev/null +++ b/web/src/__generated__/schemas/PartyMemberTags.ts @@ -0,0 +1,10 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { Tag } from './Tag'; + +export type PartyMemberTags = { + memberTags?: Tag[] | null; +}; diff --git a/web/src/__generated__/schemas/PlayerSessionActorPaymentTotal.ts b/web/src/__generated__/schemas/PlayerSessionActorPaymentTotal.ts new file mode 100644 index 0000000000..403cca67df --- /dev/null +++ b/web/src/__generated__/schemas/PlayerSessionActorPaymentTotal.ts @@ -0,0 +1,9 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type PlayerSessionActorPaymentTotal = { + amount?: bigint | string; + currency?: string | null; +}; diff --git a/web/src/__generated__/schemas/PlayerSessionActorSessionClientHistoryResponse.ts b/web/src/__generated__/schemas/PlayerSessionActorSessionClientHistoryResponse.ts new file mode 100644 index 0000000000..570a0d06f7 --- /dev/null +++ b/web/src/__generated__/schemas/PlayerSessionActorSessionClientHistoryResponse.ts @@ -0,0 +1,11 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type PlayerSessionActorSessionClientHistoryResponse = { + date?: string; + daysPlayed?: number; + installDate?: string | null; + sessions?: string[]; +}; diff --git a/web/src/__generated__/schemas/PlayerSessionActorSessionHistoryResponse.ts b/web/src/__generated__/schemas/PlayerSessionActorSessionHistoryResponse.ts new file mode 100644 index 0000000000..fd8a86ec2a --- /dev/null +++ b/web/src/__generated__/schemas/PlayerSessionActorSessionHistoryResponse.ts @@ -0,0 +1,15 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { PlayerSessionActorPaymentTotal } from './PlayerSessionActorPaymentTotal'; + +export type PlayerSessionActorSessionHistoryResponse = { + date?: string; + daysPlayed?: number; + installDate?: string | null; + payments?: string[]; + sessions?: string[]; + totalPaid?: PlayerSessionActorPaymentTotal[]; +}; diff --git a/web/src/__generated__/schemas/PlayerStatsActorCommonResponse.ts b/web/src/__generated__/schemas/PlayerStatsActorCommonResponse.ts new file mode 100644 index 0000000000..a7fb1cd654 --- /dev/null +++ b/web/src/__generated__/schemas/PlayerStatsActorCommonResponse.ts @@ -0,0 +1,8 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type PlayerStatsActorCommonResponse = { + result?: string; +}; diff --git a/web/src/__generated__/schemas/PortalSessionResponse.ts b/web/src/__generated__/schemas/PortalSessionResponse.ts new file mode 100644 index 0000000000..5a372ac463 --- /dev/null +++ b/web/src/__generated__/schemas/PortalSessionResponse.ts @@ -0,0 +1,8 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type PortalSessionResponse = { + url?: string; +}; diff --git a/web/src/__generated__/schemas/PredicateDTO.ts b/web/src/__generated__/schemas/PredicateDTO.ts new file mode 100644 index 0000000000..fa82a0858f --- /dev/null +++ b/web/src/__generated__/schemas/PredicateDTO.ts @@ -0,0 +1,17 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type PredicateDTO = { + kind: string; + as?: string; + caseInsensitive?: boolean; + includeLower?: boolean; + includeUpper?: boolean; + lower?: string; + substr?: string; + upper?: string; + value?: string; + values?: string[]; +}; diff --git a/web/src/__generated__/schemas/PromoteRealmResponse.ts b/web/src/__generated__/schemas/PromoteRealmResponse.ts deleted file mode 100644 index a75548b04a..0000000000 --- a/web/src/__generated__/schemas/PromoteRealmResponse.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. - * All manual edits will be lost when this file is regenerated. - */ - -import type { PromotionScope } from './PromotionScope'; - -export type PromoteRealmResponse = { - scopes: PromotionScope[]; - sourcePid: string; -}; diff --git a/web/src/__generated__/schemas/PropertyDelta.ts b/web/src/__generated__/schemas/PropertyDelta.ts new file mode 100644 index 0000000000..7af49b597e --- /dev/null +++ b/web/src/__generated__/schemas/PropertyDelta.ts @@ -0,0 +1,9 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type PropertyDelta = { + after?: string; + before?: string; +}; diff --git a/web/src/__generated__/schemas/PropertyFilterDTO.ts b/web/src/__generated__/schemas/PropertyFilterDTO.ts new file mode 100644 index 0000000000..59c3023133 --- /dev/null +++ b/web/src/__generated__/schemas/PropertyFilterDTO.ts @@ -0,0 +1,11 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { PredicateDTO } from './PredicateDTO'; + +export type PropertyFilterDTO = { + key: string; + predicate: PredicateDTO; +}; diff --git a/web/src/__generated__/schemas/Realm.ts b/web/src/__generated__/schemas/Realm.ts new file mode 100644 index 0000000000..a18eb998dd --- /dev/null +++ b/web/src/__generated__/schemas/Realm.ts @@ -0,0 +1,19 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type Realm = { + name: string; + plan: string; + children?: string[] | null; + config?: Record; + created?: Date; + customCharts?: Record; + displayName?: string | null; + hidden?: boolean | null; + isArchived?: boolean | null; + parent?: string | null; + secret?: string; + sharded?: boolean | null; +}; diff --git a/web/src/__generated__/schemas/RealmAssociation.ts b/web/src/__generated__/schemas/RealmAssociation.ts new file mode 100644 index 0000000000..cf2de36f9b --- /dev/null +++ b/web/src/__generated__/schemas/RealmAssociation.ts @@ -0,0 +1,9 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type RealmAssociation = { + playerId?: bigint | string; + realmId?: string; +}; diff --git a/web/src/__generated__/schemas/RealmConfigChangeRequest.ts b/web/src/__generated__/schemas/RealmConfigChangeRequest.ts index e8953b89c5..db80ef2bf3 100644 --- a/web/src/__generated__/schemas/RealmConfigChangeRequest.ts +++ b/web/src/__generated__/schemas/RealmConfigChangeRequest.ts @@ -4,6 +4,6 @@ */ export type RealmConfigChangeRequest = { - deletes?: string[]; - upserts?: Record; + deletes?: string[] | null; + upserts?: Record | null; }; diff --git a/web/src/__generated__/schemas/RealmView.ts b/web/src/__generated__/schemas/RealmView.ts new file mode 100644 index 0000000000..57518ddce3 --- /dev/null +++ b/web/src/__generated__/schemas/RealmView.ts @@ -0,0 +1,16 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type RealmView = { + displayName: string; + realmId: string; + archived?: boolean; + children?: string[] | null; + customerId?: string | null; + hidden?: boolean; + parent?: string | null; + secret?: string | null; + sharded?: boolean | null; +}; diff --git a/web/src/__generated__/schemas/AliasAvailableResponse.ts b/web/src/__generated__/schemas/RealmsBasicAliasAvailableResponse.ts similarity index 79% rename from web/src/__generated__/schemas/AliasAvailableResponse.ts rename to web/src/__generated__/schemas/RealmsBasicAliasAvailableResponse.ts index c480473d99..3c5d6177f2 100644 --- a/web/src/__generated__/schemas/AliasAvailableResponse.ts +++ b/web/src/__generated__/schemas/RealmsBasicAliasAvailableResponse.ts @@ -3,7 +3,7 @@ * All manual edits will be lost when this file is regenerated. */ -export type AliasAvailableResponse = { +export type RealmsBasicAliasAvailableResponse = { alias: string; available: boolean; cid: bigint | string; diff --git a/web/src/__generated__/schemas/Customer.ts b/web/src/__generated__/schemas/RealmsBasicCustomer.ts similarity index 88% rename from web/src/__generated__/schemas/Customer.ts rename to web/src/__generated__/schemas/RealmsBasicCustomer.ts index 0ef8a2a50d..8aeabe7b2f 100644 --- a/web/src/__generated__/schemas/Customer.ts +++ b/web/src/__generated__/schemas/RealmsBasicCustomer.ts @@ -6,13 +6,14 @@ import type { Project } from './Project'; import type { RealmsBasicAccount } from './RealmsBasicAccount'; -export type Customer = { +export type RealmsBasicCustomer = { accounts: RealmsBasicAccount[]; cid: bigint | string; name: string; projects: Project[]; activationStatus?: string; alias?: string; + config?: Record; contact?: string; created?: bigint | string; crm_link?: string; diff --git a/web/src/__generated__/schemas/CustomerView.ts b/web/src/__generated__/schemas/RealmsBasicCustomerView.ts similarity index 87% rename from web/src/__generated__/schemas/CustomerView.ts rename to web/src/__generated__/schemas/RealmsBasicCustomerView.ts index f2ec9e74b6..6178d9e384 100644 --- a/web/src/__generated__/schemas/CustomerView.ts +++ b/web/src/__generated__/schemas/RealmsBasicCustomerView.ts @@ -5,7 +5,7 @@ import type { ProjectView } from './ProjectView'; -export type CustomerView = { +export type RealmsBasicCustomerView = { cid: bigint | string; name: string; projects: ProjectView[]; diff --git a/web/src/__generated__/schemas/RealmsBasicCustomersResponse.ts b/web/src/__generated__/schemas/RealmsBasicCustomersResponse.ts new file mode 100644 index 0000000000..d39f5b6566 --- /dev/null +++ b/web/src/__generated__/schemas/RealmsBasicCustomersResponse.ts @@ -0,0 +1,10 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { RealmsBasicCustomer } from './RealmsBasicCustomer'; + +export type RealmsBasicCustomersResponse = { + result: RealmsBasicCustomer[]; +}; diff --git a/web/src/__generated__/schemas/NewCustomerRequest.ts b/web/src/__generated__/schemas/RealmsBasicNewCustomerRequest.ts similarity index 85% rename from web/src/__generated__/schemas/NewCustomerRequest.ts rename to web/src/__generated__/schemas/RealmsBasicNewCustomerRequest.ts index 3e58273de0..f7f48c772e 100644 --- a/web/src/__generated__/schemas/NewCustomerRequest.ts +++ b/web/src/__generated__/schemas/RealmsBasicNewCustomerRequest.ts @@ -3,7 +3,7 @@ * All manual edits will be lost when this file is regenerated. */ -export type NewCustomerRequest = { +export type RealmsBasicNewCustomerRequest = { email: string; password: string; projectName: string; diff --git a/web/src/__generated__/schemas/NewCustomerResponse.ts b/web/src/__generated__/schemas/RealmsBasicNewCustomerResponse.ts similarity index 87% rename from web/src/__generated__/schemas/NewCustomerResponse.ts rename to web/src/__generated__/schemas/RealmsBasicNewCustomerResponse.ts index b8339d6f32..1ddc22926d 100644 --- a/web/src/__generated__/schemas/NewCustomerResponse.ts +++ b/web/src/__generated__/schemas/RealmsBasicNewCustomerResponse.ts @@ -5,7 +5,7 @@ import type { TokenResponse } from './TokenResponse'; -export type NewCustomerResponse = { +export type RealmsBasicNewCustomerResponse = { activationPending: boolean; cid: bigint | string; name: string; diff --git a/web/src/__generated__/schemas/NewGameRequest.ts b/web/src/__generated__/schemas/RealmsBasicNewGameRequest.ts similarity index 78% rename from web/src/__generated__/schemas/NewGameRequest.ts rename to web/src/__generated__/schemas/RealmsBasicNewGameRequest.ts index dc81bb578f..d030e1227b 100644 --- a/web/src/__generated__/schemas/NewGameRequest.ts +++ b/web/src/__generated__/schemas/RealmsBasicNewGameRequest.ts @@ -3,6 +3,6 @@ * All manual edits will be lost when this file is regenerated. */ -export type NewGameRequest = { +export type RealmsBasicNewGameRequest = { gameName: string; }; diff --git a/web/src/__generated__/schemas/PromoteRealmRequest.ts b/web/src/__generated__/schemas/RealmsBasicPromoteRealmRequest.ts similarity index 82% rename from web/src/__generated__/schemas/PromoteRealmRequest.ts rename to web/src/__generated__/schemas/RealmsBasicPromoteRealmRequest.ts index fef4b9ba1f..104e46ba4e 100644 --- a/web/src/__generated__/schemas/PromoteRealmRequest.ts +++ b/web/src/__generated__/schemas/RealmsBasicPromoteRealmRequest.ts @@ -3,7 +3,7 @@ * All manual edits will be lost when this file is regenerated. */ -export type PromoteRealmRequest = { +export type RealmsBasicPromoteRealmRequest = { sourcePid: string; contentManifestIds?: string[]; promotions?: string[]; diff --git a/web/src/__generated__/schemas/RealmsBasicPromoteRealmResponse.ts b/web/src/__generated__/schemas/RealmsBasicPromoteRealmResponse.ts new file mode 100644 index 0000000000..7c27f375af --- /dev/null +++ b/web/src/__generated__/schemas/RealmsBasicPromoteRealmResponse.ts @@ -0,0 +1,11 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { RealmsBasicPromotionScope } from './RealmsBasicPromotionScope'; + +export type RealmsBasicPromoteRealmResponse = { + scopes: RealmsBasicPromotionScope[]; + sourcePid: string; +}; diff --git a/web/src/__generated__/schemas/PromotionScope.ts b/web/src/__generated__/schemas/RealmsBasicPromotionScope.ts similarity index 84% rename from web/src/__generated__/schemas/PromotionScope.ts rename to web/src/__generated__/schemas/RealmsBasicPromotionScope.ts index 75e94d6979..2608735bb2 100644 --- a/web/src/__generated__/schemas/PromotionScope.ts +++ b/web/src/__generated__/schemas/RealmsBasicPromotionScope.ts @@ -5,7 +5,7 @@ import type { Promotion } from './Promotion'; -export type PromotionScope = { +export type RealmsBasicPromotionScope = { name: string; promotions: Promotion[]; }; diff --git a/web/src/__generated__/schemas/RealmConfigResponse.ts b/web/src/__generated__/schemas/RealmsBasicRealmConfigResponse.ts similarity index 78% rename from web/src/__generated__/schemas/RealmConfigResponse.ts rename to web/src/__generated__/schemas/RealmsBasicRealmConfigResponse.ts index 051fc8847f..2b92680843 100644 --- a/web/src/__generated__/schemas/RealmConfigResponse.ts +++ b/web/src/__generated__/schemas/RealmsBasicRealmConfigResponse.ts @@ -3,6 +3,6 @@ * All manual edits will be lost when this file is regenerated. */ -export type RealmConfigResponse = { +export type RealmsBasicRealmConfigResponse = { config: Record; }; diff --git a/web/src/__generated__/schemas/RealmConfigSaveRequest.ts b/web/src/__generated__/schemas/RealmsBasicRealmConfigSaveRequest.ts similarity index 77% rename from web/src/__generated__/schemas/RealmConfigSaveRequest.ts rename to web/src/__generated__/schemas/RealmsBasicRealmConfigSaveRequest.ts index e12d3f189d..cc8e4eb1a4 100644 --- a/web/src/__generated__/schemas/RealmConfigSaveRequest.ts +++ b/web/src/__generated__/schemas/RealmsBasicRealmConfigSaveRequest.ts @@ -3,6 +3,6 @@ * All manual edits will be lost when this file is regenerated. */ -export type RealmConfigSaveRequest = { +export type RealmsBasicRealmConfigSaveRequest = { config: Record; }; diff --git a/web/src/__generated__/schemas/RealmConfiguration.ts b/web/src/__generated__/schemas/RealmsBasicRealmConfiguration.ts similarity index 58% rename from web/src/__generated__/schemas/RealmConfiguration.ts rename to web/src/__generated__/schemas/RealmsBasicRealmConfiguration.ts index 69da83ace2..2f374d3ed3 100644 --- a/web/src/__generated__/schemas/RealmConfiguration.ts +++ b/web/src/__generated__/schemas/RealmsBasicRealmConfiguration.ts @@ -3,13 +3,13 @@ * All manual edits will be lost when this file is regenerated. */ -import type { WebSocketConfiguration } from './WebSocketConfiguration'; +import type { RealmsBasicWebSocketConfiguration } from './RealmsBasicWebSocketConfiguration'; -export type RealmConfiguration = { +export type RealmsBasicRealmConfiguration = { environment: string; microserviceEcrURI: string; microserviceURI: string; portalURI: string; storageBrowserURI: string; - websocketConfig: WebSocketConfiguration; + websocketConfig: RealmsBasicWebSocketConfiguration; }; diff --git a/web/src/__generated__/schemas/UpdateGameHierarchyRequest.ts b/web/src/__generated__/schemas/RealmsBasicUpdateGameHierarchyRequest.ts similarity index 81% rename from web/src/__generated__/schemas/UpdateGameHierarchyRequest.ts rename to web/src/__generated__/schemas/RealmsBasicUpdateGameHierarchyRequest.ts index f016b3460a..b9b37bd898 100644 --- a/web/src/__generated__/schemas/UpdateGameHierarchyRequest.ts +++ b/web/src/__generated__/schemas/RealmsBasicUpdateGameHierarchyRequest.ts @@ -5,7 +5,7 @@ import type { ProjectView } from './ProjectView'; -export type UpdateGameHierarchyRequest = { +export type RealmsBasicUpdateGameHierarchyRequest = { projects: ProjectView[]; rootPID: string; }; diff --git a/web/src/__generated__/schemas/WebSocketConfiguration.ts b/web/src/__generated__/schemas/RealmsBasicWebSocketConfiguration.ts similarity index 77% rename from web/src/__generated__/schemas/WebSocketConfiguration.ts rename to web/src/__generated__/schemas/RealmsBasicWebSocketConfiguration.ts index 0fdb74bc57..6371cfe011 100644 --- a/web/src/__generated__/schemas/WebSocketConfiguration.ts +++ b/web/src/__generated__/schemas/RealmsBasicWebSocketConfiguration.ts @@ -3,7 +3,7 @@ * All manual edits will be lost when this file is regenerated. */ -export type WebSocketConfiguration = { +export type RealmsBasicWebSocketConfiguration = { provider: string; uri?: string; }; diff --git a/web/src/__generated__/schemas/RenameRealmRequest.ts b/web/src/__generated__/schemas/RenameRealmRequest.ts new file mode 100644 index 0000000000..9b139beb04 --- /dev/null +++ b/web/src/__generated__/schemas/RenameRealmRequest.ts @@ -0,0 +1,8 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type RenameRealmRequest = { + newName: string; +}; diff --git a/web/src/__generated__/schemas/RoleAssociation.ts b/web/src/__generated__/schemas/RoleAssociation.ts new file mode 100644 index 0000000000..34e6d6d827 --- /dev/null +++ b/web/src/__generated__/schemas/RoleAssociation.ts @@ -0,0 +1,9 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type RoleAssociation = { + realmId?: string; + roleString?: string; +}; diff --git a/web/src/__generated__/schemas/SearchExtendedRequest.ts b/web/src/__generated__/schemas/SearchExtendedRequest.ts index 0b055aa792..c2332adda1 100644 --- a/web/src/__generated__/schemas/SearchExtendedRequest.ts +++ b/web/src/__generated__/schemas/SearchExtendedRequest.ts @@ -3,12 +3,14 @@ * All manual edits will be lost when this file is regenerated. */ -import type { StatsSearchCriteria } from './StatsSearchCriteria'; +import type { StatsBasicStatsSearchCriteria } from './StatsBasicStatsSearchCriteria'; export type SearchExtendedRequest = { access: string; - criteria: StatsSearchCriteria[]; + criteria: StatsBasicStatsSearchCriteria[]; domain: string; objectType: string; statKeys: string[]; + limit?: number; + offset?: number; }; diff --git a/web/src/__generated__/schemas/SearchExtendedResponse.ts b/web/src/__generated__/schemas/SearchExtendedResponse.ts index c9e7e99068..6bc701a7fe 100644 --- a/web/src/__generated__/schemas/SearchExtendedResponse.ts +++ b/web/src/__generated__/schemas/SearchExtendedResponse.ts @@ -5,4 +5,7 @@ export type SearchExtendedResponse = { gamerStats: Record>; + limit?: number; + offset?: number; + total?: bigint | string; }; diff --git a/web/src/__generated__/schemas/SessionActorStartSessionRequest.ts b/web/src/__generated__/schemas/SessionActorStartSessionRequest.ts new file mode 100644 index 0000000000..630dfecf61 --- /dev/null +++ b/web/src/__generated__/schemas/SessionActorStartSessionRequest.ts @@ -0,0 +1,15 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { SessionLanguageContextDto } from './SessionLanguageContextDto'; + +export type SessionActorStartSessionRequest = { + customParams?: Record | null; + device?: string | null; + language?: SessionLanguageContextDto; + locale?: string | null; + platform?: string | null; + source?: string | null; +}; diff --git a/web/src/__generated__/schemas/PaymentTotal.ts b/web/src/__generated__/schemas/SessionBasicPaymentTotal.ts similarity index 82% rename from web/src/__generated__/schemas/PaymentTotal.ts rename to web/src/__generated__/schemas/SessionBasicPaymentTotal.ts index 1a18cac439..372d201e86 100644 --- a/web/src/__generated__/schemas/PaymentTotal.ts +++ b/web/src/__generated__/schemas/SessionBasicPaymentTotal.ts @@ -3,7 +3,7 @@ * All manual edits will be lost when this file is regenerated. */ -export type PaymentTotal = { +export type SessionBasicPaymentTotal = { totalRevenue: bigint | string; currencyCode?: string; }; diff --git a/web/src/__generated__/schemas/SessionClientHistoryResponse.ts b/web/src/__generated__/schemas/SessionBasicSessionClientHistoryResponse.ts similarity index 82% rename from web/src/__generated__/schemas/SessionClientHistoryResponse.ts rename to web/src/__generated__/schemas/SessionBasicSessionClientHistoryResponse.ts index 33ae00cd47..291967f7e2 100644 --- a/web/src/__generated__/schemas/SessionClientHistoryResponse.ts +++ b/web/src/__generated__/schemas/SessionBasicSessionClientHistoryResponse.ts @@ -5,7 +5,7 @@ import type { LocalDate } from './LocalDate'; -export type SessionClientHistoryResponse = { +export type SessionBasicSessionClientHistoryResponse = { date: LocalDate; daysPlayed: number; sessions: string[]; diff --git a/web/src/__generated__/schemas/SessionHistoryResponse.ts b/web/src/__generated__/schemas/SessionBasicSessionHistoryResponse.ts similarity index 63% rename from web/src/__generated__/schemas/SessionHistoryResponse.ts rename to web/src/__generated__/schemas/SessionBasicSessionHistoryResponse.ts index 83c3a849f9..db2e977633 100644 --- a/web/src/__generated__/schemas/SessionHistoryResponse.ts +++ b/web/src/__generated__/schemas/SessionBasicSessionHistoryResponse.ts @@ -4,13 +4,13 @@ */ import type { LocalDate } from './LocalDate'; -import type { PaymentTotal } from './PaymentTotal'; +import type { SessionBasicPaymentTotal } from './SessionBasicPaymentTotal'; -export type SessionHistoryResponse = { +export type SessionBasicSessionHistoryResponse = { date: LocalDate; daysPlayed: number; payments: string[]; sessions: string[]; - totalPaid: PaymentTotal[]; + totalPaid: SessionBasicPaymentTotal[]; installDate?: string; }; diff --git a/web/src/__generated__/schemas/StartSessionRequest.ts b/web/src/__generated__/schemas/SessionBasicStartSessionRequest.ts similarity index 90% rename from web/src/__generated__/schemas/StartSessionRequest.ts rename to web/src/__generated__/schemas/SessionBasicStartSessionRequest.ts index 983dc22376..3e76172483 100644 --- a/web/src/__generated__/schemas/StartSessionRequest.ts +++ b/web/src/__generated__/schemas/SessionBasicStartSessionRequest.ts @@ -5,7 +5,7 @@ import type { SessionLanguageContext } from './SessionLanguageContext'; -export type StartSessionRequest = { +export type SessionBasicStartSessionRequest = { customParams?: Record; device?: string; deviceParams?: Record; diff --git a/web/src/__generated__/schemas/SessionLanguageContextDto.ts b/web/src/__generated__/schemas/SessionLanguageContextDto.ts new file mode 100644 index 0000000000..5e77126a7c --- /dev/null +++ b/web/src/__generated__/schemas/SessionLanguageContextDto.ts @@ -0,0 +1,9 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type SessionLanguageContextDto = { + code?: string | null; + ctx?: string | null; +}; diff --git a/web/src/__generated__/schemas/SetStatsRequest.ts b/web/src/__generated__/schemas/SetStatsRequest.ts new file mode 100644 index 0000000000..dc76b0b688 --- /dev/null +++ b/web/src/__generated__/schemas/SetStatsRequest.ts @@ -0,0 +1,13 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { StatsValue } from './StatsValue'; + +export type SetStatsRequest = { + add?: Record | null; + emitAnalytics?: boolean; + hasEmitAnalytics?: boolean; + set?: Record | null; +}; diff --git a/web/src/__generated__/schemas/StatsActorCommonResponse.ts b/web/src/__generated__/schemas/StatsActorCommonResponse.ts new file mode 100644 index 0000000000..4320e4b73b --- /dev/null +++ b/web/src/__generated__/schemas/StatsActorCommonResponse.ts @@ -0,0 +1,8 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type StatsActorCommonResponse = { + result?: string; +}; diff --git a/web/src/__generated__/schemas/StatsActorStatsSearchCriteria.ts b/web/src/__generated__/schemas/StatsActorStatsSearchCriteria.ts new file mode 100644 index 0000000000..32cda3a10b --- /dev/null +++ b/web/src/__generated__/schemas/StatsActorStatsSearchCriteria.ts @@ -0,0 +1,12 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { StatsValue } from './StatsValue'; + +export type StatsActorStatsSearchCriteria = { + rel: string; + stat: string; + value?: StatsValue; +}; diff --git a/web/src/__generated__/schemas/StatsActorStatsSearchRequest.ts b/web/src/__generated__/schemas/StatsActorStatsSearchRequest.ts new file mode 100644 index 0000000000..e3fd87cf55 --- /dev/null +++ b/web/src/__generated__/schemas/StatsActorStatsSearchRequest.ts @@ -0,0 +1,16 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { StatsActorStatsSearchCriteria } from './StatsActorStatsSearchCriteria'; +import type { StatsVisibility } from './enums/StatsVisibility'; + +export type StatsActorStatsSearchRequest = { + domain: string; + itemType: string; + visibility: StatsVisibility; + criteria?: StatsActorStatsSearchCriteria[]; + limit?: number; + offset?: number; +}; diff --git a/web/src/__generated__/schemas/StatsActorStatsSearchResponse.ts b/web/src/__generated__/schemas/StatsActorStatsSearchResponse.ts new file mode 100644 index 0000000000..4f5ea6305f --- /dev/null +++ b/web/src/__generated__/schemas/StatsActorStatsSearchResponse.ts @@ -0,0 +1,11 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type StatsActorStatsSearchResponse = { + ids: string[]; + limit: number; + offset: number; + total: bigint | string; +}; diff --git a/web/src/__generated__/schemas/StatsSearchCriteria.ts b/web/src/__generated__/schemas/StatsBasicStatsSearchCriteria.ts similarity index 80% rename from web/src/__generated__/schemas/StatsSearchCriteria.ts rename to web/src/__generated__/schemas/StatsBasicStatsSearchCriteria.ts index c3a16a5fcb..c53e21bdfe 100644 --- a/web/src/__generated__/schemas/StatsSearchCriteria.ts +++ b/web/src/__generated__/schemas/StatsBasicStatsSearchCriteria.ts @@ -3,7 +3,7 @@ * All manual edits will be lost when this file is regenerated. */ -export type StatsSearchCriteria = { +export type StatsBasicStatsSearchCriteria = { rel: string; stat: string; value?: string; diff --git a/web/src/__generated__/schemas/StatsBasicStatsSearchRequest.ts b/web/src/__generated__/schemas/StatsBasicStatsSearchRequest.ts new file mode 100644 index 0000000000..8bfb3e8fd8 --- /dev/null +++ b/web/src/__generated__/schemas/StatsBasicStatsSearchRequest.ts @@ -0,0 +1,15 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { StatsBasicStatsSearchCriteria } from './StatsBasicStatsSearchCriteria'; + +export type StatsBasicStatsSearchRequest = { + access: string; + criteria: StatsBasicStatsSearchCriteria[]; + domain: string; + objectType: string; + limit?: number; + offset?: number; +}; diff --git a/web/src/__generated__/schemas/StatsBasicStatsSearchResponse.ts b/web/src/__generated__/schemas/StatsBasicStatsSearchResponse.ts new file mode 100644 index 0000000000..684328068a --- /dev/null +++ b/web/src/__generated__/schemas/StatsBasicStatsSearchResponse.ts @@ -0,0 +1,11 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type StatsBasicStatsSearchResponse = { + ids: (bigint | string)[]; + limit?: number; + offset?: number; + total?: bigint | string; +}; diff --git a/web/src/__generated__/schemas/StatsSearchExtendedRequest.ts b/web/src/__generated__/schemas/StatsSearchExtendedRequest.ts new file mode 100644 index 0000000000..4acbea354b --- /dev/null +++ b/web/src/__generated__/schemas/StatsSearchExtendedRequest.ts @@ -0,0 +1,17 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { StatsActorStatsSearchCriteria } from './StatsActorStatsSearchCriteria'; +import type { StatsVisibility } from './enums/StatsVisibility'; + +export type StatsSearchExtendedRequest = { + domain: string; + itemType: string; + visibility: StatsVisibility; + criteria?: StatsActorStatsSearchCriteria[]; + limit?: number; + offset?: number; + statKeys?: string[]; +}; diff --git a/web/src/__generated__/schemas/StatsSearchExtendedResponse.ts b/web/src/__generated__/schemas/StatsSearchExtendedResponse.ts new file mode 100644 index 0000000000..f07b897f7f --- /dev/null +++ b/web/src/__generated__/schemas/StatsSearchExtendedResponse.ts @@ -0,0 +1,13 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { GetStatsResponse } from './GetStatsResponse'; + +export type StatsSearchExtendedResponse = { + limit: number; + offset: number; + results: GetStatsResponse[]; + total: bigint | string; +}; diff --git a/web/src/__generated__/schemas/StatsSearchRequest.ts b/web/src/__generated__/schemas/StatsSearchRequest.ts deleted file mode 100644 index afbb44dbe5..0000000000 --- a/web/src/__generated__/schemas/StatsSearchRequest.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. - * All manual edits will be lost when this file is regenerated. - */ - -import type { StatsSearchCriteria } from './StatsSearchCriteria'; - -export type StatsSearchRequest = { - access: string; - criteria: StatsSearchCriteria[]; - domain: string; - objectType: string; -}; diff --git a/web/src/__generated__/schemas/StatsTarget.ts b/web/src/__generated__/schemas/StatsTarget.ts new file mode 100644 index 0000000000..d2c96f1ebf --- /dev/null +++ b/web/src/__generated__/schemas/StatsTarget.ts @@ -0,0 +1,13 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { StatsVisibility } from './enums/StatsVisibility'; + +export type StatsTarget = { + domain: string; + id: string; + itemType: string; + visibility: StatsVisibility; +}; diff --git a/web/src/__generated__/schemas/StatsUnsubscribeRequest.ts b/web/src/__generated__/schemas/StatsUnsubscribeRequest.ts index 9d1d5c8bf4..c320a1bd97 100644 --- a/web/src/__generated__/schemas/StatsUnsubscribeRequest.ts +++ b/web/src/__generated__/schemas/StatsUnsubscribeRequest.ts @@ -5,5 +5,5 @@ export type StatsUnsubscribeRequest = { service: string; - subscriptions?: string[]; + subscriptions?: string[] | null; }; diff --git a/web/src/__generated__/schemas/StatsValue.ts b/web/src/__generated__/schemas/StatsValue.ts new file mode 100644 index 0000000000..86a4c04c11 --- /dev/null +++ b/web/src/__generated__/schemas/StatsValue.ts @@ -0,0 +1,7 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type StatsValue = { +}; diff --git a/web/src/__generated__/schemas/StripeSubscriptionResponse.ts b/web/src/__generated__/schemas/StripeSubscriptionResponse.ts new file mode 100644 index 0000000000..2d5889e213 --- /dev/null +++ b/web/src/__generated__/schemas/StripeSubscriptionResponse.ts @@ -0,0 +1,9 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type StripeSubscriptionResponse = { + status: string; + tier: string; +}; diff --git a/web/src/__generated__/schemas/TagList.ts b/web/src/__generated__/schemas/TagList.ts new file mode 100644 index 0000000000..028fb173f8 --- /dev/null +++ b/web/src/__generated__/schemas/TagList.ts @@ -0,0 +1,10 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { Tag } from './Tag'; + +export type TagList = { + tags?: Tag[] | null; +}; diff --git a/web/src/__generated__/schemas/Ticket.ts b/web/src/__generated__/schemas/Ticket.ts index 92ea0efce1..02450e3943 100644 --- a/web/src/__generated__/schemas/Ticket.ts +++ b/web/src/__generated__/schemas/Ticket.ts @@ -3,7 +3,7 @@ * All manual edits will be lost when this file is regenerated. */ -import type { Tag } from './Tag'; +import type { TagList } from './TagList'; export type Ticket = { created?: Date | null; @@ -17,7 +17,7 @@ export type Ticket = { priority?: number; status?: string | null; stringProperties?: Record | null; - tags?: Tag[] | null; + tags?: Record | null; team?: string | null; ticketId?: string | null; watchOnlineStatus?: boolean; diff --git a/web/src/__generated__/schemas/TicketReservationRequest.ts b/web/src/__generated__/schemas/TicketReservationRequest.ts index 199137938c..8c578ceed1 100644 --- a/web/src/__generated__/schemas/TicketReservationRequest.ts +++ b/web/src/__generated__/schemas/TicketReservationRequest.ts @@ -3,13 +3,13 @@ * All manual edits will be lost when this file is regenerated. */ -import type { Tag } from './Tag'; +import type { TagList } from './TagList'; export type TicketReservationRequest = { matchTypes?: string[] | null; maxWaitDurationSecs?: number; players?: string[] | null; - tags?: Tag[] | null; + tags?: Record | null; team?: string | null; watchOnlineStatus?: boolean; }; diff --git a/web/src/__generated__/schemas/TimeRange.ts b/web/src/__generated__/schemas/TimeRange.ts new file mode 100644 index 0000000000..33c84cc6d5 --- /dev/null +++ b/web/src/__generated__/schemas/TimeRange.ts @@ -0,0 +1,9 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type TimeRange = { + from?: bigint | string; + to?: bigint | string; +}; diff --git a/web/src/__generated__/schemas/TokenRequestWrapper.ts b/web/src/__generated__/schemas/TokenRequestWrapper.ts index 3eae4e6677..71e738a0f6 100644 --- a/web/src/__generated__/schemas/TokenRequestWrapper.ts +++ b/web/src/__generated__/schemas/TokenRequestWrapper.ts @@ -3,15 +3,15 @@ * All manual edits will be lost when this file is regenerated. */ -import type { AuthBasicContextInfo } from './AuthBasicContextInfo'; import type { ChallengeSolution } from './ChallengeSolution'; +import type { ContextInfo } from './ContextInfo'; export type TokenRequestWrapper = { grant_type: string; challenge_solution?: ChallengeSolution; client_id?: string; code?: string; - context?: AuthBasicContextInfo; + context?: ContextInfo; customerScoped?: boolean; device_id?: string; external_token?: string; diff --git a/web/src/__generated__/schemas/UpdateLobby.ts b/web/src/__generated__/schemas/UpdateLobby.ts index 0adcd52053..99732a661a 100644 --- a/web/src/__generated__/schemas/UpdateLobby.ts +++ b/web/src/__generated__/schemas/UpdateLobby.ts @@ -9,6 +9,7 @@ import type { LobbyRestriction } from './enums/LobbyRestriction'; export type UpdateLobby = { data?: UpdateData; description?: string | null; + hasRestriction?: boolean; matchType?: string | null; maxPlayers?: number | null; name?: string | null; diff --git a/web/src/__generated__/schemas/UpdatePartyTags.ts b/web/src/__generated__/schemas/UpdatePartyTags.ts new file mode 100644 index 0000000000..94d8ec8fab --- /dev/null +++ b/web/src/__generated__/schemas/UpdatePartyTags.ts @@ -0,0 +1,11 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +import type { Tag } from './Tag'; + +export type UpdatePartyTags = { + memberTags?: Tag[] | null; + playerId?: string | null; +}; diff --git a/web/src/__generated__/schemas/UpdateRealmRequest.ts b/web/src/__generated__/schemas/UpdateRealmRequest.ts new file mode 100644 index 0000000000..2e331dba3e --- /dev/null +++ b/web/src/__generated__/schemas/UpdateRealmRequest.ts @@ -0,0 +1,9 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type UpdateRealmRequest = { + archiveStatus?: boolean | null; + hiddenStatus?: boolean | null; +}; diff --git a/web/src/__generated__/schemas/enums/ActivationStatus.ts b/web/src/__generated__/schemas/enums/ActivationStatus.ts new file mode 100644 index 0000000000..6f43b52d83 --- /dev/null +++ b/web/src/__generated__/schemas/enums/ActivationStatus.ts @@ -0,0 +1,9 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export enum ActivationStatus { + PENDING = "PENDING", + ACTIVATED = "ACTIVATED" +} diff --git a/web/src/__generated__/schemas/enums/BeamoV2LogLevel.ts b/web/src/__generated__/schemas/enums/BeamoV2LogLevel.ts new file mode 100644 index 0000000000..44660fd020 --- /dev/null +++ b/web/src/__generated__/schemas/enums/BeamoV2LogLevel.ts @@ -0,0 +1,14 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export enum BeamoV2LogLevel { + Trace = "Trace", + Debug = "Debug", + Information = "Information", + Warning = "Warning", + Error = "Error", + Critical = "Critical", + None = "None" +} diff --git a/web/src/__generated__/schemas/enums/BeamoV2LogProvider.ts b/web/src/__generated__/schemas/enums/BeamoV2LogProvider.ts new file mode 100644 index 0000000000..35f83b7e7b --- /dev/null +++ b/web/src/__generated__/schemas/enums/BeamoV2LogProvider.ts @@ -0,0 +1,9 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export enum BeamoV2LogProvider { + Cloudwatch = "Cloudwatch", + Clickhouse = "Clickhouse" +} diff --git a/web/src/__generated__/schemas/enums/BeamoV2PathRuleOperationType.ts b/web/src/__generated__/schemas/enums/BeamoV2PathRuleOperationType.ts new file mode 100644 index 0000000000..03e7257af1 --- /dev/null +++ b/web/src/__generated__/schemas/enums/BeamoV2PathRuleOperationType.ts @@ -0,0 +1,11 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export enum BeamoV2PathRuleOperationType { + Include = "Include", + Contain = "Contain", + StartsWith = "StartsWith", + EndsWith = "EndsWith" +} diff --git a/web/src/__generated__/schemas/enums/BeamoV2PlayerRuleOperationType.ts b/web/src/__generated__/schemas/enums/BeamoV2PlayerRuleOperationType.ts new file mode 100644 index 0000000000..0f0848596d --- /dev/null +++ b/web/src/__generated__/schemas/enums/BeamoV2PlayerRuleOperationType.ts @@ -0,0 +1,10 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export enum BeamoV2PlayerRuleOperationType { + Include = "Include", + GreaterThan = "GreaterThan", + LesserThan = "LesserThan" +} diff --git a/web/src/__generated__/schemas/enums/PaymentStatus.ts b/web/src/__generated__/schemas/enums/PaymentStatus.ts new file mode 100644 index 0000000000..2c85c67b4c --- /dev/null +++ b/web/src/__generated__/schemas/enums/PaymentStatus.ts @@ -0,0 +1,10 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export enum PaymentStatus { + Free = "Free", + Paid = "Paid", + Banned = "Banned" +} diff --git a/web/src/__generated__/schemas/enums/PromotableType.ts b/web/src/__generated__/schemas/enums/PromotableType.ts new file mode 100644 index 0000000000..b1ce4b3578 --- /dev/null +++ b/web/src/__generated__/schemas/enums/PromotableType.ts @@ -0,0 +1,9 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export enum PromotableType { + Content = "Content", + Microservices = "Microservices" +} diff --git a/web/src/__generated__/schemas/enums/StatsVisibility.ts b/web/src/__generated__/schemas/enums/StatsVisibility.ts new file mode 100644 index 0000000000..28039c185e --- /dev/null +++ b/web/src/__generated__/schemas/enums/StatsVisibility.ts @@ -0,0 +1,9 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export enum StatsVisibility { + Private = "Private", + Public = "Public" +} diff --git a/web/src/__generated__/schemas/index.ts b/web/src/__generated__/schemas/index.ts index 09aebb3c79..fc3a509bf0 100644 --- a/web/src/__generated__/schemas/index.ts +++ b/web/src/__generated__/schemas/index.ts @@ -3,8 +3,13 @@ * All manual edits will be lost when this file is regenerated. */ +export * from './enums/ActivationStatus'; export * from './enums/BeamoV2FederationType'; +export * from './enums/BeamoV2LogLevel'; +export * from './enums/BeamoV2LogProvider'; export * from './enums/BeamoV2OrderDirection'; +export * from './enums/BeamoV2PathRuleOperationType'; +export * from './enums/BeamoV2PlayerRuleOperationType'; export * from './enums/ContentType'; export * from './enums/ContentVisibility'; export * from './enums/EventState'; @@ -14,7 +19,10 @@ export * from './enums/GroupType'; export * from './enums/InvitationDirection'; export * from './enums/JobState'; export * from './enums/LobbyRestriction'; +export * from './enums/PaymentStatus'; export * from './enums/PresenceStatus'; +export * from './enums/PromotableType'; +export * from './enums/StatsVisibility'; export * from './enums/WebhookInvocationType'; export * from './enums/WebhookRetryType'; export * from './enums/WebhookServiceType'; @@ -37,7 +45,6 @@ export * from './AdminGetPlayerStatusRequest'; export * from './AdminGetPlayerStatusResponse'; export * from './AdminPlayerStatus'; export * from './AliasAvailableRequest'; -export * from './AliasAvailableResponse'; export * from './AnnouncementAttachment'; export * from './AnnouncementContent'; export * from './AnnouncementContentResponse'; @@ -49,6 +56,7 @@ export * from './AnnouncementRequest'; export * from './AnnouncementState'; export * from './AnnouncementView'; export * from './ApiBeamoOtelViewsDeleteBeamoOtelResponse'; +export * from './ApiCustomersActivatePutCustomerResponse'; export * from './ApiLobbiesServerPostLobbyResponse'; export * from './ApiMailboxPublishPostMailboxResponse'; export * from './ApiMatchmakingTicketsDeleteTicketResponse'; @@ -63,6 +71,9 @@ export * from './ApiSchedulerJobCancelPutSchedulerResponse'; export * from './ApiSchedulerJobDeleteSchedulerResponse'; export * from './ApiSchedulerJobNextExecutionsGetSchedulerResponse'; export * from './ApiSchedulerJobsGetSchedulerResponse'; +export * from './ApiSessionsHeartbeatPostSessionResponse'; +export * from './ApiSessionsPostSessionResponse'; +export * from './ApiSessionsStatusGetSessionResponse'; export * from './ArchiveOrUnarchiveManifestsRequest'; export * from './ArchiveProjectRequest'; export * from './AttachExternalIdentityApiRequest'; @@ -70,16 +81,43 @@ export * from './AttachExternalIdentityApiResponse'; export * from './Attachment'; export * from './AttachmentProperty'; export * from './AttachmentRequest'; -export * from './AuthActorContextInfo'; -export * from './AuthBasicContextInfo'; export * from './AuthResponse'; +export * from './AuthV2AuthCode'; +export * from './AuthV2AuthCodeRequest'; +export * from './AuthV2AuthorizationCodeAuthRequest'; +export * from './AuthV2AuthResponse'; +export * from './AuthV2ChallengeSolution'; +export * from './AuthV2ContextInfo'; +export * from './AuthV2DeviceIdAuthRequest'; +export * from './AuthV2EmptyMessage'; +export * from './AuthV2ExternalAuthRequest'; +export * from './AuthV2ExternalAuthResponse'; +export * from './AuthV2GuestAuthRequest'; +export * from './AuthV2JsonWebKey'; +export * from './AuthV2JsonWebKeySet'; +export * from './AuthV2LegacyAccessToken'; +export * from './AuthV2ListTokensResponse'; +export * from './AuthV2OpenIdConfigResponse'; +export * from './AuthV2PasswordAuthRequest'; +export * from './AuthV2ProtoError'; +export * from './AuthV2RefreshToken'; +export * from './AuthV2RefreshTokenAuthRequest'; +export * from './AuthV2RefreshTokenResponse'; +export * from './AuthV2RevokeRefreshTokensRequest'; +export * from './AuthV2ServerTokenAuthRequest'; +export * from './AuthV2ServerTokenResponse'; export * from './AvailabilityRequest'; export * from './AvailabilityResponse'; export * from './AvailableRolesResponse'; export * from './BatchDeleteInFlightRequest'; +export * from './BatchGetItem'; +export * from './BatchGetRequest'; +export * from './BatchGetStatsResponse'; export * from './BatchReadStatsRequest'; export * from './BatchReadStatsResponse'; export * from './BatchSetStatsRequest'; +export * from './BatchWriteItem'; +export * from './BatchWriteRequest'; export * from './BeamoBasicGetManifestRequest'; export * from './BeamoBasicGetManifestsResponse'; export * from './BeamoBasicManifestChecksum'; @@ -89,24 +127,30 @@ export * from './BeamoBasicURLResponse'; export * from './BeamoLimits'; export * from './BeamoV2ApiBeamoServicesLogsQueryDeleteBeamoResponse'; export * from './BeamoV2ConnectionStringResponse'; +export * from './BeamoV2ContextRuleFilter'; export * from './BeamoV2DatabaseMeasurement'; export * from './BeamoV2DatabaseMeasurements'; export * from './BeamoV2DataPoint'; export * from './BeamoV2DeleteRegistrationRequest'; export * from './BeamoV2EmptyMessage'; +export * from './BeamoV2ExtensionContentReference'; export * from './BeamoV2FederationRegistration'; export * from './BeamoV2FederationRegistrationResponse'; +export * from './BeamoV2GetAllServiceLoggingContexts'; export * from './BeamoV2GetManifestsResponse'; export * from './BeamoV2GetMetricsRequest'; export * from './BeamoV2GetServiceSecretResponse'; export * from './BeamoV2GetStatusResponse'; export * from './BeamoV2GetTemplatesResponse'; export * from './BeamoV2Link'; +export * from './BeamoV2LogContextRule'; +export * from './BeamoV2LogContextRuleAuthor'; export * from './BeamoV2Manifest'; export * from './BeamoV2ManifestChecksum'; export * from './BeamoV2PANamespace'; export * from './BeamoV2PASlowQuery'; export * from './BeamoV2PASuggestedIndex'; +export * from './BeamoV2PortalExtensionReference'; export * from './BeamoV2PostManifestRequest'; export * from './BeamoV2ProblemDetails'; export * from './BeamoV2PromoteBeamoManifestRequest'; @@ -114,6 +158,7 @@ export * from './BeamoV2ProtoError'; export * from './BeamoV2QueryResponse'; export * from './BeamoV2ServiceComponent'; export * from './BeamoV2ServiceDependencyReference'; +export * from './BeamoV2ServiceLoggingContext'; export * from './BeamoV2ServiceReference'; export * from './BeamoV2ServiceRegistration'; export * from './BeamoV2ServiceRegistrationQuery'; @@ -131,6 +176,7 @@ export * from './BeamoV2SupportedFederation'; export * from './BeamoV2UriResponse'; export * from './BeginPurchaseRequest'; export * from './BeginPurchaseResponse'; +export * from './BinaryContentReference'; export * from './BinaryDefinition'; export * from './BinaryReference'; export * from './BulkSendMailRequest'; @@ -174,6 +220,8 @@ export * from './ContentLimits'; export * from './ContentMeta'; export * from './ContentOrText'; export * from './ContentReference'; +export * from './ContentTagFilter'; +export * from './ContextInfo'; export * from './CooldownModifierRequest'; export * from './CreateAccountWithCredsApiResponse'; export * from './CreateAccountWithCredsRequest'; @@ -185,6 +233,7 @@ export * from './CreateLobby'; export * from './CreateParty'; export * from './CreatePlanRequest'; export * from './CreateProjectRequest'; +export * from './CreateRealmRequest'; export * from './CreateTrialRestRequest'; export * from './CronTrigger'; export * from './Currency'; @@ -192,14 +241,30 @@ export * from './CurrencyArchetype'; export * from './CurrencyChange'; export * from './CurrencyChangeReward'; export * from './CurrencyContentResponse'; +export * from './CurrencyDelta'; export * from './CurrencyPreview'; export * from './CurrencyProperty'; export * from './CurrencyView'; export * from './CustomCohortRule'; -export * from './Customer'; +export * from './CustomerActorAccount'; +export * from './CustomerActorAliasAvailableResponse'; +export * from './CustomerActorCustomer'; +export * from './CustomerActorCustomersResponse'; +export * from './CustomerActorCustomerView'; +export * from './CustomerActorExternalIdentity'; +export * from './CustomerActorNewCustomerRequest'; +export * from './CustomerActorNewCustomerResponse'; +export * from './CustomerActorNewGameRequest'; +export * from './CustomerActorPromoteRealmRequest'; +export * from './CustomerActorPromoteRealmResponse'; +export * from './CustomerActorPromotionScope'; +export * from './CustomerActorRealmConfigResponse'; +export * from './CustomerActorRealmConfigSaveRequest'; +export * from './CustomerActorRealmConfiguration'; +export * from './CustomerActorThirdPartyAssociation'; +export * from './CustomerActorUpdateGameHierarchyRequest'; +export * from './CustomerActorWebSocketConfiguration'; export * from './CustomerResponse'; -export * from './CustomersResponse'; -export * from './CustomerView'; export * from './CustomerViewResponse'; export * from './DatabaseMeasurement'; export * from './DatabaseMeasurements'; @@ -221,6 +286,7 @@ export * from './DonationEntry'; export * from './DonationRequest'; export * from './EmailUpdateConfirmation'; export * from './EmailUpdateRequest'; +export * from './EmptyMessage'; export * from './EmptyResponse'; export * from './EmptyRsp'; export * from './EndTransactionRequest'; @@ -256,6 +322,7 @@ export * from './EventScoreRequest'; export * from './EventsInDateRangeResponse'; export * from './EventsWithinDateRangeRequest'; export * from './ExactTrigger'; +export * from './ExecuteJobRequest'; export * from './ExternalIdentity'; export * from './ExternalIdentityAvailableApiRequest'; export * from './FacebookPaymentUpdateRequest'; @@ -273,6 +340,8 @@ export * from './GatewayLimits'; export * from './GetActiveListingRequest'; export * from './GetActiveOffersResponse'; export * from './GetAdminsResponse'; +export * from './GetBinaryDownloadUrlsRequest'; +export * from './GetBinaryDownloadUrlsResponse'; export * from './GetCatalogReq'; export * from './GetCatalogResponse'; export * from './GetChampionsRequest'; @@ -284,6 +353,7 @@ export * from './GetElasticContainerRegistryURI'; export * from './GetExactManifestRequest'; export * from './GetGameRequest'; export * from './GetGameResponse'; +export * from './GetGamesResponse'; export * from './GetGroupsRequest'; export * from './GetGroupsResponse'; export * from './GetGroupStatusRequest'; @@ -322,6 +392,7 @@ export * from './GetSocialStatusesRequest'; export * from './GetSocialStatusesResponse'; export * from './GetStandingsRequest'; export * from './GetStandingsResponse'; +export * from './GetStatsResponse'; export * from './GetStatusForGroupsRequest'; export * from './GetStatusForGroupsResponse'; export * from './GetStatusResponse'; @@ -348,16 +419,18 @@ export * from './GroupStatus'; export * from './GroupUpdate'; export * from './GroupUser'; export * from './GroupUserMember'; -export * from './GuestAuthRequest'; export * from './HtmlResponse'; export * from './HttpCall'; export * from './ImportFriendsRequest'; export * from './InFlightFailure'; export * from './InFlightFailureResponse'; export * from './InFlightMessage'; +export * from './InventoryFiltersDTO'; export * from './InventoryGetRequest'; export * from './InventoryQueryRequest'; +export * from './InventoryUpdateDelta'; export * from './InventoryUpdateRequest'; +export * from './InventoryUpdateResponse'; export * from './InventoryView'; export * from './Invite'; export * from './InviteToParty'; @@ -367,7 +440,9 @@ export * from './ItemArchetype'; export * from './ItemContentResponse'; export * from './ItemCreateRequest'; export * from './ItemDeleteRequest'; +export * from './ItemDeltas'; export * from './ItemGroup'; +export * from './ItemPropertiesDelta'; export * from './ItemProperty'; export * from './ItemUpdateRequest'; export * from './JobActivity'; @@ -378,7 +453,6 @@ export * from './JobDefinition'; export * from './JobDefinitionSaveRequest'; export * from './JobDefinitionView'; export * from './JobDefinitionViewCursorPagedResult'; -export * from './JobExecutionEvent'; export * from './JobExecutionResult'; export * from './JobRetryPolicy'; export * from './JoinLobby'; @@ -465,9 +539,6 @@ export * from './MicroserviceSecretResponse'; export * from './MultipliersGetResponse'; export * from './MyMailUpdate'; export * from './NetworkSerializable'; -export * from './NewCustomerRequest'; -export * from './NewCustomerResponse'; -export * from './NewGameRequest'; export * from './NewItemReward'; export * from './NotificationRequest'; export * from './NotificationRequestData'; @@ -493,8 +564,8 @@ export * from './PANamespace'; export * from './Party'; export * from './PartyInvitation'; export * from './PartyInvitesForPlayerResponse'; +export * from './PartyMemberTags'; export * from './PASlowQuery'; -export * from './PasswordAuthRequest'; export * from './PasswordUpdateConfirmation'; export * from './PasswordUpdateRequest'; export * from './PASuggestedIndex'; @@ -503,7 +574,6 @@ export * from './PaymentAuditEntryViewModel'; export * from './PaymentDetailsEntryViewModel'; export * from './PaymentHistoryEntryViewModel'; export * from './PaymentResultResponse'; -export * from './PaymentTotal'; export * from './PerformanceResponse'; export * from './Period'; export * from './PingRsp'; @@ -514,13 +584,19 @@ export * from './PlayerListingView'; export * from './PlayerOfferView'; export * from './PlayerOnlineStatusResponse'; export * from './PlayerReward'; +export * from './PlayerSessionActorPaymentTotal'; +export * from './PlayerSessionActorSessionClientHistoryResponse'; +export * from './PlayerSessionActorSessionHistoryResponse'; export * from './PlayersStatusResponse'; export * from './PlayerStatRequirement'; +export * from './PlayerStatsActorCommonResponse'; export * from './PlayerStatus'; export * from './PlayerStatusUpdate'; export * from './PlayerStoreView'; +export * from './PortalSessionResponse'; export * from './PostManifestRequest'; export * from './PostManifestResponse'; +export * from './PredicateDTO'; export * from './PreSignedUrlsResponse'; export * from './PreviewVipBonusResponse'; export * from './Price'; @@ -530,11 +606,10 @@ export * from './Project'; export * from './ProjectView'; export * from './Promotable'; export * from './PromoteNewLeader'; -export * from './PromoteRealmRequest'; -export * from './PromoteRealmResponse'; export * from './PromoteRealmResponseOld'; export * from './Promotion'; -export * from './PromotionScope'; +export * from './PropertyDelta'; +export * from './PropertyFilterDTO'; export * from './PublishMessage'; export * from './PullAllManifestsRequest'; export * from './PullBeamoManifestRequest'; @@ -544,22 +619,37 @@ export * from './PutLocalizationsRequest'; export * from './Query'; export * from './RankEntry'; export * from './RankEntryStat'; +export * from './Realm'; +export * from './RealmAssociation'; export * from './RealmConfigChangeRequest'; -export * from './RealmConfigResponse'; -export * from './RealmConfigSaveRequest'; -export * from './RealmConfiguration'; export * from './RealmPromotion'; export * from './RealmRolesReport'; export * from './RealmsBasicAccount'; +export * from './RealmsBasicAliasAvailableResponse'; +export * from './RealmsBasicCustomer'; +export * from './RealmsBasicCustomersResponse'; +export * from './RealmsBasicCustomerView'; +export * from './RealmsBasicNewCustomerRequest'; +export * from './RealmsBasicNewCustomerResponse'; +export * from './RealmsBasicNewGameRequest'; +export * from './RealmsBasicPromoteRealmRequest'; +export * from './RealmsBasicPromoteRealmResponse'; +export * from './RealmsBasicPromotionScope'; +export * from './RealmsBasicRealmConfigResponse'; +export * from './RealmsBasicRealmConfigSaveRequest'; +export * from './RealmsBasicRealmConfiguration'; +export * from './RealmsBasicUpdateGameHierarchyRequest'; +export * from './RealmsBasicWebSocketConfiguration'; +export * from './RealmView'; export * from './RedisShard'; export * from './RedisShardRequest'; export * from './ReferenceSuperset'; -export * from './RefreshTokenAuthRequest'; export * from './RegisterReq'; export * from './RemoveFromLobby'; export * from './RemoveLaunchMessageRequest'; export * from './RemoveTags'; export * from './RenameProjectRequest'; +export * from './RenameRealmRequest'; export * from './RepeatManifestRequest'; export * from './ReplaceObjectsRequest'; export * from './ReportPurchaseRequest'; @@ -568,6 +658,7 @@ export * from './RevokeTokenRequest'; export * from './RewardCalendarDay'; export * from './RewardsRequest'; export * from './RewardsResponse'; +export * from './RoleAssociation'; export * from './RoleChangeRequest'; export * from './RoleMapping'; export * from './RouteParameter'; @@ -601,8 +692,6 @@ export * from './SendMsg'; export * from './SendNotification'; export * from './SendReq'; export * from './ServerEvent'; -export * from './ServerTokenAuthRequest'; -export * from './ServerTokenResponse'; export * from './ServiceCall'; export * from './ServiceComponent'; export * from './ServiceDependencyReference'; @@ -616,31 +705,43 @@ export * from './ServiceStatus'; export * from './ServiceStorageReference'; export * from './ServiceStorageStatus'; export * from './ServiceTemplate'; +export * from './SessionActorStartSessionRequest'; +export * from './SessionBasicPaymentTotal'; +export * from './SessionBasicSessionClientHistoryResponse'; +export * from './SessionBasicSessionHistoryResponse'; +export * from './SessionBasicStartSessionRequest'; export * from './SessionClientHistoryRequest'; -export * from './SessionClientHistoryResponse'; export * from './SessionHeartbeat'; export * from './SessionHistoryRequest'; -export * from './SessionHistoryResponse'; export * from './SessionLanguageContext'; +export * from './SessionLanguageContextDto'; export * from './SessionUser'; export * from './SetContentRequest'; export * from './SetLobbyResponse'; export * from './SetPresenceStatusRequest'; +export * from './SetStatsRequest'; export * from './SKU'; export * from './SKUDefinitions'; export * from './Social'; -export * from './StartSessionRequest'; export * from './StartSessionResponse'; export * from './StartTrialRequest'; export * from './StatRequest'; +export * from './StatsActorCommonResponse'; +export * from './StatsActorStatsSearchCriteria'; +export * from './StatsActorStatsSearchRequest'; +export * from './StatsActorStatsSearchResponse'; +export * from './StatsBasicStatsSearchCriteria'; +export * from './StatsBasicStatsSearchRequest'; +export * from './StatsBasicStatsSearchResponse'; export * from './StatsResponse'; -export * from './StatsSearchCriteria'; -export * from './StatsSearchRequest'; -export * from './StatsSearchResponse'; +export * from './StatsSearchExtendedRequest'; +export * from './StatsSearchExtendedResponse'; export * from './StatsSubscribeRequest'; +export * from './StatsTarget'; export * from './StatStringListEntry'; export * from './StatSubscriptionNotification'; export * from './StatsUnsubscribeRequest'; +export * from './StatsValue'; export * from './StatUpdateRequest'; export * from './StatUpdateRequestStringListFormat'; export * from './SteamAuthRequest'; @@ -648,6 +749,7 @@ export * from './SteamOrderInfoItem'; export * from './SteamOrderInfoResponse'; export * from './Store'; export * from './StringStringKeyValuePair'; +export * from './StripeSubscriptionResponse'; export * from './SubscriberDetailsResponse'; export * from './SubscriptionVerificationRequest'; export * from './SubscriptionVerificationResponse'; @@ -655,6 +757,7 @@ export * from './SupportedFederation'; export * from './SupportedFederationRegistration'; export * from './SupportedFederationsResponse'; export * from './Tag'; +export * from './TagList'; export * from './Team'; export * from './TeamContentProto'; export * from './TextDefinition'; @@ -665,6 +768,7 @@ export * from './Ticket'; export * from './TicketQueryResponse'; export * from './TicketReservationRequest'; export * from './TicketReservationResponse'; +export * from './TimeRange'; export * from './Token'; export * from './TokenRequestWrapper'; export * from './TokenResponse'; @@ -682,13 +786,14 @@ export * from './TrialCustomRule'; export * from './TrialSuccessResponse'; export * from './UnarchiveProjectRequest'; export * from './UpdateData'; -export * from './UpdateGameHierarchyRequest'; export * from './UpdateListingCooldownRequest'; export * from './UpdateLobby'; export * from './UpdateMailRequest'; export * from './UpdateOtelViewRequest'; export * from './UpdateParty'; +export * from './UpdatePartyTags'; export * from './UpdatePlayerStatusRequest'; +export * from './UpdateRealmRequest'; export * from './UpdateRole'; export * from './UploadRequest'; export * from './UploadRequestFromPortal'; @@ -703,4 +808,3 @@ export * from './VipBonus'; export * from './WebhookComet'; export * from './WebhookInvocationStrategy'; export * from './WebhookReward'; -export * from './WebSocketConfiguration'; diff --git a/web/src/network/http/BaseRequester.ts b/web/src/network/http/BaseRequester.ts index 56045db377..644c2db6f7 100644 --- a/web/src/network/http/BaseRequester.ts +++ b/web/src/network/http/BaseRequester.ts @@ -57,7 +57,7 @@ export class BaseRequester implements HttpRequester { const contentType = response.headers.get('content-type'); const text = await response.text(); const responseBody = contentType?.includes('application/json') - ? JSON.parse(text, BeamJsonUtils.reviver) // deserialize with custom reviver + ? BeamJsonUtils.parse(text) : text; const responseHeaders: Record = {}; diff --git a/web/src/network/http/BeamRequester.ts b/web/src/network/http/BeamRequester.ts index d122ff6625..0ce5b93330 100644 --- a/web/src/network/http/BeamRequester.ts +++ b/web/src/network/http/BeamRequester.ts @@ -134,7 +134,7 @@ export class BeamRequester implements HttpRequester { if (typeof response.body === 'string') { try { - newBody = JSON.parse(response.body, BeamJsonUtils.reviver); + newBody = BeamJsonUtils.parse(response.body); } catch { // leave response body as-is if invalid JSON } diff --git a/web/src/network/websocket/BeamWebSocket.ts b/web/src/network/websocket/BeamWebSocket.ts index 583d9ffbd9..7a55e08c03 100644 --- a/web/src/network/websocket/BeamWebSocket.ts +++ b/web/src/network/websocket/BeamWebSocket.ts @@ -9,6 +9,7 @@ import { realmsGetClientDefaultsBasic, } from '@/__generated__/apis'; import { HttpRequester } from '@/network/http/types/HttpRequester'; +import { getUserDeviceAndPlatform } from '@/utils/getUserDeviceAndPlatform'; interface BeamWebSocketConnectParams { requester: HttpRequester; @@ -68,9 +69,24 @@ export class BeamWebSocket { private handleOpen() { this.reconnectAttempts = 0; + // The server's `&send-session-start=true` query param tells the gateway to + // expect a `session-start` frame as the very first message on this socket. + // Browsers can't set request headers on the WebSocket upgrade, so we send + // the device info as a frame instead. If the frame is missing or malformed, + // the server will close the connection. + this.sendSessionStartFrame(); this.connectPromiseWithResolvers?.resolve(); } + private sendSessionStartFrame(): void { + if (!this.socket) return; + try { + this.socket.send(JSON.stringify(buildSessionStartFrame())); + } catch (e) { + console.warn('Failed to send session-start frame:', e); + } + } + private handleError(e: Event) { if ( this.socket?.readyState === WebSocket.OPEN || @@ -205,3 +221,39 @@ export class BeamWebSocket { this.disconnect(); } } + +interface SessionStartFrame { + type: 'session-start'; + device: { + platform: string; + model: string; + locale?: string; + language?: { code: string; context: string }; + }; +} + +/** + * Build the `session-start` frame payload sent as the first WebSocket message. + * The shape mirrors the server-side `SessionDeviceInfo` record (camelCase + * JSON via `JsonSerializerDefaults.Web`). + */ +function buildSessionStartFrame(): SessionStartFrame { + const { deviceType, platform } = getUserDeviceAndPlatform(); + const browserLocale = + typeof navigator !== 'undefined' ? navigator.language : undefined; + + const frame: SessionStartFrame = { + type: 'session-start', + device: { + platform, + model: deviceType, + }, + }; + + if (browserLocale) { + frame.device.locale = browserLocale.toLowerCase(); + frame.device.language = { code: browserLocale, context: 'IETF' }; + } + + return frame; +} diff --git a/web/src/utils/BeamJsonUtils.ts b/web/src/utils/BeamJsonUtils.ts index 239e629df5..a300ee9148 100644 --- a/web/src/utils/BeamJsonUtils.ts +++ b/web/src/utils/BeamJsonUtils.ts @@ -3,8 +3,14 @@ export class BeamJsonUtils { private static readonly ISO_DATE_REGEX = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/; - // Regex to match a purely numeric string (e.g., "1234567890123") - private static readonly NUMBER_STRING_REGEX = /^\d+$/; + // Regex to match a purely numeric string, optionally negative (e.g., "1234567890123", "-1234567890123") + private static readonly NUMBER_STRING_REGEX = /^-?\d+$/; + + // Matches JSON integer values longer than 10 digits that would lose precision + // as JavaScript Numbers. Quotes them so they arrive at the reviver as strings. + // Uses negative lookbehind/lookahead to avoid matching inside quoted strings. + private static readonly UNSAFE_INT_REGEX = + /(?<=[:,\[{]\s*)-?\d{11,}(?=\s*[,\]\}])/g; /** * Replacer function for JSON.stringify that: @@ -20,13 +26,31 @@ export class BeamJsonUtils { return value; } + /** + * Pre-processes raw JSON text by quoting large integers (>10 digits) + * so they are not silently rounded by JSON.parse. + */ + static quoteLargeInts(text: string): string { + return text.replace(BeamJsonUtils.UNSAFE_INT_REGEX, '"$&"'); + } + + /** + * Parses a JSON string with safe handling for large integers and dates. + * Large integers are quoted before parsing to prevent precision loss, + * then converted to BigInt by the reviver. + */ + static parse(text: string): any { + return JSON.parse(BeamJsonUtils.quoteLargeInts(text), BeamJsonUtils.reviver); + } + /** * Reviver function for JSON.parse that: * - parses ISO date strings into Date * - converts long numeric strings into BigInt * * Usage: - * `JSON.parse(jsonString, BeamJsonUtils.reviver)` + * `BeamJsonUtils.parse(jsonString)` (preferred — handles precision safely) + * `JSON.parse(jsonString, BeamJsonUtils.reviver)` (only if text is pre-processed) */ static reviver(_key: string, value: any): any { if (typeof value === 'string') { @@ -36,15 +60,6 @@ export class BeamJsonUtils { return BigInt(value); } - if (typeof value === 'number') { - const valueAsString = value.toString(); - if ( - BeamJsonUtils.NUMBER_STRING_REGEX.test(valueAsString) && - valueAsString.length > 10 - ) - return BigInt(value.toString()); - } - return value; } } diff --git a/web/tests/network/websocket/BeamWebSocket.test.ts b/web/tests/network/websocket/BeamWebSocket.test.ts index eca11a29c2..3b172e2850 100644 --- a/web/tests/network/websocket/BeamWebSocket.test.ts +++ b/web/tests/network/websocket/BeamWebSocket.test.ts @@ -140,6 +140,26 @@ describe('BeamWebSocket', () => { ); }); + it('sends a session-start frame as the first message after open', async () => { + const sendSpy = vi.spyOn(MockWebSocket.prototype, 'send'); + const ws = new BeamWebSocket(); + + const connectPromise = ws.connect({ + requester: fakeRequester, + cid: 'cid-1', + pid: 'pid-2', + refreshToken: 'refresh-123', + }); + await vi.runAllTimersAsync(); + await expect(connectPromise).resolves.toBeUndefined(); + + expect(sendSpy).toHaveBeenCalledTimes(1); + const payload = JSON.parse(sendSpy.mock.calls[0][0] as string); + expect(payload.type).toBe('session-start'); + expect(typeof payload.device.platform).toBe('string'); + expect(typeof payload.device.model).toBe('string'); + }); + it('reconnects when the socket closes unexpectedly', async () => { const ws = new BeamWebSocket(); diff --git a/web/tests/utils/BeamJsonUtils.test.ts b/web/tests/utils/BeamJsonUtils.test.ts index 718d1af888..b0849e8a7f 100644 --- a/web/tests/utils/BeamJsonUtils.test.ts +++ b/web/tests/utils/BeamJsonUtils.test.ts @@ -12,7 +12,7 @@ describe('beamReplacer', () => { const date = new Date('2023-01-01T12:34:56.789Z'); const obj = { ts: date }; const json = JSON.stringify(obj, BeamJsonUtils.replacer); - expect(json).toContain(`"${date.toISOString()}"`); + expect(json).toContain(`"${date.toISOString()}`); }); it('leaves other types untouched', () => { @@ -37,41 +37,47 @@ describe('beamReplacer', () => { describe('beamReviver', () => { it('parses ISO date strings into Date', () => { const iso = '2025-01-01T12:34:56.789Z'; - const result = JSON.parse(`{"date":"${iso}"}`, BeamJsonUtils.reviver); + const result = BeamJsonUtils.parse(`{"date":"${iso}"}`); expect(result.date).toBeInstanceOf(Date); expect(result.date.toISOString()).toBe(iso); }); - it('converts long numeric (>10 digits) to BigInt', () => { - const big = 1234567890123; - const result = JSON.parse(`{"num":${big}}`, BeamJsonUtils.reviver); + it('converts long numeric (>10 digits) to BigInt without precision loss', () => { + const raw = '{"num":70820408384930816}'; + const result = BeamJsonUtils.parse(raw); expect(typeof result.num).toBe('bigint'); - expect(result.num).toBe(BigInt(big)); + expect(result.num).toBe(BigInt('70820408384930816')); + }); + + it('leaves short numbers as number', () => { + const result = BeamJsonUtils.parse('{"num":42}'); + expect(typeof result.num).toBe('number'); + expect(result.num).toBe(42); }); it('leaves short numeric strings as string', () => { const small = '1234567890'; - const result = JSON.parse(`{"num":"${small}"}`, BeamJsonUtils.reviver); + const result = BeamJsonUtils.parse(`{"num":"${small}"}`); expect(typeof result.num).toBe('string'); expect(result.num).toBe(small); }); it('leaves non-numeric strings untouched', () => { const str = 'not a date'; - const result = JSON.parse(`{"s":"${str}"}`, BeamJsonUtils.reviver); + const result = BeamJsonUtils.parse(`{"s":"${str}"}`); expect(typeof result.s).toBe('string'); expect(result.s).toBe(str); }); - it('round-trips via replacer and reviver', () => { + it('round-trips via replacer and parse', () => { const original = { - id: BigInt('9876543210987'), + id: BigInt('70820408384930816'), date: new Date('2025-02-02T02:02:02.002Z'), nested: { innerDate: new Date('2025-01-31T23:59:59.999Z') }, }; const json = JSON.stringify(original, BeamJsonUtils.replacer); - const parsed = JSON.parse(json, BeamJsonUtils.reviver); - expect(parsed.id).toBe(BigInt('9876543210987')); + const parsed = BeamJsonUtils.parse(json); + expect(parsed.id).toBe(BigInt('70820408384930816')); expect(parsed.date).toBeInstanceOf(Date); expect(parsed.date.toISOString()).toBe(original.date.toISOString()); expect(parsed.nested.innerDate).toBeInstanceOf(Date); @@ -79,4 +85,44 @@ describe('beamReviver', () => { original.nested.innerDate.toISOString(), ); }); + + it('handles large ints in arrays', () => { + const raw = '{"ids":[70820408384930816,70820408384930817]}'; + const result = BeamJsonUtils.parse(raw); + expect(result.ids[0]).toBe(BigInt('70820408384930816')); + expect(result.ids[1]).toBe(BigInt('70820408384930817')); + }); + + it('handles negative large ints', () => { + const raw = '{"val":-70820408384930816}'; + const result = BeamJsonUtils.parse(raw); + expect(result.val).toBe(BigInt('-70820408384930816')); + }); + + it('does not quote numbers inside strings', () => { + const raw = '{"msg":"id is 70820408384930816 here"}'; + const result = BeamJsonUtils.parse(raw); + expect(typeof result.msg).toBe('string'); + expect(result.msg).toBe('id is 70820408384930816 here'); + }); +}); + +describe('quoteLargeInts', () => { + it('quotes integers with more than 10 digits', () => { + const input = '{"id":70820408384930816}'; + const output = BeamJsonUtils.quoteLargeInts(input); + expect(output).toBe('{"id":"70820408384930816"}'); + }); + + it('does not quote short integers', () => { + const input = '{"id":1234567890}'; + const output = BeamJsonUtils.quoteLargeInts(input); + expect(output).toBe('{"id":1234567890}'); + }); + + it('does not quote already-quoted strings', () => { + const input = '{"id":"70820408384930816"}'; + const output = BeamJsonUtils.quoteLargeInts(input); + expect(output).toBe('{"id":"70820408384930816"}'); + }); }); diff --git a/web/tsdown.config.ts b/web/tsdown.config.ts index 854a39be79..a761a9b51e 100644 --- a/web/tsdown.config.ts +++ b/web/tsdown.config.ts @@ -1,5 +1,8 @@ import { defineConfig } from 'tsdown'; import path from 'path'; +import { fileURLToPath } from 'url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); // Map the '@' prefix to the 'src' directory so that // imports like `import { foo } from '@/utils/foo'`