diff --git a/fern/generators.yml b/fern/generators.yml index dea307945e..12f7ff6b1d 100644 --- a/fern/generators.yml +++ b/fern/generators.yml @@ -12,6 +12,7 @@ groups: - name: fernapi/fern-typescript-browser-sdk # Custom version that we generate locally version: 999.999.999 + ir-version: v53 output: location: local-file-system path: ../sdks/runtime/typescript/src @@ -36,6 +37,7 @@ groups: - name: fernapi/fern-typescript-browser-sdk # Custom version that we generate locally version: 999.999.999 + ir-version: v53 output: location: local-file-system path: ../sdks/full/typescript/src diff --git a/scripts/fern/gen_inner.sh b/scripts/fern/gen_inner.sh index 3c939c012a..5bf9e5ab67 100755 --- a/scripts/fern/gen_inner.sh +++ b/scripts/fern/gen_inner.sh @@ -31,13 +31,8 @@ fi echo "Using Fern from $FERN_REPO_PATH" FERN_NO_VERSION_REDIRECTION=true node "$FERN_REPO_PATH/packages/cli/cli/dist/dev/cli.cjs" generate --local --group $FERN_GROUP --log-level debug -# Export missing types -cat <> sdks/$FERN_GROUP/typescript/src/index.ts -export * as core from "./core"; -export * as apiResponse from "./core/fetcher/APIResponse"; -export * as fetcher from "./core/fetcher"; -export * as serialization from "./serialization"; -EOF +# Add missing deps +(cd sdks/$FERN_GROUP/typescript && nix-shell -p jq --run 'jq ".devDependencies[\"@types/node-fetch\"] = \"2.6.11\"" package.json > package.json.tmp && mv package.json.tmp package.json') # Build libraries # diff --git a/sdks/full/typescript/archive.tgz b/sdks/full/typescript/archive.tgz index dad954ecac..36b571f48e 100644 --- a/sdks/full/typescript/archive.tgz +++ b/sdks/full/typescript/archive.tgz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:88b586c4470a0f6097bf139b6ea9cc4330da3f27e7e8b715291e48c34da5edb1 -size 641236 +oid sha256:19fd938af83ce03ab70576badbb2d2617e4e13dd3803fc2cf6f86155f72a9cb4 +size 533524 diff --git a/sdks/full/typescript/package.json b/sdks/full/typescript/package.json index 7fba56335f..6399ccb231 100644 --- a/sdks/full/typescript/package.json +++ b/sdks/full/typescript/package.json @@ -1,58 +1,59 @@ { - "name": "@rivet-gg/api-full", - "version": "24.1.0", - "private": false, - "repository": "https://github.com/rivet-gg/rivet/tree/main/sdks/typescript", - "files": [ - "dist", - "types", - "core.d.ts", - "serialization.d.ts" - ], - "exports": { - ".": { - "node": "./dist/node/index.js", - "import": "./dist/browser/esm/index.js", - "require": "./dist/browser/cjs/index.js", - "default": "./dist/browser/cjs/index.js", - "types": "./types/index.d.ts" - }, - "./core": { - "node": "./dist/node/core.js", - "import": "./dist/browser/esm/core.js", - "require": "./dist/browser/cjs/core.js", - "default": "./dist/browser/cjs/core.js", - "types": "./types/core/index.d.ts" - }, - "./serialization": { - "node": "./dist/node/serialization.js", - "import": "./dist/browser/esm/serialization.js", - "require": "./dist/browser/cjs/serialization.js", - "default": "./dist/browser/cjs/serialization.js", - "types": "./types/serialization/index.d.ts" - } + "name": "@rivet-gg/api-full", + "version": "24.1.0", + "private": false, + "repository": "https://github.com/rivet-gg/rivet/tree/main/sdks/typescript", + "files": [ + "dist", + "types", + "core.d.ts", + "serialization.d.ts" + ], + "exports": { + ".": { + "node": "./dist/node/index.js", + "import": "./dist/browser/esm/index.js", + "require": "./dist/browser/cjs/index.js", + "default": "./dist/browser/cjs/index.js", + "types": "./types/index.d.ts" }, - "types": "./types/index.d.ts", - "scripts": { - "format": "prettier --write 'src/**/*.ts'", - "compile": "tsc", - "bundle": "node build.js", - "build": "yarn compile && yarn bundle", - "prepack": "yarn run build" + "./core": { + "node": "./dist/node/core.js", + "import": "./dist/browser/esm/core.js", + "require": "./dist/browser/cjs/core.js", + "default": "./dist/browser/cjs/core.js", + "types": "./types/core/index.d.ts" }, - "dependencies": { - "form-data": "^4.0.0", - "js-base64": "^3.7.5", - "node-fetch": "2", - "qs": "^6.11.2", - "url-join": "^5.0.0" - }, - "devDependencies": { - "@types/node": "17.0.33", - "@types/qs": "6.9.8", - "@types/url-join": "4.0.1", - "esbuild": "^0.19.11", - "prettier": "2.7.1", - "typescript": "4.6.4" + "./serialization": { + "node": "./dist/node/serialization.js", + "import": "./dist/browser/esm/serialization.js", + "require": "./dist/browser/cjs/serialization.js", + "default": "./dist/browser/cjs/serialization.js", + "types": "./types/serialization/index.d.ts" } + }, + "types": "./types/index.d.ts", + "scripts": { + "format": "prettier --write 'src/**/*.ts'", + "compile": "tsc", + "bundle": "node build.js", + "build": "yarn compile && yarn bundle", + "prepack": "yarn run build" + }, + "dependencies": { + "form-data": "^4.0.0", + "js-base64": "^3.7.5", + "node-fetch": "2", + "qs": "^6.11.2", + "url-join": "^5.0.0" + }, + "devDependencies": { + "@types/node": "17.0.33", + "@types/qs": "6.9.8", + "@types/url-join": "4.0.1", + "esbuild": "^0.19.11", + "prettier": "2.7.1", + "typescript": "4.6.4", + "@types/node-fetch": "2.6.11" + } } diff --git a/sdks/full/typescript/src/Client.ts b/sdks/full/typescript/src/Client.ts index 1016c6e32a..a4df62420e 100644 --- a/sdks/full/typescript/src/Client.ts +++ b/sdks/full/typescript/src/Client.ts @@ -24,8 +24,12 @@ export declare namespace RivetClient { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } diff --git a/sdks/full/typescript/src/api/resources/admin/client/Client.ts b/sdks/full/typescript/src/api/resources/admin/client/Client.ts index bf3aabfb14..e829aecb19 100644 --- a/sdks/full/typescript/src/api/resources/admin/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/admin/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../environments"; import * as core from "../../../../core"; -import * as Rivet from "../../.."; -import * as serializers from "../../../../serialization"; +import * as Rivet from "../../../index"; +import * as serializers from "../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../errors"; +import * as errors from "../../../../errors/index"; import { Clusters } from "../resources/clusters/client/Client"; export declare namespace Admin { @@ -18,8 +18,12 @@ export declare namespace Admin { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -27,12 +31,20 @@ export class Admin { constructor(protected readonly _options: Admin.Options = {}) {} /** + * @param {Rivet.admin.LoginRequest} request + * @param {Admin.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.admin.login({ + * name: "string" + * }) */ public async login( request: Rivet.admin.LoginRequest, @@ -48,12 +60,14 @@ export class Admin { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.admin.LoginRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + requestType: "json", + body: serializers.admin.LoginRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.admin.LoginResponse.parseOrThrow(_response.body, { + return serializers.admin.LoginResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -66,7 +80,7 @@ export class Admin { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -76,7 +90,7 @@ export class Admin { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -86,7 +100,7 @@ export class Admin { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -96,7 +110,7 @@ export class Admin { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -106,7 +120,7 @@ export class Admin { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -116,7 +130,7 @@ export class Admin { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -153,7 +167,7 @@ export class Admin { return (this._clusters ??= new Clusters(this._options)); } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/admin/resources/clusters/client/Client.ts b/sdks/full/typescript/src/api/resources/admin/resources/clusters/client/Client.ts index 283f65f3e3..2c67f25cf0 100644 --- a/sdks/full/typescript/src/api/resources/admin/resources/clusters/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/admin/resources/clusters/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; import { Datacenters } from "../resources/datacenters/client/Client"; import { Servers } from "../resources/servers/client/Client"; @@ -19,8 +19,12 @@ export declare namespace Clusters { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -29,12 +33,18 @@ export class Clusters { /** * Get clusters + * + * @param {Clusters.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.admin.clusters.list() */ public async list(requestOptions?: Clusters.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -47,11 +57,13 @@ export class Clusters { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.admin.clusters.ListClustersResponse.parseOrThrow(_response.body, { + return serializers.admin.clusters.ListClustersResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -64,7 +76,7 @@ export class Clusters { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -74,7 +86,7 @@ export class Clusters { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -84,7 +96,7 @@ export class Clusters { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -94,7 +106,7 @@ export class Clusters { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -104,7 +116,7 @@ export class Clusters { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -114,7 +126,7 @@ export class Clusters { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -147,12 +159,22 @@ export class Clusters { /** * Create a new cluster + * + * @param {Rivet.admin.clusters.CreateClusterRequest} request + * @param {Clusters.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.admin.clusters.create({ + * nameId: "string", + * ownerTeamId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * }) */ public async create( request: Rivet.admin.clusters.CreateClusterRequest, @@ -168,14 +190,16 @@ export class Clusters { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.admin.clusters.CreateClusterRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.admin.clusters.CreateClusterRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.admin.clusters.CreateClusterResponse.parseOrThrow(_response.body, { + return serializers.admin.clusters.CreateClusterResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -188,7 +212,7 @@ export class Clusters { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -198,7 +222,7 @@ export class Clusters { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -208,7 +232,7 @@ export class Clusters { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -218,7 +242,7 @@ export class Clusters { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -228,7 +252,7 @@ export class Clusters { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -238,7 +262,7 @@ export class Clusters { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -281,7 +305,7 @@ export class Clusters { return (this._servers ??= new Servers(this._options)); } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/admin/resources/clusters/resources/datacenters/client/Client.ts b/sdks/full/typescript/src/api/resources/admin/resources/clusters/resources/datacenters/client/Client.ts index 81d7992571..f4f7ac1e75 100644 --- a/sdks/full/typescript/src/api/resources/admin/resources/clusters/resources/datacenters/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/admin/resources/clusters/resources/datacenters/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../../../environments"; import * as core from "../../../../../../../../core"; -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../../../serialization"; -import * as errors from "../../../../../../../../errors"; +import * as serializers from "../../../../../../../../serialization/index"; +import * as errors from "../../../../../../../../errors/index"; export declare namespace Datacenters { interface Options { @@ -17,8 +17,12 @@ export declare namespace Datacenters { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -27,12 +31,19 @@ export class Datacenters { /** * Get datacenters of a cluster + * + * @param {string} clusterId + * @param {Datacenters.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.admin.clusters.datacenters.list("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async list( clusterId: string, @@ -41,18 +52,20 @@ export class Datacenters { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/admin/clusters/${clusterId}/datacenters` + `/admin/clusters/${encodeURIComponent(clusterId)}/datacenters` ), method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.admin.clusters.ListDatacentersResponse.parseOrThrow(_response.body, { + return serializers.admin.clusters.ListDatacentersResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -65,7 +78,7 @@ export class Datacenters { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -75,7 +88,7 @@ export class Datacenters { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -85,7 +98,7 @@ export class Datacenters { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -95,7 +108,7 @@ export class Datacenters { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -105,7 +118,7 @@ export class Datacenters { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -115,7 +128,7 @@ export class Datacenters { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -147,12 +160,26 @@ export class Datacenters { } /** + * @param {string} clusterId + * @param {Rivet.admin.clusters.CreateDatacenterRequest} request + * @param {Datacenters.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.admin.clusters.datacenters.create("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * displayName: "string", + * nameId: "string", + * provider: Rivet.admin.clusters.Provider.Linode, + * providerDatacenterId: "string", + * buildDeliveryMethod: Rivet.admin.clusters.BuildDeliveryMethod.TrafficServer, + * prebakesEnabled: true + * }) */ public async create( clusterId: string, @@ -162,21 +189,23 @@ export class Datacenters { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/admin/clusters/${clusterId}/datacenters` + `/admin/clusters/${encodeURIComponent(clusterId)}/datacenters` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.admin.clusters.CreateDatacenterRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.admin.clusters.CreateDatacenterRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.admin.clusters.CreateDatacenterResponse.parseOrThrow(_response.body, { + return serializers.admin.clusters.CreateDatacenterResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -189,7 +218,7 @@ export class Datacenters { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -199,7 +228,7 @@ export class Datacenters { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -209,7 +238,7 @@ export class Datacenters { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -219,7 +248,7 @@ export class Datacenters { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -229,7 +258,7 @@ export class Datacenters { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -239,7 +268,7 @@ export class Datacenters { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -271,12 +300,32 @@ export class Datacenters { } /** + * @param {string} clusterId + * @param {string} datacenterId + * @param {Rivet.admin.clusters.UpdateDatacenterRequest} request + * @param {Datacenters.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.admin.clusters.datacenters.update("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * pools: [{ + * poolType: Rivet.admin.clusters.PoolType.Job, + * hardware: [{ + * providerHardware: "string" + * }], + * desiredCount: 1, + * minCount: 1, + * maxCount: 1, + * drainTimeout: 1000000 + * }], + * prebakesEnabled: true + * }) */ public async update( clusterId: string, @@ -287,18 +336,20 @@ export class Datacenters { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/admin/clusters/${clusterId}/datacenters/${datacenterId}` + `/admin/clusters/${encodeURIComponent(clusterId)}/datacenters/${encodeURIComponent(datacenterId)}` ), method: "PATCH", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.admin.clusters.UpdateDatacenterRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.admin.clusters.UpdateDatacenterRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -308,7 +359,7 @@ export class Datacenters { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -318,7 +369,7 @@ export class Datacenters { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -328,7 +379,7 @@ export class Datacenters { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -338,7 +389,7 @@ export class Datacenters { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -348,7 +399,7 @@ export class Datacenters { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -358,7 +409,7 @@ export class Datacenters { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -389,7 +440,7 @@ export class Datacenters { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/admin/resources/clusters/resources/servers/client/Client.ts b/sdks/full/typescript/src/api/resources/admin/resources/clusters/resources/servers/client/Client.ts index 9b40d260db..fe1abe7892 100644 --- a/sdks/full/typescript/src/api/resources/admin/resources/clusters/resources/servers/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/admin/resources/clusters/resources/servers/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../../../environments"; import * as core from "../../../../../../../../core"; -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../../../serialization"; -import * as errors from "../../../../../../../../errors"; +import * as serializers from "../../../../../../../../serialization/index"; +import * as errors from "../../../../../../../../errors/index"; export declare namespace Servers { interface Options { @@ -17,8 +17,12 @@ export declare namespace Servers { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -26,12 +30,24 @@ export class Servers { constructor(protected readonly _options: Servers.Options = {}) {} /** + * @param {string} clusterId + * @param {Rivet.admin.clusters.ListServersRequest} request + * @param {Servers.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.admin.clusters.servers.list("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * serverId: "string", + * datacenter: "string", + * pool: Rivet.admin.clusters.PoolType.Job, + * publicIp: "string" + * }) */ public async list( clusterId: string, @@ -39,7 +55,7 @@ export class Servers { requestOptions?: Servers.RequestOptions ): Promise { const { serverId, datacenter, pool, publicIp } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (serverId != null) { _queryParams["server_id"] = serverId; } @@ -59,7 +75,7 @@ export class Servers { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/admin/clusters/${clusterId}/servers` + `/admin/clusters/${encodeURIComponent(clusterId)}/servers` ), method: "GET", headers: { @@ -67,11 +83,13 @@ export class Servers { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.admin.clusters.ListServersResponse.parseOrThrow(_response.body, { + return serializers.admin.clusters.ListServersResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -84,7 +102,7 @@ export class Servers { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -94,7 +112,7 @@ export class Servers { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -104,7 +122,7 @@ export class Servers { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -114,7 +132,7 @@ export class Servers { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -124,7 +142,7 @@ export class Servers { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -134,7 +152,7 @@ export class Servers { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -166,12 +184,24 @@ export class Servers { } /** + * @param {string} clusterId + * @param {Rivet.admin.clusters.TaintServersRequest} request + * @param {Servers.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.admin.clusters.servers.taint("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * serverId: "string", + * datacenter: "string", + * pool: Rivet.admin.clusters.PoolType.Job, + * publicIp: "string" + * }) */ public async taint( clusterId: string, @@ -179,7 +209,7 @@ export class Servers { requestOptions?: Servers.RequestOptions ): Promise { const { serverId, datacenter, pool, publicIp } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (serverId != null) { _queryParams["server_id"] = serverId; } @@ -199,7 +229,7 @@ export class Servers { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/admin/clusters/${clusterId}/servers/taint` + `/admin/clusters/${encodeURIComponent(clusterId)}/servers/taint` ), method: "POST", headers: { @@ -207,8 +237,10 @@ export class Servers { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -218,7 +250,7 @@ export class Servers { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -228,7 +260,7 @@ export class Servers { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -238,7 +270,7 @@ export class Servers { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -248,7 +280,7 @@ export class Servers { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -258,7 +290,7 @@ export class Servers { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -268,7 +300,7 @@ export class Servers { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -300,12 +332,24 @@ export class Servers { } /** + * @param {string} clusterId + * @param {Rivet.admin.clusters.DestroyServersRequest} request + * @param {Servers.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.admin.clusters.servers.destroy("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * serverId: "string", + * datacenter: "string", + * pool: Rivet.admin.clusters.PoolType.Job, + * publicIp: "string" + * }) */ public async destroy( clusterId: string, @@ -313,7 +357,7 @@ export class Servers { requestOptions?: Servers.RequestOptions ): Promise { const { serverId, datacenter, pool, publicIp } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (serverId != null) { _queryParams["server_id"] = serverId; } @@ -333,7 +377,7 @@ export class Servers { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/admin/clusters/${clusterId}/servers/destroy` + `/admin/clusters/${encodeURIComponent(clusterId)}/servers/destroy` ), method: "POST", headers: { @@ -341,8 +385,10 @@ export class Servers { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -352,7 +398,7 @@ export class Servers { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -362,7 +408,7 @@ export class Servers { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -372,7 +418,7 @@ export class Servers { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -382,7 +428,7 @@ export class Servers { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -392,7 +438,7 @@ export class Servers { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -402,7 +448,7 @@ export class Servers { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -433,7 +479,7 @@ export class Servers { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/admin/resources/clusters/resources/servers/client/requests/DestroyServersRequest.ts b/sdks/full/typescript/src/api/resources/admin/resources/clusters/resources/servers/client/requests/DestroyServersRequest.ts index e773fd140c..cf4679ca6b 100644 --- a/sdks/full/typescript/src/api/resources/admin/resources/clusters/resources/servers/client/requests/DestroyServersRequest.ts +++ b/sdks/full/typescript/src/api/resources/admin/resources/clusters/resources/servers/client/requests/DestroyServersRequest.ts @@ -2,8 +2,17 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../.."; +import * as Rivet from "../../../../../../../../index"; +/** + * @example + * { + * serverId: "string", + * datacenter: "string", + * pool: Rivet.admin.clusters.PoolType.Job, + * publicIp: "string" + * } + */ export interface DestroyServersRequest { serverId?: string; datacenter?: string; diff --git a/sdks/full/typescript/src/api/resources/admin/resources/clusters/resources/servers/client/requests/ListServersRequest.ts b/sdks/full/typescript/src/api/resources/admin/resources/clusters/resources/servers/client/requests/ListServersRequest.ts index e366278c2c..9ed1f30f29 100644 --- a/sdks/full/typescript/src/api/resources/admin/resources/clusters/resources/servers/client/requests/ListServersRequest.ts +++ b/sdks/full/typescript/src/api/resources/admin/resources/clusters/resources/servers/client/requests/ListServersRequest.ts @@ -2,8 +2,17 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../.."; +import * as Rivet from "../../../../../../../../index"; +/** + * @example + * { + * serverId: "string", + * datacenter: "string", + * pool: Rivet.admin.clusters.PoolType.Job, + * publicIp: "string" + * } + */ export interface ListServersRequest { serverId?: string; datacenter?: string; diff --git a/sdks/full/typescript/src/api/resources/admin/resources/clusters/resources/servers/client/requests/TaintServersRequest.ts b/sdks/full/typescript/src/api/resources/admin/resources/clusters/resources/servers/client/requests/TaintServersRequest.ts index 73e1b6dc6c..43d73b0ab1 100644 --- a/sdks/full/typescript/src/api/resources/admin/resources/clusters/resources/servers/client/requests/TaintServersRequest.ts +++ b/sdks/full/typescript/src/api/resources/admin/resources/clusters/resources/servers/client/requests/TaintServersRequest.ts @@ -2,8 +2,17 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../.."; +import * as Rivet from "../../../../../../../../index"; +/** + * @example + * { + * serverId: "string", + * datacenter: "string", + * pool: Rivet.admin.clusters.PoolType.Job, + * publicIp: "string" + * } + */ export interface TaintServersRequest { serverId?: string; datacenter?: string; diff --git a/sdks/full/typescript/src/api/resources/admin/resources/clusters/resources/servers/client/requests/index.ts b/sdks/full/typescript/src/api/resources/admin/resources/clusters/resources/servers/client/requests/index.ts index 800cc433ea..dc9931a37d 100644 --- a/sdks/full/typescript/src/api/resources/admin/resources/clusters/resources/servers/client/requests/index.ts +++ b/sdks/full/typescript/src/api/resources/admin/resources/clusters/resources/servers/client/requests/index.ts @@ -1,3 +1,3 @@ -export { ListServersRequest } from "./ListServersRequest"; -export { TaintServersRequest } from "./TaintServersRequest"; -export { DestroyServersRequest } from "./DestroyServersRequest"; +export { type ListServersRequest } from "./ListServersRequest"; +export { type TaintServersRequest } from "./TaintServersRequest"; +export { type DestroyServersRequest } from "./DestroyServersRequest"; diff --git a/sdks/full/typescript/src/api/resources/auth/client/Client.ts b/sdks/full/typescript/src/api/resources/auth/client/Client.ts index 682de9a433..df7e1a3832 100644 --- a/sdks/full/typescript/src/api/resources/auth/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/auth/client/Client.ts @@ -15,8 +15,12 @@ export declare namespace Auth { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } diff --git a/sdks/full/typescript/src/api/resources/auth/resources/identity/client/Client.ts b/sdks/full/typescript/src/api/resources/auth/resources/identity/client/Client.ts index abc50febbc..475990e703 100644 --- a/sdks/full/typescript/src/api/resources/auth/resources/identity/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/auth/resources/identity/client/Client.ts @@ -15,8 +15,12 @@ export declare namespace Identity { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } diff --git a/sdks/full/typescript/src/api/resources/auth/resources/identity/resources/accessToken/client/Client.ts b/sdks/full/typescript/src/api/resources/auth/resources/identity/resources/accessToken/client/Client.ts index e7c7ef477f..c843be540d 100644 --- a/sdks/full/typescript/src/api/resources/auth/resources/identity/resources/accessToken/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/auth/resources/identity/resources/accessToken/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../../../environments"; import * as core from "../../../../../../../../core"; -import * as Rivet from "../../../../../../.."; -import * as serializers from "../../../../../../../../serialization"; +import * as Rivet from "../../../../../../../index"; +import * as serializers from "../../../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../../../errors"; +import * as errors from "../../../../../../../../errors/index"; export declare namespace AccessToken { interface Options { @@ -17,8 +17,12 @@ export declare namespace AccessToken { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -27,12 +31,21 @@ export class AccessToken { /** * Completes the access token verification process. + * + * @param {Rivet.auth.identity.CompleteAccessTokenVerificationRequest} request + * @param {AccessToken.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.auth.identity.accessToken.completeAccessTokenVerification({ + * accessToken: "string" + * }) */ public async completeAccessTokenVerification( request: Rivet.auth.identity.CompleteAccessTokenVerificationRequest, @@ -48,11 +61,13 @@ export class AccessToken { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.auth.identity.CompleteAccessTokenVerificationRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.auth.identity.CompleteAccessTokenVerificationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -62,7 +77,7 @@ export class AccessToken { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -72,7 +87,7 @@ export class AccessToken { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -82,7 +97,7 @@ export class AccessToken { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -92,7 +107,7 @@ export class AccessToken { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -102,7 +117,7 @@ export class AccessToken { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -112,7 +127,7 @@ export class AccessToken { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -143,7 +158,7 @@ export class AccessToken { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/auth/resources/identity/resources/accessToken/types/CompleteAccessTokenVerificationRequest.ts b/sdks/full/typescript/src/api/resources/auth/resources/identity/resources/accessToken/types/CompleteAccessTokenVerificationRequest.ts index 129cf7d65d..d8dba3b365 100644 --- a/sdks/full/typescript/src/api/resources/auth/resources/identity/resources/accessToken/types/CompleteAccessTokenVerificationRequest.ts +++ b/sdks/full/typescript/src/api/resources/auth/resources/identity/resources/accessToken/types/CompleteAccessTokenVerificationRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface CompleteAccessTokenVerificationRequest { accessToken: Rivet.Jwt; diff --git a/sdks/full/typescript/src/api/resources/auth/resources/identity/resources/email/client/Client.ts b/sdks/full/typescript/src/api/resources/auth/resources/identity/resources/email/client/Client.ts index 5a9cfd955a..f3555450c8 100644 --- a/sdks/full/typescript/src/api/resources/auth/resources/identity/resources/email/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/auth/resources/identity/resources/email/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../../../environments"; import * as core from "../../../../../../../../core"; -import * as Rivet from "../../../../../../.."; -import * as serializers from "../../../../../../../../serialization"; +import * as Rivet from "../../../../../../../index"; +import * as serializers from "../../../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../../../errors"; +import * as errors from "../../../../../../../../errors/index"; export declare namespace Email { interface Options { @@ -17,8 +17,12 @@ export declare namespace Email { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -27,12 +31,23 @@ export class Email { /** * Starts the verification process for linking an email to your identity. + * + * @param {Rivet.auth.identity.StartEmailVerificationRequest} request + * @param {Email.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.auth.identity.email.startEmailVerification({ + * email: "string", + * captcha: {}, + * gameId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * }) */ public async startEmailVerification( request: Rivet.auth.identity.StartEmailVerificationRequest, @@ -48,14 +63,16 @@ export class Email { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.auth.identity.StartEmailVerificationRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.auth.identity.StartEmailVerificationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.auth.identity.StartEmailVerificationResponse.parseOrThrow(_response.body, { + return serializers.auth.identity.StartEmailVerificationResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -68,7 +85,7 @@ export class Email { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -78,7 +95,7 @@ export class Email { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -88,7 +105,7 @@ export class Email { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -98,7 +115,7 @@ export class Email { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -108,7 +125,7 @@ export class Email { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -118,7 +135,7 @@ export class Email { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -151,12 +168,22 @@ export class Email { /** * Completes the email verification process. + * + * @param {Rivet.auth.identity.CompleteEmailVerificationRequest} request + * @param {Email.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.auth.identity.email.completeEmailVerification({ + * verificationId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + * code: "string" + * }) */ public async completeEmailVerification( request: Rivet.auth.identity.CompleteEmailVerificationRequest, @@ -172,14 +199,16 @@ export class Email { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.auth.identity.CompleteEmailVerificationRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.auth.identity.CompleteEmailVerificationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.auth.identity.CompleteEmailVerificationResponse.parseOrThrow(_response.body, { + return serializers.auth.identity.CompleteEmailVerificationResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -192,7 +221,7 @@ export class Email { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -202,7 +231,7 @@ export class Email { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -212,7 +241,7 @@ export class Email { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -222,7 +251,7 @@ export class Email { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -232,7 +261,7 @@ export class Email { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -242,7 +271,7 @@ export class Email { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -273,7 +302,7 @@ export class Email { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/auth/resources/identity/resources/email/types/CompleteEmailVerificationResponse.ts b/sdks/full/typescript/src/api/resources/auth/resources/identity/resources/email/types/CompleteEmailVerificationResponse.ts index 5e57557f7e..c0d499368f 100644 --- a/sdks/full/typescript/src/api/resources/auth/resources/identity/resources/email/types/CompleteEmailVerificationResponse.ts +++ b/sdks/full/typescript/src/api/resources/auth/resources/identity/resources/email/types/CompleteEmailVerificationResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface CompleteEmailVerificationResponse { status: Rivet.auth.CompleteStatus; diff --git a/sdks/full/typescript/src/api/resources/auth/resources/identity/resources/email/types/StartEmailVerificationRequest.ts b/sdks/full/typescript/src/api/resources/auth/resources/identity/resources/email/types/StartEmailVerificationRequest.ts index 8275cc4954..fb6c685b1f 100644 --- a/sdks/full/typescript/src/api/resources/auth/resources/identity/resources/email/types/StartEmailVerificationRequest.ts +++ b/sdks/full/typescript/src/api/resources/auth/resources/identity/resources/email/types/StartEmailVerificationRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface StartEmailVerificationRequest { email: string; diff --git a/sdks/full/typescript/src/api/resources/auth/resources/tokens/client/Client.ts b/sdks/full/typescript/src/api/resources/auth/resources/tokens/client/Client.ts index a12d60e948..c184630d6d 100644 --- a/sdks/full/typescript/src/api/resources/auth/resources/tokens/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/auth/resources/tokens/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Rivet from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace Tokens { interface Options { @@ -17,8 +17,12 @@ export declare namespace Tokens { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -27,12 +31,21 @@ export class Tokens { /** * Refreshes the current identity's token and sets authentication headers. + * + * @param {Rivet.auth.RefreshIdentityTokenRequest} request + * @param {Tokens.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.auth.tokens.refreshIdentityToken({ + * logout: true + * }) */ public async refreshIdentityToken( request: Rivet.auth.RefreshIdentityTokenRequest, @@ -48,14 +61,16 @@ export class Tokens { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.auth.RefreshIdentityTokenRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.auth.RefreshIdentityTokenRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.auth.RefreshIdentityTokenResponse.parseOrThrow(_response.body, { + return serializers.auth.RefreshIdentityTokenResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -68,7 +83,7 @@ export class Tokens { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -78,7 +93,7 @@ export class Tokens { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -88,7 +103,7 @@ export class Tokens { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -98,7 +113,7 @@ export class Tokens { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -108,7 +123,7 @@ export class Tokens { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -118,7 +133,7 @@ export class Tokens { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -149,7 +164,7 @@ export class Tokens { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/captcha/resources/config/types/Config.ts b/sdks/full/typescript/src/api/resources/captcha/resources/config/types/Config.ts index ad2a83861d..a51a51aee9 100644 --- a/sdks/full/typescript/src/api/resources/captcha/resources/config/types/Config.ts +++ b/sdks/full/typescript/src/api/resources/captcha/resources/config/types/Config.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * Methods to verify a captcha diff --git a/sdks/full/typescript/src/api/resources/cloud/client/Client.ts b/sdks/full/typescript/src/api/resources/cloud/client/Client.ts index f96f99d59e..de8ebe54b3 100644 --- a/sdks/full/typescript/src/api/resources/cloud/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/cloud/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../environments"; import * as core from "../../../../core"; -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../serialization"; -import * as errors from "../../../../errors"; +import * as serializers from "../../../../serialization/index"; +import * as errors from "../../../../errors/index"; import { Games } from "../resources/games/client/Client"; import { Auth } from "../resources/auth/client/Client"; import { Devices } from "../resources/devices/client/Client"; @@ -24,8 +24,12 @@ export declare namespace Cloud { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -34,12 +38,18 @@ export class Cloud { /** * Returns the basic information required to use the cloud APIs. + * + * @param {Cloud.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.bootstrap() */ public async bootstrap(requestOptions?: Cloud.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -52,11 +62,13 @@ export class Cloud { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.BootstrapResponse.parseOrThrow(_response.body, { + return serializers.cloud.BootstrapResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -69,7 +81,7 @@ export class Cloud { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -79,7 +91,7 @@ export class Cloud { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -89,7 +101,7 @@ export class Cloud { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -99,7 +111,7 @@ export class Cloud { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -109,7 +121,7 @@ export class Cloud { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -119,7 +131,7 @@ export class Cloud { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -192,7 +204,7 @@ export class Cloud { return (this._uploads ??= new Uploads(this._options)); } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/auth/client/Client.ts b/sdks/full/typescript/src/api/resources/cloud/resources/auth/client/Client.ts index cea198b564..1cf32254f2 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/auth/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/auth/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Auth { interface Options { @@ -17,8 +17,12 @@ export declare namespace Auth { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -27,12 +31,18 @@ export class Auth { /** * Returns information about the current authenticated agent. + * + * @param {Auth.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.auth.inspect() */ public async inspect(requestOptions?: Auth.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -45,11 +55,13 @@ export class Auth { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.InspectResponse.parseOrThrow(_response.body, { + return serializers.cloud.InspectResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -62,7 +74,7 @@ export class Auth { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -72,7 +84,7 @@ export class Auth { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -82,7 +94,7 @@ export class Auth { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -92,7 +104,7 @@ export class Auth { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -102,7 +114,7 @@ export class Auth { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -112,7 +124,7 @@ export class Auth { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -143,7 +155,7 @@ export class Auth { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/auth/types/InspectResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/auth/types/InspectResponse.ts index cd62ccadcb..0bb8589297 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/auth/types/InspectResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/auth/types/InspectResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface InspectResponse { agent: Rivet.cloud.AuthAgent; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/AuthAgent.ts b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/AuthAgent.ts index b1c6b6cd6b..e3d0d8b67d 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/AuthAgent.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/AuthAgent.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * The current authenticated agent. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/BuildSummary.ts b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/BuildSummary.ts index e303ece651..f3a1f32c4a 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/BuildSummary.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/BuildSummary.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A build summary. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/CdnNamespaceConfig.ts b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/CdnNamespaceConfig.ts index c692a67a19..321be272aa 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/CdnNamespaceConfig.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/CdnNamespaceConfig.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * CDN configuration for a given namespace. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/CdnNamespaceDomain.ts b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/CdnNamespaceDomain.ts index dcc2292a7a..3a40ed6a14 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/CdnNamespaceDomain.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/CdnNamespaceDomain.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A CDN domain for a given namespace. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationMethod.ts b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationMethod.ts index 1567f74e94..84fa3555cb 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationMethod.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationMethod.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A union representing the verification method used for this CDN domain. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/CdnSiteSummary.ts b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/CdnSiteSummary.ts index a3dca9ec5e..ce96194e09 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/CdnSiteSummary.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/CdnSiteSummary.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A CDN site summary. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/CustomAvatarSummary.ts b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/CustomAvatarSummary.ts index 884718290d..92791214b6 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/CustomAvatarSummary.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/CustomAvatarSummary.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A custom avatar summary. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/GameFull.ts b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/GameFull.ts index bfc374d49f..37bf709a4a 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/GameFull.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/GameFull.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A full game. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/GameLobbyExpenses.ts b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/GameLobbyExpenses.ts index e029cf9492..3efd250b3f 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/GameLobbyExpenses.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/GameLobbyExpenses.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * Game lobby expenses. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/LobbySummaryAnalytics.ts b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/LobbySummaryAnalytics.ts index ca74e4752d..cd6860a07a 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/LobbySummaryAnalytics.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/LobbySummaryAnalytics.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * Analytical information about a lobby. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/LogsLobbyStatus.ts b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/LogsLobbyStatus.ts index 010c1f8f32..ff7c7e98da 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/LogsLobbyStatus.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/LogsLobbyStatus.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A union representing the state of a lobby. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/LogsLobbyStatusStopped.ts b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/LogsLobbyStatusStopped.ts index 80c8e5cf2b..3f230d975d 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/LogsLobbyStatusStopped.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/LogsLobbyStatusStopped.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * The status of a stopped lobby. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/LogsLobbySummary.ts b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/LogsLobbySummary.ts index ab5b649023..02d229e6d3 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/LogsLobbySummary.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/LogsLobbySummary.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A logs summary for a lobby. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/LogsPerfMark.ts b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/LogsPerfMark.ts index 83b6dfe0bc..5d11ae1d97 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/LogsPerfMark.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/LogsPerfMark.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A performance mark. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/LogsPerfSpan.ts b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/LogsPerfSpan.ts index 8ae3b023f8..d32eb028a4 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/LogsPerfSpan.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/LogsPerfSpan.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A performance span. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/MatchmakerDevelopmentPort.ts b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/MatchmakerDevelopmentPort.ts index 40ed218016..57bb12218c 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/MatchmakerDevelopmentPort.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/MatchmakerDevelopmentPort.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A port configuration used to create development tokens. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/NamespaceConfig.ts b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/NamespaceConfig.ts index be4e70a859..d3aaf6c826 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/NamespaceConfig.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/NamespaceConfig.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * Cloud configuration for a given namespace. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/NamespaceFull.ts b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/NamespaceFull.ts index c7908be153..b0f9a9ca9b 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/NamespaceFull.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/NamespaceFull.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A full namespace. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/NamespaceSummary.ts b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/NamespaceSummary.ts index 6f7060ba6d..70058885df 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/NamespaceSummary.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/NamespaceSummary.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A namespace summary. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/NamespaceVersion.ts b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/NamespaceVersion.ts index 1a3b814b84..53d643097f 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/NamespaceVersion.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/NamespaceVersion.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A previously deployed namespace version. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/RegionSummary.ts b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/RegionSummary.ts index 09b851d76a..1eeaab6820 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/RegionSummary.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/RegionSummary.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A region summary. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/SvcPerf.ts b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/SvcPerf.ts index 628c2992e9..0bb0d4d5c8 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/common/types/SvcPerf.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/common/types/SvcPerf.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A service performance summary. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/devices/client/Client.ts b/sdks/full/typescript/src/api/resources/cloud/resources/devices/client/Client.ts index 52df6a29bd..bac2133e14 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/devices/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/devices/client/Client.ts @@ -14,8 +14,12 @@ export declare namespace Devices { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/devices/resources/links/client/Client.ts b/sdks/full/typescript/src/api/resources/cloud/resources/devices/resources/links/client/Client.ts index be2ed962b4..ca4a9601c2 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/devices/resources/links/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/devices/resources/links/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../../../environments"; import * as core from "../../../../../../../../core"; -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../../../serialization"; -import * as errors from "../../../../../../../../errors"; +import * as serializers from "../../../../../../../../serialization/index"; +import * as errors from "../../../../../../../../errors/index"; export declare namespace Links { interface Options { @@ -17,8 +17,12 @@ export declare namespace Links { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -26,12 +30,17 @@ export class Links { constructor(protected readonly _options: Links.Options = {}) {} /** + * @param {Links.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.devices.links.prepare() */ public async prepare( requestOptions?: Links.RequestOptions @@ -46,11 +55,13 @@ export class Links { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.devices.PrepareDeviceLinkResponse.parseOrThrow(_response.body, { + return serializers.cloud.devices.PrepareDeviceLinkResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -63,7 +74,7 @@ export class Links { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -73,7 +84,7 @@ export class Links { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -83,7 +94,7 @@ export class Links { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -93,7 +104,7 @@ export class Links { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -103,7 +114,7 @@ export class Links { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -113,7 +124,7 @@ export class Links { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -145,19 +156,28 @@ export class Links { } /** + * @param {Rivet.cloud.devices.GetDeviceLinkRequest} request + * @param {Links.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.devices.links.get({ + * deviceLinkToken: "string", + * watchIndex: "string" + * }) */ public async get( request: Rivet.cloud.devices.GetDeviceLinkRequest, requestOptions?: Links.RequestOptions ): Promise { const { deviceLinkToken, watchIndex } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; _queryParams["device_link_token"] = deviceLinkToken; if (watchIndex != null) { _queryParams["watch_index"] = watchIndex; @@ -174,11 +194,13 @@ export class Links { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.devices.GetDeviceLinkResponse.parseOrThrow(_response.body, { + return serializers.cloud.devices.GetDeviceLinkResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -191,7 +213,7 @@ export class Links { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -201,7 +223,7 @@ export class Links { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -211,7 +233,7 @@ export class Links { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -221,7 +243,7 @@ export class Links { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -231,7 +253,7 @@ export class Links { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -241,7 +263,7 @@ export class Links { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -273,12 +295,21 @@ export class Links { } /** + * @param {Rivet.cloud.devices.CompleteDeviceLinkRequest} request + * @param {Links.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.devices.links.complete({ + * deviceLinkToken: "string", + * gameId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * }) */ public async complete( request: Rivet.cloud.devices.CompleteDeviceLinkRequest, @@ -294,11 +325,13 @@ export class Links { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.cloud.devices.CompleteDeviceLinkRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.cloud.devices.CompleteDeviceLinkRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -308,7 +341,7 @@ export class Links { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -318,7 +351,7 @@ export class Links { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -328,7 +361,7 @@ export class Links { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -338,7 +371,7 @@ export class Links { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -348,7 +381,7 @@ export class Links { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -358,7 +391,7 @@ export class Links { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -389,7 +422,7 @@ export class Links { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/devices/resources/links/client/requests/GetDeviceLinkRequest.ts b/sdks/full/typescript/src/api/resources/cloud/resources/devices/resources/links/client/requests/GetDeviceLinkRequest.ts index 7f0f3cc59d..0a364cb254 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/devices/resources/links/client/requests/GetDeviceLinkRequest.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/devices/resources/links/client/requests/GetDeviceLinkRequest.ts @@ -2,8 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../.."; +import * as Rivet from "../../../../../../../../index"; +/** + * @example + * { + * deviceLinkToken: "string", + * watchIndex: "string" + * } + */ export interface GetDeviceLinkRequest { deviceLinkToken: Rivet.Jwt; watchIndex?: Rivet.WatchQuery; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/devices/resources/links/client/requests/index.ts b/sdks/full/typescript/src/api/resources/cloud/resources/devices/resources/links/client/requests/index.ts index 67fa7fb77d..31eff30cbd 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/devices/resources/links/client/requests/index.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/devices/resources/links/client/requests/index.ts @@ -1 +1 @@ -export { GetDeviceLinkRequest } from "./GetDeviceLinkRequest"; +export { type GetDeviceLinkRequest } from "./GetDeviceLinkRequest"; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/devices/resources/links/types/CompleteDeviceLinkRequest.ts b/sdks/full/typescript/src/api/resources/cloud/resources/devices/resources/links/types/CompleteDeviceLinkRequest.ts index aa77367de9..91a32d1195 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/devices/resources/links/types/CompleteDeviceLinkRequest.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/devices/resources/links/types/CompleteDeviceLinkRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface CompleteDeviceLinkRequest { deviceLinkToken: Rivet.Jwt; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/devices/resources/links/types/GetDeviceLinkResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/devices/resources/links/types/GetDeviceLinkResponse.ts index 3bdc199f72..e1045475cf 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/devices/resources/links/types/GetDeviceLinkResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/devices/resources/links/types/GetDeviceLinkResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface GetDeviceLinkResponse { cloudToken?: string; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/client/Client.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/client/Client.ts index a162c2846e..25fc885f86 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; import { Namespaces } from "../resources/namespaces/client/Client"; import { Avatars } from "../resources/avatars/client/Client"; import { Builds } from "../resources/builds/client/Client"; @@ -24,8 +24,12 @@ export declare namespace Games { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -34,19 +38,28 @@ export class Games { /** * Returns a list of games in which the current identity is a group member of its development team. + * + * @param {Rivet.cloud.games.GetGamesRequest} request + * @param {Games.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.getGames({ + * watchIndex: "string" + * }) */ public async getGames( request: Rivet.cloud.games.GetGamesRequest = {}, requestOptions?: Games.RequestOptions ): Promise { const { watchIndex } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (watchIndex != null) { _queryParams["watch_index"] = watchIndex; } @@ -62,11 +75,13 @@ export class Games { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.GetGamesResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.GetGamesResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -79,7 +94,7 @@ export class Games { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -89,7 +104,7 @@ export class Games { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -99,7 +114,7 @@ export class Games { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -109,7 +124,7 @@ export class Games { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -119,7 +134,7 @@ export class Games { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -129,7 +144,7 @@ export class Games { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -162,12 +177,23 @@ export class Games { /** * Creates a new game. + * + * @param {Rivet.cloud.games.CreateGameRequest} request + * @param {Games.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.createGame({ + * nameId: "string", + * displayName: "string", + * developerGroupId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * }) */ public async createGame( request: Rivet.cloud.games.CreateGameRequest, @@ -183,14 +209,14 @@ export class Games { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.cloud.games.CreateGameRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.cloud.games.CreateGameRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.CreateGameResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.CreateGameResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -203,7 +229,7 @@ export class Games { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -213,7 +239,7 @@ export class Games { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -223,7 +249,7 @@ export class Games { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -233,7 +259,7 @@ export class Games { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -243,7 +269,7 @@ export class Games { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -253,7 +279,7 @@ export class Games { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -286,12 +312,22 @@ export class Games { /** * Validates information used to create a new game. + * + * @param {Rivet.cloud.games.ValidateGameRequest} request + * @param {Games.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.validateGame({ + * displayName: "string", + * nameId: "string" + * }) */ public async validateGame( request: Rivet.cloud.games.ValidateGameRequest, @@ -307,14 +343,14 @@ export class Games { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.cloud.games.ValidateGameRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.cloud.games.ValidateGameRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.ValidateGameResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.ValidateGameResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -327,7 +363,7 @@ export class Games { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -337,7 +373,7 @@ export class Games { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -347,7 +383,7 @@ export class Games { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -357,7 +393,7 @@ export class Games { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -367,7 +403,7 @@ export class Games { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -377,7 +413,7 @@ export class Games { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -410,12 +446,22 @@ export class Games { /** * Returns a game by its game id. + * + * @param {string} gameId + * @param {Rivet.cloud.games.GetGameByIdRequest} request + * @param {Games.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.getGameById("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * watchIndex: "string" + * }) */ public async getGameById( gameId: string, @@ -423,7 +469,7 @@ export class Games { requestOptions?: Games.RequestOptions ): Promise { const { watchIndex } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (watchIndex != null) { _queryParams["watch_index"] = watchIndex; } @@ -431,7 +477,7 @@ export class Games { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}` + `/cloud/games/${encodeURIComponent(gameId)}` ), method: "GET", headers: { @@ -439,11 +485,13 @@ export class Games { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.GetGameByIdResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.GetGameByIdResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -456,7 +504,7 @@ export class Games { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -466,7 +514,7 @@ export class Games { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -476,7 +524,7 @@ export class Games { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -486,7 +534,7 @@ export class Games { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -496,7 +544,7 @@ export class Games { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -506,7 +554,7 @@ export class Games { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -539,12 +587,24 @@ export class Games { /** * Prepares a game banner image upload. + * + * @param {string} gameId + * @param {Rivet.cloud.games.GameBannerUploadPrepareRequest} request + * @param {Games.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.gameBannerUploadPrepare("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * path: "string", + * mime: "string", + * contentLength: 1000000 + * }) */ public async gameBannerUploadPrepare( gameId: string, @@ -554,21 +614,23 @@ export class Games { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/banner-upload/prepare` + `/cloud/games/${encodeURIComponent(gameId)}/banner-upload/prepare` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.cloud.games.GameBannerUploadPrepareRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.cloud.games.GameBannerUploadPrepareRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.GameBannerUploadPrepareResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.GameBannerUploadPrepareResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -581,7 +643,7 @@ export class Games { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -591,7 +653,7 @@ export class Games { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -601,7 +663,7 @@ export class Games { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -611,7 +673,7 @@ export class Games { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -621,7 +683,7 @@ export class Games { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -631,7 +693,7 @@ export class Games { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -664,12 +726,20 @@ export class Games { /** * Completes an game banner image upload. Must be called after the file upload process completes. + * + * @param {string} gameId + * @param {string} uploadId + * @param {Games.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.gameBannerUploadComplete("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async gameBannerUploadComplete( gameId: string, @@ -679,15 +749,17 @@ export class Games { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/banner-upload/${uploadId}/complete` + `/cloud/games/${encodeURIComponent(gameId)}/banner-upload/${encodeURIComponent(uploadId)}/complete` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -697,7 +769,7 @@ export class Games { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -707,7 +779,7 @@ export class Games { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -717,7 +789,7 @@ export class Games { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -727,7 +799,7 @@ export class Games { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -737,7 +809,7 @@ export class Games { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -747,7 +819,7 @@ export class Games { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -780,12 +852,24 @@ export class Games { /** * Prepares a game logo image upload. + * + * @param {string} gameId + * @param {Rivet.cloud.games.GameLogoUploadPrepareRequest} request + * @param {Games.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.gameLogoUploadPrepare("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * path: "string", + * mime: "string", + * contentLength: 1000000 + * }) */ public async gameLogoUploadPrepare( gameId: string, @@ -795,21 +879,23 @@ export class Games { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/logo-upload/prepare` + `/cloud/games/${encodeURIComponent(gameId)}/logo-upload/prepare` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.cloud.games.GameLogoUploadPrepareRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.cloud.games.GameLogoUploadPrepareRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.GameLogoUploadPrepareResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.GameLogoUploadPrepareResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -822,7 +908,7 @@ export class Games { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -832,7 +918,7 @@ export class Games { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -842,7 +928,7 @@ export class Games { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -852,7 +938,7 @@ export class Games { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -862,7 +948,7 @@ export class Games { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -872,7 +958,7 @@ export class Games { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -905,12 +991,20 @@ export class Games { /** * Completes a game logo image upload. Must be called after the file upload process completes. + * + * @param {string} gameId + * @param {string} uploadId + * @param {Games.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.gameLogoUploadComplete("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async gameLogoUploadComplete( gameId: string, @@ -920,15 +1014,17 @@ export class Games { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/logo-upload/${uploadId}/complete` + `/cloud/games/${encodeURIComponent(gameId)}/logo-upload/${encodeURIComponent(uploadId)}/complete` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -938,7 +1034,7 @@ export class Games { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -948,7 +1044,7 @@ export class Games { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -958,7 +1054,7 @@ export class Games { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -968,7 +1064,7 @@ export class Games { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -978,7 +1074,7 @@ export class Games { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -988,7 +1084,7 @@ export class Games { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1061,7 +1157,7 @@ export class Games { return (this._versions ??= new Versions(this._options)); } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/client/requests/GetGameByIdRequest.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/client/requests/GetGameByIdRequest.ts index 0179b4c7f2..78a26f0b24 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/client/requests/GetGameByIdRequest.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/client/requests/GetGameByIdRequest.ts @@ -2,6 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * watchIndex: "string" + * } + */ export interface GetGameByIdRequest { /** * A query parameter denoting the requests watch index. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/client/requests/GetGamesRequest.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/client/requests/GetGamesRequest.ts index 5024664e3a..d5215adc41 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/client/requests/GetGamesRequest.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/client/requests/GetGamesRequest.ts @@ -2,6 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * watchIndex: "string" + * } + */ export interface GetGamesRequest { /** * A query parameter denoting the requests watch index. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/client/requests/index.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/client/requests/index.ts index af8cfdee81..cdf85cf23b 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/client/requests/index.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/client/requests/index.ts @@ -1,2 +1,2 @@ -export { GetGamesRequest } from "./GetGamesRequest"; -export { GetGameByIdRequest } from "./GetGameByIdRequest"; +export { type GetGamesRequest } from "./GetGamesRequest"; +export { type GetGameByIdRequest } from "./GetGameByIdRequest"; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/avatars/client/Client.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/avatars/client/Client.ts index 6c3edf4538..65f1f73fb9 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/avatars/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/avatars/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../../../environments"; import * as core from "../../../../../../../../core"; -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../../../serialization"; -import * as errors from "../../../../../../../../errors"; +import * as serializers from "../../../../../../../../serialization/index"; +import * as errors from "../../../../../../../../errors/index"; export declare namespace Avatars { interface Options { @@ -17,8 +17,12 @@ export declare namespace Avatars { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -27,12 +31,19 @@ export class Avatars { /** * Lists custom avatars for the given game. + * + * @param {string} gameId + * @param {Avatars.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.avatars.listGameCustomAvatars("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async listGameCustomAvatars( gameId: string, @@ -41,18 +52,20 @@ export class Avatars { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/avatars` + `/cloud/games/${encodeURIComponent(gameId)}/avatars` ), method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.ListGameCustomAvatarsResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.ListGameCustomAvatarsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -65,7 +78,7 @@ export class Avatars { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -75,7 +88,7 @@ export class Avatars { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -85,7 +98,7 @@ export class Avatars { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -95,7 +108,7 @@ export class Avatars { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -105,7 +118,7 @@ export class Avatars { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -115,7 +128,7 @@ export class Avatars { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -149,12 +162,24 @@ export class Avatars { /** * Prepares a custom avatar image upload. * Complete upload with `rivet.api.cloud#CompleteCustomAvatarUpload`. + * + * @param {string} gameId + * @param {Rivet.cloud.games.PrepareCustomAvatarUploadRequest} request + * @param {Avatars.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.avatars.prepareCustomAvatarUpload("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * path: "string", + * mime: "string", + * contentLength: 1000000 + * }) */ public async prepareCustomAvatarUpload( gameId: string, @@ -164,21 +189,23 @@ export class Avatars { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/prepare` + `/cloud/games/${encodeURIComponent(gameId)}/prepare` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.cloud.games.PrepareCustomAvatarUploadRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.cloud.games.PrepareCustomAvatarUploadRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.PrepareCustomAvatarUploadResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.PrepareCustomAvatarUploadResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -191,7 +218,7 @@ export class Avatars { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -201,7 +228,7 @@ export class Avatars { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -211,7 +238,7 @@ export class Avatars { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -221,7 +248,7 @@ export class Avatars { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -231,7 +258,7 @@ export class Avatars { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -241,7 +268,7 @@ export class Avatars { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -274,12 +301,20 @@ export class Avatars { /** * Completes a custom avatar image upload. Must be called after the file upload process completes. + * + * @param {string} gameId + * @param {string} uploadId + * @param {Avatars.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.avatars.completeCustomAvatarUpload("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async completeCustomAvatarUpload( gameId: string, @@ -289,15 +324,17 @@ export class Avatars { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/avatar-upload/${uploadId}/complete` + `/cloud/games/${encodeURIComponent(gameId)}/avatar-upload/${encodeURIComponent(uploadId)}/complete` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -307,7 +344,7 @@ export class Avatars { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -317,7 +354,7 @@ export class Avatars { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -327,7 +364,7 @@ export class Avatars { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -337,7 +374,7 @@ export class Avatars { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -347,7 +384,7 @@ export class Avatars { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -357,7 +394,7 @@ export class Avatars { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -388,7 +425,7 @@ export class Avatars { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/avatars/types/ListGameCustomAvatarsResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/avatars/types/ListGameCustomAvatarsResponse.ts index d5e5d7f147..5ffa9357c0 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/avatars/types/ListGameCustomAvatarsResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/avatars/types/ListGameCustomAvatarsResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface ListGameCustomAvatarsResponse { /** A list of custom avatar summaries. */ diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/avatars/types/PrepareCustomAvatarUploadResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/avatars/types/PrepareCustomAvatarUploadResponse.ts index 917b003d0a..bc3e0149f8 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/avatars/types/PrepareCustomAvatarUploadResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/avatars/types/PrepareCustomAvatarUploadResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface PrepareCustomAvatarUploadResponse { uploadId: string; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/builds/client/Client.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/builds/client/Client.ts index ad8f483493..00dd87c4bf 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/builds/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/builds/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../../../environments"; import * as core from "../../../../../../../../core"; -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../../../serialization"; -import * as errors from "../../../../../../../../errors"; +import * as serializers from "../../../../../../../../serialization/index"; +import * as errors from "../../../../../../../../errors/index"; export declare namespace Builds { interface Options { @@ -17,8 +17,12 @@ export declare namespace Builds { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -27,12 +31,19 @@ export class Builds { /** * Lists game builds for the given game. + * + * @param {string} gameId + * @param {Builds.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.builds.listGameBuilds("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async listGameBuilds( gameId: string, @@ -41,18 +52,20 @@ export class Builds { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/builds` + `/cloud/games/${encodeURIComponent(gameId)}/builds` ), method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.ListGameBuildsResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.ListGameBuildsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -65,7 +78,7 @@ export class Builds { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -75,7 +88,7 @@ export class Builds { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -85,7 +98,7 @@ export class Builds { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -95,7 +108,7 @@ export class Builds { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -105,7 +118,7 @@ export class Builds { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -115,7 +128,7 @@ export class Builds { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -148,12 +161,27 @@ export class Builds { /** * Creates a new game build for the given game. + * + * @param {string} gameId + * @param {Rivet.cloud.games.CreateGameBuildRequest} request + * @param {Builds.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.builds.createGameBuild("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * displayName: "string", + * imageTag: "string", + * imageFile: {}, + * multipartUpload: true, + * kind: Rivet.cloud.games.BuildKind.DockerImage, + * compression: Rivet.cloud.games.BuildCompression.None + * }) */ public async createGameBuild( gameId: string, @@ -163,21 +191,23 @@ export class Builds { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/builds` + `/cloud/games/${encodeURIComponent(gameId)}/builds` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.cloud.games.CreateGameBuildRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.cloud.games.CreateGameBuildRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.CreateGameBuildResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.CreateGameBuildResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -190,7 +220,7 @@ export class Builds { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -200,7 +230,7 @@ export class Builds { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -210,7 +240,7 @@ export class Builds { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -220,7 +250,7 @@ export class Builds { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -230,7 +260,7 @@ export class Builds { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -240,7 +270,7 @@ export class Builds { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -271,7 +301,7 @@ export class Builds { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/builds/types/CreateGameBuildRequest.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/builds/types/CreateGameBuildRequest.ts index 7236afa635..2701ae1953 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/builds/types/CreateGameBuildRequest.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/builds/types/CreateGameBuildRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface CreateGameBuildRequest { displayName: Rivet.DisplayName; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/builds/types/CreateGameBuildResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/builds/types/CreateGameBuildResponse.ts index 41657e5245..e200f86cdf 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/builds/types/CreateGameBuildResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/builds/types/CreateGameBuildResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface CreateGameBuildResponse { buildId: string; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/builds/types/ListGameBuildsResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/builds/types/ListGameBuildsResponse.ts index b9e6a545ea..2fb0fb7070 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/builds/types/ListGameBuildsResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/builds/types/ListGameBuildsResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface ListGameBuildsResponse { /** A list of build summaries. */ diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/cdn/client/Client.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/cdn/client/Client.ts index 3ded5c30e5..02678f5d88 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/cdn/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/cdn/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../../../environments"; import * as core from "../../../../../../../../core"; -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../../../serialization"; -import * as errors from "../../../../../../../../errors"; +import * as serializers from "../../../../../../../../serialization/index"; +import * as errors from "../../../../../../../../errors/index"; export declare namespace Cdn { interface Options { @@ -17,8 +17,12 @@ export declare namespace Cdn { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -27,12 +31,19 @@ export class Cdn { /** * Lists CDN sites for a game. + * + * @param {string} gameId + * @param {Cdn.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.cdn.listGameCdnSites("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async listGameCdnSites( gameId: string, @@ -41,18 +52,20 @@ export class Cdn { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/cdn/sites` + `/cloud/games/${encodeURIComponent(gameId)}/cdn/sites` ), method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.ListGameCdnSitesResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.ListGameCdnSitesResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -65,7 +78,7 @@ export class Cdn { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -75,7 +88,7 @@ export class Cdn { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -85,7 +98,7 @@ export class Cdn { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -95,7 +108,7 @@ export class Cdn { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -105,7 +118,7 @@ export class Cdn { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -115,7 +128,7 @@ export class Cdn { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -148,12 +161,23 @@ export class Cdn { /** * Creates a new CDN site for the given game. + * + * @param {string} gameId + * @param {Rivet.cloud.games.CreateGameCdnSiteRequest} request + * @param {Cdn.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.cdn.createGameCdnSite("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * displayName: "string", + * files: [{}] + * }) */ public async createGameCdnSite( gameId: string, @@ -163,21 +187,23 @@ export class Cdn { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/cdn/sites` + `/cloud/games/${encodeURIComponent(gameId)}/cdn/sites` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.cloud.games.CreateGameCdnSiteRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.cloud.games.CreateGameCdnSiteRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.CreateGameCdnSiteResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.CreateGameCdnSiteResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -190,7 +216,7 @@ export class Cdn { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -200,7 +226,7 @@ export class Cdn { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -210,7 +236,7 @@ export class Cdn { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -220,7 +246,7 @@ export class Cdn { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -230,7 +256,7 @@ export class Cdn { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -240,7 +266,7 @@ export class Cdn { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -271,7 +297,7 @@ export class Cdn { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteRequest.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteRequest.ts index 452a13aad8..82aa30bf40 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteRequest.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface CreateGameCdnSiteRequest { displayName: Rivet.DisplayName; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteResponse.ts index a58517ab01..5ee41abb10 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface CreateGameCdnSiteResponse { siteId: string; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/cdn/types/ListGameCdnSitesResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/cdn/types/ListGameCdnSitesResponse.ts index 40dda9a194..233243a61b 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/cdn/types/ListGameCdnSitesResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/cdn/types/ListGameCdnSitesResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface ListGameCdnSitesResponse { /** A list of CDN site summaries. */ diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/matchmaker/client/Client.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/matchmaker/client/Client.ts index d3bb1b3498..86485bc973 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/matchmaker/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/matchmaker/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../../../environments"; import * as core from "../../../../../../../../core"; -import * as Rivet from "../../../../../../.."; -import * as serializers from "../../../../../../../../serialization"; +import * as Rivet from "../../../../../../../index"; +import * as serializers from "../../../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../../../errors"; +import * as errors from "../../../../../../../../errors/index"; export declare namespace Matchmaker { interface Options { @@ -17,8 +17,12 @@ export declare namespace Matchmaker { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -27,12 +31,23 @@ export class Matchmaker { /** * Exports lobby history over a given query time span. + * + * @param {string} gameId + * @param {Rivet.cloud.games.ExportMatchmakerLobbyHistoryRequest} request + * @param {Matchmaker.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.matchmaker.exportMatchmakerLobbyHistory("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * queryStart: 1000000, + * queryEnd: 1000000 + * }) */ public async exportMatchmakerLobbyHistory( gameId: string, @@ -42,21 +57,23 @@ export class Matchmaker { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/matchmaker/lobbies/export-history` + `/cloud/games/${encodeURIComponent(gameId)}/matchmaker/lobbies/export-history` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.cloud.games.ExportMatchmakerLobbyHistoryRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.cloud.games.ExportMatchmakerLobbyHistoryRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.ExportMatchmakerLobbyHistoryResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.ExportMatchmakerLobbyHistoryResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -69,7 +86,7 @@ export class Matchmaker { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -79,7 +96,7 @@ export class Matchmaker { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -89,7 +106,7 @@ export class Matchmaker { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -99,7 +116,7 @@ export class Matchmaker { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -109,7 +126,7 @@ export class Matchmaker { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -119,7 +136,7 @@ export class Matchmaker { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -152,12 +169,20 @@ export class Matchmaker { /** * Deletes a matchmaker lobby, stopping it immediately. + * + * @param {string} gameId + * @param {string} lobbyId + * @param {Matchmaker.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.matchmaker.deleteMatchmakerLobby("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async deleteMatchmakerLobby( gameId: string, @@ -167,18 +192,20 @@ export class Matchmaker { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/matchmaker/lobbies/${lobbyId}` + `/cloud/games/${encodeURIComponent(gameId)}/matchmaker/lobbies/${encodeURIComponent(lobbyId)}` ), method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.DeleteMatchmakerLobbyResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.DeleteMatchmakerLobbyResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -191,7 +218,7 @@ export class Matchmaker { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -201,7 +228,7 @@ export class Matchmaker { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -211,7 +238,7 @@ export class Matchmaker { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -221,7 +248,7 @@ export class Matchmaker { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -231,7 +258,7 @@ export class Matchmaker { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -241,7 +268,7 @@ export class Matchmaker { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -274,12 +301,24 @@ export class Matchmaker { /** * Returns the logs for a given lobby. + * + * @param {string} gameId + * @param {string} lobbyId + * @param {Rivet.cloud.games.GetLobbyLogsRequest} request + * @param {Matchmaker.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.matchmaker.getLobbyLogs("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * stream: Rivet.cloud.games.LogStream.StdOut, + * watchIndex: "string" + * }) */ public async getLobbyLogs( gameId: string, @@ -288,7 +327,7 @@ export class Matchmaker { requestOptions?: Matchmaker.RequestOptions ): Promise { const { stream, watchIndex } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; _queryParams["stream"] = stream; if (watchIndex != null) { _queryParams["watch_index"] = watchIndex; @@ -297,7 +336,7 @@ export class Matchmaker { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/matchmaker/lobbies/${lobbyId}/logs` + `/cloud/games/${encodeURIComponent(gameId)}/matchmaker/lobbies/${encodeURIComponent(lobbyId)}/logs` ), method: "GET", headers: { @@ -305,11 +344,13 @@ export class Matchmaker { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.GetLobbyLogsResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.GetLobbyLogsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -322,7 +363,7 @@ export class Matchmaker { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -332,7 +373,7 @@ export class Matchmaker { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -342,7 +383,7 @@ export class Matchmaker { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -352,7 +393,7 @@ export class Matchmaker { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -362,7 +403,7 @@ export class Matchmaker { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -372,7 +413,7 @@ export class Matchmaker { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -405,12 +446,23 @@ export class Matchmaker { /** * Generates a download URL for logs. + * + * @param {string} gameId + * @param {string} lobbyId + * @param {Rivet.cloud.games.ExportLobbyLogsRequest} request + * @param {Matchmaker.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.matchmaker.exportLobbyLogs("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * stream: Rivet.cloud.games.LogStream.StdOut + * }) */ public async exportLobbyLogs( gameId: string, @@ -421,21 +473,25 @@ export class Matchmaker { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/matchmaker/lobbies/${lobbyId}/logs/export` + `/cloud/games/${encodeURIComponent(gameId)}/matchmaker/lobbies/${encodeURIComponent( + lobbyId + )}/logs/export` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.cloud.games.ExportLobbyLogsRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.cloud.games.ExportLobbyLogsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.ExportLobbyLogsResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.ExportLobbyLogsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -448,7 +504,7 @@ export class Matchmaker { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -458,7 +514,7 @@ export class Matchmaker { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -468,7 +524,7 @@ export class Matchmaker { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -478,7 +534,7 @@ export class Matchmaker { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -488,7 +544,7 @@ export class Matchmaker { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -498,7 +554,7 @@ export class Matchmaker { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -529,7 +585,7 @@ export class Matchmaker { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/matchmaker/client/requests/GetLobbyLogsRequest.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/matchmaker/client/requests/GetLobbyLogsRequest.ts index f43fc75c4b..201fac731d 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/matchmaker/client/requests/GetLobbyLogsRequest.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/matchmaker/client/requests/GetLobbyLogsRequest.ts @@ -2,8 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../.."; +import * as Rivet from "../../../../../../../../index"; +/** + * @example + * { + * stream: Rivet.cloud.games.LogStream.StdOut, + * watchIndex: "string" + * } + */ export interface GetLobbyLogsRequest { stream: Rivet.cloud.games.LogStream; /** diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/matchmaker/client/requests/index.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/matchmaker/client/requests/index.ts index b25f6f3858..166661ea5e 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/matchmaker/client/requests/index.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/matchmaker/client/requests/index.ts @@ -1 +1 @@ -export { GetLobbyLogsRequest } from "./GetLobbyLogsRequest"; +export { type GetLobbyLogsRequest } from "./GetLobbyLogsRequest"; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/matchmaker/types/ExportLobbyLogsRequest.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/matchmaker/types/ExportLobbyLogsRequest.ts index 65aa4c9439..7c0fae17dc 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/matchmaker/types/ExportLobbyLogsRequest.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/matchmaker/types/ExportLobbyLogsRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface ExportLobbyLogsRequest { stream: Rivet.cloud.games.LogStream; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/matchmaker/types/GetLobbyLogsResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/matchmaker/types/GetLobbyLogsResponse.ts index 84b4b61701..4c303abcac 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/matchmaker/types/GetLobbyLogsResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/matchmaker/types/GetLobbyLogsResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface GetLobbyLogsResponse { /** Sorted old to new. */ diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/client/Client.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/client/Client.ts index 03dda7c2ab..22c94c52a5 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../../../environments"; import * as core from "../../../../../../../../core"; -import * as Rivet from "../../../../../../.."; -import * as serializers from "../../../../../../../../serialization"; +import * as Rivet from "../../../../../../../index"; +import * as serializers from "../../../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../../../errors"; +import * as errors from "../../../../../../../../errors/index"; import { Analytics } from "../resources/analytics/client/Client"; import { Logs } from "../resources/logs/client/Client"; @@ -19,8 +19,12 @@ export declare namespace Namespaces { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -29,12 +33,24 @@ export class Namespaces { /** * Creates a new namespace for the given game. + * + * @param {string} gameId + * @param {Rivet.cloud.games.namespaces.CreateGameNamespaceRequest} request + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.createGameNamespace("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * displayName: "string", + * versionId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + * nameId: "string" + * }) */ public async createGameNamespace( gameId: string, @@ -44,21 +60,23 @@ export class Namespaces { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/namespaces` + `/cloud/games/${encodeURIComponent(gameId)}/namespaces` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.cloud.games.namespaces.CreateGameNamespaceRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.cloud.games.namespaces.CreateGameNamespaceRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.namespaces.CreateGameNamespaceResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.namespaces.CreateGameNamespaceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -71,7 +89,7 @@ export class Namespaces { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -81,7 +99,7 @@ export class Namespaces { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -91,7 +109,7 @@ export class Namespaces { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -101,7 +119,7 @@ export class Namespaces { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -111,7 +129,7 @@ export class Namespaces { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -121,7 +139,7 @@ export class Namespaces { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -154,12 +172,23 @@ export class Namespaces { /** * Validates information used to create a new game namespace. + * + * @param {string} gameId + * @param {Rivet.cloud.games.namespaces.ValidateGameNamespaceRequest} request + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.validateGameNamespace("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * displayName: "string", + * nameId: "string" + * }) */ public async validateGameNamespace( gameId: string, @@ -169,21 +198,23 @@ export class Namespaces { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/namespaces/validate` + `/cloud/games/${encodeURIComponent(gameId)}/namespaces/validate` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.cloud.games.namespaces.ValidateGameNamespaceRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.cloud.games.namespaces.ValidateGameNamespaceRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.namespaces.ValidateGameNamespaceResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.namespaces.ValidateGameNamespaceResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -196,7 +227,7 @@ export class Namespaces { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -206,7 +237,7 @@ export class Namespaces { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -216,7 +247,7 @@ export class Namespaces { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -226,7 +257,7 @@ export class Namespaces { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -236,7 +267,7 @@ export class Namespaces { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -246,7 +277,7 @@ export class Namespaces { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -279,12 +310,20 @@ export class Namespaces { /** * Gets a game namespace by namespace ID. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.getGameNamespaceById("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async getGameNamespaceById( gameId: string, @@ -294,18 +333,20 @@ export class Namespaces { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/namespaces/${namespaceId}` + `/cloud/games/${encodeURIComponent(gameId)}/namespaces/${encodeURIComponent(namespaceId)}` ), method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.namespaces.GetGameNamespaceByIdResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.namespaces.GetGameNamespaceByIdResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -318,7 +359,7 @@ export class Namespaces { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -328,7 +369,7 @@ export class Namespaces { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -338,7 +379,7 @@ export class Namespaces { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -348,7 +389,7 @@ export class Namespaces { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -358,7 +399,7 @@ export class Namespaces { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -368,7 +409,7 @@ export class Namespaces { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -401,12 +442,24 @@ export class Namespaces { /** * Adds an authenticated user to the given game namespace. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {Rivet.cloud.games.namespaces.UpdateNamespaceCdnAuthUserRequest} request + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.updateNamespaceCdnAuthUser("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * user: "string", + * password: "string" + * }) */ public async updateNamespaceCdnAuthUser( gameId: string, @@ -417,18 +470,20 @@ export class Namespaces { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/namespaces/${namespaceId}/auth-user` + `/cloud/games/${encodeURIComponent(gameId)}/namespaces/${encodeURIComponent(namespaceId)}/auth-user` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.cloud.games.namespaces.UpdateNamespaceCdnAuthUserRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.cloud.games.namespaces.UpdateNamespaceCdnAuthUserRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -438,7 +493,7 @@ export class Namespaces { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -448,7 +503,7 @@ export class Namespaces { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -458,7 +513,7 @@ export class Namespaces { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -468,7 +523,7 @@ export class Namespaces { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -478,7 +533,7 @@ export class Namespaces { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -488,7 +543,7 @@ export class Namespaces { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -521,12 +576,21 @@ export class Namespaces { /** * Removes an authenticated user from the given game namespace. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {string} user - A user name. + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.removeNamespaceCdnAuthUser("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "string") */ public async removeNamespaceCdnAuthUser( gameId: string, @@ -537,15 +601,19 @@ export class Namespaces { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/namespaces/${namespaceId}/auth-user/${user}` + `/cloud/games/${encodeURIComponent(gameId)}/namespaces/${encodeURIComponent( + namespaceId + )}/auth-user/${encodeURIComponent(user)}` ), method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -555,7 +623,7 @@ export class Namespaces { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -565,7 +633,7 @@ export class Namespaces { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -575,7 +643,7 @@ export class Namespaces { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -585,7 +653,7 @@ export class Namespaces { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -595,7 +663,7 @@ export class Namespaces { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -605,7 +673,7 @@ export class Namespaces { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -638,12 +706,23 @@ export class Namespaces { /** * Updates the CDN authentication type of the given game namespace. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {Rivet.cloud.games.namespaces.SetNamespaceCdnAuthTypeRequest} request + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.setNamespaceCdnAuthType("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * authType: Rivet.cloud.CdnAuthType.None + * }) */ public async setNamespaceCdnAuthType( gameId: string, @@ -654,18 +733,20 @@ export class Namespaces { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/namespaces/${namespaceId}/cdn-auth` + `/cloud/games/${encodeURIComponent(gameId)}/namespaces/${encodeURIComponent(namespaceId)}/cdn-auth` ), method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.cloud.games.namespaces.SetNamespaceCdnAuthTypeRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.cloud.games.namespaces.SetNamespaceCdnAuthTypeRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -675,7 +756,7 @@ export class Namespaces { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -685,7 +766,7 @@ export class Namespaces { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -695,7 +776,7 @@ export class Namespaces { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -705,7 +786,7 @@ export class Namespaces { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -715,7 +796,7 @@ export class Namespaces { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -725,7 +806,7 @@ export class Namespaces { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -758,12 +839,23 @@ export class Namespaces { /** * Toggles whether or not to allow authentication based on domain for the given game namespace. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {Rivet.cloud.games.namespaces.ToggleNamespaceDomainPublicAuthRequest} request + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.toggleNamespaceDomainPublicAuth("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * enabled: true + * }) */ public async toggleNamespaceDomainPublicAuth( gameId: string, @@ -774,18 +866,22 @@ export class Namespaces { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/namespaces/${namespaceId}/domain-public-auth` + `/cloud/games/${encodeURIComponent(gameId)}/namespaces/${encodeURIComponent( + namespaceId + )}/domain-public-auth` ), method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.cloud.games.namespaces.ToggleNamespaceDomainPublicAuthRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.cloud.games.namespaces.ToggleNamespaceDomainPublicAuthRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -795,7 +891,7 @@ export class Namespaces { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -805,7 +901,7 @@ export class Namespaces { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -815,7 +911,7 @@ export class Namespaces { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -825,7 +921,7 @@ export class Namespaces { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -835,7 +931,7 @@ export class Namespaces { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -845,7 +941,7 @@ export class Namespaces { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -878,12 +974,23 @@ export class Namespaces { /** * Adds a domain to the given game namespace. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {Rivet.cloud.games.namespaces.AddNamespaceDomainRequest} request + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.addNamespaceDomain("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * domain: "string" + * }) */ public async addNamespaceDomain( gameId: string, @@ -894,18 +1001,20 @@ export class Namespaces { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/namespaces/${namespaceId}/domains` + `/cloud/games/${encodeURIComponent(gameId)}/namespaces/${encodeURIComponent(namespaceId)}/domains` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.cloud.games.namespaces.AddNamespaceDomainRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.cloud.games.namespaces.AddNamespaceDomainRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -915,7 +1024,7 @@ export class Namespaces { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -925,7 +1034,7 @@ export class Namespaces { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -935,7 +1044,7 @@ export class Namespaces { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -945,7 +1054,7 @@ export class Namespaces { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -955,7 +1064,7 @@ export class Namespaces { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -965,7 +1074,7 @@ export class Namespaces { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -998,12 +1107,21 @@ export class Namespaces { /** * Removes a domain from the given game namespace. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {string} domain - A valid domain name (no protocol). + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.removeNamespaceDomain("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "string") */ public async removeNamespaceDomain( gameId: string, @@ -1014,15 +1132,19 @@ export class Namespaces { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/namespaces/${namespaceId}/domains/${domain}` + `/cloud/games/${encodeURIComponent(gameId)}/namespaces/${encodeURIComponent( + namespaceId + )}/domains/${encodeURIComponent(domain)}` ), method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -1032,7 +1154,7 @@ export class Namespaces { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1042,7 +1164,7 @@ export class Namespaces { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1052,7 +1174,7 @@ export class Namespaces { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1062,7 +1184,7 @@ export class Namespaces { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1072,7 +1194,7 @@ export class Namespaces { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1082,7 +1204,7 @@ export class Namespaces { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1115,12 +1237,24 @@ export class Namespaces { /** * Updates matchmaker config for the given game namespace. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {Rivet.cloud.games.namespaces.UpdateGameNamespaceMatchmakerConfigRequest} request + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.updateGameNamespaceMatchmakerConfig("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * lobbyCountMax: 1, + * maxPlayers: 1 + * }) */ public async updateGameNamespaceMatchmakerConfig( gameId: string, @@ -1131,19 +1265,20 @@ export class Namespaces { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/namespaces/${namespaceId}/mm-config` + `/cloud/games/${encodeURIComponent(gameId)}/namespaces/${encodeURIComponent(namespaceId)}/mm-config` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.cloud.games.namespaces.UpdateGameNamespaceMatchmakerConfigRequest.jsonOrThrow( - request, - { unrecognizedObjectKeys: "strip" } - ), + requestType: "json", + body: serializers.cloud.games.namespaces.UpdateGameNamespaceMatchmakerConfigRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "strip", + }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -1153,7 +1288,7 @@ export class Namespaces { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1163,7 +1298,7 @@ export class Namespaces { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1173,7 +1308,7 @@ export class Namespaces { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1183,7 +1318,7 @@ export class Namespaces { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1193,7 +1328,7 @@ export class Namespaces { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1203,7 +1338,7 @@ export class Namespaces { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1236,12 +1371,24 @@ export class Namespaces { /** * Gets the version history for a given namespace. + * + * @param {string} gameId - A universally unique identifier. + * @param {string} namespaceId - A universally unique identifier. + * @param {Rivet.cloud.games.namespaces.GetGameNamespaceVersionHistoryRequest} request + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.getGameNamespaceVersionHistoryList("string", "string", { + * anchor: "string", + * limit: 1 + * }) */ public async getGameNamespaceVersionHistoryList( gameId: string, @@ -1250,7 +1397,7 @@ export class Namespaces { requestOptions?: Namespaces.RequestOptions ): Promise { const { anchor, limit } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (anchor != null) { _queryParams["anchor"] = anchor; } @@ -1262,7 +1409,9 @@ export class Namespaces { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/namespaces/${namespaceId}/version-history` + `/cloud/games/${encodeURIComponent(gameId)}/namespaces/${encodeURIComponent( + namespaceId + )}/version-history` ), method: "GET", headers: { @@ -1270,11 +1419,13 @@ export class Namespaces { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.namespaces.GetGameNamespaceVersionHistoryResponse.parseOrThrow( + return serializers.cloud.games.namespaces.GetGameNamespaceVersionHistoryResponse.parseOrThrow( _response.body, { unrecognizedObjectKeys: "passthrough", @@ -1290,7 +1441,7 @@ export class Namespaces { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1300,7 +1451,7 @@ export class Namespaces { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1310,7 +1461,7 @@ export class Namespaces { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1320,7 +1471,7 @@ export class Namespaces { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1330,7 +1481,7 @@ export class Namespaces { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1340,7 +1491,7 @@ export class Namespaces { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1373,12 +1524,24 @@ export class Namespaces { /** * Validates information used to update a game namespace's matchmaker config. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {Rivet.cloud.games.namespaces.ValidateGameNamespaceMatchmakerConfigRequest} request + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.validateGameNamespaceMatchmakerConfig("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * lobbyCountMax: 1, + * maxPlayers: 1 + * }) */ public async validateGameNamespaceMatchmakerConfig( gameId: string, @@ -1389,22 +1552,25 @@ export class Namespaces { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/namespaces/${namespaceId}/mm-config/validate` + `/cloud/games/${encodeURIComponent(gameId)}/namespaces/${encodeURIComponent( + namespaceId + )}/mm-config/validate` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.cloud.games.namespaces.ValidateGameNamespaceMatchmakerConfigRequest.jsonOrThrow( - request, - { unrecognizedObjectKeys: "strip" } - ), + requestType: "json", + body: serializers.cloud.games.namespaces.ValidateGameNamespaceMatchmakerConfigRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "strip", + }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.namespaces.ValidateGameNamespaceMatchmakerConfigResponse.parseOrThrow( + return serializers.cloud.games.namespaces.ValidateGameNamespaceMatchmakerConfigResponse.parseOrThrow( _response.body, { unrecognizedObjectKeys: "passthrough", @@ -1420,7 +1586,7 @@ export class Namespaces { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1430,7 +1596,7 @@ export class Namespaces { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1440,7 +1606,7 @@ export class Namespaces { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1450,7 +1616,7 @@ export class Namespaces { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1460,7 +1626,7 @@ export class Namespaces { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1470,7 +1636,7 @@ export class Namespaces { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1503,12 +1669,27 @@ export class Namespaces { /** * Creates a development token for the given namespace. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {Rivet.cloud.games.namespaces.CreateGameNamespaceTokenDevelopmentRequest} request + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.createGameNamespaceTokenDevelopment("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * hostname: "string", + * ports: { + * "string": {} + * }, + * lobbyPorts: [{}] + * }) */ public async createGameNamespaceTokenDevelopment( gameId: string, @@ -1519,22 +1700,25 @@ export class Namespaces { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/namespaces/${namespaceId}/tokens/development` + `/cloud/games/${encodeURIComponent(gameId)}/namespaces/${encodeURIComponent( + namespaceId + )}/tokens/development` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.cloud.games.namespaces.CreateGameNamespaceTokenDevelopmentRequest.jsonOrThrow( - request, - { unrecognizedObjectKeys: "strip" } - ), + requestType: "json", + body: serializers.cloud.games.namespaces.CreateGameNamespaceTokenDevelopmentRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "strip", + }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.namespaces.CreateGameNamespaceTokenDevelopmentResponse.parseOrThrow( + return serializers.cloud.games.namespaces.CreateGameNamespaceTokenDevelopmentResponse.parseOrThrow( _response.body, { unrecognizedObjectKeys: "passthrough", @@ -1550,7 +1734,7 @@ export class Namespaces { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1560,7 +1744,7 @@ export class Namespaces { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1570,7 +1754,7 @@ export class Namespaces { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1580,7 +1764,7 @@ export class Namespaces { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1590,7 +1774,7 @@ export class Namespaces { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1600,7 +1784,7 @@ export class Namespaces { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1633,12 +1817,24 @@ export class Namespaces { /** * Validates information used to create a new game namespace development token. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {Rivet.cloud.games.namespaces.ValidateGameNamespaceTokenDevelopmentRequest} request + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.validateGameNamespaceTokenDevelopment("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * hostname: "string", + * lobbyPorts: [{}] + * }) */ public async validateGameNamespaceTokenDevelopment( gameId: string, @@ -1649,22 +1845,25 @@ export class Namespaces { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/namespaces/${namespaceId}/tokens/development/validate` + `/cloud/games/${encodeURIComponent(gameId)}/namespaces/${encodeURIComponent( + namespaceId + )}/tokens/development/validate` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.cloud.games.namespaces.ValidateGameNamespaceTokenDevelopmentRequest.jsonOrThrow( - request, - { unrecognizedObjectKeys: "strip" } - ), + requestType: "json", + body: serializers.cloud.games.namespaces.ValidateGameNamespaceTokenDevelopmentRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "strip", + }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.namespaces.ValidateGameNamespaceTokenDevelopmentResponse.parseOrThrow( + return serializers.cloud.games.namespaces.ValidateGameNamespaceTokenDevelopmentResponse.parseOrThrow( _response.body, { unrecognizedObjectKeys: "passthrough", @@ -1680,7 +1879,7 @@ export class Namespaces { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1690,7 +1889,7 @@ export class Namespaces { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1700,7 +1899,7 @@ export class Namespaces { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1710,7 +1909,7 @@ export class Namespaces { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1720,7 +1919,7 @@ export class Namespaces { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1730,7 +1929,7 @@ export class Namespaces { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1763,12 +1962,20 @@ export class Namespaces { /** * Creates a public token for the given namespace. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.createGameNamespaceTokenPublic("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async createGameNamespaceTokenPublic( gameId: string, @@ -1778,18 +1985,20 @@ export class Namespaces { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/namespaces/${namespaceId}/tokens/public` + `/cloud/games/${encodeURIComponent(gameId)}/namespaces/${encodeURIComponent(namespaceId)}/tokens/public` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.namespaces.CreateGameNamespaceTokenPublicResponse.parseOrThrow( + return serializers.cloud.games.namespaces.CreateGameNamespaceTokenPublicResponse.parseOrThrow( _response.body, { unrecognizedObjectKeys: "passthrough", @@ -1805,7 +2014,7 @@ export class Namespaces { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1815,7 +2024,7 @@ export class Namespaces { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1825,7 +2034,7 @@ export class Namespaces { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1835,7 +2044,7 @@ export class Namespaces { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1845,7 +2054,7 @@ export class Namespaces { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1855,7 +2064,7 @@ export class Namespaces { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1888,12 +2097,23 @@ export class Namespaces { /** * Updates the version of a game namespace. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {Rivet.cloud.games.namespaces.UpdateGameNamespaceVersionRequest} request + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.updateGameNamespaceVersion("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * versionId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * }) */ public async updateGameNamespaceVersion( gameId: string, @@ -1904,18 +2124,20 @@ export class Namespaces { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/namespaces/${namespaceId}/version` + `/cloud/games/${encodeURIComponent(gameId)}/namespaces/${encodeURIComponent(namespaceId)}/version` ), method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.cloud.games.namespaces.UpdateGameNamespaceVersionRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.cloud.games.namespaces.UpdateGameNamespaceVersionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -1925,7 +2147,7 @@ export class Namespaces { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1935,7 +2157,7 @@ export class Namespaces { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1945,7 +2167,7 @@ export class Namespaces { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1955,7 +2177,7 @@ export class Namespaces { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1965,7 +2187,7 @@ export class Namespaces { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1975,7 +2197,7 @@ export class Namespaces { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2018,7 +2240,7 @@ export class Namespaces { return (this._logs ??= new Logs(this._options)); } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/client/requests/GetGameNamespaceVersionHistoryRequest.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/client/requests/GetGameNamespaceVersionHistoryRequest.ts index bcc8998d74..297be1cdaa 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/client/requests/GetGameNamespaceVersionHistoryRequest.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/client/requests/GetGameNamespaceVersionHistoryRequest.ts @@ -2,6 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * anchor: "string", + * limit: 1 + * } + */ export interface GetGameNamespaceVersionHistoryRequest { /** * How many items to offset the search by. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/client/requests/index.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/client/requests/index.ts index 77351bf9be..8f1ae1ae03 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/client/requests/index.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/client/requests/index.ts @@ -1 +1 @@ -export { GetGameNamespaceVersionHistoryRequest } from "./GetGameNamespaceVersionHistoryRequest"; +export { type GetGameNamespaceVersionHistoryRequest } from "./GetGameNamespaceVersionHistoryRequest"; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/analytics/client/Client.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/analytics/client/Client.ts index 3e5751bddf..7504459345 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/analytics/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/analytics/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../../../../../environments"; import * as core from "../../../../../../../../../../core"; -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../../../../../serialization"; -import * as errors from "../../../../../../../../../../errors"; +import * as serializers from "../../../../../../../../../../serialization/index"; +import * as errors from "../../../../../../../../../../errors/index"; export declare namespace Analytics { interface Options { @@ -17,8 +17,12 @@ export declare namespace Analytics { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -27,12 +31,20 @@ export class Analytics { /** * Returns live information about all active lobbies for a given namespace. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {Analytics.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.analytics.getAnalyticsMatchmakerLive("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async getAnalyticsMatchmakerLive( gameId: string, @@ -42,34 +54,35 @@ export class Analytics { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/namespaces/${namespaceId}/analytics/matchmaker/live` + `/cloud/games/${encodeURIComponent(gameId)}/namespaces/${encodeURIComponent( + namespaceId + )}/analytics/matchmaker/live` ), method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.namespaces.GetAnalyticsMatchmakerLiveResponse.parseOrThrow( - _response.body, - { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - } - ); + return serializers.cloud.games.namespaces.GetAnalyticsMatchmakerLiveResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); } if (_response.error.reason === "status-code") { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -79,7 +92,7 @@ export class Analytics { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -89,7 +102,7 @@ export class Analytics { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -99,7 +112,7 @@ export class Analytics { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -109,7 +122,7 @@ export class Analytics { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -119,7 +132,7 @@ export class Analytics { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -150,7 +163,7 @@ export class Analytics { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/analytics/types/GetAnalyticsMatchmakerLiveResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/analytics/types/GetAnalyticsMatchmakerLiveResponse.ts index 2d01be11f1..e5072d1c21 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/analytics/types/GetAnalyticsMatchmakerLiveResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/analytics/types/GetAnalyticsMatchmakerLiveResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; export interface GetAnalyticsMatchmakerLiveResponse { /** A list of analytics lobby summaries. */ diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/logs/client/Client.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/logs/client/Client.ts index c59613c483..8736d0d426 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/logs/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/logs/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../../../../../environments"; import * as core from "../../../../../../../../../../core"; -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../../../../../serialization"; -import * as errors from "../../../../../../../../../../errors"; +import * as serializers from "../../../../../../../../../../serialization/index"; +import * as errors from "../../../../../../../../../../errors/index"; export declare namespace Logs { interface Options { @@ -17,8 +17,12 @@ export declare namespace Logs { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -27,12 +31,23 @@ export class Logs { /** * Returns a list of lobbies for the given game namespace. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {Rivet.cloud.games.namespaces.ListNamespaceLobbiesRequest} request + * @param {Logs.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.logs.listNamespaceLobbies("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * beforeCreateTs: new Date("2024-01-15T09:30:00.000Z") + * }) */ public async listNamespaceLobbies( gameId: string, @@ -41,7 +56,7 @@ export class Logs { requestOptions?: Logs.RequestOptions ): Promise { const { beforeCreateTs } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (beforeCreateTs != null) { _queryParams["before_create_ts"] = beforeCreateTs.toISOString(); } @@ -49,7 +64,7 @@ export class Logs { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/namespaces/${namespaceId}/logs/lobbies` + `/cloud/games/${encodeURIComponent(gameId)}/namespaces/${encodeURIComponent(namespaceId)}/logs/lobbies` ), method: "GET", headers: { @@ -57,11 +72,13 @@ export class Logs { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.namespaces.ListNamespaceLobbiesResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.namespaces.ListNamespaceLobbiesResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -74,7 +91,7 @@ export class Logs { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -84,7 +101,7 @@ export class Logs { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -94,7 +111,7 @@ export class Logs { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -104,7 +121,7 @@ export class Logs { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -114,7 +131,7 @@ export class Logs { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -124,7 +141,7 @@ export class Logs { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -157,12 +174,21 @@ export class Logs { /** * Returns a lobby from the given game namespace. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {string} lobbyId + * @param {Logs.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.logs.getNamespaceLobby("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async getNamespaceLobby( gameId: string, @@ -173,18 +199,22 @@ export class Logs { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/namespaces/${namespaceId}/logs/lobbies/${lobbyId}` + `/cloud/games/${encodeURIComponent(gameId)}/namespaces/${encodeURIComponent( + namespaceId + )}/logs/lobbies/${encodeURIComponent(lobbyId)}` ), method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.namespaces.GetNamespaceLobbyResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.namespaces.GetNamespaceLobbyResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -197,7 +227,7 @@ export class Logs { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -207,7 +237,7 @@ export class Logs { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -217,7 +247,7 @@ export class Logs { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -227,7 +257,7 @@ export class Logs { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -237,7 +267,7 @@ export class Logs { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -247,7 +277,7 @@ export class Logs { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -278,7 +308,7 @@ export class Logs { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/logs/client/requests/ListNamespaceLobbiesRequest.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/logs/client/requests/ListNamespaceLobbiesRequest.ts index dd9c830ba3..225936f304 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/logs/client/requests/ListNamespaceLobbiesRequest.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/logs/client/requests/ListNamespaceLobbiesRequest.ts @@ -2,8 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../../index"; +/** + * @example + * { + * beforeCreateTs: new Date("2024-01-15T09:30:00.000Z") + * } + */ export interface ListNamespaceLobbiesRequest { /** * Returns lobbies created before this timestamp. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/logs/client/requests/index.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/logs/client/requests/index.ts index ab8d0d8c68..48fe31200d 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/logs/client/requests/index.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/logs/client/requests/index.ts @@ -1 +1 @@ -export { ListNamespaceLobbiesRequest } from "./ListNamespaceLobbiesRequest"; +export { type ListNamespaceLobbiesRequest } from "./ListNamespaceLobbiesRequest"; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/logs/types/GetNamespaceLobbyResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/logs/types/GetNamespaceLobbyResponse.ts index d6a67314d9..f45c6c7550 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/logs/types/GetNamespaceLobbyResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/logs/types/GetNamespaceLobbyResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; export interface GetNamespaceLobbyResponse { lobby: Rivet.cloud.LogsLobbySummary; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/logs/types/ListNamespaceLobbiesResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/logs/types/ListNamespaceLobbiesResponse.ts index 394b735352..cc69dba96f 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/logs/types/ListNamespaceLobbiesResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/resources/logs/types/ListNamespaceLobbiesResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; export interface ListNamespaceLobbiesResponse { /** A list of lobby log summaries. */ diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceRequest.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceRequest.ts index c95c3c8bb5..cd67c00414 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceRequest.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface CreateGameNamespaceRequest { displayName: Rivet.DisplayName; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenDevelopmentRequest.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenDevelopmentRequest.ts index 03c10d8987..e535c48f67 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenDevelopmentRequest.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenDevelopmentRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface CreateGameNamespaceTokenDevelopmentRequest { /** The hostname used for the token. */ diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceByIdResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceByIdResponse.ts index 7b0e3809ce..6bc7866af7 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceByIdResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceByIdResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface GetGameNamespaceByIdResponse { namespace: Rivet.cloud.NamespaceFull; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceVersionHistoryResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceVersionHistoryResponse.ts index 57188a734c..afc68ed32d 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceVersionHistoryResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceVersionHistoryResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface GetGameNamespaceVersionHistoryResponse { /** A list of previously deployed namespace versions. */ diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/InspectResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/InspectResponse.ts index 2b42f3aeb8..d1a0e54e4e 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/InspectResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/InspectResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface InspectResponse { agent: Rivet.cloud.AuthAgent; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/SetNamespaceCdnAuthTypeRequest.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/SetNamespaceCdnAuthTypeRequest.ts index f455caa7c3..f43e6bd78e 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/SetNamespaceCdnAuthTypeRequest.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/SetNamespaceCdnAuthTypeRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface SetNamespaceCdnAuthTypeRequest { authType: Rivet.cloud.CdnAuthType; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceMatchmakerConfigResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceMatchmakerConfigResponse.ts index bca6616c65..e8c4cb3635 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceMatchmakerConfigResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceMatchmakerConfigResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface ValidateGameNamespaceMatchmakerConfigResponse { /** A list of validation errors. */ diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceRequest.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceRequest.ts index 77fd1a1428..dfa38b0dbd 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceRequest.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface ValidateGameNamespaceRequest { displayName: Rivet.DisplayName; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceResponse.ts index f67f7421c5..d0742e0130 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface ValidateGameNamespaceResponse { /** A list of validation errors. */ diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentRequest.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentRequest.ts index 285601a5ca..2765f05893 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentRequest.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface ValidateGameNamespaceTokenDevelopmentRequest { hostname: string; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentResponse.ts index f291f3503d..a511c2ba58 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface ValidateGameNamespaceTokenDevelopmentResponse { /** A list of validation errors. */ diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/tokens/client/Client.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/tokens/client/Client.ts index 917470d631..f53a7f0e97 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/tokens/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/tokens/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../../../environments"; import * as core from "../../../../../../../../core"; -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../../../serialization"; -import * as errors from "../../../../../../../../errors"; +import * as serializers from "../../../../../../../../serialization/index"; +import * as errors from "../../../../../../../../errors/index"; export declare namespace Tokens { interface Options { @@ -17,8 +17,12 @@ export declare namespace Tokens { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -27,12 +31,19 @@ export class Tokens { /** * Creates a new game cloud token. + * + * @param {string} gameId + * @param {Tokens.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.tokens.createCloudToken("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async createCloudToken( gameId: string, @@ -41,18 +52,20 @@ export class Tokens { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/tokens/cloud` + `/cloud/games/${encodeURIComponent(gameId)}/tokens/cloud` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.CreateCloudTokenResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.CreateCloudTokenResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -65,7 +78,7 @@ export class Tokens { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -75,7 +88,7 @@ export class Tokens { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -85,7 +98,7 @@ export class Tokens { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -95,7 +108,7 @@ export class Tokens { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -105,7 +118,7 @@ export class Tokens { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -115,7 +128,7 @@ export class Tokens { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -148,12 +161,19 @@ export class Tokens { /** * Creates a new game service token. + * + * @param {string} gameId + * @param {Tokens.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.tokens.createServiceToken("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async createServiceToken( gameId: string, @@ -162,18 +182,20 @@ export class Tokens { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/tokens/service` + `/cloud/games/${encodeURIComponent(gameId)}/tokens/service` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.CreateCloudTokenResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.CreateCloudTokenResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -186,7 +208,7 @@ export class Tokens { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -196,7 +218,7 @@ export class Tokens { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -206,7 +228,7 @@ export class Tokens { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -216,7 +238,7 @@ export class Tokens { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -226,7 +248,7 @@ export class Tokens { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -236,7 +258,7 @@ export class Tokens { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -267,7 +289,7 @@ export class Tokens { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/versions/client/Client.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/versions/client/Client.ts index 1e3f43fceb..6ada03414a 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/versions/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/versions/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../../../environments"; import * as core from "../../../../../../../../core"; -import * as Rivet from "../../../../../../.."; -import * as serializers from "../../../../../../../../serialization"; +import * as Rivet from "../../../../../../../index"; +import * as serializers from "../../../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../../../errors"; +import * as errors from "../../../../../../../../errors/index"; export declare namespace Versions { interface Options { @@ -17,8 +17,12 @@ export declare namespace Versions { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -27,12 +31,32 @@ export class Versions { /** * Creates a new game version. + * + * @param {string} gameId + * @param {Rivet.cloud.games.CreateGameVersionRequest} request + * @param {Versions.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.versions.createGameVersion("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * displayName: "string", + * config: { + * scripts: { + * "string": "string" + * }, + * engine: {}, + * cdn: {}, + * matchmaker: {}, + * kv: {}, + * identity: {} + * } + * }) */ public async createGameVersion( gameId: string, @@ -42,21 +66,23 @@ export class Versions { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/versions` + `/cloud/games/${encodeURIComponent(gameId)}/versions` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.cloud.games.CreateGameVersionRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.cloud.games.CreateGameVersionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.CreateGameVersionResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.CreateGameVersionResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -69,7 +95,7 @@ export class Versions { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -79,7 +105,7 @@ export class Versions { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -89,7 +115,7 @@ export class Versions { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -99,7 +125,7 @@ export class Versions { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -109,7 +135,7 @@ export class Versions { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -119,7 +145,7 @@ export class Versions { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -152,12 +178,19 @@ export class Versions { /** * Reserves a display name for the next version. Used to generate a monotomically increasing build number without causing a race condition with multiple versions getting created at the same time. + * + * @param {string} gameId + * @param {Versions.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.versions.reserveVersionName("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async reserveVersionName( gameId: string, @@ -166,18 +199,20 @@ export class Versions { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/versions/reserve-name` + `/cloud/games/${encodeURIComponent(gameId)}/versions/reserve-name` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.ReserveVersionNameResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.ReserveVersionNameResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -190,7 +225,7 @@ export class Versions { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -200,7 +235,7 @@ export class Versions { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -210,7 +245,7 @@ export class Versions { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -220,7 +255,7 @@ export class Versions { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -230,7 +265,7 @@ export class Versions { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -240,7 +275,7 @@ export class Versions { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -273,12 +308,32 @@ export class Versions { /** * Validates information used to create a new game version. + * + * @param {string} gameId + * @param {Rivet.cloud.games.ValidateGameVersionRequest} request + * @param {Versions.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.versions.validateGameVersion("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * displayName: "string", + * config: { + * scripts: { + * "string": "string" + * }, + * engine: {}, + * cdn: {}, + * matchmaker: {}, + * kv: {}, + * identity: {} + * } + * }) */ public async validateGameVersion( gameId: string, @@ -288,21 +343,23 @@ export class Versions { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/versions/validate` + `/cloud/games/${encodeURIComponent(gameId)}/versions/validate` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.cloud.games.ValidateGameVersionRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.cloud.games.ValidateGameVersionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.ValidateGameVersionResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.ValidateGameVersionResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -315,7 +372,7 @@ export class Versions { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -325,7 +382,7 @@ export class Versions { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -335,7 +392,7 @@ export class Versions { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -345,7 +402,7 @@ export class Versions { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -355,7 +412,7 @@ export class Versions { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -365,7 +422,7 @@ export class Versions { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -398,12 +455,20 @@ export class Versions { /** * Returns a game version by its version ID. + * + * @param {string} gameId + * @param {string} versionId + * @param {Versions.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.versions.getGameVersionById("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async getGameVersionById( gameId: string, @@ -413,18 +478,20 @@ export class Versions { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/games/${gameId}/versions/${versionId}` + `/cloud/games/${encodeURIComponent(gameId)}/versions/${encodeURIComponent(versionId)}` ), method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.games.GetGameVersionByIdResponse.parseOrThrow(_response.body, { + return serializers.cloud.games.GetGameVersionByIdResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -437,7 +504,7 @@ export class Versions { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -447,7 +514,7 @@ export class Versions { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -457,7 +524,7 @@ export class Versions { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -467,7 +534,7 @@ export class Versions { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -477,7 +544,7 @@ export class Versions { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -487,7 +554,7 @@ export class Versions { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -518,7 +585,7 @@ export class Versions { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/versions/types/CreateGameVersionRequest.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/versions/types/CreateGameVersionRequest.ts index de8b72ec15..0dadc7fb72 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/versions/types/CreateGameVersionRequest.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/versions/types/CreateGameVersionRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface CreateGameVersionRequest { displayName: Rivet.DisplayName; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/versions/types/GetGameVersionByIdResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/versions/types/GetGameVersionByIdResponse.ts index b70bc3b0d2..930c5f13c9 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/versions/types/GetGameVersionByIdResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/versions/types/GetGameVersionByIdResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface GetGameVersionByIdResponse { version: Rivet.cloud.version.Full; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/versions/types/ReserveVersionNameResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/versions/types/ReserveVersionNameResponse.ts index 0140d3e11a..0a26e024e6 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/versions/types/ReserveVersionNameResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/versions/types/ReserveVersionNameResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface ReserveVersionNameResponse { versionDisplayName: Rivet.DisplayName; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionRequest.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionRequest.ts index 88caa06e1d..f0de299773 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionRequest.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface ValidateGameVersionRequest { displayName: Rivet.DisplayName; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionResponse.ts index 2f43a8f817..6bdaf90893 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface ValidateGameVersionResponse { /** A list of validation errors. */ diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/types/CreateGameRequest.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/types/CreateGameRequest.ts index 0221aa99e9..d6e183a6aa 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/types/CreateGameRequest.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/types/CreateGameRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface CreateGameRequest { /** **Deprecated** */ diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/types/GameBannerUploadPrepareResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/types/GameBannerUploadPrepareResponse.ts index 5943a0606f..82c10937f7 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/types/GameBannerUploadPrepareResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/types/GameBannerUploadPrepareResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GameBannerUploadPrepareResponse { uploadId: string; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/types/GameLogoUploadPrepareResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/types/GameLogoUploadPrepareResponse.ts index 71a50da80a..60cbc693d9 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/types/GameLogoUploadPrepareResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/types/GameLogoUploadPrepareResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GameLogoUploadPrepareResponse { uploadId: string; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/types/GetGameByIdResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/types/GetGameByIdResponse.ts index e4b156dc25..d55c41bc68 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/types/GetGameByIdResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/types/GetGameByIdResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GetGameByIdResponse { game: Rivet.cloud.GameFull; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/types/GetGamesResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/types/GetGamesResponse.ts index 456289f59a..49c9f5e91b 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/types/GetGamesResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/types/GetGamesResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GetGamesResponse { /** A list of game summaries. */ diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/types/ValidateGameRequest.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/types/ValidateGameRequest.ts index 85bcfc4356..72ad6df8d0 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/types/ValidateGameRequest.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/types/ValidateGameRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface ValidateGameRequest { displayName: Rivet.DisplayName; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/games/types/ValidateGameResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/games/types/ValidateGameResponse.ts index 631cf1c026..b824935591 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/games/types/ValidateGameResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/games/types/ValidateGameResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface ValidateGameResponse { /** A list of validation errors. */ diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/groups/client/Client.ts b/sdks/full/typescript/src/api/resources/cloud/resources/groups/client/Client.ts index 1defde7da5..00b88cde08 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/groups/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/groups/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Rivet from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace Groups { interface Options { @@ -17,8 +17,12 @@ export declare namespace Groups { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -27,12 +31,21 @@ export class Groups { /** * Validates information used to create a new group. + * + * @param {Rivet.cloud.ValidateGroupRequest} request + * @param {Groups.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.groups.validate({ + * displayName: "string" + * }) */ public async validate( request: Rivet.cloud.ValidateGroupRequest, @@ -48,14 +61,14 @@ export class Groups { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.cloud.ValidateGroupRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.cloud.ValidateGroupRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.ValidateGroupResponse.parseOrThrow(_response.body, { + return serializers.cloud.ValidateGroupResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -68,7 +81,7 @@ export class Groups { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -78,7 +91,7 @@ export class Groups { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -88,7 +101,7 @@ export class Groups { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -98,7 +111,7 @@ export class Groups { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -108,7 +121,7 @@ export class Groups { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -118,7 +131,7 @@ export class Groups { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -149,7 +162,7 @@ export class Groups { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/groups/types/ValidateGroupRequest.ts b/sdks/full/typescript/src/api/resources/cloud/resources/groups/types/ValidateGroupRequest.ts index 9c3bccf9c3..ec0e2a4661 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/groups/types/ValidateGroupRequest.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/groups/types/ValidateGroupRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface ValidateGroupRequest { displayName: Rivet.DisplayName; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/groups/types/ValidateGroupResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/groups/types/ValidateGroupResponse.ts index f36add7f48..f02f17de8e 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/groups/types/ValidateGroupResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/groups/types/ValidateGroupResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface ValidateGroupResponse { /** A list of validation errors. */ diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/logs/client/Client.ts b/sdks/full/typescript/src/api/resources/cloud/resources/logs/client/Client.ts index 5bab56e310..fe1765e41c 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/logs/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/logs/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Logs { interface Options { @@ -17,8 +17,12 @@ export declare namespace Logs { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -27,12 +31,19 @@ export class Logs { /** * Returns performance information about a Rivet Ray. + * + * @param {string} rayId + * @param {Logs.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.logs.getRayPerfLogs("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async getRayPerfLogs( rayId: string, @@ -41,18 +52,20 @@ export class Logs { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/rays/${rayId}/perf` + `/cloud/rays/${encodeURIComponent(rayId)}/perf` ), method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.GetRayPerfLogsResponse.parseOrThrow(_response.body, { + return serializers.cloud.GetRayPerfLogsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -65,7 +78,7 @@ export class Logs { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -75,7 +88,7 @@ export class Logs { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -85,7 +98,7 @@ export class Logs { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -95,7 +108,7 @@ export class Logs { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -105,7 +118,7 @@ export class Logs { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -115,7 +128,7 @@ export class Logs { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -146,7 +159,7 @@ export class Logs { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/logs/types/GetRayPerfLogsResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/logs/types/GetRayPerfLogsResponse.ts index a9e8307422..b68843b6d5 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/logs/types/GetRayPerfLogsResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/logs/types/GetRayPerfLogsResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GetRayPerfLogsResponse { /** A list of service performance summaries. */ diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/tiers/client/Client.ts b/sdks/full/typescript/src/api/resources/cloud/resources/tiers/client/Client.ts index 292ea2442e..f57413c8c7 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/tiers/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/tiers/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Tiers { interface Options { @@ -17,8 +17,12 @@ export declare namespace Tiers { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -27,12 +31,18 @@ export class Tiers { /** * Returns all available region tiers. + * + * @param {Tiers.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.tiers.getRegionTiers() */ public async getRegionTiers(requestOptions?: Tiers.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -45,11 +55,13 @@ export class Tiers { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.cloud.GetRegionTiersResponse.parseOrThrow(_response.body, { + return serializers.cloud.GetRegionTiersResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -62,7 +74,7 @@ export class Tiers { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -72,7 +84,7 @@ export class Tiers { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -82,7 +94,7 @@ export class Tiers { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -92,7 +104,7 @@ export class Tiers { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -102,7 +114,7 @@ export class Tiers { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -112,7 +124,7 @@ export class Tiers { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -143,7 +155,7 @@ export class Tiers { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/tiers/types/GetRegionTiersResponse.ts b/sdks/full/typescript/src/api/resources/cloud/resources/tiers/types/GetRegionTiersResponse.ts index bf65e97066..35032c1e34 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/tiers/types/GetRegionTiersResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/tiers/types/GetRegionTiersResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GetRegionTiersResponse { /** A list of region server tiers. */ diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/uploads/client/Client.ts b/sdks/full/typescript/src/api/resources/cloud/resources/uploads/client/Client.ts index dec4e22b20..6f7171fbae 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/uploads/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/uploads/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; -import * as serializers from "../../../../../../serialization"; +import * as errors from "../../../../../../errors/index"; +import * as serializers from "../../../../../../serialization/index"; export declare namespace Uploads { interface Options { @@ -17,8 +17,12 @@ export declare namespace Uploads { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -27,26 +31,35 @@ export class Uploads { /** * Marks an upload as complete. + * + * @param {string} uploadId + * @param {Uploads.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.uploads.completeUpload("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async completeUpload(uploadId: string, requestOptions?: Uploads.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/cloud/uploads/${uploadId}/complete` + `/cloud/uploads/${encodeURIComponent(uploadId)}/complete` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -56,7 +69,7 @@ export class Uploads { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -66,7 +79,7 @@ export class Uploads { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -76,7 +89,7 @@ export class Uploads { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -86,7 +99,7 @@ export class Uploads { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -96,7 +109,7 @@ export class Uploads { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -106,7 +119,7 @@ export class Uploads { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -137,7 +150,7 @@ export class Uploads { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/cdn/types/Config.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/cdn/types/Config.ts index 9eec984f2d..d09a224ecf 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/cdn/types/Config.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/cdn/types/Config.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; /** * CDN configuration for a given version. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/cdn/types/CustomHeadersMiddleware.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/cdn/types/CustomHeadersMiddleware.ts index 6e7a17033a..2a478be9de 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/cdn/types/CustomHeadersMiddleware.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/cdn/types/CustomHeadersMiddleware.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface CustomHeadersMiddleware { headers: Rivet.cloud.version.cdn.Header[]; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/cdn/types/Middleware.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/cdn/types/Middleware.ts index 96987f9b18..3ffb62c1f3 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/cdn/types/Middleware.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/cdn/types/Middleware.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface Middleware { kind: Rivet.cloud.version.cdn.MiddlewareKind; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/cdn/types/MiddlewareKind.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/cdn/types/MiddlewareKind.ts index c82fc2c35d..50a7ea7dba 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/cdn/types/MiddlewareKind.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/cdn/types/MiddlewareKind.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface MiddlewareKind { customHeaders?: Rivet.cloud.version.cdn.CustomHeadersMiddleware; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/cdn/types/Route.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/cdn/types/Route.ts index 13c87723d9..63f5660840 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/cdn/types/Route.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/cdn/types/Route.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface Route { glob: string; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/engine/types/Config.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/engine/types/Config.ts index 5f1fc1155c..7ed871c5d0 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/engine/types/Config.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/engine/types/Config.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface Config { unity?: Rivet.cloud.version.engine.UnityConfig; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/identity/types/Config.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/identity/types/Config.ts index f17af8c825..604820c914 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/identity/types/Config.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/identity/types/Config.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; /** * **Deprecated** diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/identity/types/CustomDisplayName.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/identity/types/CustomDisplayName.ts index 644effd315..6d7d2b929f 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/identity/types/CustomDisplayName.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/identity/types/CustomDisplayName.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface CustomDisplayName { displayName: Rivet.DisplayName; diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/common/types/Captcha.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/common/types/Captcha.ts index 15c486fc67..fbd28e293c 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/common/types/Captcha.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/common/types/Captcha.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * Matchmaker captcha configuration. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaHcaptcha.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaHcaptcha.ts index 736e3f868a..b26df3a8d6 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaHcaptcha.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaHcaptcha.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * hCpatcha configuration. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameMode.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameMode.ts index 8b91b9071a..9d2f9482c2 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameMode.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameMode.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * A game mode. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeActions.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeActions.ts index 4e945fdfe6..c2efec9a0d 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeActions.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeActions.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * Configuration for the connection types allowed for a game mode. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeCreateConfig.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeCreateConfig.ts index 48d83fa523..58d567573d 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeCreateConfig.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeCreateConfig.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * Configures the requirements and authentication for the /create endpoint. If this value is not set in the config, the /create endpoint is NOT enabled. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeFindConfig.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeFindConfig.ts index 31f08f04e3..2baabd7d2c 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeFindConfig.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeFindConfig.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * Configures the requirements and authentication for the /find endpoint. If this value is not set in the config, the /find endpoint is still enabled. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeJoinConfig.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeJoinConfig.ts index 6fdff21817..c50d3bfa2b 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeJoinConfig.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeJoinConfig.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * Configures the requirements and authentication for the /join endpoint. If this value is not set in the config, the /join endpoint is still enabled. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRegion.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRegion.ts index 38f99ece0a..c099a53565 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRegion.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRegion.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * A game mode region. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDocker.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDocker.ts index 3fea69eaec..dd4717afdc 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDocker.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDocker.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * A game mode runtime running through Docker. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDockerPort.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDockerPort.ts index 6aeec8fcd1..2f43129766 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDockerPort.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDockerPort.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * Port config for a docker build. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroup.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroup.ts index 5e45fed292..9d0268a2f8 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroup.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroup.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * A game mode. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRegion.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRegion.ts index f9158e77c3..b014573de9 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRegion.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRegion.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * **Deprecated: use GameMode instead** diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntime.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntime.ts index d9b930b1ec..4770be0fa9 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntime.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntime.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * **Deprecated: use GameMode instead** diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDocker.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDocker.ts index b118b39bd3..524c4646c9 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDocker.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDocker.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * **Deprecated: use GameMode instead** diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDockerPort.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDockerPort.ts index 48a4ccc550..8b578d4cb7 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDockerPort.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDockerPort.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * **Deprecated: use GameMode instead** diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/types/Config.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/types/Config.ts index ffeb6ebdfa..a1cd40f5b7 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/types/Config.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/resources/matchmaker/types/Config.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; /** * Matchmaker configuration for a given version. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/types/Config.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/types/Config.ts index dfafb52316..0499b5dc83 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/types/Config.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/types/Config.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * Cloud configuration for a given version. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/types/Full.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/types/Full.ts index 729cf8d3f7..ce38083741 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/types/Full.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/types/Full.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A full version. diff --git a/sdks/full/typescript/src/api/resources/cloud/resources/version/types/Summary.ts b/sdks/full/typescript/src/api/resources/cloud/resources/version/types/Summary.ts index bc634311c0..876774d916 100644 --- a/sdks/full/typescript/src/api/resources/cloud/resources/version/types/Summary.ts +++ b/sdks/full/typescript/src/api/resources/cloud/resources/version/types/Summary.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A version summary. diff --git a/sdks/full/typescript/src/api/resources/cloud/types/BootstrapCaptcha.ts b/sdks/full/typescript/src/api/resources/cloud/types/BootstrapCaptcha.ts index 7714ac9ca0..8dc5a026c4 100644 --- a/sdks/full/typescript/src/api/resources/cloud/types/BootstrapCaptcha.ts +++ b/sdks/full/typescript/src/api/resources/cloud/types/BootstrapCaptcha.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface BootstrapCaptcha { turnstile?: Rivet.cloud.BootstrapCaptchaTurnstile; diff --git a/sdks/full/typescript/src/api/resources/cloud/types/BootstrapResponse.ts b/sdks/full/typescript/src/api/resources/cloud/types/BootstrapResponse.ts index e2ebca964a..1a2b560013 100644 --- a/sdks/full/typescript/src/api/resources/cloud/types/BootstrapResponse.ts +++ b/sdks/full/typescript/src/api/resources/cloud/types/BootstrapResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface BootstrapResponse { cluster: Rivet.cloud.BootstrapCluster; diff --git a/sdks/full/typescript/src/api/resources/common/errors/BadRequestError.ts b/sdks/full/typescript/src/api/resources/common/errors/BadRequestError.ts index 83528124ac..862667ba25 100644 --- a/sdks/full/typescript/src/api/resources/common/errors/BadRequestError.ts +++ b/sdks/full/typescript/src/api/resources/common/errors/BadRequestError.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as errors from "../../../../errors"; -import * as Rivet from "../../.."; +import * as errors from "../../../../errors/index"; +import * as Rivet from "../../../index"; export class BadRequestError extends errors.RivetError { constructor(body: Rivet.ErrorBody) { diff --git a/sdks/full/typescript/src/api/resources/common/errors/ForbiddenError.ts b/sdks/full/typescript/src/api/resources/common/errors/ForbiddenError.ts index d8f88a4565..ba42772a32 100644 --- a/sdks/full/typescript/src/api/resources/common/errors/ForbiddenError.ts +++ b/sdks/full/typescript/src/api/resources/common/errors/ForbiddenError.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as errors from "../../../../errors"; -import * as Rivet from "../../.."; +import * as errors from "../../../../errors/index"; +import * as Rivet from "../../../index"; export class ForbiddenError extends errors.RivetError { constructor(body: Rivet.ErrorBody) { diff --git a/sdks/full/typescript/src/api/resources/common/errors/InternalError.ts b/sdks/full/typescript/src/api/resources/common/errors/InternalError.ts index 09e37459f6..1bc1140f5b 100644 --- a/sdks/full/typescript/src/api/resources/common/errors/InternalError.ts +++ b/sdks/full/typescript/src/api/resources/common/errors/InternalError.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as errors from "../../../../errors"; -import * as Rivet from "../../.."; +import * as errors from "../../../../errors/index"; +import * as Rivet from "../../../index"; export class InternalError extends errors.RivetError { constructor(body: Rivet.ErrorBody) { diff --git a/sdks/full/typescript/src/api/resources/common/errors/NotFoundError.ts b/sdks/full/typescript/src/api/resources/common/errors/NotFoundError.ts index f66c709362..67c2019811 100644 --- a/sdks/full/typescript/src/api/resources/common/errors/NotFoundError.ts +++ b/sdks/full/typescript/src/api/resources/common/errors/NotFoundError.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as errors from "../../../../errors"; -import * as Rivet from "../../.."; +import * as errors from "../../../../errors/index"; +import * as Rivet from "../../../index"; export class NotFoundError extends errors.RivetError { constructor(body: Rivet.ErrorBody) { diff --git a/sdks/full/typescript/src/api/resources/common/errors/RateLimitError.ts b/sdks/full/typescript/src/api/resources/common/errors/RateLimitError.ts index 0b416bf2fc..64591f50c9 100644 --- a/sdks/full/typescript/src/api/resources/common/errors/RateLimitError.ts +++ b/sdks/full/typescript/src/api/resources/common/errors/RateLimitError.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as errors from "../../../../errors"; -import * as Rivet from "../../.."; +import * as errors from "../../../../errors/index"; +import * as Rivet from "../../../index"; export class RateLimitError extends errors.RivetError { constructor(body: Rivet.ErrorBody) { diff --git a/sdks/full/typescript/src/api/resources/common/errors/UnauthorizedError.ts b/sdks/full/typescript/src/api/resources/common/errors/UnauthorizedError.ts index c664f00643..5b522ed874 100644 --- a/sdks/full/typescript/src/api/resources/common/errors/UnauthorizedError.ts +++ b/sdks/full/typescript/src/api/resources/common/errors/UnauthorizedError.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as errors from "../../../../errors"; -import * as Rivet from "../../.."; +import * as errors from "../../../../errors/index"; +import * as Rivet from "../../../index"; export class UnauthorizedError extends errors.RivetError { constructor(body: Rivet.ErrorBody) { diff --git a/sdks/full/typescript/src/api/resources/common/types/ErrorBody.ts b/sdks/full/typescript/src/api/resources/common/types/ErrorBody.ts index e820bea2e0..dd97458572 100644 --- a/sdks/full/typescript/src/api/resources/common/types/ErrorBody.ts +++ b/sdks/full/typescript/src/api/resources/common/types/ErrorBody.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface ErrorBody { code: string; diff --git a/sdks/full/typescript/src/api/resources/game/resources/common/types/Handle.ts b/sdks/full/typescript/src/api/resources/game/resources/common/types/Handle.ts index fe3d265a00..290a1806c1 100644 --- a/sdks/full/typescript/src/api/resources/game/resources/common/types/Handle.ts +++ b/sdks/full/typescript/src/api/resources/game/resources/common/types/Handle.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface Handle { gameId: string; diff --git a/sdks/full/typescript/src/api/resources/game/resources/common/types/LeaderboardCategory.ts b/sdks/full/typescript/src/api/resources/game/resources/common/types/LeaderboardCategory.ts index 0465bef6fe..6ec1169f0a 100644 --- a/sdks/full/typescript/src/api/resources/game/resources/common/types/LeaderboardCategory.ts +++ b/sdks/full/typescript/src/api/resources/game/resources/common/types/LeaderboardCategory.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A game leaderboard category. diff --git a/sdks/full/typescript/src/api/resources/game/resources/common/types/PlatformLink.ts b/sdks/full/typescript/src/api/resources/game/resources/common/types/PlatformLink.ts index 60f1ef08a2..9e4da18048 100644 --- a/sdks/full/typescript/src/api/resources/game/resources/common/types/PlatformLink.ts +++ b/sdks/full/typescript/src/api/resources/game/resources/common/types/PlatformLink.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A platform link denoting a supported platform. diff --git a/sdks/full/typescript/src/api/resources/game/resources/common/types/Profile.ts b/sdks/full/typescript/src/api/resources/game/resources/common/types/Profile.ts index 9f24782a44..336205ed4f 100644 --- a/sdks/full/typescript/src/api/resources/game/resources/common/types/Profile.ts +++ b/sdks/full/typescript/src/api/resources/game/resources/common/types/Profile.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A game profile. diff --git a/sdks/full/typescript/src/api/resources/game/resources/common/types/Stat.ts b/sdks/full/typescript/src/api/resources/game/resources/common/types/Stat.ts index 6397d9c8bb..c0adf9d0c2 100644 --- a/sdks/full/typescript/src/api/resources/game/resources/common/types/Stat.ts +++ b/sdks/full/typescript/src/api/resources/game/resources/common/types/Stat.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A game statistic. diff --git a/sdks/full/typescript/src/api/resources/game/resources/common/types/StatConfig.ts b/sdks/full/typescript/src/api/resources/game/resources/common/types/StatConfig.ts index 777387f574..06034f0a46 100644 --- a/sdks/full/typescript/src/api/resources/game/resources/common/types/StatConfig.ts +++ b/sdks/full/typescript/src/api/resources/game/resources/common/types/StatConfig.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A game statistic config. diff --git a/sdks/full/typescript/src/api/resources/game/resources/common/types/StatSummary.ts b/sdks/full/typescript/src/api/resources/game/resources/common/types/StatSummary.ts index 4595ea101c..ebbc1d00c7 100644 --- a/sdks/full/typescript/src/api/resources/game/resources/common/types/StatSummary.ts +++ b/sdks/full/typescript/src/api/resources/game/resources/common/types/StatSummary.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A game statistic summary. diff --git a/sdks/full/typescript/src/api/resources/game/resources/common/types/Summary.ts b/sdks/full/typescript/src/api/resources/game/resources/common/types/Summary.ts index 92c1d6f0b2..849cd8ab97 100644 --- a/sdks/full/typescript/src/api/resources/game/resources/common/types/Summary.ts +++ b/sdks/full/typescript/src/api/resources/game/resources/common/types/Summary.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface Summary { gameId: string; diff --git a/sdks/full/typescript/src/api/resources/group/client/Client.ts b/sdks/full/typescript/src/api/resources/group/client/Client.ts index 7af6645d1f..48f80c436a 100644 --- a/sdks/full/typescript/src/api/resources/group/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/group/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../environments"; import * as core from "../../../../core"; -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../serialization"; -import * as errors from "../../../../errors"; +import * as serializers from "../../../../serialization/index"; +import * as errors from "../../../../errors/index"; import { Invites } from "../resources/invites/client/Client"; import { JoinRequests } from "../resources/joinRequests/client/Client"; @@ -19,8 +19,12 @@ export declare namespace Group { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -29,19 +33,28 @@ export class Group { /** * Returns a list of suggested groups. + * + * @param {Rivet.group.ListSuggestedRequest} request + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.listSuggested({ + * watchIndex: "string" + * }) */ public async listSuggested( request: Rivet.group.ListSuggestedRequest = {}, requestOptions?: Group.RequestOptions ): Promise { const { watchIndex } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (watchIndex != null) { _queryParams["watch_index"] = watchIndex; } @@ -57,11 +70,13 @@ export class Group { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.group.ListSuggestedResponse.parseOrThrow(_response.body, { + return serializers.group.ListSuggestedResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -74,7 +89,7 @@ export class Group { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -84,7 +99,7 @@ export class Group { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -94,7 +109,7 @@ export class Group { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -104,7 +119,7 @@ export class Group { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -114,7 +129,7 @@ export class Group { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -124,7 +139,7 @@ export class Group { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -157,12 +172,21 @@ export class Group { /** * Creates a new group. + * + * @param {Rivet.group.CreateRequest} request + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.create({ + * displayName: "string" + * }) */ public async create( request: Rivet.group.CreateRequest, @@ -178,12 +202,14 @@ export class Group { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.group.CreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + requestType: "json", + body: serializers.group.CreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.group.CreateResponse.parseOrThrow(_response.body, { + return serializers.group.CreateResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -196,7 +222,7 @@ export class Group { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -206,7 +232,7 @@ export class Group { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -216,7 +242,7 @@ export class Group { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -226,7 +252,7 @@ export class Group { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -236,7 +262,7 @@ export class Group { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -246,7 +272,7 @@ export class Group { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -280,12 +306,23 @@ export class Group { /** * Prepares an avatar image upload. * Complete upload with `rivet.api.group#CompleteAvatarUpload`. + * + * @param {Rivet.group.PrepareAvatarUploadRequest} request + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.prepareAvatarUpload({ + * path: "string", + * mime: "string", + * contentLength: 1000000 + * }) */ public async prepareAvatarUpload( request: Rivet.group.PrepareAvatarUploadRequest, @@ -301,14 +338,16 @@ export class Group { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.group.PrepareAvatarUploadRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.group.PrepareAvatarUploadRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.group.PrepareAvatarUploadResponse.parseOrThrow(_response.body, { + return serializers.group.PrepareAvatarUploadResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -321,7 +360,7 @@ export class Group { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -331,7 +370,7 @@ export class Group { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -341,7 +380,7 @@ export class Group { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -351,7 +390,7 @@ export class Group { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -361,7 +400,7 @@ export class Group { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -371,7 +410,7 @@ export class Group { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -404,12 +443,23 @@ export class Group { /** * Validate contents of group profile. Use to provide immediate feedback on profile changes before committing them. + * + * @param {Rivet.group.ValidateProfileRequest} request + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.validateProfile({ + * displayName: "string", + * bio: "string", + * publicity: Rivet.group.Publicity.Open + * }) */ public async validateProfile( request: Rivet.group.ValidateProfileRequest, @@ -425,14 +475,14 @@ export class Group { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.group.ValidateProfileRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.group.ValidateProfileRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.group.ValidateProfileResponse.parseOrThrow(_response.body, { + return serializers.group.ValidateProfileResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -445,7 +495,7 @@ export class Group { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -455,7 +505,7 @@ export class Group { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -465,7 +515,7 @@ export class Group { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -475,7 +525,7 @@ export class Group { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -485,7 +535,7 @@ export class Group { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -495,7 +545,7 @@ export class Group { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -528,19 +578,30 @@ export class Group { /** * Fuzzy search for groups. + * + * @param {Rivet.group.SearchRequest} request + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.search({ + * query: "string", + * anchor: "string", + * limit: 1.1 + * }) */ public async search( request: Rivet.group.SearchRequest, requestOptions?: Group.RequestOptions ): Promise { const { query, anchor, limit } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; _queryParams["query"] = query; if (anchor != null) { _queryParams["anchor"] = anchor; @@ -561,11 +622,13 @@ export class Group { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.group.SearchResponse.parseOrThrow(_response.body, { + return serializers.group.SearchResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -578,7 +641,7 @@ export class Group { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -588,7 +651,7 @@ export class Group { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -598,7 +661,7 @@ export class Group { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -608,7 +671,7 @@ export class Group { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -618,7 +681,7 @@ export class Group { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -628,7 +691,7 @@ export class Group { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -663,12 +726,20 @@ export class Group { * Completes an avatar image upload. Must be called after the file upload * process completes. * Call `rivet.api.group#PrepareAvatarUpload` first. + * + * @param {string} groupId + * @param {string} uploadId + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.completeAvatarUpload("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async completeAvatarUpload( groupId: string, @@ -678,15 +749,17 @@ export class Group { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/group/groups/${groupId}/avatar-upload/${uploadId}/complete` + `/group/groups/${encodeURIComponent(groupId)}/avatar-upload/${encodeURIComponent(uploadId)}/complete` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -696,7 +769,7 @@ export class Group { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -706,7 +779,7 @@ export class Group { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -716,7 +789,7 @@ export class Group { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -726,7 +799,7 @@ export class Group { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -736,7 +809,7 @@ export class Group { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -746,7 +819,7 @@ export class Group { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -779,12 +852,24 @@ export class Group { /** * Returns a group's bans. Must have valid permissions to view. + * + * @param {string} groupId + * @param {Rivet.group.GetBansRequest} request + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.getBans("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * anchor: "string", + * count: 1.1, + * watchIndex: "string" + * }) */ public async getBans( groupId: string, @@ -792,7 +877,7 @@ export class Group { requestOptions?: Group.RequestOptions ): Promise { const { anchor, count, watchIndex } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (anchor != null) { _queryParams["anchor"] = anchor; } @@ -808,7 +893,7 @@ export class Group { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/group/groups/${groupId}/bans` + `/group/groups/${encodeURIComponent(groupId)}/bans` ), method: "GET", headers: { @@ -816,11 +901,13 @@ export class Group { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.group.GetBansResponse.parseOrThrow(_response.body, { + return serializers.group.GetBansResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -833,7 +920,7 @@ export class Group { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -843,7 +930,7 @@ export class Group { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -853,7 +940,7 @@ export class Group { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -863,7 +950,7 @@ export class Group { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -873,7 +960,7 @@ export class Group { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -883,7 +970,7 @@ export class Group { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -916,12 +1003,20 @@ export class Group { /** * Bans an identity from a group. Must be the owner of the group to perform this action. The banned identity will no longer be able to create a join request or use a group invite. + * + * @param {string} groupId + * @param {string} identityId + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.banIdentity("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async banIdentity( groupId: string, @@ -931,15 +1026,17 @@ export class Group { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/group/groups/${groupId}/bans/${identityId}` + `/group/groups/${encodeURIComponent(groupId)}/bans/${encodeURIComponent(identityId)}` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -949,7 +1046,7 @@ export class Group { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -959,7 +1056,7 @@ export class Group { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -969,7 +1066,7 @@ export class Group { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -979,7 +1076,7 @@ export class Group { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -989,7 +1086,7 @@ export class Group { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -999,7 +1096,7 @@ export class Group { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1032,12 +1129,20 @@ export class Group { /** * Unbans an identity from a group. Must be the owner of the group to perform this action. + * + * @param {string} groupId + * @param {string} identityId + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.unbanIdentity("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async unbanIdentity( groupId: string, @@ -1047,15 +1152,17 @@ export class Group { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/group/groups/${groupId}/bans/${identityId}` + `/group/groups/${encodeURIComponent(groupId)}/bans/${encodeURIComponent(identityId)}` ), method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -1065,7 +1172,7 @@ export class Group { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1075,7 +1182,7 @@ export class Group { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1085,7 +1192,7 @@ export class Group { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1095,7 +1202,7 @@ export class Group { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1105,7 +1212,7 @@ export class Group { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1115,7 +1222,7 @@ export class Group { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1148,12 +1255,24 @@ export class Group { /** * Returns a group's join requests. Must have valid permissions to view. + * + * @param {string} groupId + * @param {Rivet.group.GetJoinRequestsRequest} request + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.getJoinRequests("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * anchor: "string", + * count: 1.1, + * watchIndex: "string" + * }) */ public async getJoinRequests( groupId: string, @@ -1161,7 +1280,7 @@ export class Group { requestOptions?: Group.RequestOptions ): Promise { const { anchor, count, watchIndex } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (anchor != null) { _queryParams["anchor"] = anchor; } @@ -1177,7 +1296,7 @@ export class Group { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/group/groups/${groupId}/join-requests` + `/group/groups/${encodeURIComponent(groupId)}/join-requests` ), method: "GET", headers: { @@ -1185,11 +1304,13 @@ export class Group { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.group.GetJoinRequestsResponse.parseOrThrow(_response.body, { + return serializers.group.GetJoinRequestsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1202,7 +1323,7 @@ export class Group { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1212,7 +1333,7 @@ export class Group { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1222,7 +1343,7 @@ export class Group { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1232,7 +1353,7 @@ export class Group { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1242,7 +1363,7 @@ export class Group { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1252,7 +1373,7 @@ export class Group { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1285,26 +1406,36 @@ export class Group { /** * Kicks an identity from a group. Must be the owner of the group to perform this action. + * + * @param {string} groupId + * @param {string} identityId + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.kickMember("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async kickMember(groupId: string, identityId: string, requestOptions?: Group.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/group/groups/${groupId}/kick/${identityId}` + `/group/groups/${encodeURIComponent(groupId)}/kick/${encodeURIComponent(identityId)}` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -1314,7 +1445,7 @@ export class Group { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1324,7 +1455,7 @@ export class Group { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1334,7 +1465,7 @@ export class Group { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1344,7 +1475,7 @@ export class Group { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1354,7 +1485,7 @@ export class Group { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1364,7 +1495,7 @@ export class Group { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1397,26 +1528,35 @@ export class Group { /** * Leaves a group. + * + * @param {string} groupId + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.leave("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async leave(groupId: string, requestOptions?: Group.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/group/groups/${groupId}/leave` + `/group/groups/${encodeURIComponent(groupId)}/leave` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -1426,7 +1566,7 @@ export class Group { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1436,7 +1576,7 @@ export class Group { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1446,7 +1586,7 @@ export class Group { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1456,7 +1596,7 @@ export class Group { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1466,7 +1606,7 @@ export class Group { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1476,7 +1616,7 @@ export class Group { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1509,12 +1649,24 @@ export class Group { /** * Returns a group's members. + * + * @param {string} groupId + * @param {Rivet.group.GetMembersRequest} request + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.getMembers("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * anchor: "string", + * count: 1.1, + * watchIndex: "string" + * }) */ public async getMembers( groupId: string, @@ -1522,7 +1674,7 @@ export class Group { requestOptions?: Group.RequestOptions ): Promise { const { anchor, count, watchIndex } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (anchor != null) { _queryParams["anchor"] = anchor; } @@ -1538,7 +1690,7 @@ export class Group { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/group/groups/${groupId}/members` + `/group/groups/${encodeURIComponent(groupId)}/members` ), method: "GET", headers: { @@ -1546,11 +1698,13 @@ export class Group { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.group.GetMembersResponse.parseOrThrow(_response.body, { + return serializers.group.GetMembersResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1563,7 +1717,7 @@ export class Group { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1573,7 +1727,7 @@ export class Group { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1583,7 +1737,7 @@ export class Group { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1593,7 +1747,7 @@ export class Group { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1603,7 +1757,7 @@ export class Group { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1613,7 +1767,7 @@ export class Group { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1646,12 +1800,22 @@ export class Group { /** * Returns a group profile. + * + * @param {string} groupId + * @param {Rivet.group.GetProfileRequest} request + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.getProfile("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * watchIndex: "string" + * }) */ public async getProfile( groupId: string, @@ -1659,7 +1823,7 @@ export class Group { requestOptions?: Group.RequestOptions ): Promise { const { watchIndex } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (watchIndex != null) { _queryParams["watch_index"] = watchIndex; } @@ -1667,7 +1831,7 @@ export class Group { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/group/groups/${groupId}/profile` + `/group/groups/${encodeURIComponent(groupId)}/profile` ), method: "GET", headers: { @@ -1675,11 +1839,13 @@ export class Group { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.group.GetProfileResponse.parseOrThrow(_response.body, { + return serializers.group.GetProfileResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1692,7 +1858,7 @@ export class Group { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1702,7 +1868,7 @@ export class Group { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1712,7 +1878,7 @@ export class Group { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1722,7 +1888,7 @@ export class Group { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1732,7 +1898,7 @@ export class Group { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1742,7 +1908,7 @@ export class Group { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1774,12 +1940,23 @@ export class Group { } /** + * @param {string} groupId + * @param {Rivet.group.UpdateProfileRequest} request + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.updateProfile("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * displayName: "string", + * bio: "string", + * publicity: Rivet.group.Publicity.Open + * }) */ public async updateProfile( groupId: string, @@ -1789,18 +1966,18 @@ export class Group { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/group/groups/${groupId}/profile` + `/group/groups/${encodeURIComponent(groupId)}/profile` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.group.UpdateProfileRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.group.UpdateProfileRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -1810,7 +1987,7 @@ export class Group { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1820,7 +1997,7 @@ export class Group { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1830,7 +2007,7 @@ export class Group { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1840,7 +2017,7 @@ export class Group { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1850,7 +2027,7 @@ export class Group { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1860,7 +2037,7 @@ export class Group { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1892,12 +2069,18 @@ export class Group { } /** + * @param {string} groupId + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.getSummary("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async getSummary( groupId: string, @@ -1906,18 +2089,20 @@ export class Group { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/group/groups/${groupId}/summary` + `/group/groups/${encodeURIComponent(groupId)}/summary` ), method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.group.GetSummaryResponse.parseOrThrow(_response.body, { + return serializers.group.GetSummaryResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1930,7 +2115,7 @@ export class Group { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1940,7 +2125,7 @@ export class Group { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1950,7 +2135,7 @@ export class Group { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1960,7 +2145,7 @@ export class Group { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1970,7 +2155,7 @@ export class Group { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1980,7 +2165,7 @@ export class Group { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2013,12 +2198,22 @@ export class Group { /** * Transfers ownership of a group to another identity. + * + * @param {string} groupId + * @param {Rivet.group.TransferOwnershipRequest} request + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.transferOwnership("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * newOwnerIdentityId: "string" + * }) */ public async transferOwnership( groupId: string, @@ -2028,18 +2223,18 @@ export class Group { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/group/groups/${groupId}/transfer-owner` + `/group/groups/${encodeURIComponent(groupId)}/transfer-owner` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.group.TransferOwnershipRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.group.TransferOwnershipRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -2049,7 +2244,7 @@ export class Group { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2059,7 +2254,7 @@ export class Group { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2069,7 +2264,7 @@ export class Group { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2079,7 +2274,7 @@ export class Group { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2089,7 +2284,7 @@ export class Group { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2099,7 +2294,7 @@ export class Group { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2142,7 +2337,7 @@ export class Group { return (this._joinRequests ??= new JoinRequests(this._options)); } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/group/client/requests/GetBansRequest.ts b/sdks/full/typescript/src/api/resources/group/client/requests/GetBansRequest.ts index 95f15c23f9..3ca893ece7 100644 --- a/sdks/full/typescript/src/api/resources/group/client/requests/GetBansRequest.ts +++ b/sdks/full/typescript/src/api/resources/group/client/requests/GetBansRequest.ts @@ -2,6 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * anchor: "string", + * count: 1.1, + * watchIndex: "string" + * } + */ export interface GetBansRequest { /** * The pagination anchor. Set to the returned anchor of this endpoint to receive the next set of items. diff --git a/sdks/full/typescript/src/api/resources/group/client/requests/GetJoinRequestsRequest.ts b/sdks/full/typescript/src/api/resources/group/client/requests/GetJoinRequestsRequest.ts index 50537efbf7..a016c0b78e 100644 --- a/sdks/full/typescript/src/api/resources/group/client/requests/GetJoinRequestsRequest.ts +++ b/sdks/full/typescript/src/api/resources/group/client/requests/GetJoinRequestsRequest.ts @@ -2,6 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * anchor: "string", + * count: 1.1, + * watchIndex: "string" + * } + */ export interface GetJoinRequestsRequest { /** * The pagination anchor. Set to the returned anchor of this endpoint to receive the next set of items. diff --git a/sdks/full/typescript/src/api/resources/group/client/requests/GetMembersRequest.ts b/sdks/full/typescript/src/api/resources/group/client/requests/GetMembersRequest.ts index 2266ca0ae7..e23874da9a 100644 --- a/sdks/full/typescript/src/api/resources/group/client/requests/GetMembersRequest.ts +++ b/sdks/full/typescript/src/api/resources/group/client/requests/GetMembersRequest.ts @@ -2,6 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * anchor: "string", + * count: 1.1, + * watchIndex: "string" + * } + */ export interface GetMembersRequest { /** * The pagination anchor. Set to the returned anchor of this endpoint to receive the next set of items. diff --git a/sdks/full/typescript/src/api/resources/group/client/requests/GetProfileRequest.ts b/sdks/full/typescript/src/api/resources/group/client/requests/GetProfileRequest.ts index af4255bfca..ec2578cdd4 100644 --- a/sdks/full/typescript/src/api/resources/group/client/requests/GetProfileRequest.ts +++ b/sdks/full/typescript/src/api/resources/group/client/requests/GetProfileRequest.ts @@ -2,6 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * watchIndex: "string" + * } + */ export interface GetProfileRequest { /** * A query parameter denoting the requests watch index. diff --git a/sdks/full/typescript/src/api/resources/group/client/requests/ListSuggestedRequest.ts b/sdks/full/typescript/src/api/resources/group/client/requests/ListSuggestedRequest.ts index 1ab9dcdf7e..4f003fdf06 100644 --- a/sdks/full/typescript/src/api/resources/group/client/requests/ListSuggestedRequest.ts +++ b/sdks/full/typescript/src/api/resources/group/client/requests/ListSuggestedRequest.ts @@ -2,6 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * watchIndex: "string" + * } + */ export interface ListSuggestedRequest { /** * A query parameter denoting the requests watch index. diff --git a/sdks/full/typescript/src/api/resources/group/client/requests/SearchRequest.ts b/sdks/full/typescript/src/api/resources/group/client/requests/SearchRequest.ts index 960b22843a..7ea822c96f 100644 --- a/sdks/full/typescript/src/api/resources/group/client/requests/SearchRequest.ts +++ b/sdks/full/typescript/src/api/resources/group/client/requests/SearchRequest.ts @@ -2,6 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * query: "string", + * anchor: "string", + * limit: 1.1 + * } + */ export interface SearchRequest { /** * The query to match group display names against. diff --git a/sdks/full/typescript/src/api/resources/group/client/requests/index.ts b/sdks/full/typescript/src/api/resources/group/client/requests/index.ts index 860e3a39c9..de4b90b874 100644 --- a/sdks/full/typescript/src/api/resources/group/client/requests/index.ts +++ b/sdks/full/typescript/src/api/resources/group/client/requests/index.ts @@ -1,6 +1,6 @@ -export { ListSuggestedRequest } from "./ListSuggestedRequest"; -export { SearchRequest } from "./SearchRequest"; -export { GetBansRequest } from "./GetBansRequest"; -export { GetJoinRequestsRequest } from "./GetJoinRequestsRequest"; -export { GetMembersRequest } from "./GetMembersRequest"; -export { GetProfileRequest } from "./GetProfileRequest"; +export { type ListSuggestedRequest } from "./ListSuggestedRequest"; +export { type SearchRequest } from "./SearchRequest"; +export { type GetBansRequest } from "./GetBansRequest"; +export { type GetJoinRequestsRequest } from "./GetJoinRequestsRequest"; +export { type GetMembersRequest } from "./GetMembersRequest"; +export { type GetProfileRequest } from "./GetProfileRequest"; diff --git a/sdks/full/typescript/src/api/resources/group/resources/common/types/BannedIdentity.ts b/sdks/full/typescript/src/api/resources/group/resources/common/types/BannedIdentity.ts index f7e18ae89f..914bec756c 100644 --- a/sdks/full/typescript/src/api/resources/group/resources/common/types/BannedIdentity.ts +++ b/sdks/full/typescript/src/api/resources/group/resources/common/types/BannedIdentity.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A banned identity. diff --git a/sdks/full/typescript/src/api/resources/group/resources/common/types/Handle.ts b/sdks/full/typescript/src/api/resources/group/resources/common/types/Handle.ts index 3d109dadb5..3cd012146f 100644 --- a/sdks/full/typescript/src/api/resources/group/resources/common/types/Handle.ts +++ b/sdks/full/typescript/src/api/resources/group/resources/common/types/Handle.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A group handle. diff --git a/sdks/full/typescript/src/api/resources/group/resources/common/types/JoinRequest.ts b/sdks/full/typescript/src/api/resources/group/resources/common/types/JoinRequest.ts index 01997da1dc..d3aeff851b 100644 --- a/sdks/full/typescript/src/api/resources/group/resources/common/types/JoinRequest.ts +++ b/sdks/full/typescript/src/api/resources/group/resources/common/types/JoinRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A group join request. diff --git a/sdks/full/typescript/src/api/resources/group/resources/common/types/Member.ts b/sdks/full/typescript/src/api/resources/group/resources/common/types/Member.ts index 653b061d12..ab99678cab 100644 --- a/sdks/full/typescript/src/api/resources/group/resources/common/types/Member.ts +++ b/sdks/full/typescript/src/api/resources/group/resources/common/types/Member.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A group member. diff --git a/sdks/full/typescript/src/api/resources/group/resources/common/types/Profile.ts b/sdks/full/typescript/src/api/resources/group/resources/common/types/Profile.ts index 79b7e28221..aa495a72d6 100644 --- a/sdks/full/typescript/src/api/resources/group/resources/common/types/Profile.ts +++ b/sdks/full/typescript/src/api/resources/group/resources/common/types/Profile.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A list of group profiles. diff --git a/sdks/full/typescript/src/api/resources/group/resources/common/types/Summary.ts b/sdks/full/typescript/src/api/resources/group/resources/common/types/Summary.ts index 2ed1454386..62c464c01a 100644 --- a/sdks/full/typescript/src/api/resources/group/resources/common/types/Summary.ts +++ b/sdks/full/typescript/src/api/resources/group/resources/common/types/Summary.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface Summary { groupId: string; diff --git a/sdks/full/typescript/src/api/resources/group/resources/invites/client/Client.ts b/sdks/full/typescript/src/api/resources/group/resources/invites/client/Client.ts index 7b699bdef1..d7749e2d8d 100644 --- a/sdks/full/typescript/src/api/resources/group/resources/invites/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/group/resources/invites/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Invites { interface Options { @@ -17,8 +17,12 @@ export declare namespace Invites { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -27,12 +31,19 @@ export class Invites { /** * Inspects a group invite returning information about the team that created it. + * + * @param {string} groupInviteCode - Provided by `rivet.api.group#CreateInviteResponse$code`. + * @param {Invites.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.invites.getInvite("string") */ public async getInvite( groupInviteCode: string, @@ -41,18 +52,20 @@ export class Invites { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/group/invites/${groupInviteCode}` + `/group/invites/${encodeURIComponent(groupInviteCode)}` ), method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.group.GetInviteResponse.parseOrThrow(_response.body, { + return serializers.group.GetInviteResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -65,7 +78,7 @@ export class Invites { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -75,7 +88,7 @@ export class Invites { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -85,7 +98,7 @@ export class Invites { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -95,7 +108,7 @@ export class Invites { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -105,7 +118,7 @@ export class Invites { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -115,7 +128,7 @@ export class Invites { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -148,12 +161,19 @@ export class Invites { /** * Consumes a group invite to join a group. + * + * @param {string} groupInviteCode - Provided by `rivet.api.group#CreateInviteResponse$code`. + * @param {Invites.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.invites.consumeInvite("string") */ public async consumeInvite( groupInviteCode: string, @@ -162,18 +182,20 @@ export class Invites { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/group/invites/${groupInviteCode}/consume` + `/group/invites/${encodeURIComponent(groupInviteCode)}/consume` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.group.ConsumeInviteResponse.parseOrThrow(_response.body, { + return serializers.group.ConsumeInviteResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -186,7 +208,7 @@ export class Invites { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -196,7 +218,7 @@ export class Invites { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -206,7 +228,7 @@ export class Invites { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -216,7 +238,7 @@ export class Invites { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -226,7 +248,7 @@ export class Invites { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -236,7 +258,7 @@ export class Invites { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -269,12 +291,23 @@ export class Invites { /** * Creates a group invite. Can be shared with other identities to let them join this group. + * + * @param {string} groupId + * @param {Rivet.group.CreateInviteRequest} request + * @param {Invites.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.invites.createInvite("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * ttl: 1.1, + * useCount: 1.1 + * }) */ public async createInvite( groupId: string, @@ -284,19 +317,21 @@ export class Invites { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/group/groups/${groupId}/invites` + `/group/groups/${encodeURIComponent(groupId)}/invites` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.group.CreateInviteRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + requestType: "json", + body: serializers.group.CreateInviteRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.group.CreateInviteResponse.parseOrThrow(_response.body, { + return serializers.group.CreateInviteResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -309,7 +344,7 @@ export class Invites { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -319,7 +354,7 @@ export class Invites { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -329,7 +364,7 @@ export class Invites { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -339,7 +374,7 @@ export class Invites { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -349,7 +384,7 @@ export class Invites { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -359,7 +394,7 @@ export class Invites { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -390,7 +425,7 @@ export class Invites { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/group/resources/invites/types/GetInviteResponse.ts b/sdks/full/typescript/src/api/resources/group/resources/invites/types/GetInviteResponse.ts index 68f58923c8..c182b6d209 100644 --- a/sdks/full/typescript/src/api/resources/group/resources/invites/types/GetInviteResponse.ts +++ b/sdks/full/typescript/src/api/resources/group/resources/invites/types/GetInviteResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GetInviteResponse { group: Rivet.group.Handle; diff --git a/sdks/full/typescript/src/api/resources/group/resources/joinRequests/client/Client.ts b/sdks/full/typescript/src/api/resources/group/resources/joinRequests/client/Client.ts index cbdee4af37..b989eee777 100644 --- a/sdks/full/typescript/src/api/resources/group/resources/joinRequests/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/group/resources/joinRequests/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; -import * as serializers from "../../../../../../serialization"; +import * as errors from "../../../../../../errors/index"; +import * as serializers from "../../../../../../serialization/index"; export declare namespace JoinRequests { interface Options { @@ -17,8 +17,12 @@ export declare namespace JoinRequests { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -27,26 +31,35 @@ export class JoinRequests { /** * Requests to join a group. + * + * @param {string} groupId + * @param {JoinRequests.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.joinRequests.createJoinRequest("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async createJoinRequest(groupId: string, requestOptions?: JoinRequests.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/group/groups/${groupId}/join-request` + `/group/groups/${encodeURIComponent(groupId)}/join-request` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -56,7 +69,7 @@ export class JoinRequests { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -66,7 +79,7 @@ export class JoinRequests { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -76,7 +89,7 @@ export class JoinRequests { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -86,7 +99,7 @@ export class JoinRequests { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -96,7 +109,7 @@ export class JoinRequests { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -106,7 +119,7 @@ export class JoinRequests { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -139,12 +152,23 @@ export class JoinRequests { /** * Resolves a join request for a given group. + * + * @param {string} groupId + * @param {string} identityId + * @param {Rivet.group.ResolveJoinRequestRequest} request + * @param {JoinRequests.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.joinRequests.resolveJoinRequest("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * resolution: true + * }) */ public async resolveJoinRequest( groupId: string, @@ -155,18 +179,18 @@ export class JoinRequests { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/group/groups/${groupId}/join-request/${identityId}` + `/group/groups/${encodeURIComponent(groupId)}/join-request/${encodeURIComponent(identityId)}` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.group.ResolveJoinRequestRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.group.ResolveJoinRequestRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -176,7 +200,7 @@ export class JoinRequests { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -186,7 +210,7 @@ export class JoinRequests { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -196,7 +220,7 @@ export class JoinRequests { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -206,7 +230,7 @@ export class JoinRequests { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -216,7 +240,7 @@ export class JoinRequests { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -226,7 +250,7 @@ export class JoinRequests { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -257,7 +281,7 @@ export class JoinRequests { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/group/types/CreateRequest.ts b/sdks/full/typescript/src/api/resources/group/types/CreateRequest.ts index 2030be77ec..cdfa3e0024 100644 --- a/sdks/full/typescript/src/api/resources/group/types/CreateRequest.ts +++ b/sdks/full/typescript/src/api/resources/group/types/CreateRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface CreateRequest { displayName: Rivet.DisplayName; diff --git a/sdks/full/typescript/src/api/resources/group/types/GetBansResponse.ts b/sdks/full/typescript/src/api/resources/group/types/GetBansResponse.ts index 3de1c9f33f..e9264de0c0 100644 --- a/sdks/full/typescript/src/api/resources/group/types/GetBansResponse.ts +++ b/sdks/full/typescript/src/api/resources/group/types/GetBansResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface GetBansResponse { /** A list of banned group members. */ diff --git a/sdks/full/typescript/src/api/resources/group/types/GetJoinRequestsResponse.ts b/sdks/full/typescript/src/api/resources/group/types/GetJoinRequestsResponse.ts index 0aae923311..ff93fa5a5c 100644 --- a/sdks/full/typescript/src/api/resources/group/types/GetJoinRequestsResponse.ts +++ b/sdks/full/typescript/src/api/resources/group/types/GetJoinRequestsResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface GetJoinRequestsResponse { /** A list of group join requests. */ diff --git a/sdks/full/typescript/src/api/resources/group/types/GetMembersResponse.ts b/sdks/full/typescript/src/api/resources/group/types/GetMembersResponse.ts index f5700f5abb..3015846962 100644 --- a/sdks/full/typescript/src/api/resources/group/types/GetMembersResponse.ts +++ b/sdks/full/typescript/src/api/resources/group/types/GetMembersResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface GetMembersResponse { /** A list of group members. */ diff --git a/sdks/full/typescript/src/api/resources/group/types/GetProfileResponse.ts b/sdks/full/typescript/src/api/resources/group/types/GetProfileResponse.ts index a6c51dffd9..889bf8ed2c 100644 --- a/sdks/full/typescript/src/api/resources/group/types/GetProfileResponse.ts +++ b/sdks/full/typescript/src/api/resources/group/types/GetProfileResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface GetProfileResponse { group: Rivet.group.Profile; diff --git a/sdks/full/typescript/src/api/resources/group/types/GetSummaryResponse.ts b/sdks/full/typescript/src/api/resources/group/types/GetSummaryResponse.ts index f24ea14ac5..612b43fc2d 100644 --- a/sdks/full/typescript/src/api/resources/group/types/GetSummaryResponse.ts +++ b/sdks/full/typescript/src/api/resources/group/types/GetSummaryResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface GetSummaryResponse { group: Rivet.group.Summary; diff --git a/sdks/full/typescript/src/api/resources/group/types/ListSuggestedResponse.ts b/sdks/full/typescript/src/api/resources/group/types/ListSuggestedResponse.ts index 4815860dfd..2e1a313d6f 100644 --- a/sdks/full/typescript/src/api/resources/group/types/ListSuggestedResponse.ts +++ b/sdks/full/typescript/src/api/resources/group/types/ListSuggestedResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface ListSuggestedResponse { /** A list of group summaries. */ diff --git a/sdks/full/typescript/src/api/resources/group/types/PrepareAvatarUploadResponse.ts b/sdks/full/typescript/src/api/resources/group/types/PrepareAvatarUploadResponse.ts index ebc92cf1dc..f70f01c918 100644 --- a/sdks/full/typescript/src/api/resources/group/types/PrepareAvatarUploadResponse.ts +++ b/sdks/full/typescript/src/api/resources/group/types/PrepareAvatarUploadResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface PrepareAvatarUploadResponse { uploadId: string; diff --git a/sdks/full/typescript/src/api/resources/group/types/SearchResponse.ts b/sdks/full/typescript/src/api/resources/group/types/SearchResponse.ts index f6d0a999e2..13a23d784a 100644 --- a/sdks/full/typescript/src/api/resources/group/types/SearchResponse.ts +++ b/sdks/full/typescript/src/api/resources/group/types/SearchResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface SearchResponse { /** A list of group handles. */ diff --git a/sdks/full/typescript/src/api/resources/group/types/UpdateProfileRequest.ts b/sdks/full/typescript/src/api/resources/group/types/UpdateProfileRequest.ts index b6b2d8fc88..1bb7ff7d13 100644 --- a/sdks/full/typescript/src/api/resources/group/types/UpdateProfileRequest.ts +++ b/sdks/full/typescript/src/api/resources/group/types/UpdateProfileRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface UpdateProfileRequest { displayName?: Rivet.DisplayName; diff --git a/sdks/full/typescript/src/api/resources/group/types/ValidateProfileRequest.ts b/sdks/full/typescript/src/api/resources/group/types/ValidateProfileRequest.ts index 16b8d0f75e..1989645707 100644 --- a/sdks/full/typescript/src/api/resources/group/types/ValidateProfileRequest.ts +++ b/sdks/full/typescript/src/api/resources/group/types/ValidateProfileRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface ValidateProfileRequest { displayName?: Rivet.DisplayName; diff --git a/sdks/full/typescript/src/api/resources/group/types/ValidateProfileResponse.ts b/sdks/full/typescript/src/api/resources/group/types/ValidateProfileResponse.ts index 01a02dd53d..1fbe5f6b4d 100644 --- a/sdks/full/typescript/src/api/resources/group/types/ValidateProfileResponse.ts +++ b/sdks/full/typescript/src/api/resources/group/types/ValidateProfileResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface ValidateProfileResponse { /** A list of validation errors. */ diff --git a/sdks/full/typescript/src/api/resources/identity/client/Client.ts b/sdks/full/typescript/src/api/resources/identity/client/Client.ts index 25a67de109..5fbfdaf0cf 100644 --- a/sdks/full/typescript/src/api/resources/identity/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/identity/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../environments"; import * as core from "../../../../core"; -import * as Rivet from "../../.."; -import * as serializers from "../../../../serialization"; +import * as Rivet from "../../../index"; +import * as serializers from "../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../errors"; +import * as errors from "../../../../errors/index"; import { Activities } from "../resources/activities/client/Client"; import { Events } from "../resources/events/client/Client"; import { Links } from "../resources/links/client/Client"; @@ -20,8 +20,12 @@ export declare namespace Identity { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -36,12 +40,21 @@ export class Identity { * This is intended to allow users to play the game without signing up while still having the benefits of having an account. When they are ready to save their account, they should be instructed to link their account (see `PrepareGameLink`). * Storing Token * `identity_token` should be stored in some form of persistent storage. The token should be read from storage and passed to `Setup` every time the client starts. + * + * @param {Rivet.identity.SetupRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.setup({ + * existingIdentityToken: "string" + * }) */ public async setup( request: Rivet.identity.SetupRequest = {}, @@ -57,12 +70,14 @@ export class Identity { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.identity.SetupRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + requestType: "json", + body: serializers.identity.SetupRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.identity.SetupResponse.parseOrThrow(_response.body, { + return serializers.identity.SetupResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -75,7 +90,7 @@ export class Identity { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -85,7 +100,7 @@ export class Identity { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -95,7 +110,7 @@ export class Identity { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -105,7 +120,7 @@ export class Identity { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -115,7 +130,7 @@ export class Identity { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -125,7 +140,7 @@ export class Identity { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -158,12 +173,22 @@ export class Identity { /** * Fetches an identity profile. + * + * @param {string} identityId + * @param {Rivet.identity.GetProfileRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.getProfile("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * watchIndex: "string" + * }) */ public async getProfile( identityId: string, @@ -171,7 +196,7 @@ export class Identity { requestOptions?: Identity.RequestOptions ): Promise { const { watchIndex } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (watchIndex != null) { _queryParams["watch_index"] = watchIndex; } @@ -179,7 +204,7 @@ export class Identity { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/identity/identities/${identityId}/profile` + `/identity/identities/${encodeURIComponent(identityId)}/profile` ), method: "GET", headers: { @@ -187,11 +212,13 @@ export class Identity { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.identity.GetProfileResponse.parseOrThrow(_response.body, { + return serializers.identity.GetProfileResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -204,7 +231,7 @@ export class Identity { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -214,7 +241,7 @@ export class Identity { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -224,7 +251,7 @@ export class Identity { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -234,7 +261,7 @@ export class Identity { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -244,7 +271,7 @@ export class Identity { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -254,7 +281,7 @@ export class Identity { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -287,19 +314,28 @@ export class Identity { /** * Fetches the current identity's profile. + * + * @param {Rivet.identity.GetSelfProfileRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.getSelfProfile({ + * watchIndex: "string" + * }) */ public async getSelfProfile( request: Rivet.identity.GetSelfProfileRequest = {}, requestOptions?: Identity.RequestOptions ): Promise { const { watchIndex } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (watchIndex != null) { _queryParams["watch_index"] = watchIndex; } @@ -315,11 +351,13 @@ export class Identity { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.identity.GetProfileResponse.parseOrThrow(_response.body, { + return serializers.identity.GetProfileResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -332,7 +370,7 @@ export class Identity { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -342,7 +380,7 @@ export class Identity { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -352,7 +390,7 @@ export class Identity { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -362,7 +400,7 @@ export class Identity { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -372,7 +410,7 @@ export class Identity { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -382,7 +420,7 @@ export class Identity { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -415,19 +453,28 @@ export class Identity { /** * Fetches a list of identity handles. + * + * @param {Rivet.identity.GetHandlesRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.getHandles({ + * identityIds: "string" + * }) */ public async getHandles( request: Rivet.identity.GetHandlesRequest, requestOptions?: Identity.RequestOptions ): Promise { const { identityIds } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (Array.isArray(identityIds)) { _queryParams["identity_ids"] = identityIds.map((item) => item); } else { @@ -445,11 +492,13 @@ export class Identity { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.identity.GetHandlesResponse.parseOrThrow(_response.body, { + return serializers.identity.GetHandlesResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -462,7 +511,7 @@ export class Identity { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -472,7 +521,7 @@ export class Identity { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -482,7 +531,7 @@ export class Identity { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -492,7 +541,7 @@ export class Identity { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -502,7 +551,7 @@ export class Identity { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -512,7 +561,7 @@ export class Identity { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -545,19 +594,28 @@ export class Identity { /** * Fetches a list of identity summaries. + * + * @param {Rivet.identity.GetSummariesRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.getSummaries({ + * identityIds: "string" + * }) */ public async getSummaries( request: Rivet.identity.GetSummariesRequest, requestOptions?: Identity.RequestOptions ): Promise { const { identityIds } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (Array.isArray(identityIds)) { _queryParams["identity_ids"] = identityIds.map((item) => item); } else { @@ -575,11 +633,13 @@ export class Identity { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.identity.GetSummariesResponse.parseOrThrow(_response.body, { + return serializers.identity.GetSummariesResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -592,7 +652,7 @@ export class Identity { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -602,7 +662,7 @@ export class Identity { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -612,7 +672,7 @@ export class Identity { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -622,7 +682,7 @@ export class Identity { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -632,7 +692,7 @@ export class Identity { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -642,7 +702,7 @@ export class Identity { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -675,12 +735,23 @@ export class Identity { /** * Updates profile of the current identity. + * + * @param {Rivet.identity.UpdateProfileRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.updateProfile({ + * displayName: "string", + * accountNumber: 1, + * bio: "string" + * }) */ public async updateProfile( request: Rivet.identity.UpdateProfileRequest = {}, @@ -696,11 +767,11 @@ export class Identity { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.identity.UpdateProfileRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.identity.UpdateProfileRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -710,7 +781,7 @@ export class Identity { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -720,7 +791,7 @@ export class Identity { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -730,7 +801,7 @@ export class Identity { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -740,7 +811,7 @@ export class Identity { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -750,7 +821,7 @@ export class Identity { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -760,7 +831,7 @@ export class Identity { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -793,12 +864,23 @@ export class Identity { /** * Validate contents of identity profile. Use to provide immediate feedback on profile changes before committing them. + * + * @param {Rivet.identity.ValidateProfileRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.validateProfile({ + * displayName: "string", + * accountNumber: 1, + * bio: "string" + * }) */ public async validateProfile( request: Rivet.identity.ValidateProfileRequest = {}, @@ -814,11 +896,11 @@ export class Identity { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.identity.ValidateProfileRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.identity.ValidateProfileRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -828,7 +910,7 @@ export class Identity { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -838,7 +920,7 @@ export class Identity { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -848,7 +930,7 @@ export class Identity { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -858,7 +940,7 @@ export class Identity { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -868,7 +950,7 @@ export class Identity { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -878,7 +960,7 @@ export class Identity { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -911,19 +993,30 @@ export class Identity { /** * Fuzzy search for identities. + * + * @param {Rivet.identity.SearchRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.search({ + * query: "string", + * anchor: "string", + * limit: 1 + * }) */ public async search( request: Rivet.identity.SearchRequest, requestOptions?: Identity.RequestOptions ): Promise { const { query, anchor, limit } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; _queryParams["query"] = query; if (anchor != null) { _queryParams["anchor"] = anchor; @@ -944,11 +1037,13 @@ export class Identity { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.identity.SearchResponse.parseOrThrow(_response.body, { + return serializers.identity.SearchResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -961,7 +1056,7 @@ export class Identity { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -971,7 +1066,7 @@ export class Identity { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -981,7 +1076,7 @@ export class Identity { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -991,7 +1086,7 @@ export class Identity { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1001,7 +1096,7 @@ export class Identity { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1011,7 +1106,7 @@ export class Identity { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1044,12 +1139,29 @@ export class Identity { /** * Sets the current identity's game activity. This activity will automatically be removed when the identity goes offline. + * + * @param {Rivet.identity.SetGameActivityRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.setGameActivity({ + * gameActivity: { + * message: "string", + * publicMetadata: { + * "key": "value" + * }, + * mutualMetadata: { + * "key": "value" + * } + * } + * }) */ public async setGameActivity( request: Rivet.identity.SetGameActivityRequest, @@ -1065,11 +1177,11 @@ export class Identity { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.identity.SetGameActivityRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.identity.SetGameActivityRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -1079,7 +1191,7 @@ export class Identity { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1089,7 +1201,7 @@ export class Identity { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1099,7 +1211,7 @@ export class Identity { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1109,7 +1221,7 @@ export class Identity { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1119,7 +1231,7 @@ export class Identity { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1129,7 +1241,7 @@ export class Identity { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1162,12 +1274,18 @@ export class Identity { /** * Removes the current identity's game activity. + * + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.removeGameActivity() */ public async removeGameActivity(requestOptions?: Identity.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -1180,8 +1298,10 @@ export class Identity { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -1191,7 +1311,7 @@ export class Identity { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1201,7 +1321,7 @@ export class Identity { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1211,7 +1331,7 @@ export class Identity { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1221,7 +1341,7 @@ export class Identity { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1231,7 +1351,7 @@ export class Identity { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1241,7 +1361,7 @@ export class Identity { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1274,12 +1394,21 @@ export class Identity { /** * Updates the current identity's status. + * + * @param {Rivet.identity.UpdateStatusRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.updateStatus({ + * status: Rivet.identity.Status.Online + * }) */ public async updateStatus( request: Rivet.identity.UpdateStatusRequest, @@ -1295,11 +1424,11 @@ export class Identity { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.identity.UpdateStatusRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.identity.UpdateStatusRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -1309,7 +1438,7 @@ export class Identity { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1319,7 +1448,7 @@ export class Identity { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1329,7 +1458,7 @@ export class Identity { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1339,7 +1468,7 @@ export class Identity { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1349,7 +1478,7 @@ export class Identity { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1359,7 +1488,7 @@ export class Identity { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1392,26 +1521,35 @@ export class Identity { /** * Follows the given identity. In order for identities to be "friends", the other identity has to also follow this identity. + * + * @param {string} identityId + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.follow("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async follow(identityId: string, requestOptions?: Identity.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/identity/identities/${identityId}/follow` + `/identity/identities/${encodeURIComponent(identityId)}/follow` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -1421,7 +1559,7 @@ export class Identity { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1431,7 +1569,7 @@ export class Identity { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1441,7 +1579,7 @@ export class Identity { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1451,7 +1589,7 @@ export class Identity { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1461,7 +1599,7 @@ export class Identity { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1471,7 +1609,7 @@ export class Identity { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1504,26 +1642,35 @@ export class Identity { /** * Unfollows the given identity. + * + * @param {string} identityId + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.unfollow("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async unfollow(identityId: string, requestOptions?: Identity.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/identity/identities/${identityId}/follow` + `/identity/identities/${encodeURIComponent(identityId)}/follow` ), method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -1533,7 +1680,7 @@ export class Identity { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1543,7 +1690,7 @@ export class Identity { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1553,7 +1700,7 @@ export class Identity { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1563,7 +1710,7 @@ export class Identity { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1573,7 +1720,7 @@ export class Identity { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1583,7 +1730,7 @@ export class Identity { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1616,12 +1763,23 @@ export class Identity { /** * Prepares an avatar image upload. Complete upload with `CompleteIdentityAvatarUpload`. + * + * @param {Rivet.identity.PrepareAvatarUploadRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.prepareAvatarUpload({ + * path: "string", + * mime: "string", + * contentLength: 1000000 + * }) */ public async prepareAvatarUpload( request: Rivet.identity.PrepareAvatarUploadRequest, @@ -1637,14 +1795,16 @@ export class Identity { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.identity.PrepareAvatarUploadRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.identity.PrepareAvatarUploadRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.identity.PrepareAvatarUploadResponse.parseOrThrow(_response.body, { + return serializers.identity.PrepareAvatarUploadResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1657,7 +1817,7 @@ export class Identity { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1667,7 +1827,7 @@ export class Identity { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1677,7 +1837,7 @@ export class Identity { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1687,7 +1847,7 @@ export class Identity { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1697,7 +1857,7 @@ export class Identity { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1707,7 +1867,7 @@ export class Identity { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1740,26 +1900,35 @@ export class Identity { /** * Completes an avatar image upload. Must be called after the file upload process completes. + * + * @param {string} uploadId + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.completeAvatarUpload("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async completeAvatarUpload(uploadId: string, requestOptions?: Identity.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/identity/identities/avatar-upload/${uploadId}/complete` + `/identity/identities/avatar-upload/${encodeURIComponent(uploadId)}/complete` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -1769,7 +1938,7 @@ export class Identity { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1779,7 +1948,7 @@ export class Identity { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1789,7 +1958,7 @@ export class Identity { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1799,7 +1968,7 @@ export class Identity { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1809,7 +1978,7 @@ export class Identity { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1819,7 +1988,7 @@ export class Identity { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1852,12 +2021,25 @@ export class Identity { /** * Completes an avatar image upload. Must be called after the file upload process completes. + * + * @param {Rivet.identity.SignupForBetaRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.signupForBeta({ + * name: "string", + * companyName: "string", + * companySize: "string", + * preferredTools: "string", + * goals: "string" + * }) */ public async signupForBeta( request: Rivet.identity.SignupForBetaRequest, @@ -1873,11 +2055,11 @@ export class Identity { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.identity.SignupForBetaRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.identity.SignupForBetaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -1887,7 +2069,7 @@ export class Identity { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1897,7 +2079,7 @@ export class Identity { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1907,7 +2089,7 @@ export class Identity { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1917,7 +2099,7 @@ export class Identity { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1927,7 +2109,7 @@ export class Identity { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1937,7 +2119,7 @@ export class Identity { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1970,12 +2152,22 @@ export class Identity { /** * Creates an abuse report for an identity. + * + * @param {string} identityId + * @param {Rivet.identity.ReportRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.report("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * reason: "string" + * }) */ public async report( identityId: string, @@ -1985,16 +2177,18 @@ export class Identity { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/identity/identities/${identityId}/report` + `/identity/identities/${encodeURIComponent(identityId)}/report` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.identity.ReportRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + requestType: "json", + body: serializers.identity.ReportRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -2004,7 +2198,7 @@ export class Identity { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2014,7 +2208,7 @@ export class Identity { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2024,7 +2218,7 @@ export class Identity { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2034,7 +2228,7 @@ export class Identity { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2044,7 +2238,7 @@ export class Identity { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2054,7 +2248,7 @@ export class Identity { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2086,12 +2280,22 @@ export class Identity { } /** + * @param {string} identityId + * @param {Rivet.identity.ListFollowersRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.listFollowers("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * anchor: "string", + * limit: "string" + * }) */ public async listFollowers( identityId: string, @@ -2099,7 +2303,7 @@ export class Identity { requestOptions?: Identity.RequestOptions ): Promise { const { anchor, limit } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (anchor != null) { _queryParams["anchor"] = anchor; } @@ -2111,7 +2315,7 @@ export class Identity { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/identity/identities/${identityId}/followers` + `/identity/identities/${encodeURIComponent(identityId)}/followers` ), method: "GET", headers: { @@ -2119,11 +2323,13 @@ export class Identity { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.identity.ListFollowersResponse.parseOrThrow(_response.body, { + return serializers.identity.ListFollowersResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2136,7 +2342,7 @@ export class Identity { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2146,7 +2352,7 @@ export class Identity { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2156,7 +2362,7 @@ export class Identity { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2166,7 +2372,7 @@ export class Identity { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2176,7 +2382,7 @@ export class Identity { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2186,7 +2392,7 @@ export class Identity { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2218,12 +2424,22 @@ export class Identity { } /** + * @param {string} identityId + * @param {Rivet.identity.ListFollowingRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.listFollowing("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * anchor: "string", + * limit: "string" + * }) */ public async listFollowing( identityId: string, @@ -2231,7 +2447,7 @@ export class Identity { requestOptions?: Identity.RequestOptions ): Promise { const { anchor, limit } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (anchor != null) { _queryParams["anchor"] = anchor; } @@ -2243,7 +2459,7 @@ export class Identity { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/identity/identities/${identityId}/following` + `/identity/identities/${encodeURIComponent(identityId)}/following` ), method: "GET", headers: { @@ -2251,11 +2467,13 @@ export class Identity { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.identity.ListFollowingResponse.parseOrThrow(_response.body, { + return serializers.identity.ListFollowingResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2268,7 +2486,7 @@ export class Identity { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2278,7 +2496,7 @@ export class Identity { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2288,7 +2506,7 @@ export class Identity { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2298,7 +2516,7 @@ export class Identity { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2308,7 +2526,7 @@ export class Identity { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2318,7 +2536,7 @@ export class Identity { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2350,19 +2568,28 @@ export class Identity { } /** + * @param {Rivet.identity.ListFriendsRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.listFriends({ + * anchor: "string", + * limit: "string" + * }) */ public async listFriends( request: Rivet.identity.ListFriendsRequest = {}, requestOptions?: Identity.RequestOptions ): Promise { const { anchor, limit } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (anchor != null) { _queryParams["anchor"] = anchor; } @@ -2382,11 +2609,13 @@ export class Identity { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.identity.ListFriendsResponse.parseOrThrow(_response.body, { + return serializers.identity.ListFriendsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2399,7 +2628,7 @@ export class Identity { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2409,7 +2638,7 @@ export class Identity { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2419,7 +2648,7 @@ export class Identity { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2429,7 +2658,7 @@ export class Identity { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2439,7 +2668,7 @@ export class Identity { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2449,7 +2678,7 @@ export class Identity { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2481,12 +2710,22 @@ export class Identity { } /** + * @param {string} identityId + * @param {Rivet.identity.ListMutualFriendsRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.listMutualFriends("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * anchor: "string", + * limit: "string" + * }) */ public async listMutualFriends( identityId: string, @@ -2494,7 +2733,7 @@ export class Identity { requestOptions?: Identity.RequestOptions ): Promise { const { anchor, limit } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (anchor != null) { _queryParams["anchor"] = anchor; } @@ -2506,7 +2745,7 @@ export class Identity { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/identity/identities/${identityId}/mutual-friends` + `/identity/identities/${encodeURIComponent(identityId)}/mutual-friends` ), method: "GET", headers: { @@ -2514,11 +2753,13 @@ export class Identity { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.identity.ListMutualFriendsResponse.parseOrThrow(_response.body, { + return serializers.identity.ListMutualFriendsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2531,7 +2772,7 @@ export class Identity { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2541,7 +2782,7 @@ export class Identity { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2551,7 +2792,7 @@ export class Identity { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2561,7 +2802,7 @@ export class Identity { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2571,7 +2812,7 @@ export class Identity { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2581,7 +2822,7 @@ export class Identity { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2613,19 +2854,28 @@ export class Identity { } /** + * @param {Rivet.identity.ListRecentFollowersRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.listRecentFollowers({ + * count: 1, + * watchIndex: "string" + * }) */ public async listRecentFollowers( request: Rivet.identity.ListRecentFollowersRequest = {}, requestOptions?: Identity.RequestOptions ): Promise { const { count, watchIndex } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (count != null) { _queryParams["count"] = count.toString(); } @@ -2645,11 +2895,13 @@ export class Identity { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.identity.ListRecentFollowersResponse.parseOrThrow(_response.body, { + return serializers.identity.ListRecentFollowersResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2662,7 +2914,7 @@ export class Identity { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2672,7 +2924,7 @@ export class Identity { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2682,7 +2934,7 @@ export class Identity { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2692,7 +2944,7 @@ export class Identity { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2702,7 +2954,7 @@ export class Identity { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2712,7 +2964,7 @@ export class Identity { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2744,26 +2996,34 @@ export class Identity { } /** + * @param {string} identityId + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.ignoreRecentFollower("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async ignoreRecentFollower(identityId: string, requestOptions?: Identity.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/identity/identities/self/recent-followers/${identityId}/ignore` + `/identity/identities/self/recent-followers/${encodeURIComponent(identityId)}/ignore` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -2773,7 +3033,7 @@ export class Identity { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2783,7 +3043,7 @@ export class Identity { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2793,7 +3053,7 @@ export class Identity { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2803,7 +3063,7 @@ export class Identity { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2813,7 +3073,7 @@ export class Identity { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2823,7 +3083,7 @@ export class Identity { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2855,12 +3115,17 @@ export class Identity { } /** + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.markDeletion() */ public async markDeletion(requestOptions?: Identity.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -2873,8 +3138,10 @@ export class Identity { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -2884,7 +3151,7 @@ export class Identity { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2894,7 +3161,7 @@ export class Identity { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2904,7 +3171,7 @@ export class Identity { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2914,7 +3181,7 @@ export class Identity { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2924,7 +3191,7 @@ export class Identity { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2934,7 +3201,7 @@ export class Identity { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -2966,12 +3233,17 @@ export class Identity { } /** + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.unmarkDeletion() */ public async unmarkDeletion(requestOptions?: Identity.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -2984,8 +3256,10 @@ export class Identity { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -2995,7 +3269,7 @@ export class Identity { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -3005,7 +3279,7 @@ export class Identity { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -3015,7 +3289,7 @@ export class Identity { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -3025,7 +3299,7 @@ export class Identity { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -3035,7 +3309,7 @@ export class Identity { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -3045,7 +3319,7 @@ export class Identity { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -3094,7 +3368,7 @@ export class Identity { return (this._links ??= new Links(this._options)); } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/GetHandlesRequest.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/GetHandlesRequest.ts index 3287d4d6ab..bfae5e8a2f 100644 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/GetHandlesRequest.ts +++ b/sdks/full/typescript/src/api/resources/identity/client/requests/GetHandlesRequest.ts @@ -2,6 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * identityIds: "string" + * } + */ export interface GetHandlesRequest { identityIds: string | string[]; } diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/GetProfileRequest.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/GetProfileRequest.ts index d07c5050f1..2dbd92a507 100644 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/GetProfileRequest.ts +++ b/sdks/full/typescript/src/api/resources/identity/client/requests/GetProfileRequest.ts @@ -2,8 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * watchIndex: "string" + * } + */ export interface GetProfileRequest { watchIndex?: Rivet.WatchQuery; } diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/GetSelfProfileRequest.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/GetSelfProfileRequest.ts index 03aac8eff5..5a65e2ed33 100644 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/GetSelfProfileRequest.ts +++ b/sdks/full/typescript/src/api/resources/identity/client/requests/GetSelfProfileRequest.ts @@ -2,8 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * watchIndex: "string" + * } + */ export interface GetSelfProfileRequest { watchIndex?: Rivet.WatchQuery; } diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/GetSummariesRequest.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/GetSummariesRequest.ts index 715d78041c..7825630cac 100644 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/GetSummariesRequest.ts +++ b/sdks/full/typescript/src/api/resources/identity/client/requests/GetSummariesRequest.ts @@ -2,6 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * identityIds: "string" + * } + */ export interface GetSummariesRequest { identityIds: string | string[]; } diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/ListFollowersRequest.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/ListFollowersRequest.ts index 04c0926a9e..945efc9a76 100644 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/ListFollowersRequest.ts +++ b/sdks/full/typescript/src/api/resources/identity/client/requests/ListFollowersRequest.ts @@ -2,6 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * anchor: "string", + * limit: "string" + * } + */ export interface ListFollowersRequest { anchor?: string; /** diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/ListFollowingRequest.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/ListFollowingRequest.ts index 7a80db500f..8cb60299a7 100644 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/ListFollowingRequest.ts +++ b/sdks/full/typescript/src/api/resources/identity/client/requests/ListFollowingRequest.ts @@ -2,6 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * anchor: "string", + * limit: "string" + * } + */ export interface ListFollowingRequest { anchor?: string; /** diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/ListFriendsRequest.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/ListFriendsRequest.ts index 4e9bfbfac9..83f9c1ee7e 100644 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/ListFriendsRequest.ts +++ b/sdks/full/typescript/src/api/resources/identity/client/requests/ListFriendsRequest.ts @@ -2,6 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * anchor: "string", + * limit: "string" + * } + */ export interface ListFriendsRequest { anchor?: string; /** diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/ListMutualFriendsRequest.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/ListMutualFriendsRequest.ts index 8985b15bb8..db428822c0 100644 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/ListMutualFriendsRequest.ts +++ b/sdks/full/typescript/src/api/resources/identity/client/requests/ListMutualFriendsRequest.ts @@ -2,6 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * anchor: "string", + * limit: "string" + * } + */ export interface ListMutualFriendsRequest { anchor?: string; /** diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/ListRecentFollowersRequest.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/ListRecentFollowersRequest.ts index 3a0bc2e890..cb037159b6 100644 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/ListRecentFollowersRequest.ts +++ b/sdks/full/typescript/src/api/resources/identity/client/requests/ListRecentFollowersRequest.ts @@ -2,8 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * count: 1, + * watchIndex: "string" + * } + */ export interface ListRecentFollowersRequest { count?: number; watchIndex?: Rivet.WatchQuery | undefined; diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/PrepareAvatarUploadRequest.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/PrepareAvatarUploadRequest.ts index 4df45b60f4..379735df3c 100644 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/PrepareAvatarUploadRequest.ts +++ b/sdks/full/typescript/src/api/resources/identity/client/requests/PrepareAvatarUploadRequest.ts @@ -2,6 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * path: "string", + * mime: "string", + * contentLength: 1000000 + * } + */ export interface PrepareAvatarUploadRequest { path: string; /** See https://www.iana.org/assignments/media-types/media-types.xhtml */ diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/ReportRequest.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/ReportRequest.ts index d69ab03f28..80687e87b4 100644 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/ReportRequest.ts +++ b/sdks/full/typescript/src/api/resources/identity/client/requests/ReportRequest.ts @@ -2,6 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * reason: "string" + * } + */ export interface ReportRequest { reason?: string; } diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/SearchRequest.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/SearchRequest.ts index 37538ed218..9a0c9f6bd6 100644 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/SearchRequest.ts +++ b/sdks/full/typescript/src/api/resources/identity/client/requests/SearchRequest.ts @@ -2,6 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * query: "string", + * anchor: "string", + * limit: 1 + * } + */ export interface SearchRequest { /** * The query to match identity display names and account numbers against. diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/SetGameActivityRequest.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/SetGameActivityRequest.ts index 2a3b2a05c7..e587527e55 100644 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/SetGameActivityRequest.ts +++ b/sdks/full/typescript/src/api/resources/identity/client/requests/SetGameActivityRequest.ts @@ -2,8 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * gameActivity: { + * message: "string", + * publicMetadata: { + * "key": "value" + * }, + * mutualMetadata: { + * "key": "value" + * } + * } + * } + */ export interface SetGameActivityRequest { gameActivity: Rivet.identity.UpdateGameActivity; } diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/SetupRequest.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/SetupRequest.ts index 39d0615307..681abff0f8 100644 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/SetupRequest.ts +++ b/sdks/full/typescript/src/api/resources/identity/client/requests/SetupRequest.ts @@ -2,8 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * existingIdentityToken: "string" + * } + */ export interface SetupRequest { existingIdentityToken?: Rivet.Jwt; } diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/SignupForBetaRequest.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/SignupForBetaRequest.ts index 989deff8fb..2f68fc980f 100644 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/SignupForBetaRequest.ts +++ b/sdks/full/typescript/src/api/resources/identity/client/requests/SignupForBetaRequest.ts @@ -2,6 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * name: "string", + * companyName: "string", + * companySize: "string", + * preferredTools: "string", + * goals: "string" + * } + */ export interface SignupForBetaRequest { name: string; companyName?: string; diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/UpdateProfileRequest.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/UpdateProfileRequest.ts index 8c0172ed5d..b638183f9f 100644 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/UpdateProfileRequest.ts +++ b/sdks/full/typescript/src/api/resources/identity/client/requests/UpdateProfileRequest.ts @@ -2,8 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * displayName: "string", + * accountNumber: 1, + * bio: "string" + * } + */ export interface UpdateProfileRequest { displayName?: Rivet.DisplayName; accountNumber?: Rivet.AccountNumber; diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/UpdateStatusRequest.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/UpdateStatusRequest.ts index 9dde2eb715..890f22b136 100644 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/UpdateStatusRequest.ts +++ b/sdks/full/typescript/src/api/resources/identity/client/requests/UpdateStatusRequest.ts @@ -2,8 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * status: Rivet.identity.Status.Online + * } + */ export interface UpdateStatusRequest { status: Rivet.identity.Status; } diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/ValidateProfileRequest.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/ValidateProfileRequest.ts index 33299f9432..8e667267ea 100644 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/ValidateProfileRequest.ts +++ b/sdks/full/typescript/src/api/resources/identity/client/requests/ValidateProfileRequest.ts @@ -2,8 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * displayName: "string", + * accountNumber: 1, + * bio: "string" + * } + */ export interface ValidateProfileRequest { displayName?: Rivet.DisplayName; accountNumber?: Rivet.AccountNumber; diff --git a/sdks/full/typescript/src/api/resources/identity/client/requests/index.ts b/sdks/full/typescript/src/api/resources/identity/client/requests/index.ts index b80646a877..bdb301a5fc 100644 --- a/sdks/full/typescript/src/api/resources/identity/client/requests/index.ts +++ b/sdks/full/typescript/src/api/resources/identity/client/requests/index.ts @@ -1,18 +1,18 @@ -export { SetupRequest } from "./SetupRequest"; -export { GetProfileRequest } from "./GetProfileRequest"; -export { GetSelfProfileRequest } from "./GetSelfProfileRequest"; -export { GetHandlesRequest } from "./GetHandlesRequest"; -export { GetSummariesRequest } from "./GetSummariesRequest"; -export { UpdateProfileRequest } from "./UpdateProfileRequest"; -export { ValidateProfileRequest } from "./ValidateProfileRequest"; -export { SearchRequest } from "./SearchRequest"; -export { SetGameActivityRequest } from "./SetGameActivityRequest"; -export { UpdateStatusRequest } from "./UpdateStatusRequest"; -export { PrepareAvatarUploadRequest } from "./PrepareAvatarUploadRequest"; -export { SignupForBetaRequest } from "./SignupForBetaRequest"; -export { ReportRequest } from "./ReportRequest"; -export { ListFollowersRequest } from "./ListFollowersRequest"; -export { ListFollowingRequest } from "./ListFollowingRequest"; -export { ListFriendsRequest } from "./ListFriendsRequest"; -export { ListMutualFriendsRequest } from "./ListMutualFriendsRequest"; -export { ListRecentFollowersRequest } from "./ListRecentFollowersRequest"; +export { type SetupRequest } from "./SetupRequest"; +export { type GetProfileRequest } from "./GetProfileRequest"; +export { type GetSelfProfileRequest } from "./GetSelfProfileRequest"; +export { type GetHandlesRequest } from "./GetHandlesRequest"; +export { type GetSummariesRequest } from "./GetSummariesRequest"; +export { type UpdateProfileRequest } from "./UpdateProfileRequest"; +export { type ValidateProfileRequest } from "./ValidateProfileRequest"; +export { type SearchRequest } from "./SearchRequest"; +export { type SetGameActivityRequest } from "./SetGameActivityRequest"; +export { type UpdateStatusRequest } from "./UpdateStatusRequest"; +export { type PrepareAvatarUploadRequest } from "./PrepareAvatarUploadRequest"; +export { type SignupForBetaRequest } from "./SignupForBetaRequest"; +export { type ReportRequest } from "./ReportRequest"; +export { type ListFollowersRequest } from "./ListFollowersRequest"; +export { type ListFollowingRequest } from "./ListFollowingRequest"; +export { type ListFriendsRequest } from "./ListFriendsRequest"; +export { type ListMutualFriendsRequest } from "./ListMutualFriendsRequest"; +export { type ListRecentFollowersRequest } from "./ListRecentFollowersRequest"; diff --git a/sdks/full/typescript/src/api/resources/identity/resources/activities/client/Client.ts b/sdks/full/typescript/src/api/resources/identity/resources/activities/client/Client.ts index 7384826df0..4708d6ecf6 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/activities/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/activities/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Activities { interface Options { @@ -17,8 +17,12 @@ export declare namespace Activities { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -27,19 +31,28 @@ export class Activities { /** * Returns an overview of all players currently online or in game. + * + * @param {Rivet.identity.ListActivitiesRequest} request + * @param {Activities.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.activities.list({ + * watchIndex: "string" + * }) */ public async list( request: Rivet.identity.ListActivitiesRequest = {}, requestOptions?: Activities.RequestOptions ): Promise { const { watchIndex } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (watchIndex != null) { _queryParams["watch_index"] = watchIndex; } @@ -55,11 +68,13 @@ export class Activities { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.identity.ListActivitiesResponse.parseOrThrow(_response.body, { + return serializers.identity.ListActivitiesResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -72,7 +87,7 @@ export class Activities { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -82,7 +97,7 @@ export class Activities { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -92,7 +107,7 @@ export class Activities { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -102,7 +117,7 @@ export class Activities { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -112,7 +127,7 @@ export class Activities { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -122,7 +137,7 @@ export class Activities { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -153,7 +168,7 @@ export class Activities { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/identity/resources/activities/client/requests/ListActivitiesRequest.ts b/sdks/full/typescript/src/api/resources/identity/resources/activities/client/requests/ListActivitiesRequest.ts index f2edd0807b..29062a8142 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/activities/client/requests/ListActivitiesRequest.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/activities/client/requests/ListActivitiesRequest.ts @@ -2,8 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../.."; +import * as Rivet from "../../../../../../index"; +/** + * @example + * { + * watchIndex: "string" + * } + */ export interface ListActivitiesRequest { watchIndex?: Rivet.WatchQuery; } diff --git a/sdks/full/typescript/src/api/resources/identity/resources/activities/client/requests/index.ts b/sdks/full/typescript/src/api/resources/identity/resources/activities/client/requests/index.ts index 90a9a44f46..e0147e2217 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/activities/client/requests/index.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/activities/client/requests/index.ts @@ -1 +1 @@ -export { ListActivitiesRequest } from "./ListActivitiesRequest"; +export { type ListActivitiesRequest } from "./ListActivitiesRequest"; diff --git a/sdks/full/typescript/src/api/resources/identity/resources/activities/types/ListActivitiesResponse.ts b/sdks/full/typescript/src/api/resources/identity/resources/activities/types/ListActivitiesResponse.ts index 3907617bff..d0186464b1 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/activities/types/ListActivitiesResponse.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/activities/types/ListActivitiesResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface ListActivitiesResponse { identities: Rivet.identity.Handle[]; diff --git a/sdks/full/typescript/src/api/resources/identity/resources/common/types/EmailLinkedAccount.ts b/sdks/full/typescript/src/api/resources/identity/resources/common/types/EmailLinkedAccount.ts index 4fb3651745..7c3b036c6d 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/common/types/EmailLinkedAccount.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/common/types/EmailLinkedAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * An identity's linked email. diff --git a/sdks/full/typescript/src/api/resources/identity/resources/common/types/GameActivity.ts b/sdks/full/typescript/src/api/resources/identity/resources/common/types/GameActivity.ts index 21500e5420..59817c71af 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/common/types/GameActivity.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/common/types/GameActivity.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * The game an identity is currently participating in. diff --git a/sdks/full/typescript/src/api/resources/identity/resources/common/types/GlobalEvent.ts b/sdks/full/typescript/src/api/resources/identity/resources/common/types/GlobalEvent.ts index 653fa4ab2f..d6efb35ec3 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/common/types/GlobalEvent.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/common/types/GlobalEvent.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * An event relevant to the current identity. diff --git a/sdks/full/typescript/src/api/resources/identity/resources/common/types/GlobalEventIdentityUpdate.ts b/sdks/full/typescript/src/api/resources/identity/resources/common/types/GlobalEventIdentityUpdate.ts index 82fe878172..ace8d189ee 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/common/types/GlobalEventIdentityUpdate.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/common/types/GlobalEventIdentityUpdate.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GlobalEventIdentityUpdate { identity: Rivet.identity.Profile; diff --git a/sdks/full/typescript/src/api/resources/identity/resources/common/types/GlobalEventKind.ts b/sdks/full/typescript/src/api/resources/identity/resources/common/types/GlobalEventKind.ts index 7f6aef651d..63f741dbcc 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/common/types/GlobalEventKind.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/common/types/GlobalEventKind.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GlobalEventKind { identityUpdate?: Rivet.identity.GlobalEventIdentityUpdate; diff --git a/sdks/full/typescript/src/api/resources/identity/resources/common/types/GlobalEventMatchmakerLobbyJoin.ts b/sdks/full/typescript/src/api/resources/identity/resources/common/types/GlobalEventMatchmakerLobbyJoin.ts index 4e3d781e36..1841f81bc5 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/common/types/GlobalEventMatchmakerLobbyJoin.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/common/types/GlobalEventMatchmakerLobbyJoin.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GlobalEventMatchmakerLobbyJoin { lobby: Rivet.matchmaker.JoinLobby; diff --git a/sdks/full/typescript/src/api/resources/identity/resources/common/types/Group.ts b/sdks/full/typescript/src/api/resources/identity/resources/common/types/Group.ts index 9447376047..2c3bf84886 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/common/types/Group.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/common/types/Group.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A group that the given identity. diff --git a/sdks/full/typescript/src/api/resources/identity/resources/common/types/Handle.ts b/sdks/full/typescript/src/api/resources/identity/resources/common/types/Handle.ts index c2ef9a7223..9204d80e3f 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/common/types/Handle.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/common/types/Handle.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * An identity handle. diff --git a/sdks/full/typescript/src/api/resources/identity/resources/common/types/LinkedAccount.ts b/sdks/full/typescript/src/api/resources/identity/resources/common/types/LinkedAccount.ts index 5bc5a1c60a..3ed7e23afe 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/common/types/LinkedAccount.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/common/types/LinkedAccount.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A union representing an identity's linked accounts. diff --git a/sdks/full/typescript/src/api/resources/identity/resources/common/types/Presence.ts b/sdks/full/typescript/src/api/resources/identity/resources/common/types/Presence.ts index b5894062df..d8f235cfad 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/common/types/Presence.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/common/types/Presence.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * Information about the identity's current status, party, and active game. diff --git a/sdks/full/typescript/src/api/resources/identity/resources/common/types/Profile.ts b/sdks/full/typescript/src/api/resources/identity/resources/common/types/Profile.ts index 2e62e9a52b..f2b7568675 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/common/types/Profile.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/common/types/Profile.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * An identity profile. diff --git a/sdks/full/typescript/src/api/resources/identity/resources/common/types/Summary.ts b/sdks/full/typescript/src/api/resources/identity/resources/common/types/Summary.ts index 89f7b3e0cd..a14af15d23 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/common/types/Summary.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/common/types/Summary.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * An identity summary. diff --git a/sdks/full/typescript/src/api/resources/identity/resources/events/client/Client.ts b/sdks/full/typescript/src/api/resources/identity/resources/events/client/Client.ts index 85eac3a562..96177fdb5f 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/events/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/events/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Events { interface Options { @@ -17,8 +17,12 @@ export declare namespace Events { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -27,19 +31,28 @@ export class Events { /** * Returns all events relative to the current identity. + * + * @param {Rivet.identity.WatchEventsRequest} request + * @param {Events.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.events.watch({ + * watchIndex: "string" + * }) */ public async watch( request: Rivet.identity.WatchEventsRequest = {}, requestOptions?: Events.RequestOptions ): Promise { const { watchIndex } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (watchIndex != null) { _queryParams["watch_index"] = watchIndex; } @@ -55,11 +68,13 @@ export class Events { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.identity.WatchEventsResponse.parseOrThrow(_response.body, { + return serializers.identity.WatchEventsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -72,7 +87,7 @@ export class Events { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -82,7 +97,7 @@ export class Events { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -92,7 +107,7 @@ export class Events { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -102,7 +117,7 @@ export class Events { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -112,7 +127,7 @@ export class Events { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -122,7 +137,7 @@ export class Events { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -153,7 +168,7 @@ export class Events { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/identity/resources/events/client/requests/WatchEventsRequest.ts b/sdks/full/typescript/src/api/resources/identity/resources/events/client/requests/WatchEventsRequest.ts index 871b227ea8..99eb2b3e29 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/events/client/requests/WatchEventsRequest.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/events/client/requests/WatchEventsRequest.ts @@ -2,8 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../.."; +import * as Rivet from "../../../../../../index"; +/** + * @example + * { + * watchIndex: "string" + * } + */ export interface WatchEventsRequest { watchIndex?: Rivet.WatchQuery; } diff --git a/sdks/full/typescript/src/api/resources/identity/resources/events/client/requests/index.ts b/sdks/full/typescript/src/api/resources/identity/resources/events/client/requests/index.ts index cb463d9752..9f84f1e664 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/events/client/requests/index.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/events/client/requests/index.ts @@ -1 +1 @@ -export { WatchEventsRequest } from "./WatchEventsRequest"; +export { type WatchEventsRequest } from "./WatchEventsRequest"; diff --git a/sdks/full/typescript/src/api/resources/identity/resources/events/types/WatchEventsResponse.ts b/sdks/full/typescript/src/api/resources/identity/resources/events/types/WatchEventsResponse.ts index 3fbba6da64..623a47a5ce 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/events/types/WatchEventsResponse.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/events/types/WatchEventsResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface WatchEventsResponse { events: Rivet.identity.GlobalEvent[]; diff --git a/sdks/full/typescript/src/api/resources/identity/resources/links/client/Client.ts b/sdks/full/typescript/src/api/resources/identity/resources/links/client/Client.ts index b47868e983..9951e3b68e 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/links/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/links/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Links { interface Options { @@ -17,8 +17,12 @@ export declare namespace Links { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -42,12 +46,18 @@ export class Links { * This is designed to be as flexible as possible so `identity_link_url` can be opened * on any device. For example, when playing a console game, the user can scan a * QR code for `identity_link_url` to authenticate on their phone. + * + * @param {Links.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.links.prepare() */ public async prepare(requestOptions?: Links.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -60,11 +70,13 @@ export class Links { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.identity.PrepareGameLinkResponse.parseOrThrow(_response.body, { + return serializers.identity.PrepareGameLinkResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -77,7 +89,7 @@ export class Links { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -87,7 +99,7 @@ export class Links { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -97,7 +109,7 @@ export class Links { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -107,7 +119,7 @@ export class Links { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -117,7 +129,7 @@ export class Links { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -127,7 +139,7 @@ export class Links { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -160,19 +172,29 @@ export class Links { /** * Returns the current status of a linking process. Once `status` is `complete`, the identity's profile should be fetched again since they may have switched accounts. + * + * @param {Rivet.identity.GetGameLinkRequest} request + * @param {Links.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.links.get({ + * identityLinkToken: "string", + * watchIndex: "string" + * }) */ public async get( request: Rivet.identity.GetGameLinkRequest, requestOptions?: Links.RequestOptions ): Promise { const { identityLinkToken, watchIndex } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; _queryParams["identity_link_token"] = identityLinkToken; if (watchIndex != null) { _queryParams["watch_index"] = watchIndex; @@ -189,11 +211,13 @@ export class Links { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.identity.GetGameLinkResponse.parseOrThrow(_response.body, { + return serializers.identity.GetGameLinkResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -206,7 +230,7 @@ export class Links { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -216,7 +240,7 @@ export class Links { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -226,7 +250,7 @@ export class Links { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -236,7 +260,7 @@ export class Links { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -246,7 +270,7 @@ export class Links { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -256,7 +280,7 @@ export class Links { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -289,12 +313,21 @@ export class Links { /** * Completes a game link process and returns whether or not the link is valid. + * + * @param {Rivet.identity.CompleteGameLinkRequest} request + * @param {Links.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.links.complete({ + * identityLinkToken: "string" + * }) */ public async complete( request: Rivet.identity.CompleteGameLinkRequest, @@ -310,11 +343,13 @@ export class Links { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.identity.CompleteGameLinkRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.identity.CompleteGameLinkRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -324,7 +359,7 @@ export class Links { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -334,7 +369,7 @@ export class Links { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -344,7 +379,7 @@ export class Links { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -354,7 +389,7 @@ export class Links { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -364,7 +399,7 @@ export class Links { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -374,7 +409,7 @@ export class Links { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -407,12 +442,21 @@ export class Links { /** * Cancels a game link. It can no longer be used to link after cancellation. + * + * @param {Rivet.identity.CancelGameLinkRequest} request + * @param {Links.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.links.cancel({ + * identityLinkToken: "string" + * }) */ public async cancel( request: Rivet.identity.CancelGameLinkRequest, @@ -428,11 +472,11 @@ export class Links { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.identity.CancelGameLinkRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.identity.CancelGameLinkRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -442,7 +486,7 @@ export class Links { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -452,7 +496,7 @@ export class Links { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -462,7 +506,7 @@ export class Links { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -472,7 +516,7 @@ export class Links { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -482,7 +526,7 @@ export class Links { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -492,7 +536,7 @@ export class Links { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -523,7 +567,7 @@ export class Links { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/identity/resources/links/client/requests/GetGameLinkRequest.ts b/sdks/full/typescript/src/api/resources/identity/resources/links/client/requests/GetGameLinkRequest.ts index d9315e5825..9229a690ca 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/links/client/requests/GetGameLinkRequest.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/links/client/requests/GetGameLinkRequest.ts @@ -2,8 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../.."; +import * as Rivet from "../../../../../../index"; +/** + * @example + * { + * identityLinkToken: "string", + * watchIndex: "string" + * } + */ export interface GetGameLinkRequest { identityLinkToken: Rivet.Jwt; watchIndex?: Rivet.WatchQuery; diff --git a/sdks/full/typescript/src/api/resources/identity/resources/links/client/requests/index.ts b/sdks/full/typescript/src/api/resources/identity/resources/links/client/requests/index.ts index ecd1212991..ed39f0a4c8 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/links/client/requests/index.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/links/client/requests/index.ts @@ -1 +1 @@ -export { GetGameLinkRequest } from "./GetGameLinkRequest"; +export { type GetGameLinkRequest } from "./GetGameLinkRequest"; diff --git a/sdks/full/typescript/src/api/resources/identity/resources/links/types/CancelGameLinkRequest.ts b/sdks/full/typescript/src/api/resources/identity/resources/links/types/CancelGameLinkRequest.ts index 47ad233356..c5d2141b72 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/links/types/CancelGameLinkRequest.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/links/types/CancelGameLinkRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface CancelGameLinkRequest { identityLinkToken: Rivet.Jwt; diff --git a/sdks/full/typescript/src/api/resources/identity/resources/links/types/CompleteGameLinkRequest.ts b/sdks/full/typescript/src/api/resources/identity/resources/links/types/CompleteGameLinkRequest.ts index 2469a6b420..5ac0c83191 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/links/types/CompleteGameLinkRequest.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/links/types/CompleteGameLinkRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface CompleteGameLinkRequest { identityLinkToken: Rivet.Jwt; diff --git a/sdks/full/typescript/src/api/resources/identity/resources/links/types/GetGameLinkNewIdentity.ts b/sdks/full/typescript/src/api/resources/identity/resources/links/types/GetGameLinkNewIdentity.ts index f0b5a542b1..76ed6bc28c 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/links/types/GetGameLinkNewIdentity.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/links/types/GetGameLinkNewIdentity.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GetGameLinkNewIdentity { identityToken: Rivet.Jwt; diff --git a/sdks/full/typescript/src/api/resources/identity/resources/links/types/GetGameLinkResponse.ts b/sdks/full/typescript/src/api/resources/identity/resources/links/types/GetGameLinkResponse.ts index 55de7c6af7..a5336cddf4 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/links/types/GetGameLinkResponse.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/links/types/GetGameLinkResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GetGameLinkResponse { status: Rivet.identity.GameLinkStatus; diff --git a/sdks/full/typescript/src/api/resources/identity/resources/links/types/PrepareGameLinkResponse.ts b/sdks/full/typescript/src/api/resources/identity/resources/links/types/PrepareGameLinkResponse.ts index 7a4af360af..97bd70ecdb 100644 --- a/sdks/full/typescript/src/api/resources/identity/resources/links/types/PrepareGameLinkResponse.ts +++ b/sdks/full/typescript/src/api/resources/identity/resources/links/types/PrepareGameLinkResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface PrepareGameLinkResponse { /** Pass this to `GetGameLink` to get the linking status. Valid for 15 minutes. */ diff --git a/sdks/full/typescript/src/api/resources/identity/types/GetHandlesResponse.ts b/sdks/full/typescript/src/api/resources/identity/types/GetHandlesResponse.ts index 205dd46263..587544cbae 100644 --- a/sdks/full/typescript/src/api/resources/identity/types/GetHandlesResponse.ts +++ b/sdks/full/typescript/src/api/resources/identity/types/GetHandlesResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface GetHandlesResponse { identities: Rivet.identity.Handle[]; diff --git a/sdks/full/typescript/src/api/resources/identity/types/GetProfileResponse.ts b/sdks/full/typescript/src/api/resources/identity/types/GetProfileResponse.ts index 4571898a0e..cfc43a0016 100644 --- a/sdks/full/typescript/src/api/resources/identity/types/GetProfileResponse.ts +++ b/sdks/full/typescript/src/api/resources/identity/types/GetProfileResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface GetProfileResponse { identity: Rivet.identity.Profile; diff --git a/sdks/full/typescript/src/api/resources/identity/types/GetSummariesResponse.ts b/sdks/full/typescript/src/api/resources/identity/types/GetSummariesResponse.ts index 1d0a0790bc..72c599d114 100644 --- a/sdks/full/typescript/src/api/resources/identity/types/GetSummariesResponse.ts +++ b/sdks/full/typescript/src/api/resources/identity/types/GetSummariesResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface GetSummariesResponse { identities: Rivet.identity.Summary[]; diff --git a/sdks/full/typescript/src/api/resources/identity/types/ListFollowersResponse.ts b/sdks/full/typescript/src/api/resources/identity/types/ListFollowersResponse.ts index 1f283b3e3d..e90651ac0b 100644 --- a/sdks/full/typescript/src/api/resources/identity/types/ListFollowersResponse.ts +++ b/sdks/full/typescript/src/api/resources/identity/types/ListFollowersResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface ListFollowersResponse { identities: Rivet.identity.Handle[]; diff --git a/sdks/full/typescript/src/api/resources/identity/types/ListFollowingResponse.ts b/sdks/full/typescript/src/api/resources/identity/types/ListFollowingResponse.ts index 9a1bb4fb61..b58b7633ab 100644 --- a/sdks/full/typescript/src/api/resources/identity/types/ListFollowingResponse.ts +++ b/sdks/full/typescript/src/api/resources/identity/types/ListFollowingResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface ListFollowingResponse { identities: Rivet.identity.Handle[]; diff --git a/sdks/full/typescript/src/api/resources/identity/types/ListFriendsResponse.ts b/sdks/full/typescript/src/api/resources/identity/types/ListFriendsResponse.ts index ef3c03efb6..87c12ca58a 100644 --- a/sdks/full/typescript/src/api/resources/identity/types/ListFriendsResponse.ts +++ b/sdks/full/typescript/src/api/resources/identity/types/ListFriendsResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface ListFriendsResponse { identities: Rivet.identity.Handle[]; diff --git a/sdks/full/typescript/src/api/resources/identity/types/ListMutualFriendsResponse.ts b/sdks/full/typescript/src/api/resources/identity/types/ListMutualFriendsResponse.ts index 2eeec9936f..2ae2cef249 100644 --- a/sdks/full/typescript/src/api/resources/identity/types/ListMutualFriendsResponse.ts +++ b/sdks/full/typescript/src/api/resources/identity/types/ListMutualFriendsResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface ListMutualFriendsResponse { identities: Rivet.identity.Handle[]; diff --git a/sdks/full/typescript/src/api/resources/identity/types/ListRecentFollowersResponse.ts b/sdks/full/typescript/src/api/resources/identity/types/ListRecentFollowersResponse.ts index 35e8fb3e77..8d591e4b59 100644 --- a/sdks/full/typescript/src/api/resources/identity/types/ListRecentFollowersResponse.ts +++ b/sdks/full/typescript/src/api/resources/identity/types/ListRecentFollowersResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface ListRecentFollowersResponse { identities: Rivet.identity.Handle[]; diff --git a/sdks/full/typescript/src/api/resources/identity/types/PrepareAvatarUploadResponse.ts b/sdks/full/typescript/src/api/resources/identity/types/PrepareAvatarUploadResponse.ts index ebc92cf1dc..f70f01c918 100644 --- a/sdks/full/typescript/src/api/resources/identity/types/PrepareAvatarUploadResponse.ts +++ b/sdks/full/typescript/src/api/resources/identity/types/PrepareAvatarUploadResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface PrepareAvatarUploadResponse { uploadId: string; diff --git a/sdks/full/typescript/src/api/resources/identity/types/SearchResponse.ts b/sdks/full/typescript/src/api/resources/identity/types/SearchResponse.ts index a40911d739..81b3e3c382 100644 --- a/sdks/full/typescript/src/api/resources/identity/types/SearchResponse.ts +++ b/sdks/full/typescript/src/api/resources/identity/types/SearchResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface SearchResponse { identities: Rivet.identity.Handle[]; diff --git a/sdks/full/typescript/src/api/resources/identity/types/SetupResponse.ts b/sdks/full/typescript/src/api/resources/identity/types/SetupResponse.ts index 0be6503e19..6de20de582 100644 --- a/sdks/full/typescript/src/api/resources/identity/types/SetupResponse.ts +++ b/sdks/full/typescript/src/api/resources/identity/types/SetupResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface SetupResponse { /** diff --git a/sdks/full/typescript/src/api/resources/identity/types/ValidateProfileResponse.ts b/sdks/full/typescript/src/api/resources/identity/types/ValidateProfileResponse.ts index 21c12c00b9..7938071be8 100644 --- a/sdks/full/typescript/src/api/resources/identity/types/ValidateProfileResponse.ts +++ b/sdks/full/typescript/src/api/resources/identity/types/ValidateProfileResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface ValidateProfileResponse { errors: Rivet.ValidationError[]; diff --git a/sdks/full/typescript/src/api/resources/job/client/Client.ts b/sdks/full/typescript/src/api/resources/job/client/Client.ts index d41d32dccf..bc58c7f954 100644 --- a/sdks/full/typescript/src/api/resources/job/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/job/client/Client.ts @@ -14,8 +14,12 @@ export declare namespace Job { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } diff --git a/sdks/full/typescript/src/api/resources/job/resources/run/client/Client.ts b/sdks/full/typescript/src/api/resources/job/resources/run/client/Client.ts index f73945e437..0a62fb84ad 100644 --- a/sdks/full/typescript/src/api/resources/job/resources/run/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/job/resources/run/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; -import * as serializers from "../../../../../../serialization"; +import * as errors from "../../../../../../errors/index"; +import * as serializers from "../../../../../../serialization/index"; export declare namespace Run { interface Options { @@ -17,8 +17,12 @@ export declare namespace Run { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -26,12 +30,17 @@ export class Run { constructor(protected readonly _options: Run.Options = {}) {} /** + * @param {Run.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.job.run.cleanup() */ public async cleanup(requestOptions?: Run.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -44,8 +53,10 @@ export class Run { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -55,7 +66,7 @@ export class Run { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -65,7 +76,7 @@ export class Run { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -75,7 +86,7 @@ export class Run { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -85,7 +96,7 @@ export class Run { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -95,7 +106,7 @@ export class Run { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -105,7 +116,7 @@ export class Run { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -136,7 +147,7 @@ export class Run { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/kv/client/Client.ts b/sdks/full/typescript/src/api/resources/kv/client/Client.ts index f24e15e480..7d45a871fa 100644 --- a/sdks/full/typescript/src/api/resources/kv/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/kv/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../environments"; import * as core from "../../../../core"; -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../serialization"; -import * as errors from "../../../../errors"; +import * as serializers from "../../../../serialization/index"; +import * as errors from "../../../../errors/index"; export declare namespace Kv { interface Options { @@ -17,8 +17,12 @@ export declare namespace Kv { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -27,19 +31,30 @@ export class Kv { /** * Returns a specific key-value entry by key. + * + * @param {Rivet.kv.GetOperationRequest} request + * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.kv.get({ + * key: "string", + * watchIndex: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * }) */ public async get( request: Rivet.kv.GetOperationRequest, requestOptions?: Kv.RequestOptions ): Promise { const { key, watchIndex, namespaceId } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; _queryParams["key"] = key; if (watchIndex != null) { _queryParams["watch_index"] = watchIndex; @@ -60,11 +75,13 @@ export class Kv { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.kv.GetResponse.parseOrThrow(_response.body, { + return serializers.kv.GetResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -77,7 +94,7 @@ export class Kv { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -87,7 +104,7 @@ export class Kv { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -97,7 +114,7 @@ export class Kv { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -107,7 +124,7 @@ export class Kv { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -117,7 +134,7 @@ export class Kv { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -127,7 +144,7 @@ export class Kv { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -160,12 +177,25 @@ export class Kv { /** * Puts (sets or overwrites) a key-value entry by key. + * + * @param {Rivet.kv.PutRequest} request + * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.kv.put({ + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + * key: "string", + * value: { + * "key": "value" + * } + * }) */ public async put(request: Rivet.kv.PutRequest, requestOptions?: Kv.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -178,9 +208,11 @@ export class Kv { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.kv.PutRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + requestType: "json", + body: serializers.kv.PutRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -190,7 +222,7 @@ export class Kv { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -200,7 +232,7 @@ export class Kv { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -210,7 +242,7 @@ export class Kv { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -220,7 +252,7 @@ export class Kv { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -230,7 +262,7 @@ export class Kv { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -240,7 +272,7 @@ export class Kv { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -273,16 +305,26 @@ export class Kv { /** * Deletes a key-value entry by key. + * + * @param {Rivet.kv.DeleteOperationRequest} request + * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.kv.delete({ + * key: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * }) */ public async delete(request: Rivet.kv.DeleteOperationRequest, requestOptions?: Kv.RequestOptions): Promise { const { key, namespaceId } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; _queryParams["key"] = key; if (namespaceId != null) { _queryParams["namespace_id"] = namespaceId; @@ -299,8 +341,10 @@ export class Kv { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -310,7 +354,7 @@ export class Kv { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -320,7 +364,7 @@ export class Kv { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -330,7 +374,7 @@ export class Kv { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -340,7 +384,7 @@ export class Kv { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -350,7 +394,7 @@ export class Kv { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -360,7 +404,7 @@ export class Kv { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -393,19 +437,29 @@ export class Kv { /** * Lists all keys in a directory. + * + * @param {Rivet.kv.ListOperationRequest} request + * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.kv.list({ + * directory: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * }) */ public async list( request: Rivet.kv.ListOperationRequest, requestOptions?: Kv.RequestOptions ): Promise { const { directory, namespaceId } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; _queryParams["directory"] = directory; _queryParams["namespace_id"] = namespaceId; const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -419,11 +473,13 @@ export class Kv { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.kv.ListResponse.parseOrThrow(_response.body, { + return serializers.kv.ListResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -436,7 +492,7 @@ export class Kv { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -446,7 +502,7 @@ export class Kv { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -456,7 +512,7 @@ export class Kv { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -466,7 +522,7 @@ export class Kv { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -476,7 +532,7 @@ export class Kv { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -486,7 +542,7 @@ export class Kv { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -519,19 +575,30 @@ export class Kv { /** * Gets multiple key-value entries by key(s). + * + * @param {Rivet.kv.GetBatchRequest} request + * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.kv.getBatch({ + * keys: "string", + * watchIndex: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * }) */ public async getBatch( request: Rivet.kv.GetBatchRequest, requestOptions?: Kv.RequestOptions ): Promise { const { keys, watchIndex, namespaceId } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (Array.isArray(keys)) { _queryParams["keys"] = keys.map((item) => item); } else { @@ -557,11 +624,13 @@ export class Kv { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.kv.GetBatchResponse.parseOrThrow(_response.body, { + return serializers.kv.GetBatchResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -574,7 +643,7 @@ export class Kv { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -584,7 +653,7 @@ export class Kv { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -594,7 +663,7 @@ export class Kv { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -604,7 +673,7 @@ export class Kv { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -614,7 +683,7 @@ export class Kv { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -624,7 +693,7 @@ export class Kv { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -657,12 +726,22 @@ export class Kv { /** * Puts (sets or overwrites) multiple key-value entries by key(s). + * + * @param {Rivet.kv.PutBatchRequest} request + * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.kv.putBatch({ + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + * entries: [{}] + * }) */ public async putBatch(request: Rivet.kv.PutBatchRequest, requestOptions?: Kv.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -675,9 +754,11 @@ export class Kv { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.kv.PutBatchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + requestType: "json", + body: serializers.kv.PutBatchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -687,7 +768,7 @@ export class Kv { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -697,7 +778,7 @@ export class Kv { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -707,7 +788,7 @@ export class Kv { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -717,7 +798,7 @@ export class Kv { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -727,7 +808,7 @@ export class Kv { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -737,7 +818,7 @@ export class Kv { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -770,16 +851,26 @@ export class Kv { /** * Deletes multiple key-value entries by key(s). + * + * @param {Rivet.kv.DeleteBatchRequest} request + * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.kv.deleteBatch({ + * keys: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * }) */ public async deleteBatch(request: Rivet.kv.DeleteBatchRequest, requestOptions?: Kv.RequestOptions): Promise { const { keys, namespaceId } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (Array.isArray(keys)) { _queryParams["keys"] = keys.map((item) => item); } else { @@ -801,8 +892,10 @@ export class Kv { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -812,7 +905,7 @@ export class Kv { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -822,7 +915,7 @@ export class Kv { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -832,7 +925,7 @@ export class Kv { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -842,7 +935,7 @@ export class Kv { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -852,7 +945,7 @@ export class Kv { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -862,7 +955,7 @@ export class Kv { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -893,7 +986,7 @@ export class Kv { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/kv/client/requests/DeleteBatchRequest.ts b/sdks/full/typescript/src/api/resources/kv/client/requests/DeleteBatchRequest.ts index 747d68c692..06a8f40701 100644 --- a/sdks/full/typescript/src/api/resources/kv/client/requests/DeleteBatchRequest.ts +++ b/sdks/full/typescript/src/api/resources/kv/client/requests/DeleteBatchRequest.ts @@ -2,8 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * keys: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * } + */ export interface DeleteBatchRequest { keys: Rivet.kv.Key | Rivet.kv.Key[]; namespaceId?: string; diff --git a/sdks/full/typescript/src/api/resources/kv/client/requests/DeleteOperationRequest.ts b/sdks/full/typescript/src/api/resources/kv/client/requests/DeleteOperationRequest.ts index 5a480fe79a..4a4acf3119 100644 --- a/sdks/full/typescript/src/api/resources/kv/client/requests/DeleteOperationRequest.ts +++ b/sdks/full/typescript/src/api/resources/kv/client/requests/DeleteOperationRequest.ts @@ -2,8 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * key: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * } + */ export interface DeleteOperationRequest { key: Rivet.kv.Key; namespaceId?: string; diff --git a/sdks/full/typescript/src/api/resources/kv/client/requests/GetBatchRequest.ts b/sdks/full/typescript/src/api/resources/kv/client/requests/GetBatchRequest.ts index cdd0e820a9..dee7e0ecf0 100644 --- a/sdks/full/typescript/src/api/resources/kv/client/requests/GetBatchRequest.ts +++ b/sdks/full/typescript/src/api/resources/kv/client/requests/GetBatchRequest.ts @@ -2,8 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * keys: "string", + * watchIndex: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * } + */ export interface GetBatchRequest { keys: Rivet.kv.Key | Rivet.kv.Key[]; /** diff --git a/sdks/full/typescript/src/api/resources/kv/client/requests/GetOperationRequest.ts b/sdks/full/typescript/src/api/resources/kv/client/requests/GetOperationRequest.ts index 97844811a5..c41a9a3add 100644 --- a/sdks/full/typescript/src/api/resources/kv/client/requests/GetOperationRequest.ts +++ b/sdks/full/typescript/src/api/resources/kv/client/requests/GetOperationRequest.ts @@ -2,8 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * key: "string", + * watchIndex: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * } + */ export interface GetOperationRequest { key: Rivet.kv.Key; /** diff --git a/sdks/full/typescript/src/api/resources/kv/client/requests/ListOperationRequest.ts b/sdks/full/typescript/src/api/resources/kv/client/requests/ListOperationRequest.ts index c7ed56d6ca..ac3740b405 100644 --- a/sdks/full/typescript/src/api/resources/kv/client/requests/ListOperationRequest.ts +++ b/sdks/full/typescript/src/api/resources/kv/client/requests/ListOperationRequest.ts @@ -2,8 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * directory: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * } + */ export interface ListOperationRequest { directory: Rivet.kv.Directory; namespaceId: string; diff --git a/sdks/full/typescript/src/api/resources/kv/client/requests/index.ts b/sdks/full/typescript/src/api/resources/kv/client/requests/index.ts index 5608eea192..2dc02e572b 100644 --- a/sdks/full/typescript/src/api/resources/kv/client/requests/index.ts +++ b/sdks/full/typescript/src/api/resources/kv/client/requests/index.ts @@ -1,5 +1,5 @@ -export { GetOperationRequest } from "./GetOperationRequest"; -export { DeleteOperationRequest } from "./DeleteOperationRequest"; -export { ListOperationRequest } from "./ListOperationRequest"; -export { GetBatchRequest } from "./GetBatchRequest"; -export { DeleteBatchRequest } from "./DeleteBatchRequest"; +export { type GetOperationRequest } from "./GetOperationRequest"; +export { type DeleteOperationRequest } from "./DeleteOperationRequest"; +export { type ListOperationRequest } from "./ListOperationRequest"; +export { type GetBatchRequest } from "./GetBatchRequest"; +export { type DeleteBatchRequest } from "./DeleteBatchRequest"; diff --git a/sdks/full/typescript/src/api/resources/kv/resources/common/types/Entry.ts b/sdks/full/typescript/src/api/resources/kv/resources/common/types/Entry.ts index 9a8b949d2b..73548a04d2 100644 --- a/sdks/full/typescript/src/api/resources/kv/resources/common/types/Entry.ts +++ b/sdks/full/typescript/src/api/resources/kv/resources/common/types/Entry.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A key-value entry. diff --git a/sdks/full/typescript/src/api/resources/kv/resources/common/types/PutEntry.ts b/sdks/full/typescript/src/api/resources/kv/resources/common/types/PutEntry.ts index 147aa69584..b675c847a9 100644 --- a/sdks/full/typescript/src/api/resources/kv/resources/common/types/PutEntry.ts +++ b/sdks/full/typescript/src/api/resources/kv/resources/common/types/PutEntry.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A new entry to insert into the key-value database. diff --git a/sdks/full/typescript/src/api/resources/kv/types/GetBatchResponse.ts b/sdks/full/typescript/src/api/resources/kv/types/GetBatchResponse.ts index 33d7ab924e..3d7bc9ed00 100644 --- a/sdks/full/typescript/src/api/resources/kv/types/GetBatchResponse.ts +++ b/sdks/full/typescript/src/api/resources/kv/types/GetBatchResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface GetBatchResponse { entries: Rivet.kv.Entry[]; diff --git a/sdks/full/typescript/src/api/resources/kv/types/GetResponse.ts b/sdks/full/typescript/src/api/resources/kv/types/GetResponse.ts index 4042b12f97..7b8ee46b50 100644 --- a/sdks/full/typescript/src/api/resources/kv/types/GetResponse.ts +++ b/sdks/full/typescript/src/api/resources/kv/types/GetResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface GetResponse { value?: Rivet.kv.Value; diff --git a/sdks/full/typescript/src/api/resources/kv/types/ListResponse.ts b/sdks/full/typescript/src/api/resources/kv/types/ListResponse.ts index b8e4f8b637..5389e9e4c9 100644 --- a/sdks/full/typescript/src/api/resources/kv/types/ListResponse.ts +++ b/sdks/full/typescript/src/api/resources/kv/types/ListResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface ListResponse { entries: Rivet.kv.Entry[]; diff --git a/sdks/full/typescript/src/api/resources/kv/types/PutBatchRequest.ts b/sdks/full/typescript/src/api/resources/kv/types/PutBatchRequest.ts index d67cf356d0..cd7e884c65 100644 --- a/sdks/full/typescript/src/api/resources/kv/types/PutBatchRequest.ts +++ b/sdks/full/typescript/src/api/resources/kv/types/PutBatchRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface PutBatchRequest { namespaceId?: string; diff --git a/sdks/full/typescript/src/api/resources/kv/types/PutRequest.ts b/sdks/full/typescript/src/api/resources/kv/types/PutRequest.ts index bfe06966cb..08cca59818 100644 --- a/sdks/full/typescript/src/api/resources/kv/types/PutRequest.ts +++ b/sdks/full/typescript/src/api/resources/kv/types/PutRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface PutRequest { namespaceId?: string; diff --git a/sdks/full/typescript/src/api/resources/matchmaker/client/Client.ts b/sdks/full/typescript/src/api/resources/matchmaker/client/Client.ts index 12b4bb8128..9fedc06a1a 100644 --- a/sdks/full/typescript/src/api/resources/matchmaker/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/matchmaker/client/Client.ts @@ -16,8 +16,12 @@ export declare namespace Matchmaker { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } diff --git a/sdks/full/typescript/src/api/resources/matchmaker/resources/common/types/GameModeInfo.ts b/sdks/full/typescript/src/api/resources/matchmaker/resources/common/types/GameModeInfo.ts index f28cd48373..6995a490ec 100644 --- a/sdks/full/typescript/src/api/resources/matchmaker/resources/common/types/GameModeInfo.ts +++ b/sdks/full/typescript/src/api/resources/matchmaker/resources/common/types/GameModeInfo.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A game mode that the player can join. diff --git a/sdks/full/typescript/src/api/resources/matchmaker/resources/common/types/JoinLobby.ts b/sdks/full/typescript/src/api/resources/matchmaker/resources/common/types/JoinLobby.ts index eae328d5af..bf253efda7 100644 --- a/sdks/full/typescript/src/api/resources/matchmaker/resources/common/types/JoinLobby.ts +++ b/sdks/full/typescript/src/api/resources/matchmaker/resources/common/types/JoinLobby.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A matchmaker lobby. diff --git a/sdks/full/typescript/src/api/resources/matchmaker/resources/common/types/JoinPlayer.ts b/sdks/full/typescript/src/api/resources/matchmaker/resources/common/types/JoinPlayer.ts index 07797eaffa..f640d289ae 100644 --- a/sdks/full/typescript/src/api/resources/matchmaker/resources/common/types/JoinPlayer.ts +++ b/sdks/full/typescript/src/api/resources/matchmaker/resources/common/types/JoinPlayer.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A matchmaker lobby player. diff --git a/sdks/full/typescript/src/api/resources/matchmaker/resources/common/types/JoinPort.ts b/sdks/full/typescript/src/api/resources/matchmaker/resources/common/types/JoinPort.ts index 92a05b6beb..17a8dbdb4b 100644 --- a/sdks/full/typescript/src/api/resources/matchmaker/resources/common/types/JoinPort.ts +++ b/sdks/full/typescript/src/api/resources/matchmaker/resources/common/types/JoinPort.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface JoinPort { /** The host for the given port. Will be null if using a port range. */ diff --git a/sdks/full/typescript/src/api/resources/matchmaker/resources/common/types/JoinRegion.ts b/sdks/full/typescript/src/api/resources/matchmaker/resources/common/types/JoinRegion.ts index 2995a7a5da..b4070ecfa4 100644 --- a/sdks/full/typescript/src/api/resources/matchmaker/resources/common/types/JoinRegion.ts +++ b/sdks/full/typescript/src/api/resources/matchmaker/resources/common/types/JoinRegion.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A matchmaker lobby region. diff --git a/sdks/full/typescript/src/api/resources/matchmaker/resources/common/types/RegionInfo.ts b/sdks/full/typescript/src/api/resources/matchmaker/resources/common/types/RegionInfo.ts index 666d7892d4..8ed9a3cb6e 100644 --- a/sdks/full/typescript/src/api/resources/matchmaker/resources/common/types/RegionInfo.ts +++ b/sdks/full/typescript/src/api/resources/matchmaker/resources/common/types/RegionInfo.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A region that the player can connect to. diff --git a/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/Client.ts b/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/Client.ts index 87c87baeb0..3ece3a43cd 100644 --- a/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; -import * as serializers from "../../../../../../serialization"; +import * as errors from "../../../../../../errors/index"; +import * as serializers from "../../../../../../serialization/index"; export declare namespace Lobbies { interface Options { @@ -17,8 +17,12 @@ export declare namespace Lobbies { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -28,12 +32,18 @@ export class Lobbies { /** * Marks the current lobby as ready to accept connections. Players will not be able to connect to this lobby until the lobby is flagged as ready. * This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) for mock responses. When running on Rivet servers, you can access the given lobby token from the [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. + * + * @param {Lobbies.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.lobbies.ready() */ public async ready(requestOptions?: Lobbies.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -46,8 +56,10 @@ export class Lobbies { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -57,7 +69,7 @@ export class Lobbies { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -67,7 +79,7 @@ export class Lobbies { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -77,7 +89,7 @@ export class Lobbies { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -87,7 +99,7 @@ export class Lobbies { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -97,7 +109,7 @@ export class Lobbies { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -107,7 +119,7 @@ export class Lobbies { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -148,12 +160,21 @@ export class Lobbies { * authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) * for mock responses. When running on Rivet servers, you can access the given lobby token from the * [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. + * + * @param {Rivet.matchmaker.SetLobbyClosedRequest} request + * @param {Lobbies.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.lobbies.setClosed({ + * isClosed: true + * }) */ public async setClosed( request: Rivet.matchmaker.SetLobbyClosedRequest, @@ -169,11 +190,13 @@ export class Lobbies { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.matchmaker.SetLobbyClosedRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.matchmaker.SetLobbyClosedRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -183,7 +206,7 @@ export class Lobbies { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -193,7 +216,7 @@ export class Lobbies { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -203,7 +226,7 @@ export class Lobbies { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -213,7 +236,7 @@ export class Lobbies { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -223,7 +246,7 @@ export class Lobbies { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -233,7 +256,7 @@ export class Lobbies { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -271,12 +294,21 @@ export class Lobbies { * authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) * for mock responses. When running on Rivet servers, you can access the given lobby token from the * [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. + * + * @param {unknown} request + * @param {Lobbies.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.lobbies.setState({ + * "key": "value" + * }) */ public async setState(request?: unknown, requestOptions?: Lobbies.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -289,14 +321,16 @@ export class Lobbies { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", body: request != null - ? await serializers.matchmaker.lobbies.setState.Request.jsonOrThrow(request, { + ? serializers.matchmaker.lobbies.setState.Request.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }) : undefined, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -306,7 +340,7 @@ export class Lobbies { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -316,7 +350,7 @@ export class Lobbies { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -326,7 +360,7 @@ export class Lobbies { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -336,7 +370,7 @@ export class Lobbies { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -346,7 +380,7 @@ export class Lobbies { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -356,7 +390,7 @@ export class Lobbies { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -394,29 +428,38 @@ export class Lobbies { * authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) * for mock responses. When running on Rivet servers, you can access the given lobby token from the * [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. + * + * @param {string} lobbyId + * @param {Lobbies.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.lobbies.getState("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async getState(lobbyId: string, requestOptions?: Lobbies.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/matchmaker/lobbies/${lobbyId}/state` + `/matchmaker/lobbies/${encodeURIComponent(lobbyId)}/state` ), method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.matchmaker.lobbies.getState.Response.parseOrThrow(_response.body, { + return serializers.matchmaker.lobbies.getState.Response.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -429,7 +472,7 @@ export class Lobbies { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -439,7 +482,7 @@ export class Lobbies { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -449,7 +492,7 @@ export class Lobbies { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -459,7 +502,7 @@ export class Lobbies { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -469,7 +512,7 @@ export class Lobbies { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -479,7 +522,7 @@ export class Lobbies { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -520,12 +563,35 @@ export class Lobbies { * [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used * for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) * can be used for general authentication. + * + * @param {Rivet.matchmaker.FindLobbyRequest} request + * @param {Lobbies.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.lobbies.find({ + * origin: "string", + * gameModes: ["string"], + * regions: ["string"], + * preventAutoCreateLobby: true, + * tags: { + * "string": "string" + * }, + * maxPlayers: 1, + * captcha: { + * hcaptcha: {}, + * turnstile: {} + * }, + * verificationData: { + * "key": "value" + * } + * }) */ public async find( request: Rivet.matchmaker.FindLobbyRequest, @@ -543,12 +609,14 @@ export class Lobbies { origin: origin != null ? origin : undefined, }, contentType: "application/json", - body: await serializers.matchmaker.FindLobbyRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), + requestType: "json", + body: serializers.matchmaker.FindLobbyRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.matchmaker.FindLobbyResponse.parseOrThrow(_response.body, { + return serializers.matchmaker.FindLobbyResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -561,7 +629,7 @@ export class Lobbies { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -571,7 +639,7 @@ export class Lobbies { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -581,7 +649,7 @@ export class Lobbies { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -591,7 +659,7 @@ export class Lobbies { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -601,7 +669,7 @@ export class Lobbies { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -611,7 +679,7 @@ export class Lobbies { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -652,12 +720,28 @@ export class Lobbies { * [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used * for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) * can be used for general authentication. + * + * @param {Rivet.matchmaker.JoinLobbyRequest} request + * @param {Lobbies.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.lobbies.join({ + * lobbyId: "string", + * captcha: { + * hcaptcha: {}, + * turnstile: {} + * }, + * verificationData: { + * "key": "value" + * } + * }) */ public async join( request: Rivet.matchmaker.JoinLobbyRequest, @@ -673,14 +757,14 @@ export class Lobbies { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.matchmaker.JoinLobbyRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.matchmaker.JoinLobbyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.matchmaker.JoinLobbyResponse.parseOrThrow(_response.body, { + return serializers.matchmaker.JoinLobbyResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -693,7 +777,7 @@ export class Lobbies { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -703,7 +787,7 @@ export class Lobbies { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -713,7 +797,7 @@ export class Lobbies { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -723,7 +807,7 @@ export class Lobbies { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -733,7 +817,7 @@ export class Lobbies { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -743,7 +827,7 @@ export class Lobbies { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -782,12 +866,37 @@ export class Lobbies { * [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used * for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) * can be used for general authentication. + * + * @param {Rivet.matchmaker.CreateLobbyRequest} request + * @param {Lobbies.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.lobbies.create({ + * gameMode: "string", + * region: "string", + * publicity: Rivet.matchmaker.CustomLobbyPublicity.Public, + * tags: { + * "string": "string" + * }, + * maxPlayers: 1, + * lobbyConfig: { + * "key": "value" + * }, + * captcha: { + * hcaptcha: {}, + * turnstile: {} + * }, + * verificationData: { + * "key": "value" + * } + * }) */ public async create( request: Rivet.matchmaker.CreateLobbyRequest, @@ -803,14 +912,14 @@ export class Lobbies { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.matchmaker.CreateLobbyRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.matchmaker.CreateLobbyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.matchmaker.CreateLobbyResponse.parseOrThrow(_response.body, { + return serializers.matchmaker.CreateLobbyResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -823,7 +932,7 @@ export class Lobbies { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -833,7 +942,7 @@ export class Lobbies { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -843,7 +952,7 @@ export class Lobbies { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -853,7 +962,7 @@ export class Lobbies { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -863,7 +972,7 @@ export class Lobbies { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -873,7 +982,7 @@ export class Lobbies { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -912,19 +1021,28 @@ export class Lobbies { * [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used * for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) * can be used for general authentication. + * + * @param {Rivet.matchmaker.ListLobbiesRequest} request + * @param {Lobbies.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.lobbies.list({ + * includeState: true + * }) */ public async list( request: Rivet.matchmaker.ListLobbiesRequest = {}, requestOptions?: Lobbies.RequestOptions ): Promise { const { includeState } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeState != null) { _queryParams["include_state"] = includeState.toString(); } @@ -940,11 +1058,13 @@ export class Lobbies { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.matchmaker.ListLobbiesResponse.parseOrThrow(_response.body, { + return serializers.matchmaker.ListLobbiesResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -957,7 +1077,7 @@ export class Lobbies { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -967,7 +1087,7 @@ export class Lobbies { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -977,7 +1097,7 @@ export class Lobbies { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -987,7 +1107,7 @@ export class Lobbies { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -997,7 +1117,7 @@ export class Lobbies { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1007,7 +1127,7 @@ export class Lobbies { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1038,7 +1158,7 @@ export class Lobbies { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/CreateLobbyRequest.ts b/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/CreateLobbyRequest.ts index c88a9f53cd..92e3dda163 100644 --- a/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/CreateLobbyRequest.ts +++ b/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/CreateLobbyRequest.ts @@ -2,8 +2,30 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../.."; +import * as Rivet from "../../../../../../index"; +/** + * @example + * { + * gameMode: "string", + * region: "string", + * publicity: Rivet.matchmaker.CustomLobbyPublicity.Public, + * tags: { + * "string": "string" + * }, + * maxPlayers: 1, + * lobbyConfig: { + * "key": "value" + * }, + * captcha: { + * hcaptcha: {}, + * turnstile: {} + * }, + * verificationData: { + * "key": "value" + * } + * } + */ export interface CreateLobbyRequest { gameMode: string; region?: string; diff --git a/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/FindLobbyRequest.ts b/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/FindLobbyRequest.ts index c683464727..045d3bcda8 100644 --- a/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/FindLobbyRequest.ts +++ b/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/FindLobbyRequest.ts @@ -2,8 +2,28 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../.."; +import * as Rivet from "../../../../../../index"; +/** + * @example + * { + * origin: "string", + * gameModes: ["string"], + * regions: ["string"], + * preventAutoCreateLobby: true, + * tags: { + * "string": "string" + * }, + * maxPlayers: 1, + * captcha: { + * hcaptcha: {}, + * turnstile: {} + * }, + * verificationData: { + * "key": "value" + * } + * } + */ export interface FindLobbyRequest { origin?: string; gameModes: string[]; diff --git a/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/JoinLobbyRequest.ts b/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/JoinLobbyRequest.ts index 4452cda6c5..e155266659 100644 --- a/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/JoinLobbyRequest.ts +++ b/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/JoinLobbyRequest.ts @@ -2,8 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../.."; +import * as Rivet from "../../../../../../index"; +/** + * @example + * { + * lobbyId: "string", + * captcha: { + * hcaptcha: {}, + * turnstile: {} + * }, + * verificationData: { + * "key": "value" + * } + * } + */ export interface JoinLobbyRequest { lobbyId: string; captcha?: Rivet.captcha.Config; diff --git a/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/ListLobbiesRequest.ts b/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/ListLobbiesRequest.ts index 53d8c6bba9..31c4be4ab6 100644 --- a/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/ListLobbiesRequest.ts +++ b/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/ListLobbiesRequest.ts @@ -2,6 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * includeState: true + * } + */ export interface ListLobbiesRequest { includeState?: boolean; } diff --git a/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/SetLobbyClosedRequest.ts b/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/SetLobbyClosedRequest.ts index c852ab145f..c8c03f252d 100644 --- a/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/SetLobbyClosedRequest.ts +++ b/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/SetLobbyClosedRequest.ts @@ -2,6 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * isClosed: true + * } + */ export interface SetLobbyClosedRequest { isClosed: boolean; } diff --git a/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/index.ts b/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/index.ts index 6bb4afb57f..0e3df8e08a 100644 --- a/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/index.ts +++ b/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/index.ts @@ -1,5 +1,5 @@ -export { SetLobbyClosedRequest } from "./SetLobbyClosedRequest"; -export { FindLobbyRequest } from "./FindLobbyRequest"; -export { JoinLobbyRequest } from "./JoinLobbyRequest"; -export { CreateLobbyRequest } from "./CreateLobbyRequest"; -export { ListLobbiesRequest } from "./ListLobbiesRequest"; +export { type SetLobbyClosedRequest } from "./SetLobbyClosedRequest"; +export { type FindLobbyRequest } from "./FindLobbyRequest"; +export { type JoinLobbyRequest } from "./JoinLobbyRequest"; +export { type CreateLobbyRequest } from "./CreateLobbyRequest"; +export { type ListLobbiesRequest } from "./ListLobbiesRequest"; diff --git a/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/types/CreateLobbyResponse.ts b/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/types/CreateLobbyResponse.ts index b28272cde9..9ec13da24f 100644 --- a/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/types/CreateLobbyResponse.ts +++ b/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/types/CreateLobbyResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface CreateLobbyResponse { lobby: Rivet.matchmaker.JoinLobby; diff --git a/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/types/FindLobbyResponse.ts b/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/types/FindLobbyResponse.ts index 67f8f31f33..e32b79cae3 100644 --- a/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/types/FindLobbyResponse.ts +++ b/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/types/FindLobbyResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface FindLobbyResponse { lobby: Rivet.matchmaker.JoinLobby; diff --git a/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/types/JoinLobbyResponse.ts b/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/types/JoinLobbyResponse.ts index 526d94df42..06ec55d55b 100644 --- a/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/types/JoinLobbyResponse.ts +++ b/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/types/JoinLobbyResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface JoinLobbyResponse { lobby: Rivet.matchmaker.JoinLobby; diff --git a/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/types/ListLobbiesResponse.ts b/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/types/ListLobbiesResponse.ts index f0fe668fd0..fa234058bc 100644 --- a/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/types/ListLobbiesResponse.ts +++ b/sdks/full/typescript/src/api/resources/matchmaker/resources/lobbies/types/ListLobbiesResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface ListLobbiesResponse { gameModes: Rivet.matchmaker.GameModeInfo[]; diff --git a/sdks/full/typescript/src/api/resources/matchmaker/resources/players/client/Client.ts b/sdks/full/typescript/src/api/resources/matchmaker/resources/players/client/Client.ts index 3a2d57c54e..0f205160ad 100644 --- a/sdks/full/typescript/src/api/resources/matchmaker/resources/players/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/matchmaker/resources/players/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Rivet from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace Players { interface Options { @@ -17,8 +17,12 @@ export declare namespace Players { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -61,12 +65,21 @@ export class Players { * Otherwise, the player token will likely be automatically sent by the client * once the socket opens. As mentioned above, nothing else should happen until * the player token is validated. + * + * @param {Rivet.matchmaker.PlayerConnectedRequest} request + * @param {Players.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.players.connected({ + * playerToken: "string" + * }) */ public async connected( request: Rivet.matchmaker.PlayerConnectedRequest, @@ -82,11 +95,13 @@ export class Players { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.matchmaker.PlayerConnectedRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.matchmaker.PlayerConnectedRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -96,7 +111,7 @@ export class Players { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -106,7 +121,7 @@ export class Players { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -116,7 +131,7 @@ export class Players { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -126,7 +141,7 @@ export class Players { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -136,7 +151,7 @@ export class Players { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -146,7 +161,7 @@ export class Players { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -179,12 +194,21 @@ export class Players { /** * Marks a player as disconnected. # Ghost Players If players are not marked as disconnected, lobbies will result with "ghost players" that the matchmaker thinks exist but are no longer connected to the lobby. + * + * @param {Rivet.matchmaker.PlayerDisconnectedRequest} request + * @param {Players.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.players.disconnected({ + * playerToken: "string" + * }) */ public async disconnected( request: Rivet.matchmaker.PlayerDisconnectedRequest, @@ -200,11 +224,13 @@ export class Players { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.matchmaker.PlayerDisconnectedRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.matchmaker.PlayerDisconnectedRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -214,7 +240,7 @@ export class Players { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -224,7 +250,7 @@ export class Players { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -234,7 +260,7 @@ export class Players { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -244,7 +270,7 @@ export class Players { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -254,7 +280,7 @@ export class Players { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -264,7 +290,7 @@ export class Players { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -297,12 +323,18 @@ export class Players { /** * Gives matchmaker statistics about the players in game. + * + * @param {Players.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.players.getStatistics() */ public async getStatistics( requestOptions?: Players.RequestOptions @@ -317,11 +349,13 @@ export class Players { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.matchmaker.GetStatisticsResponse.parseOrThrow(_response.body, { + return serializers.matchmaker.GetStatisticsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -334,7 +368,7 @@ export class Players { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -344,7 +378,7 @@ export class Players { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -354,7 +388,7 @@ export class Players { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -364,7 +398,7 @@ export class Players { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -374,7 +408,7 @@ export class Players { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -384,7 +418,7 @@ export class Players { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -415,7 +449,7 @@ export class Players { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/matchmaker/resources/players/client/requests/PlayerConnectedRequest.ts b/sdks/full/typescript/src/api/resources/matchmaker/resources/players/client/requests/PlayerConnectedRequest.ts index 5c5b293e40..12170bcfef 100644 --- a/sdks/full/typescript/src/api/resources/matchmaker/resources/players/client/requests/PlayerConnectedRequest.ts +++ b/sdks/full/typescript/src/api/resources/matchmaker/resources/players/client/requests/PlayerConnectedRequest.ts @@ -2,6 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * playerToken: "string" + * } + */ export interface PlayerConnectedRequest { playerToken: string; } diff --git a/sdks/full/typescript/src/api/resources/matchmaker/resources/players/client/requests/PlayerDisconnectedRequest.ts b/sdks/full/typescript/src/api/resources/matchmaker/resources/players/client/requests/PlayerDisconnectedRequest.ts index cb40f5c902..354f0a83a4 100644 --- a/sdks/full/typescript/src/api/resources/matchmaker/resources/players/client/requests/PlayerDisconnectedRequest.ts +++ b/sdks/full/typescript/src/api/resources/matchmaker/resources/players/client/requests/PlayerDisconnectedRequest.ts @@ -2,6 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * playerToken: "string" + * } + */ export interface PlayerDisconnectedRequest { playerToken: string; } diff --git a/sdks/full/typescript/src/api/resources/matchmaker/resources/players/client/requests/index.ts b/sdks/full/typescript/src/api/resources/matchmaker/resources/players/client/requests/index.ts index 254ba86ed3..8dbaaea743 100644 --- a/sdks/full/typescript/src/api/resources/matchmaker/resources/players/client/requests/index.ts +++ b/sdks/full/typescript/src/api/resources/matchmaker/resources/players/client/requests/index.ts @@ -1,2 +1,2 @@ -export { PlayerConnectedRequest } from "./PlayerConnectedRequest"; -export { PlayerDisconnectedRequest } from "./PlayerDisconnectedRequest"; +export { type PlayerConnectedRequest } from "./PlayerConnectedRequest"; +export { type PlayerDisconnectedRequest } from "./PlayerDisconnectedRequest"; diff --git a/sdks/full/typescript/src/api/resources/matchmaker/resources/players/types/GameModeStatistics.ts b/sdks/full/typescript/src/api/resources/matchmaker/resources/players/types/GameModeStatistics.ts index 432caa5ae6..42c7eef739 100644 --- a/sdks/full/typescript/src/api/resources/matchmaker/resources/players/types/GameModeStatistics.ts +++ b/sdks/full/typescript/src/api/resources/matchmaker/resources/players/types/GameModeStatistics.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GameModeStatistics { playerCount: number; diff --git a/sdks/full/typescript/src/api/resources/matchmaker/resources/players/types/GetStatisticsResponse.ts b/sdks/full/typescript/src/api/resources/matchmaker/resources/players/types/GetStatisticsResponse.ts index d67b3dbab2..c14c2208fe 100644 --- a/sdks/full/typescript/src/api/resources/matchmaker/resources/players/types/GetStatisticsResponse.ts +++ b/sdks/full/typescript/src/api/resources/matchmaker/resources/players/types/GetStatisticsResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GetStatisticsResponse { playerCount: number; diff --git a/sdks/full/typescript/src/api/resources/matchmaker/resources/regions/client/Client.ts b/sdks/full/typescript/src/api/resources/matchmaker/resources/regions/client/Client.ts index ac84d441d2..99877718dc 100644 --- a/sdks/full/typescript/src/api/resources/matchmaker/resources/regions/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/matchmaker/resources/regions/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Regions { interface Options { @@ -17,8 +17,12 @@ export declare namespace Regions { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -29,12 +33,18 @@ export class Regions { * Returns a list of regions available to this namespace. * Regions are sorted by most optimal to least optimal. The player's IP address * is used to calculate the regions' optimality. + * + * @param {Regions.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.regions.list() */ public async list(requestOptions?: Regions.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -47,11 +57,13 @@ export class Regions { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.matchmaker.ListRegionsResponse.parseOrThrow(_response.body, { + return serializers.matchmaker.ListRegionsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -64,7 +76,7 @@ export class Regions { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -74,7 +86,7 @@ export class Regions { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -84,7 +96,7 @@ export class Regions { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -94,7 +106,7 @@ export class Regions { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -104,7 +116,7 @@ export class Regions { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -114,7 +126,7 @@ export class Regions { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -145,7 +157,7 @@ export class Regions { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/matchmaker/resources/regions/types/ListRegionsResponse.ts b/sdks/full/typescript/src/api/resources/matchmaker/resources/regions/types/ListRegionsResponse.ts index 655fa4f9dd..f31f4c32f5 100644 --- a/sdks/full/typescript/src/api/resources/matchmaker/resources/regions/types/ListRegionsResponse.ts +++ b/sdks/full/typescript/src/api/resources/matchmaker/resources/regions/types/ListRegionsResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface ListRegionsResponse { regions: Rivet.matchmaker.RegionInfo[]; diff --git a/sdks/full/typescript/src/api/resources/portal/client/Client.ts b/sdks/full/typescript/src/api/resources/portal/client/Client.ts index 78fd3ddee3..4c4d214da8 100644 --- a/sdks/full/typescript/src/api/resources/portal/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/portal/client/Client.ts @@ -14,8 +14,12 @@ export declare namespace Portal { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } diff --git a/sdks/full/typescript/src/api/resources/portal/resources/common/types/NotificationRegisterService.ts b/sdks/full/typescript/src/api/resources/portal/resources/common/types/NotificationRegisterService.ts index cd3dadb11d..cd667b33a7 100644 --- a/sdks/full/typescript/src/api/resources/portal/resources/common/types/NotificationRegisterService.ts +++ b/sdks/full/typescript/src/api/resources/portal/resources/common/types/NotificationRegisterService.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface NotificationRegisterService { firebase?: Rivet.portal.NotificationRegisterFirebaseService; diff --git a/sdks/full/typescript/src/api/resources/portal/resources/games/client/Client.ts b/sdks/full/typescript/src/api/resources/portal/resources/games/client/Client.ts index 9902c51761..eabad01e3a 100644 --- a/sdks/full/typescript/src/api/resources/portal/resources/games/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/portal/resources/games/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Games { interface Options { @@ -17,8 +17,12 @@ export declare namespace Games { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -27,12 +31,22 @@ export class Games { /** * Returns a game profile. + * + * @param {string} gameNameId - A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + * @param {Rivet.portal.GetGameProfileRequest} request + * @param {Games.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.portal.games.getGameProfile("string", { + * watchIndex: "string" + * }) */ public async getGameProfile( gameNameId: string, @@ -40,7 +54,7 @@ export class Games { requestOptions?: Games.RequestOptions ): Promise { const { watchIndex } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (watchIndex != null) { _queryParams["watch_index"] = watchIndex; } @@ -48,7 +62,7 @@ export class Games { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/portal/games/${gameNameId}/profile` + `/portal/games/${encodeURIComponent(gameNameId)}/profile` ), method: "GET", headers: { @@ -56,11 +70,13 @@ export class Games { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.portal.GetGameProfileResponse.parseOrThrow(_response.body, { + return serializers.portal.GetGameProfileResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -73,7 +89,7 @@ export class Games { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -83,7 +99,7 @@ export class Games { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -93,7 +109,7 @@ export class Games { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -103,7 +119,7 @@ export class Games { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -113,7 +129,7 @@ export class Games { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -123,7 +139,7 @@ export class Games { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -154,7 +170,7 @@ export class Games { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/portal/resources/games/client/requests/GetGameProfileRequest.ts b/sdks/full/typescript/src/api/resources/portal/resources/games/client/requests/GetGameProfileRequest.ts index 348c181077..19ef60e095 100644 --- a/sdks/full/typescript/src/api/resources/portal/resources/games/client/requests/GetGameProfileRequest.ts +++ b/sdks/full/typescript/src/api/resources/portal/resources/games/client/requests/GetGameProfileRequest.ts @@ -2,6 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * watchIndex: "string" + * } + */ export interface GetGameProfileRequest { /** * A query parameter denoting the requests watch index. diff --git a/sdks/full/typescript/src/api/resources/portal/resources/games/client/requests/index.ts b/sdks/full/typescript/src/api/resources/portal/resources/games/client/requests/index.ts index 881d9e0696..d504fe504b 100644 --- a/sdks/full/typescript/src/api/resources/portal/resources/games/client/requests/index.ts +++ b/sdks/full/typescript/src/api/resources/portal/resources/games/client/requests/index.ts @@ -1 +1 @@ -export { GetGameProfileRequest } from "./GetGameProfileRequest"; +export { type GetGameProfileRequest } from "./GetGameProfileRequest"; diff --git a/sdks/full/typescript/src/api/resources/portal/resources/games/types/GetGameProfileResponse.ts b/sdks/full/typescript/src/api/resources/portal/resources/games/types/GetGameProfileResponse.ts index 81f04a8f9c..6f3b4e6ac4 100644 --- a/sdks/full/typescript/src/api/resources/portal/resources/games/types/GetGameProfileResponse.ts +++ b/sdks/full/typescript/src/api/resources/portal/resources/games/types/GetGameProfileResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GetGameProfileResponse { game: Rivet.game.Profile; diff --git a/sdks/full/typescript/src/api/resources/portal/resources/games/types/GetSuggestedGamesResponse.ts b/sdks/full/typescript/src/api/resources/portal/resources/games/types/GetSuggestedGamesResponse.ts index 3cc99ea032..b70f7731f9 100644 --- a/sdks/full/typescript/src/api/resources/portal/resources/games/types/GetSuggestedGamesResponse.ts +++ b/sdks/full/typescript/src/api/resources/portal/resources/games/types/GetSuggestedGamesResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GetSuggestedGamesResponse { /** A list of game summaries. */ diff --git a/sdks/full/typescript/src/api/resources/provision/client/Client.ts b/sdks/full/typescript/src/api/resources/provision/client/Client.ts index 652c8d46b7..74a5c0b069 100644 --- a/sdks/full/typescript/src/api/resources/provision/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/provision/client/Client.ts @@ -15,8 +15,12 @@ export declare namespace Provision { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } diff --git a/sdks/full/typescript/src/api/resources/provision/resources/datacenters/client/Client.ts b/sdks/full/typescript/src/api/resources/provision/resources/datacenters/client/Client.ts index ce91e2b74d..3cced49ae6 100644 --- a/sdks/full/typescript/src/api/resources/provision/resources/datacenters/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/provision/resources/datacenters/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Datacenters { interface Options { @@ -17,8 +17,12 @@ export declare namespace Datacenters { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -26,12 +30,18 @@ export class Datacenters { constructor(protected readonly _options: Datacenters.Options = {}) {} /** + * @param {string} datacenterId + * @param {Datacenters.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.provision.datacenters.getTls("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async getTls( datacenterId: string, @@ -40,18 +50,20 @@ export class Datacenters { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/datacenters/${datacenterId}/tls` + `/datacenters/${encodeURIComponent(datacenterId)}/tls` ), method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.provision.datacenters.GetTlsResponse.parseOrThrow(_response.body, { + return serializers.provision.datacenters.GetTlsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -64,7 +76,7 @@ export class Datacenters { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -74,7 +86,7 @@ export class Datacenters { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -84,7 +96,7 @@ export class Datacenters { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -94,7 +106,7 @@ export class Datacenters { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -104,7 +116,7 @@ export class Datacenters { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -114,7 +126,7 @@ export class Datacenters { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -145,7 +157,7 @@ export class Datacenters { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/provision/resources/servers/client/Client.ts b/sdks/full/typescript/src/api/resources/provision/resources/servers/client/Client.ts index cc528b2c65..bb18915d86 100644 --- a/sdks/full/typescript/src/api/resources/provision/resources/servers/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/provision/resources/servers/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Servers { interface Options { @@ -17,8 +17,12 @@ export declare namespace Servers { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -26,12 +30,18 @@ export class Servers { constructor(protected readonly _options: Servers.Options = {}) {} /** + * @param {string} ip + * @param {Servers.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.provision.servers.getInfo("string") */ public async getInfo( ip: string, @@ -40,18 +50,20 @@ export class Servers { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/servers/${ip}` + `/servers/${encodeURIComponent(ip)}` ), method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.provision.servers.GetInfoResponse.parseOrThrow(_response.body, { + return serializers.provision.servers.GetInfoResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -64,7 +76,7 @@ export class Servers { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -74,7 +86,7 @@ export class Servers { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -84,7 +96,7 @@ export class Servers { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -94,7 +106,7 @@ export class Servers { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -104,7 +116,7 @@ export class Servers { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -114,7 +126,7 @@ export class Servers { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -145,7 +157,7 @@ export class Servers { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/servers/client/Client.ts b/sdks/full/typescript/src/api/resources/servers/client/Client.ts index c807f78a16..bac5c4c140 100644 --- a/sdks/full/typescript/src/api/resources/servers/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/servers/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../environments"; import * as core from "../../../../core"; -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../serialization"; -import * as errors from "../../../../errors"; +import * as serializers from "../../../../serialization/index"; +import * as errors from "../../../../errors/index"; import { Builds } from "../resources/builds/client/Client"; export declare namespace Servers { @@ -18,8 +18,12 @@ export declare namespace Servers { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -28,12 +32,19 @@ export class Servers { /** * Gets a dynamic server. + * + * @param {string} serverId - The id of the server to destroy + * @param {Servers.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.servers.get("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async get( serverId: string, @@ -42,18 +53,20 @@ export class Servers { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/servers/${serverId}` + `/servers/${encodeURIComponent(serverId)}` ), method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.servers.GetServerResponse.parseOrThrow(_response.body, { + return serializers.servers.GetServerResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -66,7 +79,7 @@ export class Servers { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -76,7 +89,7 @@ export class Servers { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -86,7 +99,7 @@ export class Servers { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -96,7 +109,7 @@ export class Servers { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -106,7 +119,7 @@ export class Servers { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -116,7 +129,7 @@ export class Servers { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -149,12 +162,33 @@ export class Servers { /** * Create a new dynamic server. + * + * @param {Rivet.servers.CreateServerRequest} request + * @param {Servers.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.servers.create({ + * datacenter: "string", + * tags: { + * "key": "value" + * }, + * imageId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + * arguments: ["string"], + * environment: { + * "string": "string" + * }, + * network: {}, + * resources: {}, + * killTimeout: 1000000, + * webhookUrl: "string" + * }) */ public async create( request: Rivet.servers.CreateServerRequest, @@ -170,14 +204,14 @@ export class Servers { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.servers.CreateServerRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.servers.CreateServerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.servers.CreateServerResponse.parseOrThrow(_response.body, { + return serializers.servers.CreateServerResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -190,7 +224,7 @@ export class Servers { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -200,7 +234,7 @@ export class Servers { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -210,7 +244,7 @@ export class Servers { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -220,7 +254,7 @@ export class Servers { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -230,7 +264,7 @@ export class Servers { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -240,7 +274,7 @@ export class Servers { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -273,12 +307,22 @@ export class Servers { /** * Destroy a dynamic server. + * + * @param {string} serverId - The id of the server to destroy + * @param {Rivet.servers.DestroyServerRequest} request + * @param {Servers.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.servers.destroy("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * overrideKillTimeout: 1000000 + * }) */ public async destroy( serverId: string, @@ -286,7 +330,7 @@ export class Servers { requestOptions?: Servers.RequestOptions ): Promise { const { overrideKillTimeout } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (overrideKillTimeout != null) { _queryParams["override_kill_timeout"] = overrideKillTimeout.toString(); } @@ -294,7 +338,7 @@ export class Servers { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/servers/${serverId}` + `/servers/${encodeURIComponent(serverId)}` ), method: "DELETE", headers: { @@ -302,11 +346,13 @@ export class Servers { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.servers.DestroyServerResponse.parseOrThrow(_response.body, { + return serializers.servers.DestroyServerResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -319,7 +365,7 @@ export class Servers { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -329,7 +375,7 @@ export class Servers { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -339,7 +385,7 @@ export class Servers { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -349,7 +395,7 @@ export class Servers { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -359,7 +405,7 @@ export class Servers { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -369,7 +415,7 @@ export class Servers { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -402,19 +448,28 @@ export class Servers { /** * Lists all servers associated with the token used. Can be filtered by tags in the query string. + * + * @param {Rivet.servers.GetServersRequest} request + * @param {Servers.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.servers.list({ + * tags: "string" + * }) */ public async list( request: Rivet.servers.GetServersRequest = {}, requestOptions?: Servers.RequestOptions ): Promise { const { tags } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (tags != null) { _queryParams["tags"] = tags; } @@ -430,11 +485,13 @@ export class Servers { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.servers.ListServersResponse.parseOrThrow(_response.body, { + return serializers.servers.ListServersResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -447,7 +504,7 @@ export class Servers { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -457,7 +514,7 @@ export class Servers { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -467,7 +524,7 @@ export class Servers { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -477,7 +534,7 @@ export class Servers { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -487,7 +544,7 @@ export class Servers { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -497,7 +554,7 @@ export class Servers { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -534,7 +591,7 @@ export class Servers { return (this._builds ??= new Builds(this._options)); } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/servers/client/requests/DestroyServerRequest.ts b/sdks/full/typescript/src/api/resources/servers/client/requests/DestroyServerRequest.ts index bb50967977..a20c29f66f 100644 --- a/sdks/full/typescript/src/api/resources/servers/client/requests/DestroyServerRequest.ts +++ b/sdks/full/typescript/src/api/resources/servers/client/requests/DestroyServerRequest.ts @@ -2,6 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * overrideKillTimeout: 1000000 + * } + */ export interface DestroyServerRequest { /** * The duration to wait for in milliseconds before killing the server. This should be used to override the default kill timeout if a faster time is needed, say for ignoring a graceful shutdown. diff --git a/sdks/full/typescript/src/api/resources/servers/client/requests/GetServersRequest.ts b/sdks/full/typescript/src/api/resources/servers/client/requests/GetServersRequest.ts index 96fe8dfc0d..5ca455fa8e 100644 --- a/sdks/full/typescript/src/api/resources/servers/client/requests/GetServersRequest.ts +++ b/sdks/full/typescript/src/api/resources/servers/client/requests/GetServersRequest.ts @@ -2,6 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * tags: "string" + * } + */ export interface GetServersRequest { tags?: string; } diff --git a/sdks/full/typescript/src/api/resources/servers/client/requests/index.ts b/sdks/full/typescript/src/api/resources/servers/client/requests/index.ts index e379aeba70..54b04a6744 100644 --- a/sdks/full/typescript/src/api/resources/servers/client/requests/index.ts +++ b/sdks/full/typescript/src/api/resources/servers/client/requests/index.ts @@ -1,2 +1,2 @@ -export { DestroyServerRequest } from "./DestroyServerRequest"; -export { GetServersRequest } from "./GetServersRequest"; +export { type DestroyServerRequest } from "./DestroyServerRequest"; +export { type GetServersRequest } from "./GetServersRequest"; diff --git a/sdks/full/typescript/src/api/resources/servers/resources/builds/client/Client.ts b/sdks/full/typescript/src/api/resources/servers/resources/builds/client/Client.ts index 87cc0b1192..ed3a267a11 100644 --- a/sdks/full/typescript/src/api/resources/servers/resources/builds/client/Client.ts +++ b/sdks/full/typescript/src/api/resources/servers/resources/builds/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Builds { interface Options { @@ -17,8 +17,12 @@ export declare namespace Builds { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -27,19 +31,28 @@ export class Builds { /** * Lists all builds of the game associated with the token used. Can be filtered by tags in the query string. + * + * @param {Rivet.servers.GetBuildsRequest} request + * @param {Builds.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.servers.builds.listBuilds({ + * tags: "string" + * }) */ public async listBuilds( request: Rivet.servers.GetBuildsRequest = {}, requestOptions?: Builds.RequestOptions ): Promise { const { tags } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (tags != null) { _queryParams["tags"] = tags; } @@ -55,11 +68,13 @@ export class Builds { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.servers.ListBuildsResponse.parseOrThrow(_response.body, { + return serializers.servers.ListBuildsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -72,7 +87,7 @@ export class Builds { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -82,7 +97,7 @@ export class Builds { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -92,7 +107,7 @@ export class Builds { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -102,7 +117,7 @@ export class Builds { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -112,7 +127,7 @@ export class Builds { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -122,7 +137,7 @@ export class Builds { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -155,12 +170,29 @@ export class Builds { /** * Creates a new game build for the given game. + * + * @param {Rivet.servers.CreateBuildRequest} request + * @param {Builds.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.servers.builds.prepareBuild({ + * displayName: "string", + * tags: { + * "key": "value" + * }, + * imageTag: "string", + * imageFile: {}, + * multipartUpload: true, + * kind: Rivet.servers.BuildKind.DockerImage, + * compression: Rivet.servers.BuildCompression.None + * }) */ public async prepareBuild( request: Rivet.servers.CreateBuildRequest, @@ -176,14 +208,14 @@ export class Builds { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.servers.CreateBuildRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.servers.CreateBuildRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.servers.CreateBuildResponse.parseOrThrow(_response.body, { + return serializers.servers.CreateBuildResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -196,7 +228,7 @@ export class Builds { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -206,7 +238,7 @@ export class Builds { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -216,7 +248,7 @@ export class Builds { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -226,7 +258,7 @@ export class Builds { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -236,7 +268,7 @@ export class Builds { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -246,7 +278,7 @@ export class Builds { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -279,26 +311,35 @@ export class Builds { /** * Marks an upload as complete. + * + * @param {string} uploadId + * @param {Builds.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.servers.builds.completeBuild("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async completeBuild(uploadId: string, requestOptions?: Builds.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/servers/uploads/${uploadId}/complete` + `/servers/uploads/${encodeURIComponent(uploadId)}/complete` ), method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -308,7 +349,7 @@ export class Builds { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -318,7 +359,7 @@ export class Builds { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -328,7 +369,7 @@ export class Builds { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -338,7 +379,7 @@ export class Builds { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -348,7 +389,7 @@ export class Builds { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -358,7 +399,7 @@ export class Builds { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -389,7 +430,7 @@ export class Builds { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { return `Bearer ${bearer}`; diff --git a/sdks/full/typescript/src/api/resources/servers/resources/builds/client/requests/GetBuildsRequest.ts b/sdks/full/typescript/src/api/resources/servers/resources/builds/client/requests/GetBuildsRequest.ts index 5c26738a07..f1b638df73 100644 --- a/sdks/full/typescript/src/api/resources/servers/resources/builds/client/requests/GetBuildsRequest.ts +++ b/sdks/full/typescript/src/api/resources/servers/resources/builds/client/requests/GetBuildsRequest.ts @@ -2,6 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * tags: "string" + * } + */ export interface GetBuildsRequest { tags?: string; } diff --git a/sdks/full/typescript/src/api/resources/servers/resources/builds/client/requests/index.ts b/sdks/full/typescript/src/api/resources/servers/resources/builds/client/requests/index.ts index 08db7ff8cb..86e3138056 100644 --- a/sdks/full/typescript/src/api/resources/servers/resources/builds/client/requests/index.ts +++ b/sdks/full/typescript/src/api/resources/servers/resources/builds/client/requests/index.ts @@ -1 +1 @@ -export { GetBuildsRequest } from "./GetBuildsRequest"; +export { type GetBuildsRequest } from "./GetBuildsRequest"; diff --git a/sdks/full/typescript/src/core/fetcher/Fetcher.ts b/sdks/full/typescript/src/core/fetcher/Fetcher.ts index 19de5d475e..d67bc04210 100644 --- a/sdks/full/typescript/src/core/fetcher/Fetcher.ts +++ b/sdks/full/typescript/src/core/fetcher/Fetcher.ts @@ -1,6 +1,10 @@ -import { default as FormData } from "form-data"; -import qs from "qs"; import { APIResponse } from "./APIResponse"; +import { createRequestUrl } from "./createRequestUrl"; +import { getFetchFn } from "./getFetchFn"; +import { getRequestBody } from "./getRequestBody"; +import { getResponseBody } from "./getResponseBody"; +import { makeRequest } from "./makeRequest"; +import { requestWithRetries } from "./requestWithRetries"; export type FetchFunction = (args: Fetcher.Args) => Promise>; @@ -10,12 +14,15 @@ export declare namespace Fetcher { method: string; contentType?: string; headers?: Record; - queryParameters?: Record; + queryParameters?: Record; body?: unknown; timeoutMs?: number; maxRetries?: number; withCredentials?: boolean; - responseType?: "json" | "blob" | "streaming"; + abortSignal?: AbortSignal; + requestType?: "json" | "file" | "bytes"; + responseType?: "json" | "blob" | "sse" | "streaming" | "text"; + duplex?: "half"; } export type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError; @@ -42,11 +49,7 @@ export declare namespace Fetcher { } } -const INITIAL_RETRY_DELAY = 1; -const MAX_RETRY_DELAY = 60; -const DEFAULT_MAX_RETRIES = 2; - -async function fetcherImpl(args: Fetcher.Args): Promise> { +export async function fetcherImpl(args: Fetcher.Args): Promise> { const headers: Record = {}; if (args.body !== undefined && args.contentType != null) { headers["Content-Type"] = args.contentType; @@ -60,85 +63,35 @@ async function fetcherImpl(args: Fetcher.Args): Promise 0 - ? `${args.url}?${qs.stringify(args.queryParameters, { arrayFormat: "repeat" })}` - : args.url; - - let body: BodyInit | undefined = undefined; - if (args.body instanceof FormData) { - // @ts-expect-error - body = args.body; - } else { - body = JSON.stringify(args.body); - } - - const fetchFn = typeof fetch == "function" ? fetch : require("node-fetch"); - - const makeRequest = async (): Promise => { - const controller = new AbortController(); - let abortId = undefined; - if (args.timeoutMs != null) { - abortId = setTimeout(() => controller.abort(), args.timeoutMs); - } - const response = await fetchFn(url, { - method: args.method, - headers, - body, - signal: controller.signal, - credentials: args.withCredentials ? "include" : undefined, - }); - if (abortId != null) { - clearTimeout(abortId); - } - return response; - }; + const url = createRequestUrl(args.url, args.queryParameters); + let requestBody: BodyInit | undefined = await getRequestBody({ + body: args.body, + type: args.requestType === "json" ? "json" : "other", + }); + const fetchFn = await getFetchFn(); try { - let response = await makeRequest(); - - for (let i = 0; i < (args.maxRetries ?? DEFAULT_MAX_RETRIES); ++i) { - if ( - response.status === 408 || - response.status === 409 || - response.status === 429 || - response.status >= 500 - ) { - const delay = Math.min(INITIAL_RETRY_DELAY * Math.pow(i, 2), MAX_RETRY_DELAY); - await new Promise((resolve) => setTimeout(resolve, delay)); - response = await makeRequest(); - } else { - break; - } - } - - let body: unknown; - if (response.body != null && args.responseType === "blob") { - body = await response.blob(); - } else if (response.body != null && args.responseType === "streaming") { - body = response.body; - } else { - const text = await response.text(); - if (text.length > 0) { - try { - body = JSON.parse(text); - } catch (err) { - return { - ok: false, - error: { - reason: "non-json", - statusCode: response.status, - rawBody: text, - }, - }; - } - } - } + const response = await requestWithRetries( + async () => + makeRequest( + fetchFn, + url, + args.method, + headers, + requestBody, + args.timeoutMs, + args.abortSignal, + args.withCredentials, + args.duplex + ), + args.maxRetries + ); + let responseBody = await getResponseBody(response, args.responseType); if (response.status >= 200 && response.status < 400) { return { ok: true, - body: body as R, + body: responseBody as R, headers: response.headers, }; } else { @@ -147,12 +100,20 @@ async function fetcherImpl(args: Fetcher.Args): Promise +): string { + return Object.keys(queryParameters ?? {}).length > 0 + ? `${baseUrl}?${qs.stringify(queryParameters, { arrayFormat: "repeat" })}` + : baseUrl; +} diff --git a/sdks/full/typescript/src/core/fetcher/getFetchFn.ts b/sdks/full/typescript/src/core/fetcher/getFetchFn.ts new file mode 100644 index 0000000000..9fd9bfc42b --- /dev/null +++ b/sdks/full/typescript/src/core/fetcher/getFetchFn.ts @@ -0,0 +1,25 @@ +import { RUNTIME } from "../runtime"; + +/** + * Returns a fetch function based on the runtime + */ +export async function getFetchFn(): Promise { + // In Node.js 18+ environments, use native fetch + if (RUNTIME.type === "node" && RUNTIME.parsedVersion != null && RUNTIME.parsedVersion >= 18) { + return fetch; + } + + // In Node.js 18 or lower environments, the SDK always uses`node-fetch`. + if (RUNTIME.type === "node") { + return (await import("node-fetch")).default as any; + } + + // Otherwise the SDK uses global fetch if available, + // and falls back to node-fetch. + if (typeof fetch == "function") { + return fetch; + } + + // Defaults to node `node-fetch` if global fetch isn't available + return (await import("node-fetch")).default as any; +} diff --git a/sdks/full/typescript/src/core/fetcher/getRequestBody.ts b/sdks/full/typescript/src/core/fetcher/getRequestBody.ts new file mode 100644 index 0000000000..1138414b1c --- /dev/null +++ b/sdks/full/typescript/src/core/fetcher/getRequestBody.ts @@ -0,0 +1,14 @@ +export declare namespace GetRequestBody { + interface Args { + body: unknown; + type: "json" | "file" | "bytes" | "other"; + } +} + +export async function getRequestBody({ body, type }: GetRequestBody.Args): Promise { + if (type.includes("json")) { + return JSON.stringify(body); + } else { + return body as BodyInit; + } +} diff --git a/sdks/full/typescript/src/core/fetcher/getResponseBody.ts b/sdks/full/typescript/src/core/fetcher/getResponseBody.ts new file mode 100644 index 0000000000..a7a9c50877 --- /dev/null +++ b/sdks/full/typescript/src/core/fetcher/getResponseBody.ts @@ -0,0 +1,32 @@ +import { chooseStreamWrapper } from "./stream-wrappers/chooseStreamWrapper"; + +export async function getResponseBody(response: Response, responseType?: string): Promise { + if (response.body != null && responseType === "blob") { + return await response.blob(); + } else if (response.body != null && responseType === "sse") { + return response.body; + } else if (response.body != null && responseType === "streaming") { + return chooseStreamWrapper(response.body); + } else if (response.body != null && responseType === "text") { + return await response.text(); + } else { + const text = await response.text(); + if (text.length > 0) { + try { + let responseBody = JSON.parse(text); + return responseBody; + } catch (err) { + return { + ok: false, + error: { + reason: "non-json", + statusCode: response.status, + rawBody: text, + }, + }; + } + } else { + return undefined; + } + } +} diff --git a/sdks/full/typescript/src/core/fetcher/makeRequest.ts b/sdks/full/typescript/src/core/fetcher/makeRequest.ts new file mode 100644 index 0000000000..8fb4bace46 --- /dev/null +++ b/sdks/full/typescript/src/core/fetcher/makeRequest.ts @@ -0,0 +1,44 @@ +import { anySignal, getTimeoutSignal } from "./signals"; + +export const makeRequest = async ( + fetchFn: (url: string, init: RequestInit) => Promise, + url: string, + method: string, + headers: Record, + requestBody: BodyInit | undefined, + timeoutMs?: number, + abortSignal?: AbortSignal, + withCredentials?: boolean, + duplex?: "half" +): Promise => { + const signals: AbortSignal[] = []; + + // Add timeout signal + let timeoutAbortId: NodeJS.Timeout | undefined = undefined; + if (timeoutMs != null) { + const { signal, abortId } = getTimeoutSignal(timeoutMs); + timeoutAbortId = abortId; + signals.push(signal); + } + + // Add arbitrary signal + if (abortSignal != null) { + signals.push(abortSignal); + } + let newSignals = anySignal(signals); + const response = await fetchFn(url, { + method: method, + headers, + body: requestBody, + signal: newSignals, + credentials: withCredentials ? "include" : undefined, + // @ts-ignore + duplex, + }); + + if (timeoutAbortId != null) { + clearTimeout(timeoutAbortId); + } + + return response; +}; diff --git a/sdks/full/typescript/src/core/fetcher/requestWithRetries.ts b/sdks/full/typescript/src/core/fetcher/requestWithRetries.ts new file mode 100644 index 0000000000..ff5dc3bbab --- /dev/null +++ b/sdks/full/typescript/src/core/fetcher/requestWithRetries.ts @@ -0,0 +1,21 @@ +const INITIAL_RETRY_DELAY = 1; +const MAX_RETRY_DELAY = 60; +const DEFAULT_MAX_RETRIES = 2; + +export async function requestWithRetries( + requestFn: () => Promise, + maxRetries: number = DEFAULT_MAX_RETRIES +): Promise { + let response: Response = await requestFn(); + + for (let i = 0; i < maxRetries; ++i) { + if ([408, 409, 429].includes(response.status) || response.status >= 500) { + const delay = Math.min(INITIAL_RETRY_DELAY * Math.pow(2, i), MAX_RETRY_DELAY); + await new Promise((resolve) => setTimeout(resolve, delay)); + response = await requestFn(); + } else { + break; + } + } + return response!; +} diff --git a/sdks/full/typescript/src/core/fetcher/signals.ts b/sdks/full/typescript/src/core/fetcher/signals.ts new file mode 100644 index 0000000000..6c124ff798 --- /dev/null +++ b/sdks/full/typescript/src/core/fetcher/signals.ts @@ -0,0 +1,38 @@ +const TIMEOUT = "timeout"; + +export function getTimeoutSignal(timeoutMs: number): { signal: AbortSignal; abortId: NodeJS.Timeout } { + const controller = new AbortController(); + const abortId = setTimeout(() => controller.abort(TIMEOUT), timeoutMs); + return { signal: controller.signal, abortId }; +} + +/** + * Returns an abort signal that is getting aborted when + * at least one of the specified abort signals is aborted. + * + * Requires at least node.js 18. + */ +export function anySignal(...args: AbortSignal[] | [AbortSignal[]]): AbortSignal { + // Allowing signals to be passed either as array + // of signals or as multiple arguments. + const signals = (args.length === 1 && Array.isArray(args[0]) ? args[0] : args); + + const controller = new AbortController(); + + for (const signal of signals) { + if (signal.aborted) { + // Exiting early if one of the signals + // is already aborted. + controller.abort((signal as any)?.reason); + break; + } + + // Listening for signals and removing the listeners + // when at least one symbol is aborted. + signal.addEventListener("abort", () => controller.abort((signal as any)?.reason), { + signal: controller.signal, + }); + } + + return controller.signal; +} diff --git a/sdks/full/typescript/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts b/sdks/full/typescript/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts new file mode 100644 index 0000000000..5cc74b6b1b --- /dev/null +++ b/sdks/full/typescript/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts @@ -0,0 +1,231 @@ +import type { Writable } from "stream"; +import { EventCallback, StreamWrapper } from "./chooseStreamWrapper"; + +export class Node18UniversalStreamWrapper + implements StreamWrapper, Uint8Array> +{ + private readableStream: ReadableStream; + private reader: ReadableStreamDefaultReader; + private events: Record; + private paused: boolean; + private resumeCallback: ((value?: unknown) => void) | null; + private encoding: string | null; + + constructor(readableStream: ReadableStream) { + this.readableStream = readableStream; + this.reader = this.readableStream.getReader(); + this.events = { + data: [], + end: [], + error: [], + readable: [], + close: [], + pause: [], + resume: [], + }; + this.paused = false; + this.resumeCallback = null; + this.encoding = null; + } + + public on(event: string, callback: EventCallback): void { + this.events[event]?.push(callback); + } + + public off(event: string, callback: EventCallback): void { + this.events[event] = this.events[event]?.filter((cb) => cb !== callback); + } + + public pipe( + dest: Node18UniversalStreamWrapper | Writable | WritableStream + ): Node18UniversalStreamWrapper | Writable | WritableStream { + this.on("data", async (chunk) => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._write(chunk); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.write(chunk).then(() => writer.releaseLock()); + } else { + dest.write(chunk); + } + }); + + this.on("end", async () => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._end(); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.close(); + } else { + dest.end(); + } + }); + + this.on("error", async (error) => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._error(error); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.abort(error); + } else { + dest.destroy(error); + } + }); + + this._startReading(); + + return dest; + } + + public pipeTo( + dest: Node18UniversalStreamWrapper | Writable | WritableStream + ): Node18UniversalStreamWrapper | Writable | WritableStream { + return this.pipe(dest); + } + + public unpipe(dest: Node18UniversalStreamWrapper | Writable | WritableStream): void { + this.off("data", async (chunk) => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._write(chunk); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.write(chunk).then(() => writer.releaseLock()); + } else { + dest.write(chunk); + } + }); + + this.off("end", async () => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._end(); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.close(); + } else { + dest.end(); + } + }); + + this.off("error", async (error) => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._error(error); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.abort(error); + } else { + dest.destroy(error); + } + }); + } + + public destroy(error?: Error): void { + this.reader + .cancel(error) + .then(() => { + this._emit("close"); + }) + .catch((err) => { + this._emit("error", err); + }); + } + + public pause(): void { + this.paused = true; + this._emit("pause"); + } + + public resume(): void { + if (this.paused) { + this.paused = false; + this._emit("resume"); + if (this.resumeCallback) { + this.resumeCallback(); + this.resumeCallback = null; + } + } + } + + public get isPaused(): boolean { + return this.paused; + } + + public async read(): Promise { + if (this.paused) { + await new Promise((resolve) => { + this.resumeCallback = resolve; + }); + } + const { done, value } = await this.reader.read(); + + if (done) { + return undefined; + } + return value; + } + + public setEncoding(encoding: string): void { + this.encoding = encoding; + } + + public async text(): Promise { + const chunks: Uint8Array[] = []; + + while (true) { + const { done, value } = await this.reader.read(); + if (done) break; + if (value) chunks.push(value); + } + + const decoder = new TextDecoder(this.encoding || "utf-8"); + return decoder.decode(await new Blob(chunks).arrayBuffer()); + } + + public async json(): Promise { + const text = await this.text(); + return JSON.parse(text); + } + + private _write(chunk: Uint8Array): void { + this._emit("data", chunk); + } + + private _end(): void { + this._emit("end"); + } + + private _error(error: any): void { + this._emit("error", error); + } + + private _emit(event: string, data?: any): void { + if (this.events[event]) { + for (const callback of this.events[event] || []) { + callback(data); + } + } + } + + private async _startReading(): Promise { + try { + this._emit("readable"); + while (true) { + if (this.paused) { + await new Promise((resolve) => { + this.resumeCallback = resolve; + }); + } + const { done, value } = await this.reader.read(); + if (done) { + this._emit("end"); + this._emit("close"); + break; + } + if (value) { + this._emit("data", value); + } + } + } catch (error) { + this._emit("error", error); + } + } +} diff --git a/sdks/full/typescript/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts b/sdks/full/typescript/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts new file mode 100644 index 0000000000..d73daba8ce --- /dev/null +++ b/sdks/full/typescript/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts @@ -0,0 +1,90 @@ +import type { Readable, Writable } from "stream"; +import { EventCallback, StreamWrapper } from "./chooseStreamWrapper"; + +export class NodePre18StreamWrapper implements StreamWrapper { + private readableStream: Readable; + private encoding: string | undefined; + + constructor(readableStream: Readable) { + this.readableStream = readableStream; + } + + public on(event: string, callback: EventCallback): void { + this.readableStream.on(event, callback); + } + + public off(event: string, callback: EventCallback): void { + this.readableStream.off(event, callback); + } + + public pipe(dest: Writable): Writable { + this.readableStream.pipe(dest); + return dest; + } + + public pipeTo(dest: Writable): Writable { + return this.pipe(dest); + } + + public unpipe(dest?: Writable): void { + if (dest) { + this.readableStream.unpipe(dest); + } else { + this.readableStream.unpipe(); + } + } + + public destroy(error?: Error): void { + this.readableStream.destroy(error); + } + + public pause(): void { + this.readableStream.pause(); + } + + public resume(): void { + this.readableStream.resume(); + } + + public get isPaused(): boolean { + return this.readableStream.isPaused(); + } + + public async read(): Promise { + return new Promise((resolve, reject) => { + const chunk = this.readableStream.read(); + if (chunk) { + resolve(chunk); + } else { + this.readableStream.once("readable", () => { + const chunk = this.readableStream.read(); + resolve(chunk); + }); + this.readableStream.once("error", reject); + } + }); + } + + public setEncoding(encoding?: string): void { + this.readableStream.setEncoding(encoding as BufferEncoding); + this.encoding = encoding; + } + + public async text(): Promise { + const chunks: Uint8Array[] = []; + const encoder = new TextEncoder(); + this.readableStream.setEncoding((this.encoding || "utf-8") as BufferEncoding); + + for await (const chunk of this.readableStream) { + chunks.push(encoder.encode(chunk)); + } + + const decoder = new TextDecoder(this.encoding || "utf-8"); + return decoder.decode(Buffer.concat(chunks)); + } + + public async json(): Promise { + const text = await this.text(); + return JSON.parse(text); + } +} diff --git a/sdks/full/typescript/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts b/sdks/full/typescript/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts new file mode 100644 index 0000000000..55c048732c --- /dev/null +++ b/sdks/full/typescript/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts @@ -0,0 +1,219 @@ +import { StreamWrapper } from "./chooseStreamWrapper"; + +type EventCallback = (data?: any) => void; + +export class UndiciStreamWrapper + implements StreamWrapper | WritableStream, ReadFormat> +{ + private readableStream: ReadableStream; + private reader: ReadableStreamDefaultReader; + private events: Record; + private paused: boolean; + private resumeCallback: ((value?: unknown) => void) | null; + private encoding: string | null; + + constructor(readableStream: ReadableStream) { + this.readableStream = readableStream; + this.reader = this.readableStream.getReader(); + this.events = { + data: [], + end: [], + error: [], + readable: [], + close: [], + pause: [], + resume: [], + }; + this.paused = false; + this.resumeCallback = null; + this.encoding = null; + } + + public on(event: string, callback: EventCallback): void { + this.events[event]?.push(callback); + } + + public off(event: string, callback: EventCallback): void { + this.events[event] = this.events[event]?.filter((cb) => cb !== callback); + } + + public pipe( + dest: UndiciStreamWrapper | WritableStream + ): UndiciStreamWrapper | WritableStream { + this.on("data", (chunk) => { + if (dest instanceof UndiciStreamWrapper) { + dest._write(chunk); + } else { + const writer = dest.getWriter(); + writer.write(chunk).then(() => writer.releaseLock()); + } + }); + + this.on("end", () => { + if (dest instanceof UndiciStreamWrapper) { + dest._end(); + } else { + const writer = dest.getWriter(); + writer.close(); + } + }); + + this.on("error", (error) => { + if (dest instanceof UndiciStreamWrapper) { + dest._error(error); + } else { + const writer = dest.getWriter(); + writer.abort(error); + } + }); + + this._startReading(); + + return dest; + } + + public pipeTo( + dest: UndiciStreamWrapper | WritableStream + ): UndiciStreamWrapper | WritableStream { + return this.pipe(dest); + } + + public unpipe(dest: UndiciStreamWrapper | WritableStream): void { + this.off("data", (chunk) => { + if (dest instanceof UndiciStreamWrapper) { + dest._write(chunk); + } else { + const writer = dest.getWriter(); + writer.write(chunk).then(() => writer.releaseLock()); + } + }); + + this.off("end", () => { + if (dest instanceof UndiciStreamWrapper) { + dest._end(); + } else { + const writer = dest.getWriter(); + writer.close(); + } + }); + + this.off("error", (error) => { + if (dest instanceof UndiciStreamWrapper) { + dest._error(error); + } else { + const writer = dest.getWriter(); + writer.abort(error); + } + }); + } + + public destroy(error?: Error): void { + this.reader + .cancel(error) + .then(() => { + this._emit("close"); + }) + .catch((err) => { + this._emit("error", err); + }); + } + + public pause(): void { + this.paused = true; + this._emit("pause"); + } + + public resume(): void { + if (this.paused) { + this.paused = false; + this._emit("resume"); + if (this.resumeCallback) { + this.resumeCallback(); + this.resumeCallback = null; + } + } + } + + public get isPaused(): boolean { + return this.paused; + } + + public async read(): Promise { + if (this.paused) { + await new Promise((resolve) => { + this.resumeCallback = resolve; + }); + } + const { done, value } = await this.reader.read(); + if (done) { + return undefined; + } + return value; + } + + public setEncoding(encoding: string): void { + this.encoding = encoding; + } + + public async text(): Promise { + const chunks: BlobPart[] = []; + + while (true) { + const { done, value } = await this.reader.read(); + if (done) break; + if (value) chunks.push(value); + } + + const decoder = new TextDecoder(this.encoding || "utf-8"); + return decoder.decode(await new Blob(chunks).arrayBuffer()); + } + + public async json(): Promise { + const text = await this.text(); + return JSON.parse(text); + } + + private _write(chunk: ReadFormat): void { + this._emit("data", chunk); + } + + private _end(): void { + this._emit("end"); + } + + private _error(error: any): void { + this._emit("error", error); + } + + private _emit(event: string, data?: any): void { + if (this.events[event]) { + for (const callback of this.events[event] || []) { + callback(data); + } + } + } + + private async _startReading(): Promise { + try { + this._emit("readable"); + while (true) { + if (this.paused) { + await new Promise((resolve) => { + this.resumeCallback = resolve; + }); + } + const { done, value } = await this.reader.read(); + if (done) { + this._emit("end"); + this._emit("close"); + break; + } + if (value) { + this._emit("data", value); + } + } + } catch (error) { + this._emit("error", error); + } + } +} diff --git a/sdks/full/typescript/src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts b/sdks/full/typescript/src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts new file mode 100644 index 0000000000..3295582d02 --- /dev/null +++ b/sdks/full/typescript/src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts @@ -0,0 +1,32 @@ +import type { Readable } from "stream"; +import { RUNTIME } from "../../runtime"; + +export type EventCallback = (data?: any) => void; + +export interface StreamWrapper { + setEncoding(encoding?: string): void; + on(event: string, callback: EventCallback): void; + off(event: string, callback: EventCallback): void; + pipe(dest: WritableStream): WritableStream; + pipeTo(dest: WritableStream): WritableStream; + unpipe(dest?: WritableStream): void; + destroy(error?: Error): void; + pause(): void; + resume(): void; + get isPaused(): boolean; + read(): Promise; + text(): Promise; + json(): Promise; +} + +export async function chooseStreamWrapper(responseBody: any): Promise>> { + if (RUNTIME.type === "node" && RUNTIME.parsedVersion != null && RUNTIME.parsedVersion >= 18) { + return new (await import("./Node18UniversalStreamWrapper")).Node18UniversalStreamWrapper( + responseBody as ReadableStream + ); + } else if (RUNTIME.type !== "node" && typeof fetch == "function") { + return new (await import("./UndiciStreamWrapper")).UndiciStreamWrapper(responseBody as ReadableStream); + } else { + return new (await import("./NodePre18StreamWrapper")).NodePre18StreamWrapper(responseBody as Readable); + } +} diff --git a/sdks/full/typescript/src/core/index.ts b/sdks/full/typescript/src/core/index.ts index e2eb66e805..f0a8603dec 100644 --- a/sdks/full/typescript/src/core/index.ts +++ b/sdks/full/typescript/src/core/index.ts @@ -1,3 +1,4 @@ +export * from "./runtime"; export * from "./fetcher"; export * from "./auth"; export * as serialization from "./schemas"; diff --git a/sdks/full/typescript/src/core/runtime/index.ts b/sdks/full/typescript/src/core/runtime/index.ts new file mode 100644 index 0000000000..5c76dbb133 --- /dev/null +++ b/sdks/full/typescript/src/core/runtime/index.ts @@ -0,0 +1 @@ +export { RUNTIME } from "./runtime"; diff --git a/sdks/full/typescript/src/core/runtime/runtime.ts b/sdks/full/typescript/src/core/runtime/runtime.ts new file mode 100644 index 0000000000..4d0687e8eb --- /dev/null +++ b/sdks/full/typescript/src/core/runtime/runtime.ts @@ -0,0 +1,126 @@ +interface DenoGlobal { + version: { + deno: string; + }; +} + +interface BunGlobal { + version: string; +} + +declare const Deno: DenoGlobal; +declare const Bun: BunGlobal; + +/** + * A constant that indicates whether the environment the code is running is a Web Browser. + */ +const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; + +/** + * A constant that indicates whether the environment the code is running is a Web Worker. + */ +const isWebWorker = + typeof self === "object" && + // @ts-ignore + typeof self?.importScripts === "function" && + (self.constructor?.name === "DedicatedWorkerGlobalScope" || + self.constructor?.name === "ServiceWorkerGlobalScope" || + self.constructor?.name === "SharedWorkerGlobalScope"); + +/** + * A constant that indicates whether the environment the code is running is Deno. + */ +const isDeno = + typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; + +/** + * A constant that indicates whether the environment the code is running is Bun.sh. + */ +const isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; + +/** + * A constant that indicates whether the environment the code is running is Node.JS. + */ +const isNode = + typeof process !== "undefined" && + Boolean(process.version) && + Boolean(process.versions?.node) && + // Deno spoofs process.versions.node, see https://deno.land/std@0.177.0/node/process.ts?s=versions + !isDeno && + !isBun; + +/** + * A constant that indicates whether the environment the code is running is in React-Native. + * https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js + */ +const isReactNative = typeof navigator !== "undefined" && navigator?.product === "ReactNative"; + +/** + * A constant that indicates whether the environment the code is running is Cloudflare. + * https://developers.cloudflare.com/workers/runtime-apis/web-standards/#navigatoruseragent + */ +const isCloudflare = typeof globalThis !== "undefined" && globalThis?.navigator?.userAgent === "Cloudflare-Workers"; + +/** + * A constant that indicates which environment and version the SDK is running in. + */ +export const RUNTIME: Runtime = evaluateRuntime(); + +export interface Runtime { + type: "browser" | "web-worker" | "deno" | "bun" | "node" | "react-native" | "unknown" | "workerd"; + version?: string; + parsedVersion?: number; +} + +function evaluateRuntime(): Runtime { + if (isBrowser) { + return { + type: "browser", + version: window.navigator.userAgent, + }; + } + + if (isCloudflare) { + return { + type: "workerd", + }; + } + + if (isWebWorker) { + return { + type: "web-worker", + }; + } + + if (isDeno) { + return { + type: "deno", + version: Deno.version.deno, + }; + } + + if (isBun) { + return { + type: "bun", + version: Bun.version, + }; + } + + if (isNode) { + return { + type: "node", + version: process.versions.node, + parsedVersion: Number(process.versions.node.split(".")[0]), + }; + } + + if (isReactNative) { + return { + type: "react-native", + }; + } + + return { + type: "unknown", + }; +} diff --git a/sdks/full/typescript/src/core/schemas/Schema.ts b/sdks/full/typescript/src/core/schemas/Schema.ts index 870f373ba8..19acc5dc44 100644 --- a/sdks/full/typescript/src/core/schemas/Schema.ts +++ b/sdks/full/typescript/src/core/schemas/Schema.ts @@ -1,5 +1,4 @@ import { SchemaUtils } from "./builders"; -import { MaybePromise } from "./utils/MaybePromise"; export type Schema = BaseSchema & SchemaUtils; @@ -7,9 +6,9 @@ export type inferRaw = S extends Schema ? Raw export type inferParsed = S extends Schema ? Parsed : never; export interface BaseSchema { - parse: (raw: unknown, opts?: SchemaOptions) => MaybePromise>; - json: (parsed: unknown, opts?: SchemaOptions) => MaybePromise>; - getType: () => SchemaType | Promise; + parse: (raw: unknown, opts?: SchemaOptions) => MaybeValid; + json: (parsed: unknown, opts?: SchemaOptions) => MaybeValid; + getType: () => SchemaType | SchemaType; } export const SchemaType = { @@ -91,4 +90,9 @@ export interface SchemaOptions { * helpful for zurg's internal debug logging. */ breadcrumbsPrefix?: string[]; + + /** + * whether to send 'null' for optional properties explicitly set to 'undefined'. + */ + omitUndefined?: boolean; } diff --git a/sdks/full/typescript/src/core/schemas/builders/lazy/lazy.ts b/sdks/full/typescript/src/core/schemas/builders/lazy/lazy.ts index a665472d22..835c61f8a5 100644 --- a/sdks/full/typescript/src/core/schemas/builders/lazy/lazy.ts +++ b/sdks/full/typescript/src/core/schemas/builders/lazy/lazy.ts @@ -1,7 +1,7 @@ import { BaseSchema, Schema } from "../../Schema"; import { getSchemaUtils } from "../schema-utils"; -export type SchemaGetter> = () => SchemaType | Promise; +export type SchemaGetter> = () => SchemaType; export function lazy(getter: SchemaGetter>): Schema { const baseSchema = constructLazyBaseSchema(getter); @@ -15,20 +15,18 @@ export function constructLazyBaseSchema( getter: SchemaGetter> ): BaseSchema { return { - parse: async (raw, opts) => (await getMemoizedSchema(getter)).parse(raw, opts), - json: async (parsed, opts) => (await getMemoizedSchema(getter)).json(parsed, opts), - getType: async () => (await getMemoizedSchema(getter)).getType(), + parse: (raw, opts) => getMemoizedSchema(getter).parse(raw, opts), + json: (parsed, opts) => getMemoizedSchema(getter).json(parsed, opts), + getType: () => getMemoizedSchema(getter).getType(), }; } type MemoizedGetter> = SchemaGetter & { __zurg_memoized?: SchemaType }; -export async function getMemoizedSchema>( - getter: SchemaGetter -): Promise { +export function getMemoizedSchema>(getter: SchemaGetter): SchemaType { const castedGetter = getter as MemoizedGetter; if (castedGetter.__zurg_memoized == null) { - castedGetter.__zurg_memoized = await getter(); + castedGetter.__zurg_memoized = getter(); } return castedGetter.__zurg_memoized; } diff --git a/sdks/full/typescript/src/core/schemas/builders/lazy/lazyObject.ts b/sdks/full/typescript/src/core/schemas/builders/lazy/lazyObject.ts index e48c016667..38c9e28404 100644 --- a/sdks/full/typescript/src/core/schemas/builders/lazy/lazyObject.ts +++ b/sdks/full/typescript/src/core/schemas/builders/lazy/lazyObject.ts @@ -7,8 +7,8 @@ import { constructLazyBaseSchema, getMemoizedSchema, SchemaGetter } from "./lazy export function lazyObject(getter: SchemaGetter>): ObjectSchema { const baseSchema: BaseObjectSchema = { ...constructLazyBaseSchema(getter), - _getRawProperties: async () => (await getMemoizedSchema(getter))._getRawProperties(), - _getParsedProperties: async () => (await getMemoizedSchema(getter))._getParsedProperties(), + _getRawProperties: () => getMemoizedSchema(getter)._getRawProperties(), + _getParsedProperties: () => getMemoizedSchema(getter)._getParsedProperties(), }; return { diff --git a/sdks/full/typescript/src/core/schemas/builders/list/list.ts b/sdks/full/typescript/src/core/schemas/builders/list/list.ts index b333321b50..e4c5c4a4a9 100644 --- a/sdks/full/typescript/src/core/schemas/builders/list/list.ts +++ b/sdks/full/typescript/src/core/schemas/builders/list/list.ts @@ -1,12 +1,11 @@ import { BaseSchema, MaybeValid, Schema, SchemaType, ValidationError } from "../../Schema"; import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; -import { MaybePromise } from "../../utils/MaybePromise"; import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; import { getSchemaUtils } from "../schema-utils"; export function list(schema: Schema): Schema { const baseSchema: BaseSchema = { - parse: async (raw, opts) => + parse: (raw, opts) => validateAndTransformArray(raw, (item, index) => schema.parse(item, { ...opts, @@ -29,10 +28,10 @@ export function list(schema: Schema): Schema( +function validateAndTransformArray( value: unknown, - transformItem: (item: Raw, index: number) => MaybePromise> -): Promise> { + transformItem: (item: Raw, index: number) => MaybeValid +): MaybeValid { if (!Array.isArray(value)) { return { ok: false, @@ -45,7 +44,7 @@ async function validateAndTransformArray( }; } - const maybeValidItems = await Promise.all(value.map((item, index) => transformItem(item, index))); + const maybeValidItems = value.map((item, index) => transformItem(item, index)); return maybeValidItems.reduce>( (acc, item) => { diff --git a/sdks/full/typescript/src/core/schemas/builders/object-like/getObjectLikeUtils.ts b/sdks/full/typescript/src/core/schemas/builders/object-like/getObjectLikeUtils.ts index 270ea170c8..8331d08da8 100644 --- a/sdks/full/typescript/src/core/schemas/builders/object-like/getObjectLikeUtils.ts +++ b/sdks/full/typescript/src/core/schemas/builders/object-like/getObjectLikeUtils.ts @@ -20,8 +20,8 @@ export function withParsedProperties Properties[K]) } ): ObjectLikeSchema { const objectSchema: BaseSchema = { - parse: async (raw, opts) => { - const parsedObject = await objectLike.parse(raw, opts); + parse: (raw, opts) => { + const parsedObject = objectLike.parse(raw, opts); if (!parsedObject.ok) { return parsedObject; } diff --git a/sdks/full/typescript/src/core/schemas/builders/object/object.ts b/sdks/full/typescript/src/core/schemas/builders/object/object.ts index 4abadfb38b..e00136d72f 100644 --- a/sdks/full/typescript/src/core/schemas/builders/object/object.ts +++ b/sdks/full/typescript/src/core/schemas/builders/object/object.ts @@ -4,7 +4,6 @@ import { filterObject } from "../../utils/filterObject"; import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; import { isPlainObject } from "../../utils/isPlainObject"; import { keys } from "../../utils/keys"; -import { MaybePromise } from "../../utils/MaybePromise"; import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; import { partition } from "../../utils/partition"; import { getObjectLikeUtils } from "../object-like"; @@ -34,15 +33,12 @@ export function object > = { _getRawProperties: () => - Promise.resolve( - Object.entries(schemas).map(([parsedKey, propertySchema]) => - isProperty(propertySchema) ? propertySchema.rawKey : parsedKey - ) as unknown as (keyof inferRawObjectFromPropertySchemas)[] - ), - _getParsedProperties: () => - Promise.resolve(keys(schemas) as unknown as (keyof inferParsedObjectFromPropertySchemas)[]), + Object.entries(schemas).map(([parsedKey, propertySchema]) => + isProperty(propertySchema) ? propertySchema.rawKey : parsedKey + ) as unknown as (keyof inferRawObjectFromPropertySchemas)[], + _getParsedProperties: () => keys(schemas) as unknown as (keyof inferParsedObjectFromPropertySchemas)[], - parse: async (raw, opts) => { + parse: (raw, opts) => { const rawKeyToProperty: Record = {}; const requiredKeys: string[] = []; @@ -60,7 +56,7 @@ export function object { + json: (parsed, opts) => { const requiredKeys: string[] = []; for (const [parsedKey, schemaOrObjectProperty] of entries(schemas)) { @@ -96,7 +93,7 @@ export function object MaybePromise> } - | undefined => { + ): { transformedKey: string; transform: (propertyValue: unknown) => MaybeValid } | undefined => { const property = schemas[parsedKey as keyof T]; // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition @@ -139,6 +134,7 @@ export function object({ +function validateAndTransformObject({ value, requiredKeys, getProperty, @@ -165,11 +161,12 @@ async function validateAndTransformObject({ requiredKeys: string[]; getProperty: ( preTransformedKey: string - ) => { transformedKey: string; transform: (propertyValue: unknown) => MaybePromise> } | undefined; + ) => { transformedKey: string; transform: (propertyValue: unknown) => MaybeValid } | undefined; unrecognizedObjectKeys: "fail" | "passthrough" | "strip" | undefined; skipValidation: boolean | undefined; breadcrumbsPrefix: string[] | undefined; -}): Promise> { + omitUndefined: boolean | undefined; +}): MaybeValid { if (!isPlainObject(value)) { return { ok: false, @@ -192,7 +189,7 @@ async function validateAndTransformObject({ if (property != null) { missingRequiredKeys.delete(preTransformedKey); - const value = await property.transform(preTransformedItemValue); + const value = property.transform(preTransformedItemValue); if (value.ok) { transformed[property.transformedKey] = value.value; } else { @@ -242,25 +239,19 @@ export function getObjectUtils(schema: BaseObjectSchema(extension: ObjectSchema) => { const baseSchema: BaseObjectSchema = { - _getParsedProperties: async () => [ - ...(await schema._getParsedProperties()), - ...(await extension._getParsedProperties()), - ], - _getRawProperties: async () => [ - ...(await schema._getRawProperties()), - ...(await extension._getRawProperties()), - ], - parse: async (raw, opts) => { + _getParsedProperties: () => [...schema._getParsedProperties(), ...extension._getParsedProperties()], + _getRawProperties: () => [...schema._getRawProperties(), ...extension._getRawProperties()], + parse: (raw, opts) => { return validateAndTransformExtendedObject({ - extensionKeys: await extension._getRawProperties(), + extensionKeys: extension._getRawProperties(), value: raw, transformBase: (rawBase) => schema.parse(rawBase, opts), transformExtension: (rawExtension) => extension.parse(rawExtension, opts), }); }, - json: async (parsed, opts) => { + json: (parsed, opts) => { return validateAndTransformExtendedObject({ - extensionKeys: await extension._getParsedProperties(), + extensionKeys: extension._getParsedProperties(), value: parsed, transformBase: (parsedBase) => schema.json(parsedBase, opts), transformExtension: (parsedExtension) => extension.json(parsedExtension, opts), @@ -279,7 +270,7 @@ export function getObjectUtils(schema: BaseObjectSchema({ +function validateAndTransformExtendedObject({ extensionKeys, value, transformBase, @@ -287,16 +278,16 @@ async function validateAndTransformExtendedObject MaybePromise>; - transformExtension: (value: unknown) => MaybePromise>; -}): Promise> { + transformBase: (value: unknown) => MaybeValid; + transformExtension: (value: unknown) => MaybeValid; +}): MaybeValid { const extensionPropertiesSet = new Set(extensionKeys); const [extensionProperties, baseProperties] = partition(keys(value), (key) => extensionPropertiesSet.has(key as keyof PreTransformedExtension) ); - const transformedBase = await transformBase(filterObject(value, baseProperties)); - const transformedExtension = await transformExtension(filterObject(value, extensionProperties)); + const transformedBase = transformBase(filterObject(value, baseProperties)); + const transformedExtension = transformExtension(filterObject(value, extensionProperties)); if (transformedBase.ok && transformedExtension.ok) { return { @@ -317,12 +308,12 @@ async function validateAndTransformExtendedObject): Promise { - return !(await isSchemaOptional(schema)); +function isSchemaRequired(schema: Schema): boolean { + return !isSchemaOptional(schema); } -async function isSchemaOptional(schema: Schema): Promise { - switch (await schema.getType()) { +function isSchemaOptional(schema: Schema): boolean { + switch (schema.getType()) { case SchemaType.ANY: case SchemaType.UNKNOWN: case SchemaType.OPTIONAL: diff --git a/sdks/full/typescript/src/core/schemas/builders/object/types.ts b/sdks/full/typescript/src/core/schemas/builders/object/types.ts index 17cff4f86d..de9bb4074e 100644 --- a/sdks/full/typescript/src/core/schemas/builders/object/types.ts +++ b/sdks/full/typescript/src/core/schemas/builders/object/types.ts @@ -10,8 +10,8 @@ export type ObjectSchema = BaseObjectSchema & SchemaUtils; export interface BaseObjectSchema extends BaseSchema { - _getRawProperties: () => Promise<(keyof Raw)[]>; - _getParsedProperties: () => Promise<(keyof Parsed)[]>; + _getRawProperties: () => (keyof Raw)[]; + _getParsedProperties: () => (keyof Parsed)[]; } export interface ObjectUtils { diff --git a/sdks/full/typescript/src/core/schemas/builders/record/record.ts b/sdks/full/typescript/src/core/schemas/builders/record/record.ts index ac1cd22ade..6683ac3609 100644 --- a/sdks/full/typescript/src/core/schemas/builders/record/record.ts +++ b/sdks/full/typescript/src/core/schemas/builders/record/record.ts @@ -2,7 +2,6 @@ import { MaybeValid, Schema, SchemaType, ValidationError } from "../../Schema"; import { entries } from "../../utils/entries"; import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; import { isPlainObject } from "../../utils/isPlainObject"; -import { MaybePromise } from "../../utils/MaybePromise"; import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; import { getSchemaUtils } from "../schema-utils"; import { BaseRecordSchema, RecordSchema } from "./types"; @@ -12,10 +11,10 @@ export function record ): RecordSchema { const baseSchema: BaseRecordSchema = { - parse: async (raw, opts) => { + parse: (raw, opts) => { return validateAndTransformRecord({ value: raw, - isKeyNumeric: (await keySchema.getType()) === SchemaType.NUMBER, + isKeyNumeric: keySchema.getType() === SchemaType.NUMBER, transformKey: (key) => keySchema.parse(key, { ...opts, @@ -29,10 +28,10 @@ export function record { + json: (parsed, opts) => { return validateAndTransformRecord({ value: parsed, - isKeyNumeric: (await keySchema.getType()) === SchemaType.NUMBER, + isKeyNumeric: keySchema.getType() === SchemaType.NUMBER, transformKey: (key) => keySchema.json(key, { ...opts, @@ -55,7 +54,7 @@ export function record({ +function validateAndTransformRecord({ value, isKeyNumeric, transformKey, @@ -64,10 +63,10 @@ async function validateAndTransformRecord MaybePromise>; - transformValue: (value: unknown, key: string | number) => MaybePromise>; + transformKey: (key: string | number) => MaybeValid; + transformValue: (value: unknown, key: string | number) => MaybeValid; breadcrumbsPrefix: string[] | undefined; -}): Promise>> { +}): MaybeValid> { if (!isPlainObject(value)) { return { ok: false, @@ -80,14 +79,14 @@ async function validateAndTransformRecord>>>( - async (accPromise, [stringKey, value]) => { + return entries(value).reduce>>( + (accPromise, [stringKey, value]) => { // skip nullish keys if (value == null) { return accPromise; } - const acc = await accPromise; + const acc = accPromise; let key: string | number = stringKey; if (isKeyNumeric) { @@ -96,9 +95,9 @@ async function validateAndTransformRecord }) + { ok: true, value: {} as Record } ); } diff --git a/sdks/full/typescript/src/core/schemas/builders/schema-utils/getSchemaUtils.ts b/sdks/full/typescript/src/core/schemas/builders/schema-utils/getSchemaUtils.ts index 0c0d379d80..79ecad9213 100644 --- a/sdks/full/typescript/src/core/schemas/builders/schema-utils/getSchemaUtils.ts +++ b/sdks/full/typescript/src/core/schemas/builders/schema-utils/getSchemaUtils.ts @@ -5,8 +5,8 @@ import { ParseError } from "./ParseError"; export interface SchemaUtils { optional: () => Schema; transform: (transformer: SchemaTransformer) => Schema; - parseOrThrow: (raw: unknown, opts?: SchemaOptions) => Promise; - jsonOrThrow: (raw: unknown, opts?: SchemaOptions) => Promise; + parseOrThrow: (raw: unknown, opts?: SchemaOptions) => Parsed; + jsonOrThrow: (raw: unknown, opts?: SchemaOptions) => Raw; } export interface SchemaTransformer { @@ -18,15 +18,15 @@ export function getSchemaUtils(schema: BaseSchema): Sc return { optional: () => optional(schema), transform: (transformer) => transform(schema, transformer), - parseOrThrow: async (raw, opts) => { - const parsed = await schema.parse(raw, opts); + parseOrThrow: (raw, opts) => { + const parsed = schema.parse(raw, opts); if (parsed.ok) { return parsed.value; } throw new ParseError(parsed.errors); }, - jsonOrThrow: async (parsed, opts) => { - const raw = await schema.json(parsed, opts); + jsonOrThrow: (parsed, opts) => { + const raw = schema.json(parsed, opts); if (raw.ok) { return raw.value; } @@ -53,6 +53,12 @@ export function optional( return schema.parse(raw, opts); }, json: (parsed, opts) => { + if (opts?.omitUndefined && parsed === undefined) { + return { + ok: true, + value: undefined, + }; + } if (parsed == null) { return { ok: true, @@ -75,8 +81,8 @@ export function transform( transformer: SchemaTransformer ): Schema { const baseSchema: BaseSchema = { - parse: async (raw, opts) => { - const parsed = await schema.parse(raw, opts); + parse: (raw, opts) => { + const parsed = schema.parse(raw, opts); if (!parsed.ok) { return parsed; } @@ -85,8 +91,8 @@ export function transform( value: transformer.transform(parsed.value), }; }, - json: async (transformed, opts) => { - const parsed = await transformer.untransform(transformed); + json: (transformed, opts) => { + const parsed = transformer.untransform(transformed); return schema.json(parsed, opts); }, getType: () => schema.getType(), diff --git a/sdks/full/typescript/src/core/schemas/builders/set/set.ts b/sdks/full/typescript/src/core/schemas/builders/set/set.ts index 3113bcba30..e9e6bb7e53 100644 --- a/sdks/full/typescript/src/core/schemas/builders/set/set.ts +++ b/sdks/full/typescript/src/core/schemas/builders/set/set.ts @@ -7,8 +7,8 @@ import { getSchemaUtils } from "../schema-utils"; export function set(schema: Schema): Schema> { const listSchema = list(schema); const baseSchema: BaseSchema> = { - parse: async (raw, opts) => { - const parsedList = await listSchema.parse(raw, opts); + parse: (raw, opts) => { + const parsedList = listSchema.parse(raw, opts); if (parsedList.ok) { return { ok: true, @@ -18,7 +18,7 @@ export function set(schema: Schema): Schema { + json: (parsed, opts) => { if (!(parsed instanceof Set)) { return { ok: false, @@ -30,7 +30,7 @@ export function set(schema: Schema): Schema SchemaType.SET, diff --git a/sdks/full/typescript/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts b/sdks/full/typescript/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts index 771dc6a7ef..21ed3df0f4 100644 --- a/sdks/full/typescript/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts +++ b/sdks/full/typescript/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts @@ -1,5 +1,4 @@ import { BaseSchema, MaybeValid, Schema, SchemaOptions, SchemaType, ValidationError } from "../../Schema"; -import { MaybePromise } from "../../utils/MaybePromise"; import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; import { getSchemaUtils } from "../schema-utils"; import { inferParsedUnidiscriminatedUnionSchema, inferRawUnidiscriminatedUnionSchema } from "./types"; @@ -11,14 +10,14 @@ export function undiscriminatedUnion, ...Schem inferRawUnidiscriminatedUnionSchema, inferParsedUnidiscriminatedUnionSchema > = { - parse: async (raw, opts) => { + parse: (raw, opts) => { return validateAndTransformUndiscriminatedUnion>( (schema, opts) => schema.parse(raw, opts), schemas, opts ); }, - json: async (parsed, opts) => { + json: (parsed, opts) => { return validateAndTransformUndiscriminatedUnion>( (schema, opts) => schema.json(parsed, opts), schemas, @@ -34,14 +33,14 @@ export function undiscriminatedUnion, ...Schem }; } -async function validateAndTransformUndiscriminatedUnion( - transform: (schema: Schema, opts: SchemaOptions) => MaybePromise>, +function validateAndTransformUndiscriminatedUnion( + transform: (schema: Schema, opts: SchemaOptions) => MaybeValid, schemas: Schema[], opts: SchemaOptions | undefined -): Promise> { +): MaybeValid { const errors: ValidationError[] = []; for (const [index, schema] of schemas.entries()) { - const transformed = await transform(schema, { ...opts, skipValidation: false }); + const transformed = transform(schema, { ...opts, skipValidation: false }); if (transformed.ok) { return transformed; } else { diff --git a/sdks/full/typescript/src/core/schemas/builders/union/union.ts b/sdks/full/typescript/src/core/schemas/builders/union/union.ts index ed659beb62..ab61475a57 100644 --- a/sdks/full/typescript/src/core/schemas/builders/union/union.ts +++ b/sdks/full/typescript/src/core/schemas/builders/union/union.ts @@ -2,7 +2,6 @@ import { BaseSchema, MaybeValid, SchemaType } from "../../Schema"; import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; import { isPlainObject } from "../../utils/isPlainObject"; import { keys } from "../../utils/keys"; -import { MaybePromise } from "../../utils/MaybePromise"; import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; import { enum_ } from "../enum"; import { ObjectSchema } from "../object"; @@ -25,7 +24,7 @@ export function union, U extends Union const discriminantValueSchema = enum_(keys(union) as string[]); const baseSchema: BaseSchema, inferParsedUnion> = { - parse: async (raw, opts) => { + parse: (raw, opts) => { return transformAndValidateUnion({ value: raw, discriminant: rawDiscriminant, @@ -42,7 +41,7 @@ export function union, U extends Union breadcrumbsPrefix: opts?.breadcrumbsPrefix, }); }, - json: async (parsed, opts) => { + json: (parsed, opts) => { return transformAndValidateUnion({ value: parsed, discriminant: parsedDiscriminant, @@ -69,7 +68,7 @@ export function union, U extends Union }; } -async function transformAndValidateUnion< +function transformAndValidateUnion< TransformedDiscriminant extends string, TransformedDiscriminantValue extends string, TransformedAdditionalProperties @@ -86,17 +85,15 @@ async function transformAndValidateUnion< value: unknown; discriminant: string; transformedDiscriminant: TransformedDiscriminant; - transformDiscriminantValue: (discriminantValue: unknown) => MaybePromise>; + transformDiscriminantValue: (discriminantValue: unknown) => MaybeValid; getAdditionalPropertiesSchema: (discriminantValue: string) => ObjectSchema | undefined; allowUnrecognizedUnionMembers: boolean | undefined; transformAdditionalProperties: ( additionalProperties: unknown, additionalPropertiesSchema: ObjectSchema - ) => MaybePromise>; + ) => MaybeValid; breadcrumbsPrefix: string[] | undefined; -}): Promise< - MaybeValid & TransformedAdditionalProperties> -> { +}): MaybeValid & TransformedAdditionalProperties> { if (!isPlainObject(value)) { return { ok: false, @@ -123,7 +120,7 @@ async function transformAndValidateUnion< }; } - const transformedDiscriminantValue = await transformDiscriminantValue(discriminantValue); + const transformedDiscriminantValue = transformDiscriminantValue(discriminantValue); if (!transformedDiscriminantValue.ok) { return { ok: false, @@ -155,7 +152,7 @@ async function transformAndValidateUnion< } } - const transformedAdditionalProperties = await transformAdditionalProperties( + const transformedAdditionalProperties = transformAdditionalProperties( additionalProperties, additionalPropertiesSchema ); diff --git a/sdks/full/typescript/src/core/schemas/utils/maybeSkipValidation.ts b/sdks/full/typescript/src/core/schemas/utils/maybeSkipValidation.ts index 99c02c32bd..86c07abf2b 100644 --- a/sdks/full/typescript/src/core/schemas/utils/maybeSkipValidation.ts +++ b/sdks/full/typescript/src/core/schemas/utils/maybeSkipValidation.ts @@ -1,5 +1,4 @@ import { BaseSchema, MaybeValid, SchemaOptions } from "../Schema"; -import { MaybePromise } from "./MaybePromise"; export function maybeSkipValidation, Raw, Parsed>(schema: S): S { return { @@ -10,10 +9,10 @@ export function maybeSkipValidation, Raw, Pars } function transformAndMaybeSkipValidation( - transform: (value: unknown, opts?: SchemaOptions) => MaybePromise> -): (value: unknown, opts?: SchemaOptions) => MaybePromise> { - return async (value, opts): Promise> => { - const transformed = await transform(value, opts); + transform: (value: unknown, opts?: SchemaOptions) => MaybeValid +): (value: unknown, opts?: SchemaOptions) => MaybeValid { + return (value, opts): MaybeValid => { + const transformed = transform(value, opts); const { skipValidation = false } = opts ?? {}; if (!transformed.ok && skipValidation) { // eslint-disable-next-line no-console diff --git a/sdks/full/typescript/src/index.ts b/sdks/full/typescript/src/index.ts index 2dae0b8f99..9e457779dd 100644 --- a/sdks/full/typescript/src/index.ts +++ b/sdks/full/typescript/src/index.ts @@ -2,7 +2,3 @@ export * as Rivet from "./api"; export { RivetClient } from "./Client"; export { RivetEnvironment } from "./environments"; export { RivetError, RivetTimeoutError } from "./errors"; -export * as core from "./core"; -export * as apiResponse from "./core/fetcher/APIResponse"; -export * as fetcher from "./core/fetcher"; -export * as serialization from "./serialization"; diff --git a/sdks/full/typescript/src/serialization/resources/admin/types/LoginRequest.ts b/sdks/full/typescript/src/serialization/resources/admin/types/LoginRequest.ts index 04a1895c07..ac067c96ee 100644 --- a/sdks/full/typescript/src/serialization/resources/admin/types/LoginRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/admin/types/LoginRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const LoginRequest: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/admin/types/LoginResponse.ts b/sdks/full/typescript/src/serialization/resources/admin/types/LoginResponse.ts index 57b99f2a7e..71eb49ae02 100644 --- a/sdks/full/typescript/src/serialization/resources/admin/types/LoginResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/admin/types/LoginResponse.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const LoginResponse: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/auth/resources/common/types/CompleteStatus.ts b/sdks/full/typescript/src/serialization/resources/auth/resources/common/types/CompleteStatus.ts index 368aa88318..0249a36603 100644 --- a/sdks/full/typescript/src/serialization/resources/auth/resources/common/types/CompleteStatus.ts +++ b/sdks/full/typescript/src/serialization/resources/auth/resources/common/types/CompleteStatus.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const CompleteStatus: core.serialization.Schema = diff --git a/sdks/full/typescript/src/serialization/resources/auth/resources/identity/resources/accessToken/types/CompleteAccessTokenVerificationRequest.ts b/sdks/full/typescript/src/serialization/resources/auth/resources/identity/resources/accessToken/types/CompleteAccessTokenVerificationRequest.ts index a04542ca6e..eedef8a067 100644 --- a/sdks/full/typescript/src/serialization/resources/auth/resources/identity/resources/accessToken/types/CompleteAccessTokenVerificationRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/auth/resources/identity/resources/accessToken/types/CompleteAccessTokenVerificationRequest.ts @@ -2,22 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { Jwt as common$$jwt } from "../../../../../../common/types/Jwt"; +import { common } from "../../../../../../index"; export const CompleteAccessTokenVerificationRequest: core.serialization.ObjectSchema< serializers.auth.identity.CompleteAccessTokenVerificationRequest.Raw, Rivet.auth.identity.CompleteAccessTokenVerificationRequest > = core.serialization.object({ - accessToken: core.serialization.property( - "access_token", - core.serialization.lazy(async () => (await import("../../../../../../..")).Jwt) - ), + accessToken: core.serialization.property("access_token", common$$jwt), }); export declare namespace CompleteAccessTokenVerificationRequest { interface Raw { - access_token: serializers.Jwt.Raw; + access_token: common.Jwt.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/auth/resources/identity/resources/email/types/CompleteEmailVerificationRequest.ts b/sdks/full/typescript/src/serialization/resources/auth/resources/identity/resources/email/types/CompleteEmailVerificationRequest.ts index 3b627285f2..537c27a57d 100644 --- a/sdks/full/typescript/src/serialization/resources/auth/resources/identity/resources/email/types/CompleteEmailVerificationRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/auth/resources/identity/resources/email/types/CompleteEmailVerificationRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export const CompleteEmailVerificationRequest: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/auth/resources/identity/resources/email/types/CompleteEmailVerificationResponse.ts b/sdks/full/typescript/src/serialization/resources/auth/resources/identity/resources/email/types/CompleteEmailVerificationResponse.ts index 7db894ccf5..18b26b8035 100644 --- a/sdks/full/typescript/src/serialization/resources/auth/resources/identity/resources/email/types/CompleteEmailVerificationResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/auth/resources/identity/resources/email/types/CompleteEmailVerificationResponse.ts @@ -2,19 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { CompleteStatus as auth_common$$completeStatus } from "../../../../common/types/CompleteStatus"; +import { auth } from "../../../../../../index"; export const CompleteEmailVerificationResponse: core.serialization.ObjectSchema< serializers.auth.identity.CompleteEmailVerificationResponse.Raw, Rivet.auth.identity.CompleteEmailVerificationResponse > = core.serialization.object({ - status: core.serialization.lazy(async () => (await import("../../../../../../..")).auth.CompleteStatus), + status: auth_common$$completeStatus, }); export declare namespace CompleteEmailVerificationResponse { interface Raw { - status: serializers.auth.CompleteStatus.Raw; + status: auth.CompleteStatus.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/auth/resources/identity/resources/email/types/StartEmailVerificationRequest.ts b/sdks/full/typescript/src/serialization/resources/auth/resources/identity/resources/email/types/StartEmailVerificationRequest.ts index 1d0a567653..1512e69c27 100644 --- a/sdks/full/typescript/src/serialization/resources/auth/resources/identity/resources/email/types/StartEmailVerificationRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/auth/resources/identity/resources/email/types/StartEmailVerificationRequest.ts @@ -2,25 +2,25 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { Config as captcha_config$$config } from "../../../../../../captcha/resources/config/types/Config"; +import { captcha } from "../../../../../../index"; export const StartEmailVerificationRequest: core.serialization.ObjectSchema< serializers.auth.identity.StartEmailVerificationRequest.Raw, Rivet.auth.identity.StartEmailVerificationRequest > = core.serialization.object({ email: core.serialization.string(), - captcha: core.serialization - .lazyObject(async () => (await import("../../../../../../..")).captcha.Config) - .optional(), + captcha: captcha_config$$config.optional(), gameId: core.serialization.property("game_id", core.serialization.string().optional()), }); export declare namespace StartEmailVerificationRequest { interface Raw { email: string; - captcha?: serializers.captcha.Config.Raw | null; + captcha?: captcha.Config.Raw | null; game_id?: string | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/auth/resources/identity/resources/email/types/StartEmailVerificationResponse.ts b/sdks/full/typescript/src/serialization/resources/auth/resources/identity/resources/email/types/StartEmailVerificationResponse.ts index 07d830c02c..6dd6aa9c64 100644 --- a/sdks/full/typescript/src/serialization/resources/auth/resources/identity/resources/email/types/StartEmailVerificationResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/auth/resources/identity/resources/email/types/StartEmailVerificationResponse.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export const StartEmailVerificationResponse: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/auth/resources/tokens/types/RefreshIdentityTokenRequest.ts b/sdks/full/typescript/src/serialization/resources/auth/resources/tokens/types/RefreshIdentityTokenRequest.ts index 376de3b735..6462e1e4e0 100644 --- a/sdks/full/typescript/src/serialization/resources/auth/resources/tokens/types/RefreshIdentityTokenRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/auth/resources/tokens/types/RefreshIdentityTokenRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const RefreshIdentityTokenRequest: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/auth/resources/tokens/types/RefreshIdentityTokenResponse.ts b/sdks/full/typescript/src/serialization/resources/auth/resources/tokens/types/RefreshIdentityTokenResponse.ts index 8745c81ceb..b365c53508 100644 --- a/sdks/full/typescript/src/serialization/resources/auth/resources/tokens/types/RefreshIdentityTokenResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/auth/resources/tokens/types/RefreshIdentityTokenResponse.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const RefreshIdentityTokenResponse: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/captcha/resources/config/types/Config.ts b/sdks/full/typescript/src/serialization/resources/captcha/resources/config/types/Config.ts index 8497e68361..1305d71bf1 100644 --- a/sdks/full/typescript/src/serialization/resources/captcha/resources/config/types/Config.ts +++ b/sdks/full/typescript/src/serialization/resources/captcha/resources/config/types/Config.ts @@ -2,23 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { ConfigHcaptcha as captcha_config$$configHcaptcha } from "./ConfigHcaptcha"; +import { ConfigTurnstile as captcha_config$$configTurnstile } from "./ConfigTurnstile"; +import { captcha } from "../../../../index"; export const Config: core.serialization.ObjectSchema = core.serialization.object({ - hcaptcha: core.serialization - .lazyObject(async () => (await import("../../../../..")).captcha.ConfigHcaptcha) - .optional(), - turnstile: core.serialization - .lazyObject(async () => (await import("../../../../..")).captcha.ConfigTurnstile) - .optional(), + hcaptcha: captcha_config$$configHcaptcha.optional(), + turnstile: captcha_config$$configTurnstile.optional(), }); export declare namespace Config { interface Raw { - hcaptcha?: serializers.captcha.ConfigHcaptcha.Raw | null; - turnstile?: serializers.captcha.ConfigTurnstile.Raw | null; + hcaptcha?: captcha.ConfigHcaptcha.Raw | null; + turnstile?: captcha.ConfigTurnstile.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/captcha/resources/config/types/ConfigHcaptcha.ts b/sdks/full/typescript/src/serialization/resources/captcha/resources/config/types/ConfigHcaptcha.ts index 7c60ba5bfa..9f82e146f6 100644 --- a/sdks/full/typescript/src/serialization/resources/captcha/resources/config/types/ConfigHcaptcha.ts +++ b/sdks/full/typescript/src/serialization/resources/captcha/resources/config/types/ConfigHcaptcha.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const ConfigHcaptcha: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/captcha/resources/config/types/ConfigTurnstile.ts b/sdks/full/typescript/src/serialization/resources/captcha/resources/config/types/ConfigTurnstile.ts index b7614ac985..fdb270007e 100644 --- a/sdks/full/typescript/src/serialization/resources/captcha/resources/config/types/ConfigTurnstile.ts +++ b/sdks/full/typescript/src/serialization/resources/captcha/resources/config/types/ConfigTurnstile.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const ConfigTurnstile: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/auth/types/InspectResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/auth/types/InspectResponse.ts index 88819b5b4b..78d5e8507e 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/auth/types/InspectResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/auth/types/InspectResponse.ts @@ -2,19 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { AuthAgent as cloud_common$$authAgent } from "../../common/types/AuthAgent"; +import { cloud } from "../../../../index"; export const InspectResponse: core.serialization.ObjectSchema< serializers.cloud.InspectResponse.Raw, Rivet.cloud.InspectResponse > = core.serialization.object({ - agent: core.serialization.lazyObject(async () => (await import("../../../../..")).cloud.AuthAgent), + agent: cloud_common$$authAgent, }); export declare namespace InspectResponse { interface Raw { - agent: serializers.cloud.AuthAgent.Raw; + agent: cloud.AuthAgent.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/AuthAgent.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/AuthAgent.ts index 9583551fac..682808aa8c 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/AuthAgent.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/AuthAgent.ts @@ -2,26 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { AuthAgentIdentity as cloud_common$$authAgentIdentity } from "./AuthAgentIdentity"; +import { AuthAgentGameCloud as cloud_common$$authAgentGameCloud } from "./AuthAgentGameCloud"; +import { cloud } from "../../../../index"; export const AuthAgent: core.serialization.ObjectSchema = core.serialization.object({ - identity: core.serialization - .lazyObject(async () => (await import("../../../../..")).cloud.AuthAgentIdentity) - .optional(), - gameCloud: core.serialization.property( - "game_cloud", - core.serialization - .lazyObject(async () => (await import("../../../../..")).cloud.AuthAgentGameCloud) - .optional() - ), + identity: cloud_common$$authAgentIdentity.optional(), + gameCloud: core.serialization.property("game_cloud", cloud_common$$authAgentGameCloud.optional()), }); export declare namespace AuthAgent { interface Raw { - identity?: serializers.cloud.AuthAgentIdentity.Raw | null; - game_cloud?: serializers.cloud.AuthAgentGameCloud.Raw | null; + identity?: cloud.AuthAgentIdentity.Raw | null; + game_cloud?: cloud.AuthAgentGameCloud.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/AuthAgentGameCloud.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/AuthAgentGameCloud.ts index 897ee731da..a31309587d 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/AuthAgentGameCloud.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/AuthAgentGameCloud.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const AuthAgentGameCloud: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/AuthAgentIdentity.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/AuthAgentIdentity.ts index 51d2a34408..6139cb78ed 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/AuthAgentIdentity.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/AuthAgentIdentity.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const AuthAgentIdentity: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/BuildSummary.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/BuildSummary.ts index 72baca0b6e..0c18b5a6a6 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/BuildSummary.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/BuildSummary.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { Timestamp as common$$timestamp } from "../../../../common/types/Timestamp"; +import { common } from "../../../../index"; export const BuildSummary: core.serialization.ObjectSchema< serializers.cloud.BuildSummary.Raw, @@ -12,14 +15,8 @@ export const BuildSummary: core.serialization.ObjectSchema< > = core.serialization.object({ buildId: core.serialization.property("build_id", core.serialization.string()), uploadId: core.serialization.property("upload_id", core.serialization.string()), - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), - createTs: core.serialization.property( - "create_ts", - core.serialization.lazy(async () => (await import("../../../../..")).Timestamp) - ), + displayName: core.serialization.property("display_name", common$$displayName), + createTs: core.serialization.property("create_ts", common$$timestamp), contentLength: core.serialization.property("content_length", core.serialization.number()), complete: core.serialization.boolean(), tags: core.serialization.record(core.serialization.string(), core.serialization.string()), @@ -29,8 +26,8 @@ export declare namespace BuildSummary { interface Raw { build_id: string; upload_id: string; - display_name: serializers.DisplayName.Raw; - create_ts: serializers.Timestamp.Raw; + display_name: common.DisplayName.Raw; + create_ts: common.Timestamp.Raw; content_length: number; complete: boolean; tags: Record; diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnAuthType.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnAuthType.ts index 2bcd88fae1..f0e398440c 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnAuthType.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnAuthType.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const CdnAuthType: core.serialization.Schema = diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnNamespaceAuthUser.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnNamespaceAuthUser.ts index 0637e8398d..ed610b4d44 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnNamespaceAuthUser.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnNamespaceAuthUser.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const CdnNamespaceAuthUser: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnNamespaceConfig.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnNamespaceConfig.ts index cde92d87a2..de31680fb3 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnNamespaceConfig.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnNamespaceConfig.ts @@ -2,35 +2,32 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { CdnNamespaceDomain as cloud_common$$cdnNamespaceDomain } from "./CdnNamespaceDomain"; +import { CdnAuthType as cloud_common$$cdnAuthType } from "./CdnAuthType"; +import { CdnNamespaceAuthUser as cloud_common$$cdnNamespaceAuthUser } from "./CdnNamespaceAuthUser"; +import { cloud } from "../../../../index"; export const CdnNamespaceConfig: core.serialization.ObjectSchema< serializers.cloud.CdnNamespaceConfig.Raw, Rivet.cloud.CdnNamespaceConfig > = core.serialization.object({ enableDomainPublicAuth: core.serialization.property("enable_domain_public_auth", core.serialization.boolean()), - domains: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).cloud.CdnNamespaceDomain) - ), - authType: core.serialization.property( - "auth_type", - core.serialization.lazy(async () => (await import("../../../../..")).cloud.CdnAuthType) - ), + domains: core.serialization.list(cloud_common$$cdnNamespaceDomain), + authType: core.serialization.property("auth_type", cloud_common$$cdnAuthType), authUserList: core.serialization.property( "auth_user_list", - core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).cloud.CdnNamespaceAuthUser) - ) + core.serialization.list(cloud_common$$cdnNamespaceAuthUser) ), }); export declare namespace CdnNamespaceConfig { interface Raw { enable_domain_public_auth: boolean; - domains: serializers.cloud.CdnNamespaceDomain.Raw[]; - auth_type: serializers.cloud.CdnAuthType.Raw; - auth_user_list: serializers.cloud.CdnNamespaceAuthUser.Raw[]; + domains: cloud.CdnNamespaceDomain.Raw[]; + auth_type: cloud.CdnAuthType.Raw; + auth_user_list: cloud.CdnNamespaceAuthUser.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnNamespaceDomain.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnNamespaceDomain.ts index 0453b6bdb9..978236eb93 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnNamespaceDomain.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnNamespaceDomain.ts @@ -2,28 +2,27 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Timestamp as common$$timestamp } from "../../../../common/types/Timestamp"; +import { CdnNamespaceDomainVerificationStatus as cloud_common$$cdnNamespaceDomainVerificationStatus } from "./CdnNamespaceDomainVerificationStatus"; +import { CdnNamespaceDomainVerificationMethod as cloud_common$$cdnNamespaceDomainVerificationMethod } from "./CdnNamespaceDomainVerificationMethod"; +import { common, cloud } from "../../../../index"; export const CdnNamespaceDomain: core.serialization.ObjectSchema< serializers.cloud.CdnNamespaceDomain.Raw, Rivet.cloud.CdnNamespaceDomain > = core.serialization.object({ domain: core.serialization.string(), - createTs: core.serialization.property( - "create_ts", - core.serialization.lazy(async () => (await import("../../../../..")).Timestamp) - ), + createTs: core.serialization.property("create_ts", common$$timestamp), verificationStatus: core.serialization.property( "verification_status", - core.serialization.lazy(async () => (await import("../../../../..")).cloud.CdnNamespaceDomainVerificationStatus) + cloud_common$$cdnNamespaceDomainVerificationStatus ), verificationMethod: core.serialization.property( "verification_method", - core.serialization.lazyObject( - async () => (await import("../../../../..")).cloud.CdnNamespaceDomainVerificationMethod - ) + cloud_common$$cdnNamespaceDomainVerificationMethod ), verificationErrors: core.serialization.property( "verification_errors", @@ -34,9 +33,9 @@ export const CdnNamespaceDomain: core.serialization.ObjectSchema< export declare namespace CdnNamespaceDomain { interface Raw { domain: string; - create_ts: serializers.Timestamp.Raw; - verification_status: serializers.cloud.CdnNamespaceDomainVerificationStatus.Raw; - verification_method: serializers.cloud.CdnNamespaceDomainVerificationMethod.Raw; + create_ts: common.Timestamp.Raw; + verification_status: cloud.CdnNamespaceDomainVerificationStatus.Raw; + verification_method: cloud.CdnNamespaceDomainVerificationMethod.Raw; verification_errors: string[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationMethod.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationMethod.ts index f684ebfd43..8e6410d669 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationMethod.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationMethod.ts @@ -2,23 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { EmptyObject as common$$emptyObject } from "../../../../common/types/EmptyObject"; +import { CdnNamespaceDomainVerificationMethodHttp as cloud_common$$cdnNamespaceDomainVerificationMethodHttp } from "./CdnNamespaceDomainVerificationMethodHttp"; +import { common, cloud } from "../../../../index"; export const CdnNamespaceDomainVerificationMethod: core.serialization.ObjectSchema< serializers.cloud.CdnNamespaceDomainVerificationMethod.Raw, Rivet.cloud.CdnNamespaceDomainVerificationMethod > = core.serialization.object({ - invalid: core.serialization.lazyObject(async () => (await import("../../../../..")).EmptyObject).optional(), - http: core.serialization - .lazyObject(async () => (await import("../../../../..")).cloud.CdnNamespaceDomainVerificationMethodHttp) - .optional(), + invalid: common$$emptyObject.optional(), + http: cloud_common$$cdnNamespaceDomainVerificationMethodHttp.optional(), }); export declare namespace CdnNamespaceDomainVerificationMethod { interface Raw { - invalid?: serializers.EmptyObject.Raw | null; - http?: serializers.cloud.CdnNamespaceDomainVerificationMethodHttp.Raw | null; + invalid?: common.EmptyObject.Raw | null; + http?: cloud.CdnNamespaceDomainVerificationMethodHttp.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationMethodHttp.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationMethodHttp.ts index eb40e78e27..4cb9093c30 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationMethodHttp.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationMethodHttp.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const CdnNamespaceDomainVerificationMethodHttp: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationStatus.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationStatus.ts index 8856ceb22b..23f4cebe5c 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationStatus.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationStatus.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const CdnNamespaceDomainVerificationStatus: core.serialization.Schema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnSiteSummary.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnSiteSummary.ts index f40917a082..6ef6ffad70 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnSiteSummary.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CdnSiteSummary.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { Timestamp as common$$timestamp } from "../../../../common/types/Timestamp"; +import { common } from "../../../../index"; export const CdnSiteSummary: core.serialization.ObjectSchema< serializers.cloud.CdnSiteSummary.Raw, @@ -12,14 +15,8 @@ export const CdnSiteSummary: core.serialization.ObjectSchema< > = core.serialization.object({ siteId: core.serialization.property("site_id", core.serialization.string()), uploadId: core.serialization.property("upload_id", core.serialization.string()), - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), - createTs: core.serialization.property( - "create_ts", - core.serialization.lazy(async () => (await import("../../../../..")).Timestamp) - ), + displayName: core.serialization.property("display_name", common$$displayName), + createTs: core.serialization.property("create_ts", common$$timestamp), contentLength: core.serialization.property("content_length", core.serialization.number()), complete: core.serialization.boolean(), }); @@ -28,8 +25,8 @@ export declare namespace CdnSiteSummary { interface Raw { site_id: string; upload_id: string; - display_name: serializers.DisplayName.Raw; - create_ts: serializers.Timestamp.Raw; + display_name: common.DisplayName.Raw; + create_ts: common.Timestamp.Raw; content_length: number; complete: boolean; } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CustomAvatarSummary.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CustomAvatarSummary.ts index b82ed96b82..cd24328577 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CustomAvatarSummary.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/CustomAvatarSummary.ts @@ -2,23 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { Timestamp as common$$timestamp } from "../../../../common/types/Timestamp"; +import { common } from "../../../../index"; export const CustomAvatarSummary: core.serialization.ObjectSchema< serializers.cloud.CustomAvatarSummary.Raw, Rivet.cloud.CustomAvatarSummary > = core.serialization.object({ uploadId: core.serialization.property("upload_id", core.serialization.string()), - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), - createTs: core.serialization.property( - "create_ts", - core.serialization.lazy(async () => (await import("../../../../..")).Timestamp) - ), + displayName: core.serialization.property("display_name", common$$displayName), + createTs: core.serialization.property("create_ts", common$$timestamp), url: core.serialization.string().optional(), contentLength: core.serialization.property("content_length", core.serialization.number()), complete: core.serialization.boolean(), @@ -27,8 +24,8 @@ export const CustomAvatarSummary: core.serialization.ObjectSchema< export declare namespace CustomAvatarSummary { interface Raw { upload_id: string; - display_name: serializers.DisplayName.Raw; - create_ts: serializers.Timestamp.Raw; + display_name: common.DisplayName.Raw; + create_ts: common.Timestamp.Raw; url?: string | null; content_length: number; complete: boolean; diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/GameFull.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/GameFull.ts index 83ad52e4ea..5a89cfae9c 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/GameFull.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/GameFull.ts @@ -2,52 +2,46 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Timestamp as common$$timestamp } from "../../../../common/types/Timestamp"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { NamespaceSummary as cloud_common$$namespaceSummary } from "./NamespaceSummary"; +import { Summary as cloud_version$$summary } from "../../version/types/Summary"; +import { RegionSummary as cloud_common$$regionSummary } from "./RegionSummary"; +import { common, cloud } from "../../../../index"; export const GameFull: core.serialization.ObjectSchema = core.serialization.object({ gameId: core.serialization.property("game_id", core.serialization.string()), - createTs: core.serialization.property( - "create_ts", - core.serialization.lazy(async () => (await import("../../../../..")).Timestamp) - ), + createTs: core.serialization.property("create_ts", common$$timestamp), nameId: core.serialization.property("name_id", core.serialization.string()), - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), + displayName: core.serialization.property("display_name", common$$displayName), developerGroupId: core.serialization.property("developer_group_id", core.serialization.string()), totalPlayerCount: core.serialization.property("total_player_count", core.serialization.number()), logoUrl: core.serialization.property("logo_url", core.serialization.string().optional()), bannerUrl: core.serialization.property("banner_url", core.serialization.string().optional()), - namespaces: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).cloud.NamespaceSummary) - ), - versions: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).cloud.version.Summary) - ), + namespaces: core.serialization.list(cloud_common$$namespaceSummary), + versions: core.serialization.list(cloud_version$$summary), availableRegions: core.serialization.property( "available_regions", - core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).cloud.RegionSummary) - ) + core.serialization.list(cloud_common$$regionSummary) ), }); export declare namespace GameFull { interface Raw { game_id: string; - create_ts: serializers.Timestamp.Raw; + create_ts: common.Timestamp.Raw; name_id: string; - display_name: serializers.DisplayName.Raw; + display_name: common.DisplayName.Raw; developer_group_id: string; total_player_count: number; logo_url?: string | null; banner_url?: string | null; - namespaces: serializers.cloud.NamespaceSummary.Raw[]; - versions: serializers.cloud.version.Summary.Raw[]; - available_regions: serializers.cloud.RegionSummary.Raw[]; + namespaces: cloud.NamespaceSummary.Raw[]; + versions: cloud.version.Summary.Raw[]; + available_regions: cloud.RegionSummary.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/GameLobbyExpenses.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/GameLobbyExpenses.ts index e146383d1c..55e2de1231 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/GameLobbyExpenses.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/GameLobbyExpenses.ts @@ -2,27 +2,27 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Handle as game_common$$handle } from "../../../../game/resources/common/types/Handle"; +import { NamespaceSummary as cloud_common$$namespaceSummary } from "./NamespaceSummary"; +import { RegionTierExpenses as cloud_common$$regionTierExpenses } from "./RegionTierExpenses"; +import { game, cloud } from "../../../../index"; export const GameLobbyExpenses: core.serialization.ObjectSchema< serializers.cloud.GameLobbyExpenses.Raw, Rivet.cloud.GameLobbyExpenses > = core.serialization.object({ - game: core.serialization.lazyObject(async () => (await import("../../../../..")).game.Handle), - namespaces: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).cloud.NamespaceSummary) - ), - expenses: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).cloud.RegionTierExpenses) - ), + game: game_common$$handle, + namespaces: core.serialization.list(cloud_common$$namespaceSummary), + expenses: core.serialization.list(cloud_common$$regionTierExpenses), }); export declare namespace GameLobbyExpenses { interface Raw { - game: serializers.game.Handle.Raw; - namespaces: serializers.cloud.NamespaceSummary.Raw[]; - expenses: serializers.cloud.RegionTierExpenses.Raw[]; + game: game.Handle.Raw; + namespaces: cloud.NamespaceSummary.Raw[]; + expenses: cloud.RegionTierExpenses.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/GroupBankSource.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/GroupBankSource.ts index eb9605ce46..67c641841d 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/GroupBankSource.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/GroupBankSource.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const GroupBankSource: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/IdentityNamespaceConfig.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/IdentityNamespaceConfig.ts index fd0b9ff1a3..2ba619063e 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/IdentityNamespaceConfig.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/IdentityNamespaceConfig.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const IdentityNamespaceConfig: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/KvNamespaceConfig.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/KvNamespaceConfig.ts index 320fd81e54..06b476b7f1 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/KvNamespaceConfig.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/KvNamespaceConfig.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const KvNamespaceConfig: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/LobbySummaryAnalytics.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/LobbySummaryAnalytics.ts index f204f5005b..8ed4d75bdf 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/LobbySummaryAnalytics.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/LobbySummaryAnalytics.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Timestamp as common$$timestamp } from "../../../../common/types/Timestamp"; +import { common } from "../../../../index"; export const LobbySummaryAnalytics: core.serialization.ObjectSchema< serializers.cloud.LobbySummaryAnalytics.Raw, @@ -14,10 +16,7 @@ export const LobbySummaryAnalytics: core.serialization.ObjectSchema< lobbyGroupId: core.serialization.property("lobby_group_id", core.serialization.string()), lobbyGroupNameId: core.serialization.property("lobby_group_name_id", core.serialization.string()), regionId: core.serialization.property("region_id", core.serialization.string()), - createTs: core.serialization.property( - "create_ts", - core.serialization.lazy(async () => (await import("../../../../..")).Timestamp) - ), + createTs: core.serialization.property("create_ts", common$$timestamp), isReady: core.serialization.property("is_ready", core.serialization.boolean()), isIdle: core.serialization.property("is_idle", core.serialization.boolean()), isClosed: core.serialization.property("is_closed", core.serialization.boolean()), @@ -35,7 +34,7 @@ export declare namespace LobbySummaryAnalytics { lobby_group_id: string; lobby_group_name_id: string; region_id: string; - create_ts: serializers.Timestamp.Raw; + create_ts: common.Timestamp.Raw; is_ready: boolean; is_idle: boolean; is_closed: boolean; diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/LogsLobbyStatus.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/LogsLobbyStatus.ts index 6765211c23..24dd7fabff 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/LogsLobbyStatus.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/LogsLobbyStatus.ts @@ -2,23 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { EmptyObject as common$$emptyObject } from "../../../../common/types/EmptyObject"; +import { LogsLobbyStatusStopped as cloud_common$$logsLobbyStatusStopped } from "./LogsLobbyStatusStopped"; +import { common, cloud } from "../../../../index"; export const LogsLobbyStatus: core.serialization.ObjectSchema< serializers.cloud.LogsLobbyStatus.Raw, Rivet.cloud.LogsLobbyStatus > = core.serialization.object({ - running: core.serialization.lazyObject(async () => (await import("../../../../..")).EmptyObject), - stopped: core.serialization - .lazyObject(async () => (await import("../../../../..")).cloud.LogsLobbyStatusStopped) - .optional(), + running: common$$emptyObject, + stopped: cloud_common$$logsLobbyStatusStopped.optional(), }); export declare namespace LogsLobbyStatus { interface Raw { - running: serializers.EmptyObject.Raw; - stopped?: serializers.cloud.LogsLobbyStatusStopped.Raw | null; + running: common.EmptyObject.Raw; + stopped?: cloud.LogsLobbyStatusStopped.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/LogsLobbyStatusStopped.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/LogsLobbyStatusStopped.ts index 7580a406e0..e2b9abd52b 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/LogsLobbyStatusStopped.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/LogsLobbyStatusStopped.ts @@ -2,25 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Timestamp as common$$timestamp } from "../../../../common/types/Timestamp"; +import { common } from "../../../../index"; export const LogsLobbyStatusStopped: core.serialization.ObjectSchema< serializers.cloud.LogsLobbyStatusStopped.Raw, Rivet.cloud.LogsLobbyStatusStopped > = core.serialization.object({ - stopTs: core.serialization.property( - "stop_ts", - core.serialization.lazy(async () => (await import("../../../../..")).Timestamp) - ), + stopTs: core.serialization.property("stop_ts", common$$timestamp), failed: core.serialization.boolean(), exitCode: core.serialization.property("exit_code", core.serialization.number()), }); export declare namespace LogsLobbyStatusStopped { interface Raw { - stop_ts: serializers.Timestamp.Raw; + stop_ts: common.Timestamp.Raw; failed: boolean; exit_code: number; } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/LogsLobbySummary.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/LogsLobbySummary.ts index b5eea68abb..c7906b216d 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/LogsLobbySummary.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/LogsLobbySummary.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Timestamp as common$$timestamp } from "../../../../common/types/Timestamp"; +import { LogsLobbyStatus as cloud_common$$logsLobbyStatus } from "./LogsLobbyStatus"; +import { common, cloud } from "../../../../index"; export const LogsLobbySummary: core.serialization.ObjectSchema< serializers.cloud.LogsLobbySummary.Raw, @@ -14,19 +17,10 @@ export const LogsLobbySummary: core.serialization.ObjectSchema< namespaceId: core.serialization.property("namespace_id", core.serialization.string()), lobbyGroupNameId: core.serialization.property("lobby_group_name_id", core.serialization.string()), regionId: core.serialization.property("region_id", core.serialization.string()), - createTs: core.serialization.property( - "create_ts", - core.serialization.lazy(async () => (await import("../../../../..")).Timestamp) - ), - startTs: core.serialization.property( - "start_ts", - core.serialization.lazy(async () => (await import("../../../../..")).Timestamp).optional() - ), - readyTs: core.serialization.property( - "ready_ts", - core.serialization.lazy(async () => (await import("../../../../..")).Timestamp).optional() - ), - status: core.serialization.lazyObject(async () => (await import("../../../../..")).cloud.LogsLobbyStatus), + createTs: core.serialization.property("create_ts", common$$timestamp), + startTs: core.serialization.property("start_ts", common$$timestamp.optional()), + readyTs: core.serialization.property("ready_ts", common$$timestamp.optional()), + status: cloud_common$$logsLobbyStatus, }); export declare namespace LogsLobbySummary { @@ -35,9 +29,9 @@ export declare namespace LogsLobbySummary { namespace_id: string; lobby_group_name_id: string; region_id: string; - create_ts: serializers.Timestamp.Raw; - start_ts?: serializers.Timestamp.Raw | null; - ready_ts?: serializers.Timestamp.Raw | null; - status: serializers.cloud.LogsLobbyStatus.Raw; + create_ts: common.Timestamp.Raw; + start_ts?: common.Timestamp.Raw | null; + ready_ts?: common.Timestamp.Raw | null; + status: cloud.LogsLobbyStatus.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/LogsPerfMark.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/LogsPerfMark.ts index 16451e34eb..b43e354ed4 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/LogsPerfMark.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/LogsPerfMark.ts @@ -2,16 +2,18 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Timestamp as common$$timestamp } from "../../../../common/types/Timestamp"; +import { common } from "../../../../index"; export const LogsPerfMark: core.serialization.ObjectSchema< serializers.cloud.LogsPerfMark.Raw, Rivet.cloud.LogsPerfMark > = core.serialization.object({ label: core.serialization.string(), - ts: core.serialization.lazy(async () => (await import("../../../../..")).Timestamp), + ts: common$$timestamp, rayId: core.serialization.property("ray_id", core.serialization.string().optional()), reqId: core.serialization.property("req_id", core.serialization.string().optional()), }); @@ -19,7 +21,7 @@ export const LogsPerfMark: core.serialization.ObjectSchema< export declare namespace LogsPerfMark { interface Raw { label: string; - ts: serializers.Timestamp.Raw; + ts: common.Timestamp.Raw; ray_id?: string | null; req_id?: string | null; } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/LogsPerfSpan.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/LogsPerfSpan.ts index d23bfc65fb..29a0ef6cb1 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/LogsPerfSpan.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/LogsPerfSpan.ts @@ -2,31 +2,27 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Timestamp as common$$timestamp } from "../../../../common/types/Timestamp"; +import { common } from "../../../../index"; export const LogsPerfSpan: core.serialization.ObjectSchema< serializers.cloud.LogsPerfSpan.Raw, Rivet.cloud.LogsPerfSpan > = core.serialization.object({ label: core.serialization.string(), - startTs: core.serialization.property( - "start_ts", - core.serialization.lazy(async () => (await import("../../../../..")).Timestamp) - ), - finishTs: core.serialization.property( - "finish_ts", - core.serialization.lazy(async () => (await import("../../../../..")).Timestamp).optional() - ), + startTs: core.serialization.property("start_ts", common$$timestamp), + finishTs: core.serialization.property("finish_ts", common$$timestamp.optional()), reqId: core.serialization.property("req_id", core.serialization.string().optional()), }); export declare namespace LogsPerfSpan { interface Raw { label: string; - start_ts: serializers.Timestamp.Raw; - finish_ts?: serializers.Timestamp.Raw | null; + start_ts: common.Timestamp.Raw; + finish_ts?: common.Timestamp.Raw | null; req_id?: string | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/MatchmakerDevelopmentPort.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/MatchmakerDevelopmentPort.ts index 07d2d9613d..d14bc37164 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/MatchmakerDevelopmentPort.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/MatchmakerDevelopmentPort.ts @@ -2,30 +2,26 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { PortRange as cloud_version_matchmaker_common$$portRange } from "../../version/resources/matchmaker/resources/common/types/PortRange"; +import { PortProtocol as cloud_version_matchmaker_common$$portProtocol } from "../../version/resources/matchmaker/resources/common/types/PortProtocol"; +import { cloud } from "../../../../index"; export const MatchmakerDevelopmentPort: core.serialization.ObjectSchema< serializers.cloud.MatchmakerDevelopmentPort.Raw, Rivet.cloud.MatchmakerDevelopmentPort > = core.serialization.object({ port: core.serialization.number().optional(), - portRange: core.serialization.property( - "port_range", - core.serialization - .lazyObject(async () => (await import("../../../../..")).cloud.version.matchmaker.PortRange) - .optional() - ), - protocol: core.serialization.lazy( - async () => (await import("../../../../..")).cloud.version.matchmaker.PortProtocol - ), + portRange: core.serialization.property("port_range", cloud_version_matchmaker_common$$portRange.optional()), + protocol: cloud_version_matchmaker_common$$portProtocol, }); export declare namespace MatchmakerDevelopmentPort { interface Raw { port?: number | null; - port_range?: serializers.cloud.version.matchmaker.PortRange.Raw | null; - protocol: serializers.cloud.version.matchmaker.PortProtocol.Raw; + port_range?: cloud.version.matchmaker.PortRange.Raw | null; + protocol: cloud.version.matchmaker.PortProtocol.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/MatchmakerNamespaceConfig.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/MatchmakerNamespaceConfig.ts index fb533def2f..8cfd4139be 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/MatchmakerNamespaceConfig.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/MatchmakerNamespaceConfig.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const MatchmakerNamespaceConfig: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/NamespaceConfig.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/NamespaceConfig.ts index c7e3874126..ce7261a12c 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/NamespaceConfig.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/NamespaceConfig.ts @@ -2,27 +2,30 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { CdnNamespaceConfig as cloud_common$$cdnNamespaceConfig } from "./CdnNamespaceConfig"; +import { MatchmakerNamespaceConfig as cloud_common$$matchmakerNamespaceConfig } from "./MatchmakerNamespaceConfig"; +import { KvNamespaceConfig as cloud_common$$kvNamespaceConfig } from "./KvNamespaceConfig"; +import { IdentityNamespaceConfig as cloud_common$$identityNamespaceConfig } from "./IdentityNamespaceConfig"; +import { cloud } from "../../../../index"; export const NamespaceConfig: core.serialization.ObjectSchema< serializers.cloud.NamespaceConfig.Raw, Rivet.cloud.NamespaceConfig > = core.serialization.object({ - cdn: core.serialization.lazyObject(async () => (await import("../../../../..")).cloud.CdnNamespaceConfig), - matchmaker: core.serialization.lazyObject( - async () => (await import("../../../../..")).cloud.MatchmakerNamespaceConfig - ), - kv: core.serialization.lazyObject(async () => (await import("../../../../..")).cloud.KvNamespaceConfig), - identity: core.serialization.lazyObject(async () => (await import("../../../../..")).cloud.IdentityNamespaceConfig), + cdn: cloud_common$$cdnNamespaceConfig, + matchmaker: cloud_common$$matchmakerNamespaceConfig, + kv: cloud_common$$kvNamespaceConfig, + identity: cloud_common$$identityNamespaceConfig, }); export declare namespace NamespaceConfig { interface Raw { - cdn: serializers.cloud.CdnNamespaceConfig.Raw; - matchmaker: serializers.cloud.MatchmakerNamespaceConfig.Raw; - kv: serializers.cloud.KvNamespaceConfig.Raw; - identity: serializers.cloud.IdentityNamespaceConfig.Raw; + cdn: cloud.CdnNamespaceConfig.Raw; + matchmaker: cloud.MatchmakerNamespaceConfig.Raw; + kv: cloud.KvNamespaceConfig.Raw; + identity: cloud.IdentityNamespaceConfig.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/NamespaceFull.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/NamespaceFull.ts index 046098490b..f65a043ba2 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/NamespaceFull.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/NamespaceFull.ts @@ -2,35 +2,33 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Timestamp as common$$timestamp } from "../../../../common/types/Timestamp"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { NamespaceConfig as cloud_common$$namespaceConfig } from "./NamespaceConfig"; +import { common, cloud } from "../../../../index"; export const NamespaceFull: core.serialization.ObjectSchema< serializers.cloud.NamespaceFull.Raw, Rivet.cloud.NamespaceFull > = core.serialization.object({ namespaceId: core.serialization.property("namespace_id", core.serialization.string()), - createTs: core.serialization.property( - "create_ts", - core.serialization.lazy(async () => (await import("../../../../..")).Timestamp) - ), - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), + createTs: core.serialization.property("create_ts", common$$timestamp), + displayName: core.serialization.property("display_name", common$$displayName), versionId: core.serialization.property("version_id", core.serialization.string()), nameId: core.serialization.property("name_id", core.serialization.string()), - config: core.serialization.lazyObject(async () => (await import("../../../../..")).cloud.NamespaceConfig), + config: cloud_common$$namespaceConfig, }); export declare namespace NamespaceFull { interface Raw { namespace_id: string; - create_ts: serializers.Timestamp.Raw; - display_name: serializers.DisplayName.Raw; + create_ts: common.Timestamp.Raw; + display_name: common.DisplayName.Raw; version_id: string; name_id: string; - config: serializers.cloud.NamespaceConfig.Raw; + config: cloud.NamespaceConfig.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/NamespaceSummary.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/NamespaceSummary.ts index 99613cf9e5..25718f5041 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/NamespaceSummary.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/NamespaceSummary.ts @@ -2,23 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Timestamp as common$$timestamp } from "../../../../common/types/Timestamp"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { common } from "../../../../index"; export const NamespaceSummary: core.serialization.ObjectSchema< serializers.cloud.NamespaceSummary.Raw, Rivet.cloud.NamespaceSummary > = core.serialization.object({ namespaceId: core.serialization.property("namespace_id", core.serialization.string()), - createTs: core.serialization.property( - "create_ts", - core.serialization.lazy(async () => (await import("../../../../..")).Timestamp) - ), - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), + createTs: core.serialization.property("create_ts", common$$timestamp), + displayName: core.serialization.property("display_name", common$$displayName), versionId: core.serialization.property("version_id", core.serialization.string()), nameId: core.serialization.property("name_id", core.serialization.string()), }); @@ -26,8 +23,8 @@ export const NamespaceSummary: core.serialization.ObjectSchema< export declare namespace NamespaceSummary { interface Raw { namespace_id: string; - create_ts: serializers.Timestamp.Raw; - display_name: serializers.DisplayName.Raw; + create_ts: common.Timestamp.Raw; + display_name: common.DisplayName.Raw; version_id: string; name_id: string; } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/NamespaceVersion.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/NamespaceVersion.ts index c79f958093..5c4c891aab 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/NamespaceVersion.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/NamespaceVersion.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Timestamp as common$$timestamp } from "../../../../common/types/Timestamp"; +import { common } from "../../../../index"; export const NamespaceVersion: core.serialization.ObjectSchema< serializers.cloud.NamespaceVersion.Raw, @@ -12,16 +14,13 @@ export const NamespaceVersion: core.serialization.ObjectSchema< > = core.serialization.object({ namespaceId: core.serialization.property("namespace_id", core.serialization.string()), versionId: core.serialization.property("version_id", core.serialization.string()), - deployTs: core.serialization.property( - "deploy_ts", - core.serialization.lazy(async () => (await import("../../../../..")).Timestamp) - ), + deployTs: core.serialization.property("deploy_ts", common$$timestamp), }); export declare namespace NamespaceVersion { interface Raw { namespace_id: string; version_id: string; - deploy_ts: serializers.Timestamp.Raw; + deploy_ts: common.Timestamp.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/RegionSummary.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/RegionSummary.ts index 6c6f31c657..747dcc383b 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/RegionSummary.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/RegionSummary.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { UniversalRegion as cloud_common$$universalRegion } from "./UniversalRegion"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { cloud, common } from "../../../../index"; export const RegionSummary: core.serialization.ObjectSchema< serializers.cloud.RegionSummary.Raw, @@ -13,18 +16,9 @@ export const RegionSummary: core.serialization.ObjectSchema< regionId: core.serialization.property("region_id", core.serialization.string()), regionNameId: core.serialization.property("region_name_id", core.serialization.string()), provider: core.serialization.string(), - universalRegion: core.serialization.property( - "universal_region", - core.serialization.lazy(async () => (await import("../../../../..")).cloud.UniversalRegion) - ), - providerDisplayName: core.serialization.property( - "provider_display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), - regionDisplayName: core.serialization.property( - "region_display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), + universalRegion: core.serialization.property("universal_region", cloud_common$$universalRegion), + providerDisplayName: core.serialization.property("provider_display_name", common$$displayName), + regionDisplayName: core.serialization.property("region_display_name", common$$displayName), }); export declare namespace RegionSummary { @@ -32,8 +26,8 @@ export declare namespace RegionSummary { region_id: string; region_name_id: string; provider: string; - universal_region: serializers.cloud.UniversalRegion.Raw; - provider_display_name: serializers.DisplayName.Raw; - region_display_name: serializers.DisplayName.Raw; + universal_region: cloud.UniversalRegion.Raw; + provider_display_name: common.DisplayName.Raw; + region_display_name: common.DisplayName.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/RegionTier.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/RegionTier.ts index 909a973775..a81606ef3d 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/RegionTier.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/RegionTier.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const RegionTier: core.serialization.ObjectSchema = diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/RegionTierExpenses.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/RegionTierExpenses.ts index 5e311e580c..7fe89ebaa1 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/RegionTierExpenses.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/RegionTierExpenses.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const RegionTierExpenses: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/SvcMetrics.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/SvcMetrics.ts index 38106ef110..9938e6b2b4 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/SvcMetrics.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/SvcMetrics.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const SvcMetrics: core.serialization.ObjectSchema = diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/SvcPerf.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/SvcPerf.ts index a02877ff1a..0e0e565737 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/SvcPerf.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/SvcPerf.ts @@ -2,31 +2,31 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Timestamp as common$$timestamp } from "../../../../common/types/Timestamp"; +import { LogsPerfSpan as cloud_common$$logsPerfSpan } from "./LogsPerfSpan"; +import { LogsPerfMark as cloud_common$$logsPerfMark } from "./LogsPerfMark"; +import { common, cloud } from "../../../../index"; export const SvcPerf: core.serialization.ObjectSchema = core.serialization.object({ svcName: core.serialization.property("svc_name", core.serialization.string()), - ts: core.serialization.lazy(async () => (await import("../../../../..")).Timestamp), + ts: common$$timestamp, duration: core.serialization.number(), reqId: core.serialization.property("req_id", core.serialization.string().optional()), - spans: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).cloud.LogsPerfSpan) - ), - marks: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).cloud.LogsPerfMark) - ), + spans: core.serialization.list(cloud_common$$logsPerfSpan), + marks: core.serialization.list(cloud_common$$logsPerfMark), }); export declare namespace SvcPerf { interface Raw { svc_name: string; - ts: serializers.Timestamp.Raw; + ts: common.Timestamp.Raw; duration: number; req_id?: string | null; - spans: serializers.cloud.LogsPerfSpan.Raw[]; - marks: serializers.cloud.LogsPerfMark.Raw[]; + spans: cloud.LogsPerfSpan.Raw[]; + marks: cloud.LogsPerfMark.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/UniversalRegion.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/UniversalRegion.ts index 634380dbc5..e6defd3c38 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/UniversalRegion.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/common/types/UniversalRegion.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const UniversalRegion: core.serialization.Schema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/devices/resources/links/types/CompleteDeviceLinkRequest.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/devices/resources/links/types/CompleteDeviceLinkRequest.ts index 64f8a6e64c..0bbf1b9526 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/devices/resources/links/types/CompleteDeviceLinkRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/devices/resources/links/types/CompleteDeviceLinkRequest.ts @@ -2,24 +2,23 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { Jwt as common$$jwt } from "../../../../../../common/types/Jwt"; +import { common } from "../../../../../../index"; export const CompleteDeviceLinkRequest: core.serialization.ObjectSchema< serializers.cloud.devices.CompleteDeviceLinkRequest.Raw, Rivet.cloud.devices.CompleteDeviceLinkRequest > = core.serialization.object({ - deviceLinkToken: core.serialization.property( - "device_link_token", - core.serialization.lazy(async () => (await import("../../../../../../..")).Jwt) - ), + deviceLinkToken: core.serialization.property("device_link_token", common$$jwt), gameId: core.serialization.property("game_id", core.serialization.string()), }); export declare namespace CompleteDeviceLinkRequest { interface Raw { - device_link_token: serializers.Jwt.Raw; + device_link_token: common.Jwt.Raw; game_id: string; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/devices/resources/links/types/GetDeviceLinkResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/devices/resources/links/types/GetDeviceLinkResponse.ts index bd3e1b4992..fa97327a19 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/devices/resources/links/types/GetDeviceLinkResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/devices/resources/links/types/GetDeviceLinkResponse.ts @@ -2,21 +2,23 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { WatchResponse as common$$watchResponse } from "../../../../../../common/types/WatchResponse"; +import { common } from "../../../../../../index"; export const GetDeviceLinkResponse: core.serialization.ObjectSchema< serializers.cloud.devices.GetDeviceLinkResponse.Raw, Rivet.cloud.devices.GetDeviceLinkResponse > = core.serialization.object({ cloudToken: core.serialization.property("cloud_token", core.serialization.string().optional()), - watch: core.serialization.lazyObject(async () => (await import("../../../../../../..")).WatchResponse), + watch: common$$watchResponse, }); export declare namespace GetDeviceLinkResponse { interface Raw { cloud_token?: string | null; - watch: serializers.WatchResponse.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/devices/resources/links/types/PrepareDeviceLinkResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/devices/resources/links/types/PrepareDeviceLinkResponse.ts index e0604c8f20..404f1f539c 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/devices/resources/links/types/PrepareDeviceLinkResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/devices/resources/links/types/PrepareDeviceLinkResponse.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export const PrepareDeviceLinkResponse: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/avatars/types/ListGameCustomAvatarsResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/avatars/types/ListGameCustomAvatarsResponse.ts index 5215efbc2b..90f8e4d027 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/avatars/types/ListGameCustomAvatarsResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/avatars/types/ListGameCustomAvatarsResponse.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { CustomAvatarSummary as cloud_common$$customAvatarSummary } from "../../../../common/types/CustomAvatarSummary"; +import { cloud } from "../../../../../../index"; export const ListGameCustomAvatarsResponse: core.serialization.ObjectSchema< serializers.cloud.games.ListGameCustomAvatarsResponse.Raw, @@ -12,14 +14,12 @@ export const ListGameCustomAvatarsResponse: core.serialization.ObjectSchema< > = core.serialization.object({ customAvatars: core.serialization.property( "custom_avatars", - core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../../../..")).cloud.CustomAvatarSummary) - ) + core.serialization.list(cloud_common$$customAvatarSummary) ), }); export declare namespace ListGameCustomAvatarsResponse { interface Raw { - custom_avatars: serializers.cloud.CustomAvatarSummary.Raw[]; + custom_avatars: cloud.CustomAvatarSummary.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/avatars/types/PrepareCustomAvatarUploadRequest.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/avatars/types/PrepareCustomAvatarUploadRequest.ts index c538058cae..90f8146c49 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/avatars/types/PrepareCustomAvatarUploadRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/avatars/types/PrepareCustomAvatarUploadRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export const PrepareCustomAvatarUploadRequest: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/avatars/types/PrepareCustomAvatarUploadResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/avatars/types/PrepareCustomAvatarUploadResponse.ts index 3a7cca512c..8e51598fab 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/avatars/types/PrepareCustomAvatarUploadResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/avatars/types/PrepareCustomAvatarUploadResponse.ts @@ -2,24 +2,23 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { PresignedRequest as upload_common$$presignedRequest } from "../../../../../../upload/resources/common/types/PresignedRequest"; +import { upload } from "../../../../../../index"; export const PrepareCustomAvatarUploadResponse: core.serialization.ObjectSchema< serializers.cloud.games.PrepareCustomAvatarUploadResponse.Raw, Rivet.cloud.games.PrepareCustomAvatarUploadResponse > = core.serialization.object({ uploadId: core.serialization.property("upload_id", core.serialization.string()), - presignedRequest: core.serialization.property( - "presigned_request", - core.serialization.lazyObject(async () => (await import("../../../../../../..")).upload.PresignedRequest) - ), + presignedRequest: core.serialization.property("presigned_request", upload_common$$presignedRequest), }); export declare namespace PrepareCustomAvatarUploadResponse { interface Raw { upload_id: string; - presigned_request: serializers.upload.PresignedRequest.Raw; + presigned_request: upload.PresignedRequest.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/builds/types/BuildCompression.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/builds/types/BuildCompression.ts index cd26857762..ffef0c73ad 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/builds/types/BuildCompression.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/builds/types/BuildCompression.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export const BuildCompression: core.serialization.Schema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/builds/types/BuildKind.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/builds/types/BuildKind.ts index 8fe35dac33..d6f05895c8 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/builds/types/BuildKind.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/builds/types/BuildKind.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export const BuildKind: core.serialization.Schema = diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/builds/types/CreateGameBuildRequest.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/builds/types/CreateGameBuildRequest.ts index 1bfa4b3c58..c23a4e7f54 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/builds/types/CreateGameBuildRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/builds/types/CreateGameBuildRequest.ts @@ -2,37 +2,34 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { DisplayName as common$$displayName } from "../../../../../../common/types/DisplayName"; +import { PrepareFile as upload_common$$prepareFile } from "../../../../../../upload/resources/common/types/PrepareFile"; +import { BuildKind as cloud_games_builds$$buildKind } from "./BuildKind"; +import { BuildCompression as cloud_games_builds$$buildCompression } from "./BuildCompression"; +import { common, upload, cloud } from "../../../../../../index"; export const CreateGameBuildRequest: core.serialization.ObjectSchema< serializers.cloud.games.CreateGameBuildRequest.Raw, Rivet.cloud.games.CreateGameBuildRequest > = core.serialization.object({ - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../../../..")).DisplayName) - ), + displayName: core.serialization.property("display_name", common$$displayName), imageTag: core.serialization.property("image_tag", core.serialization.string()), - imageFile: core.serialization.property( - "image_file", - core.serialization.lazyObject(async () => (await import("../../../../../../..")).upload.PrepareFile) - ), + imageFile: core.serialization.property("image_file", upload_common$$prepareFile), multipartUpload: core.serialization.property("multipart_upload", core.serialization.boolean().optional()), - kind: core.serialization.lazy(async () => (await import("../../../../../../..")).cloud.games.BuildKind).optional(), - compression: core.serialization - .lazy(async () => (await import("../../../../../../..")).cloud.games.BuildCompression) - .optional(), + kind: cloud_games_builds$$buildKind.optional(), + compression: cloud_games_builds$$buildCompression.optional(), }); export declare namespace CreateGameBuildRequest { interface Raw { - display_name: serializers.DisplayName.Raw; + display_name: common.DisplayName.Raw; image_tag: string; - image_file: serializers.upload.PrepareFile.Raw; + image_file: upload.PrepareFile.Raw; multipart_upload?: boolean | null; - kind?: serializers.cloud.games.BuildKind.Raw | null; - compression?: serializers.cloud.games.BuildCompression.Raw | null; + kind?: cloud.games.BuildKind.Raw | null; + compression?: cloud.games.BuildCompression.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/builds/types/CreateGameBuildResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/builds/types/CreateGameBuildResponse.ts index 99cb746dcc..837c4460d4 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/builds/types/CreateGameBuildResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/builds/types/CreateGameBuildResponse.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { PresignedRequest as upload_common$$presignedRequest } from "../../../../../../upload/resources/common/types/PresignedRequest"; +import { upload } from "../../../../../../index"; export const CreateGameBuildResponse: core.serialization.ObjectSchema< serializers.cloud.games.CreateGameBuildResponse.Raw, @@ -14,19 +16,11 @@ export const CreateGameBuildResponse: core.serialization.ObjectSchema< uploadId: core.serialization.property("upload_id", core.serialization.string()), imagePresignedRequest: core.serialization.property( "image_presigned_request", - core.serialization - .lazyObject(async () => (await import("../../../../../../..")).upload.PresignedRequest) - .optional() + upload_common$$presignedRequest.optional() ), imagePresignedRequests: core.serialization.property( "image_presigned_requests", - core.serialization - .list( - core.serialization.lazyObject( - async () => (await import("../../../../../../..")).upload.PresignedRequest - ) - ) - .optional() + core.serialization.list(upload_common$$presignedRequest).optional() ), }); @@ -34,7 +28,7 @@ export declare namespace CreateGameBuildResponse { interface Raw { build_id: string; upload_id: string; - image_presigned_request?: serializers.upload.PresignedRequest.Raw | null; - image_presigned_requests?: serializers.upload.PresignedRequest.Raw[] | null; + image_presigned_request?: upload.PresignedRequest.Raw | null; + image_presigned_requests?: upload.PresignedRequest.Raw[] | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/builds/types/ListGameBuildsResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/builds/types/ListGameBuildsResponse.ts index 97f852793b..540ea7991a 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/builds/types/ListGameBuildsResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/builds/types/ListGameBuildsResponse.ts @@ -2,21 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { BuildSummary as cloud_common$$buildSummary } from "../../../../common/types/BuildSummary"; +import { cloud } from "../../../../../../index"; export const ListGameBuildsResponse: core.serialization.ObjectSchema< serializers.cloud.games.ListGameBuildsResponse.Raw, Rivet.cloud.games.ListGameBuildsResponse > = core.serialization.object({ - builds: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../../../..")).cloud.BuildSummary) - ), + builds: core.serialization.list(cloud_common$$buildSummary), }); export declare namespace ListGameBuildsResponse { interface Raw { - builds: serializers.cloud.BuildSummary.Raw[]; + builds: cloud.BuildSummary.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteRequest.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteRequest.ts index 3c9bc38ed3..efe3ee7902 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteRequest.ts @@ -2,26 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { DisplayName as common$$displayName } from "../../../../../../common/types/DisplayName"; +import { PrepareFile as upload_common$$prepareFile } from "../../../../../../upload/resources/common/types/PrepareFile"; +import { common, upload } from "../../../../../../index"; export const CreateGameCdnSiteRequest: core.serialization.ObjectSchema< serializers.cloud.games.CreateGameCdnSiteRequest.Raw, Rivet.cloud.games.CreateGameCdnSiteRequest > = core.serialization.object({ - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../../../..")).DisplayName) - ), - files: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../../../..")).upload.PrepareFile) - ), + displayName: core.serialization.property("display_name", common$$displayName), + files: core.serialization.list(upload_common$$prepareFile), }); export declare namespace CreateGameCdnSiteRequest { interface Raw { - display_name: serializers.DisplayName.Raw; - files: serializers.upload.PrepareFile.Raw[]; + display_name: common.DisplayName.Raw; + files: upload.PrepareFile.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteResponse.ts index 4244297053..b53bab20b5 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteResponse.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { PresignedRequest as upload_common$$presignedRequest } from "../../../../../../upload/resources/common/types/PresignedRequest"; +import { upload } from "../../../../../../index"; export const CreateGameCdnSiteResponse: core.serialization.ObjectSchema< serializers.cloud.games.CreateGameCdnSiteResponse.Raw, @@ -14,9 +16,7 @@ export const CreateGameCdnSiteResponse: core.serialization.ObjectSchema< uploadId: core.serialization.property("upload_id", core.serialization.string()), presignedRequests: core.serialization.property( "presigned_requests", - core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../../../..")).upload.PresignedRequest) - ) + core.serialization.list(upload_common$$presignedRequest) ), }); @@ -24,6 +24,6 @@ export declare namespace CreateGameCdnSiteResponse { interface Raw { site_id: string; upload_id: string; - presigned_requests: serializers.upload.PresignedRequest.Raw[]; + presigned_requests: upload.PresignedRequest.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/cdn/types/ListGameCdnSitesResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/cdn/types/ListGameCdnSitesResponse.ts index 0ad87c0579..5536756e18 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/cdn/types/ListGameCdnSitesResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/cdn/types/ListGameCdnSitesResponse.ts @@ -2,21 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { CdnSiteSummary as cloud_common$$cdnSiteSummary } from "../../../../common/types/CdnSiteSummary"; +import { cloud } from "../../../../../../index"; export const ListGameCdnSitesResponse: core.serialization.ObjectSchema< serializers.cloud.games.ListGameCdnSitesResponse.Raw, Rivet.cloud.games.ListGameCdnSitesResponse > = core.serialization.object({ - sites: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../../../..")).cloud.CdnSiteSummary) - ), + sites: core.serialization.list(cloud_common$$cdnSiteSummary), }); export declare namespace ListGameCdnSitesResponse { interface Raw { - sites: serializers.cloud.CdnSiteSummary.Raw[]; + sites: cloud.CdnSiteSummary.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/DeleteMatchmakerLobbyResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/DeleteMatchmakerLobbyResponse.ts index ea3fa56f21..c45e1cc4a7 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/DeleteMatchmakerLobbyResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/DeleteMatchmakerLobbyResponse.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export const DeleteMatchmakerLobbyResponse: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportLobbyLogsRequest.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportLobbyLogsRequest.ts index fc5ace6df8..2fcddb4e3c 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportLobbyLogsRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportLobbyLogsRequest.ts @@ -2,19 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { LogStream as cloud_games_matchmaker$$logStream } from "./LogStream"; +import { cloud } from "../../../../../../index"; export const ExportLobbyLogsRequest: core.serialization.ObjectSchema< serializers.cloud.games.ExportLobbyLogsRequest.Raw, Rivet.cloud.games.ExportLobbyLogsRequest > = core.serialization.object({ - stream: core.serialization.lazy(async () => (await import("../../../../../../..")).cloud.games.LogStream), + stream: cloud_games_matchmaker$$logStream, }); export declare namespace ExportLobbyLogsRequest { interface Raw { - stream: serializers.cloud.games.LogStream.Raw; + stream: cloud.games.LogStream.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportLobbyLogsResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportLobbyLogsResponse.ts index 6126b77878..13b2f3ea4e 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportLobbyLogsResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportLobbyLogsResponse.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export const ExportLobbyLogsResponse: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportMatchmakerLobbyHistoryRequest.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportMatchmakerLobbyHistoryRequest.ts index ddf2059e71..f638b731a4 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportMatchmakerLobbyHistoryRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportMatchmakerLobbyHistoryRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export const ExportMatchmakerLobbyHistoryRequest: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportMatchmakerLobbyHistoryResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportMatchmakerLobbyHistoryResponse.ts index 8dfa74ef40..063e7bb4b8 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportMatchmakerLobbyHistoryResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportMatchmakerLobbyHistoryResponse.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export const ExportMatchmakerLobbyHistoryResponse: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/GetLobbyLogsResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/GetLobbyLogsResponse.ts index 291d2a0542..73d1b5d14d 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/GetLobbyLogsResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/GetLobbyLogsResponse.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { WatchResponse as common$$watchResponse } from "../../../../../../common/types/WatchResponse"; +import { common } from "../../../../../../index"; export const GetLobbyLogsResponse: core.serialization.ObjectSchema< serializers.cloud.games.GetLobbyLogsResponse.Raw, @@ -12,13 +14,13 @@ export const GetLobbyLogsResponse: core.serialization.ObjectSchema< > = core.serialization.object({ lines: core.serialization.list(core.serialization.string()), timestamps: core.serialization.list(core.serialization.string()), - watch: core.serialization.lazyObject(async () => (await import("../../../../../../..")).WatchResponse), + watch: common$$watchResponse, }); export declare namespace GetLobbyLogsResponse { interface Raw { lines: string[]; timestamps: string[]; - watch: serializers.WatchResponse.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/LogStream.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/LogStream.ts index c1b7bb1b31..720ddc3985 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/LogStream.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/matchmaker/types/LogStream.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export const LogStream: core.serialization.Schema = diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/resources/analytics/types/GetAnalyticsMatchmakerLiveResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/resources/analytics/types/GetAnalyticsMatchmakerLiveResponse.ts index bc5be2206a..01804ee2d2 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/resources/analytics/types/GetAnalyticsMatchmakerLiveResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/resources/analytics/types/GetAnalyticsMatchmakerLiveResponse.ts @@ -2,23 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { LobbySummaryAnalytics as cloud_common$$lobbySummaryAnalytics } from "../../../../../../common/types/LobbySummaryAnalytics"; +import { cloud } from "../../../../../../../../index"; export const GetAnalyticsMatchmakerLiveResponse: core.serialization.ObjectSchema< serializers.cloud.games.namespaces.GetAnalyticsMatchmakerLiveResponse.Raw, Rivet.cloud.games.namespaces.GetAnalyticsMatchmakerLiveResponse > = core.serialization.object({ - lobbies: core.serialization.list( - core.serialization.lazyObject( - async () => (await import("../../../../../../../../..")).cloud.LobbySummaryAnalytics - ) - ), + lobbies: core.serialization.list(cloud_common$$lobbySummaryAnalytics), }); export declare namespace GetAnalyticsMatchmakerLiveResponse { interface Raw { - lobbies: serializers.cloud.LobbySummaryAnalytics.Raw[]; + lobbies: cloud.LobbySummaryAnalytics.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/resources/logs/types/GetNamespaceLobbyResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/resources/logs/types/GetNamespaceLobbyResponse.ts index 8010e13911..84d77b2dd9 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/resources/logs/types/GetNamespaceLobbyResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/resources/logs/types/GetNamespaceLobbyResponse.ts @@ -2,20 +2,20 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { LogsLobbySummary as cloud_common$$logsLobbySummary } from "../../../../../../common/types/LogsLobbySummary"; +import { SvcMetrics as cloud_common$$svcMetrics } from "../../../../../../common/types/SvcMetrics"; +import { SvcPerf as cloud_common$$svcPerf } from "../../../../../../common/types/SvcPerf"; +import { cloud } from "../../../../../../../../index"; export const GetNamespaceLobbyResponse: core.serialization.ObjectSchema< serializers.cloud.games.namespaces.GetNamespaceLobbyResponse.Raw, Rivet.cloud.games.namespaces.GetNamespaceLobbyResponse > = core.serialization.object({ - lobby: core.serialization.lazyObject( - async () => (await import("../../../../../../../../..")).cloud.LogsLobbySummary - ), - metrics: core.serialization - .lazyObject(async () => (await import("../../../../../../../../..")).cloud.SvcMetrics) - .optional(), + lobby: cloud_common$$logsLobbySummary, + metrics: cloud_common$$svcMetrics.optional(), stdoutPresignedUrls: core.serialization.property( "stdout_presigned_urls", core.serialization.list(core.serialization.string()) @@ -24,20 +24,15 @@ export const GetNamespaceLobbyResponse: core.serialization.ObjectSchema< "stderr_presigned_urls", core.serialization.list(core.serialization.string()) ), - perfLists: core.serialization.property( - "perf_lists", - core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../../../../../..")).cloud.SvcPerf) - ) - ), + perfLists: core.serialization.property("perf_lists", core.serialization.list(cloud_common$$svcPerf)), }); export declare namespace GetNamespaceLobbyResponse { interface Raw { - lobby: serializers.cloud.LogsLobbySummary.Raw; - metrics?: serializers.cloud.SvcMetrics.Raw | null; + lobby: cloud.LogsLobbySummary.Raw; + metrics?: cloud.SvcMetrics.Raw | null; stdout_presigned_urls: string[]; stderr_presigned_urls: string[]; - perf_lists: serializers.cloud.SvcPerf.Raw[]; + perf_lists: cloud.SvcPerf.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/resources/logs/types/ListNamespaceLobbiesResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/resources/logs/types/ListNamespaceLobbiesResponse.ts index fe1376ea41..fc70c81b4a 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/resources/logs/types/ListNamespaceLobbiesResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/resources/logs/types/ListNamespaceLobbiesResponse.ts @@ -2,21 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { LogsLobbySummary as cloud_common$$logsLobbySummary } from "../../../../../../common/types/LogsLobbySummary"; +import { cloud } from "../../../../../../../../index"; export const ListNamespaceLobbiesResponse: core.serialization.ObjectSchema< serializers.cloud.games.namespaces.ListNamespaceLobbiesResponse.Raw, Rivet.cloud.games.namespaces.ListNamespaceLobbiesResponse > = core.serialization.object({ - lobbies: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../../../../../..")).cloud.LogsLobbySummary) - ), + lobbies: core.serialization.list(cloud_common$$logsLobbySummary), }); export declare namespace ListNamespaceLobbiesResponse { interface Raw { - lobbies: serializers.cloud.LogsLobbySummary.Raw[]; + lobbies: cloud.LogsLobbySummary.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/AddNamespaceDomainRequest.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/AddNamespaceDomainRequest.ts index 3a1d42b4dd..478afaa54a 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/AddNamespaceDomainRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/AddNamespaceDomainRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export const AddNamespaceDomainRequest: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceRequest.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceRequest.ts index f5d8c8b212..8932c16775 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceRequest.ts @@ -2,25 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { DisplayName as common$$displayName } from "../../../../../../common/types/DisplayName"; +import { common } from "../../../../../../index"; export const CreateGameNamespaceRequest: core.serialization.ObjectSchema< serializers.cloud.games.namespaces.CreateGameNamespaceRequest.Raw, Rivet.cloud.games.namespaces.CreateGameNamespaceRequest > = core.serialization.object({ - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../../../..")).DisplayName) - ), + displayName: core.serialization.property("display_name", common$$displayName), versionId: core.serialization.property("version_id", core.serialization.string()), nameId: core.serialization.property("name_id", core.serialization.string()), }); export declare namespace CreateGameNamespaceRequest { interface Raw { - display_name: serializers.DisplayName.Raw; + display_name: common.DisplayName.Raw; version_id: string; name_id: string; } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceResponse.ts index b18dd161d0..2d7e9d033c 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceResponse.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export const CreateGameNamespaceResponse: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenDevelopmentRequest.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenDevelopmentRequest.ts index 521bd7ef91..3efe94e8b3 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenDevelopmentRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenDevelopmentRequest.ts @@ -2,40 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { MatchmakerDevelopmentPort as cloud_common$$matchmakerDevelopmentPort } from "../../../../common/types/MatchmakerDevelopmentPort"; +import { LobbyGroupRuntimeDockerPort as cloud_version_matchmaker_lobby_group$$lobbyGroupRuntimeDockerPort } from "../../../../version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDockerPort"; +import { cloud } from "../../../../../../index"; export const CreateGameNamespaceTokenDevelopmentRequest: core.serialization.ObjectSchema< serializers.cloud.games.namespaces.CreateGameNamespaceTokenDevelopmentRequest.Raw, Rivet.cloud.games.namespaces.CreateGameNamespaceTokenDevelopmentRequest > = core.serialization.object({ hostname: core.serialization.string(), - ports: core.serialization - .record( - core.serialization.string(), - core.serialization.lazyObject( - async () => (await import("../../../../../../..")).cloud.MatchmakerDevelopmentPort - ) - ) - .optional(), + ports: core.serialization.record(core.serialization.string(), cloud_common$$matchmakerDevelopmentPort).optional(), lobbyPorts: core.serialization.property( "lobby_ports", - core.serialization - .list( - core.serialization.lazyObject( - async () => - (await import("../../../../../../..")).cloud.version.matchmaker.LobbyGroupRuntimeDockerPort - ) - ) - .optional() + core.serialization.list(cloud_version_matchmaker_lobby_group$$lobbyGroupRuntimeDockerPort).optional() ), }); export declare namespace CreateGameNamespaceTokenDevelopmentRequest { interface Raw { hostname: string; - ports?: Record | null; - lobby_ports?: serializers.cloud.version.matchmaker.LobbyGroupRuntimeDockerPort.Raw[] | null; + ports?: Record | null; + lobby_ports?: cloud.version.matchmaker.LobbyGroupRuntimeDockerPort.Raw[] | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenDevelopmentResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenDevelopmentResponse.ts index 9c4636f9e0..a69f1536bd 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenDevelopmentResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenDevelopmentResponse.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export const CreateGameNamespaceTokenDevelopmentResponse: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenPublicResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenPublicResponse.ts index c395313519..ec81bfb5e6 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenPublicResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenPublicResponse.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export const CreateGameNamespaceTokenPublicResponse: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceByIdResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceByIdResponse.ts index 9f6829327a..f37c769c11 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceByIdResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceByIdResponse.ts @@ -2,19 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { NamespaceFull as cloud_common$$namespaceFull } from "../../../../common/types/NamespaceFull"; +import { cloud } from "../../../../../../index"; export const GetGameNamespaceByIdResponse: core.serialization.ObjectSchema< serializers.cloud.games.namespaces.GetGameNamespaceByIdResponse.Raw, Rivet.cloud.games.namespaces.GetGameNamespaceByIdResponse > = core.serialization.object({ - namespace: core.serialization.lazyObject(async () => (await import("../../../../../../..")).cloud.NamespaceFull), + namespace: cloud_common$$namespaceFull, }); export declare namespace GetGameNamespaceByIdResponse { interface Raw { - namespace: serializers.cloud.NamespaceFull.Raw; + namespace: cloud.NamespaceFull.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceVersionHistoryResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceVersionHistoryResponse.ts index 7e48ba7fa7..3b3b1bd408 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceVersionHistoryResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceVersionHistoryResponse.ts @@ -2,21 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { NamespaceVersion as cloud_common$$namespaceVersion } from "../../../../common/types/NamespaceVersion"; +import { cloud } from "../../../../../../index"; export const GetGameNamespaceVersionHistoryResponse: core.serialization.ObjectSchema< serializers.cloud.games.namespaces.GetGameNamespaceVersionHistoryResponse.Raw, Rivet.cloud.games.namespaces.GetGameNamespaceVersionHistoryResponse > = core.serialization.object({ - versions: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../../../..")).cloud.NamespaceVersion) - ), + versions: core.serialization.list(cloud_common$$namespaceVersion), }); export declare namespace GetGameNamespaceVersionHistoryResponse { interface Raw { - versions: serializers.cloud.NamespaceVersion.Raw[]; + versions: cloud.NamespaceVersion.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/InspectResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/InspectResponse.ts index 9d44398789..bdebb2d74c 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/InspectResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/InspectResponse.ts @@ -2,19 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { AuthAgent as cloud_common$$authAgent } from "../../../../common/types/AuthAgent"; +import { cloud } from "../../../../../../index"; export const InspectResponse: core.serialization.ObjectSchema< serializers.cloud.games.namespaces.InspectResponse.Raw, Rivet.cloud.games.namespaces.InspectResponse > = core.serialization.object({ - agent: core.serialization.lazyObject(async () => (await import("../../../../../../..")).cloud.AuthAgent), + agent: cloud_common$$authAgent, }); export declare namespace InspectResponse { interface Raw { - agent: serializers.cloud.AuthAgent.Raw; + agent: cloud.AuthAgent.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/SetNamespaceCdnAuthTypeRequest.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/SetNamespaceCdnAuthTypeRequest.ts index a4012a70c5..3aa3a68401 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/SetNamespaceCdnAuthTypeRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/SetNamespaceCdnAuthTypeRequest.ts @@ -2,22 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { CdnAuthType as cloud_common$$cdnAuthType } from "../../../../common/types/CdnAuthType"; +import { cloud } from "../../../../../../index"; export const SetNamespaceCdnAuthTypeRequest: core.serialization.ObjectSchema< serializers.cloud.games.namespaces.SetNamespaceCdnAuthTypeRequest.Raw, Rivet.cloud.games.namespaces.SetNamespaceCdnAuthTypeRequest > = core.serialization.object({ - authType: core.serialization.property( - "auth_type", - core.serialization.lazy(async () => (await import("../../../../../../..")).cloud.CdnAuthType) - ), + authType: core.serialization.property("auth_type", cloud_common$$cdnAuthType), }); export declare namespace SetNamespaceCdnAuthTypeRequest { interface Raw { - auth_type: serializers.cloud.CdnAuthType.Raw; + auth_type: cloud.CdnAuthType.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ToggleNamespaceDomainPublicAuthRequest.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ToggleNamespaceDomainPublicAuthRequest.ts index 29d88e04ed..3c87e9050a 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ToggleNamespaceDomainPublicAuthRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ToggleNamespaceDomainPublicAuthRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export const ToggleNamespaceDomainPublicAuthRequest: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/UpdateGameNamespaceMatchmakerConfigRequest.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/UpdateGameNamespaceMatchmakerConfigRequest.ts index 6c2b7a6757..ec97ef9925 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/UpdateGameNamespaceMatchmakerConfigRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/UpdateGameNamespaceMatchmakerConfigRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export const UpdateGameNamespaceMatchmakerConfigRequest: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/UpdateGameNamespaceVersionRequest.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/UpdateGameNamespaceVersionRequest.ts index 812e6c43b1..7d2fd8cdf3 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/UpdateGameNamespaceVersionRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/UpdateGameNamespaceVersionRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export const UpdateGameNamespaceVersionRequest: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/UpdateNamespaceCdnAuthUserRequest.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/UpdateNamespaceCdnAuthUserRequest.ts index 09954dfb3b..09364003a4 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/UpdateNamespaceCdnAuthUserRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/UpdateNamespaceCdnAuthUserRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export const UpdateNamespaceCdnAuthUserRequest: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceMatchmakerConfigRequest.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceMatchmakerConfigRequest.ts index e2aa167238..c192083cc5 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceMatchmakerConfigRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceMatchmakerConfigRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export const ValidateGameNamespaceMatchmakerConfigRequest: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceMatchmakerConfigResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceMatchmakerConfigResponse.ts index 8c0ab5f318..59969b2ba3 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceMatchmakerConfigResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceMatchmakerConfigResponse.ts @@ -2,21 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { ValidationError as common$$validationError } from "../../../../../../common/types/ValidationError"; +import { common } from "../../../../../../index"; export const ValidateGameNamespaceMatchmakerConfigResponse: core.serialization.ObjectSchema< serializers.cloud.games.namespaces.ValidateGameNamespaceMatchmakerConfigResponse.Raw, Rivet.cloud.games.namespaces.ValidateGameNamespaceMatchmakerConfigResponse > = core.serialization.object({ - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../../../..")).ValidationError) - ), + errors: core.serialization.list(common$$validationError), }); export declare namespace ValidateGameNamespaceMatchmakerConfigResponse { interface Raw { - errors: serializers.ValidationError.Raw[]; + errors: common.ValidationError.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceRequest.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceRequest.ts index 569a9e0dcf..5d15ce85d1 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceRequest.ts @@ -2,24 +2,23 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { DisplayName as common$$displayName } from "../../../../../../common/types/DisplayName"; +import { common } from "../../../../../../index"; export const ValidateGameNamespaceRequest: core.serialization.ObjectSchema< serializers.cloud.games.namespaces.ValidateGameNamespaceRequest.Raw, Rivet.cloud.games.namespaces.ValidateGameNamespaceRequest > = core.serialization.object({ - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../../../..")).DisplayName) - ), + displayName: core.serialization.property("display_name", common$$displayName), nameId: core.serialization.property("name_id", core.serialization.string()), }); export declare namespace ValidateGameNamespaceRequest { interface Raw { - display_name: serializers.DisplayName.Raw; + display_name: common.DisplayName.Raw; name_id: string; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceResponse.ts index 6158579c09..ecccf3d022 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceResponse.ts @@ -2,21 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { ValidationError as common$$validationError } from "../../../../../../common/types/ValidationError"; +import { common } from "../../../../../../index"; export const ValidateGameNamespaceResponse: core.serialization.ObjectSchema< serializers.cloud.games.namespaces.ValidateGameNamespaceResponse.Raw, Rivet.cloud.games.namespaces.ValidateGameNamespaceResponse > = core.serialization.object({ - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../../../..")).ValidationError) - ), + errors: core.serialization.list(common$$validationError), }); export declare namespace ValidateGameNamespaceResponse { interface Raw { - errors: serializers.ValidationError.Raw[]; + errors: common.ValidationError.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentRequest.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentRequest.ts index 1419bcab97..575f36a7e7 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentRequest.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { LobbyGroupRuntimeDockerPort as cloud_version_matchmaker_lobby_group$$lobbyGroupRuntimeDockerPort } from "../../../../version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDockerPort"; +import { cloud } from "../../../../../../index"; export const ValidateGameNamespaceTokenDevelopmentRequest: core.serialization.ObjectSchema< serializers.cloud.games.namespaces.ValidateGameNamespaceTokenDevelopmentRequest.Raw, @@ -13,17 +15,13 @@ export const ValidateGameNamespaceTokenDevelopmentRequest: core.serialization.Ob hostname: core.serialization.string(), lobbyPorts: core.serialization.property( "lobby_ports", - core.serialization.list( - core.serialization.lazyObject( - async () => (await import("../../../../../../..")).cloud.version.matchmaker.LobbyGroupRuntimeDockerPort - ) - ) + core.serialization.list(cloud_version_matchmaker_lobby_group$$lobbyGroupRuntimeDockerPort) ), }); export declare namespace ValidateGameNamespaceTokenDevelopmentRequest { interface Raw { hostname: string; - lobby_ports: serializers.cloud.version.matchmaker.LobbyGroupRuntimeDockerPort.Raw[]; + lobby_ports: cloud.version.matchmaker.LobbyGroupRuntimeDockerPort.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentResponse.ts index 89c21c8fba..e3f8e85012 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentResponse.ts @@ -2,21 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { ValidationError as common$$validationError } from "../../../../../../common/types/ValidationError"; +import { common } from "../../../../../../index"; export const ValidateGameNamespaceTokenDevelopmentResponse: core.serialization.ObjectSchema< serializers.cloud.games.namespaces.ValidateGameNamespaceTokenDevelopmentResponse.Raw, Rivet.cloud.games.namespaces.ValidateGameNamespaceTokenDevelopmentResponse > = core.serialization.object({ - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../../../..")).ValidationError) - ), + errors: core.serialization.list(common$$validationError), }); export declare namespace ValidateGameNamespaceTokenDevelopmentResponse { interface Raw { - errors: serializers.ValidationError.Raw[]; + errors: common.ValidationError.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/tokens/types/CreateCloudTokenResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/tokens/types/CreateCloudTokenResponse.ts index f0ac8bf969..dd7d90d09c 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/tokens/types/CreateCloudTokenResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/tokens/types/CreateCloudTokenResponse.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export const CreateCloudTokenResponse: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/versions/types/CreateGameVersionRequest.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/versions/types/CreateGameVersionRequest.ts index 5f627a0724..feea220db8 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/versions/types/CreateGameVersionRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/versions/types/CreateGameVersionRequest.ts @@ -2,24 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { DisplayName as common$$displayName } from "../../../../../../common/types/DisplayName"; +import { Config as cloud_version$$config } from "../../../../version/types/Config"; +import { common, cloud } from "../../../../../../index"; export const CreateGameVersionRequest: core.serialization.ObjectSchema< serializers.cloud.games.CreateGameVersionRequest.Raw, Rivet.cloud.games.CreateGameVersionRequest > = core.serialization.object({ - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../../../..")).DisplayName) - ), - config: core.serialization.lazyObject(async () => (await import("../../../../../../..")).cloud.version.Config), + displayName: core.serialization.property("display_name", common$$displayName), + config: cloud_version$$config, }); export declare namespace CreateGameVersionRequest { interface Raw { - display_name: serializers.DisplayName.Raw; - config: serializers.cloud.version.Config.Raw; + display_name: common.DisplayName.Raw; + config: cloud.version.Config.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/versions/types/CreateGameVersionResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/versions/types/CreateGameVersionResponse.ts index 127dbf1f17..e8b1f7708c 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/versions/types/CreateGameVersionResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/versions/types/CreateGameVersionResponse.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export const CreateGameVersionResponse: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/versions/types/GetGameVersionByIdResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/versions/types/GetGameVersionByIdResponse.ts index 78e599f9c4..e843065978 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/versions/types/GetGameVersionByIdResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/versions/types/GetGameVersionByIdResponse.ts @@ -2,19 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { Full as cloud_version$$full } from "../../../../version/types/Full"; +import { cloud } from "../../../../../../index"; export const GetGameVersionByIdResponse: core.serialization.ObjectSchema< serializers.cloud.games.GetGameVersionByIdResponse.Raw, Rivet.cloud.games.GetGameVersionByIdResponse > = core.serialization.object({ - version: core.serialization.lazyObject(async () => (await import("../../../../../../..")).cloud.version.Full), + version: cloud_version$$full, }); export declare namespace GetGameVersionByIdResponse { interface Raw { - version: serializers.cloud.version.Full.Raw; + version: cloud.version.Full.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/versions/types/ReserveVersionNameResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/versions/types/ReserveVersionNameResponse.ts index dea6c66718..0d88756509 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/versions/types/ReserveVersionNameResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/versions/types/ReserveVersionNameResponse.ts @@ -2,22 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { DisplayName as common$$displayName } from "../../../../../../common/types/DisplayName"; +import { common } from "../../../../../../index"; export const ReserveVersionNameResponse: core.serialization.ObjectSchema< serializers.cloud.games.ReserveVersionNameResponse.Raw, Rivet.cloud.games.ReserveVersionNameResponse > = core.serialization.object({ - versionDisplayName: core.serialization.property( - "version_display_name", - core.serialization.lazy(async () => (await import("../../../../../../..")).DisplayName) - ), + versionDisplayName: core.serialization.property("version_display_name", common$$displayName), }); export declare namespace ReserveVersionNameResponse { interface Raw { - version_display_name: serializers.DisplayName.Raw; + version_display_name: common.DisplayName.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionRequest.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionRequest.ts index 05d23ddb0c..e513167e1e 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionRequest.ts @@ -2,24 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { DisplayName as common$$displayName } from "../../../../../../common/types/DisplayName"; +import { Config as cloud_version$$config } from "../../../../version/types/Config"; +import { common, cloud } from "../../../../../../index"; export const ValidateGameVersionRequest: core.serialization.ObjectSchema< serializers.cloud.games.ValidateGameVersionRequest.Raw, Rivet.cloud.games.ValidateGameVersionRequest > = core.serialization.object({ - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../../../..")).DisplayName) - ), - config: core.serialization.lazyObject(async () => (await import("../../../../../../..")).cloud.version.Config), + displayName: core.serialization.property("display_name", common$$displayName), + config: cloud_version$$config, }); export declare namespace ValidateGameVersionRequest { interface Raw { - display_name: serializers.DisplayName.Raw; - config: serializers.cloud.version.Config.Raw; + display_name: common.DisplayName.Raw; + config: cloud.version.Config.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionResponse.ts index 454f07aa45..80fa437631 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionResponse.ts @@ -2,21 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { ValidationError as common$$validationError } from "../../../../../../common/types/ValidationError"; +import { common } from "../../../../../../index"; export const ValidateGameVersionResponse: core.serialization.ObjectSchema< serializers.cloud.games.ValidateGameVersionResponse.Raw, Rivet.cloud.games.ValidateGameVersionResponse > = core.serialization.object({ - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../../../..")).ValidationError) - ), + errors: core.serialization.list(common$$validationError), }); export declare namespace ValidateGameVersionResponse { interface Raw { - errors: serializers.ValidationError.Raw[]; + errors: common.ValidationError.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/CreateGameRequest.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/CreateGameRequest.ts index 1b892decfa..0ad9e81aae 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/CreateGameRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/CreateGameRequest.ts @@ -2,29 +2,26 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Identifier as common$$identifier } from "../../../../common/types/Identifier"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { common } from "../../../../index"; export const CreateGameRequest: core.serialization.ObjectSchema< serializers.cloud.games.CreateGameRequest.Raw, Rivet.cloud.games.CreateGameRequest > = core.serialization.object({ - nameId: core.serialization.property( - "name_id", - core.serialization.lazy(async () => (await import("../../../../..")).Identifier).optional() - ), - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), + nameId: core.serialization.property("name_id", common$$identifier.optional()), + displayName: core.serialization.property("display_name", common$$displayName), developerGroupId: core.serialization.property("developer_group_id", core.serialization.string()), }); export declare namespace CreateGameRequest { interface Raw { - name_id?: serializers.Identifier.Raw | null; - display_name: serializers.DisplayName.Raw; + name_id?: common.Identifier.Raw | null; + display_name: common.DisplayName.Raw; developer_group_id: string; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/CreateGameResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/CreateGameResponse.ts index 21c98fddf7..fb23c4c328 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/CreateGameResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/CreateGameResponse.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const CreateGameResponse: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/GameBannerUploadPrepareRequest.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/GameBannerUploadPrepareRequest.ts index 3ff6aa0782..83be01d90b 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/GameBannerUploadPrepareRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/GameBannerUploadPrepareRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const GameBannerUploadPrepareRequest: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/GameBannerUploadPrepareResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/GameBannerUploadPrepareResponse.ts index ed9240c0f8..3b7bd7e2f5 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/GameBannerUploadPrepareResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/GameBannerUploadPrepareResponse.ts @@ -2,24 +2,23 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { PresignedRequest as upload_common$$presignedRequest } from "../../../../upload/resources/common/types/PresignedRequest"; +import { upload } from "../../../../index"; export const GameBannerUploadPrepareResponse: core.serialization.ObjectSchema< serializers.cloud.games.GameBannerUploadPrepareResponse.Raw, Rivet.cloud.games.GameBannerUploadPrepareResponse > = core.serialization.object({ uploadId: core.serialization.property("upload_id", core.serialization.string()), - presignedRequest: core.serialization.property( - "presigned_request", - core.serialization.lazyObject(async () => (await import("../../../../..")).upload.PresignedRequest) - ), + presignedRequest: core.serialization.property("presigned_request", upload_common$$presignedRequest), }); export declare namespace GameBannerUploadPrepareResponse { interface Raw { upload_id: string; - presigned_request: serializers.upload.PresignedRequest.Raw; + presigned_request: upload.PresignedRequest.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/GameLogoUploadPrepareRequest.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/GameLogoUploadPrepareRequest.ts index a9fd9a13b9..b7af09d457 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/GameLogoUploadPrepareRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/GameLogoUploadPrepareRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const GameLogoUploadPrepareRequest: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/GameLogoUploadPrepareResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/GameLogoUploadPrepareResponse.ts index 1d779fa192..ff2db50dc4 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/GameLogoUploadPrepareResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/GameLogoUploadPrepareResponse.ts @@ -2,24 +2,23 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { PresignedRequest as upload_common$$presignedRequest } from "../../../../upload/resources/common/types/PresignedRequest"; +import { upload } from "../../../../index"; export const GameLogoUploadPrepareResponse: core.serialization.ObjectSchema< serializers.cloud.games.GameLogoUploadPrepareResponse.Raw, Rivet.cloud.games.GameLogoUploadPrepareResponse > = core.serialization.object({ uploadId: core.serialization.property("upload_id", core.serialization.string()), - presignedRequest: core.serialization.property( - "presigned_request", - core.serialization.lazyObject(async () => (await import("../../../../..")).upload.PresignedRequest) - ), + presignedRequest: core.serialization.property("presigned_request", upload_common$$presignedRequest), }); export declare namespace GameLogoUploadPrepareResponse { interface Raw { upload_id: string; - presigned_request: serializers.upload.PresignedRequest.Raw; + presigned_request: upload.PresignedRequest.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/GetGameByIdResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/GetGameByIdResponse.ts index 6370466e60..3bf97cef30 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/GetGameByIdResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/GetGameByIdResponse.ts @@ -2,21 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { GameFull as cloud_common$$gameFull } from "../../common/types/GameFull"; +import { WatchResponse as common$$watchResponse } from "../../../../common/types/WatchResponse"; +import { cloud, common } from "../../../../index"; export const GetGameByIdResponse: core.serialization.ObjectSchema< serializers.cloud.games.GetGameByIdResponse.Raw, Rivet.cloud.games.GetGameByIdResponse > = core.serialization.object({ - game: core.serialization.lazyObject(async () => (await import("../../../../..")).cloud.GameFull), - watch: core.serialization.lazyObject(async () => (await import("../../../../..")).WatchResponse), + game: cloud_common$$gameFull, + watch: common$$watchResponse, }); export declare namespace GetGameByIdResponse { interface Raw { - game: serializers.cloud.GameFull.Raw; - watch: serializers.WatchResponse.Raw; + game: cloud.GameFull.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/GetGamesResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/GetGamesResponse.ts index df9485716a..7d55c8d9fd 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/GetGamesResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/GetGamesResponse.ts @@ -2,27 +2,27 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Summary as game_common$$summary } from "../../../../game/resources/common/types/Summary"; +import { Summary as group_common$$summary } from "../../../../group/resources/common/types/Summary"; +import { WatchResponse as common$$watchResponse } from "../../../../common/types/WatchResponse"; +import { game, group, common } from "../../../../index"; export const GetGamesResponse: core.serialization.ObjectSchema< serializers.cloud.games.GetGamesResponse.Raw, Rivet.cloud.games.GetGamesResponse > = core.serialization.object({ - games: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).game.Summary) - ), - groups: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).group.Summary) - ), - watch: core.serialization.lazyObject(async () => (await import("../../../../..")).WatchResponse), + games: core.serialization.list(game_common$$summary), + groups: core.serialization.list(group_common$$summary), + watch: common$$watchResponse, }); export declare namespace GetGamesResponse { interface Raw { - games: serializers.game.Summary.Raw[]; - groups: serializers.group.Summary.Raw[]; - watch: serializers.WatchResponse.Raw; + games: game.Summary.Raw[]; + groups: group.Summary.Raw[]; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/ValidateGameRequest.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/ValidateGameRequest.ts index bba92b08dc..2dc5f3cf49 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/ValidateGameRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/ValidateGameRequest.ts @@ -2,27 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { Identifier as common$$identifier } from "../../../../common/types/Identifier"; +import { common } from "../../../../index"; export const ValidateGameRequest: core.serialization.ObjectSchema< serializers.cloud.games.ValidateGameRequest.Raw, Rivet.cloud.games.ValidateGameRequest > = core.serialization.object({ - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), - nameId: core.serialization.property( - "name_id", - core.serialization.lazy(async () => (await import("../../../../..")).Identifier).optional() - ), + displayName: core.serialization.property("display_name", common$$displayName), + nameId: core.serialization.property("name_id", common$$identifier.optional()), }); export declare namespace ValidateGameRequest { interface Raw { - display_name: serializers.DisplayName.Raw; - name_id?: serializers.Identifier.Raw | null; + display_name: common.DisplayName.Raw; + name_id?: common.Identifier.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/ValidateGameResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/ValidateGameResponse.ts index aa723f2677..69a21e6d7f 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/ValidateGameResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/games/types/ValidateGameResponse.ts @@ -2,21 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { ValidationError as common$$validationError } from "../../../../common/types/ValidationError"; +import { common } from "../../../../index"; export const ValidateGameResponse: core.serialization.ObjectSchema< serializers.cloud.games.ValidateGameResponse.Raw, Rivet.cloud.games.ValidateGameResponse > = core.serialization.object({ - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).ValidationError) - ), + errors: core.serialization.list(common$$validationError), }); export declare namespace ValidateGameResponse { interface Raw { - errors: serializers.ValidationError.Raw[]; + errors: common.ValidationError.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/groups/types/ValidateGroupRequest.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/groups/types/ValidateGroupRequest.ts index 34fd7659bc..b3f8689f20 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/groups/types/ValidateGroupRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/groups/types/ValidateGroupRequest.ts @@ -2,22 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { common } from "../../../../index"; export const ValidateGroupRequest: core.serialization.ObjectSchema< serializers.cloud.ValidateGroupRequest.Raw, Rivet.cloud.ValidateGroupRequest > = core.serialization.object({ - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), + displayName: core.serialization.property("display_name", common$$displayName), }); export declare namespace ValidateGroupRequest { interface Raw { - display_name: serializers.DisplayName.Raw; + display_name: common.DisplayName.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/groups/types/ValidateGroupResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/groups/types/ValidateGroupResponse.ts index 0d9bf6c634..fa7ee561b4 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/groups/types/ValidateGroupResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/groups/types/ValidateGroupResponse.ts @@ -2,21 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { ValidationError as common$$validationError } from "../../../../common/types/ValidationError"; +import { common } from "../../../../index"; export const ValidateGroupResponse: core.serialization.ObjectSchema< serializers.cloud.ValidateGroupResponse.Raw, Rivet.cloud.ValidateGroupResponse > = core.serialization.object({ - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).ValidationError) - ), + errors: core.serialization.list(common$$validationError), }); export declare namespace ValidateGroupResponse { interface Raw { - errors: serializers.ValidationError.Raw[]; + errors: common.ValidationError.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/logs/types/GetRayPerfLogsResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/logs/types/GetRayPerfLogsResponse.ts index c6ccf3fd0a..72ad15f697 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/logs/types/GetRayPerfLogsResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/logs/types/GetRayPerfLogsResponse.ts @@ -2,24 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { SvcPerf as cloud_common$$svcPerf } from "../../common/types/SvcPerf"; +import { cloud } from "../../../../index"; export const GetRayPerfLogsResponse: core.serialization.ObjectSchema< serializers.cloud.GetRayPerfLogsResponse.Raw, Rivet.cloud.GetRayPerfLogsResponse > = core.serialization.object({ - perfLists: core.serialization.property( - "perf_lists", - core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).cloud.SvcPerf) - ) - ), + perfLists: core.serialization.property("perf_lists", core.serialization.list(cloud_common$$svcPerf)), }); export declare namespace GetRayPerfLogsResponse { interface Raw { - perf_lists: serializers.cloud.SvcPerf.Raw[]; + perf_lists: cloud.SvcPerf.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/tiers/types/GetRegionTiersResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/tiers/types/GetRegionTiersResponse.ts index f54657b7fc..0e780b3e44 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/tiers/types/GetRegionTiersResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/tiers/types/GetRegionTiersResponse.ts @@ -2,21 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { RegionTier as cloud_common$$regionTier } from "../../common/types/RegionTier"; +import { cloud } from "../../../../index"; export const GetRegionTiersResponse: core.serialization.ObjectSchema< serializers.cloud.GetRegionTiersResponse.Raw, Rivet.cloud.GetRegionTiersResponse > = core.serialization.object({ - tiers: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).cloud.RegionTier) - ), + tiers: core.serialization.list(cloud_common$$regionTier), }); export declare namespace GetRegionTiersResponse { interface Raw { - tiers: serializers.cloud.RegionTier.Raw[]; + tiers: cloud.RegionTier.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/cdn/types/Config.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/cdn/types/Config.ts index 769241bdf8..b5f622b87a 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/cdn/types/Config.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/cdn/types/Config.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { Route as cloud_version_cdn$$route } from "./Route"; +import { cloud } from "../../../../../../index"; export const Config: core.serialization.ObjectSchema< serializers.cloud.version.cdn.Config.Raw, @@ -17,9 +19,7 @@ export const Config: core.serialization.ObjectSchema< core.serialization.record(core.serialization.string(), core.serialization.string()).optional() ), siteId: core.serialization.property("site_id", core.serialization.string().optional()), - routes: core.serialization - .list(core.serialization.lazyObject(async () => (await import("../../../../../../..")).cloud.version.cdn.Route)) - .optional(), + routes: core.serialization.list(cloud_version_cdn$$route).optional(), }); export declare namespace Config { @@ -28,6 +28,6 @@ export declare namespace Config { build_output?: string | null; build_env?: Record | null; site_id?: string | null; - routes?: serializers.cloud.version.cdn.Route.Raw[] | null; + routes?: cloud.version.cdn.Route.Raw[] | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/cdn/types/CustomHeadersMiddleware.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/cdn/types/CustomHeadersMiddleware.ts index 0753392e1e..7ac37a06c8 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/cdn/types/CustomHeadersMiddleware.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/cdn/types/CustomHeadersMiddleware.ts @@ -2,21 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { Header as cloud_version_cdn$$header } from "./Header"; +import { cloud } from "../../../../../../index"; export const CustomHeadersMiddleware: core.serialization.ObjectSchema< serializers.cloud.version.cdn.CustomHeadersMiddleware.Raw, Rivet.cloud.version.cdn.CustomHeadersMiddleware > = core.serialization.object({ - headers: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../../../..")).cloud.version.cdn.Header) - ), + headers: core.serialization.list(cloud_version_cdn$$header), }); export declare namespace CustomHeadersMiddleware { interface Raw { - headers: serializers.cloud.version.cdn.Header.Raw[]; + headers: cloud.version.cdn.Header.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/cdn/types/Header.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/cdn/types/Header.ts index a1d3815d66..8feedcbc42 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/cdn/types/Header.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/cdn/types/Header.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export const Header: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/cdn/types/Middleware.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/cdn/types/Middleware.ts index e9403b27d3..d1f8a287ec 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/cdn/types/Middleware.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/cdn/types/Middleware.ts @@ -2,21 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { MiddlewareKind as cloud_version_cdn$$middlewareKind } from "./MiddlewareKind"; +import { cloud } from "../../../../../../index"; export const Middleware: core.serialization.ObjectSchema< serializers.cloud.version.cdn.Middleware.Raw, Rivet.cloud.version.cdn.Middleware > = core.serialization.object({ - kind: core.serialization.lazyObject( - async () => (await import("../../../../../../..")).cloud.version.cdn.MiddlewareKind - ), + kind: cloud_version_cdn$$middlewareKind, }); export declare namespace Middleware { interface Raw { - kind: serializers.cloud.version.cdn.MiddlewareKind.Raw; + kind: cloud.version.cdn.MiddlewareKind.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/cdn/types/MiddlewareKind.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/cdn/types/MiddlewareKind.ts index e09edbd05c..38ea94630d 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/cdn/types/MiddlewareKind.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/cdn/types/MiddlewareKind.ts @@ -2,24 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { CustomHeadersMiddleware as cloud_version_cdn$$customHeadersMiddleware } from "./CustomHeadersMiddleware"; +import { cloud } from "../../../../../../index"; export const MiddlewareKind: core.serialization.ObjectSchema< serializers.cloud.version.cdn.MiddlewareKind.Raw, Rivet.cloud.version.cdn.MiddlewareKind > = core.serialization.object({ - customHeaders: core.serialization.property( - "custom_headers", - core.serialization - .lazyObject(async () => (await import("../../../../../../..")).cloud.version.cdn.CustomHeadersMiddleware) - .optional() - ), + customHeaders: core.serialization.property("custom_headers", cloud_version_cdn$$customHeadersMiddleware.optional()), }); export declare namespace MiddlewareKind { interface Raw { - custom_headers?: serializers.cloud.version.cdn.CustomHeadersMiddleware.Raw | null; + custom_headers?: cloud.version.cdn.CustomHeadersMiddleware.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/cdn/types/Route.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/cdn/types/Route.ts index 4629320e65..9e8af1721c 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/cdn/types/Route.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/cdn/types/Route.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { Middleware as cloud_version_cdn$$middleware } from "./Middleware"; +import { cloud } from "../../../../../../index"; export const Route: core.serialization.ObjectSchema< serializers.cloud.version.cdn.Route.Raw, @@ -12,15 +14,13 @@ export const Route: core.serialization.ObjectSchema< > = core.serialization.object({ glob: core.serialization.string(), priority: core.serialization.number(), - middlewares: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../../../..")).cloud.version.cdn.Middleware) - ), + middlewares: core.serialization.list(cloud_version_cdn$$middleware), }); export declare namespace Route { interface Raw { glob: string; priority: number; - middlewares: serializers.cloud.version.cdn.Middleware.Raw[]; + middlewares: cloud.version.cdn.Middleware.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/engine/resources/custom/types/CustomConfig.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/engine/resources/custom/types/CustomConfig.ts index 7086b4fc44..1b68794525 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/engine/resources/custom/types/CustomConfig.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/engine/resources/custom/types/CustomConfig.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export const CustomConfig: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/engine/resources/godot/types/GodotConfig.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/engine/resources/godot/types/GodotConfig.ts index 809dc2834d..71da391b33 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/engine/resources/godot/types/GodotConfig.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/engine/resources/godot/types/GodotConfig.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export const GodotConfig: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/engine/resources/html5/types/Html5Config.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/engine/resources/html5/types/Html5Config.ts index a9596aa25f..dbf832c38e 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/engine/resources/html5/types/Html5Config.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/engine/resources/html5/types/Html5Config.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export const Html5Config: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/engine/resources/unity/types/UnityConfig.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/engine/resources/unity/types/UnityConfig.ts index 8888544028..76f5ee189d 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/engine/resources/unity/types/UnityConfig.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/engine/resources/unity/types/UnityConfig.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export const UnityConfig: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/engine/resources/unreal/types/UnrealConfig.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/engine/resources/unreal/types/UnrealConfig.ts index 63a7099395..15e3f50da7 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/engine/resources/unreal/types/UnrealConfig.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/engine/resources/unreal/types/UnrealConfig.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export const UnrealConfig: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/engine/types/Config.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/engine/types/Config.ts index ece2271cf6..da7b42bd46 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/engine/types/Config.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/engine/types/Config.ts @@ -2,37 +2,33 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { UnityConfig as cloud_version_engine_unity$$unityConfig } from "../resources/unity/types/UnityConfig"; +import { UnrealConfig as cloud_version_engine_unreal$$unrealConfig } from "../resources/unreal/types/UnrealConfig"; +import { GodotConfig as cloud_version_engine_godot$$godotConfig } from "../resources/godot/types/GodotConfig"; +import { Html5Config as cloud_version_engine_html_5$$html5Config } from "../resources/html5/types/Html5Config"; +import { CustomConfig as cloud_version_engine_custom$$customConfig } from "../resources/custom/types/CustomConfig"; +import { cloud } from "../../../../../../index"; export const Config: core.serialization.ObjectSchema< serializers.cloud.version.engine.Config.Raw, Rivet.cloud.version.engine.Config > = core.serialization.object({ - unity: core.serialization - .lazyObject(async () => (await import("../../../../../../..")).cloud.version.engine.UnityConfig) - .optional(), - unreal: core.serialization - .lazyObject(async () => (await import("../../../../../../..")).cloud.version.engine.UnrealConfig) - .optional(), - godot: core.serialization - .lazyObject(async () => (await import("../../../../../../..")).cloud.version.engine.GodotConfig) - .optional(), - html5: core.serialization - .lazyObject(async () => (await import("../../../../../../..")).cloud.version.engine.Html5Config) - .optional(), - custom: core.serialization - .lazyObject(async () => (await import("../../../../../../..")).cloud.version.engine.CustomConfig) - .optional(), + unity: cloud_version_engine_unity$$unityConfig.optional(), + unreal: cloud_version_engine_unreal$$unrealConfig.optional(), + godot: cloud_version_engine_godot$$godotConfig.optional(), + html5: cloud_version_engine_html_5$$html5Config.optional(), + custom: cloud_version_engine_custom$$customConfig.optional(), }); export declare namespace Config { interface Raw { - unity?: serializers.cloud.version.engine.UnityConfig.Raw | null; - unreal?: serializers.cloud.version.engine.UnrealConfig.Raw | null; - godot?: serializers.cloud.version.engine.GodotConfig.Raw | null; - html5?: serializers.cloud.version.engine.Html5Config.Raw | null; - custom?: serializers.cloud.version.engine.CustomConfig.Raw | null; + unity?: cloud.version.engine.UnityConfig.Raw | null; + unreal?: cloud.version.engine.UnrealConfig.Raw | null; + godot?: cloud.version.engine.GodotConfig.Raw | null; + html5?: cloud.version.engine.Html5Config.Raw | null; + custom?: cloud.version.engine.CustomConfig.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/identity/types/Config.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/identity/types/Config.ts index 41fb261bc0..301fbe0391 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/identity/types/Config.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/identity/types/Config.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { CustomDisplayName as cloud_version_identity$$customDisplayName } from "./CustomDisplayName"; +import { CustomAvatar as cloud_version_identity$$customAvatar } from "./CustomAvatar"; +import { cloud } from "../../../../../../index"; export const Config: core.serialization.ObjectSchema< serializers.cloud.version.identity.Config.Raw, @@ -17,23 +20,11 @@ export const Config: core.serialization.ObjectSchema< avatars: core.serialization.list(core.serialization.string()).optional(), customDisplayNames: core.serialization.property( "custom_display_names", - core.serialization - .list( - core.serialization.lazyObject( - async () => (await import("../../../../../../..")).cloud.version.identity.CustomDisplayName - ) - ) - .optional() + core.serialization.list(cloud_version_identity$$customDisplayName).optional() ), customAvatars: core.serialization.property( "custom_avatars", - core.serialization - .list( - core.serialization.lazyObject( - async () => (await import("../../../../../../..")).cloud.version.identity.CustomAvatar - ) - ) - .optional() + core.serialization.list(cloud_version_identity$$customAvatar).optional() ), }); @@ -41,7 +32,7 @@ export declare namespace Config { interface Raw { display_names?: string[] | null; avatars?: string[] | null; - custom_display_names?: serializers.cloud.version.identity.CustomDisplayName.Raw[] | null; - custom_avatars?: serializers.cloud.version.identity.CustomAvatar.Raw[] | null; + custom_display_names?: cloud.version.identity.CustomDisplayName.Raw[] | null; + custom_avatars?: cloud.version.identity.CustomAvatar.Raw[] | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/identity/types/CustomAvatar.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/identity/types/CustomAvatar.ts index 97b7a7d8e7..72dd6aff33 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/identity/types/CustomAvatar.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/identity/types/CustomAvatar.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export const CustomAvatar: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/identity/types/CustomDisplayName.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/identity/types/CustomDisplayName.ts index b6fcaa55e1..c499e7d67b 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/identity/types/CustomDisplayName.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/identity/types/CustomDisplayName.ts @@ -2,22 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { DisplayName as common$$displayName } from "../../../../../../common/types/DisplayName"; +import { common } from "../../../../../../index"; export const CustomDisplayName: core.serialization.ObjectSchema< serializers.cloud.version.identity.CustomDisplayName.Raw, Rivet.cloud.version.identity.CustomDisplayName > = core.serialization.object({ - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../../../..")).DisplayName) - ), + displayName: core.serialization.property("display_name", common$$displayName), }); export declare namespace CustomDisplayName { interface Raw { - display_name: serializers.DisplayName.Raw; + display_name: common.DisplayName.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/kv/types/Config.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/kv/types/Config.ts index 15878af91a..9182c72574 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/kv/types/Config.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/kv/types/Config.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export const Config: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/Captcha.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/Captcha.ts index 4067c74270..82f854d0fe 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/Captcha.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/Captcha.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { CaptchaHcaptcha as cloud_version_matchmaker_common$$captchaHcaptcha } from "./CaptchaHcaptcha"; +import { CaptchaTurnstile as cloud_version_matchmaker_common$$captchaTurnstile } from "./CaptchaTurnstile"; +import { cloud } from "../../../../../../../../index"; export const Captcha: core.serialization.ObjectSchema< serializers.cloud.version.matchmaker.Captcha.Raw, @@ -12,19 +15,15 @@ export const Captcha: core.serialization.ObjectSchema< > = core.serialization.object({ requestsBeforeReverify: core.serialization.property("requests_before_reverify", core.serialization.number()), verificationTtl: core.serialization.property("verification_ttl", core.serialization.number()), - hcaptcha: core.serialization - .lazyObject(async () => (await import("../../../../../../../../..")).cloud.version.matchmaker.CaptchaHcaptcha) - .optional(), - turnstile: core.serialization - .lazyObject(async () => (await import("../../../../../../../../..")).cloud.version.matchmaker.CaptchaTurnstile) - .optional(), + hcaptcha: cloud_version_matchmaker_common$$captchaHcaptcha.optional(), + turnstile: cloud_version_matchmaker_common$$captchaTurnstile.optional(), }); export declare namespace Captcha { interface Raw { requests_before_reverify: number; verification_ttl: number; - hcaptcha?: serializers.cloud.version.matchmaker.CaptchaHcaptcha.Raw | null; - turnstile?: serializers.cloud.version.matchmaker.CaptchaTurnstile.Raw | null; + hcaptcha?: cloud.version.matchmaker.CaptchaHcaptcha.Raw | null; + turnstile?: cloud.version.matchmaker.CaptchaTurnstile.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaHcaptcha.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaHcaptcha.ts index ff4fe4d3ce..806255eb1a 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaHcaptcha.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaHcaptcha.ts @@ -2,24 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { CaptchaHcaptchaLevel as cloud_version_matchmaker_common$$captchaHcaptchaLevel } from "./CaptchaHcaptchaLevel"; +import { cloud } from "../../../../../../../../index"; export const CaptchaHcaptcha: core.serialization.ObjectSchema< serializers.cloud.version.matchmaker.CaptchaHcaptcha.Raw, Rivet.cloud.version.matchmaker.CaptchaHcaptcha > = core.serialization.object({ - level: core.serialization - .lazy(async () => (await import("../../../../../../../../..")).cloud.version.matchmaker.CaptchaHcaptchaLevel) - .optional(), + level: cloud_version_matchmaker_common$$captchaHcaptchaLevel.optional(), siteKey: core.serialization.property("site_key", core.serialization.string().optional()), secretKey: core.serialization.property("secret_key", core.serialization.string().optional()), }); export declare namespace CaptchaHcaptcha { interface Raw { - level?: serializers.cloud.version.matchmaker.CaptchaHcaptchaLevel.Raw | null; + level?: cloud.version.matchmaker.CaptchaHcaptchaLevel.Raw | null; site_key?: string | null; secret_key?: string | null; } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaHcaptchaLevel.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaHcaptchaLevel.ts index 1102da84bf..d555e1ad85 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaHcaptchaLevel.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaHcaptchaLevel.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export const CaptchaHcaptchaLevel: core.serialization.Schema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaTurnstile.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaTurnstile.ts index 3186805399..e2c3a01077 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaTurnstile.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaTurnstile.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export const CaptchaTurnstile: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/NetworkMode.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/NetworkMode.ts index 653abaffbe..3b98ae2778 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/NetworkMode.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/NetworkMode.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export const NetworkMode: core.serialization.Schema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/PortProtocol.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/PortProtocol.ts index b835c50b0b..e0263e07c3 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/PortProtocol.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/PortProtocol.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export const PortProtocol: core.serialization.Schema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/PortRange.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/PortRange.ts index c2668131a1..3c0ce875a1 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/PortRange.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/PortRange.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export const PortRange: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/ProxyKind.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/ProxyKind.ts index 44715aeb30..4230ed6f37 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/ProxyKind.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/ProxyKind.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export const ProxyKind: core.serialization.Schema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameMode.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameMode.ts index 7f9ed910f7..1639fdbfe3 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameMode.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameMode.ts @@ -2,63 +2,52 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { GameModeRegion as cloud_version_matchmaker_game_mode$$gameModeRegion } from "./GameModeRegion"; +import { GameModeRuntimeDocker as cloud_version_matchmaker_game_mode$$gameModeRuntimeDocker } from "./GameModeRuntimeDocker"; +import { GameModeActions as cloud_version_matchmaker_game_mode$$gameModeActions } from "./GameModeActions"; +import { GameModeIdleLobbiesConfig as cloud_version_matchmaker_game_mode$$gameModeIdleLobbiesConfig } from "./GameModeIdleLobbiesConfig"; +import { cloud } from "../../../../../../../../index"; export const GameMode: core.serialization.ObjectSchema< serializers.cloud.version.matchmaker.GameMode.Raw, Rivet.cloud.version.matchmaker.GameMode > = core.serialization.object({ regions: core.serialization - .record( - core.serialization.string(), - core.serialization.lazyObject( - async () => (await import("../../../../../../../../..")).cloud.version.matchmaker.GameModeRegion - ) - ) + .record(core.serialization.string(), cloud_version_matchmaker_game_mode$$gameModeRegion) .optional(), maxPlayers: core.serialization.property("max_players", core.serialization.number().optional()), maxPlayersDirect: core.serialization.property("max_players_direct", core.serialization.number().optional()), maxPlayersParty: core.serialization.property("max_players_party", core.serialization.number().optional()), - docker: core.serialization - .lazyObject( - async () => (await import("../../../../../../../../..")).cloud.version.matchmaker.GameModeRuntimeDocker - ) - .optional(), + docker: cloud_version_matchmaker_game_mode$$gameModeRuntimeDocker.optional(), listable: core.serialization.boolean().optional(), taggable: core.serialization.boolean().optional(), allowDynamicMaxPlayers: core.serialization.property( "allow_dynamic_max_players", core.serialization.boolean().optional() ), - actions: core.serialization - .lazyObject(async () => (await import("../../../../../../../../..")).cloud.version.matchmaker.GameModeActions) - .optional(), + actions: cloud_version_matchmaker_game_mode$$gameModeActions.optional(), tier: core.serialization.string().optional(), idleLobbies: core.serialization.property( "idle_lobbies", - core.serialization - .lazyObject( - async () => - (await import("../../../../../../../../..")).cloud.version.matchmaker.GameModeIdleLobbiesConfig - ) - .optional() + cloud_version_matchmaker_game_mode$$gameModeIdleLobbiesConfig.optional() ), }); export declare namespace GameMode { interface Raw { - regions?: Record | null; + regions?: Record | null; max_players?: number | null; max_players_direct?: number | null; max_players_party?: number | null; - docker?: serializers.cloud.version.matchmaker.GameModeRuntimeDocker.Raw | null; + docker?: cloud.version.matchmaker.GameModeRuntimeDocker.Raw | null; listable?: boolean | null; taggable?: boolean | null; allow_dynamic_max_players?: boolean | null; - actions?: serializers.cloud.version.matchmaker.GameModeActions.Raw | null; + actions?: cloud.version.matchmaker.GameModeActions.Raw | null; tier?: string | null; - idle_lobbies?: serializers.cloud.version.matchmaker.GameModeIdleLobbiesConfig.Raw | null; + idle_lobbies?: cloud.version.matchmaker.GameModeIdleLobbiesConfig.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeActions.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeActions.ts index 3115d063f5..acea8ce8bf 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeActions.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeActions.ts @@ -2,35 +2,27 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { GameModeFindConfig as cloud_version_matchmaker_game_mode$$gameModeFindConfig } from "./GameModeFindConfig"; +import { GameModeJoinConfig as cloud_version_matchmaker_game_mode$$gameModeJoinConfig } from "./GameModeJoinConfig"; +import { GameModeCreateConfig as cloud_version_matchmaker_game_mode$$gameModeCreateConfig } from "./GameModeCreateConfig"; +import { cloud } from "../../../../../../../../index"; export const GameModeActions: core.serialization.ObjectSchema< serializers.cloud.version.matchmaker.GameModeActions.Raw, Rivet.cloud.version.matchmaker.GameModeActions > = core.serialization.object({ - find: core.serialization - .lazyObject( - async () => (await import("../../../../../../../../..")).cloud.version.matchmaker.GameModeFindConfig - ) - .optional(), - join: core.serialization - .lazyObject( - async () => (await import("../../../../../../../../..")).cloud.version.matchmaker.GameModeJoinConfig - ) - .optional(), - create: core.serialization - .lazyObject( - async () => (await import("../../../../../../../../..")).cloud.version.matchmaker.GameModeCreateConfig - ) - .optional(), + find: cloud_version_matchmaker_game_mode$$gameModeFindConfig.optional(), + join: cloud_version_matchmaker_game_mode$$gameModeJoinConfig.optional(), + create: cloud_version_matchmaker_game_mode$$gameModeCreateConfig.optional(), }); export declare namespace GameModeActions { interface Raw { - find?: serializers.cloud.version.matchmaker.GameModeFindConfig.Raw | null; - join?: serializers.cloud.version.matchmaker.GameModeJoinConfig.Raw | null; - create?: serializers.cloud.version.matchmaker.GameModeCreateConfig.Raw | null; + find?: cloud.version.matchmaker.GameModeFindConfig.Raw | null; + join?: cloud.version.matchmaker.GameModeJoinConfig.Raw | null; + create?: cloud.version.matchmaker.GameModeCreateConfig.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeCreateConfig.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeCreateConfig.ts index aa8bf297d5..733ef0d382 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeCreateConfig.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeCreateConfig.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { GameModeIdentityRequirement as cloud_version_matchmaker_game_mode$$gameModeIdentityRequirement } from "./GameModeIdentityRequirement"; +import { GameModeVerificationConfig as cloud_version_matchmaker_game_mode$$gameModeVerificationConfig } from "./GameModeVerificationConfig"; +import { cloud } from "../../../../../../../../index"; export const GameModeCreateConfig: core.serialization.ObjectSchema< serializers.cloud.version.matchmaker.GameModeCreateConfig.Raw, @@ -13,18 +16,9 @@ export const GameModeCreateConfig: core.serialization.ObjectSchema< enabled: core.serialization.boolean(), identityRequirement: core.serialization.property( "identity_requirement", - core.serialization - .lazy( - async () => - (await import("../../../../../../../../..")).cloud.version.matchmaker.GameModeIdentityRequirement - ) - .optional() + cloud_version_matchmaker_game_mode$$gameModeIdentityRequirement.optional() ), - verification: core.serialization - .lazyObject( - async () => (await import("../../../../../../../../..")).cloud.version.matchmaker.GameModeVerificationConfig - ) - .optional(), + verification: cloud_version_matchmaker_game_mode$$gameModeVerificationConfig.optional(), enablePublic: core.serialization.property("enable_public", core.serialization.boolean().optional()), enablePrivate: core.serialization.property("enable_private", core.serialization.boolean().optional()), maxLobbiesPerIdentity: core.serialization.property( @@ -36,8 +30,8 @@ export const GameModeCreateConfig: core.serialization.ObjectSchema< export declare namespace GameModeCreateConfig { interface Raw { enabled: boolean; - identity_requirement?: serializers.cloud.version.matchmaker.GameModeIdentityRequirement.Raw | null; - verification?: serializers.cloud.version.matchmaker.GameModeVerificationConfig.Raw | null; + identity_requirement?: cloud.version.matchmaker.GameModeIdentityRequirement.Raw | null; + verification?: cloud.version.matchmaker.GameModeVerificationConfig.Raw | null; enable_public?: boolean | null; enable_private?: boolean | null; max_lobbies_per_identity?: number | null; diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeFindConfig.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeFindConfig.ts index 4ceedb9e3b..d2b86d5950 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeFindConfig.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeFindConfig.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { GameModeIdentityRequirement as cloud_version_matchmaker_game_mode$$gameModeIdentityRequirement } from "./GameModeIdentityRequirement"; +import { GameModeVerificationConfig as cloud_version_matchmaker_game_mode$$gameModeVerificationConfig } from "./GameModeVerificationConfig"; +import { cloud } from "../../../../../../../../index"; export const GameModeFindConfig: core.serialization.ObjectSchema< serializers.cloud.version.matchmaker.GameModeFindConfig.Raw, @@ -13,24 +16,15 @@ export const GameModeFindConfig: core.serialization.ObjectSchema< enabled: core.serialization.boolean(), identityRequirement: core.serialization.property( "identity_requirement", - core.serialization - .lazy( - async () => - (await import("../../../../../../../../..")).cloud.version.matchmaker.GameModeIdentityRequirement - ) - .optional() + cloud_version_matchmaker_game_mode$$gameModeIdentityRequirement.optional() ), - verification: core.serialization - .lazyObject( - async () => (await import("../../../../../../../../..")).cloud.version.matchmaker.GameModeVerificationConfig - ) - .optional(), + verification: cloud_version_matchmaker_game_mode$$gameModeVerificationConfig.optional(), }); export declare namespace GameModeFindConfig { interface Raw { enabled: boolean; - identity_requirement?: serializers.cloud.version.matchmaker.GameModeIdentityRequirement.Raw | null; - verification?: serializers.cloud.version.matchmaker.GameModeVerificationConfig.Raw | null; + identity_requirement?: cloud.version.matchmaker.GameModeIdentityRequirement.Raw | null; + verification?: cloud.version.matchmaker.GameModeVerificationConfig.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeIdentityRequirement.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeIdentityRequirement.ts index bd4e6a0f52..f049ccab05 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeIdentityRequirement.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeIdentityRequirement.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export const GameModeIdentityRequirement: core.serialization.Schema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeIdleLobbiesConfig.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeIdleLobbiesConfig.ts index c4ec0c3820..02623ea99d 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeIdleLobbiesConfig.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeIdleLobbiesConfig.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export const GameModeIdleLobbiesConfig: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeJoinConfig.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeJoinConfig.ts index e7c05309c2..6ac312324b 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeJoinConfig.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeJoinConfig.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { GameModeIdentityRequirement as cloud_version_matchmaker_game_mode$$gameModeIdentityRequirement } from "./GameModeIdentityRequirement"; +import { GameModeVerificationConfig as cloud_version_matchmaker_game_mode$$gameModeVerificationConfig } from "./GameModeVerificationConfig"; +import { cloud } from "../../../../../../../../index"; export const GameModeJoinConfig: core.serialization.ObjectSchema< serializers.cloud.version.matchmaker.GameModeJoinConfig.Raw, @@ -13,24 +16,15 @@ export const GameModeJoinConfig: core.serialization.ObjectSchema< enabled: core.serialization.boolean(), identityRequirement: core.serialization.property( "identity_requirement", - core.serialization - .lazy( - async () => - (await import("../../../../../../../../..")).cloud.version.matchmaker.GameModeIdentityRequirement - ) - .optional() + cloud_version_matchmaker_game_mode$$gameModeIdentityRequirement.optional() ), - verification: core.serialization - .lazyObject( - async () => (await import("../../../../../../../../..")).cloud.version.matchmaker.GameModeVerificationConfig - ) - .optional(), + verification: cloud_version_matchmaker_game_mode$$gameModeVerificationConfig.optional(), }); export declare namespace GameModeJoinConfig { interface Raw { enabled: boolean; - identity_requirement?: serializers.cloud.version.matchmaker.GameModeIdentityRequirement.Raw | null; - verification?: serializers.cloud.version.matchmaker.GameModeVerificationConfig.Raw | null; + identity_requirement?: cloud.version.matchmaker.GameModeIdentityRequirement.Raw | null; + verification?: cloud.version.matchmaker.GameModeVerificationConfig.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRegion.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRegion.ts index 528f0e658c..e7d6291acc 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRegion.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRegion.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { GameModeIdleLobbiesConfig as cloud_version_matchmaker_game_mode$$gameModeIdleLobbiesConfig } from "./GameModeIdleLobbiesConfig"; +import { cloud } from "../../../../../../../../index"; export const GameModeRegion: core.serialization.ObjectSchema< serializers.cloud.version.matchmaker.GameModeRegion.Raw, @@ -13,18 +15,13 @@ export const GameModeRegion: core.serialization.ObjectSchema< tier: core.serialization.string().optional(), idleLobbies: core.serialization.property( "idle_lobbies", - core.serialization - .lazyObject( - async () => - (await import("../../../../../../../../..")).cloud.version.matchmaker.GameModeIdleLobbiesConfig - ) - .optional() + cloud_version_matchmaker_game_mode$$gameModeIdleLobbiesConfig.optional() ), }); export declare namespace GameModeRegion { interface Raw { tier?: string | null; - idle_lobbies?: serializers.cloud.version.matchmaker.GameModeIdleLobbiesConfig.Raw | null; + idle_lobbies?: cloud.version.matchmaker.GameModeIdleLobbiesConfig.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDocker.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDocker.ts index 27f7ce4ee5..15fc3ed80d 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDocker.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDocker.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { NetworkMode as cloud_version_matchmaker_common$$networkMode } from "../../common/types/NetworkMode"; +import { GameModeRuntimeDockerPort as cloud_version_matchmaker_game_mode$$gameModeRuntimeDockerPort } from "./GameModeRuntimeDockerPort"; +import { cloud } from "../../../../../../../../index"; export const GameModeRuntimeDocker: core.serialization.ObjectSchema< serializers.cloud.version.matchmaker.GameModeRuntimeDocker.Raw, @@ -19,20 +22,9 @@ export const GameModeRuntimeDocker: core.serialization.ObjectSchema< imageId: core.serialization.property("image_id", core.serialization.string().optional()), args: core.serialization.list(core.serialization.string()).optional(), env: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), - networkMode: core.serialization.property( - "network_mode", - core.serialization - .lazy(async () => (await import("../../../../../../../../..")).cloud.version.matchmaker.NetworkMode) - .optional() - ), + networkMode: core.serialization.property("network_mode", cloud_version_matchmaker_common$$networkMode.optional()), ports: core.serialization - .record( - core.serialization.string(), - core.serialization.lazyObject( - async () => - (await import("../../../../../../../../..")).cloud.version.matchmaker.GameModeRuntimeDockerPort - ) - ) + .record(core.serialization.string(), cloud_version_matchmaker_game_mode$$gameModeRuntimeDockerPort) .optional(), }); @@ -44,7 +36,7 @@ export declare namespace GameModeRuntimeDocker { image_id?: string | null; args?: string[] | null; env?: Record | null; - network_mode?: serializers.cloud.version.matchmaker.NetworkMode.Raw | null; - ports?: Record | null; + network_mode?: cloud.version.matchmaker.NetworkMode.Raw | null; + ports?: Record | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDockerPort.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDockerPort.ts index 1299e62f7d..4dd35a45df 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDockerPort.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDockerPort.ts @@ -2,50 +2,35 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { PortRange as cloud_version_matchmaker_common$$portRange } from "../../common/types/PortRange"; +import { PortProtocol as cloud_version_matchmaker_common$$portProtocol } from "../../common/types/PortProtocol"; +import { ProxyKind as cloud_version_matchmaker_common$$proxyKind } from "../../common/types/ProxyKind"; +import { cloud } from "../../../../../../../../index"; export const GameModeRuntimeDockerPort: core.serialization.ObjectSchema< serializers.cloud.version.matchmaker.GameModeRuntimeDockerPort.Raw, Rivet.cloud.version.matchmaker.GameModeRuntimeDockerPort > = core.serialization.object({ port: core.serialization.number().optional(), - portRange: core.serialization.property( - "port_range", - core.serialization - .lazyObject(async () => (await import("../../../../../../../../..")).cloud.version.matchmaker.PortRange) - .optional() - ), - protocol: core.serialization - .lazy(async () => (await import("../../../../../../../../..")).cloud.version.matchmaker.PortProtocol) - .optional(), - proxy: core.serialization - .lazy(async () => (await import("../../../../../../../../..")).cloud.version.matchmaker.ProxyKind) - .optional(), + portRange: core.serialization.property("port_range", cloud_version_matchmaker_common$$portRange.optional()), + protocol: cloud_version_matchmaker_common$$portProtocol.optional(), + proxy: cloud_version_matchmaker_common$$proxyKind.optional(), devPort: core.serialization.property("dev_port", core.serialization.number().optional()), - devPortRange: core.serialization.property( - "dev_port_range", - core.serialization - .lazyObject(async () => (await import("../../../../../../../../..")).cloud.version.matchmaker.PortRange) - .optional() - ), - devProtocol: core.serialization.property( - "dev_protocol", - core.serialization - .lazy(async () => (await import("../../../../../../../../..")).cloud.version.matchmaker.PortProtocol) - .optional() - ), + devPortRange: core.serialization.property("dev_port_range", cloud_version_matchmaker_common$$portRange.optional()), + devProtocol: core.serialization.property("dev_protocol", cloud_version_matchmaker_common$$portProtocol.optional()), }); export declare namespace GameModeRuntimeDockerPort { interface Raw { port?: number | null; - port_range?: serializers.cloud.version.matchmaker.PortRange.Raw | null; - protocol?: serializers.cloud.version.matchmaker.PortProtocol.Raw | null; - proxy?: serializers.cloud.version.matchmaker.ProxyKind.Raw | null; + port_range?: cloud.version.matchmaker.PortRange.Raw | null; + protocol?: cloud.version.matchmaker.PortProtocol.Raw | null; + proxy?: cloud.version.matchmaker.ProxyKind.Raw | null; dev_port?: number | null; - dev_port_range?: serializers.cloud.version.matchmaker.PortRange.Raw | null; - dev_protocol?: serializers.cloud.version.matchmaker.PortProtocol.Raw | null; + dev_port_range?: cloud.version.matchmaker.PortRange.Raw | null; + dev_protocol?: cloud.version.matchmaker.PortProtocol.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeVerificationConfig.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeVerificationConfig.ts index 33e94fe312..21be3978e3 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeVerificationConfig.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeVerificationConfig.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export const GameModeVerificationConfig: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroup.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroup.ts index cff17539aa..db3fcfbafc 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroup.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroup.ts @@ -2,35 +2,32 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { LobbyGroupRegion as cloud_version_matchmaker_lobby_group$$lobbyGroupRegion } from "./LobbyGroupRegion"; +import { LobbyGroupRuntime as cloud_version_matchmaker_lobby_group$$lobbyGroupRuntime } from "./LobbyGroupRuntime"; +import { cloud } from "../../../../../../../../index"; export const LobbyGroup: core.serialization.ObjectSchema< serializers.cloud.version.matchmaker.LobbyGroup.Raw, Rivet.cloud.version.matchmaker.LobbyGroup > = core.serialization.object({ nameId: core.serialization.property("name_id", core.serialization.string()), - regions: core.serialization.list( - core.serialization.lazyObject( - async () => (await import("../../../../../../../../..")).cloud.version.matchmaker.LobbyGroupRegion - ) - ), + regions: core.serialization.list(cloud_version_matchmaker_lobby_group$$lobbyGroupRegion), maxPlayersNormal: core.serialization.property("max_players_normal", core.serialization.number()), maxPlayersDirect: core.serialization.property("max_players_direct", core.serialization.number()), maxPlayersParty: core.serialization.property("max_players_party", core.serialization.number()), - runtime: core.serialization.lazyObject( - async () => (await import("../../../../../../../../..")).cloud.version.matchmaker.LobbyGroupRuntime - ), + runtime: cloud_version_matchmaker_lobby_group$$lobbyGroupRuntime, }); export declare namespace LobbyGroup { interface Raw { name_id: string; - regions: serializers.cloud.version.matchmaker.LobbyGroupRegion.Raw[]; + regions: cloud.version.matchmaker.LobbyGroupRegion.Raw[]; max_players_normal: number; max_players_direct: number; max_players_party: number; - runtime: serializers.cloud.version.matchmaker.LobbyGroupRuntime.Raw; + runtime: cloud.version.matchmaker.LobbyGroupRuntime.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupIdleLobbiesConfig.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupIdleLobbiesConfig.ts index 9d05d29fca..35c01536b6 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupIdleLobbiesConfig.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupIdleLobbiesConfig.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export const LobbyGroupIdleLobbiesConfig: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRegion.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRegion.ts index 4296fd6e00..031e50f3dc 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRegion.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRegion.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { LobbyGroupIdleLobbiesConfig as cloud_version_matchmaker_lobby_group$$lobbyGroupIdleLobbiesConfig } from "./LobbyGroupIdleLobbiesConfig"; +import { cloud } from "../../../../../../../../index"; export const LobbyGroupRegion: core.serialization.ObjectSchema< serializers.cloud.version.matchmaker.LobbyGroupRegion.Raw, @@ -14,12 +16,7 @@ export const LobbyGroupRegion: core.serialization.ObjectSchema< tierNameId: core.serialization.property("tier_name_id", core.serialization.string()), idleLobbies: core.serialization.property( "idle_lobbies", - core.serialization - .lazyObject( - async () => - (await import("../../../../../../../../..")).cloud.version.matchmaker.LobbyGroupIdleLobbiesConfig - ) - .optional() + cloud_version_matchmaker_lobby_group$$lobbyGroupIdleLobbiesConfig.optional() ), }); @@ -27,6 +24,6 @@ export declare namespace LobbyGroupRegion { interface Raw { region_id: string; tier_name_id: string; - idle_lobbies?: serializers.cloud.version.matchmaker.LobbyGroupIdleLobbiesConfig.Raw | null; + idle_lobbies?: cloud.version.matchmaker.LobbyGroupIdleLobbiesConfig.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntime.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntime.ts index cb42453b63..bd0c9ce82d 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntime.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntime.ts @@ -2,23 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { LobbyGroupRuntimeDocker as cloud_version_matchmaker_lobby_group$$lobbyGroupRuntimeDocker } from "./LobbyGroupRuntimeDocker"; +import { cloud } from "../../../../../../../../index"; export const LobbyGroupRuntime: core.serialization.ObjectSchema< serializers.cloud.version.matchmaker.LobbyGroupRuntime.Raw, Rivet.cloud.version.matchmaker.LobbyGroupRuntime > = core.serialization.object({ - docker: core.serialization - .lazyObject( - async () => (await import("../../../../../../../../..")).cloud.version.matchmaker.LobbyGroupRuntimeDocker - ) - .optional(), + docker: cloud_version_matchmaker_lobby_group$$lobbyGroupRuntimeDocker.optional(), }); export declare namespace LobbyGroupRuntime { interface Raw { - docker?: serializers.cloud.version.matchmaker.LobbyGroupRuntimeDocker.Raw | null; + docker?: cloud.version.matchmaker.LobbyGroupRuntimeDocker.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDocker.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDocker.ts index 7011c762ba..9774364ede 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDocker.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDocker.ts @@ -2,9 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { LobbyGroupRuntimeDockerEnvVar as cloud_version_matchmaker_lobby_group$$lobbyGroupRuntimeDockerEnvVar } from "./LobbyGroupRuntimeDockerEnvVar"; +import { NetworkMode as cloud_version_matchmaker_common$$networkMode } from "../../common/types/NetworkMode"; +import { LobbyGroupRuntimeDockerPort as cloud_version_matchmaker_lobby_group$$lobbyGroupRuntimeDockerPort } from "./LobbyGroupRuntimeDockerPort"; +import { cloud } from "../../../../../../../../index"; export const LobbyGroupRuntimeDocker: core.serialization.ObjectSchema< serializers.cloud.version.matchmaker.LobbyGroupRuntimeDocker.Raw, @@ -14,33 +18,18 @@ export const LobbyGroupRuntimeDocker: core.serialization.ObjectSchema< args: core.serialization.list(core.serialization.string()), envVars: core.serialization.property( "env_vars", - core.serialization.list( - core.serialization.lazyObject( - async () => - (await import("../../../../../../../../..")).cloud.version.matchmaker.LobbyGroupRuntimeDockerEnvVar - ) - ) - ), - networkMode: core.serialization.property( - "network_mode", - core.serialization - .lazy(async () => (await import("../../../../../../../../..")).cloud.version.matchmaker.NetworkMode) - .optional() - ), - ports: core.serialization.list( - core.serialization.lazyObject( - async () => - (await import("../../../../../../../../..")).cloud.version.matchmaker.LobbyGroupRuntimeDockerPort - ) + core.serialization.list(cloud_version_matchmaker_lobby_group$$lobbyGroupRuntimeDockerEnvVar) ), + networkMode: core.serialization.property("network_mode", cloud_version_matchmaker_common$$networkMode.optional()), + ports: core.serialization.list(cloud_version_matchmaker_lobby_group$$lobbyGroupRuntimeDockerPort), }); export declare namespace LobbyGroupRuntimeDocker { interface Raw { build_id?: string | null; args: string[]; - env_vars: serializers.cloud.version.matchmaker.LobbyGroupRuntimeDockerEnvVar.Raw[]; - network_mode?: serializers.cloud.version.matchmaker.NetworkMode.Raw | null; - ports: serializers.cloud.version.matchmaker.LobbyGroupRuntimeDockerPort.Raw[]; + env_vars: cloud.version.matchmaker.LobbyGroupRuntimeDockerEnvVar.Raw[]; + network_mode?: cloud.version.matchmaker.NetworkMode.Raw | null; + ports: cloud.version.matchmaker.LobbyGroupRuntimeDockerPort.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDockerEnvVar.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDockerEnvVar.ts index 49ad2511f8..e5832a1914 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDockerEnvVar.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDockerEnvVar.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export const LobbyGroupRuntimeDockerEnvVar: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDockerPort.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDockerPort.ts index 70b579b506..c12b2314ed 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDockerPort.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDockerPort.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { PortRange as cloud_version_matchmaker_common$$portRange } from "../../common/types/PortRange"; +import { PortProtocol as cloud_version_matchmaker_common$$portProtocol } from "../../common/types/PortProtocol"; +import { cloud } from "../../../../../../../../index"; export const LobbyGroupRuntimeDockerPort: core.serialization.ObjectSchema< serializers.cloud.version.matchmaker.LobbyGroupRuntimeDockerPort.Raw, @@ -12,25 +15,15 @@ export const LobbyGroupRuntimeDockerPort: core.serialization.ObjectSchema< > = core.serialization.object({ label: core.serialization.string(), targetPort: core.serialization.property("target_port", core.serialization.number().optional()), - portRange: core.serialization.property( - "port_range", - core.serialization - .lazyObject(async () => (await import("../../../../../../../../..")).cloud.version.matchmaker.PortRange) - .optional() - ), - proxyProtocol: core.serialization.property( - "proxy_protocol", - core.serialization.lazy( - async () => (await import("../../../../../../../../..")).cloud.version.matchmaker.PortProtocol - ) - ), + portRange: core.serialization.property("port_range", cloud_version_matchmaker_common$$portRange.optional()), + proxyProtocol: core.serialization.property("proxy_protocol", cloud_version_matchmaker_common$$portProtocol), }); export declare namespace LobbyGroupRuntimeDockerPort { interface Raw { label: string; target_port?: number | null; - port_range?: serializers.cloud.version.matchmaker.PortRange.Raw | null; - proxy_protocol: serializers.cloud.version.matchmaker.PortProtocol.Raw; + port_range?: cloud.version.matchmaker.PortRange.Raw | null; + proxy_protocol: cloud.version.matchmaker.PortProtocol.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/types/Config.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/types/Config.ts index d8d3053d99..07632347e0 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/types/Config.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/resources/matchmaker/types/Config.ts @@ -2,9 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { GameMode as cloud_version_matchmaker_game_mode$$gameMode } from "../resources/gameMode/types/GameMode"; +import { Captcha as cloud_version_matchmaker_common$$captcha } from "../resources/common/types/Captcha"; +import { GameModeRegion as cloud_version_matchmaker_game_mode$$gameModeRegion } from "../resources/gameMode/types/GameModeRegion"; +import { GameModeRuntimeDocker as cloud_version_matchmaker_game_mode$$gameModeRuntimeDocker } from "../resources/gameMode/types/GameModeRuntimeDocker"; +import { GameModeIdleLobbiesConfig as cloud_version_matchmaker_game_mode$$gameModeIdleLobbiesConfig } from "../resources/gameMode/types/GameModeIdleLobbiesConfig"; +import { LobbyGroup as cloud_version_matchmaker_lobby_group$$lobbyGroup } from "../resources/lobbyGroup/types/LobbyGroup"; +import { cloud } from "../../../../../../index"; export const Config: core.serialization.ObjectSchema< serializers.cloud.version.matchmaker.Config.Raw, @@ -12,66 +19,40 @@ export const Config: core.serialization.ObjectSchema< > = core.serialization.object({ gameModes: core.serialization.property( "game_modes", - core.serialization - .record( - core.serialization.string(), - core.serialization.lazyObject( - async () => (await import("../../../../../../..")).cloud.version.matchmaker.GameMode - ) - ) - .optional() + core.serialization.record(core.serialization.string(), cloud_version_matchmaker_game_mode$$gameMode).optional() ), - captcha: core.serialization - .lazyObject(async () => (await import("../../../../../../..")).cloud.version.matchmaker.Captcha) - .optional(), + captcha: cloud_version_matchmaker_common$$captcha.optional(), devHostname: core.serialization.property("dev_hostname", core.serialization.string().optional()), regions: core.serialization - .record( - core.serialization.string(), - core.serialization.lazyObject( - async () => (await import("../../../../../../..")).cloud.version.matchmaker.GameModeRegion - ) - ) + .record(core.serialization.string(), cloud_version_matchmaker_game_mode$$gameModeRegion) .optional(), maxPlayers: core.serialization.property("max_players", core.serialization.number().optional()), maxPlayersDirect: core.serialization.property("max_players_direct", core.serialization.number().optional()), maxPlayersParty: core.serialization.property("max_players_party", core.serialization.number().optional()), - docker: core.serialization - .lazyObject(async () => (await import("../../../../../../..")).cloud.version.matchmaker.GameModeRuntimeDocker) - .optional(), + docker: cloud_version_matchmaker_game_mode$$gameModeRuntimeDocker.optional(), tier: core.serialization.string().optional(), idleLobbies: core.serialization.property( "idle_lobbies", - core.serialization - .lazyObject( - async () => (await import("../../../../../../..")).cloud.version.matchmaker.GameModeIdleLobbiesConfig - ) - .optional() + cloud_version_matchmaker_game_mode$$gameModeIdleLobbiesConfig.optional() ), lobbyGroups: core.serialization.property( "lobby_groups", - core.serialization - .list( - core.serialization.lazyObject( - async () => (await import("../../../../../../..")).cloud.version.matchmaker.LobbyGroup - ) - ) - .optional() + core.serialization.list(cloud_version_matchmaker_lobby_group$$lobbyGroup).optional() ), }); export declare namespace Config { interface Raw { - game_modes?: Record | null; - captcha?: serializers.cloud.version.matchmaker.Captcha.Raw | null; + game_modes?: Record | null; + captcha?: cloud.version.matchmaker.Captcha.Raw | null; dev_hostname?: string | null; - regions?: Record | null; + regions?: Record | null; max_players?: number | null; max_players_direct?: number | null; max_players_party?: number | null; - docker?: serializers.cloud.version.matchmaker.GameModeRuntimeDocker.Raw | null; + docker?: cloud.version.matchmaker.GameModeRuntimeDocker.Raw | null; tier?: string | null; - idle_lobbies?: serializers.cloud.version.matchmaker.GameModeIdleLobbiesConfig.Raw | null; - lobby_groups?: serializers.cloud.version.matchmaker.LobbyGroup.Raw[] | null; + idle_lobbies?: cloud.version.matchmaker.GameModeIdleLobbiesConfig.Raw | null; + lobby_groups?: cloud.version.matchmaker.LobbyGroup.Raw[] | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/types/Config.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/types/Config.ts index 463beb4d8a..40930a8350 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/types/Config.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/types/Config.ts @@ -2,37 +2,33 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Config as cloud_version_engine$$config } from "../resources/engine/types/Config"; +import { Config as cloud_version_cdn$$config } from "../resources/cdn/types/Config"; +import { Config as cloud_version_matchmaker$$config } from "../resources/matchmaker/types/Config"; +import { Config as cloud_version_kv$$config } from "../resources/kv/types/Config"; +import { Config as cloud_version_identity$$config } from "../resources/identity/types/Config"; +import { cloud } from "../../../../index"; export const Config: core.serialization.ObjectSchema = core.serialization.object({ scripts: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), - engine: core.serialization - .lazyObject(async () => (await import("../../../../..")).cloud.version.engine.Config) - .optional(), - cdn: core.serialization - .lazyObject(async () => (await import("../../../../..")).cloud.version.cdn.Config) - .optional(), - matchmaker: core.serialization - .lazyObject(async () => (await import("../../../../..")).cloud.version.matchmaker.Config) - .optional(), - kv: core.serialization - .lazyObject(async () => (await import("../../../../..")).cloud.version.kv.Config) - .optional(), - identity: core.serialization - .lazyObject(async () => (await import("../../../../..")).cloud.version.identity.Config) - .optional(), + engine: cloud_version_engine$$config.optional(), + cdn: cloud_version_cdn$$config.optional(), + matchmaker: cloud_version_matchmaker$$config.optional(), + kv: cloud_version_kv$$config.optional(), + identity: cloud_version_identity$$config.optional(), }); export declare namespace Config { interface Raw { scripts?: Record | null; - engine?: serializers.cloud.version.engine.Config.Raw | null; - cdn?: serializers.cloud.version.cdn.Config.Raw | null; - matchmaker?: serializers.cloud.version.matchmaker.Config.Raw | null; - kv?: serializers.cloud.version.kv.Config.Raw | null; - identity?: serializers.cloud.version.identity.Config.Raw | null; + engine?: cloud.version.engine.Config.Raw | null; + cdn?: cloud.version.cdn.Config.Raw | null; + matchmaker?: cloud.version.matchmaker.Config.Raw | null; + kv?: cloud.version.kv.Config.Raw | null; + identity?: cloud.version.identity.Config.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/types/Full.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/types/Full.ts index 21d2a44da7..dc9b7fce03 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/types/Full.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/types/Full.ts @@ -2,29 +2,27 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Timestamp as common$$timestamp } from "../../../../common/types/Timestamp"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { Config as cloud_version$$config } from "./Config"; +import { common, cloud } from "../../../../index"; export const Full: core.serialization.ObjectSchema = core.serialization.object({ versionId: core.serialization.property("version_id", core.serialization.string()), - createTs: core.serialization.property( - "create_ts", - core.serialization.lazy(async () => (await import("../../../../..")).Timestamp) - ), - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), - config: core.serialization.lazyObject(async () => (await import("../../../../..")).cloud.version.Config), + createTs: core.serialization.property("create_ts", common$$timestamp), + displayName: core.serialization.property("display_name", common$$displayName), + config: cloud_version$$config, }); export declare namespace Full { interface Raw { version_id: string; - create_ts: serializers.Timestamp.Raw; - display_name: serializers.DisplayName.Raw; - config: serializers.cloud.version.Config.Raw; + create_ts: common.Timestamp.Raw; + display_name: common.DisplayName.Raw; + config: cloud.version.Config.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/types/Summary.ts b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/types/Summary.ts index c8f6bb04dc..ccfaba0fc9 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/resources/version/types/Summary.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/resources/version/types/Summary.ts @@ -2,29 +2,26 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Timestamp as common$$timestamp } from "../../../../common/types/Timestamp"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { common } from "../../../../index"; export const Summary: core.serialization.ObjectSchema< serializers.cloud.version.Summary.Raw, Rivet.cloud.version.Summary > = core.serialization.object({ versionId: core.serialization.property("version_id", core.serialization.string()), - createTs: core.serialization.property( - "create_ts", - core.serialization.lazy(async () => (await import("../../../../..")).Timestamp) - ), - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), + createTs: core.serialization.property("create_ts", common$$timestamp), + displayName: core.serialization.property("display_name", common$$displayName), }); export declare namespace Summary { interface Raw { version_id: string; - create_ts: serializers.Timestamp.Raw; - display_name: serializers.DisplayName.Raw; + create_ts: common.Timestamp.Raw; + display_name: common.DisplayName.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapAccess.ts b/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapAccess.ts index 7767ceb821..ff2dd00e03 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapAccess.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapAccess.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const BootstrapAccess: core.serialization.Schema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapCaptcha.ts b/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapCaptcha.ts index b3c1691df0..4fa3292482 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapCaptcha.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapCaptcha.ts @@ -2,21 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { BootstrapCaptchaTurnstile as cloud$$bootstrapCaptchaTurnstile } from "./BootstrapCaptchaTurnstile"; +import { cloud } from "../../index"; export const BootstrapCaptcha: core.serialization.ObjectSchema< serializers.cloud.BootstrapCaptcha.Raw, Rivet.cloud.BootstrapCaptcha > = core.serialization.object({ - turnstile: core.serialization - .lazyObject(async () => (await import("../../..")).cloud.BootstrapCaptchaTurnstile) - .optional(), + turnstile: cloud$$bootstrapCaptchaTurnstile.optional(), }); export declare namespace BootstrapCaptcha { interface Raw { - turnstile?: serializers.cloud.BootstrapCaptchaTurnstile.Raw | null; + turnstile?: cloud.BootstrapCaptchaTurnstile.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapCaptchaTurnstile.ts b/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapCaptchaTurnstile.ts index 7879860d50..994b9afeca 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapCaptchaTurnstile.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapCaptchaTurnstile.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const BootstrapCaptchaTurnstile: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapCluster.ts b/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapCluster.ts index b2ba50b1f8..2fb5e2077f 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapCluster.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapCluster.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const BootstrapCluster: core.serialization.Schema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapDomains.ts b/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapDomains.ts index 62781e5321..454f0b5d2f 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapDomains.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapDomains.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const BootstrapDomains: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapLoginMethods.ts b/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapLoginMethods.ts index 625e142551..f69aa8baf0 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapLoginMethods.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapLoginMethods.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const BootstrapLoginMethods: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapOrigins.ts b/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapOrigins.ts index 8c719a4738..bc5727b92c 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapOrigins.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapOrigins.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const BootstrapOrigins: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapResponse.ts b/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapResponse.ts index acd331e3e3..76732cf85d 100644 --- a/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/cloud/types/BootstrapResponse.ts @@ -2,32 +2,36 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { BootstrapCluster as cloud$$bootstrapCluster } from "./BootstrapCluster"; +import { BootstrapAccess as cloud$$bootstrapAccess } from "./BootstrapAccess"; +import { BootstrapDomains as cloud$$bootstrapDomains } from "./BootstrapDomains"; +import { BootstrapOrigins as cloud$$bootstrapOrigins } from "./BootstrapOrigins"; +import { BootstrapCaptcha as cloud$$bootstrapCaptcha } from "./BootstrapCaptcha"; +import { BootstrapLoginMethods as cloud$$bootstrapLoginMethods } from "./BootstrapLoginMethods"; +import { cloud } from "../../index"; export const BootstrapResponse: core.serialization.ObjectSchema< serializers.cloud.BootstrapResponse.Raw, Rivet.cloud.BootstrapResponse > = core.serialization.object({ - cluster: core.serialization.lazy(async () => (await import("../../..")).cloud.BootstrapCluster), - access: core.serialization.lazy(async () => (await import("../../..")).cloud.BootstrapAccess), - domains: core.serialization.lazyObject(async () => (await import("../../..")).cloud.BootstrapDomains).optional(), - origins: core.serialization.lazyObject(async () => (await import("../../..")).cloud.BootstrapOrigins), - captcha: core.serialization.lazyObject(async () => (await import("../../..")).cloud.BootstrapCaptcha), - loginMethods: core.serialization.property( - "login_methods", - core.serialization.lazyObject(async () => (await import("../../..")).cloud.BootstrapLoginMethods) - ), + cluster: cloud$$bootstrapCluster, + access: cloud$$bootstrapAccess, + domains: cloud$$bootstrapDomains.optional(), + origins: cloud$$bootstrapOrigins, + captcha: cloud$$bootstrapCaptcha, + loginMethods: core.serialization.property("login_methods", cloud$$bootstrapLoginMethods), }); export declare namespace BootstrapResponse { interface Raw { - cluster: serializers.cloud.BootstrapCluster.Raw; - access: serializers.cloud.BootstrapAccess.Raw; - domains?: serializers.cloud.BootstrapDomains.Raw | null; - origins: serializers.cloud.BootstrapOrigins.Raw; - captcha: serializers.cloud.BootstrapCaptcha.Raw; - login_methods: serializers.cloud.BootstrapLoginMethods.Raw; + cluster: cloud.BootstrapCluster.Raw; + access: cloud.BootstrapAccess.Raw; + domains?: cloud.BootstrapDomains.Raw | null; + origins: cloud.BootstrapOrigins.Raw; + captcha: cloud.BootstrapCaptcha.Raw; + login_methods: cloud.BootstrapLoginMethods.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/common/types/AccountNumber.ts b/sdks/full/typescript/src/serialization/resources/common/types/AccountNumber.ts index 0bfd7af718..3cf8a4de6c 100644 --- a/sdks/full/typescript/src/serialization/resources/common/types/AccountNumber.ts +++ b/sdks/full/typescript/src/serialization/resources/common/types/AccountNumber.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const AccountNumber: core.serialization.Schema = diff --git a/sdks/full/typescript/src/serialization/resources/common/types/Bio.ts b/sdks/full/typescript/src/serialization/resources/common/types/Bio.ts index 0f45d02993..a791f395ff 100644 --- a/sdks/full/typescript/src/serialization/resources/common/types/Bio.ts +++ b/sdks/full/typescript/src/serialization/resources/common/types/Bio.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const Bio: core.serialization.Schema = core.serialization.string(); diff --git a/sdks/full/typescript/src/serialization/resources/common/types/DisplayName.ts b/sdks/full/typescript/src/serialization/resources/common/types/DisplayName.ts index f315a99305..e9852bbde3 100644 --- a/sdks/full/typescript/src/serialization/resources/common/types/DisplayName.ts +++ b/sdks/full/typescript/src/serialization/resources/common/types/DisplayName.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const DisplayName: core.serialization.Schema = diff --git a/sdks/full/typescript/src/serialization/resources/common/types/Email.ts b/sdks/full/typescript/src/serialization/resources/common/types/Email.ts index eb7088ecb5..a790c2c5c3 100644 --- a/sdks/full/typescript/src/serialization/resources/common/types/Email.ts +++ b/sdks/full/typescript/src/serialization/resources/common/types/Email.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const Email: core.serialization.Schema = core.serialization.string(); diff --git a/sdks/full/typescript/src/serialization/resources/common/types/EmptyObject.ts b/sdks/full/typescript/src/serialization/resources/common/types/EmptyObject.ts index 3b824b9861..b6657cd174 100644 --- a/sdks/full/typescript/src/serialization/resources/common/types/EmptyObject.ts +++ b/sdks/full/typescript/src/serialization/resources/common/types/EmptyObject.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const EmptyObject: core.serialization.ObjectSchema = diff --git a/sdks/full/typescript/src/serialization/resources/common/types/ErrorBody.ts b/sdks/full/typescript/src/serialization/resources/common/types/ErrorBody.ts index c36a596cf5..6360c55333 100644 --- a/sdks/full/typescript/src/serialization/resources/common/types/ErrorBody.ts +++ b/sdks/full/typescript/src/serialization/resources/common/types/ErrorBody.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { ErrorMetadata as common$$errorMetadata } from "./ErrorMetadata"; +import { common } from "../../index"; export const ErrorBody: core.serialization.ObjectSchema = core.serialization.object({ @@ -12,7 +14,7 @@ export const ErrorBody: core.serialization.ObjectSchema (await import("../../..")).ErrorMetadata).optional(), + metadata: common$$errorMetadata.optional(), }); export declare namespace ErrorBody { @@ -21,6 +23,6 @@ export declare namespace ErrorBody { message: string; ray_id: string; documentation?: string | null; - metadata?: (serializers.ErrorMetadata.Raw | undefined) | null; + metadata?: (common.ErrorMetadata.Raw | undefined) | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/common/types/ErrorMetadata.ts b/sdks/full/typescript/src/serialization/resources/common/types/ErrorMetadata.ts index c060927b7b..df2633a06a 100644 --- a/sdks/full/typescript/src/serialization/resources/common/types/ErrorMetadata.ts +++ b/sdks/full/typescript/src/serialization/resources/common/types/ErrorMetadata.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const ErrorMetadata: core.serialization.Schema = diff --git a/sdks/full/typescript/src/serialization/resources/common/types/GlobalEventNotification.ts b/sdks/full/typescript/src/serialization/resources/common/types/GlobalEventNotification.ts index f43bca0333..f551214041 100644 --- a/sdks/full/typescript/src/serialization/resources/common/types/GlobalEventNotification.ts +++ b/sdks/full/typescript/src/serialization/resources/common/types/GlobalEventNotification.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const GlobalEventNotification: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/common/types/Identifier.ts b/sdks/full/typescript/src/serialization/resources/common/types/Identifier.ts index 043a639c46..d214516c24 100644 --- a/sdks/full/typescript/src/serialization/resources/common/types/Identifier.ts +++ b/sdks/full/typescript/src/serialization/resources/common/types/Identifier.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const Identifier: core.serialization.Schema = diff --git a/sdks/full/typescript/src/serialization/resources/common/types/Jwt.ts b/sdks/full/typescript/src/serialization/resources/common/types/Jwt.ts index 936f045bfa..0527bf6e24 100644 --- a/sdks/full/typescript/src/serialization/resources/common/types/Jwt.ts +++ b/sdks/full/typescript/src/serialization/resources/common/types/Jwt.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const Jwt: core.serialization.Schema = core.serialization.string(); diff --git a/sdks/full/typescript/src/serialization/resources/common/types/Timestamp.ts b/sdks/full/typescript/src/serialization/resources/common/types/Timestamp.ts index cb3829cc59..683755ac05 100644 --- a/sdks/full/typescript/src/serialization/resources/common/types/Timestamp.ts +++ b/sdks/full/typescript/src/serialization/resources/common/types/Timestamp.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const Timestamp: core.serialization.Schema = diff --git a/sdks/full/typescript/src/serialization/resources/common/types/ValidationError.ts b/sdks/full/typescript/src/serialization/resources/common/types/ValidationError.ts index 768f365ff5..0a779d0429 100644 --- a/sdks/full/typescript/src/serialization/resources/common/types/ValidationError.ts +++ b/sdks/full/typescript/src/serialization/resources/common/types/ValidationError.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const ValidationError: core.serialization.ObjectSchema = diff --git a/sdks/full/typescript/src/serialization/resources/common/types/WatchQuery.ts b/sdks/full/typescript/src/serialization/resources/common/types/WatchQuery.ts index 8bacba63f9..36b6bbbba5 100644 --- a/sdks/full/typescript/src/serialization/resources/common/types/WatchQuery.ts +++ b/sdks/full/typescript/src/serialization/resources/common/types/WatchQuery.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const WatchQuery: core.serialization.Schema = core.serialization diff --git a/sdks/full/typescript/src/serialization/resources/common/types/WatchResponse.ts b/sdks/full/typescript/src/serialization/resources/common/types/WatchResponse.ts index c19fb79c53..9180fc3b44 100644 --- a/sdks/full/typescript/src/serialization/resources/common/types/WatchResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/common/types/WatchResponse.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const WatchResponse: core.serialization.ObjectSchema = diff --git a/sdks/full/typescript/src/serialization/resources/game/resources/common/types/Handle.ts b/sdks/full/typescript/src/serialization/resources/game/resources/common/types/Handle.ts index 24cf43bc32..f7a81e387e 100644 --- a/sdks/full/typescript/src/serialization/resources/game/resources/common/types/Handle.ts +++ b/sdks/full/typescript/src/serialization/resources/game/resources/common/types/Handle.ts @@ -2,21 +2,18 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Identifier as common$$identifier } from "../../../../common/types/Identifier"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { common } from "../../../../index"; export const Handle: core.serialization.ObjectSchema = core.serialization.object({ gameId: core.serialization.property("game_id", core.serialization.string()), - nameId: core.serialization.property( - "name_id", - core.serialization.lazy(async () => (await import("../../../../..")).Identifier) - ), - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), + nameId: core.serialization.property("name_id", common$$identifier), + displayName: core.serialization.property("display_name", common$$displayName), logoUrl: core.serialization.property("logo_url", core.serialization.string().optional()), bannerUrl: core.serialization.property("banner_url", core.serialization.string().optional()), }); @@ -24,8 +21,8 @@ export const Handle: core.serialization.ObjectSchema = core.serialization.object({ - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), + displayName: core.serialization.property("display_name", common$$displayName), }); export declare namespace LeaderboardCategory { interface Raw { - display_name: serializers.DisplayName.Raw; + display_name: common.DisplayName.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/game/resources/common/types/PlatformLink.ts b/sdks/full/typescript/src/serialization/resources/game/resources/common/types/PlatformLink.ts index 4608827356..7e8c60744b 100644 --- a/sdks/full/typescript/src/serialization/resources/game/resources/common/types/PlatformLink.ts +++ b/sdks/full/typescript/src/serialization/resources/game/resources/common/types/PlatformLink.ts @@ -2,22 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { common } from "../../../../index"; export const PlatformLink: core.serialization.ObjectSchema = core.serialization.object({ - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), + displayName: core.serialization.property("display_name", common$$displayName), url: core.serialization.string(), }); export declare namespace PlatformLink { interface Raw { - display_name: serializers.DisplayName.Raw; + display_name: common.DisplayName.Raw; url: string; } } diff --git a/sdks/full/typescript/src/serialization/resources/game/resources/common/types/Profile.ts b/sdks/full/typescript/src/serialization/resources/game/resources/common/types/Profile.ts index b2f4e340e9..545d01f398 100644 --- a/sdks/full/typescript/src/serialization/resources/game/resources/common/types/Profile.ts +++ b/sdks/full/typescript/src/serialization/resources/game/resources/common/types/Profile.ts @@ -2,44 +2,38 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { Summary as group_common$$summary } from "../../../../group/resources/common/types/Summary"; +import { PlatformLink as game_common$$platformLink } from "./PlatformLink"; +import { LeaderboardCategory as game_common$$leaderboardCategory } from "./LeaderboardCategory"; +import { common, group, game } from "../../../../index"; export const Profile: core.serialization.ObjectSchema = core.serialization.object({ gameId: core.serialization.property("game_id", core.serialization.string()), nameId: core.serialization.property("name_id", core.serialization.string()), - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), + displayName: core.serialization.property("display_name", common$$displayName), logoUrl: core.serialization.property("logo_url", core.serialization.string().optional()), bannerUrl: core.serialization.property("banner_url", core.serialization.string().optional()), url: core.serialization.string(), - developer: core.serialization.lazyObject(async () => (await import("../../../../..")).group.Summary), + developer: group_common$$summary, tags: core.serialization.list(core.serialization.string()), description: core.serialization.string(), - platforms: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).game.PlatformLink) - ), + platforms: core.serialization.list(game_common$$platformLink), recommendedGroups: core.serialization.property( "recommended_groups", - core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).group.Summary) - ) + core.serialization.list(group_common$$summary) ), identityLeaderboardCategories: core.serialization.property( "identity_leaderboard_categories", - core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).game.LeaderboardCategory) - ) + core.serialization.list(game_common$$leaderboardCategory) ), groupLeaderboardCategories: core.serialization.property( "group_leaderboard_categories", - core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).game.LeaderboardCategory) - ) + core.serialization.list(game_common$$leaderboardCategory) ), }); @@ -47,16 +41,16 @@ export declare namespace Profile { interface Raw { game_id: string; name_id: string; - display_name: serializers.DisplayName.Raw; + display_name: common.DisplayName.Raw; logo_url?: string | null; banner_url?: string | null; url: string; - developer: serializers.group.Summary.Raw; + developer: group.Summary.Raw; tags: string[]; description: string; - platforms: serializers.game.PlatformLink.Raw[]; - recommended_groups: serializers.group.Summary.Raw[]; - identity_leaderboard_categories: serializers.game.LeaderboardCategory.Raw[]; - group_leaderboard_categories: serializers.game.LeaderboardCategory.Raw[]; + platforms: game.PlatformLink.Raw[]; + recommended_groups: group.Summary.Raw[]; + identity_leaderboard_categories: game.LeaderboardCategory.Raw[]; + group_leaderboard_categories: game.LeaderboardCategory.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/game/resources/common/types/Stat.ts b/sdks/full/typescript/src/serialization/resources/game/resources/common/types/Stat.ts index be63a02285..47944a448f 100644 --- a/sdks/full/typescript/src/serialization/resources/game/resources/common/types/Stat.ts +++ b/sdks/full/typescript/src/serialization/resources/game/resources/common/types/Stat.ts @@ -2,19 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { StatConfig as game_common$$statConfig } from "./StatConfig"; +import { game } from "../../../../index"; export const Stat: core.serialization.ObjectSchema = core.serialization.object({ - config: core.serialization.lazyObject(async () => (await import("../../../../..")).game.StatConfig), + config: game_common$$statConfig, overallValue: core.serialization.property("overall_value", core.serialization.number()), }); export declare namespace Stat { interface Raw { - config: serializers.game.StatConfig.Raw; + config: game.StatConfig.Raw; overall_value: number; } } diff --git a/sdks/full/typescript/src/serialization/resources/game/resources/common/types/StatAggregationMethod.ts b/sdks/full/typescript/src/serialization/resources/game/resources/common/types/StatAggregationMethod.ts index 186ec1bd99..11f159258f 100644 --- a/sdks/full/typescript/src/serialization/resources/game/resources/common/types/StatAggregationMethod.ts +++ b/sdks/full/typescript/src/serialization/resources/game/resources/common/types/StatAggregationMethod.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const StatAggregationMethod: core.serialization.Schema< diff --git a/sdks/full/typescript/src/serialization/resources/game/resources/common/types/StatConfig.ts b/sdks/full/typescript/src/serialization/resources/game/resources/common/types/StatConfig.ts index 0aa85520ee..d5acc6d6cb 100644 --- a/sdks/full/typescript/src/serialization/resources/game/resources/common/types/StatConfig.ts +++ b/sdks/full/typescript/src/serialization/resources/game/resources/common/types/StatConfig.ts @@ -2,22 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { StatFormatMethod as game_common$$statFormatMethod } from "./StatFormatMethod"; +import { StatAggregationMethod as game_common$$statAggregationMethod } from "./StatAggregationMethod"; +import { StatSortingMethod as game_common$$statSortingMethod } from "./StatSortingMethod"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { game, common } from "../../../../index"; export const StatConfig: core.serialization.ObjectSchema = core.serialization.object({ recordId: core.serialization.property("record_id", core.serialization.string()), iconId: core.serialization.property("icon_id", core.serialization.string()), - format: core.serialization.lazy(async () => (await import("../../../../..")).game.StatFormatMethod), - aggregation: core.serialization.lazy(async () => (await import("../../../../..")).game.StatAggregationMethod), - sorting: core.serialization.lazy(async () => (await import("../../../../..")).game.StatSortingMethod), + format: game_common$$statFormatMethod, + aggregation: game_common$$statAggregationMethod, + sorting: game_common$$statSortingMethod, priority: core.serialization.number(), - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), + displayName: core.serialization.property("display_name", common$$displayName), postfixSingular: core.serialization.property("postfix_singular", core.serialization.string().optional()), postfixPlural: core.serialization.property("postfix_plural", core.serialization.string().optional()), prefixSingular: core.serialization.property("prefix_singular", core.serialization.string().optional()), @@ -28,11 +30,11 @@ export declare namespace StatConfig { interface Raw { record_id: string; icon_id: string; - format: serializers.game.StatFormatMethod.Raw; - aggregation: serializers.game.StatAggregationMethod.Raw; - sorting: serializers.game.StatSortingMethod.Raw; + format: game.StatFormatMethod.Raw; + aggregation: game.StatAggregationMethod.Raw; + sorting: game.StatSortingMethod.Raw; priority: number; - display_name: serializers.DisplayName.Raw; + display_name: common.DisplayName.Raw; postfix_singular?: string | null; postfix_plural?: string | null; prefix_singular?: string | null; diff --git a/sdks/full/typescript/src/serialization/resources/game/resources/common/types/StatFormatMethod.ts b/sdks/full/typescript/src/serialization/resources/game/resources/common/types/StatFormatMethod.ts index a2b4619437..858e57f87f 100644 --- a/sdks/full/typescript/src/serialization/resources/game/resources/common/types/StatFormatMethod.ts +++ b/sdks/full/typescript/src/serialization/resources/game/resources/common/types/StatFormatMethod.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const StatFormatMethod: core.serialization.Schema< diff --git a/sdks/full/typescript/src/serialization/resources/game/resources/common/types/StatSortingMethod.ts b/sdks/full/typescript/src/serialization/resources/game/resources/common/types/StatSortingMethod.ts index 68589e2efd..83b2ad0612 100644 --- a/sdks/full/typescript/src/serialization/resources/game/resources/common/types/StatSortingMethod.ts +++ b/sdks/full/typescript/src/serialization/resources/game/resources/common/types/StatSortingMethod.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const StatSortingMethod: core.serialization.Schema< diff --git a/sdks/full/typescript/src/serialization/resources/game/resources/common/types/StatSummary.ts b/sdks/full/typescript/src/serialization/resources/game/resources/common/types/StatSummary.ts index f32104e911..ca643493a1 100644 --- a/sdks/full/typescript/src/serialization/resources/game/resources/common/types/StatSummary.ts +++ b/sdks/full/typescript/src/serialization/resources/game/resources/common/types/StatSummary.ts @@ -2,21 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Handle as game_common$$handle } from "./Handle"; +import { Stat as game_common$$stat } from "./Stat"; +import { game } from "../../../../index"; export const StatSummary: core.serialization.ObjectSchema = core.serialization.object({ - game: core.serialization.lazyObject(async () => (await import("../../../../..")).game.Handle), - stats: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).game.Stat) - ), + game: game_common$$handle, + stats: core.serialization.list(game_common$$stat), }); export declare namespace StatSummary { interface Raw { - game: serializers.game.Handle.Raw; - stats: serializers.game.Stat.Raw[]; + game: game.Handle.Raw; + stats: game.Stat.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/game/resources/common/types/Summary.ts b/sdks/full/typescript/src/serialization/resources/game/resources/common/types/Summary.ts index c3ee059d6b..3f1d1ad3e1 100644 --- a/sdks/full/typescript/src/serialization/resources/game/resources/common/types/Summary.ts +++ b/sdks/full/typescript/src/serialization/resources/game/resources/common/types/Summary.ts @@ -2,37 +2,35 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Identifier as common$$identifier } from "../../../../common/types/Identifier"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { Handle as group_common$$handle } from "../../../../group/resources/common/types/Handle"; +import { common, group } from "../../../../index"; export const Summary: core.serialization.ObjectSchema = core.serialization.object({ gameId: core.serialization.property("game_id", core.serialization.string()), - nameId: core.serialization.property( - "name_id", - core.serialization.lazy(async () => (await import("../../../../..")).Identifier) - ), - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), + nameId: core.serialization.property("name_id", common$$identifier), + displayName: core.serialization.property("display_name", common$$displayName), logoUrl: core.serialization.property("logo_url", core.serialization.string().optional()), bannerUrl: core.serialization.property("banner_url", core.serialization.string().optional()), url: core.serialization.string(), - developer: core.serialization.lazyObject(async () => (await import("../../../../..")).group.Handle), + developer: group_common$$handle, totalPlayerCount: core.serialization.property("total_player_count", core.serialization.number()), }); export declare namespace Summary { interface Raw { game_id: string; - name_id: serializers.Identifier.Raw; - display_name: serializers.DisplayName.Raw; + name_id: common.Identifier.Raw; + display_name: common.DisplayName.Raw; logo_url?: string | null; banner_url?: string | null; url: string; - developer: serializers.group.Handle.Raw; + developer: group.Handle.Raw; total_player_count: number; } } diff --git a/sdks/full/typescript/src/serialization/resources/geo/resources/common/types/Coord.ts b/sdks/full/typescript/src/serialization/resources/geo/resources/common/types/Coord.ts index c62dbff1b5..7d74fc7318 100644 --- a/sdks/full/typescript/src/serialization/resources/geo/resources/common/types/Coord.ts +++ b/sdks/full/typescript/src/serialization/resources/geo/resources/common/types/Coord.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const Coord: core.serialization.ObjectSchema = diff --git a/sdks/full/typescript/src/serialization/resources/geo/resources/common/types/Distance.ts b/sdks/full/typescript/src/serialization/resources/geo/resources/common/types/Distance.ts index 1f842b82a7..4e3185c4df 100644 --- a/sdks/full/typescript/src/serialization/resources/geo/resources/common/types/Distance.ts +++ b/sdks/full/typescript/src/serialization/resources/geo/resources/common/types/Distance.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const Distance: core.serialization.ObjectSchema = diff --git a/sdks/full/typescript/src/serialization/resources/group/resources/common/types/BannedIdentity.ts b/sdks/full/typescript/src/serialization/resources/group/resources/common/types/BannedIdentity.ts index 7b72f3f5f0..e49237f9d6 100644 --- a/sdks/full/typescript/src/serialization/resources/group/resources/common/types/BannedIdentity.ts +++ b/sdks/full/typescript/src/serialization/resources/group/resources/common/types/BannedIdentity.ts @@ -2,24 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Handle as identity_common$$handle } from "../../../../identity/resources/common/types/Handle"; +import { Timestamp as common$$timestamp } from "../../../../common/types/Timestamp"; +import { identity, common } from "../../../../index"; export const BannedIdentity: core.serialization.ObjectSchema< serializers.group.BannedIdentity.Raw, Rivet.group.BannedIdentity > = core.serialization.object({ - identity: core.serialization.lazyObject(async () => (await import("../../../../..")).identity.Handle), - banTs: core.serialization.property( - "ban_ts", - core.serialization.lazy(async () => (await import("../../../../..")).Timestamp) - ), + identity: identity_common$$handle, + banTs: core.serialization.property("ban_ts", common$$timestamp), }); export declare namespace BannedIdentity { interface Raw { - identity: serializers.identity.Handle.Raw; - ban_ts: serializers.Timestamp.Raw; + identity: identity.Handle.Raw; + ban_ts: common.Timestamp.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/group/resources/common/types/ExternalLinks.ts b/sdks/full/typescript/src/serialization/resources/group/resources/common/types/ExternalLinks.ts index c927baac71..a39ac2525b 100644 --- a/sdks/full/typescript/src/serialization/resources/group/resources/common/types/ExternalLinks.ts +++ b/sdks/full/typescript/src/serialization/resources/group/resources/common/types/ExternalLinks.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const ExternalLinks: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/group/resources/common/types/Handle.ts b/sdks/full/typescript/src/serialization/resources/group/resources/common/types/Handle.ts index c89f41537f..14e78f940a 100644 --- a/sdks/full/typescript/src/serialization/resources/group/resources/common/types/Handle.ts +++ b/sdks/full/typescript/src/serialization/resources/group/resources/common/types/Handle.ts @@ -2,28 +2,28 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { ExternalLinks as group_common$$externalLinks } from "./ExternalLinks"; +import { common, group } from "../../../../index"; export const Handle: core.serialization.ObjectSchema = core.serialization.object({ groupId: core.serialization.property("group_id", core.serialization.string()), - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), + displayName: core.serialization.property("display_name", common$$displayName), avatarUrl: core.serialization.property("avatar_url", core.serialization.string().optional()), - external: core.serialization.lazyObject(async () => (await import("../../../../..")).group.ExternalLinks), + external: group_common$$externalLinks, isDeveloper: core.serialization.property("is_developer", core.serialization.boolean().optional()), }); export declare namespace Handle { interface Raw { group_id: string; - display_name: serializers.DisplayName.Raw; + display_name: common.DisplayName.Raw; avatar_url?: string | null; - external: serializers.group.ExternalLinks.Raw; + external: group.ExternalLinks.Raw; is_developer?: boolean | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/group/resources/common/types/JoinRequest.ts b/sdks/full/typescript/src/serialization/resources/group/resources/common/types/JoinRequest.ts index 81ceb81680..a49a22ac6e 100644 --- a/sdks/full/typescript/src/serialization/resources/group/resources/common/types/JoinRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/group/resources/common/types/JoinRequest.ts @@ -2,19 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Handle as identity_common$$handle } from "../../../../identity/resources/common/types/Handle"; +import { Timestamp as common$$timestamp } from "../../../../common/types/Timestamp"; +import { identity, common } from "../../../../index"; export const JoinRequest: core.serialization.ObjectSchema = core.serialization.object({ - identity: core.serialization.lazyObject(async () => (await import("../../../../..")).identity.Handle), - ts: core.serialization.lazy(async () => (await import("../../../../..")).Timestamp), + identity: identity_common$$handle, + ts: common$$timestamp, }); export declare namespace JoinRequest { interface Raw { - identity: serializers.identity.Handle.Raw; - ts: serializers.Timestamp.Raw; + identity: identity.Handle.Raw; + ts: common.Timestamp.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/group/resources/common/types/Member.ts b/sdks/full/typescript/src/serialization/resources/group/resources/common/types/Member.ts index d8f516fc05..c2c68f9aa1 100644 --- a/sdks/full/typescript/src/serialization/resources/group/resources/common/types/Member.ts +++ b/sdks/full/typescript/src/serialization/resources/group/resources/common/types/Member.ts @@ -2,17 +2,19 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Handle as identity_common$$handle } from "../../../../identity/resources/common/types/Handle"; +import { identity } from "../../../../index"; export const Member: core.serialization.ObjectSchema = core.serialization.object({ - identity: core.serialization.lazyObject(async () => (await import("../../../../..")).identity.Handle), + identity: identity_common$$handle, }); export declare namespace Member { interface Raw { - identity: serializers.identity.Handle.Raw; + identity: identity.Handle.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/group/resources/common/types/Profile.ts b/sdks/full/typescript/src/serialization/resources/group/resources/common/types/Profile.ts index 61d73d6b94..5fba945853 100644 --- a/sdks/full/typescript/src/serialization/resources/group/resources/common/types/Profile.ts +++ b/sdks/full/typescript/src/serialization/resources/group/resources/common/types/Profile.ts @@ -2,36 +2,32 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { ExternalLinks as group_common$$externalLinks } from "./ExternalLinks"; +import { Publicity as group_common$$publicity } from "./Publicity"; +import { Member as group_common$$member } from "./Member"; +import { JoinRequest as group_common$$joinRequest } from "./JoinRequest"; +import { common, group } from "../../../../index"; export const Profile: core.serialization.ObjectSchema = core.serialization.object({ groupId: core.serialization.property("group_id", core.serialization.string()), - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), + displayName: core.serialization.property("display_name", common$$displayName), avatarUrl: core.serialization.property("avatar_url", core.serialization.string().optional()), - external: core.serialization.lazyObject(async () => (await import("../../../../..")).group.ExternalLinks), + external: group_common$$externalLinks, isDeveloper: core.serialization.property("is_developer", core.serialization.boolean().optional()), bio: core.serialization.string(), isCurrentIdentityMember: core.serialization.property( "is_current_identity_member", core.serialization.boolean().optional() ), - publicity: core.serialization.lazy(async () => (await import("../../../../..")).group.Publicity), + publicity: group_common$$publicity, memberCount: core.serialization.property("member_count", core.serialization.number().optional()), - members: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).group.Member) - ), - joinRequests: core.serialization.property( - "join_requests", - core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).group.JoinRequest) - ) - ), + members: core.serialization.list(group_common$$member), + joinRequests: core.serialization.property("join_requests", core.serialization.list(group_common$$joinRequest)), isCurrentIdentityRequestingJoin: core.serialization.property( "is_current_identity_requesting_join", core.serialization.boolean().optional() @@ -42,16 +38,16 @@ export const Profile: core.serialization.ObjectSchema = diff --git a/sdks/full/typescript/src/serialization/resources/group/resources/common/types/Summary.ts b/sdks/full/typescript/src/serialization/resources/group/resources/common/types/Summary.ts index ba01a55dd3..db0df87da1 100644 --- a/sdks/full/typescript/src/serialization/resources/group/resources/common/types/Summary.ts +++ b/sdks/full/typescript/src/serialization/resources/group/resources/common/types/Summary.ts @@ -2,26 +2,28 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { ExternalLinks as group_common$$externalLinks } from "./ExternalLinks"; +import { Bio as common$$bio } from "../../../../common/types/Bio"; +import { Publicity as group_common$$publicity } from "./Publicity"; +import { common, group } from "../../../../index"; export const Summary: core.serialization.ObjectSchema = core.serialization.object({ groupId: core.serialization.property("group_id", core.serialization.string()), - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), + displayName: core.serialization.property("display_name", common$$displayName), avatarUrl: core.serialization.property("avatar_url", core.serialization.string().optional()), - external: core.serialization.lazyObject(async () => (await import("../../../../..")).group.ExternalLinks), + external: group_common$$externalLinks, isDeveloper: core.serialization.property("is_developer", core.serialization.boolean()), - bio: core.serialization.lazy(async () => (await import("../../../../..")).Bio), + bio: common$$bio, isCurrentIdentityMember: core.serialization.property( "is_current_identity_member", core.serialization.boolean() ), - publicity: core.serialization.lazy(async () => (await import("../../../../..")).group.Publicity), + publicity: group_common$$publicity, memberCount: core.serialization.property("member_count", core.serialization.number()), ownerIdentityId: core.serialization.property("owner_identity_id", core.serialization.string()), }); @@ -29,13 +31,13 @@ export const Summary: core.serialization.ObjectSchema = core.serialization.object({ - group: core.serialization.lazyObject(async () => (await import("../../../../..")).group.Handle), + group: group_common$$handle, }); export declare namespace GetInviteResponse { interface Raw { - group: serializers.group.Handle.Raw; + group: group.Handle.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/group/resources/joinRequests/types/ResolveJoinRequestRequest.ts b/sdks/full/typescript/src/serialization/resources/group/resources/joinRequests/types/ResolveJoinRequestRequest.ts index 4a553faf3d..e08dd8f3be 100644 --- a/sdks/full/typescript/src/serialization/resources/group/resources/joinRequests/types/ResolveJoinRequestRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/group/resources/joinRequests/types/ResolveJoinRequestRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const ResolveJoinRequestRequest: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/group/types/CreateRequest.ts b/sdks/full/typescript/src/serialization/resources/group/types/CreateRequest.ts index 175e271632..1aaf3ec8a7 100644 --- a/sdks/full/typescript/src/serialization/resources/group/types/CreateRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/group/types/CreateRequest.ts @@ -2,22 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { DisplayName as common$$displayName } from "../../common/types/DisplayName"; +import { common } from "../../index"; export const CreateRequest: core.serialization.ObjectSchema< serializers.group.CreateRequest.Raw, Rivet.group.CreateRequest > = core.serialization.object({ - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../..")).DisplayName) - ), + displayName: core.serialization.property("display_name", common$$displayName), }); export declare namespace CreateRequest { interface Raw { - display_name: serializers.DisplayName.Raw; + display_name: common.DisplayName.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/group/types/CreateResponse.ts b/sdks/full/typescript/src/serialization/resources/group/types/CreateResponse.ts index 539b9a88ef..6e3bd3440b 100644 --- a/sdks/full/typescript/src/serialization/resources/group/types/CreateResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/group/types/CreateResponse.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const CreateResponse: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/group/types/GetBansResponse.ts b/sdks/full/typescript/src/serialization/resources/group/types/GetBansResponse.ts index 92c106ac5a..80fcd5f6e1 100644 --- a/sdks/full/typescript/src/serialization/resources/group/types/GetBansResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/group/types/GetBansResponse.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { BannedIdentity as group_common$$bannedIdentity } from "../resources/common/types/BannedIdentity"; +import { WatchResponse as common$$watchResponse } from "../../common/types/WatchResponse"; +import { group, common } from "../../index"; export const GetBansResponse: core.serialization.ObjectSchema< serializers.group.GetBansResponse.Raw, @@ -12,18 +15,16 @@ export const GetBansResponse: core.serialization.ObjectSchema< > = core.serialization.object({ bannedIdentities: core.serialization.property( "banned_identities", - core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).group.BannedIdentity) - ) + core.serialization.list(group_common$$bannedIdentity) ), anchor: core.serialization.string().optional(), - watch: core.serialization.lazyObject(async () => (await import("../../..")).WatchResponse), + watch: common$$watchResponse, }); export declare namespace GetBansResponse { interface Raw { - banned_identities: serializers.group.BannedIdentity.Raw[]; + banned_identities: group.BannedIdentity.Raw[]; anchor?: string | null; - watch: serializers.WatchResponse.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/group/types/GetJoinRequestsResponse.ts b/sdks/full/typescript/src/serialization/resources/group/types/GetJoinRequestsResponse.ts index 6858b9d6b9..587da8bf0d 100644 --- a/sdks/full/typescript/src/serialization/resources/group/types/GetJoinRequestsResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/group/types/GetJoinRequestsResponse.ts @@ -2,26 +2,26 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { JoinRequest as group_common$$joinRequest } from "../resources/common/types/JoinRequest"; +import { WatchResponse as common$$watchResponse } from "../../common/types/WatchResponse"; +import { group, common } from "../../index"; export const GetJoinRequestsResponse: core.serialization.ObjectSchema< serializers.group.GetJoinRequestsResponse.Raw, Rivet.group.GetJoinRequestsResponse > = core.serialization.object({ - joinRequests: core.serialization.property( - "join_requests", - core.serialization.list(core.serialization.lazyObject(async () => (await import("../../..")).group.JoinRequest)) - ), + joinRequests: core.serialization.property("join_requests", core.serialization.list(group_common$$joinRequest)), anchor: core.serialization.string().optional(), - watch: core.serialization.lazyObject(async () => (await import("../../..")).WatchResponse), + watch: common$$watchResponse, }); export declare namespace GetJoinRequestsResponse { interface Raw { - join_requests: serializers.group.JoinRequest.Raw[]; + join_requests: group.JoinRequest.Raw[]; anchor?: string | null; - watch: serializers.WatchResponse.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/group/types/GetMembersResponse.ts b/sdks/full/typescript/src/serialization/resources/group/types/GetMembersResponse.ts index ccf2eebb8b..9d677bc399 100644 --- a/sdks/full/typescript/src/serialization/resources/group/types/GetMembersResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/group/types/GetMembersResponse.ts @@ -2,25 +2,26 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { Member as group_common$$member } from "../resources/common/types/Member"; +import { WatchResponse as common$$watchResponse } from "../../common/types/WatchResponse"; +import { group, common } from "../../index"; export const GetMembersResponse: core.serialization.ObjectSchema< serializers.group.GetMembersResponse.Raw, Rivet.group.GetMembersResponse > = core.serialization.object({ - members: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).group.Member) - ), + members: core.serialization.list(group_common$$member), anchor: core.serialization.string().optional(), - watch: core.serialization.lazyObject(async () => (await import("../../..")).WatchResponse), + watch: common$$watchResponse, }); export declare namespace GetMembersResponse { interface Raw { - members: serializers.group.Member.Raw[]; + members: group.Member.Raw[]; anchor?: string | null; - watch: serializers.WatchResponse.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/group/types/GetProfileResponse.ts b/sdks/full/typescript/src/serialization/resources/group/types/GetProfileResponse.ts index 94bec88fdd..ea26ff542c 100644 --- a/sdks/full/typescript/src/serialization/resources/group/types/GetProfileResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/group/types/GetProfileResponse.ts @@ -2,21 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { Profile as group_common$$profile } from "../resources/common/types/Profile"; +import { WatchResponse as common$$watchResponse } from "../../common/types/WatchResponse"; +import { group, common } from "../../index"; export const GetProfileResponse: core.serialization.ObjectSchema< serializers.group.GetProfileResponse.Raw, Rivet.group.GetProfileResponse > = core.serialization.object({ - group: core.serialization.lazyObject(async () => (await import("../../..")).group.Profile), - watch: core.serialization.lazyObject(async () => (await import("../../..")).WatchResponse), + group: group_common$$profile, + watch: common$$watchResponse, }); export declare namespace GetProfileResponse { interface Raw { - group: serializers.group.Profile.Raw; - watch: serializers.WatchResponse.Raw; + group: group.Profile.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/group/types/GetSummaryResponse.ts b/sdks/full/typescript/src/serialization/resources/group/types/GetSummaryResponse.ts index 29b51974e1..525dce7925 100644 --- a/sdks/full/typescript/src/serialization/resources/group/types/GetSummaryResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/group/types/GetSummaryResponse.ts @@ -2,19 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { Summary as group_common$$summary } from "../resources/common/types/Summary"; +import { group } from "../../index"; export const GetSummaryResponse: core.serialization.ObjectSchema< serializers.group.GetSummaryResponse.Raw, Rivet.group.GetSummaryResponse > = core.serialization.object({ - group: core.serialization.lazyObject(async () => (await import("../../..")).group.Summary), + group: group_common$$summary, }); export declare namespace GetSummaryResponse { interface Raw { - group: serializers.group.Summary.Raw; + group: group.Summary.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/group/types/ListSuggestedResponse.ts b/sdks/full/typescript/src/serialization/resources/group/types/ListSuggestedResponse.ts index 93765092b5..74df3989b1 100644 --- a/sdks/full/typescript/src/serialization/resources/group/types/ListSuggestedResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/group/types/ListSuggestedResponse.ts @@ -2,23 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { Summary as group_common$$summary } from "../resources/common/types/Summary"; +import { WatchResponse as common$$watchResponse } from "../../common/types/WatchResponse"; +import { group, common } from "../../index"; export const ListSuggestedResponse: core.serialization.ObjectSchema< serializers.group.ListSuggestedResponse.Raw, Rivet.group.ListSuggestedResponse > = core.serialization.object({ - groups: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).group.Summary) - ), - watch: core.serialization.lazyObject(async () => (await import("../../..")).WatchResponse), + groups: core.serialization.list(group_common$$summary), + watch: common$$watchResponse, }); export declare namespace ListSuggestedResponse { interface Raw { - groups: serializers.group.Summary.Raw[]; - watch: serializers.WatchResponse.Raw; + groups: group.Summary.Raw[]; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/group/types/PrepareAvatarUploadRequest.ts b/sdks/full/typescript/src/serialization/resources/group/types/PrepareAvatarUploadRequest.ts index 65317bde67..0e725cdeb7 100644 --- a/sdks/full/typescript/src/serialization/resources/group/types/PrepareAvatarUploadRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/group/types/PrepareAvatarUploadRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const PrepareAvatarUploadRequest: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/group/types/PrepareAvatarUploadResponse.ts b/sdks/full/typescript/src/serialization/resources/group/types/PrepareAvatarUploadResponse.ts index 1fd2ac1d2f..8b39c4f2c4 100644 --- a/sdks/full/typescript/src/serialization/resources/group/types/PrepareAvatarUploadResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/group/types/PrepareAvatarUploadResponse.ts @@ -2,24 +2,23 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { PresignedRequest as upload_common$$presignedRequest } from "../../upload/resources/common/types/PresignedRequest"; +import { upload } from "../../index"; export const PrepareAvatarUploadResponse: core.serialization.ObjectSchema< serializers.group.PrepareAvatarUploadResponse.Raw, Rivet.group.PrepareAvatarUploadResponse > = core.serialization.object({ uploadId: core.serialization.property("upload_id", core.serialization.string()), - presignedRequest: core.serialization.property( - "presigned_request", - core.serialization.lazyObject(async () => (await import("../../..")).upload.PresignedRequest) - ), + presignedRequest: core.serialization.property("presigned_request", upload_common$$presignedRequest), }); export declare namespace PrepareAvatarUploadResponse { interface Raw { upload_id: string; - presigned_request: serializers.upload.PresignedRequest.Raw; + presigned_request: upload.PresignedRequest.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/group/types/SearchResponse.ts b/sdks/full/typescript/src/serialization/resources/group/types/SearchResponse.ts index 51640c49a1..e18057fe57 100644 --- a/sdks/full/typescript/src/serialization/resources/group/types/SearchResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/group/types/SearchResponse.ts @@ -2,21 +2,23 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { Handle as group_common$$handle } from "../resources/common/types/Handle"; +import { group } from "../../index"; export const SearchResponse: core.serialization.ObjectSchema< serializers.group.SearchResponse.Raw, Rivet.group.SearchResponse > = core.serialization.object({ - groups: core.serialization.list(core.serialization.lazyObject(async () => (await import("../../..")).group.Handle)), + groups: core.serialization.list(group_common$$handle), anchor: core.serialization.string().optional(), }); export declare namespace SearchResponse { interface Raw { - groups: serializers.group.Handle.Raw[]; + groups: group.Handle.Raw[]; anchor?: string | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/group/types/TransferOwnershipRequest.ts b/sdks/full/typescript/src/serialization/resources/group/types/TransferOwnershipRequest.ts index 6c3c883a06..ff137e18a0 100644 --- a/sdks/full/typescript/src/serialization/resources/group/types/TransferOwnershipRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/group/types/TransferOwnershipRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const TransferOwnershipRequest: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/group/types/UpdateProfileRequest.ts b/sdks/full/typescript/src/serialization/resources/group/types/UpdateProfileRequest.ts index 885e969601..c9c487d7be 100644 --- a/sdks/full/typescript/src/serialization/resources/group/types/UpdateProfileRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/group/types/UpdateProfileRequest.ts @@ -2,26 +2,26 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { DisplayName as common$$displayName } from "../../common/types/DisplayName"; +import { Publicity as group_common$$publicity } from "../resources/common/types/Publicity"; +import { common, group } from "../../index"; export const UpdateProfileRequest: core.serialization.ObjectSchema< serializers.group.UpdateProfileRequest.Raw, Rivet.group.UpdateProfileRequest > = core.serialization.object({ - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../..")).DisplayName).optional() - ), + displayName: core.serialization.property("display_name", common$$displayName.optional()), bio: core.serialization.string().optional(), - publicity: core.serialization.lazy(async () => (await import("../../..")).group.Publicity).optional(), + publicity: group_common$$publicity.optional(), }); export declare namespace UpdateProfileRequest { interface Raw { - display_name?: serializers.DisplayName.Raw | null; + display_name?: common.DisplayName.Raw | null; bio?: string | null; - publicity?: serializers.group.Publicity.Raw | null; + publicity?: group.Publicity.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/group/types/ValidateProfileRequest.ts b/sdks/full/typescript/src/serialization/resources/group/types/ValidateProfileRequest.ts index 704faaeb5b..4d1ccd112c 100644 --- a/sdks/full/typescript/src/serialization/resources/group/types/ValidateProfileRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/group/types/ValidateProfileRequest.ts @@ -2,26 +2,26 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { DisplayName as common$$displayName } from "../../common/types/DisplayName"; +import { Publicity as group_common$$publicity } from "../resources/common/types/Publicity"; +import { common, group } from "../../index"; export const ValidateProfileRequest: core.serialization.ObjectSchema< serializers.group.ValidateProfileRequest.Raw, Rivet.group.ValidateProfileRequest > = core.serialization.object({ - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../..")).DisplayName).optional() - ), - bio: core.serialization.lazy(async () => (await import("../../..")).DisplayName).optional(), - publicity: core.serialization.lazy(async () => (await import("../../..")).group.Publicity).optional(), + displayName: core.serialization.property("display_name", common$$displayName.optional()), + bio: common$$displayName.optional(), + publicity: group_common$$publicity.optional(), }); export declare namespace ValidateProfileRequest { interface Raw { - display_name?: serializers.DisplayName.Raw | null; - bio?: serializers.DisplayName.Raw | null; - publicity?: serializers.group.Publicity.Raw | null; + display_name?: common.DisplayName.Raw | null; + bio?: common.DisplayName.Raw | null; + publicity?: group.Publicity.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/group/types/ValidateProfileResponse.ts b/sdks/full/typescript/src/serialization/resources/group/types/ValidateProfileResponse.ts index da140b3af2..d6f12b640b 100644 --- a/sdks/full/typescript/src/serialization/resources/group/types/ValidateProfileResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/group/types/ValidateProfileResponse.ts @@ -2,21 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { ValidationError as common$$validationError } from "../../common/types/ValidationError"; +import { common } from "../../index"; export const ValidateProfileResponse: core.serialization.ObjectSchema< serializers.group.ValidateProfileResponse.Raw, Rivet.group.ValidateProfileResponse > = core.serialization.object({ - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).ValidationError) - ), + errors: core.serialization.list(common$$validationError), }); export declare namespace ValidateProfileResponse { interface Raw { - errors: serializers.ValidationError.Raw[]; + errors: common.ValidationError.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/client/requests/PrepareAvatarUploadRequest.ts b/sdks/full/typescript/src/serialization/resources/identity/client/requests/PrepareAvatarUploadRequest.ts index 62d749c150..579f1a5259 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/client/requests/PrepareAvatarUploadRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/client/requests/PrepareAvatarUploadRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../.."; -import * as Rivet from "../../../../../api"; +import * as serializers from "../../../../index"; +import * as Rivet from "../../../../../api/index"; import * as core from "../../../../../core"; export const PrepareAvatarUploadRequest: core.serialization.Schema< diff --git a/sdks/full/typescript/src/serialization/resources/identity/client/requests/ReportRequest.ts b/sdks/full/typescript/src/serialization/resources/identity/client/requests/ReportRequest.ts index 48af35ef8d..5a5d13eeb1 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/client/requests/ReportRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/client/requests/ReportRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../.."; -import * as Rivet from "../../../../../api"; +import * as serializers from "../../../../index"; +import * as Rivet from "../../../../../api/index"; import * as core from "../../../../../core"; export const ReportRequest: core.serialization.Schema< diff --git a/sdks/full/typescript/src/serialization/resources/identity/client/requests/SetGameActivityRequest.ts b/sdks/full/typescript/src/serialization/resources/identity/client/requests/SetGameActivityRequest.ts index 6ce69e5615..46073b4079 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/client/requests/SetGameActivityRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/client/requests/SetGameActivityRequest.ts @@ -2,22 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../.."; -import * as Rivet from "../../../../../api"; +import * as serializers from "../../../../index"; +import * as Rivet from "../../../../../api/index"; import * as core from "../../../../../core"; +import { UpdateGameActivity as identity_common$$updateGameActivity } from "../../resources/common/types/UpdateGameActivity"; +import { identity } from "../../../index"; export const SetGameActivityRequest: core.serialization.Schema< serializers.identity.SetGameActivityRequest.Raw, Rivet.identity.SetGameActivityRequest > = core.serialization.object({ - gameActivity: core.serialization.property( - "game_activity", - core.serialization.lazyObject(async () => (await import("../../../..")).identity.UpdateGameActivity) - ), + gameActivity: core.serialization.property("game_activity", identity_common$$updateGameActivity), }); export declare namespace SetGameActivityRequest { interface Raw { - game_activity: serializers.identity.UpdateGameActivity.Raw; + game_activity: identity.UpdateGameActivity.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/client/requests/SetupRequest.ts b/sdks/full/typescript/src/serialization/resources/identity/client/requests/SetupRequest.ts index 489a39b677..02f89d984c 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/client/requests/SetupRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/client/requests/SetupRequest.ts @@ -2,22 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../.."; -import * as Rivet from "../../../../../api"; +import * as serializers from "../../../../index"; +import * as Rivet from "../../../../../api/index"; import * as core from "../../../../../core"; +import { Jwt as common$$jwt } from "../../../common/types/Jwt"; +import { common } from "../../../index"; export const SetupRequest: core.serialization.Schema< serializers.identity.SetupRequest.Raw, Rivet.identity.SetupRequest > = core.serialization.object({ - existingIdentityToken: core.serialization.property( - "existing_identity_token", - core.serialization.lazy(async () => (await import("../../../..")).Jwt).optional() - ), + existingIdentityToken: core.serialization.property("existing_identity_token", common$$jwt.optional()), }); export declare namespace SetupRequest { interface Raw { - existing_identity_token?: serializers.Jwt.Raw | null; + existing_identity_token?: common.Jwt.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/client/requests/SignupForBetaRequest.ts b/sdks/full/typescript/src/serialization/resources/identity/client/requests/SignupForBetaRequest.ts index 9ac4afa682..082755586a 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/client/requests/SignupForBetaRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/client/requests/SignupForBetaRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../.."; -import * as Rivet from "../../../../../api"; +import * as serializers from "../../../../index"; +import * as Rivet from "../../../../../api/index"; import * as core from "../../../../../core"; export const SignupForBetaRequest: core.serialization.Schema< diff --git a/sdks/full/typescript/src/serialization/resources/identity/client/requests/UpdateProfileRequest.ts b/sdks/full/typescript/src/serialization/resources/identity/client/requests/UpdateProfileRequest.ts index 19b233b0c8..dc0992e76b 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/client/requests/UpdateProfileRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/client/requests/UpdateProfileRequest.ts @@ -2,29 +2,27 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../.."; -import * as Rivet from "../../../../../api"; +import * as serializers from "../../../../index"; +import * as Rivet from "../../../../../api/index"; import * as core from "../../../../../core"; +import { DisplayName as common$$displayName } from "../../../common/types/DisplayName"; +import { AccountNumber as common$$accountNumber } from "../../../common/types/AccountNumber"; +import { Bio as common$$bio } from "../../../common/types/Bio"; +import { common } from "../../../index"; export const UpdateProfileRequest: core.serialization.Schema< serializers.identity.UpdateProfileRequest.Raw, Rivet.identity.UpdateProfileRequest > = core.serialization.object({ - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../..")).DisplayName).optional() - ), - accountNumber: core.serialization.property( - "account_number", - core.serialization.lazy(async () => (await import("../../../..")).AccountNumber).optional() - ), - bio: core.serialization.lazy(async () => (await import("../../../..")).Bio).optional(), + displayName: core.serialization.property("display_name", common$$displayName.optional()), + accountNumber: core.serialization.property("account_number", common$$accountNumber.optional()), + bio: common$$bio.optional(), }); export declare namespace UpdateProfileRequest { interface Raw { - display_name?: serializers.DisplayName.Raw | null; - account_number?: serializers.AccountNumber.Raw | null; - bio?: serializers.Bio.Raw | null; + display_name?: common.DisplayName.Raw | null; + account_number?: common.AccountNumber.Raw | null; + bio?: common.Bio.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/client/requests/UpdateStatusRequest.ts b/sdks/full/typescript/src/serialization/resources/identity/client/requests/UpdateStatusRequest.ts index ae0aaa5f01..abf1289349 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/client/requests/UpdateStatusRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/client/requests/UpdateStatusRequest.ts @@ -2,19 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../.."; -import * as Rivet from "../../../../../api"; +import * as serializers from "../../../../index"; +import * as Rivet from "../../../../../api/index"; import * as core from "../../../../../core"; +import { Status as identity_common$$status } from "../../resources/common/types/Status"; +import { identity } from "../../../index"; export const UpdateStatusRequest: core.serialization.Schema< serializers.identity.UpdateStatusRequest.Raw, Rivet.identity.UpdateStatusRequest > = core.serialization.object({ - status: core.serialization.lazy(async () => (await import("../../../..")).identity.Status), + status: identity_common$$status, }); export declare namespace UpdateStatusRequest { interface Raw { - status: serializers.identity.Status.Raw; + status: identity.Status.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/client/requests/ValidateProfileRequest.ts b/sdks/full/typescript/src/serialization/resources/identity/client/requests/ValidateProfileRequest.ts index 334fa3575d..972d2edf87 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/client/requests/ValidateProfileRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/client/requests/ValidateProfileRequest.ts @@ -2,29 +2,27 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../.."; -import * as Rivet from "../../../../../api"; +import * as serializers from "../../../../index"; +import * as Rivet from "../../../../../api/index"; import * as core from "../../../../../core"; +import { DisplayName as common$$displayName } from "../../../common/types/DisplayName"; +import { AccountNumber as common$$accountNumber } from "../../../common/types/AccountNumber"; +import { Bio as common$$bio } from "../../../common/types/Bio"; +import { common } from "../../../index"; export const ValidateProfileRequest: core.serialization.Schema< serializers.identity.ValidateProfileRequest.Raw, Rivet.identity.ValidateProfileRequest > = core.serialization.object({ - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../..")).DisplayName).optional() - ), - accountNumber: core.serialization.property( - "account_number", - core.serialization.lazy(async () => (await import("../../../..")).AccountNumber).optional() - ), - bio: core.serialization.lazy(async () => (await import("../../../..")).Bio).optional(), + displayName: core.serialization.property("display_name", common$$displayName.optional()), + accountNumber: core.serialization.property("account_number", common$$accountNumber.optional()), + bio: common$$bio.optional(), }); export declare namespace ValidateProfileRequest { interface Raw { - display_name?: serializers.DisplayName.Raw | null; - account_number?: serializers.AccountNumber.Raw | null; - bio?: serializers.Bio.Raw | null; + display_name?: common.DisplayName.Raw | null; + account_number?: common.AccountNumber.Raw | null; + bio?: common.Bio.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/activities/types/ListActivitiesResponse.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/activities/types/ListActivitiesResponse.ts index 69700fa080..a0ad9caa2e 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/activities/types/ListActivitiesResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/activities/types/ListActivitiesResponse.ts @@ -2,41 +2,35 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Handle as identity_common$$handle } from "../../common/types/Handle"; +import { Summary as game_common$$summary } from "../../../../game/resources/common/types/Summary"; +import { Summary as group_common$$summary } from "../../../../group/resources/common/types/Summary"; +import { WatchResponse as common$$watchResponse } from "../../../../common/types/WatchResponse"; +import { identity, game, group, common } from "../../../../index"; export const ListActivitiesResponse: core.serialization.ObjectSchema< serializers.identity.ListActivitiesResponse.Raw, Rivet.identity.ListActivitiesResponse > = core.serialization.object({ - identities: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).identity.Handle) - ), - games: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).game.Summary) - ), - suggestedGroups: core.serialization.property( - "suggested_groups", - core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).group.Summary) - ) - ), + identities: core.serialization.list(identity_common$$handle), + games: core.serialization.list(game_common$$summary), + suggestedGroups: core.serialization.property("suggested_groups", core.serialization.list(group_common$$summary)), suggestedPlayers: core.serialization.property( "suggested_players", - core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).identity.Handle) - ) + core.serialization.list(identity_common$$handle) ), - watch: core.serialization.lazyObject(async () => (await import("../../../../..")).WatchResponse), + watch: common$$watchResponse, }); export declare namespace ListActivitiesResponse { interface Raw { - identities: serializers.identity.Handle.Raw[]; - games: serializers.game.Summary.Raw[]; - suggested_groups: serializers.group.Summary.Raw[]; - suggested_players: serializers.identity.Handle.Raw[]; - watch: serializers.WatchResponse.Raw; + identities: identity.Handle.Raw[]; + games: game.Summary.Raw[]; + suggested_groups: group.Summary.Raw[]; + suggested_players: identity.Handle.Raw[]; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/AccessTokenLinkedAccount.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/AccessTokenLinkedAccount.ts index e8d6c222ae..3623fe5b4f 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/AccessTokenLinkedAccount.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/AccessTokenLinkedAccount.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const AccessTokenLinkedAccount: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/DevState.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/DevState.ts index 4e78207368..e149ff07bf 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/DevState.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/DevState.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const DevState: core.serialization.Schema = diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/EmailLinkedAccount.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/EmailLinkedAccount.ts index 8ee11eb2b1..1d1c54f5a3 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/EmailLinkedAccount.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/EmailLinkedAccount.ts @@ -2,19 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Email as common$$email } from "../../../../common/types/Email"; +import { common } from "../../../../index"; export const EmailLinkedAccount: core.serialization.ObjectSchema< serializers.identity.EmailLinkedAccount.Raw, Rivet.identity.EmailLinkedAccount > = core.serialization.object({ - email: core.serialization.lazy(async () => (await import("../../../../..")).Email), + email: common$$email, }); export declare namespace EmailLinkedAccount { interface Raw { - email: serializers.Email.Raw; + email: common.Email.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/ExternalLinks.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/ExternalLinks.ts index 965880871d..54f26e1b0e 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/ExternalLinks.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/ExternalLinks.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const ExternalLinks: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GameActivity.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GameActivity.ts index e928df93c9..c5ccdcbaa4 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GameActivity.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GameActivity.ts @@ -2,15 +2,17 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Handle as game_common$$handle } from "../../../../game/resources/common/types/Handle"; +import { game } from "../../../../index"; export const GameActivity: core.serialization.ObjectSchema< serializers.identity.GameActivity.Raw, Rivet.identity.GameActivity > = core.serialization.object({ - game: core.serialization.lazyObject(async () => (await import("../../../../..")).game.Handle), + game: game_common$$handle, message: core.serialization.string(), publicMetadata: core.serialization.property("public_metadata", core.serialization.unknown().optional()), mutualMetadata: core.serialization.property("mutual_metadata", core.serialization.unknown().optional()), @@ -18,7 +20,7 @@ export const GameActivity: core.serialization.ObjectSchema< export declare namespace GameActivity { interface Raw { - game: serializers.game.Handle.Raw; + game: game.Handle.Raw; message: string; public_metadata?: unknown | null; mutual_metadata?: unknown | null; diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GameLinkStatus.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GameLinkStatus.ts index 7d761f3f58..a202e67b95 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GameLinkStatus.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GameLinkStatus.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const GameLinkStatus: core.serialization.Schema< diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEvent.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEvent.ts index 4f20fbc9cc..5bab96cc1e 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEvent.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEvent.ts @@ -2,25 +2,27 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Timestamp as common$$timestamp } from "../../../../common/types/Timestamp"; +import { GlobalEventKind as identity_common$$globalEventKind } from "./GlobalEventKind"; +import { GlobalEventNotification as identity_common$$globalEventNotification } from "./GlobalEventNotification"; +import { common, identity } from "../../../../index"; export const GlobalEvent: core.serialization.ObjectSchema< serializers.identity.GlobalEvent.Raw, Rivet.identity.GlobalEvent > = core.serialization.object({ - ts: core.serialization.lazy(async () => (await import("../../../../..")).Timestamp), - kind: core.serialization.lazyObject(async () => (await import("../../../../..")).identity.GlobalEventKind), - notification: core.serialization - .lazyObject(async () => (await import("../../../../..")).identity.GlobalEventNotification) - .optional(), + ts: common$$timestamp, + kind: identity_common$$globalEventKind, + notification: identity_common$$globalEventNotification.optional(), }); export declare namespace GlobalEvent { interface Raw { - ts: serializers.Timestamp.Raw; - kind: serializers.identity.GlobalEventKind.Raw; - notification?: serializers.identity.GlobalEventNotification.Raw | null; + ts: common.Timestamp.Raw; + kind: identity.GlobalEventKind.Raw; + notification?: identity.GlobalEventNotification.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEventIdentityUpdate.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEventIdentityUpdate.ts index 4d62209b45..46a43eea96 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEventIdentityUpdate.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEventIdentityUpdate.ts @@ -2,19 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Profile as identity_common$$profile } from "./Profile"; +import { identity } from "../../../../index"; export const GlobalEventIdentityUpdate: core.serialization.ObjectSchema< serializers.identity.GlobalEventIdentityUpdate.Raw, Rivet.identity.GlobalEventIdentityUpdate > = core.serialization.object({ - identity: core.serialization.lazyObject(async () => (await import("../../../../..")).identity.Profile), + identity: identity_common$$profile, }); export declare namespace GlobalEventIdentityUpdate { interface Raw { - identity: serializers.identity.Profile.Raw; + identity: identity.Profile.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEventKind.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEventKind.ts index 058bee44c6..b82bb5b88e 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEventKind.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEventKind.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { GlobalEventIdentityUpdate as identity_common$$globalEventIdentityUpdate } from "./GlobalEventIdentityUpdate"; +import { GlobalEventMatchmakerLobbyJoin as identity_common$$globalEventMatchmakerLobbyJoin } from "./GlobalEventMatchmakerLobbyJoin"; +import { identity } from "../../../../index"; export const GlobalEventKind: core.serialization.ObjectSchema< serializers.identity.GlobalEventKind.Raw, @@ -12,21 +15,17 @@ export const GlobalEventKind: core.serialization.ObjectSchema< > = core.serialization.object({ identityUpdate: core.serialization.property( "identity_update", - core.serialization - .lazyObject(async () => (await import("../../../../..")).identity.GlobalEventIdentityUpdate) - .optional() + identity_common$$globalEventIdentityUpdate.optional() ), matchmakerLobbyJoin: core.serialization.property( "matchmaker_lobby_join", - core.serialization - .lazyObject(async () => (await import("../../../../..")).identity.GlobalEventMatchmakerLobbyJoin) - .optional() + identity_common$$globalEventMatchmakerLobbyJoin.optional() ), }); export declare namespace GlobalEventKind { interface Raw { - identity_update?: serializers.identity.GlobalEventIdentityUpdate.Raw | null; - matchmaker_lobby_join?: serializers.identity.GlobalEventMatchmakerLobbyJoin.Raw | null; + identity_update?: identity.GlobalEventIdentityUpdate.Raw | null; + matchmaker_lobby_join?: identity.GlobalEventMatchmakerLobbyJoin.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEventMatchmakerLobbyJoin.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEventMatchmakerLobbyJoin.ts index 9062aa17b5..dc53870a35 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEventMatchmakerLobbyJoin.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEventMatchmakerLobbyJoin.ts @@ -2,26 +2,27 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { JoinLobby as matchmaker_common$$joinLobby } from "../../../../matchmaker/resources/common/types/JoinLobby"; +import { JoinPort as matchmaker_common$$joinPort } from "../../../../matchmaker/resources/common/types/JoinPort"; +import { JoinPlayer as matchmaker_common$$joinPlayer } from "../../../../matchmaker/resources/common/types/JoinPlayer"; +import { matchmaker } from "../../../../index"; export const GlobalEventMatchmakerLobbyJoin: core.serialization.ObjectSchema< serializers.identity.GlobalEventMatchmakerLobbyJoin.Raw, Rivet.identity.GlobalEventMatchmakerLobbyJoin > = core.serialization.object({ - lobby: core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinLobby), - ports: core.serialization.record( - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinPort) - ), - player: core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinPlayer), + lobby: matchmaker_common$$joinLobby, + ports: core.serialization.record(core.serialization.string(), matchmaker_common$$joinPort), + player: matchmaker_common$$joinPlayer, }); export declare namespace GlobalEventMatchmakerLobbyJoin { interface Raw { - lobby: serializers.matchmaker.JoinLobby.Raw; - ports: Record; - player: serializers.matchmaker.JoinPlayer.Raw; + lobby: matchmaker.JoinLobby.Raw; + ports: Record; + player: matchmaker.JoinPlayer.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEventNotification.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEventNotification.ts index 78fb0c769f..c1d56978ef 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEventNotification.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/GlobalEventNotification.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const GlobalEventNotification: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/Group.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/Group.ts index f26f3f2e45..073fc5f42f 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/Group.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/Group.ts @@ -2,17 +2,19 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Handle as group_common$$handle } from "../../../../group/resources/common/types/Handle"; +import { group } from "../../../../index"; export const Group: core.serialization.ObjectSchema = core.serialization.object({ - group: core.serialization.lazyObject(async () => (await import("../../../../..")).group.Handle), + group: group_common$$handle, }); export declare namespace Group { interface Raw { - group: serializers.group.Handle.Raw; + group: group.Handle.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/Handle.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/Handle.ts index 2dc18724c7..bb5b69af4c 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/Handle.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/Handle.ts @@ -2,37 +2,34 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { AccountNumber as common$$accountNumber } from "../../../../common/types/AccountNumber"; +import { Presence as identity_common$$presence } from "./Presence"; +import { ExternalLinks as identity_common$$externalLinks } from "./ExternalLinks"; +import { common, identity } from "../../../../index"; export const Handle: core.serialization.ObjectSchema = core.serialization.object({ identityId: core.serialization.property("identity_id", core.serialization.string()), - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), - accountNumber: core.serialization.property( - "account_number", - core.serialization.lazy(async () => (await import("../../../../..")).AccountNumber) - ), + displayName: core.serialization.property("display_name", common$$displayName), + accountNumber: core.serialization.property("account_number", common$$accountNumber), avatarUrl: core.serialization.property("avatar_url", core.serialization.string()), - presence: core.serialization - .lazyObject(async () => (await import("../../../../..")).identity.Presence) - .optional(), + presence: identity_common$$presence.optional(), isRegistered: core.serialization.property("is_registered", core.serialization.boolean()), - external: core.serialization.lazyObject(async () => (await import("../../../../..")).identity.ExternalLinks), + external: identity_common$$externalLinks, }); export declare namespace Handle { interface Raw { identity_id: string; - display_name: serializers.DisplayName.Raw; - account_number: serializers.AccountNumber.Raw; + display_name: common.DisplayName.Raw; + account_number: common.AccountNumber.Raw; avatar_url: string; - presence?: serializers.identity.Presence.Raw | null; + presence?: identity.Presence.Raw | null; is_registered: boolean; - external: serializers.identity.ExternalLinks.Raw; + external: identity.ExternalLinks.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/LinkedAccount.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/LinkedAccount.ts index 8a63c377f9..f256de0d6b 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/LinkedAccount.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/LinkedAccount.ts @@ -2,28 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { EmailLinkedAccount as identity_common$$emailLinkedAccount } from "./EmailLinkedAccount"; +import { AccessTokenLinkedAccount as identity_common$$accessTokenLinkedAccount } from "./AccessTokenLinkedAccount"; +import { identity } from "../../../../index"; export const LinkedAccount: core.serialization.ObjectSchema< serializers.identity.LinkedAccount.Raw, Rivet.identity.LinkedAccount > = core.serialization.object({ - email: core.serialization - .lazyObject(async () => (await import("../../../../..")).identity.EmailLinkedAccount) - .optional(), - accessToken: core.serialization.property( - "access_token", - core.serialization - .lazyObject(async () => (await import("../../../../..")).identity.AccessTokenLinkedAccount) - .optional() - ), + email: identity_common$$emailLinkedAccount.optional(), + accessToken: core.serialization.property("access_token", identity_common$$accessTokenLinkedAccount.optional()), }); export declare namespace LinkedAccount { interface Raw { - email?: serializers.identity.EmailLinkedAccount.Raw | null; - access_token?: serializers.identity.AccessTokenLinkedAccount.Raw | null; + email?: identity.EmailLinkedAccount.Raw | null; + access_token?: identity.AccessTokenLinkedAccount.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/Presence.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/Presence.ts index 64aa2082b4..a113a1865c 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/Presence.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/Presence.ts @@ -2,27 +2,25 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Timestamp as common$$timestamp } from "../../../../common/types/Timestamp"; +import { Status as identity_common$$status } from "./Status"; +import { GameActivity as identity_common$$gameActivity } from "./GameActivity"; +import { common, identity } from "../../../../index"; export const Presence: core.serialization.ObjectSchema = core.serialization.object({ - updateTs: core.serialization.property( - "update_ts", - core.serialization.lazy(async () => (await import("../../../../..")).Timestamp) - ), - status: core.serialization.lazy(async () => (await import("../../../../..")).identity.Status), - gameActivity: core.serialization.property( - "game_activity", - core.serialization.lazyObject(async () => (await import("../../../../..")).identity.GameActivity).optional() - ), + updateTs: core.serialization.property("update_ts", common$$timestamp), + status: identity_common$$status, + gameActivity: core.serialization.property("game_activity", identity_common$$gameActivity.optional()), }); export declare namespace Presence { interface Raw { - update_ts: serializers.Timestamp.Raw; - status: serializers.identity.Status.Raw; - game_activity?: serializers.identity.GameActivity.Raw | null; + update_ts: common.Timestamp.Raw; + status: identity.Status.Raw; + game_activity?: identity.GameActivity.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/Profile.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/Profile.ts index edb365209f..cae08c9f83 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/Profile.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/Profile.ts @@ -2,80 +2,71 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { AccountNumber as common$$accountNumber } from "../../../../common/types/AccountNumber"; +import { Presence as identity_common$$presence } from "./Presence"; +import { ExternalLinks as identity_common$$externalLinks } from "./ExternalLinks"; +import { DevState as identity_common$$devState } from "./DevState"; +import { Timestamp as common$$timestamp } from "../../../../common/types/Timestamp"; +import { Bio as common$$bio } from "../../../../common/types/Bio"; +import { LinkedAccount as identity_common$$linkedAccount } from "./LinkedAccount"; +import { Group as identity_common$$group } from "./Group"; +import { StatSummary as game_common$$statSummary } from "../../../../game/resources/common/types/StatSummary"; +import { common, identity, game } from "../../../../index"; export const Profile: core.serialization.ObjectSchema = core.serialization.object({ identityId: core.serialization.property("identity_id", core.serialization.string()), - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), - accountNumber: core.serialization.property( - "account_number", - core.serialization.lazy(async () => (await import("../../../../..")).AccountNumber) - ), + displayName: core.serialization.property("display_name", common$$displayName), + accountNumber: core.serialization.property("account_number", common$$accountNumber), avatarUrl: core.serialization.property("avatar_url", core.serialization.string()), - presence: core.serialization - .lazyObject(async () => (await import("../../../../..")).identity.Presence) - .optional(), + presence: identity_common$$presence.optional(), isRegistered: core.serialization.property("is_registered", core.serialization.boolean()), - external: core.serialization.lazyObject(async () => (await import("../../../../..")).identity.ExternalLinks), + external: identity_common$$externalLinks, isAdmin: core.serialization.property("is_admin", core.serialization.boolean()), isGameLinked: core.serialization.property("is_game_linked", core.serialization.boolean().optional()), - devState: core.serialization.property( - "dev_state", - core.serialization.lazy(async () => (await import("../../../../..")).identity.DevState).optional() - ), + devState: core.serialization.property("dev_state", identity_common$$devState.optional()), followerCount: core.serialization.property("follower_count", core.serialization.number()), followingCount: core.serialization.property("following_count", core.serialization.number()), following: core.serialization.boolean(), isFollowingMe: core.serialization.property("is_following_me", core.serialization.boolean()), isMutualFollowing: core.serialization.property("is_mutual_following", core.serialization.boolean()), - joinTs: core.serialization.property( - "join_ts", - core.serialization.lazy(async () => (await import("../../../../..")).Timestamp) - ), - bio: core.serialization.lazy(async () => (await import("../../../../..")).Bio), + joinTs: core.serialization.property("join_ts", common$$timestamp), + bio: common$$bio, linkedAccounts: core.serialization.property( "linked_accounts", - core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).identity.LinkedAccount) - ) - ), - groups: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).identity.Group) - ), - games: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).game.StatSummary) + core.serialization.list(identity_common$$linkedAccount) ), + groups: core.serialization.list(identity_common$$group), + games: core.serialization.list(game_common$$statSummary), awaitingDeletion: core.serialization.property("awaiting_deletion", core.serialization.boolean().optional()), }); export declare namespace Profile { interface Raw { identity_id: string; - display_name: serializers.DisplayName.Raw; - account_number: serializers.AccountNumber.Raw; + display_name: common.DisplayName.Raw; + account_number: common.AccountNumber.Raw; avatar_url: string; - presence?: serializers.identity.Presence.Raw | null; + presence?: identity.Presence.Raw | null; is_registered: boolean; - external: serializers.identity.ExternalLinks.Raw; + external: identity.ExternalLinks.Raw; is_admin: boolean; is_game_linked?: boolean | null; - dev_state?: serializers.identity.DevState.Raw | null; + dev_state?: identity.DevState.Raw | null; follower_count: number; following_count: number; following: boolean; is_following_me: boolean; is_mutual_following: boolean; - join_ts: serializers.Timestamp.Raw; - bio: serializers.Bio.Raw; - linked_accounts: serializers.identity.LinkedAccount.Raw[]; - groups: serializers.identity.Group.Raw[]; - games: serializers.game.StatSummary.Raw[]; + join_ts: common.Timestamp.Raw; + bio: common.Bio.Raw; + linked_accounts: identity.LinkedAccount.Raw[]; + groups: identity.Group.Raw[]; + games: game.StatSummary.Raw[]; awaiting_deletion?: boolean | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/Status.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/Status.ts index 1ea9df7bbc..997f07f673 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/Status.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/Status.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const Status: core.serialization.Schema = diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/Summary.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/Summary.ts index 119bc5e8ac..8de4578c93 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/Summary.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/common/types/Summary.ts @@ -2,27 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { AccountNumber as common$$accountNumber } from "../../../../common/types/AccountNumber"; +import { Presence as identity_common$$presence } from "./Presence"; +import { ExternalLinks as identity_common$$externalLinks } from "./ExternalLinks"; +import { common, identity } from "../../../../index"; export const Summary: core.serialization.ObjectSchema = core.serialization.object({ identityId: core.serialization.property("identity_id", core.serialization.string()), - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), - accountNumber: core.serialization.property( - "account_number", - core.serialization.lazy(async () => (await import("../../../../..")).AccountNumber) - ), + displayName: core.serialization.property("display_name", common$$displayName), + accountNumber: core.serialization.property("account_number", common$$accountNumber), avatarUrl: core.serialization.property("avatar_url", core.serialization.string()), - presence: core.serialization - .lazyObject(async () => (await import("../../../../..")).identity.Presence) - .optional(), + presence: identity_common$$presence.optional(), isRegistered: core.serialization.property("is_registered", core.serialization.boolean()), - external: core.serialization.lazyObject(async () => (await import("../../../../..")).identity.ExternalLinks), + external: identity_common$$externalLinks, following: core.serialization.boolean(), isFollowingMe: core.serialization.property("is_following_me", core.serialization.boolean()), isMutualFollowing: core.serialization.property("is_mutual_following", core.serialization.boolean()), @@ -31,12 +28,12 @@ export const Summary: core.serialization.ObjectSchema = core.serialization.object({ - events: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).identity.GlobalEvent) - ), - watch: core.serialization.lazyObject(async () => (await import("../../../../..")).WatchResponse), + events: core.serialization.list(identity_common$$globalEvent), + watch: common$$watchResponse, }); export declare namespace WatchEventsResponse { interface Raw { - events: serializers.identity.GlobalEvent.Raw[]; - watch: serializers.WatchResponse.Raw; + events: identity.GlobalEvent.Raw[]; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/CancelGameLinkRequest.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/CancelGameLinkRequest.ts index 760193099e..804f9b23a8 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/CancelGameLinkRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/CancelGameLinkRequest.ts @@ -2,22 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Jwt as common$$jwt } from "../../../../common/types/Jwt"; +import { common } from "../../../../index"; export const CancelGameLinkRequest: core.serialization.ObjectSchema< serializers.identity.CancelGameLinkRequest.Raw, Rivet.identity.CancelGameLinkRequest > = core.serialization.object({ - identityLinkToken: core.serialization.property( - "identity_link_token", - core.serialization.lazy(async () => (await import("../../../../..")).Jwt) - ), + identityLinkToken: core.serialization.property("identity_link_token", common$$jwt), }); export declare namespace CancelGameLinkRequest { interface Raw { - identity_link_token: serializers.Jwt.Raw; + identity_link_token: common.Jwt.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/CompleteGameLinkRequest.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/CompleteGameLinkRequest.ts index d9c08c7f31..979a50a5db 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/CompleteGameLinkRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/CompleteGameLinkRequest.ts @@ -2,22 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Jwt as common$$jwt } from "../../../../common/types/Jwt"; +import { common } from "../../../../index"; export const CompleteGameLinkRequest: core.serialization.ObjectSchema< serializers.identity.CompleteGameLinkRequest.Raw, Rivet.identity.CompleteGameLinkRequest > = core.serialization.object({ - identityLinkToken: core.serialization.property( - "identity_link_token", - core.serialization.lazy(async () => (await import("../../../../..")).Jwt) - ), + identityLinkToken: core.serialization.property("identity_link_token", common$$jwt), }); export declare namespace CompleteGameLinkRequest { interface Raw { - identity_link_token: serializers.Jwt.Raw; + identity_link_token: common.Jwt.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/GetGameLinkNewIdentity.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/GetGameLinkNewIdentity.ts index 55f8d56162..b01643157e 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/GetGameLinkNewIdentity.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/GetGameLinkNewIdentity.ts @@ -2,29 +2,27 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Jwt as common$$jwt } from "../../../../common/types/Jwt"; +import { Timestamp as common$$timestamp } from "../../../../common/types/Timestamp"; +import { Profile as identity_common$$profile } from "../../common/types/Profile"; +import { common, identity } from "../../../../index"; export const GetGameLinkNewIdentity: core.serialization.ObjectSchema< serializers.identity.GetGameLinkNewIdentity.Raw, Rivet.identity.GetGameLinkNewIdentity > = core.serialization.object({ - identityToken: core.serialization.property( - "identity_token", - core.serialization.lazy(async () => (await import("../../../../..")).Jwt) - ), - identityTokenExpireTs: core.serialization.property( - "identity_token_expire_ts", - core.serialization.lazy(async () => (await import("../../../../..")).Timestamp) - ), - identity: core.serialization.lazyObject(async () => (await import("../../../../..")).identity.Profile), + identityToken: core.serialization.property("identity_token", common$$jwt), + identityTokenExpireTs: core.serialization.property("identity_token_expire_ts", common$$timestamp), + identity: identity_common$$profile, }); export declare namespace GetGameLinkNewIdentity { interface Raw { - identity_token: serializers.Jwt.Raw; - identity_token_expire_ts: serializers.Timestamp.Raw; - identity: serializers.identity.Profile.Raw; + identity_token: common.Jwt.Raw; + identity_token_expire_ts: common.Timestamp.Raw; + identity: identity.Profile.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/GetGameLinkResponse.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/GetGameLinkResponse.ts index e069dc92f3..ac18e4e9cb 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/GetGameLinkResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/GetGameLinkResponse.ts @@ -2,35 +2,33 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { GameLinkStatus as identity_common$$gameLinkStatus } from "../../common/types/GameLinkStatus"; +import { Handle as game_common$$handle } from "../../../../game/resources/common/types/Handle"; +import { Handle as identity_common$$handle } from "../../common/types/Handle"; +import { GetGameLinkNewIdentity as identity_links$$getGameLinkNewIdentity } from "./GetGameLinkNewIdentity"; +import { WatchResponse as common$$watchResponse } from "../../../../common/types/WatchResponse"; +import { identity, game, common } from "../../../../index"; export const GetGameLinkResponse: core.serialization.ObjectSchema< serializers.identity.GetGameLinkResponse.Raw, Rivet.identity.GetGameLinkResponse > = core.serialization.object({ - status: core.serialization.lazy(async () => (await import("../../../../..")).identity.GameLinkStatus), - game: core.serialization.lazyObject(async () => (await import("../../../../..")).game.Handle), - currentIdentity: core.serialization.property( - "current_identity", - core.serialization.lazyObject(async () => (await import("../../../../..")).identity.Handle) - ), - newIdentity: core.serialization.property( - "new_identity", - core.serialization - .lazyObject(async () => (await import("../../../../..")).identity.GetGameLinkNewIdentity) - .optional() - ), - watch: core.serialization.lazyObject(async () => (await import("../../../../..")).WatchResponse), + status: identity_common$$gameLinkStatus, + game: game_common$$handle, + currentIdentity: core.serialization.property("current_identity", identity_common$$handle), + newIdentity: core.serialization.property("new_identity", identity_links$$getGameLinkNewIdentity.optional()), + watch: common$$watchResponse, }); export declare namespace GetGameLinkResponse { interface Raw { - status: serializers.identity.GameLinkStatus.Raw; - game: serializers.game.Handle.Raw; - current_identity: serializers.identity.Handle.Raw; - new_identity?: serializers.identity.GetGameLinkNewIdentity.Raw | null; - watch: serializers.WatchResponse.Raw; + status: identity.GameLinkStatus.Raw; + game: game.Handle.Raw; + current_identity: identity.Handle.Raw; + new_identity?: identity.GetGameLinkNewIdentity.Raw | null; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/PrepareGameLinkResponse.ts b/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/PrepareGameLinkResponse.ts index e0db09607a..eeefc68a68 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/PrepareGameLinkResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/resources/links/types/PrepareGameLinkResponse.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Timestamp as common$$timestamp } from "../../../../common/types/Timestamp"; +import { common } from "../../../../index"; export const PrepareGameLinkResponse: core.serialization.ObjectSchema< serializers.identity.PrepareGameLinkResponse.Raw, @@ -12,16 +14,13 @@ export const PrepareGameLinkResponse: core.serialization.ObjectSchema< > = core.serialization.object({ identityLinkToken: core.serialization.property("identity_link_token", core.serialization.string()), identityLinkUrl: core.serialization.property("identity_link_url", core.serialization.string()), - expireTs: core.serialization.property( - "expire_ts", - core.serialization.lazy(async () => (await import("../../../../..")).Timestamp) - ), + expireTs: core.serialization.property("expire_ts", common$$timestamp), }); export declare namespace PrepareGameLinkResponse { interface Raw { identity_link_token: string; identity_link_url: string; - expire_ts: serializers.Timestamp.Raw; + expire_ts: common.Timestamp.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/types/GetHandlesResponse.ts b/sdks/full/typescript/src/serialization/resources/identity/types/GetHandlesResponse.ts index 41463b3a31..f39ca83128 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/types/GetHandlesResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/types/GetHandlesResponse.ts @@ -2,23 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { Handle as identity_common$$handle } from "../resources/common/types/Handle"; +import { WatchResponse as common$$watchResponse } from "../../common/types/WatchResponse"; +import { identity, common } from "../../index"; export const GetHandlesResponse: core.serialization.ObjectSchema< serializers.identity.GetHandlesResponse.Raw, Rivet.identity.GetHandlesResponse > = core.serialization.object({ - identities: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).identity.Handle) - ), - watch: core.serialization.lazyObject(async () => (await import("../../..")).WatchResponse), + identities: core.serialization.list(identity_common$$handle), + watch: common$$watchResponse, }); export declare namespace GetHandlesResponse { interface Raw { - identities: serializers.identity.Handle.Raw[]; - watch: serializers.WatchResponse.Raw; + identities: identity.Handle.Raw[]; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/types/GetProfileResponse.ts b/sdks/full/typescript/src/serialization/resources/identity/types/GetProfileResponse.ts index e66bf67890..bfa98ce461 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/types/GetProfileResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/types/GetProfileResponse.ts @@ -2,21 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { Profile as identity_common$$profile } from "../resources/common/types/Profile"; +import { WatchResponse as common$$watchResponse } from "../../common/types/WatchResponse"; +import { identity, common } from "../../index"; export const GetProfileResponse: core.serialization.ObjectSchema< serializers.identity.GetProfileResponse.Raw, Rivet.identity.GetProfileResponse > = core.serialization.object({ - identity: core.serialization.lazyObject(async () => (await import("../../..")).identity.Profile), - watch: core.serialization.lazyObject(async () => (await import("../../..")).WatchResponse), + identity: identity_common$$profile, + watch: common$$watchResponse, }); export declare namespace GetProfileResponse { interface Raw { - identity: serializers.identity.Profile.Raw; - watch: serializers.WatchResponse.Raw; + identity: identity.Profile.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/types/GetSummariesResponse.ts b/sdks/full/typescript/src/serialization/resources/identity/types/GetSummariesResponse.ts index 47c42b6d9f..d8527eb5c1 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/types/GetSummariesResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/types/GetSummariesResponse.ts @@ -2,23 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { Summary as identity_common$$summary } from "../resources/common/types/Summary"; +import { WatchResponse as common$$watchResponse } from "../../common/types/WatchResponse"; +import { identity, common } from "../../index"; export const GetSummariesResponse: core.serialization.ObjectSchema< serializers.identity.GetSummariesResponse.Raw, Rivet.identity.GetSummariesResponse > = core.serialization.object({ - identities: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).identity.Summary) - ), - watch: core.serialization.lazyObject(async () => (await import("../../..")).WatchResponse), + identities: core.serialization.list(identity_common$$summary), + watch: common$$watchResponse, }); export declare namespace GetSummariesResponse { interface Raw { - identities: serializers.identity.Summary.Raw[]; - watch: serializers.WatchResponse.Raw; + identities: identity.Summary.Raw[]; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/types/ListFollowersResponse.ts b/sdks/full/typescript/src/serialization/resources/identity/types/ListFollowersResponse.ts index eef6be546b..0638b930c0 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/types/ListFollowersResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/types/ListFollowersResponse.ts @@ -2,25 +2,26 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { Handle as identity_common$$handle } from "../resources/common/types/Handle"; +import { WatchResponse as common$$watchResponse } from "../../common/types/WatchResponse"; +import { identity, common } from "../../index"; export const ListFollowersResponse: core.serialization.ObjectSchema< serializers.identity.ListFollowersResponse.Raw, Rivet.identity.ListFollowersResponse > = core.serialization.object({ - identities: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).identity.Handle) - ), + identities: core.serialization.list(identity_common$$handle), anchor: core.serialization.string().optional(), - watch: core.serialization.lazyObject(async () => (await import("../../..")).WatchResponse), + watch: common$$watchResponse, }); export declare namespace ListFollowersResponse { interface Raw { - identities: serializers.identity.Handle.Raw[]; + identities: identity.Handle.Raw[]; anchor?: string | null; - watch: serializers.WatchResponse.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/types/ListFollowingResponse.ts b/sdks/full/typescript/src/serialization/resources/identity/types/ListFollowingResponse.ts index f250afb11b..99230345b1 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/types/ListFollowingResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/types/ListFollowingResponse.ts @@ -2,25 +2,26 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { Handle as identity_common$$handle } from "../resources/common/types/Handle"; +import { WatchResponse as common$$watchResponse } from "../../common/types/WatchResponse"; +import { identity, common } from "../../index"; export const ListFollowingResponse: core.serialization.ObjectSchema< serializers.identity.ListFollowingResponse.Raw, Rivet.identity.ListFollowingResponse > = core.serialization.object({ - identities: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).identity.Handle) - ), + identities: core.serialization.list(identity_common$$handle), anchor: core.serialization.string().optional(), - watch: core.serialization.lazyObject(async () => (await import("../../..")).WatchResponse), + watch: common$$watchResponse, }); export declare namespace ListFollowingResponse { interface Raw { - identities: serializers.identity.Handle.Raw[]; + identities: identity.Handle.Raw[]; anchor?: string | null; - watch: serializers.WatchResponse.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/types/ListFriendsResponse.ts b/sdks/full/typescript/src/serialization/resources/identity/types/ListFriendsResponse.ts index c01df81aa1..c10b03297e 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/types/ListFriendsResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/types/ListFriendsResponse.ts @@ -2,25 +2,26 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { Handle as identity_common$$handle } from "../resources/common/types/Handle"; +import { WatchResponse as common$$watchResponse } from "../../common/types/WatchResponse"; +import { identity, common } from "../../index"; export const ListFriendsResponse: core.serialization.ObjectSchema< serializers.identity.ListFriendsResponse.Raw, Rivet.identity.ListFriendsResponse > = core.serialization.object({ - identities: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).identity.Handle) - ), + identities: core.serialization.list(identity_common$$handle), anchor: core.serialization.string().optional(), - watch: core.serialization.lazyObject(async () => (await import("../../..")).WatchResponse), + watch: common$$watchResponse, }); export declare namespace ListFriendsResponse { interface Raw { - identities: serializers.identity.Handle.Raw[]; + identities: identity.Handle.Raw[]; anchor?: string | null; - watch: serializers.WatchResponse.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/types/ListMutualFriendsResponse.ts b/sdks/full/typescript/src/serialization/resources/identity/types/ListMutualFriendsResponse.ts index 0da3b771da..839ffe20ce 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/types/ListMutualFriendsResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/types/ListMutualFriendsResponse.ts @@ -2,23 +2,23 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { Handle as identity_common$$handle } from "../resources/common/types/Handle"; +import { identity } from "../../index"; export const ListMutualFriendsResponse: core.serialization.ObjectSchema< serializers.identity.ListMutualFriendsResponse.Raw, Rivet.identity.ListMutualFriendsResponse > = core.serialization.object({ - identities: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).identity.Handle) - ), + identities: core.serialization.list(identity_common$$handle), anchor: core.serialization.string().optional(), }); export declare namespace ListMutualFriendsResponse { interface Raw { - identities: serializers.identity.Handle.Raw[]; + identities: identity.Handle.Raw[]; anchor?: string | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/types/ListRecentFollowersResponse.ts b/sdks/full/typescript/src/serialization/resources/identity/types/ListRecentFollowersResponse.ts index 35b6f62cd4..4b88cf40f3 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/types/ListRecentFollowersResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/types/ListRecentFollowersResponse.ts @@ -2,25 +2,26 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { Handle as identity_common$$handle } from "../resources/common/types/Handle"; +import { WatchResponse as common$$watchResponse } from "../../common/types/WatchResponse"; +import { identity, common } from "../../index"; export const ListRecentFollowersResponse: core.serialization.ObjectSchema< serializers.identity.ListRecentFollowersResponse.Raw, Rivet.identity.ListRecentFollowersResponse > = core.serialization.object({ - identities: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).identity.Handle) - ), + identities: core.serialization.list(identity_common$$handle), anchor: core.serialization.string().optional(), - watch: core.serialization.lazyObject(async () => (await import("../../..")).WatchResponse), + watch: common$$watchResponse, }); export declare namespace ListRecentFollowersResponse { interface Raw { - identities: serializers.identity.Handle.Raw[]; + identities: identity.Handle.Raw[]; anchor?: string | null; - watch: serializers.WatchResponse.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/types/PrepareAvatarUploadResponse.ts b/sdks/full/typescript/src/serialization/resources/identity/types/PrepareAvatarUploadResponse.ts index cfd2d4348f..df575c4e47 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/types/PrepareAvatarUploadResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/types/PrepareAvatarUploadResponse.ts @@ -2,24 +2,23 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { PresignedRequest as upload_common$$presignedRequest } from "../../upload/resources/common/types/PresignedRequest"; +import { upload } from "../../index"; export const PrepareAvatarUploadResponse: core.serialization.ObjectSchema< serializers.identity.PrepareAvatarUploadResponse.Raw, Rivet.identity.PrepareAvatarUploadResponse > = core.serialization.object({ uploadId: core.serialization.property("upload_id", core.serialization.string()), - presignedRequest: core.serialization.property( - "presigned_request", - core.serialization.lazyObject(async () => (await import("../../..")).upload.PresignedRequest) - ), + presignedRequest: core.serialization.property("presigned_request", upload_common$$presignedRequest), }); export declare namespace PrepareAvatarUploadResponse { interface Raw { upload_id: string; - presigned_request: serializers.upload.PresignedRequest.Raw; + presigned_request: upload.PresignedRequest.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/types/SearchResponse.ts b/sdks/full/typescript/src/serialization/resources/identity/types/SearchResponse.ts index 46fba99da0..b9a01e2ccf 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/types/SearchResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/types/SearchResponse.ts @@ -2,23 +2,23 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { Handle as identity_common$$handle } from "../resources/common/types/Handle"; +import { identity } from "../../index"; export const SearchResponse: core.serialization.ObjectSchema< serializers.identity.SearchResponse.Raw, Rivet.identity.SearchResponse > = core.serialization.object({ - identities: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).identity.Handle) - ), + identities: core.serialization.list(identity_common$$handle), anchor: core.serialization.string().optional(), }); export declare namespace SearchResponse { interface Raw { - identities: serializers.identity.Handle.Raw[]; + identities: identity.Handle.Raw[]; anchor?: string | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/types/SetupResponse.ts b/sdks/full/typescript/src/serialization/resources/identity/types/SetupResponse.ts index 6ac4b58c75..3e4fe35992 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/types/SetupResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/types/SetupResponse.ts @@ -2,31 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { Jwt as common$$jwt } from "../../common/types/Jwt"; +import { Timestamp as common$$timestamp } from "../../common/types/Timestamp"; +import { Profile as identity_common$$profile } from "../resources/common/types/Profile"; +import { common, identity } from "../../index"; export const SetupResponse: core.serialization.ObjectSchema< serializers.identity.SetupResponse.Raw, Rivet.identity.SetupResponse > = core.serialization.object({ - identityToken: core.serialization.property( - "identity_token", - core.serialization.lazy(async () => (await import("../../..")).Jwt) - ), - identityTokenExpireTs: core.serialization.property( - "identity_token_expire_ts", - core.serialization.lazy(async () => (await import("../../..")).Timestamp) - ), - identity: core.serialization.lazyObject(async () => (await import("../../..")).identity.Profile), + identityToken: core.serialization.property("identity_token", common$$jwt), + identityTokenExpireTs: core.serialization.property("identity_token_expire_ts", common$$timestamp), + identity: identity_common$$profile, gameId: core.serialization.property("game_id", core.serialization.string()), }); export declare namespace SetupResponse { interface Raw { - identity_token: serializers.Jwt.Raw; - identity_token_expire_ts: serializers.Timestamp.Raw; - identity: serializers.identity.Profile.Raw; + identity_token: common.Jwt.Raw; + identity_token_expire_ts: common.Timestamp.Raw; + identity: identity.Profile.Raw; game_id: string; } } diff --git a/sdks/full/typescript/src/serialization/resources/identity/types/ValidateProfileResponse.ts b/sdks/full/typescript/src/serialization/resources/identity/types/ValidateProfileResponse.ts index 42444905eb..8f3ef6f0e5 100644 --- a/sdks/full/typescript/src/serialization/resources/identity/types/ValidateProfileResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/identity/types/ValidateProfileResponse.ts @@ -2,21 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { ValidationError as common$$validationError } from "../../common/types/ValidationError"; +import { common } from "../../index"; export const ValidateProfileResponse: core.serialization.ObjectSchema< serializers.identity.ValidateProfileResponse.Raw, Rivet.identity.ValidateProfileResponse > = core.serialization.object({ - errors: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).ValidationError) - ), + errors: core.serialization.list(common$$validationError), }); export declare namespace ValidateProfileResponse { interface Raw { - errors: serializers.ValidationError.Raw[]; + errors: common.ValidationError.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Directory.ts b/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Directory.ts index 551cfbd892..f11ee98039 100644 --- a/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Directory.ts +++ b/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Directory.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const Directory: core.serialization.Schema = diff --git a/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Entry.ts b/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Entry.ts index d621b55722..2cefd67728 100644 --- a/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Entry.ts +++ b/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Entry.ts @@ -2,21 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Key as kv_common$$key } from "./Key"; +import { Value as kv_common$$value } from "./Value"; +import { kv } from "../../../../index"; export const Entry: core.serialization.ObjectSchema = core.serialization.object({ - key: core.serialization.lazy(async () => (await import("../../../../..")).kv.Key), - value: core.serialization.lazy(async () => (await import("../../../../..")).kv.Value), + key: kv_common$$key, + value: kv_common$$value, deleted: core.serialization.boolean().optional(), }); export declare namespace Entry { interface Raw { - key: serializers.kv.Key.Raw; - value?: serializers.kv.Value.Raw; + key: kv.Key.Raw; + value?: kv.Value.Raw; deleted?: boolean | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Key.ts b/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Key.ts index f1c6b42a71..5d31f57255 100644 --- a/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Key.ts +++ b/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Key.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const Key: core.serialization.Schema = core.serialization.string(); diff --git a/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/PutEntry.ts b/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/PutEntry.ts index a309e573c0..d7a197d311 100644 --- a/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/PutEntry.ts +++ b/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/PutEntry.ts @@ -2,19 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Key as kv_common$$key } from "./Key"; +import { Value as kv_common$$value } from "./Value"; +import { kv } from "../../../../index"; export const PutEntry: core.serialization.ObjectSchema = core.serialization.object({ - key: core.serialization.lazy(async () => (await import("../../../../..")).kv.Key), - value: core.serialization.lazy(async () => (await import("../../../../..")).kv.Value), + key: kv_common$$key, + value: kv_common$$value, }); export declare namespace PutEntry { interface Raw { - key: serializers.kv.Key.Raw; - value?: serializers.kv.Value.Raw; + key: kv.Key.Raw; + value?: kv.Value.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Value.ts b/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Value.ts index 2e5d3b8267..8862823529 100644 --- a/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Value.ts +++ b/sdks/full/typescript/src/serialization/resources/kv/resources/common/types/Value.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const Value: core.serialization.Schema = core.serialization.unknown(); diff --git a/sdks/full/typescript/src/serialization/resources/kv/types/GetBatchResponse.ts b/sdks/full/typescript/src/serialization/resources/kv/types/GetBatchResponse.ts index 59e09e1c57..41741a1e54 100644 --- a/sdks/full/typescript/src/serialization/resources/kv/types/GetBatchResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/kv/types/GetBatchResponse.ts @@ -2,21 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { Entry as kv_common$$entry } from "../resources/common/types/Entry"; +import { WatchResponse as common$$watchResponse } from "../../common/types/WatchResponse"; +import { kv, common } from "../../index"; export const GetBatchResponse: core.serialization.ObjectSchema< serializers.kv.GetBatchResponse.Raw, Rivet.kv.GetBatchResponse > = core.serialization.object({ - entries: core.serialization.list(core.serialization.lazyObject(async () => (await import("../../..")).kv.Entry)), - watch: core.serialization.lazyObject(async () => (await import("../../..")).WatchResponse), + entries: core.serialization.list(kv_common$$entry), + watch: common$$watchResponse, }); export declare namespace GetBatchResponse { interface Raw { - entries: serializers.kv.Entry.Raw[]; - watch: serializers.WatchResponse.Raw; + entries: kv.Entry.Raw[]; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/kv/types/GetResponse.ts b/sdks/full/typescript/src/serialization/resources/kv/types/GetResponse.ts index 4ca3a825a6..23e14dcd81 100644 --- a/sdks/full/typescript/src/serialization/resources/kv/types/GetResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/kv/types/GetResponse.ts @@ -2,21 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { Value as kv_common$$value } from "../resources/common/types/Value"; +import { WatchResponse as common$$watchResponse } from "../../common/types/WatchResponse"; +import { kv, common } from "../../index"; export const GetResponse: core.serialization.ObjectSchema = core.serialization.object({ - value: core.serialization.lazy(async () => (await import("../../..")).kv.Value), + value: kv_common$$value, deleted: core.serialization.boolean().optional(), - watch: core.serialization.lazyObject(async () => (await import("../../..")).WatchResponse), + watch: common$$watchResponse, }); export declare namespace GetResponse { interface Raw { - value?: serializers.kv.Value.Raw; + value?: kv.Value.Raw; deleted?: boolean | null; - watch: serializers.WatchResponse.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/kv/types/ListResponse.ts b/sdks/full/typescript/src/serialization/resources/kv/types/ListResponse.ts index ddf5176c0c..3316e0fd71 100644 --- a/sdks/full/typescript/src/serialization/resources/kv/types/ListResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/kv/types/ListResponse.ts @@ -2,19 +2,19 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { Entry as kv_common$$entry } from "../resources/common/types/Entry"; +import { kv } from "../../index"; export const ListResponse: core.serialization.ObjectSchema = core.serialization.object({ - entries: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).kv.Entry) - ), + entries: core.serialization.list(kv_common$$entry), }); export declare namespace ListResponse { interface Raw { - entries: serializers.kv.Entry.Raw[]; + entries: kv.Entry.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/kv/types/PutBatchRequest.ts b/sdks/full/typescript/src/serialization/resources/kv/types/PutBatchRequest.ts index e98c4d5acc..7f45dc3a59 100644 --- a/sdks/full/typescript/src/serialization/resources/kv/types/PutBatchRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/kv/types/PutBatchRequest.ts @@ -2,21 +2,23 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { PutEntry as kv_common$$putEntry } from "../resources/common/types/PutEntry"; +import { kv } from "../../index"; export const PutBatchRequest: core.serialization.ObjectSchema< serializers.kv.PutBatchRequest.Raw, Rivet.kv.PutBatchRequest > = core.serialization.object({ namespaceId: core.serialization.property("namespace_id", core.serialization.string().optional()), - entries: core.serialization.list(core.serialization.lazyObject(async () => (await import("../../..")).kv.PutEntry)), + entries: core.serialization.list(kv_common$$putEntry), }); export declare namespace PutBatchRequest { interface Raw { namespace_id?: string | null; - entries: serializers.kv.PutEntry.Raw[]; + entries: kv.PutEntry.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/kv/types/PutRequest.ts b/sdks/full/typescript/src/serialization/resources/kv/types/PutRequest.ts index 578bfed0b0..b2cf72018b 100644 --- a/sdks/full/typescript/src/serialization/resources/kv/types/PutRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/kv/types/PutRequest.ts @@ -2,21 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { Key as kv_common$$key } from "../resources/common/types/Key"; +import { Value as kv_common$$value } from "../resources/common/types/Value"; +import { kv } from "../../index"; export const PutRequest: core.serialization.ObjectSchema = core.serialization.object({ namespaceId: core.serialization.property("namespace_id", core.serialization.string().optional()), - key: core.serialization.lazy(async () => (await import("../../..")).kv.Key), - value: core.serialization.lazy(async () => (await import("../../..")).kv.Value), + key: kv_common$$key, + value: kv_common$$value, }); export declare namespace PutRequest { interface Raw { namespace_id?: string | null; - key: serializers.kv.Key.Raw; - value?: serializers.kv.Value.Raw; + key: kv.Key.Raw; + value?: kv.Value.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/CustomLobbyPublicity.ts b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/CustomLobbyPublicity.ts index a82627c1d5..10885e8489 100644 --- a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/CustomLobbyPublicity.ts +++ b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/CustomLobbyPublicity.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const CustomLobbyPublicity: core.serialization.Schema< diff --git a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/GameModeInfo.ts b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/GameModeInfo.ts index d84d040283..893198efad 100644 --- a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/GameModeInfo.ts +++ b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/GameModeInfo.ts @@ -2,22 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Identifier as common$$identifier } from "../../../../common/types/Identifier"; +import { common } from "../../../../index"; export const GameModeInfo: core.serialization.ObjectSchema< serializers.matchmaker.GameModeInfo.Raw, Rivet.matchmaker.GameModeInfo > = core.serialization.object({ - gameModeId: core.serialization.property( - "game_mode_id", - core.serialization.lazy(async () => (await import("../../../../..")).Identifier) - ), + gameModeId: core.serialization.property("game_mode_id", common$$identifier), }); export declare namespace GameModeInfo { interface Raw { - game_mode_id: serializers.Identifier.Raw; + game_mode_id: common.Identifier.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinLobby.ts b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinLobby.ts index ac863e7e43..8d0fed2835 100644 --- a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinLobby.ts +++ b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinLobby.ts @@ -2,28 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { JoinRegion as matchmaker_common$$joinRegion } from "./JoinRegion"; +import { JoinPort as matchmaker_common$$joinPort } from "./JoinPort"; +import { JoinPlayer as matchmaker_common$$joinPlayer } from "./JoinPlayer"; +import { matchmaker } from "../../../../index"; export const JoinLobby: core.serialization.ObjectSchema< serializers.matchmaker.JoinLobby.Raw, Rivet.matchmaker.JoinLobby > = core.serialization.object({ lobbyId: core.serialization.property("lobby_id", core.serialization.string()), - region: core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinRegion), - ports: core.serialization.record( - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinPort) - ), - player: core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinPlayer), + region: matchmaker_common$$joinRegion, + ports: core.serialization.record(core.serialization.string(), matchmaker_common$$joinPort), + player: matchmaker_common$$joinPlayer, }); export declare namespace JoinLobby { interface Raw { lobby_id: string; - region: serializers.matchmaker.JoinRegion.Raw; - ports: Record; - player: serializers.matchmaker.JoinPlayer.Raw; + region: matchmaker.JoinRegion.Raw; + ports: Record; + player: matchmaker.JoinPlayer.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinPlayer.ts b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinPlayer.ts index b671fb8b3e..d2ceb3cd5a 100644 --- a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinPlayer.ts +++ b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinPlayer.ts @@ -2,19 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Jwt as common$$jwt } from "../../../../common/types/Jwt"; +import { common } from "../../../../index"; export const JoinPlayer: core.serialization.ObjectSchema< serializers.matchmaker.JoinPlayer.Raw, Rivet.matchmaker.JoinPlayer > = core.serialization.object({ - token: core.serialization.lazy(async () => (await import("../../../../..")).Jwt), + token: common$$jwt, }); export declare namespace JoinPlayer { interface Raw { - token: serializers.Jwt.Raw; + token: common.Jwt.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinPort.ts b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinPort.ts index 6f9413c750..397de3d732 100644 --- a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinPort.ts +++ b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinPort.ts @@ -2,21 +2,18 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { JoinPortRange as matchmaker_common$$joinPortRange } from "./JoinPortRange"; +import { matchmaker } from "../../../../index"; export const JoinPort: core.serialization.ObjectSchema = core.serialization.object({ host: core.serialization.string().optional(), hostname: core.serialization.string(), port: core.serialization.number().optional(), - portRange: core.serialization.property( - "port_range", - core.serialization - .lazyObject(async () => (await import("../../../../..")).matchmaker.JoinPortRange) - .optional() - ), + portRange: core.serialization.property("port_range", matchmaker_common$$joinPortRange.optional()), isTls: core.serialization.property("is_tls", core.serialization.boolean()), }); @@ -25,7 +22,7 @@ export declare namespace JoinPort { host?: string | null; hostname: string; port?: number | null; - port_range?: serializers.matchmaker.JoinPortRange.Raw | null; + port_range?: matchmaker.JoinPortRange.Raw | null; is_tls: boolean; } } diff --git a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinPortRange.ts b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinPortRange.ts index f970256c39..fa51f669e5 100644 --- a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinPortRange.ts +++ b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinPortRange.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const JoinPortRange: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinRegion.ts b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinRegion.ts index 1bd0c52094..90fef0a73b 100644 --- a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinRegion.ts +++ b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinRegion.ts @@ -2,27 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Identifier as common$$identifier } from "../../../../common/types/Identifier"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { common } from "../../../../index"; export const JoinRegion: core.serialization.ObjectSchema< serializers.matchmaker.JoinRegion.Raw, Rivet.matchmaker.JoinRegion > = core.serialization.object({ - regionId: core.serialization.property( - "region_id", - core.serialization.lazy(async () => (await import("../../../../..")).Identifier) - ), - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), + regionId: core.serialization.property("region_id", common$$identifier), + displayName: core.serialization.property("display_name", common$$displayName), }); export declare namespace JoinRegion { interface Raw { - region_id: serializers.Identifier.Raw; - display_name: serializers.DisplayName.Raw; + region_id: common.Identifier.Raw; + display_name: common.DisplayName.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/LobbyInfo.ts b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/LobbyInfo.ts index 0e89aadff0..bac822d7b6 100644 --- a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/LobbyInfo.ts +++ b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/LobbyInfo.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const LobbyInfo: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/RegionInfo.ts b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/RegionInfo.ts index 6268b0e956..09cd474cea 100644 --- a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/RegionInfo.ts +++ b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/common/types/RegionInfo.ts @@ -2,42 +2,32 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Identifier as common$$identifier } from "../../../../common/types/Identifier"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { Coord as geo_common$$coord } from "../../../../geo/resources/common/types/Coord"; +import { Distance as geo_common$$distance } from "../../../../geo/resources/common/types/Distance"; +import { common, geo } from "../../../../index"; export const RegionInfo: core.serialization.ObjectSchema< serializers.matchmaker.RegionInfo.Raw, Rivet.matchmaker.RegionInfo > = core.serialization.object({ - regionId: core.serialization.property( - "region_id", - core.serialization.lazy(async () => (await import("../../../../..")).Identifier) - ), - providerDisplayName: core.serialization.property( - "provider_display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), - regionDisplayName: core.serialization.property( - "region_display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), - datacenterCoord: core.serialization.property( - "datacenter_coord", - core.serialization.lazyObject(async () => (await import("../../../../..")).geo.Coord) - ), - datacenterDistanceFromClient: core.serialization.property( - "datacenter_distance_from_client", - core.serialization.lazyObject(async () => (await import("../../../../..")).geo.Distance) - ), + regionId: core.serialization.property("region_id", common$$identifier), + providerDisplayName: core.serialization.property("provider_display_name", common$$displayName), + regionDisplayName: core.serialization.property("region_display_name", common$$displayName), + datacenterCoord: core.serialization.property("datacenter_coord", geo_common$$coord), + datacenterDistanceFromClient: core.serialization.property("datacenter_distance_from_client", geo_common$$distance), }); export declare namespace RegionInfo { interface Raw { - region_id: serializers.Identifier.Raw; - provider_display_name: serializers.DisplayName.Raw; - region_display_name: serializers.DisplayName.Raw; - datacenter_coord: serializers.geo.Coord.Raw; - datacenter_distance_from_client: serializers.geo.Distance.Raw; + region_id: common.Identifier.Raw; + provider_display_name: common.DisplayName.Raw; + region_display_name: common.DisplayName.Raw; + datacenter_coord: geo.Coord.Raw; + datacenter_distance_from_client: geo.Distance.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/getState.ts b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/getState.ts index fa5cd74c8d..b442673254 100644 --- a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/getState.ts +++ b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/getState.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; +import * as serializers from "../../../../../index"; import * as core from "../../../../../../core"; export const Response: core.serialization.Schema< diff --git a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/CreateLobbyRequest.ts b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/CreateLobbyRequest.ts index 72fe4ebe94..f18e1cbbcc 100644 --- a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/CreateLobbyRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/CreateLobbyRequest.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Rivet from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Rivet from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { CustomLobbyPublicity as matchmaker_common$$customLobbyPublicity } from "../../../common/types/CustomLobbyPublicity"; +import { Config as captcha_config$$config } from "../../../../../captcha/resources/config/types/Config"; +import { matchmaker, captcha } from "../../../../../index"; export const CreateLobbyRequest: core.serialization.Schema< serializers.matchmaker.CreateLobbyRequest.Raw, @@ -12,13 +15,11 @@ export const CreateLobbyRequest: core.serialization.Schema< > = core.serialization.object({ gameMode: core.serialization.property("game_mode", core.serialization.string()), region: core.serialization.string().optional(), - publicity: core.serialization - .lazy(async () => (await import("../../../../../..")).matchmaker.CustomLobbyPublicity) - .optional(), + publicity: matchmaker_common$$customLobbyPublicity.optional(), tags: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), maxPlayers: core.serialization.property("max_players", core.serialization.number().optional()), lobbyConfig: core.serialization.property("lobby_config", core.serialization.unknown().optional()), - captcha: core.serialization.lazyObject(async () => (await import("../../../../../..")).captcha.Config).optional(), + captcha: captcha_config$$config.optional(), verificationData: core.serialization.property("verification_data", core.serialization.unknown().optional()), }); @@ -26,11 +27,11 @@ export declare namespace CreateLobbyRequest { interface Raw { game_mode: string; region?: string | null; - publicity?: serializers.matchmaker.CustomLobbyPublicity.Raw | null; + publicity?: matchmaker.CustomLobbyPublicity.Raw | null; tags?: Record | null; max_players?: number | null; lobby_config?: unknown | null; - captcha?: serializers.captcha.Config.Raw | null; + captcha?: captcha.Config.Raw | null; verification_data?: unknown | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/FindLobbyRequest.ts b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/FindLobbyRequest.ts index 696ced91d1..3a3c260e3b 100644 --- a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/FindLobbyRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/FindLobbyRequest.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Rivet from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Rivet from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { Config as captcha_config$$config } from "../../../../../captcha/resources/config/types/Config"; +import { captcha } from "../../../../../index"; export const FindLobbyRequest: core.serialization.Schema< serializers.matchmaker.FindLobbyRequest.Raw, @@ -18,7 +20,7 @@ export const FindLobbyRequest: core.serialization.Schema< ), tags: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), maxPlayers: core.serialization.property("max_players", core.serialization.number().optional()), - captcha: core.serialization.lazyObject(async () => (await import("../../../../../..")).captcha.Config).optional(), + captcha: captcha_config$$config.optional(), verificationData: core.serialization.property("verification_data", core.serialization.unknown().optional()), }); @@ -29,7 +31,7 @@ export declare namespace FindLobbyRequest { prevent_auto_create_lobby?: boolean | null; tags?: Record | null; max_players?: number | null; - captcha?: serializers.captcha.Config.Raw | null; + captcha?: captcha.Config.Raw | null; verification_data?: unknown | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/JoinLobbyRequest.ts b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/JoinLobbyRequest.ts index f9b444edb3..511e171a4b 100644 --- a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/JoinLobbyRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/JoinLobbyRequest.ts @@ -2,23 +2,25 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Rivet from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Rivet from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { Config as captcha_config$$config } from "../../../../../captcha/resources/config/types/Config"; +import { captcha } from "../../../../../index"; export const JoinLobbyRequest: core.serialization.Schema< serializers.matchmaker.JoinLobbyRequest.Raw, Rivet.matchmaker.JoinLobbyRequest > = core.serialization.object({ lobbyId: core.serialization.property("lobby_id", core.serialization.string()), - captcha: core.serialization.lazyObject(async () => (await import("../../../../../..")).captcha.Config).optional(), + captcha: captcha_config$$config.optional(), verificationData: core.serialization.property("verification_data", core.serialization.unknown().optional()), }); export declare namespace JoinLobbyRequest { interface Raw { lobby_id: string; - captcha?: serializers.captcha.Config.Raw | null; + captcha?: captcha.Config.Raw | null; verification_data?: unknown | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/SetLobbyClosedRequest.ts b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/SetLobbyClosedRequest.ts index 34dd4f5e81..dc16f64f1f 100644 --- a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/SetLobbyClosedRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/SetLobbyClosedRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Rivet from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Rivet from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const SetLobbyClosedRequest: core.serialization.Schema< diff --git a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/setState.ts b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/setState.ts index 0c8e7b7127..87703edf93 100644 --- a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/setState.ts +++ b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/setState.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; +import * as serializers from "../../../../../index"; import * as core from "../../../../../../core"; export const Request: core.serialization.Schema< diff --git a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/CreateLobbyResponse.ts b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/CreateLobbyResponse.ts index cb70e64ac3..b128c857ac 100644 --- a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/CreateLobbyResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/CreateLobbyResponse.ts @@ -2,26 +2,27 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { JoinLobby as matchmaker_common$$joinLobby } from "../../common/types/JoinLobby"; +import { JoinPort as matchmaker_common$$joinPort } from "../../common/types/JoinPort"; +import { JoinPlayer as matchmaker_common$$joinPlayer } from "../../common/types/JoinPlayer"; +import { matchmaker } from "../../../../index"; export const CreateLobbyResponse: core.serialization.ObjectSchema< serializers.matchmaker.CreateLobbyResponse.Raw, Rivet.matchmaker.CreateLobbyResponse > = core.serialization.object({ - lobby: core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinLobby), - ports: core.serialization.record( - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinPort) - ), - player: core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinPlayer), + lobby: matchmaker_common$$joinLobby, + ports: core.serialization.record(core.serialization.string(), matchmaker_common$$joinPort), + player: matchmaker_common$$joinPlayer, }); export declare namespace CreateLobbyResponse { interface Raw { - lobby: serializers.matchmaker.JoinLobby.Raw; - ports: Record; - player: serializers.matchmaker.JoinPlayer.Raw; + lobby: matchmaker.JoinLobby.Raw; + ports: Record; + player: matchmaker.JoinPlayer.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/FindLobbyResponse.ts b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/FindLobbyResponse.ts index 9eae87d8c5..375882ae9c 100644 --- a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/FindLobbyResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/FindLobbyResponse.ts @@ -2,26 +2,27 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { JoinLobby as matchmaker_common$$joinLobby } from "../../common/types/JoinLobby"; +import { JoinPort as matchmaker_common$$joinPort } from "../../common/types/JoinPort"; +import { JoinPlayer as matchmaker_common$$joinPlayer } from "../../common/types/JoinPlayer"; +import { matchmaker } from "../../../../index"; export const FindLobbyResponse: core.serialization.ObjectSchema< serializers.matchmaker.FindLobbyResponse.Raw, Rivet.matchmaker.FindLobbyResponse > = core.serialization.object({ - lobby: core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinLobby), - ports: core.serialization.record( - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinPort) - ), - player: core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinPlayer), + lobby: matchmaker_common$$joinLobby, + ports: core.serialization.record(core.serialization.string(), matchmaker_common$$joinPort), + player: matchmaker_common$$joinPlayer, }); export declare namespace FindLobbyResponse { interface Raw { - lobby: serializers.matchmaker.JoinLobby.Raw; - ports: Record; - player: serializers.matchmaker.JoinPlayer.Raw; + lobby: matchmaker.JoinLobby.Raw; + ports: Record; + player: matchmaker.JoinPlayer.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/JoinLobbyResponse.ts b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/JoinLobbyResponse.ts index 289cf984c4..a721e3eb07 100644 --- a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/JoinLobbyResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/JoinLobbyResponse.ts @@ -2,26 +2,27 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { JoinLobby as matchmaker_common$$joinLobby } from "../../common/types/JoinLobby"; +import { JoinPort as matchmaker_common$$joinPort } from "../../common/types/JoinPort"; +import { JoinPlayer as matchmaker_common$$joinPlayer } from "../../common/types/JoinPlayer"; +import { matchmaker } from "../../../../index"; export const JoinLobbyResponse: core.serialization.ObjectSchema< serializers.matchmaker.JoinLobbyResponse.Raw, Rivet.matchmaker.JoinLobbyResponse > = core.serialization.object({ - lobby: core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinLobby), - ports: core.serialization.record( - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinPort) - ), - player: core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinPlayer), + lobby: matchmaker_common$$joinLobby, + ports: core.serialization.record(core.serialization.string(), matchmaker_common$$joinPort), + player: matchmaker_common$$joinPlayer, }); export declare namespace JoinLobbyResponse { interface Raw { - lobby: serializers.matchmaker.JoinLobby.Raw; - ports: Record; - player: serializers.matchmaker.JoinPlayer.Raw; + lobby: matchmaker.JoinLobby.Raw; + ports: Record; + player: matchmaker.JoinPlayer.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/ListLobbiesResponse.ts b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/ListLobbiesResponse.ts index 5de03f5fd7..7b6eae5b12 100644 --- a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/ListLobbiesResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/ListLobbiesResponse.ts @@ -2,32 +2,27 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { GameModeInfo as matchmaker_common$$gameModeInfo } from "../../common/types/GameModeInfo"; +import { RegionInfo as matchmaker_common$$regionInfo } from "../../common/types/RegionInfo"; +import { LobbyInfo as matchmaker_common$$lobbyInfo } from "../../common/types/LobbyInfo"; +import { matchmaker } from "../../../../index"; export const ListLobbiesResponse: core.serialization.ObjectSchema< serializers.matchmaker.ListLobbiesResponse.Raw, Rivet.matchmaker.ListLobbiesResponse > = core.serialization.object({ - gameModes: core.serialization.property( - "game_modes", - core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.GameModeInfo) - ) - ), - regions: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.RegionInfo) - ), - lobbies: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.LobbyInfo) - ), + gameModes: core.serialization.property("game_modes", core.serialization.list(matchmaker_common$$gameModeInfo)), + regions: core.serialization.list(matchmaker_common$$regionInfo), + lobbies: core.serialization.list(matchmaker_common$$lobbyInfo), }); export declare namespace ListLobbiesResponse { interface Raw { - game_modes: serializers.matchmaker.GameModeInfo.Raw[]; - regions: serializers.matchmaker.RegionInfo.Raw[]; - lobbies: serializers.matchmaker.LobbyInfo.Raw[]; + game_modes: matchmaker.GameModeInfo.Raw[]; + regions: matchmaker.RegionInfo.Raw[]; + lobbies: matchmaker.LobbyInfo.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/players/client/requests/PlayerConnectedRequest.ts b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/players/client/requests/PlayerConnectedRequest.ts index 271b9135d0..9a01e7e1a9 100644 --- a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/players/client/requests/PlayerConnectedRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/players/client/requests/PlayerConnectedRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Rivet from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Rivet from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const PlayerConnectedRequest: core.serialization.Schema< diff --git a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/players/client/requests/PlayerDisconnectedRequest.ts b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/players/client/requests/PlayerDisconnectedRequest.ts index df0258ffa9..4af2aab40d 100644 --- a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/players/client/requests/PlayerDisconnectedRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/players/client/requests/PlayerDisconnectedRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Rivet from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Rivet from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const PlayerDisconnectedRequest: core.serialization.Schema< diff --git a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/players/types/GameModeStatistics.ts b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/players/types/GameModeStatistics.ts index 37ce994b1d..8f2c6bddeb 100644 --- a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/players/types/GameModeStatistics.ts +++ b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/players/types/GameModeStatistics.ts @@ -2,24 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Identifier as common$$identifier } from "../../../../common/types/Identifier"; +import { RegionStatistics as matchmaker_players$$regionStatistics } from "./RegionStatistics"; +import { common, matchmaker } from "../../../../index"; export const GameModeStatistics: core.serialization.ObjectSchema< serializers.matchmaker.GameModeStatistics.Raw, Rivet.matchmaker.GameModeStatistics > = core.serialization.object({ playerCount: core.serialization.property("player_count", core.serialization.number()), - regions: core.serialization.record( - core.serialization.lazy(async () => (await import("../../../../..")).Identifier), - core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.RegionStatistics) - ), + regions: core.serialization.record(common$$identifier, matchmaker_players$$regionStatistics), }); export declare namespace GameModeStatistics { interface Raw { player_count: number; - regions: Record; + regions: Record; } } diff --git a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/players/types/GetStatisticsResponse.ts b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/players/types/GetStatisticsResponse.ts index 625d73d4a4..1cde117ac3 100644 --- a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/players/types/GetStatisticsResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/players/types/GetStatisticsResponse.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Identifier as common$$identifier } from "../../../../common/types/Identifier"; +import { GameModeStatistics as matchmaker_players$$gameModeStatistics } from "./GameModeStatistics"; +import { common, matchmaker } from "../../../../index"; export const GetStatisticsResponse: core.serialization.ObjectSchema< serializers.matchmaker.GetStatisticsResponse.Raw, @@ -13,16 +16,13 @@ export const GetStatisticsResponse: core.serialization.ObjectSchema< playerCount: core.serialization.property("player_count", core.serialization.number()), gameModes: core.serialization.property( "game_modes", - core.serialization.record( - core.serialization.lazy(async () => (await import("../../../../..")).Identifier), - core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.GameModeStatistics) - ) + core.serialization.record(common$$identifier, matchmaker_players$$gameModeStatistics) ), }); export declare namespace GetStatisticsResponse { interface Raw { player_count: number; - game_modes: Record; + game_modes: Record; } } diff --git a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/players/types/RegionStatistics.ts b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/players/types/RegionStatistics.ts index da7ec7253e..179f5ce3b9 100644 --- a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/players/types/RegionStatistics.ts +++ b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/players/types/RegionStatistics.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const RegionStatistics: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/regions/types/ListRegionsResponse.ts b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/regions/types/ListRegionsResponse.ts index 608d29cf57..52b47b98d7 100644 --- a/sdks/full/typescript/src/serialization/resources/matchmaker/resources/regions/types/ListRegionsResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/matchmaker/resources/regions/types/ListRegionsResponse.ts @@ -2,21 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { RegionInfo as matchmaker_common$$regionInfo } from "../../common/types/RegionInfo"; +import { matchmaker } from "../../../../index"; export const ListRegionsResponse: core.serialization.ObjectSchema< serializers.matchmaker.ListRegionsResponse.Raw, Rivet.matchmaker.ListRegionsResponse > = core.serialization.object({ - regions: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.RegionInfo) - ), + regions: core.serialization.list(matchmaker_common$$regionInfo), }); export declare namespace ListRegionsResponse { interface Raw { - regions: serializers.matchmaker.RegionInfo.Raw[]; + regions: matchmaker.RegionInfo.Raw[]; } } diff --git a/sdks/full/typescript/src/serialization/resources/portal/resources/common/types/NotificationRegisterFirebaseService.ts b/sdks/full/typescript/src/serialization/resources/portal/resources/common/types/NotificationRegisterFirebaseService.ts index 64b8839fa3..748eb5bf20 100644 --- a/sdks/full/typescript/src/serialization/resources/portal/resources/common/types/NotificationRegisterFirebaseService.ts +++ b/sdks/full/typescript/src/serialization/resources/portal/resources/common/types/NotificationRegisterFirebaseService.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const NotificationRegisterFirebaseService: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/portal/resources/common/types/NotificationRegisterService.ts b/sdks/full/typescript/src/serialization/resources/portal/resources/common/types/NotificationRegisterService.ts index 493e4622d0..e55ea6e11b 100644 --- a/sdks/full/typescript/src/serialization/resources/portal/resources/common/types/NotificationRegisterService.ts +++ b/sdks/full/typescript/src/serialization/resources/portal/resources/common/types/NotificationRegisterService.ts @@ -2,21 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { NotificationRegisterFirebaseService as portal_common$$notificationRegisterFirebaseService } from "./NotificationRegisterFirebaseService"; +import { portal } from "../../../../index"; export const NotificationRegisterService: core.serialization.ObjectSchema< serializers.portal.NotificationRegisterService.Raw, Rivet.portal.NotificationRegisterService > = core.serialization.object({ - firebase: core.serialization - .lazyObject(async () => (await import("../../../../..")).portal.NotificationRegisterFirebaseService) - .optional(), + firebase: portal_common$$notificationRegisterFirebaseService.optional(), }); export declare namespace NotificationRegisterService { interface Raw { - firebase?: serializers.portal.NotificationRegisterFirebaseService.Raw | null; + firebase?: portal.NotificationRegisterFirebaseService.Raw | null; } } diff --git a/sdks/full/typescript/src/serialization/resources/portal/resources/common/types/NotificationUnregisterService.ts b/sdks/full/typescript/src/serialization/resources/portal/resources/common/types/NotificationUnregisterService.ts index e25385d83d..cd7ee68bba 100644 --- a/sdks/full/typescript/src/serialization/resources/portal/resources/common/types/NotificationUnregisterService.ts +++ b/sdks/full/typescript/src/serialization/resources/portal/resources/common/types/NotificationUnregisterService.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const NotificationUnregisterService: core.serialization.Schema< diff --git a/sdks/full/typescript/src/serialization/resources/portal/resources/games/types/GetGameProfileResponse.ts b/sdks/full/typescript/src/serialization/resources/portal/resources/games/types/GetGameProfileResponse.ts index ab388b03ad..853db77c5f 100644 --- a/sdks/full/typescript/src/serialization/resources/portal/resources/games/types/GetGameProfileResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/portal/resources/games/types/GetGameProfileResponse.ts @@ -2,21 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Profile as game_common$$profile } from "../../../../game/resources/common/types/Profile"; +import { WatchResponse as common$$watchResponse } from "../../../../common/types/WatchResponse"; +import { game, common } from "../../../../index"; export const GetGameProfileResponse: core.serialization.ObjectSchema< serializers.portal.GetGameProfileResponse.Raw, Rivet.portal.GetGameProfileResponse > = core.serialization.object({ - game: core.serialization.lazyObject(async () => (await import("../../../../..")).game.Profile), - watch: core.serialization.lazyObject(async () => (await import("../../../../..")).WatchResponse), + game: game_common$$profile, + watch: common$$watchResponse, }); export declare namespace GetGameProfileResponse { interface Raw { - game: serializers.game.Profile.Raw; - watch: serializers.WatchResponse.Raw; + game: game.Profile.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/portal/resources/games/types/GetSuggestedGamesResponse.ts b/sdks/full/typescript/src/serialization/resources/portal/resources/games/types/GetSuggestedGamesResponse.ts index b0c1cdf92d..6dae5dab4b 100644 --- a/sdks/full/typescript/src/serialization/resources/portal/resources/games/types/GetSuggestedGamesResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/portal/resources/games/types/GetSuggestedGamesResponse.ts @@ -2,23 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Summary as game_common$$summary } from "../../../../game/resources/common/types/Summary"; +import { WatchResponse as common$$watchResponse } from "../../../../common/types/WatchResponse"; +import { game, common } from "../../../../index"; export const GetSuggestedGamesResponse: core.serialization.ObjectSchema< serializers.portal.GetSuggestedGamesResponse.Raw, Rivet.portal.GetSuggestedGamesResponse > = core.serialization.object({ - games: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).game.Summary) - ), - watch: core.serialization.lazyObject(async () => (await import("../../../../..")).WatchResponse), + games: core.serialization.list(game_common$$summary), + watch: common$$watchResponse, }); export declare namespace GetSuggestedGamesResponse { interface Raw { - games: serializers.game.Summary.Raw[]; - watch: serializers.WatchResponse.Raw; + games: game.Summary.Raw[]; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/src/serialization/resources/provision/resources/datacenters/types/GetTlsResponse.ts b/sdks/full/typescript/src/serialization/resources/provision/resources/datacenters/types/GetTlsResponse.ts index fe1c6db1cc..03925dc5d5 100644 --- a/sdks/full/typescript/src/serialization/resources/provision/resources/datacenters/types/GetTlsResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/provision/resources/datacenters/types/GetTlsResponse.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const GetTlsResponse: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/provision/resources/servers/types/GetInfoResponse.ts b/sdks/full/typescript/src/serialization/resources/provision/resources/servers/types/GetInfoResponse.ts index 2e86746150..64479b8c8a 100644 --- a/sdks/full/typescript/src/serialization/resources/provision/resources/servers/types/GetInfoResponse.ts +++ b/sdks/full/typescript/src/serialization/resources/provision/resources/servers/types/GetInfoResponse.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const GetInfoResponse: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/upload/resources/common/types/PrepareFile.ts b/sdks/full/typescript/src/serialization/resources/upload/resources/common/types/PrepareFile.ts index cf9bd43a49..6af098300a 100644 --- a/sdks/full/typescript/src/serialization/resources/upload/resources/common/types/PrepareFile.ts +++ b/sdks/full/typescript/src/serialization/resources/upload/resources/common/types/PrepareFile.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const PrepareFile: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/src/serialization/resources/upload/resources/common/types/PresignedRequest.ts b/sdks/full/typescript/src/serialization/resources/upload/resources/common/types/PresignedRequest.ts index bb15814b36..a490edb18f 100644 --- a/sdks/full/typescript/src/serialization/resources/upload/resources/common/types/PresignedRequest.ts +++ b/sdks/full/typescript/src/serialization/resources/upload/resources/common/types/PresignedRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const PresignedRequest: core.serialization.ObjectSchema< diff --git a/sdks/full/typescript/types/Client.d.ts b/sdks/full/typescript/types/Client.d.ts index 86cfc68ef9..cc17ae102e 100644 --- a/sdks/full/typescript/types/Client.d.ts +++ b/sdks/full/typescript/types/Client.d.ts @@ -21,8 +21,12 @@ export declare namespace RivetClient { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class RivetClient { diff --git a/sdks/full/typescript/types/api/resources/admin/client/Client.d.ts b/sdks/full/typescript/types/api/resources/admin/client/Client.d.ts index f8371d00a4..a28042bf18 100644 --- a/sdks/full/typescript/types/api/resources/admin/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/admin/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; import { Clusters } from "../resources/clusters/client/Client"; export declare namespace Admin { interface Options { @@ -12,20 +12,32 @@ export declare namespace Admin { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Admin { protected readonly _options: Admin.Options; constructor(_options?: Admin.Options); /** + * @param {Rivet.admin.LoginRequest} request + * @param {Admin.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.admin.login({ + * name: "string" + * }) */ login(request: Rivet.admin.LoginRequest, requestOptions?: Admin.RequestOptions): Promise; protected _clusters: Clusters | undefined; diff --git a/sdks/full/typescript/types/api/resources/admin/resources/clusters/client/Client.d.ts b/sdks/full/typescript/types/api/resources/admin/resources/clusters/client/Client.d.ts index 41571f3223..5efb5ce510 100644 --- a/sdks/full/typescript/types/api/resources/admin/resources/clusters/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/admin/resources/clusters/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; import { Datacenters } from "../resources/datacenters/client/Client"; import { Servers } from "../resources/servers/client/Client"; export declare namespace Clusters { @@ -13,8 +13,12 @@ export declare namespace Clusters { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Clusters { @@ -22,22 +26,38 @@ export declare class Clusters { constructor(_options?: Clusters.Options); /** * Get clusters + * + * @param {Clusters.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.admin.clusters.list() */ list(requestOptions?: Clusters.RequestOptions): Promise; /** * Create a new cluster + * + * @param {Rivet.admin.clusters.CreateClusterRequest} request + * @param {Clusters.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.admin.clusters.create({ + * nameId: "string", + * ownerTeamId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * }) */ create(request: Rivet.admin.clusters.CreateClusterRequest, requestOptions?: Clusters.RequestOptions): Promise; protected _datacenters: Datacenters | undefined; diff --git a/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/common/types/Datacenter.d.ts b/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/common/types/Datacenter.d.ts index d4a1318fc0..af83dfd707 100644 --- a/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/common/types/Datacenter.d.ts +++ b/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/common/types/Datacenter.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface Datacenter { datacenterId: string; clusterId: string; diff --git a/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/common/types/Pool.d.ts b/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/common/types/Pool.d.ts index 2b7befbb88..067b9c9d3f 100644 --- a/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/common/types/Pool.d.ts +++ b/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/common/types/Pool.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface Pool { poolType: Rivet.admin.clusters.PoolType; hardware: Rivet.admin.clusters.Hardware[]; diff --git a/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/datacenters/client/Client.d.ts b/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/datacenters/client/Client.d.ts index d97aa5f981..9b38986263 100644 --- a/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/datacenters/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/datacenters/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../../../environments"; import * as core from "../../../../../../../../core"; -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export declare namespace Datacenters { interface Options { environment?: core.Supplier; @@ -11,8 +11,12 @@ export declare namespace Datacenters { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Datacenters { @@ -20,30 +24,71 @@ export declare class Datacenters { constructor(_options?: Datacenters.Options); /** * Get datacenters of a cluster + * + * @param {string} clusterId + * @param {Datacenters.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.admin.clusters.datacenters.list("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ list(clusterId: string, requestOptions?: Datacenters.RequestOptions): Promise; /** + * @param {string} clusterId + * @param {Rivet.admin.clusters.CreateDatacenterRequest} request + * @param {Datacenters.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.admin.clusters.datacenters.create("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * displayName: "string", + * nameId: "string", + * provider: Rivet.admin.clusters.Provider.Linode, + * providerDatacenterId: "string", + * buildDeliveryMethod: Rivet.admin.clusters.BuildDeliveryMethod.TrafficServer, + * prebakesEnabled: true + * }) */ create(clusterId: string, request: Rivet.admin.clusters.CreateDatacenterRequest, requestOptions?: Datacenters.RequestOptions): Promise; /** + * @param {string} clusterId + * @param {string} datacenterId + * @param {Rivet.admin.clusters.UpdateDatacenterRequest} request + * @param {Datacenters.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.admin.clusters.datacenters.update("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * pools: [{ + * poolType: Rivet.admin.clusters.PoolType.Job, + * hardware: [{ + * providerHardware: "string" + * }], + * desiredCount: 1, + * minCount: 1, + * maxCount: 1, + * drainTimeout: 1000000 + * }], + * prebakesEnabled: true + * }) */ update(clusterId: string, datacenterId: string, request: Rivet.admin.clusters.UpdateDatacenterRequest, requestOptions?: Datacenters.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/datacenters/types/CreateDatacenterRequest.d.ts b/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/datacenters/types/CreateDatacenterRequest.d.ts index 838c0e125e..f0f5e61ed6 100644 --- a/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/datacenters/types/CreateDatacenterRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/datacenters/types/CreateDatacenterRequest.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface CreateDatacenterRequest { displayName: string; nameId: string; diff --git a/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/datacenters/types/ListDatacentersResponse.d.ts b/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/datacenters/types/ListDatacentersResponse.d.ts index 3a9fac857b..ea63a1cad9 100644 --- a/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/datacenters/types/ListDatacentersResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/datacenters/types/ListDatacentersResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface ListDatacentersResponse { datacenters: Rivet.admin.clusters.Datacenter[]; } diff --git a/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/datacenters/types/UpdateDatacenterRequest.d.ts b/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/datacenters/types/UpdateDatacenterRequest.d.ts index 92d0d27bfc..7a2285b7f9 100644 --- a/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/datacenters/types/UpdateDatacenterRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/datacenters/types/UpdateDatacenterRequest.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface UpdateDatacenterRequest { pools: Rivet.admin.clusters.PoolUpdate[]; prebakesEnabled?: boolean; diff --git a/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/servers/client/Client.d.ts b/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/servers/client/Client.d.ts index 988f2184a9..9be115c8d0 100644 --- a/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/servers/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/servers/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../../../environments"; import * as core from "../../../../../../../../core"; -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export declare namespace Servers { interface Options { environment?: core.Supplier; @@ -11,38 +11,78 @@ export declare namespace Servers { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Servers { protected readonly _options: Servers.Options; constructor(_options?: Servers.Options); /** + * @param {string} clusterId + * @param {Rivet.admin.clusters.ListServersRequest} request + * @param {Servers.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.admin.clusters.servers.list("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * serverId: "string", + * datacenter: "string", + * pool: Rivet.admin.clusters.PoolType.Job, + * publicIp: "string" + * }) */ list(clusterId: string, request?: Rivet.admin.clusters.ListServersRequest, requestOptions?: Servers.RequestOptions): Promise; /** + * @param {string} clusterId + * @param {Rivet.admin.clusters.TaintServersRequest} request + * @param {Servers.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.admin.clusters.servers.taint("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * serverId: "string", + * datacenter: "string", + * pool: Rivet.admin.clusters.PoolType.Job, + * publicIp: "string" + * }) */ taint(clusterId: string, request?: Rivet.admin.clusters.TaintServersRequest, requestOptions?: Servers.RequestOptions): Promise; /** + * @param {string} clusterId + * @param {Rivet.admin.clusters.DestroyServersRequest} request + * @param {Servers.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.admin.clusters.servers.destroy("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * serverId: "string", + * datacenter: "string", + * pool: Rivet.admin.clusters.PoolType.Job, + * publicIp: "string" + * }) */ destroy(clusterId: string, request?: Rivet.admin.clusters.DestroyServersRequest, requestOptions?: Servers.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/servers/client/requests/ListServersRequest.d.ts b/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/servers/client/requests/ListServersRequest.d.ts index 2b37b8c2d3..245d2c86c7 100644 --- a/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/servers/client/requests/ListServersRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/servers/client/requests/ListServersRequest.d.ts @@ -1,7 +1,16 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../.."; +import * as Rivet from "../../../../../../../../index"; +/** + * @example + * { + * serverId: "string", + * datacenter: "string", + * pool: Rivet.admin.clusters.PoolType.Job, + * publicIp: "string" + * } + */ export interface ListServersRequest { serverId?: string; datacenter?: string; diff --git a/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/servers/client/requests/TaintServersRequest.d.ts b/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/servers/client/requests/TaintServersRequest.d.ts index a2c73a2417..503b3a2019 100644 --- a/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/servers/client/requests/TaintServersRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/servers/client/requests/TaintServersRequest.d.ts @@ -1,7 +1,16 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../.."; +import * as Rivet from "../../../../../../../../index"; +/** + * @example + * { + * serverId: "string", + * datacenter: "string", + * pool: Rivet.admin.clusters.PoolType.Job, + * publicIp: "string" + * } + */ export interface TaintServersRequest { serverId?: string; datacenter?: string; diff --git a/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/servers/client/requests/index.d.ts b/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/servers/client/requests/index.d.ts index 800cc433ea..dc9931a37d 100644 --- a/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/servers/client/requests/index.d.ts +++ b/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/servers/client/requests/index.d.ts @@ -1,3 +1,3 @@ -export { ListServersRequest } from "./ListServersRequest"; -export { TaintServersRequest } from "./TaintServersRequest"; -export { DestroyServersRequest } from "./DestroyServersRequest"; +export { type ListServersRequest } from "./ListServersRequest"; +export { type TaintServersRequest } from "./TaintServersRequest"; +export { type DestroyServersRequest } from "./DestroyServersRequest"; diff --git a/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/servers/types/ListServersResponse.d.ts b/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/servers/types/ListServersResponse.d.ts index 59e7547ad6..eb74b28326 100644 --- a/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/servers/types/ListServersResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/admin/resources/clusters/resources/servers/types/ListServersResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface ListServersResponse { servers: Rivet.admin.clusters.Server[]; } diff --git a/sdks/full/typescript/types/api/resources/admin/resources/clusters/types/ListClustersResponse.d.ts b/sdks/full/typescript/types/api/resources/admin/resources/clusters/types/ListClustersResponse.d.ts index aca3e4fe3b..9b84328b08 100644 --- a/sdks/full/typescript/types/api/resources/admin/resources/clusters/types/ListClustersResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/admin/resources/clusters/types/ListClustersResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface ListClustersResponse { clusters: Rivet.admin.clusters.Cluster[]; } diff --git a/sdks/full/typescript/types/api/resources/auth/client/Client.d.ts b/sdks/full/typescript/types/api/resources/auth/client/Client.d.ts index 411a0b33d3..c79bb9386a 100644 --- a/sdks/full/typescript/types/api/resources/auth/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/auth/client/Client.d.ts @@ -12,8 +12,12 @@ export declare namespace Auth { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Auth { diff --git a/sdks/full/typescript/types/api/resources/auth/resources/identity/client/Client.d.ts b/sdks/full/typescript/types/api/resources/auth/resources/identity/client/Client.d.ts index a1044d759f..f021784d08 100644 --- a/sdks/full/typescript/types/api/resources/auth/resources/identity/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/auth/resources/identity/client/Client.d.ts @@ -12,8 +12,12 @@ export declare namespace Identity { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Identity { diff --git a/sdks/full/typescript/types/api/resources/auth/resources/identity/resources/accessToken/client/Client.d.ts b/sdks/full/typescript/types/api/resources/auth/resources/identity/resources/accessToken/client/Client.d.ts index 8a318b94e9..ee1673624c 100644 --- a/sdks/full/typescript/types/api/resources/auth/resources/identity/resources/accessToken/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/auth/resources/identity/resources/accessToken/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../../../environments"; import * as core from "../../../../../../../../core"; -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export declare namespace AccessToken { interface Options { environment?: core.Supplier; @@ -11,8 +11,12 @@ export declare namespace AccessToken { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class AccessToken { @@ -20,12 +24,21 @@ export declare class AccessToken { constructor(_options?: AccessToken.Options); /** * Completes the access token verification process. + * + * @param {Rivet.auth.identity.CompleteAccessTokenVerificationRequest} request + * @param {AccessToken.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.auth.identity.accessToken.completeAccessTokenVerification({ + * accessToken: "string" + * }) */ completeAccessTokenVerification(request: Rivet.auth.identity.CompleteAccessTokenVerificationRequest, requestOptions?: AccessToken.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/auth/resources/identity/resources/accessToken/types/CompleteAccessTokenVerificationRequest.d.ts b/sdks/full/typescript/types/api/resources/auth/resources/identity/resources/accessToken/types/CompleteAccessTokenVerificationRequest.d.ts index 1b3c68a5bd..08d6701a62 100644 --- a/sdks/full/typescript/types/api/resources/auth/resources/identity/resources/accessToken/types/CompleteAccessTokenVerificationRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/auth/resources/identity/resources/accessToken/types/CompleteAccessTokenVerificationRequest.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface CompleteAccessTokenVerificationRequest { accessToken: Rivet.Jwt; } diff --git a/sdks/full/typescript/types/api/resources/auth/resources/identity/resources/email/client/Client.d.ts b/sdks/full/typescript/types/api/resources/auth/resources/identity/resources/email/client/Client.d.ts index 4fe2135d21..b8bcd02c41 100644 --- a/sdks/full/typescript/types/api/resources/auth/resources/identity/resources/email/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/auth/resources/identity/resources/email/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../../../environments"; import * as core from "../../../../../../../../core"; -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export declare namespace Email { interface Options { environment?: core.Supplier; @@ -11,8 +11,12 @@ export declare namespace Email { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Email { @@ -20,22 +24,43 @@ export declare class Email { constructor(_options?: Email.Options); /** * Starts the verification process for linking an email to your identity. + * + * @param {Rivet.auth.identity.StartEmailVerificationRequest} request + * @param {Email.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.auth.identity.email.startEmailVerification({ + * email: "string", + * captcha: {}, + * gameId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * }) */ startEmailVerification(request: Rivet.auth.identity.StartEmailVerificationRequest, requestOptions?: Email.RequestOptions): Promise; /** * Completes the email verification process. + * + * @param {Rivet.auth.identity.CompleteEmailVerificationRequest} request + * @param {Email.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.auth.identity.email.completeEmailVerification({ + * verificationId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + * code: "string" + * }) */ completeEmailVerification(request: Rivet.auth.identity.CompleteEmailVerificationRequest, requestOptions?: Email.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/auth/resources/identity/resources/email/types/CompleteEmailVerificationResponse.d.ts b/sdks/full/typescript/types/api/resources/auth/resources/identity/resources/email/types/CompleteEmailVerificationResponse.d.ts index 9e4a07151f..eec71ca251 100644 --- a/sdks/full/typescript/types/api/resources/auth/resources/identity/resources/email/types/CompleteEmailVerificationResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/auth/resources/identity/resources/email/types/CompleteEmailVerificationResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface CompleteEmailVerificationResponse { status: Rivet.auth.CompleteStatus; } diff --git a/sdks/full/typescript/types/api/resources/auth/resources/identity/resources/email/types/StartEmailVerificationRequest.d.ts b/sdks/full/typescript/types/api/resources/auth/resources/identity/resources/email/types/StartEmailVerificationRequest.d.ts index 9c15cc538b..6f57cef95c 100644 --- a/sdks/full/typescript/types/api/resources/auth/resources/identity/resources/email/types/StartEmailVerificationRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/auth/resources/identity/resources/email/types/StartEmailVerificationRequest.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface StartEmailVerificationRequest { email: string; captcha?: Rivet.captcha.Config; diff --git a/sdks/full/typescript/types/api/resources/auth/resources/tokens/client/Client.d.ts b/sdks/full/typescript/types/api/resources/auth/resources/tokens/client/Client.d.ts index 0baf11b7c6..c79e141fd7 100644 --- a/sdks/full/typescript/types/api/resources/auth/resources/tokens/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/auth/resources/tokens/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export declare namespace Tokens { interface Options { environment?: core.Supplier; @@ -11,8 +11,12 @@ export declare namespace Tokens { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Tokens { @@ -20,12 +24,21 @@ export declare class Tokens { constructor(_options?: Tokens.Options); /** * Refreshes the current identity's token and sets authentication headers. + * + * @param {Rivet.auth.RefreshIdentityTokenRequest} request + * @param {Tokens.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.auth.tokens.refreshIdentityToken({ + * logout: true + * }) */ refreshIdentityToken(request: Rivet.auth.RefreshIdentityTokenRequest, requestOptions?: Tokens.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/captcha/resources/config/types/Config.d.ts b/sdks/full/typescript/types/api/resources/captcha/resources/config/types/Config.d.ts index a1cb8e21ca..ec43a30e3e 100644 --- a/sdks/full/typescript/types/api/resources/captcha/resources/config/types/Config.d.ts +++ b/sdks/full/typescript/types/api/resources/captcha/resources/config/types/Config.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * Methods to verify a captcha */ diff --git a/sdks/full/typescript/types/api/resources/cloud/client/Client.d.ts b/sdks/full/typescript/types/api/resources/cloud/client/Client.d.ts index cff879de57..70931e0245 100644 --- a/sdks/full/typescript/types/api/resources/cloud/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; import { Games } from "../resources/games/client/Client"; import { Auth } from "../resources/auth/client/Client"; import { Devices } from "../resources/devices/client/Client"; @@ -18,8 +18,12 @@ export declare namespace Cloud { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Cloud { @@ -27,12 +31,18 @@ export declare class Cloud { constructor(_options?: Cloud.Options); /** * Returns the basic information required to use the cloud APIs. + * + * @param {Cloud.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.bootstrap() */ bootstrap(requestOptions?: Cloud.RequestOptions): Promise; protected _games: Games | undefined; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/auth/client/Client.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/auth/client/Client.d.ts index 12f3bda4ca..7decc988e2 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/auth/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/auth/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export declare namespace Auth { interface Options { environment?: core.Supplier; @@ -11,8 +11,12 @@ export declare namespace Auth { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Auth { @@ -20,12 +24,18 @@ export declare class Auth { constructor(_options?: Auth.Options); /** * Returns information about the current authenticated agent. + * + * @param {Auth.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.auth.inspect() */ inspect(requestOptions?: Auth.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/auth/types/InspectResponse.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/auth/types/InspectResponse.d.ts index b2c1a81160..c001d79ac5 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/auth/types/InspectResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/auth/types/InspectResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface InspectResponse { agent: Rivet.cloud.AuthAgent; } diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/AuthAgent.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/AuthAgent.d.ts index e688c38acc..fc729916ba 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/AuthAgent.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/AuthAgent.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * The current authenticated agent. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/BuildSummary.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/BuildSummary.d.ts index 39441cde62..8d913be32b 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/BuildSummary.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/BuildSummary.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A build summary. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/CdnNamespaceConfig.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/CdnNamespaceConfig.d.ts index caedbf7199..e841861da9 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/CdnNamespaceConfig.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/CdnNamespaceConfig.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * CDN configuration for a given namespace. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/CdnNamespaceDomain.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/CdnNamespaceDomain.d.ts index 11bd303500..8f065d30cf 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/CdnNamespaceDomain.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/CdnNamespaceDomain.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A CDN domain for a given namespace. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationMethod.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationMethod.d.ts index e290a50fd8..4708675685 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationMethod.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationMethod.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A union representing the verification method used for this CDN domain. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/CdnSiteSummary.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/CdnSiteSummary.d.ts index 3204d4f2fb..089cf389f8 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/CdnSiteSummary.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/CdnSiteSummary.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A CDN site summary. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/CustomAvatarSummary.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/CustomAvatarSummary.d.ts index 2fbd72fcd7..d7b143f536 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/CustomAvatarSummary.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/CustomAvatarSummary.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A custom avatar summary. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/GameFull.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/GameFull.d.ts index 02e7e9d651..660562e77c 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/GameFull.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/GameFull.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A full game. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/GameLobbyExpenses.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/GameLobbyExpenses.d.ts index d78fd7bd5e..0a3aaf621f 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/GameLobbyExpenses.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/GameLobbyExpenses.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * Game lobby expenses. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/LobbySummaryAnalytics.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/LobbySummaryAnalytics.d.ts index 17517c0d1f..e609c9ab80 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/LobbySummaryAnalytics.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/LobbySummaryAnalytics.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * Analytical information about a lobby. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/LogsLobbyStatus.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/LogsLobbyStatus.d.ts index 8413d6682b..413853c08c 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/LogsLobbyStatus.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/LogsLobbyStatus.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A union representing the state of a lobby. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/LogsLobbyStatusStopped.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/LogsLobbyStatusStopped.d.ts index c3d4568634..331569ae06 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/LogsLobbyStatusStopped.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/LogsLobbyStatusStopped.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * The status of a stopped lobby. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/LogsLobbySummary.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/LogsLobbySummary.d.ts index ad2fef4426..a9c46adde2 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/LogsLobbySummary.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/LogsLobbySummary.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A logs summary for a lobby. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/LogsPerfMark.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/LogsPerfMark.d.ts index 37324c62bd..99551b2354 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/LogsPerfMark.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/LogsPerfMark.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A performance mark. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/LogsPerfSpan.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/LogsPerfSpan.d.ts index 25ba18589d..e6663e9f57 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/LogsPerfSpan.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/LogsPerfSpan.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A performance span. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/MatchmakerDevelopmentPort.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/MatchmakerDevelopmentPort.d.ts index faa39b7f5f..1e576296e8 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/MatchmakerDevelopmentPort.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/MatchmakerDevelopmentPort.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A port configuration used to create development tokens. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/NamespaceConfig.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/NamespaceConfig.d.ts index 2859b1c4db..f1f80972ab 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/NamespaceConfig.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/NamespaceConfig.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * Cloud configuration for a given namespace. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/NamespaceFull.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/NamespaceFull.d.ts index 1758b57caf..b4396d1605 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/NamespaceFull.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/NamespaceFull.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A full namespace. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/NamespaceSummary.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/NamespaceSummary.d.ts index 95926d614d..6b9e27bd7b 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/NamespaceSummary.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/NamespaceSummary.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A namespace summary. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/NamespaceVersion.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/NamespaceVersion.d.ts index 97adc9e524..31d9b8d670 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/NamespaceVersion.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/NamespaceVersion.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A previously deployed namespace version. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/RegionSummary.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/RegionSummary.d.ts index cdd2c8cf09..3e4ae20470 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/RegionSummary.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/RegionSummary.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A region summary. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/SvcPerf.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/SvcPerf.d.ts index f1818b60bd..d14e82b7c8 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/common/types/SvcPerf.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/common/types/SvcPerf.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A service performance summary. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/devices/client/Client.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/devices/client/Client.d.ts index c079e89eb3..2e807fae9e 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/devices/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/devices/client/Client.d.ts @@ -11,8 +11,12 @@ export declare namespace Devices { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Devices { diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/devices/resources/links/client/Client.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/devices/resources/links/client/Client.d.ts index 5d3368c182..f6feb4bbb9 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/devices/resources/links/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/devices/resources/links/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../../../environments"; import * as core from "../../../../../../../../core"; -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export declare namespace Links { interface Options { environment?: core.Supplier; @@ -11,38 +11,65 @@ export declare namespace Links { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Links { protected readonly _options: Links.Options; constructor(_options?: Links.Options); /** + * @param {Links.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.devices.links.prepare() */ prepare(requestOptions?: Links.RequestOptions): Promise; /** + * @param {Rivet.cloud.devices.GetDeviceLinkRequest} request + * @param {Links.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.devices.links.get({ + * deviceLinkToken: "string", + * watchIndex: "string" + * }) */ get(request: Rivet.cloud.devices.GetDeviceLinkRequest, requestOptions?: Links.RequestOptions): Promise; /** + * @param {Rivet.cloud.devices.CompleteDeviceLinkRequest} request + * @param {Links.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.devices.links.complete({ + * deviceLinkToken: "string", + * gameId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * }) */ complete(request: Rivet.cloud.devices.CompleteDeviceLinkRequest, requestOptions?: Links.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/devices/resources/links/client/requests/GetDeviceLinkRequest.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/devices/resources/links/client/requests/GetDeviceLinkRequest.d.ts index 42659a9da9..b6c7de6dca 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/devices/resources/links/client/requests/GetDeviceLinkRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/devices/resources/links/client/requests/GetDeviceLinkRequest.d.ts @@ -1,7 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../.."; +import * as Rivet from "../../../../../../../../index"; +/** + * @example + * { + * deviceLinkToken: "string", + * watchIndex: "string" + * } + */ export interface GetDeviceLinkRequest { deviceLinkToken: Rivet.Jwt; watchIndex?: Rivet.WatchQuery; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/devices/resources/links/client/requests/index.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/devices/resources/links/client/requests/index.d.ts index 67fa7fb77d..31eff30cbd 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/devices/resources/links/client/requests/index.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/devices/resources/links/client/requests/index.d.ts @@ -1 +1 @@ -export { GetDeviceLinkRequest } from "./GetDeviceLinkRequest"; +export { type GetDeviceLinkRequest } from "./GetDeviceLinkRequest"; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/devices/resources/links/types/CompleteDeviceLinkRequest.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/devices/resources/links/types/CompleteDeviceLinkRequest.d.ts index 8dab66cd52..dd94de2bbb 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/devices/resources/links/types/CompleteDeviceLinkRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/devices/resources/links/types/CompleteDeviceLinkRequest.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface CompleteDeviceLinkRequest { deviceLinkToken: Rivet.Jwt; gameId: string; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/devices/resources/links/types/GetDeviceLinkResponse.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/devices/resources/links/types/GetDeviceLinkResponse.d.ts index e4cb0e3b27..bc93c277aa 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/devices/resources/links/types/GetDeviceLinkResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/devices/resources/links/types/GetDeviceLinkResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface GetDeviceLinkResponse { cloudToken?: string; watch: Rivet.WatchResponse; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/client/Client.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/client/Client.d.ts index cc7ce441ad..c964efd03d 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; import { Namespaces } from "../resources/namespaces/client/Client"; import { Avatars } from "../resources/avatars/client/Client"; import { Builds } from "../resources/builds/client/Client"; @@ -18,8 +18,12 @@ export declare namespace Games { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Games { @@ -27,82 +31,162 @@ export declare class Games { constructor(_options?: Games.Options); /** * Returns a list of games in which the current identity is a group member of its development team. + * + * @param {Rivet.cloud.games.GetGamesRequest} request + * @param {Games.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.getGames({ + * watchIndex: "string" + * }) */ getGames(request?: Rivet.cloud.games.GetGamesRequest, requestOptions?: Games.RequestOptions): Promise; /** * Creates a new game. + * + * @param {Rivet.cloud.games.CreateGameRequest} request + * @param {Games.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.createGame({ + * nameId: "string", + * displayName: "string", + * developerGroupId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * }) */ createGame(request: Rivet.cloud.games.CreateGameRequest, requestOptions?: Games.RequestOptions): Promise; /** * Validates information used to create a new game. + * + * @param {Rivet.cloud.games.ValidateGameRequest} request + * @param {Games.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.validateGame({ + * displayName: "string", + * nameId: "string" + * }) */ validateGame(request: Rivet.cloud.games.ValidateGameRequest, requestOptions?: Games.RequestOptions): Promise; /** * Returns a game by its game id. + * + * @param {string} gameId + * @param {Rivet.cloud.games.GetGameByIdRequest} request + * @param {Games.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.getGameById("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * watchIndex: "string" + * }) */ getGameById(gameId: string, request?: Rivet.cloud.games.GetGameByIdRequest, requestOptions?: Games.RequestOptions): Promise; /** * Prepares a game banner image upload. + * + * @param {string} gameId + * @param {Rivet.cloud.games.GameBannerUploadPrepareRequest} request + * @param {Games.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.gameBannerUploadPrepare("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * path: "string", + * mime: "string", + * contentLength: 1000000 + * }) */ gameBannerUploadPrepare(gameId: string, request: Rivet.cloud.games.GameBannerUploadPrepareRequest, requestOptions?: Games.RequestOptions): Promise; /** * Completes an game banner image upload. Must be called after the file upload process completes. + * + * @param {string} gameId + * @param {string} uploadId + * @param {Games.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.gameBannerUploadComplete("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ gameBannerUploadComplete(gameId: string, uploadId: string, requestOptions?: Games.RequestOptions): Promise; /** * Prepares a game logo image upload. + * + * @param {string} gameId + * @param {Rivet.cloud.games.GameLogoUploadPrepareRequest} request + * @param {Games.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.gameLogoUploadPrepare("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * path: "string", + * mime: "string", + * contentLength: 1000000 + * }) */ gameLogoUploadPrepare(gameId: string, request: Rivet.cloud.games.GameLogoUploadPrepareRequest, requestOptions?: Games.RequestOptions): Promise; /** * Completes a game logo image upload. Must be called after the file upload process completes. + * + * @param {string} gameId + * @param {string} uploadId + * @param {Games.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.gameLogoUploadComplete("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ gameLogoUploadComplete(gameId: string, uploadId: string, requestOptions?: Games.RequestOptions): Promise; protected _namespaces: Namespaces | undefined; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/avatars/client/Client.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/avatars/client/Client.d.ts index b9bf01ef81..a6533f6193 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/avatars/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/avatars/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../../../environments"; import * as core from "../../../../../../../../core"; -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export declare namespace Avatars { interface Options { environment?: core.Supplier; @@ -11,8 +11,12 @@ export declare namespace Avatars { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Avatars { @@ -20,33 +24,60 @@ export declare class Avatars { constructor(_options?: Avatars.Options); /** * Lists custom avatars for the given game. + * + * @param {string} gameId + * @param {Avatars.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.avatars.listGameCustomAvatars("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ listGameCustomAvatars(gameId: string, requestOptions?: Avatars.RequestOptions): Promise; /** * Prepares a custom avatar image upload. * Complete upload with `rivet.api.cloud#CompleteCustomAvatarUpload`. + * + * @param {string} gameId + * @param {Rivet.cloud.games.PrepareCustomAvatarUploadRequest} request + * @param {Avatars.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.avatars.prepareCustomAvatarUpload("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * path: "string", + * mime: "string", + * contentLength: 1000000 + * }) */ prepareCustomAvatarUpload(gameId: string, request: Rivet.cloud.games.PrepareCustomAvatarUploadRequest, requestOptions?: Avatars.RequestOptions): Promise; /** * Completes a custom avatar image upload. Must be called after the file upload process completes. + * + * @param {string} gameId + * @param {string} uploadId + * @param {Avatars.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.avatars.completeCustomAvatarUpload("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ completeCustomAvatarUpload(gameId: string, uploadId: string, requestOptions?: Avatars.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/avatars/types/ListGameCustomAvatarsResponse.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/avatars/types/ListGameCustomAvatarsResponse.d.ts index aa45d2d76a..9a32b8ff5d 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/avatars/types/ListGameCustomAvatarsResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/avatars/types/ListGameCustomAvatarsResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface ListGameCustomAvatarsResponse { /** A list of custom avatar summaries. */ customAvatars: Rivet.cloud.CustomAvatarSummary[]; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/avatars/types/PrepareCustomAvatarUploadResponse.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/avatars/types/PrepareCustomAvatarUploadResponse.d.ts index 58628ae15b..0fb6035aee 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/avatars/types/PrepareCustomAvatarUploadResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/avatars/types/PrepareCustomAvatarUploadResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface PrepareCustomAvatarUploadResponse { uploadId: string; presignedRequest: Rivet.upload.PresignedRequest; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/builds/client/Client.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/builds/client/Client.d.ts index 141e0f46e5..4338cc6d8b 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/builds/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/builds/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../../../environments"; import * as core from "../../../../../../../../core"; -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export declare namespace Builds { interface Options { environment?: core.Supplier; @@ -11,8 +11,12 @@ export declare namespace Builds { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Builds { @@ -20,22 +24,44 @@ export declare class Builds { constructor(_options?: Builds.Options); /** * Lists game builds for the given game. + * + * @param {string} gameId + * @param {Builds.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.builds.listGameBuilds("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ listGameBuilds(gameId: string, requestOptions?: Builds.RequestOptions): Promise; /** * Creates a new game build for the given game. + * + * @param {string} gameId + * @param {Rivet.cloud.games.CreateGameBuildRequest} request + * @param {Builds.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.builds.createGameBuild("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * displayName: "string", + * imageTag: "string", + * imageFile: {}, + * multipartUpload: true, + * kind: Rivet.cloud.games.BuildKind.DockerImage, + * compression: Rivet.cloud.games.BuildCompression.None + * }) */ createGameBuild(gameId: string, request: Rivet.cloud.games.CreateGameBuildRequest, requestOptions?: Builds.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/builds/types/CreateGameBuildRequest.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/builds/types/CreateGameBuildRequest.d.ts index 260c4d8274..d6cd577d83 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/builds/types/CreateGameBuildRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/builds/types/CreateGameBuildRequest.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface CreateGameBuildRequest { displayName: Rivet.DisplayName; /** A tag given to the game build. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/builds/types/CreateGameBuildResponse.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/builds/types/CreateGameBuildResponse.d.ts index 3b45b9b7ae..5043ce7826 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/builds/types/CreateGameBuildResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/builds/types/CreateGameBuildResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface CreateGameBuildResponse { buildId: string; uploadId: string; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/builds/types/ListGameBuildsResponse.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/builds/types/ListGameBuildsResponse.d.ts index fc0ed72a8f..4a846b832d 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/builds/types/ListGameBuildsResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/builds/types/ListGameBuildsResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface ListGameBuildsResponse { /** A list of build summaries. */ builds: Rivet.cloud.BuildSummary[]; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/cdn/client/Client.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/cdn/client/Client.d.ts index a116321b19..c240895f8e 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/cdn/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/cdn/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../../../environments"; import * as core from "../../../../../../../../core"; -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export declare namespace Cdn { interface Options { environment?: core.Supplier; @@ -11,8 +11,12 @@ export declare namespace Cdn { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Cdn { @@ -20,22 +24,40 @@ export declare class Cdn { constructor(_options?: Cdn.Options); /** * Lists CDN sites for a game. + * + * @param {string} gameId + * @param {Cdn.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.cdn.listGameCdnSites("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ listGameCdnSites(gameId: string, requestOptions?: Cdn.RequestOptions): Promise; /** * Creates a new CDN site for the given game. + * + * @param {string} gameId + * @param {Rivet.cloud.games.CreateGameCdnSiteRequest} request + * @param {Cdn.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.cdn.createGameCdnSite("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * displayName: "string", + * files: [{}] + * }) */ createGameCdnSite(gameId: string, request: Rivet.cloud.games.CreateGameCdnSiteRequest, requestOptions?: Cdn.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteRequest.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteRequest.d.ts index 3b85483b1a..ecca8d40b3 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteRequest.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface CreateGameCdnSiteRequest { displayName: Rivet.DisplayName; /** A list of files preparing to upload. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteResponse.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteResponse.d.ts index 9430e0819a..61a9d03f60 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface CreateGameCdnSiteResponse { siteId: string; uploadId: string; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/cdn/types/ListGameCdnSitesResponse.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/cdn/types/ListGameCdnSitesResponse.d.ts index 6eb0e52732..5703ef7804 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/cdn/types/ListGameCdnSitesResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/cdn/types/ListGameCdnSitesResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface ListGameCdnSitesResponse { /** A list of CDN site summaries. */ sites: Rivet.cloud.CdnSiteSummary[]; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/matchmaker/client/Client.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/matchmaker/client/Client.d.ts index be498c42cb..99d88cb6ef 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/matchmaker/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/matchmaker/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../../../environments"; import * as core from "../../../../../../../../core"; -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export declare namespace Matchmaker { interface Options { environment?: core.Supplier; @@ -11,8 +11,12 @@ export declare namespace Matchmaker { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Matchmaker { @@ -20,42 +24,84 @@ export declare class Matchmaker { constructor(_options?: Matchmaker.Options); /** * Exports lobby history over a given query time span. + * + * @param {string} gameId + * @param {Rivet.cloud.games.ExportMatchmakerLobbyHistoryRequest} request + * @param {Matchmaker.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.matchmaker.exportMatchmakerLobbyHistory("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * queryStart: 1000000, + * queryEnd: 1000000 + * }) */ exportMatchmakerLobbyHistory(gameId: string, request: Rivet.cloud.games.ExportMatchmakerLobbyHistoryRequest, requestOptions?: Matchmaker.RequestOptions): Promise; /** * Deletes a matchmaker lobby, stopping it immediately. + * + * @param {string} gameId + * @param {string} lobbyId + * @param {Matchmaker.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.matchmaker.deleteMatchmakerLobby("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ deleteMatchmakerLobby(gameId: string, lobbyId: string, requestOptions?: Matchmaker.RequestOptions): Promise; /** * Returns the logs for a given lobby. + * + * @param {string} gameId + * @param {string} lobbyId + * @param {Rivet.cloud.games.GetLobbyLogsRequest} request + * @param {Matchmaker.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.matchmaker.getLobbyLogs("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * stream: Rivet.cloud.games.LogStream.StdOut, + * watchIndex: "string" + * }) */ getLobbyLogs(gameId: string, lobbyId: string, request: Rivet.cloud.games.GetLobbyLogsRequest, requestOptions?: Matchmaker.RequestOptions): Promise; /** * Generates a download URL for logs. + * + * @param {string} gameId + * @param {string} lobbyId + * @param {Rivet.cloud.games.ExportLobbyLogsRequest} request + * @param {Matchmaker.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.matchmaker.exportLobbyLogs("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * stream: Rivet.cloud.games.LogStream.StdOut + * }) */ exportLobbyLogs(gameId: string, lobbyId: string, request: Rivet.cloud.games.ExportLobbyLogsRequest, requestOptions?: Matchmaker.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/matchmaker/client/requests/GetLobbyLogsRequest.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/matchmaker/client/requests/GetLobbyLogsRequest.d.ts index 723a3c9e08..2b8a8ab598 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/matchmaker/client/requests/GetLobbyLogsRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/matchmaker/client/requests/GetLobbyLogsRequest.d.ts @@ -1,7 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../.."; +import * as Rivet from "../../../../../../../../index"; +/** + * @example + * { + * stream: Rivet.cloud.games.LogStream.StdOut, + * watchIndex: "string" + * } + */ export interface GetLobbyLogsRequest { stream: Rivet.cloud.games.LogStream; /** diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/matchmaker/client/requests/index.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/matchmaker/client/requests/index.d.ts index b25f6f3858..166661ea5e 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/matchmaker/client/requests/index.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/matchmaker/client/requests/index.d.ts @@ -1 +1 @@ -export { GetLobbyLogsRequest } from "./GetLobbyLogsRequest"; +export { type GetLobbyLogsRequest } from "./GetLobbyLogsRequest"; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/matchmaker/types/ExportLobbyLogsRequest.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/matchmaker/types/ExportLobbyLogsRequest.d.ts index d100641efd..02378172fc 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/matchmaker/types/ExportLobbyLogsRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/matchmaker/types/ExportLobbyLogsRequest.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface ExportLobbyLogsRequest { stream: Rivet.cloud.games.LogStream; } diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/matchmaker/types/GetLobbyLogsResponse.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/matchmaker/types/GetLobbyLogsResponse.d.ts index 0ac45d4d61..9cd0ce4fd2 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/matchmaker/types/GetLobbyLogsResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/matchmaker/types/GetLobbyLogsResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface GetLobbyLogsResponse { /** Sorted old to new. */ lines: string[]; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/client/Client.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/client/Client.d.ts index f0bb3ec1f5..3d5bcdd381 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../../../environments"; import * as core from "../../../../../../../../core"; -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; import { Analytics } from "../resources/analytics/client/Client"; import { Logs } from "../resources/logs/client/Client"; export declare namespace Namespaces { @@ -13,8 +13,12 @@ export declare namespace Namespaces { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Namespaces { @@ -22,162 +26,338 @@ export declare class Namespaces { constructor(_options?: Namespaces.Options); /** * Creates a new namespace for the given game. + * + * @param {string} gameId + * @param {Rivet.cloud.games.namespaces.CreateGameNamespaceRequest} request + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.createGameNamespace("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * displayName: "string", + * versionId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + * nameId: "string" + * }) */ createGameNamespace(gameId: string, request: Rivet.cloud.games.namespaces.CreateGameNamespaceRequest, requestOptions?: Namespaces.RequestOptions): Promise; /** * Validates information used to create a new game namespace. + * + * @param {string} gameId + * @param {Rivet.cloud.games.namespaces.ValidateGameNamespaceRequest} request + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.validateGameNamespace("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * displayName: "string", + * nameId: "string" + * }) */ validateGameNamespace(gameId: string, request: Rivet.cloud.games.namespaces.ValidateGameNamespaceRequest, requestOptions?: Namespaces.RequestOptions): Promise; /** * Gets a game namespace by namespace ID. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.getGameNamespaceById("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ getGameNamespaceById(gameId: string, namespaceId: string, requestOptions?: Namespaces.RequestOptions): Promise; /** * Adds an authenticated user to the given game namespace. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {Rivet.cloud.games.namespaces.UpdateNamespaceCdnAuthUserRequest} request + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.updateNamespaceCdnAuthUser("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * user: "string", + * password: "string" + * }) */ updateNamespaceCdnAuthUser(gameId: string, namespaceId: string, request: Rivet.cloud.games.namespaces.UpdateNamespaceCdnAuthUserRequest, requestOptions?: Namespaces.RequestOptions): Promise; /** * Removes an authenticated user from the given game namespace. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {string} user - A user name. + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.removeNamespaceCdnAuthUser("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "string") */ removeNamespaceCdnAuthUser(gameId: string, namespaceId: string, user: string, requestOptions?: Namespaces.RequestOptions): Promise; /** * Updates the CDN authentication type of the given game namespace. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {Rivet.cloud.games.namespaces.SetNamespaceCdnAuthTypeRequest} request + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.setNamespaceCdnAuthType("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * authType: Rivet.cloud.CdnAuthType.None + * }) */ setNamespaceCdnAuthType(gameId: string, namespaceId: string, request: Rivet.cloud.games.namespaces.SetNamespaceCdnAuthTypeRequest, requestOptions?: Namespaces.RequestOptions): Promise; /** * Toggles whether or not to allow authentication based on domain for the given game namespace. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {Rivet.cloud.games.namespaces.ToggleNamespaceDomainPublicAuthRequest} request + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.toggleNamespaceDomainPublicAuth("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * enabled: true + * }) */ toggleNamespaceDomainPublicAuth(gameId: string, namespaceId: string, request: Rivet.cloud.games.namespaces.ToggleNamespaceDomainPublicAuthRequest, requestOptions?: Namespaces.RequestOptions): Promise; /** * Adds a domain to the given game namespace. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {Rivet.cloud.games.namespaces.AddNamespaceDomainRequest} request + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.addNamespaceDomain("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * domain: "string" + * }) */ addNamespaceDomain(gameId: string, namespaceId: string, request: Rivet.cloud.games.namespaces.AddNamespaceDomainRequest, requestOptions?: Namespaces.RequestOptions): Promise; /** * Removes a domain from the given game namespace. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {string} domain - A valid domain name (no protocol). + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.removeNamespaceDomain("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "string") */ removeNamespaceDomain(gameId: string, namespaceId: string, domain: string, requestOptions?: Namespaces.RequestOptions): Promise; /** * Updates matchmaker config for the given game namespace. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {Rivet.cloud.games.namespaces.UpdateGameNamespaceMatchmakerConfigRequest} request + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.updateGameNamespaceMatchmakerConfig("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * lobbyCountMax: 1, + * maxPlayers: 1 + * }) */ updateGameNamespaceMatchmakerConfig(gameId: string, namespaceId: string, request: Rivet.cloud.games.namespaces.UpdateGameNamespaceMatchmakerConfigRequest, requestOptions?: Namespaces.RequestOptions): Promise; /** * Gets the version history for a given namespace. + * + * @param {string} gameId - A universally unique identifier. + * @param {string} namespaceId - A universally unique identifier. + * @param {Rivet.cloud.games.namespaces.GetGameNamespaceVersionHistoryRequest} request + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.getGameNamespaceVersionHistoryList("string", "string", { + * anchor: "string", + * limit: 1 + * }) */ getGameNamespaceVersionHistoryList(gameId: string, namespaceId: string, request?: Rivet.cloud.games.namespaces.GetGameNamespaceVersionHistoryRequest, requestOptions?: Namespaces.RequestOptions): Promise; /** * Validates information used to update a game namespace's matchmaker config. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {Rivet.cloud.games.namespaces.ValidateGameNamespaceMatchmakerConfigRequest} request + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.validateGameNamespaceMatchmakerConfig("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * lobbyCountMax: 1, + * maxPlayers: 1 + * }) */ validateGameNamespaceMatchmakerConfig(gameId: string, namespaceId: string, request: Rivet.cloud.games.namespaces.ValidateGameNamespaceMatchmakerConfigRequest, requestOptions?: Namespaces.RequestOptions): Promise; /** * Creates a development token for the given namespace. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {Rivet.cloud.games.namespaces.CreateGameNamespaceTokenDevelopmentRequest} request + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.createGameNamespaceTokenDevelopment("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * hostname: "string", + * ports: { + * "string": {} + * }, + * lobbyPorts: [{}] + * }) */ createGameNamespaceTokenDevelopment(gameId: string, namespaceId: string, request: Rivet.cloud.games.namespaces.CreateGameNamespaceTokenDevelopmentRequest, requestOptions?: Namespaces.RequestOptions): Promise; /** * Validates information used to create a new game namespace development token. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {Rivet.cloud.games.namespaces.ValidateGameNamespaceTokenDevelopmentRequest} request + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.validateGameNamespaceTokenDevelopment("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * hostname: "string", + * lobbyPorts: [{}] + * }) */ validateGameNamespaceTokenDevelopment(gameId: string, namespaceId: string, request: Rivet.cloud.games.namespaces.ValidateGameNamespaceTokenDevelopmentRequest, requestOptions?: Namespaces.RequestOptions): Promise; /** * Creates a public token for the given namespace. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.createGameNamespaceTokenPublic("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ createGameNamespaceTokenPublic(gameId: string, namespaceId: string, requestOptions?: Namespaces.RequestOptions): Promise; /** * Updates the version of a game namespace. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {Rivet.cloud.games.namespaces.UpdateGameNamespaceVersionRequest} request + * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.updateGameNamespaceVersion("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * versionId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * }) */ updateGameNamespaceVersion(gameId: string, namespaceId: string, request: Rivet.cloud.games.namespaces.UpdateGameNamespaceVersionRequest, requestOptions?: Namespaces.RequestOptions): Promise; protected _analytics: Analytics | undefined; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/client/requests/GetGameNamespaceVersionHistoryRequest.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/client/requests/GetGameNamespaceVersionHistoryRequest.d.ts index 3c18b37ef0..6a87db9cd3 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/client/requests/GetGameNamespaceVersionHistoryRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/client/requests/GetGameNamespaceVersionHistoryRequest.d.ts @@ -1,6 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * anchor: "string", + * limit: 1 + * } + */ export interface GetGameNamespaceVersionHistoryRequest { /** * How many items to offset the search by. diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/client/requests/index.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/client/requests/index.d.ts index 77351bf9be..8f1ae1ae03 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/client/requests/index.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/client/requests/index.d.ts @@ -1 +1 @@ -export { GetGameNamespaceVersionHistoryRequest } from "./GetGameNamespaceVersionHistoryRequest"; +export { type GetGameNamespaceVersionHistoryRequest } from "./GetGameNamespaceVersionHistoryRequest"; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/analytics/client/Client.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/analytics/client/Client.d.ts index a3f672ce62..08a3d3e8d8 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/analytics/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/analytics/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../../../../../environments"; import * as core from "../../../../../../../../../../core"; -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; export declare namespace Analytics { interface Options { environment?: core.Supplier; @@ -11,8 +11,12 @@ export declare namespace Analytics { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Analytics { @@ -20,12 +24,20 @@ export declare class Analytics { constructor(_options?: Analytics.Options); /** * Returns live information about all active lobbies for a given namespace. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {Analytics.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.analytics.getAnalyticsMatchmakerLive("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ getAnalyticsMatchmakerLive(gameId: string, namespaceId: string, requestOptions?: Analytics.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/analytics/types/GetAnalyticsMatchmakerLiveResponse.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/analytics/types/GetAnalyticsMatchmakerLiveResponse.d.ts index 29e28a57b9..c3cc8d5842 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/analytics/types/GetAnalyticsMatchmakerLiveResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/analytics/types/GetAnalyticsMatchmakerLiveResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; export interface GetAnalyticsMatchmakerLiveResponse { /** A list of analytics lobby summaries. */ lobbies: Rivet.cloud.LobbySummaryAnalytics[]; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/logs/client/Client.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/logs/client/Client.d.ts index 2cb6dcf140..d4b753b0f6 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/logs/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/logs/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../../../../../environments"; import * as core from "../../../../../../../../../../core"; -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; export declare namespace Logs { interface Options { environment?: core.Supplier; @@ -11,8 +11,12 @@ export declare namespace Logs { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Logs { @@ -20,22 +24,42 @@ export declare class Logs { constructor(_options?: Logs.Options); /** * Returns a list of lobbies for the given game namespace. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {Rivet.cloud.games.namespaces.ListNamespaceLobbiesRequest} request + * @param {Logs.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.logs.listNamespaceLobbies("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * beforeCreateTs: new Date("2024-01-15T09:30:00.000Z") + * }) */ listNamespaceLobbies(gameId: string, namespaceId: string, request?: Rivet.cloud.games.namespaces.ListNamespaceLobbiesRequest, requestOptions?: Logs.RequestOptions): Promise; /** * Returns a lobby from the given game namespace. + * + * @param {string} gameId + * @param {string} namespaceId + * @param {string} lobbyId + * @param {Logs.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.namespaces.logs.getNamespaceLobby("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ getNamespaceLobby(gameId: string, namespaceId: string, lobbyId: string, requestOptions?: Logs.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/logs/client/requests/ListNamespaceLobbiesRequest.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/logs/client/requests/ListNamespaceLobbiesRequest.d.ts index 287a8f94f4..4af45e476f 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/logs/client/requests/ListNamespaceLobbiesRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/logs/client/requests/ListNamespaceLobbiesRequest.d.ts @@ -1,7 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../../index"; +/** + * @example + * { + * beforeCreateTs: new Date("2024-01-15T09:30:00.000Z") + * } + */ export interface ListNamespaceLobbiesRequest { /** * Returns lobbies created before this timestamp. diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/logs/client/requests/index.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/logs/client/requests/index.d.ts index ab8d0d8c68..48fe31200d 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/logs/client/requests/index.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/logs/client/requests/index.d.ts @@ -1 +1 @@ -export { ListNamespaceLobbiesRequest } from "./ListNamespaceLobbiesRequest"; +export { type ListNamespaceLobbiesRequest } from "./ListNamespaceLobbiesRequest"; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/logs/types/GetNamespaceLobbyResponse.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/logs/types/GetNamespaceLobbyResponse.d.ts index 91eb403467..cc7db75e00 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/logs/types/GetNamespaceLobbyResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/logs/types/GetNamespaceLobbyResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; export interface GetNamespaceLobbyResponse { lobby: Rivet.cloud.LogsLobbySummary; metrics?: Rivet.cloud.SvcMetrics; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/logs/types/ListNamespaceLobbiesResponse.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/logs/types/ListNamespaceLobbiesResponse.d.ts index 2d6104c8a7..eaf006e6fc 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/logs/types/ListNamespaceLobbiesResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/resources/logs/types/ListNamespaceLobbiesResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; export interface ListNamespaceLobbiesResponse { /** A list of lobby log summaries. */ lobbies: Rivet.cloud.LogsLobbySummary[]; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceRequest.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceRequest.d.ts index 8bb2256eb3..d0aa348906 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceRequest.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface CreateGameNamespaceRequest { displayName: Rivet.DisplayName; versionId: string; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenDevelopmentRequest.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenDevelopmentRequest.d.ts index a4d331191c..8bf6a39fa2 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenDevelopmentRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenDevelopmentRequest.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface CreateGameNamespaceTokenDevelopmentRequest { /** The hostname used for the token. */ hostname: string; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceByIdResponse.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceByIdResponse.d.ts index 458178e34c..c35f31bcbe 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceByIdResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceByIdResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface GetGameNamespaceByIdResponse { namespace: Rivet.cloud.NamespaceFull; } diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceVersionHistoryResponse.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceVersionHistoryResponse.d.ts index 4e6abaf206..a321633762 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceVersionHistoryResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceVersionHistoryResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface GetGameNamespaceVersionHistoryResponse { /** A list of previously deployed namespace versions. */ versions: Rivet.cloud.NamespaceVersion[]; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/InspectResponse.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/InspectResponse.d.ts index 382104f778..faea89dc93 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/InspectResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/InspectResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface InspectResponse { agent: Rivet.cloud.AuthAgent; } diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/SetNamespaceCdnAuthTypeRequest.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/SetNamespaceCdnAuthTypeRequest.d.ts index 0db187989f..95acb5a763 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/SetNamespaceCdnAuthTypeRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/SetNamespaceCdnAuthTypeRequest.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface SetNamespaceCdnAuthTypeRequest { authType: Rivet.cloud.CdnAuthType; } diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceMatchmakerConfigResponse.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceMatchmakerConfigResponse.d.ts index 7f946aedbf..e9062176db 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceMatchmakerConfigResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceMatchmakerConfigResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface ValidateGameNamespaceMatchmakerConfigResponse { /** A list of validation errors. */ errors: Rivet.ValidationError[]; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceRequest.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceRequest.d.ts index 50936cbf06..1edf51fa00 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceRequest.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface ValidateGameNamespaceRequest { displayName: Rivet.DisplayName; /** A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceResponse.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceResponse.d.ts index be60fff71c..2bcf4a2b46 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface ValidateGameNamespaceResponse { /** A list of validation errors. */ errors: Rivet.ValidationError[]; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentRequest.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentRequest.d.ts index e9a6379dd4..841181a449 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentRequest.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface ValidateGameNamespaceTokenDevelopmentRequest { hostname: string; /** A list of docker ports. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentResponse.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentResponse.d.ts index 1173f6a69c..0f3062fb3c 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface ValidateGameNamespaceTokenDevelopmentResponse { /** A list of validation errors. */ errors: Rivet.ValidationError[]; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/tokens/client/Client.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/tokens/client/Client.d.ts index b707b6f12d..9dc722c9c0 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/tokens/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/tokens/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../../../environments"; import * as core from "../../../../../../../../core"; -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export declare namespace Tokens { interface Options { environment?: core.Supplier; @@ -11,8 +11,12 @@ export declare namespace Tokens { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Tokens { @@ -20,22 +24,36 @@ export declare class Tokens { constructor(_options?: Tokens.Options); /** * Creates a new game cloud token. + * + * @param {string} gameId + * @param {Tokens.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.tokens.createCloudToken("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ createCloudToken(gameId: string, requestOptions?: Tokens.RequestOptions): Promise; /** * Creates a new game service token. + * + * @param {string} gameId + * @param {Tokens.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.tokens.createServiceToken("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ createServiceToken(gameId: string, requestOptions?: Tokens.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/versions/client/Client.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/versions/client/Client.d.ts index 14c54891a0..2134b1adcb 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/versions/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/versions/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../../../environments"; import * as core from "../../../../../../../../core"; -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export declare namespace Versions { interface Options { environment?: core.Supplier; @@ -11,8 +11,12 @@ export declare namespace Versions { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Versions { @@ -20,42 +24,97 @@ export declare class Versions { constructor(_options?: Versions.Options); /** * Creates a new game version. + * + * @param {string} gameId + * @param {Rivet.cloud.games.CreateGameVersionRequest} request + * @param {Versions.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.versions.createGameVersion("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * displayName: "string", + * config: { + * scripts: { + * "string": "string" + * }, + * engine: {}, + * cdn: {}, + * matchmaker: {}, + * kv: {}, + * identity: {} + * } + * }) */ createGameVersion(gameId: string, request: Rivet.cloud.games.CreateGameVersionRequest, requestOptions?: Versions.RequestOptions): Promise; /** * Reserves a display name for the next version. Used to generate a monotomically increasing build number without causing a race condition with multiple versions getting created at the same time. + * + * @param {string} gameId + * @param {Versions.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.versions.reserveVersionName("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ reserveVersionName(gameId: string, requestOptions?: Versions.RequestOptions): Promise; /** * Validates information used to create a new game version. + * + * @param {string} gameId + * @param {Rivet.cloud.games.ValidateGameVersionRequest} request + * @param {Versions.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.versions.validateGameVersion("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * displayName: "string", + * config: { + * scripts: { + * "string": "string" + * }, + * engine: {}, + * cdn: {}, + * matchmaker: {}, + * kv: {}, + * identity: {} + * } + * }) */ validateGameVersion(gameId: string, request: Rivet.cloud.games.ValidateGameVersionRequest, requestOptions?: Versions.RequestOptions): Promise; /** * Returns a game version by its version ID. + * + * @param {string} gameId + * @param {string} versionId + * @param {Versions.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.games.versions.getGameVersionById("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ getGameVersionById(gameId: string, versionId: string, requestOptions?: Versions.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/versions/types/CreateGameVersionRequest.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/versions/types/CreateGameVersionRequest.d.ts index 571a2c58c7..e1fa1f0255 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/versions/types/CreateGameVersionRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/versions/types/CreateGameVersionRequest.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface CreateGameVersionRequest { displayName: Rivet.DisplayName; config: Rivet.cloud.version.Config; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/versions/types/GetGameVersionByIdResponse.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/versions/types/GetGameVersionByIdResponse.d.ts index cd2102626b..457d8b7d21 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/versions/types/GetGameVersionByIdResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/versions/types/GetGameVersionByIdResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface GetGameVersionByIdResponse { version: Rivet.cloud.version.Full; } diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/versions/types/ReserveVersionNameResponse.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/versions/types/ReserveVersionNameResponse.d.ts index 2edc6a8272..a55ef7e6c5 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/versions/types/ReserveVersionNameResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/versions/types/ReserveVersionNameResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface ReserveVersionNameResponse { versionDisplayName: Rivet.DisplayName; } diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionRequest.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionRequest.d.ts index d956c2dca0..ab5f252d65 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionRequest.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface ValidateGameVersionRequest { displayName: Rivet.DisplayName; config: Rivet.cloud.version.Config; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionResponse.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionResponse.d.ts index 2c3c129502..2ad8f5a7bd 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface ValidateGameVersionResponse { /** A list of validation errors. */ errors: Rivet.ValidationError[]; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/groups/client/Client.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/groups/client/Client.d.ts index 1238576957..058ed80ad4 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/groups/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/groups/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export declare namespace Groups { interface Options { environment?: core.Supplier; @@ -11,8 +11,12 @@ export declare namespace Groups { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Groups { @@ -20,12 +24,21 @@ export declare class Groups { constructor(_options?: Groups.Options); /** * Validates information used to create a new group. + * + * @param {Rivet.cloud.ValidateGroupRequest} request + * @param {Groups.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.groups.validate({ + * displayName: "string" + * }) */ validate(request: Rivet.cloud.ValidateGroupRequest, requestOptions?: Groups.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/groups/types/ValidateGroupRequest.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/groups/types/ValidateGroupRequest.d.ts index 2877f39233..11653a7c1c 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/groups/types/ValidateGroupRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/groups/types/ValidateGroupRequest.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface ValidateGroupRequest { displayName: Rivet.DisplayName; } diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/groups/types/ValidateGroupResponse.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/groups/types/ValidateGroupResponse.d.ts index b532b35c3f..44f19ed129 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/groups/types/ValidateGroupResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/groups/types/ValidateGroupResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface ValidateGroupResponse { /** A list of validation errors. */ errors: Rivet.ValidationError[]; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/logs/client/Client.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/logs/client/Client.d.ts index b55e604075..c23e95c32c 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/logs/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/logs/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export declare namespace Logs { interface Options { environment?: core.Supplier; @@ -11,8 +11,12 @@ export declare namespace Logs { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Logs { @@ -20,12 +24,19 @@ export declare class Logs { constructor(_options?: Logs.Options); /** * Returns performance information about a Rivet Ray. + * + * @param {string} rayId + * @param {Logs.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.logs.getRayPerfLogs("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ getRayPerfLogs(rayId: string, requestOptions?: Logs.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/logs/types/GetRayPerfLogsResponse.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/logs/types/GetRayPerfLogsResponse.d.ts index 0f41c0b720..a6e9f5fb97 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/logs/types/GetRayPerfLogsResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/logs/types/GetRayPerfLogsResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GetRayPerfLogsResponse { /** A list of service performance summaries. */ perfLists: Rivet.cloud.SvcPerf[]; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/tiers/client/Client.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/tiers/client/Client.d.ts index 59722e127d..b15bf74353 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/tiers/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/tiers/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export declare namespace Tiers { interface Options { environment?: core.Supplier; @@ -11,8 +11,12 @@ export declare namespace Tiers { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Tiers { @@ -20,12 +24,18 @@ export declare class Tiers { constructor(_options?: Tiers.Options); /** * Returns all available region tiers. + * + * @param {Tiers.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.tiers.getRegionTiers() */ getRegionTiers(requestOptions?: Tiers.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/tiers/types/GetRegionTiersResponse.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/tiers/types/GetRegionTiersResponse.d.ts index 5be4a88b1e..f9033a669c 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/tiers/types/GetRegionTiersResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/tiers/types/GetRegionTiersResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GetRegionTiersResponse { /** A list of region server tiers. */ tiers: Rivet.cloud.RegionTier[]; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/uploads/client/Client.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/uploads/client/Client.d.ts index 97e9f83c71..36d6ac0a3d 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/uploads/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/uploads/client/Client.d.ts @@ -10,8 +10,12 @@ export declare namespace Uploads { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Uploads { @@ -19,12 +23,19 @@ export declare class Uploads { constructor(_options?: Uploads.Options); /** * Marks an upload as complete. + * + * @param {string} uploadId + * @param {Uploads.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.cloud.uploads.completeUpload("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ completeUpload(uploadId: string, requestOptions?: Uploads.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/cdn/types/Config.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/cdn/types/Config.d.ts index c84edf6a8e..5620577d82 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/cdn/types/Config.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/cdn/types/Config.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; /** * CDN configuration for a given version. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/cdn/types/CustomHeadersMiddleware.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/cdn/types/CustomHeadersMiddleware.d.ts index 024e18bc0e..d751193201 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/cdn/types/CustomHeadersMiddleware.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/cdn/types/CustomHeadersMiddleware.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface CustomHeadersMiddleware { headers: Rivet.cloud.version.cdn.Header[]; } diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/cdn/types/Middleware.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/cdn/types/Middleware.d.ts index 7ae7e4d64c..74ebb45094 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/cdn/types/Middleware.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/cdn/types/Middleware.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface Middleware { kind: Rivet.cloud.version.cdn.MiddlewareKind; } diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/cdn/types/MiddlewareKind.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/cdn/types/MiddlewareKind.d.ts index 01cd74a348..15f6e51986 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/cdn/types/MiddlewareKind.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/cdn/types/MiddlewareKind.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface MiddlewareKind { customHeaders?: Rivet.cloud.version.cdn.CustomHeadersMiddleware; } diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/cdn/types/Route.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/cdn/types/Route.d.ts index ce0a5e937f..e41111e526 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/cdn/types/Route.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/cdn/types/Route.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface Route { glob: string; /** Unsigned 32 bit integer. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/engine/types/Config.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/engine/types/Config.d.ts index b5beb45ff1..4d03f612f0 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/engine/types/Config.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/engine/types/Config.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface Config { unity?: Rivet.cloud.version.engine.UnityConfig; unreal?: Rivet.cloud.version.engine.UnrealConfig; diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/identity/types/Config.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/identity/types/Config.d.ts index 90e2e57253..c592b0db27 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/identity/types/Config.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/identity/types/Config.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; /** * **Deprecated** * Identity configuration for a given version. diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/identity/types/CustomDisplayName.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/identity/types/CustomDisplayName.d.ts index 4905bb4a1c..f1f0855bb3 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/identity/types/CustomDisplayName.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/identity/types/CustomDisplayName.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; export interface CustomDisplayName { displayName: Rivet.DisplayName; } diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/common/types/Captcha.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/common/types/Captcha.d.ts index 51bef1bb38..b6589c3659 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/common/types/Captcha.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/common/types/Captcha.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * Matchmaker captcha configuration. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaHcaptcha.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaHcaptcha.d.ts index 05c17dce1b..986985f501 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaHcaptcha.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaHcaptcha.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * hCpatcha configuration. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameMode.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameMode.d.ts index 596719d333..54c26e092a 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameMode.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameMode.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * A game mode. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeActions.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeActions.d.ts index 9831cfc3a4..f3694d37fb 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeActions.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeActions.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * Configuration for the connection types allowed for a game mode. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeCreateConfig.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeCreateConfig.d.ts index 6a384e094c..918241d699 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeCreateConfig.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeCreateConfig.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * Configures the requirements and authentication for the /create endpoint. If this value is not set in the config, the /create endpoint is NOT enabled. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeFindConfig.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeFindConfig.d.ts index d4e76d7b34..2dfefa2dd8 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeFindConfig.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeFindConfig.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * Configures the requirements and authentication for the /find endpoint. If this value is not set in the config, the /find endpoint is still enabled. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeJoinConfig.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeJoinConfig.d.ts index 59e6b3afb2..0e5d3fa926 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeJoinConfig.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeJoinConfig.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * Configures the requirements and authentication for the /join endpoint. If this value is not set in the config, the /join endpoint is still enabled. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRegion.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRegion.d.ts index 3fa9860468..560912df7b 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRegion.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRegion.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * A game mode region. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDocker.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDocker.d.ts index e0da24bba2..18d534824c 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDocker.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDocker.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * A game mode runtime running through Docker. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDockerPort.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDockerPort.d.ts index e679d2476d..05a71aa1d3 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDockerPort.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDockerPort.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * Port config for a docker build. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroup.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroup.d.ts index 35db20ed09..7b61077d35 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroup.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroup.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * A game mode. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRegion.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRegion.d.ts index 576726ec23..e4b6dc7225 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRegion.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRegion.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * **Deprecated: use GameMode instead** * A game mode region. diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntime.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntime.d.ts index 3cee39151b..35ebc2897c 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntime.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntime.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * **Deprecated: use GameMode instead** * A union representing the runtime a game mode runs on. diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDocker.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDocker.d.ts index 8d69cd8757..1a1d0513ff 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDocker.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDocker.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * **Deprecated: use GameMode instead** * A game mode runtime running through Docker. diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDockerPort.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDockerPort.d.ts index e2e3743cea..28d6d8c347 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDockerPort.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDockerPort.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../../../.."; +import * as Rivet from "../../../../../../../../../index"; /** * **Deprecated: use GameMode instead** * A docker port. diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/types/Config.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/types/Config.d.ts index 2a08e3be87..861c2e0a74 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/types/Config.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/resources/matchmaker/types/Config.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../.."; +import * as Rivet from "../../../../../../../index"; /** * Matchmaker configuration for a given version. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/types/Config.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/types/Config.d.ts index 90807192b4..d48bf96259 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/types/Config.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/types/Config.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * Cloud configuration for a given version. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/types/Full.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/types/Full.d.ts index c9dd714c48..e25755b4ab 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/types/Full.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/types/Full.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A full version. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/resources/version/types/Summary.d.ts b/sdks/full/typescript/types/api/resources/cloud/resources/version/types/Summary.d.ts index ad63a3cc00..d637f0285a 100644 --- a/sdks/full/typescript/types/api/resources/cloud/resources/version/types/Summary.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/resources/version/types/Summary.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A version summary. */ diff --git a/sdks/full/typescript/types/api/resources/cloud/types/BootstrapCaptcha.d.ts b/sdks/full/typescript/types/api/resources/cloud/types/BootstrapCaptcha.d.ts index 0de8398366..4849bd4930 100644 --- a/sdks/full/typescript/types/api/resources/cloud/types/BootstrapCaptcha.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/types/BootstrapCaptcha.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface BootstrapCaptcha { turnstile?: Rivet.cloud.BootstrapCaptchaTurnstile; } diff --git a/sdks/full/typescript/types/api/resources/cloud/types/BootstrapResponse.d.ts b/sdks/full/typescript/types/api/resources/cloud/types/BootstrapResponse.d.ts index 95d310f7ce..aba48f899d 100644 --- a/sdks/full/typescript/types/api/resources/cloud/types/BootstrapResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/cloud/types/BootstrapResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface BootstrapResponse { cluster: Rivet.cloud.BootstrapCluster; access: Rivet.cloud.BootstrapAccess; diff --git a/sdks/full/typescript/types/api/resources/common/errors/BadRequestError.d.ts b/sdks/full/typescript/types/api/resources/common/errors/BadRequestError.d.ts index fd1ecf54ae..d62648d120 100644 --- a/sdks/full/typescript/types/api/resources/common/errors/BadRequestError.d.ts +++ b/sdks/full/typescript/types/api/resources/common/errors/BadRequestError.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as errors from "../../../../errors"; -import * as Rivet from "../../.."; +import * as errors from "../../../../errors/index"; +import * as Rivet from "../../../index"; export declare class BadRequestError extends errors.RivetError { constructor(body: Rivet.ErrorBody); } diff --git a/sdks/full/typescript/types/api/resources/common/errors/ForbiddenError.d.ts b/sdks/full/typescript/types/api/resources/common/errors/ForbiddenError.d.ts index 6e4cc14729..b354e4c68d 100644 --- a/sdks/full/typescript/types/api/resources/common/errors/ForbiddenError.d.ts +++ b/sdks/full/typescript/types/api/resources/common/errors/ForbiddenError.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as errors from "../../../../errors"; -import * as Rivet from "../../.."; +import * as errors from "../../../../errors/index"; +import * as Rivet from "../../../index"; export declare class ForbiddenError extends errors.RivetError { constructor(body: Rivet.ErrorBody); } diff --git a/sdks/full/typescript/types/api/resources/common/errors/InternalError.d.ts b/sdks/full/typescript/types/api/resources/common/errors/InternalError.d.ts index be78e83a8f..5b6d42b344 100644 --- a/sdks/full/typescript/types/api/resources/common/errors/InternalError.d.ts +++ b/sdks/full/typescript/types/api/resources/common/errors/InternalError.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as errors from "../../../../errors"; -import * as Rivet from "../../.."; +import * as errors from "../../../../errors/index"; +import * as Rivet from "../../../index"; export declare class InternalError extends errors.RivetError { constructor(body: Rivet.ErrorBody); } diff --git a/sdks/full/typescript/types/api/resources/common/errors/NotFoundError.d.ts b/sdks/full/typescript/types/api/resources/common/errors/NotFoundError.d.ts index 62aed10f39..a95527aa22 100644 --- a/sdks/full/typescript/types/api/resources/common/errors/NotFoundError.d.ts +++ b/sdks/full/typescript/types/api/resources/common/errors/NotFoundError.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as errors from "../../../../errors"; -import * as Rivet from "../../.."; +import * as errors from "../../../../errors/index"; +import * as Rivet from "../../../index"; export declare class NotFoundError extends errors.RivetError { constructor(body: Rivet.ErrorBody); } diff --git a/sdks/full/typescript/types/api/resources/common/errors/RateLimitError.d.ts b/sdks/full/typescript/types/api/resources/common/errors/RateLimitError.d.ts index 8d8a3e903a..ee156eeaf9 100644 --- a/sdks/full/typescript/types/api/resources/common/errors/RateLimitError.d.ts +++ b/sdks/full/typescript/types/api/resources/common/errors/RateLimitError.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as errors from "../../../../errors"; -import * as Rivet from "../../.."; +import * as errors from "../../../../errors/index"; +import * as Rivet from "../../../index"; export declare class RateLimitError extends errors.RivetError { constructor(body: Rivet.ErrorBody); } diff --git a/sdks/full/typescript/types/api/resources/common/errors/UnauthorizedError.d.ts b/sdks/full/typescript/types/api/resources/common/errors/UnauthorizedError.d.ts index cca60d19e2..2eb2e042d9 100644 --- a/sdks/full/typescript/types/api/resources/common/errors/UnauthorizedError.d.ts +++ b/sdks/full/typescript/types/api/resources/common/errors/UnauthorizedError.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as errors from "../../../../errors"; -import * as Rivet from "../../.."; +import * as errors from "../../../../errors/index"; +import * as Rivet from "../../../index"; export declare class UnauthorizedError extends errors.RivetError { constructor(body: Rivet.ErrorBody); } diff --git a/sdks/full/typescript/types/api/resources/common/types/ErrorBody.d.ts b/sdks/full/typescript/types/api/resources/common/types/ErrorBody.d.ts index 0a7f8111e8..ba56150a45 100644 --- a/sdks/full/typescript/types/api/resources/common/types/ErrorBody.d.ts +++ b/sdks/full/typescript/types/api/resources/common/types/ErrorBody.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface ErrorBody { code: string; message: string; diff --git a/sdks/full/typescript/types/api/resources/game/resources/common/types/Handle.d.ts b/sdks/full/typescript/types/api/resources/game/resources/common/types/Handle.d.ts index 627e455082..8e7331cd73 100644 --- a/sdks/full/typescript/types/api/resources/game/resources/common/types/Handle.d.ts +++ b/sdks/full/typescript/types/api/resources/game/resources/common/types/Handle.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface Handle { gameId: string; nameId: Rivet.Identifier; diff --git a/sdks/full/typescript/types/api/resources/game/resources/common/types/LeaderboardCategory.d.ts b/sdks/full/typescript/types/api/resources/game/resources/common/types/LeaderboardCategory.d.ts index 36250a2968..bff4394cf9 100644 --- a/sdks/full/typescript/types/api/resources/game/resources/common/types/LeaderboardCategory.d.ts +++ b/sdks/full/typescript/types/api/resources/game/resources/common/types/LeaderboardCategory.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A game leaderboard category. */ diff --git a/sdks/full/typescript/types/api/resources/game/resources/common/types/PlatformLink.d.ts b/sdks/full/typescript/types/api/resources/game/resources/common/types/PlatformLink.d.ts index cf53d6f7cc..2476ed1752 100644 --- a/sdks/full/typescript/types/api/resources/game/resources/common/types/PlatformLink.d.ts +++ b/sdks/full/typescript/types/api/resources/game/resources/common/types/PlatformLink.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A platform link denoting a supported platform. */ diff --git a/sdks/full/typescript/types/api/resources/game/resources/common/types/Profile.d.ts b/sdks/full/typescript/types/api/resources/game/resources/common/types/Profile.d.ts index 1c2a885af4..e6ead3e61f 100644 --- a/sdks/full/typescript/types/api/resources/game/resources/common/types/Profile.d.ts +++ b/sdks/full/typescript/types/api/resources/game/resources/common/types/Profile.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A game profile. */ diff --git a/sdks/full/typescript/types/api/resources/game/resources/common/types/Stat.d.ts b/sdks/full/typescript/types/api/resources/game/resources/common/types/Stat.d.ts index 008e062c2f..c9a2ac9eb1 100644 --- a/sdks/full/typescript/types/api/resources/game/resources/common/types/Stat.d.ts +++ b/sdks/full/typescript/types/api/resources/game/resources/common/types/Stat.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A game statistic. */ diff --git a/sdks/full/typescript/types/api/resources/game/resources/common/types/StatConfig.d.ts b/sdks/full/typescript/types/api/resources/game/resources/common/types/StatConfig.d.ts index e5f271db04..c88c26fbc5 100644 --- a/sdks/full/typescript/types/api/resources/game/resources/common/types/StatConfig.d.ts +++ b/sdks/full/typescript/types/api/resources/game/resources/common/types/StatConfig.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A game statistic config. */ diff --git a/sdks/full/typescript/types/api/resources/game/resources/common/types/StatSummary.d.ts b/sdks/full/typescript/types/api/resources/game/resources/common/types/StatSummary.d.ts index f8e5e362e4..17bf2ab401 100644 --- a/sdks/full/typescript/types/api/resources/game/resources/common/types/StatSummary.d.ts +++ b/sdks/full/typescript/types/api/resources/game/resources/common/types/StatSummary.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A game statistic summary. */ diff --git a/sdks/full/typescript/types/api/resources/game/resources/common/types/Summary.d.ts b/sdks/full/typescript/types/api/resources/game/resources/common/types/Summary.d.ts index 0fa0ac43a6..0abab2b701 100644 --- a/sdks/full/typescript/types/api/resources/game/resources/common/types/Summary.d.ts +++ b/sdks/full/typescript/types/api/resources/game/resources/common/types/Summary.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface Summary { gameId: string; nameId: Rivet.Identifier; diff --git a/sdks/full/typescript/types/api/resources/group/client/Client.d.ts b/sdks/full/typescript/types/api/resources/group/client/Client.d.ts index a3a546a991..a0f4fd87f8 100644 --- a/sdks/full/typescript/types/api/resources/group/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/group/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; import { Invites } from "../resources/invites/client/Client"; import { JoinRequests } from "../resources/joinRequests/client/Client"; export declare namespace Group { @@ -13,8 +13,12 @@ export declare namespace Group { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Group { @@ -22,173 +26,336 @@ export declare class Group { constructor(_options?: Group.Options); /** * Returns a list of suggested groups. + * + * @param {Rivet.group.ListSuggestedRequest} request + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.listSuggested({ + * watchIndex: "string" + * }) */ listSuggested(request?: Rivet.group.ListSuggestedRequest, requestOptions?: Group.RequestOptions): Promise; /** * Creates a new group. + * + * @param {Rivet.group.CreateRequest} request + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.create({ + * displayName: "string" + * }) */ create(request: Rivet.group.CreateRequest, requestOptions?: Group.RequestOptions): Promise; /** * Prepares an avatar image upload. * Complete upload with `rivet.api.group#CompleteAvatarUpload`. + * + * @param {Rivet.group.PrepareAvatarUploadRequest} request + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.prepareAvatarUpload({ + * path: "string", + * mime: "string", + * contentLength: 1000000 + * }) */ prepareAvatarUpload(request: Rivet.group.PrepareAvatarUploadRequest, requestOptions?: Group.RequestOptions): Promise; /** * Validate contents of group profile. Use to provide immediate feedback on profile changes before committing them. + * + * @param {Rivet.group.ValidateProfileRequest} request + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.validateProfile({ + * displayName: "string", + * bio: "string", + * publicity: Rivet.group.Publicity.Open + * }) */ validateProfile(request: Rivet.group.ValidateProfileRequest, requestOptions?: Group.RequestOptions): Promise; /** * Fuzzy search for groups. + * + * @param {Rivet.group.SearchRequest} request + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.search({ + * query: "string", + * anchor: "string", + * limit: 1.1 + * }) */ search(request: Rivet.group.SearchRequest, requestOptions?: Group.RequestOptions): Promise; /** * Completes an avatar image upload. Must be called after the file upload * process completes. * Call `rivet.api.group#PrepareAvatarUpload` first. + * + * @param {string} groupId + * @param {string} uploadId + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.completeAvatarUpload("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ completeAvatarUpload(groupId: string, uploadId: string, requestOptions?: Group.RequestOptions): Promise; /** * Returns a group's bans. Must have valid permissions to view. + * + * @param {string} groupId + * @param {Rivet.group.GetBansRequest} request + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.getBans("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * anchor: "string", + * count: 1.1, + * watchIndex: "string" + * }) */ getBans(groupId: string, request?: Rivet.group.GetBansRequest, requestOptions?: Group.RequestOptions): Promise; /** * Bans an identity from a group. Must be the owner of the group to perform this action. The banned identity will no longer be able to create a join request or use a group invite. + * + * @param {string} groupId + * @param {string} identityId + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.banIdentity("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ banIdentity(groupId: string, identityId: string, requestOptions?: Group.RequestOptions): Promise; /** * Unbans an identity from a group. Must be the owner of the group to perform this action. + * + * @param {string} groupId + * @param {string} identityId + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.unbanIdentity("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ unbanIdentity(groupId: string, identityId: string, requestOptions?: Group.RequestOptions): Promise; /** * Returns a group's join requests. Must have valid permissions to view. + * + * @param {string} groupId + * @param {Rivet.group.GetJoinRequestsRequest} request + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.getJoinRequests("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * anchor: "string", + * count: 1.1, + * watchIndex: "string" + * }) */ getJoinRequests(groupId: string, request?: Rivet.group.GetJoinRequestsRequest, requestOptions?: Group.RequestOptions): Promise; /** * Kicks an identity from a group. Must be the owner of the group to perform this action. + * + * @param {string} groupId + * @param {string} identityId + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.kickMember("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ kickMember(groupId: string, identityId: string, requestOptions?: Group.RequestOptions): Promise; /** * Leaves a group. + * + * @param {string} groupId + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.leave("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ leave(groupId: string, requestOptions?: Group.RequestOptions): Promise; /** * Returns a group's members. + * + * @param {string} groupId + * @param {Rivet.group.GetMembersRequest} request + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.getMembers("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * anchor: "string", + * count: 1.1, + * watchIndex: "string" + * }) */ getMembers(groupId: string, request?: Rivet.group.GetMembersRequest, requestOptions?: Group.RequestOptions): Promise; /** * Returns a group profile. + * + * @param {string} groupId + * @param {Rivet.group.GetProfileRequest} request + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.getProfile("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * watchIndex: "string" + * }) */ getProfile(groupId: string, request?: Rivet.group.GetProfileRequest, requestOptions?: Group.RequestOptions): Promise; /** + * @param {string} groupId + * @param {Rivet.group.UpdateProfileRequest} request + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.updateProfile("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * displayName: "string", + * bio: "string", + * publicity: Rivet.group.Publicity.Open + * }) */ updateProfile(groupId: string, request: Rivet.group.UpdateProfileRequest, requestOptions?: Group.RequestOptions): Promise; /** + * @param {string} groupId + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.getSummary("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ getSummary(groupId: string, requestOptions?: Group.RequestOptions): Promise; /** * Transfers ownership of a group to another identity. + * + * @param {string} groupId + * @param {Rivet.group.TransferOwnershipRequest} request + * @param {Group.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.transferOwnership("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * newOwnerIdentityId: "string" + * }) */ transferOwnership(groupId: string, request: Rivet.group.TransferOwnershipRequest, requestOptions?: Group.RequestOptions): Promise; protected _invites: Invites | undefined; diff --git a/sdks/full/typescript/types/api/resources/group/client/requests/GetBansRequest.d.ts b/sdks/full/typescript/types/api/resources/group/client/requests/GetBansRequest.d.ts index 5bea8a7e63..bee57d585d 100644 --- a/sdks/full/typescript/types/api/resources/group/client/requests/GetBansRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/group/client/requests/GetBansRequest.d.ts @@ -1,6 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * anchor: "string", + * count: 1.1, + * watchIndex: "string" + * } + */ export interface GetBansRequest { /** * The pagination anchor. Set to the returned anchor of this endpoint to receive the next set of items. diff --git a/sdks/full/typescript/types/api/resources/group/client/requests/GetJoinRequestsRequest.d.ts b/sdks/full/typescript/types/api/resources/group/client/requests/GetJoinRequestsRequest.d.ts index 9a9d7a4c18..a1484eec08 100644 --- a/sdks/full/typescript/types/api/resources/group/client/requests/GetJoinRequestsRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/group/client/requests/GetJoinRequestsRequest.d.ts @@ -1,6 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * anchor: "string", + * count: 1.1, + * watchIndex: "string" + * } + */ export interface GetJoinRequestsRequest { /** * The pagination anchor. Set to the returned anchor of this endpoint to receive the next set of items. diff --git a/sdks/full/typescript/types/api/resources/group/client/requests/GetMembersRequest.d.ts b/sdks/full/typescript/types/api/resources/group/client/requests/GetMembersRequest.d.ts index 9c5cf7091c..56841c2be9 100644 --- a/sdks/full/typescript/types/api/resources/group/client/requests/GetMembersRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/group/client/requests/GetMembersRequest.d.ts @@ -1,6 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * anchor: "string", + * count: 1.1, + * watchIndex: "string" + * } + */ export interface GetMembersRequest { /** * The pagination anchor. Set to the returned anchor of this endpoint to receive the next set of items. diff --git a/sdks/full/typescript/types/api/resources/group/client/requests/GetProfileRequest.d.ts b/sdks/full/typescript/types/api/resources/group/client/requests/GetProfileRequest.d.ts index 181be0f579..ce2c08cd7e 100644 --- a/sdks/full/typescript/types/api/resources/group/client/requests/GetProfileRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/group/client/requests/GetProfileRequest.d.ts @@ -1,6 +1,12 @@ /** * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * watchIndex: "string" + * } + */ export interface GetProfileRequest { /** * A query parameter denoting the requests watch index. diff --git a/sdks/full/typescript/types/api/resources/group/client/requests/ListSuggestedRequest.d.ts b/sdks/full/typescript/types/api/resources/group/client/requests/ListSuggestedRequest.d.ts index 96bd4eba15..be50cf3daf 100644 --- a/sdks/full/typescript/types/api/resources/group/client/requests/ListSuggestedRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/group/client/requests/ListSuggestedRequest.d.ts @@ -1,6 +1,12 @@ /** * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * watchIndex: "string" + * } + */ export interface ListSuggestedRequest { /** * A query parameter denoting the requests watch index. diff --git a/sdks/full/typescript/types/api/resources/group/client/requests/SearchRequest.d.ts b/sdks/full/typescript/types/api/resources/group/client/requests/SearchRequest.d.ts index e33d54f693..ec70aad6d5 100644 --- a/sdks/full/typescript/types/api/resources/group/client/requests/SearchRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/group/client/requests/SearchRequest.d.ts @@ -1,6 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * query: "string", + * anchor: "string", + * limit: 1.1 + * } + */ export interface SearchRequest { /** * The query to match group display names against. diff --git a/sdks/full/typescript/types/api/resources/group/client/requests/index.d.ts b/sdks/full/typescript/types/api/resources/group/client/requests/index.d.ts index 860e3a39c9..de4b90b874 100644 --- a/sdks/full/typescript/types/api/resources/group/client/requests/index.d.ts +++ b/sdks/full/typescript/types/api/resources/group/client/requests/index.d.ts @@ -1,6 +1,6 @@ -export { ListSuggestedRequest } from "./ListSuggestedRequest"; -export { SearchRequest } from "./SearchRequest"; -export { GetBansRequest } from "./GetBansRequest"; -export { GetJoinRequestsRequest } from "./GetJoinRequestsRequest"; -export { GetMembersRequest } from "./GetMembersRequest"; -export { GetProfileRequest } from "./GetProfileRequest"; +export { type ListSuggestedRequest } from "./ListSuggestedRequest"; +export { type SearchRequest } from "./SearchRequest"; +export { type GetBansRequest } from "./GetBansRequest"; +export { type GetJoinRequestsRequest } from "./GetJoinRequestsRequest"; +export { type GetMembersRequest } from "./GetMembersRequest"; +export { type GetProfileRequest } from "./GetProfileRequest"; diff --git a/sdks/full/typescript/types/api/resources/group/resources/common/types/BannedIdentity.d.ts b/sdks/full/typescript/types/api/resources/group/resources/common/types/BannedIdentity.d.ts index 8056c56844..25bad5bae7 100644 --- a/sdks/full/typescript/types/api/resources/group/resources/common/types/BannedIdentity.d.ts +++ b/sdks/full/typescript/types/api/resources/group/resources/common/types/BannedIdentity.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A banned identity. */ diff --git a/sdks/full/typescript/types/api/resources/group/resources/common/types/Handle.d.ts b/sdks/full/typescript/types/api/resources/group/resources/common/types/Handle.d.ts index 090cb2d535..9aec1374d3 100644 --- a/sdks/full/typescript/types/api/resources/group/resources/common/types/Handle.d.ts +++ b/sdks/full/typescript/types/api/resources/group/resources/common/types/Handle.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A group handle. */ diff --git a/sdks/full/typescript/types/api/resources/group/resources/common/types/JoinRequest.d.ts b/sdks/full/typescript/types/api/resources/group/resources/common/types/JoinRequest.d.ts index fb870c6a14..5f5ba34d17 100644 --- a/sdks/full/typescript/types/api/resources/group/resources/common/types/JoinRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/group/resources/common/types/JoinRequest.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A group join request. */ diff --git a/sdks/full/typescript/types/api/resources/group/resources/common/types/Member.d.ts b/sdks/full/typescript/types/api/resources/group/resources/common/types/Member.d.ts index 4176f3a273..593fc9fc3e 100644 --- a/sdks/full/typescript/types/api/resources/group/resources/common/types/Member.d.ts +++ b/sdks/full/typescript/types/api/resources/group/resources/common/types/Member.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A group member. */ diff --git a/sdks/full/typescript/types/api/resources/group/resources/common/types/Profile.d.ts b/sdks/full/typescript/types/api/resources/group/resources/common/types/Profile.d.ts index c64df7f9a2..84e6993429 100644 --- a/sdks/full/typescript/types/api/resources/group/resources/common/types/Profile.d.ts +++ b/sdks/full/typescript/types/api/resources/group/resources/common/types/Profile.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A list of group profiles. */ diff --git a/sdks/full/typescript/types/api/resources/group/resources/common/types/Summary.d.ts b/sdks/full/typescript/types/api/resources/group/resources/common/types/Summary.d.ts index 6a7308883f..4eb6ba4205 100644 --- a/sdks/full/typescript/types/api/resources/group/resources/common/types/Summary.d.ts +++ b/sdks/full/typescript/types/api/resources/group/resources/common/types/Summary.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface Summary { groupId: string; displayName: Rivet.DisplayName; diff --git a/sdks/full/typescript/types/api/resources/group/resources/invites/client/Client.d.ts b/sdks/full/typescript/types/api/resources/group/resources/invites/client/Client.d.ts index 965e4caa67..b7f71230d4 100644 --- a/sdks/full/typescript/types/api/resources/group/resources/invites/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/group/resources/invites/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export declare namespace Invites { interface Options { environment?: core.Supplier; @@ -11,8 +11,12 @@ export declare namespace Invites { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Invites { @@ -20,32 +24,57 @@ export declare class Invites { constructor(_options?: Invites.Options); /** * Inspects a group invite returning information about the team that created it. + * + * @param {string} groupInviteCode - Provided by `rivet.api.group#CreateInviteResponse$code`. + * @param {Invites.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.invites.getInvite("string") */ getInvite(groupInviteCode: string, requestOptions?: Invites.RequestOptions): Promise; /** * Consumes a group invite to join a group. + * + * @param {string} groupInviteCode - Provided by `rivet.api.group#CreateInviteResponse$code`. + * @param {Invites.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.invites.consumeInvite("string") */ consumeInvite(groupInviteCode: string, requestOptions?: Invites.RequestOptions): Promise; /** * Creates a group invite. Can be shared with other identities to let them join this group. + * + * @param {string} groupId + * @param {Rivet.group.CreateInviteRequest} request + * @param {Invites.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.invites.createInvite("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * ttl: 1.1, + * useCount: 1.1 + * }) */ createInvite(groupId: string, request: Rivet.group.CreateInviteRequest, requestOptions?: Invites.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/group/resources/invites/types/GetInviteResponse.d.ts b/sdks/full/typescript/types/api/resources/group/resources/invites/types/GetInviteResponse.d.ts index 174e72a048..37436a2f88 100644 --- a/sdks/full/typescript/types/api/resources/group/resources/invites/types/GetInviteResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/group/resources/invites/types/GetInviteResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GetInviteResponse { group: Rivet.group.Handle; } diff --git a/sdks/full/typescript/types/api/resources/group/resources/joinRequests/client/Client.d.ts b/sdks/full/typescript/types/api/resources/group/resources/joinRequests/client/Client.d.ts index e9ce624f60..5e6aeb7ab2 100644 --- a/sdks/full/typescript/types/api/resources/group/resources/joinRequests/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/group/resources/joinRequests/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export declare namespace JoinRequests { interface Options { environment?: core.Supplier; @@ -11,8 +11,12 @@ export declare namespace JoinRequests { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class JoinRequests { @@ -20,22 +24,40 @@ export declare class JoinRequests { constructor(_options?: JoinRequests.Options); /** * Requests to join a group. + * + * @param {string} groupId + * @param {JoinRequests.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.joinRequests.createJoinRequest("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ createJoinRequest(groupId: string, requestOptions?: JoinRequests.RequestOptions): Promise; /** * Resolves a join request for a given group. + * + * @param {string} groupId + * @param {string} identityId + * @param {Rivet.group.ResolveJoinRequestRequest} request + * @param {JoinRequests.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.group.joinRequests.resolveJoinRequest("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * resolution: true + * }) */ resolveJoinRequest(groupId: string, identityId: string, request: Rivet.group.ResolveJoinRequestRequest, requestOptions?: JoinRequests.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/group/types/CreateRequest.d.ts b/sdks/full/typescript/types/api/resources/group/types/CreateRequest.d.ts index 39df06cc44..34f6b21443 100644 --- a/sdks/full/typescript/types/api/resources/group/types/CreateRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/group/types/CreateRequest.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface CreateRequest { displayName: Rivet.DisplayName; } diff --git a/sdks/full/typescript/types/api/resources/group/types/GetBansResponse.d.ts b/sdks/full/typescript/types/api/resources/group/types/GetBansResponse.d.ts index c19449fc12..c175485475 100644 --- a/sdks/full/typescript/types/api/resources/group/types/GetBansResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/group/types/GetBansResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface GetBansResponse { /** A list of banned group members. */ bannedIdentities: Rivet.group.BannedIdentity[]; diff --git a/sdks/full/typescript/types/api/resources/group/types/GetJoinRequestsResponse.d.ts b/sdks/full/typescript/types/api/resources/group/types/GetJoinRequestsResponse.d.ts index 5dc2e69f24..35f3513120 100644 --- a/sdks/full/typescript/types/api/resources/group/types/GetJoinRequestsResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/group/types/GetJoinRequestsResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface GetJoinRequestsResponse { /** A list of group join requests. */ joinRequests: Rivet.group.JoinRequest[]; diff --git a/sdks/full/typescript/types/api/resources/group/types/GetMembersResponse.d.ts b/sdks/full/typescript/types/api/resources/group/types/GetMembersResponse.d.ts index b20a8db83a..ba38afed47 100644 --- a/sdks/full/typescript/types/api/resources/group/types/GetMembersResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/group/types/GetMembersResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface GetMembersResponse { /** A list of group members. */ members: Rivet.group.Member[]; diff --git a/sdks/full/typescript/types/api/resources/group/types/GetProfileResponse.d.ts b/sdks/full/typescript/types/api/resources/group/types/GetProfileResponse.d.ts index 629f39fbec..6e8aacc2f5 100644 --- a/sdks/full/typescript/types/api/resources/group/types/GetProfileResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/group/types/GetProfileResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface GetProfileResponse { group: Rivet.group.Profile; watch: Rivet.WatchResponse; diff --git a/sdks/full/typescript/types/api/resources/group/types/GetSummaryResponse.d.ts b/sdks/full/typescript/types/api/resources/group/types/GetSummaryResponse.d.ts index f9e469a825..abbdc27ee9 100644 --- a/sdks/full/typescript/types/api/resources/group/types/GetSummaryResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/group/types/GetSummaryResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface GetSummaryResponse { group: Rivet.group.Summary; } diff --git a/sdks/full/typescript/types/api/resources/group/types/ListSuggestedResponse.d.ts b/sdks/full/typescript/types/api/resources/group/types/ListSuggestedResponse.d.ts index d7adbcefc9..088c86b6d9 100644 --- a/sdks/full/typescript/types/api/resources/group/types/ListSuggestedResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/group/types/ListSuggestedResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface ListSuggestedResponse { /** A list of group summaries. */ groups: Rivet.group.Summary[]; diff --git a/sdks/full/typescript/types/api/resources/group/types/PrepareAvatarUploadResponse.d.ts b/sdks/full/typescript/types/api/resources/group/types/PrepareAvatarUploadResponse.d.ts index eb5beb7fb1..7b2f738f39 100644 --- a/sdks/full/typescript/types/api/resources/group/types/PrepareAvatarUploadResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/group/types/PrepareAvatarUploadResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface PrepareAvatarUploadResponse { uploadId: string; presignedRequest: Rivet.upload.PresignedRequest; diff --git a/sdks/full/typescript/types/api/resources/group/types/SearchResponse.d.ts b/sdks/full/typescript/types/api/resources/group/types/SearchResponse.d.ts index 88b2d08356..1ed6901ae3 100644 --- a/sdks/full/typescript/types/api/resources/group/types/SearchResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/group/types/SearchResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface SearchResponse { /** A list of group handles. */ groups: Rivet.group.Handle[]; diff --git a/sdks/full/typescript/types/api/resources/group/types/UpdateProfileRequest.d.ts b/sdks/full/typescript/types/api/resources/group/types/UpdateProfileRequest.d.ts index 7c1fe8ba27..7218e7461e 100644 --- a/sdks/full/typescript/types/api/resources/group/types/UpdateProfileRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/group/types/UpdateProfileRequest.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface UpdateProfileRequest { displayName?: Rivet.DisplayName; /** Detailed information about a profile. */ diff --git a/sdks/full/typescript/types/api/resources/group/types/ValidateProfileRequest.d.ts b/sdks/full/typescript/types/api/resources/group/types/ValidateProfileRequest.d.ts index 1efde1f31b..e971f4583d 100644 --- a/sdks/full/typescript/types/api/resources/group/types/ValidateProfileRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/group/types/ValidateProfileRequest.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface ValidateProfileRequest { displayName?: Rivet.DisplayName; bio?: Rivet.DisplayName; diff --git a/sdks/full/typescript/types/api/resources/group/types/ValidateProfileResponse.d.ts b/sdks/full/typescript/types/api/resources/group/types/ValidateProfileResponse.d.ts index 87b0b6c0ee..b6bdf4600f 100644 --- a/sdks/full/typescript/types/api/resources/group/types/ValidateProfileResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/group/types/ValidateProfileResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface ValidateProfileResponse { /** A list of validation errors. */ errors: Rivet.ValidationError[]; diff --git a/sdks/full/typescript/types/api/resources/identity/client/Client.d.ts b/sdks/full/typescript/types/api/resources/identity/client/Client.d.ts index fc82d8a01f..0272cc9f22 100644 --- a/sdks/full/typescript/types/api/resources/identity/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; import { Activities } from "../resources/activities/client/Client"; import { Events } from "../resources/events/client/Client"; import { Links } from "../resources/links/client/Client"; @@ -14,8 +14,12 @@ export declare namespace Identity { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Identity { @@ -29,244 +33,474 @@ export declare class Identity { * This is intended to allow users to play the game without signing up while still having the benefits of having an account. When they are ready to save their account, they should be instructed to link their account (see `PrepareGameLink`). * Storing Token * `identity_token` should be stored in some form of persistent storage. The token should be read from storage and passed to `Setup` every time the client starts. + * + * @param {Rivet.identity.SetupRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.setup({ + * existingIdentityToken: "string" + * }) */ setup(request?: Rivet.identity.SetupRequest, requestOptions?: Identity.RequestOptions): Promise; /** * Fetches an identity profile. + * + * @param {string} identityId + * @param {Rivet.identity.GetProfileRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.getProfile("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * watchIndex: "string" + * }) */ getProfile(identityId: string, request?: Rivet.identity.GetProfileRequest, requestOptions?: Identity.RequestOptions): Promise; /** * Fetches the current identity's profile. + * + * @param {Rivet.identity.GetSelfProfileRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.getSelfProfile({ + * watchIndex: "string" + * }) */ getSelfProfile(request?: Rivet.identity.GetSelfProfileRequest, requestOptions?: Identity.RequestOptions): Promise; /** * Fetches a list of identity handles. + * + * @param {Rivet.identity.GetHandlesRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.getHandles({ + * identityIds: "string" + * }) */ getHandles(request: Rivet.identity.GetHandlesRequest, requestOptions?: Identity.RequestOptions): Promise; /** * Fetches a list of identity summaries. + * + * @param {Rivet.identity.GetSummariesRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.getSummaries({ + * identityIds: "string" + * }) */ getSummaries(request: Rivet.identity.GetSummariesRequest, requestOptions?: Identity.RequestOptions): Promise; /** * Updates profile of the current identity. + * + * @param {Rivet.identity.UpdateProfileRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.updateProfile({ + * displayName: "string", + * accountNumber: 1, + * bio: "string" + * }) */ updateProfile(request?: Rivet.identity.UpdateProfileRequest, requestOptions?: Identity.RequestOptions): Promise; /** * Validate contents of identity profile. Use to provide immediate feedback on profile changes before committing them. + * + * @param {Rivet.identity.ValidateProfileRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.validateProfile({ + * displayName: "string", + * accountNumber: 1, + * bio: "string" + * }) */ validateProfile(request?: Rivet.identity.ValidateProfileRequest, requestOptions?: Identity.RequestOptions): Promise; /** * Fuzzy search for identities. + * + * @param {Rivet.identity.SearchRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.search({ + * query: "string", + * anchor: "string", + * limit: 1 + * }) */ search(request: Rivet.identity.SearchRequest, requestOptions?: Identity.RequestOptions): Promise; /** * Sets the current identity's game activity. This activity will automatically be removed when the identity goes offline. + * + * @param {Rivet.identity.SetGameActivityRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.setGameActivity({ + * gameActivity: { + * message: "string", + * publicMetadata: { + * "key": "value" + * }, + * mutualMetadata: { + * "key": "value" + * } + * } + * }) */ setGameActivity(request: Rivet.identity.SetGameActivityRequest, requestOptions?: Identity.RequestOptions): Promise; /** * Removes the current identity's game activity. + * + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.removeGameActivity() */ removeGameActivity(requestOptions?: Identity.RequestOptions): Promise; /** * Updates the current identity's status. + * + * @param {Rivet.identity.UpdateStatusRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.updateStatus({ + * status: Rivet.identity.Status.Online + * }) */ updateStatus(request: Rivet.identity.UpdateStatusRequest, requestOptions?: Identity.RequestOptions): Promise; /** * Follows the given identity. In order for identities to be "friends", the other identity has to also follow this identity. + * + * @param {string} identityId + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.follow("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ follow(identityId: string, requestOptions?: Identity.RequestOptions): Promise; /** * Unfollows the given identity. + * + * @param {string} identityId + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.unfollow("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ unfollow(identityId: string, requestOptions?: Identity.RequestOptions): Promise; /** * Prepares an avatar image upload. Complete upload with `CompleteIdentityAvatarUpload`. + * + * @param {Rivet.identity.PrepareAvatarUploadRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.prepareAvatarUpload({ + * path: "string", + * mime: "string", + * contentLength: 1000000 + * }) */ prepareAvatarUpload(request: Rivet.identity.PrepareAvatarUploadRequest, requestOptions?: Identity.RequestOptions): Promise; /** * Completes an avatar image upload. Must be called after the file upload process completes. + * + * @param {string} uploadId + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.completeAvatarUpload("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ completeAvatarUpload(uploadId: string, requestOptions?: Identity.RequestOptions): Promise; /** * Completes an avatar image upload. Must be called after the file upload process completes. + * + * @param {Rivet.identity.SignupForBetaRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.signupForBeta({ + * name: "string", + * companyName: "string", + * companySize: "string", + * preferredTools: "string", + * goals: "string" + * }) */ signupForBeta(request: Rivet.identity.SignupForBetaRequest, requestOptions?: Identity.RequestOptions): Promise; /** * Creates an abuse report for an identity. + * + * @param {string} identityId + * @param {Rivet.identity.ReportRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.report("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * reason: "string" + * }) */ report(identityId: string, request?: Rivet.identity.ReportRequest, requestOptions?: Identity.RequestOptions): Promise; /** + * @param {string} identityId + * @param {Rivet.identity.ListFollowersRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.listFollowers("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * anchor: "string", + * limit: "string" + * }) */ listFollowers(identityId: string, request?: Rivet.identity.ListFollowersRequest, requestOptions?: Identity.RequestOptions): Promise; /** + * @param {string} identityId + * @param {Rivet.identity.ListFollowingRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.listFollowing("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * anchor: "string", + * limit: "string" + * }) */ listFollowing(identityId: string, request?: Rivet.identity.ListFollowingRequest, requestOptions?: Identity.RequestOptions): Promise; /** + * @param {Rivet.identity.ListFriendsRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.listFriends({ + * anchor: "string", + * limit: "string" + * }) */ listFriends(request?: Rivet.identity.ListFriendsRequest, requestOptions?: Identity.RequestOptions): Promise; /** + * @param {string} identityId + * @param {Rivet.identity.ListMutualFriendsRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.listMutualFriends("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", { + * anchor: "string", + * limit: "string" + * }) */ listMutualFriends(identityId: string, request?: Rivet.identity.ListMutualFriendsRequest, requestOptions?: Identity.RequestOptions): Promise; /** + * @param {Rivet.identity.ListRecentFollowersRequest} request + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.listRecentFollowers({ + * count: 1, + * watchIndex: "string" + * }) */ listRecentFollowers(request?: Rivet.identity.ListRecentFollowersRequest, requestOptions?: Identity.RequestOptions): Promise; /** + * @param {string} identityId + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.ignoreRecentFollower("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ ignoreRecentFollower(identityId: string, requestOptions?: Identity.RequestOptions): Promise; /** + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.markDeletion() */ markDeletion(requestOptions?: Identity.RequestOptions): Promise; /** + * @param {Identity.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.unmarkDeletion() */ unmarkDeletion(requestOptions?: Identity.RequestOptions): Promise; protected _activities: Activities | undefined; diff --git a/sdks/full/typescript/types/api/resources/identity/client/requests/GetHandlesRequest.d.ts b/sdks/full/typescript/types/api/resources/identity/client/requests/GetHandlesRequest.d.ts index a3eb1db802..b76875bec6 100644 --- a/sdks/full/typescript/types/api/resources/identity/client/requests/GetHandlesRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/client/requests/GetHandlesRequest.d.ts @@ -1,6 +1,12 @@ /** * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * identityIds: "string" + * } + */ export interface GetHandlesRequest { identityIds: string | string[]; } diff --git a/sdks/full/typescript/types/api/resources/identity/client/requests/GetProfileRequest.d.ts b/sdks/full/typescript/types/api/resources/identity/client/requests/GetProfileRequest.d.ts index bb67bb9272..d65cd5ecaa 100644 --- a/sdks/full/typescript/types/api/resources/identity/client/requests/GetProfileRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/client/requests/GetProfileRequest.d.ts @@ -1,7 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * watchIndex: "string" + * } + */ export interface GetProfileRequest { watchIndex?: Rivet.WatchQuery; } diff --git a/sdks/full/typescript/types/api/resources/identity/client/requests/GetSelfProfileRequest.d.ts b/sdks/full/typescript/types/api/resources/identity/client/requests/GetSelfProfileRequest.d.ts index 69e330eac7..2c3761b326 100644 --- a/sdks/full/typescript/types/api/resources/identity/client/requests/GetSelfProfileRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/client/requests/GetSelfProfileRequest.d.ts @@ -1,7 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * watchIndex: "string" + * } + */ export interface GetSelfProfileRequest { watchIndex?: Rivet.WatchQuery; } diff --git a/sdks/full/typescript/types/api/resources/identity/client/requests/GetSummariesRequest.d.ts b/sdks/full/typescript/types/api/resources/identity/client/requests/GetSummariesRequest.d.ts index 335af39236..bd221b6751 100644 --- a/sdks/full/typescript/types/api/resources/identity/client/requests/GetSummariesRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/client/requests/GetSummariesRequest.d.ts @@ -1,6 +1,12 @@ /** * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * identityIds: "string" + * } + */ export interface GetSummariesRequest { identityIds: string | string[]; } diff --git a/sdks/full/typescript/types/api/resources/identity/client/requests/ListFollowersRequest.d.ts b/sdks/full/typescript/types/api/resources/identity/client/requests/ListFollowersRequest.d.ts index b24544b34a..716e2a9391 100644 --- a/sdks/full/typescript/types/api/resources/identity/client/requests/ListFollowersRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/client/requests/ListFollowersRequest.d.ts @@ -1,6 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * anchor: "string", + * limit: "string" + * } + */ export interface ListFollowersRequest { anchor?: string; /** diff --git a/sdks/full/typescript/types/api/resources/identity/client/requests/ListFollowingRequest.d.ts b/sdks/full/typescript/types/api/resources/identity/client/requests/ListFollowingRequest.d.ts index 23a11eb84c..96b5ff3687 100644 --- a/sdks/full/typescript/types/api/resources/identity/client/requests/ListFollowingRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/client/requests/ListFollowingRequest.d.ts @@ -1,6 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * anchor: "string", + * limit: "string" + * } + */ export interface ListFollowingRequest { anchor?: string; /** diff --git a/sdks/full/typescript/types/api/resources/identity/client/requests/ListFriendsRequest.d.ts b/sdks/full/typescript/types/api/resources/identity/client/requests/ListFriendsRequest.d.ts index 91e95ed31f..a92dbe86cd 100644 --- a/sdks/full/typescript/types/api/resources/identity/client/requests/ListFriendsRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/client/requests/ListFriendsRequest.d.ts @@ -1,6 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * anchor: "string", + * limit: "string" + * } + */ export interface ListFriendsRequest { anchor?: string; /** diff --git a/sdks/full/typescript/types/api/resources/identity/client/requests/ListMutualFriendsRequest.d.ts b/sdks/full/typescript/types/api/resources/identity/client/requests/ListMutualFriendsRequest.d.ts index 5e3de79be9..8e9f3c9601 100644 --- a/sdks/full/typescript/types/api/resources/identity/client/requests/ListMutualFriendsRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/client/requests/ListMutualFriendsRequest.d.ts @@ -1,6 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * anchor: "string", + * limit: "string" + * } + */ export interface ListMutualFriendsRequest { anchor?: string; /** diff --git a/sdks/full/typescript/types/api/resources/identity/client/requests/ListRecentFollowersRequest.d.ts b/sdks/full/typescript/types/api/resources/identity/client/requests/ListRecentFollowersRequest.d.ts index 7fe53658a3..c4458b89fa 100644 --- a/sdks/full/typescript/types/api/resources/identity/client/requests/ListRecentFollowersRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/client/requests/ListRecentFollowersRequest.d.ts @@ -1,7 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * count: 1, + * watchIndex: "string" + * } + */ export interface ListRecentFollowersRequest { count?: number; watchIndex?: Rivet.WatchQuery | undefined; diff --git a/sdks/full/typescript/types/api/resources/identity/client/requests/PrepareAvatarUploadRequest.d.ts b/sdks/full/typescript/types/api/resources/identity/client/requests/PrepareAvatarUploadRequest.d.ts index 12a1ca1457..f9e6d93be3 100644 --- a/sdks/full/typescript/types/api/resources/identity/client/requests/PrepareAvatarUploadRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/client/requests/PrepareAvatarUploadRequest.d.ts @@ -1,6 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * path: "string", + * mime: "string", + * contentLength: 1000000 + * } + */ export interface PrepareAvatarUploadRequest { path: string; /** See https://www.iana.org/assignments/media-types/media-types.xhtml */ diff --git a/sdks/full/typescript/types/api/resources/identity/client/requests/ReportRequest.d.ts b/sdks/full/typescript/types/api/resources/identity/client/requests/ReportRequest.d.ts index 2f230f4b60..9ac8d1baf6 100644 --- a/sdks/full/typescript/types/api/resources/identity/client/requests/ReportRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/client/requests/ReportRequest.d.ts @@ -1,6 +1,12 @@ /** * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * reason: "string" + * } + */ export interface ReportRequest { reason?: string; } diff --git a/sdks/full/typescript/types/api/resources/identity/client/requests/SearchRequest.d.ts b/sdks/full/typescript/types/api/resources/identity/client/requests/SearchRequest.d.ts index bdd9d067a6..7b4952180c 100644 --- a/sdks/full/typescript/types/api/resources/identity/client/requests/SearchRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/client/requests/SearchRequest.d.ts @@ -1,6 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * query: "string", + * anchor: "string", + * limit: 1 + * } + */ export interface SearchRequest { /** * The query to match identity display names and account numbers against. diff --git a/sdks/full/typescript/types/api/resources/identity/client/requests/SetGameActivityRequest.d.ts b/sdks/full/typescript/types/api/resources/identity/client/requests/SetGameActivityRequest.d.ts index 740b5aacfb..a1b825a4d3 100644 --- a/sdks/full/typescript/types/api/resources/identity/client/requests/SetGameActivityRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/client/requests/SetGameActivityRequest.d.ts @@ -1,7 +1,21 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * gameActivity: { + * message: "string", + * publicMetadata: { + * "key": "value" + * }, + * mutualMetadata: { + * "key": "value" + * } + * } + * } + */ export interface SetGameActivityRequest { gameActivity: Rivet.identity.UpdateGameActivity; } diff --git a/sdks/full/typescript/types/api/resources/identity/client/requests/SetupRequest.d.ts b/sdks/full/typescript/types/api/resources/identity/client/requests/SetupRequest.d.ts index 52c0367997..ec4990a5ea 100644 --- a/sdks/full/typescript/types/api/resources/identity/client/requests/SetupRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/client/requests/SetupRequest.d.ts @@ -1,7 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * existingIdentityToken: "string" + * } + */ export interface SetupRequest { existingIdentityToken?: Rivet.Jwt; } diff --git a/sdks/full/typescript/types/api/resources/identity/client/requests/SignupForBetaRequest.d.ts b/sdks/full/typescript/types/api/resources/identity/client/requests/SignupForBetaRequest.d.ts index 37e4a90414..0e8b0a9fae 100644 --- a/sdks/full/typescript/types/api/resources/identity/client/requests/SignupForBetaRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/client/requests/SignupForBetaRequest.d.ts @@ -1,6 +1,16 @@ /** * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * name: "string", + * companyName: "string", + * companySize: "string", + * preferredTools: "string", + * goals: "string" + * } + */ export interface SignupForBetaRequest { name: string; companyName?: string; diff --git a/sdks/full/typescript/types/api/resources/identity/client/requests/UpdateProfileRequest.d.ts b/sdks/full/typescript/types/api/resources/identity/client/requests/UpdateProfileRequest.d.ts index e55e0979af..0d4b69fcb2 100644 --- a/sdks/full/typescript/types/api/resources/identity/client/requests/UpdateProfileRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/client/requests/UpdateProfileRequest.d.ts @@ -1,7 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * displayName: "string", + * accountNumber: 1, + * bio: "string" + * } + */ export interface UpdateProfileRequest { displayName?: Rivet.DisplayName; accountNumber?: Rivet.AccountNumber; diff --git a/sdks/full/typescript/types/api/resources/identity/client/requests/UpdateStatusRequest.d.ts b/sdks/full/typescript/types/api/resources/identity/client/requests/UpdateStatusRequest.d.ts index 615fc8892c..3329eeabb2 100644 --- a/sdks/full/typescript/types/api/resources/identity/client/requests/UpdateStatusRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/client/requests/UpdateStatusRequest.d.ts @@ -1,7 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * status: Rivet.identity.Status.Online + * } + */ export interface UpdateStatusRequest { status: Rivet.identity.Status; } diff --git a/sdks/full/typescript/types/api/resources/identity/client/requests/ValidateProfileRequest.d.ts b/sdks/full/typescript/types/api/resources/identity/client/requests/ValidateProfileRequest.d.ts index 2159413cda..262889c34a 100644 --- a/sdks/full/typescript/types/api/resources/identity/client/requests/ValidateProfileRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/client/requests/ValidateProfileRequest.d.ts @@ -1,7 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * displayName: "string", + * accountNumber: 1, + * bio: "string" + * } + */ export interface ValidateProfileRequest { displayName?: Rivet.DisplayName; accountNumber?: Rivet.AccountNumber; diff --git a/sdks/full/typescript/types/api/resources/identity/client/requests/index.d.ts b/sdks/full/typescript/types/api/resources/identity/client/requests/index.d.ts index b80646a877..bdb301a5fc 100644 --- a/sdks/full/typescript/types/api/resources/identity/client/requests/index.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/client/requests/index.d.ts @@ -1,18 +1,18 @@ -export { SetupRequest } from "./SetupRequest"; -export { GetProfileRequest } from "./GetProfileRequest"; -export { GetSelfProfileRequest } from "./GetSelfProfileRequest"; -export { GetHandlesRequest } from "./GetHandlesRequest"; -export { GetSummariesRequest } from "./GetSummariesRequest"; -export { UpdateProfileRequest } from "./UpdateProfileRequest"; -export { ValidateProfileRequest } from "./ValidateProfileRequest"; -export { SearchRequest } from "./SearchRequest"; -export { SetGameActivityRequest } from "./SetGameActivityRequest"; -export { UpdateStatusRequest } from "./UpdateStatusRequest"; -export { PrepareAvatarUploadRequest } from "./PrepareAvatarUploadRequest"; -export { SignupForBetaRequest } from "./SignupForBetaRequest"; -export { ReportRequest } from "./ReportRequest"; -export { ListFollowersRequest } from "./ListFollowersRequest"; -export { ListFollowingRequest } from "./ListFollowingRequest"; -export { ListFriendsRequest } from "./ListFriendsRequest"; -export { ListMutualFriendsRequest } from "./ListMutualFriendsRequest"; -export { ListRecentFollowersRequest } from "./ListRecentFollowersRequest"; +export { type SetupRequest } from "./SetupRequest"; +export { type GetProfileRequest } from "./GetProfileRequest"; +export { type GetSelfProfileRequest } from "./GetSelfProfileRequest"; +export { type GetHandlesRequest } from "./GetHandlesRequest"; +export { type GetSummariesRequest } from "./GetSummariesRequest"; +export { type UpdateProfileRequest } from "./UpdateProfileRequest"; +export { type ValidateProfileRequest } from "./ValidateProfileRequest"; +export { type SearchRequest } from "./SearchRequest"; +export { type SetGameActivityRequest } from "./SetGameActivityRequest"; +export { type UpdateStatusRequest } from "./UpdateStatusRequest"; +export { type PrepareAvatarUploadRequest } from "./PrepareAvatarUploadRequest"; +export { type SignupForBetaRequest } from "./SignupForBetaRequest"; +export { type ReportRequest } from "./ReportRequest"; +export { type ListFollowersRequest } from "./ListFollowersRequest"; +export { type ListFollowingRequest } from "./ListFollowingRequest"; +export { type ListFriendsRequest } from "./ListFriendsRequest"; +export { type ListMutualFriendsRequest } from "./ListMutualFriendsRequest"; +export { type ListRecentFollowersRequest } from "./ListRecentFollowersRequest"; diff --git a/sdks/full/typescript/types/api/resources/identity/resources/activities/client/Client.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/activities/client/Client.d.ts index 913d74cb3a..e9eedfd1a2 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/activities/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/activities/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export declare namespace Activities { interface Options { environment?: core.Supplier; @@ -11,8 +11,12 @@ export declare namespace Activities { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Activities { @@ -20,12 +24,21 @@ export declare class Activities { constructor(_options?: Activities.Options); /** * Returns an overview of all players currently online or in game. + * + * @param {Rivet.identity.ListActivitiesRequest} request + * @param {Activities.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.activities.list({ + * watchIndex: "string" + * }) */ list(request?: Rivet.identity.ListActivitiesRequest, requestOptions?: Activities.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/identity/resources/activities/client/requests/ListActivitiesRequest.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/activities/client/requests/ListActivitiesRequest.d.ts index 2a36faa4a2..fe186b57da 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/activities/client/requests/ListActivitiesRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/activities/client/requests/ListActivitiesRequest.d.ts @@ -1,7 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../.."; +import * as Rivet from "../../../../../../index"; +/** + * @example + * { + * watchIndex: "string" + * } + */ export interface ListActivitiesRequest { watchIndex?: Rivet.WatchQuery; } diff --git a/sdks/full/typescript/types/api/resources/identity/resources/activities/client/requests/index.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/activities/client/requests/index.d.ts index 90a9a44f46..e0147e2217 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/activities/client/requests/index.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/activities/client/requests/index.d.ts @@ -1 +1 @@ -export { ListActivitiesRequest } from "./ListActivitiesRequest"; +export { type ListActivitiesRequest } from "./ListActivitiesRequest"; diff --git a/sdks/full/typescript/types/api/resources/identity/resources/activities/types/ListActivitiesResponse.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/activities/types/ListActivitiesResponse.d.ts index aa13c94ec2..4ecfafc188 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/activities/types/ListActivitiesResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/activities/types/ListActivitiesResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface ListActivitiesResponse { identities: Rivet.identity.Handle[]; games: Rivet.game.Summary[]; diff --git a/sdks/full/typescript/types/api/resources/identity/resources/common/types/EmailLinkedAccount.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/common/types/EmailLinkedAccount.d.ts index 65978e88fa..97bde38cc0 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/common/types/EmailLinkedAccount.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/common/types/EmailLinkedAccount.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * An identity's linked email. */ diff --git a/sdks/full/typescript/types/api/resources/identity/resources/common/types/GameActivity.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/common/types/GameActivity.d.ts index c4aab0410f..2ce278883f 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/common/types/GameActivity.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/common/types/GameActivity.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * The game an identity is currently participating in. */ diff --git a/sdks/full/typescript/types/api/resources/identity/resources/common/types/GlobalEvent.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/common/types/GlobalEvent.d.ts index eca899713c..f6a1ab1646 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/common/types/GlobalEvent.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/common/types/GlobalEvent.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * An event relevant to the current identity. */ diff --git a/sdks/full/typescript/types/api/resources/identity/resources/common/types/GlobalEventIdentityUpdate.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/common/types/GlobalEventIdentityUpdate.d.ts index 1bf68df3c3..25656aea7a 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/common/types/GlobalEventIdentityUpdate.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/common/types/GlobalEventIdentityUpdate.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GlobalEventIdentityUpdate { identity: Rivet.identity.Profile; } diff --git a/sdks/full/typescript/types/api/resources/identity/resources/common/types/GlobalEventKind.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/common/types/GlobalEventKind.d.ts index d1984b315e..4d148f312e 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/common/types/GlobalEventKind.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/common/types/GlobalEventKind.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GlobalEventKind { identityUpdate?: Rivet.identity.GlobalEventIdentityUpdate; matchmakerLobbyJoin?: Rivet.identity.GlobalEventMatchmakerLobbyJoin; diff --git a/sdks/full/typescript/types/api/resources/identity/resources/common/types/GlobalEventMatchmakerLobbyJoin.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/common/types/GlobalEventMatchmakerLobbyJoin.d.ts index ebf0ddffe9..f6971ee95f 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/common/types/GlobalEventMatchmakerLobbyJoin.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/common/types/GlobalEventMatchmakerLobbyJoin.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GlobalEventMatchmakerLobbyJoin { lobby: Rivet.matchmaker.JoinLobby; ports: Record; diff --git a/sdks/full/typescript/types/api/resources/identity/resources/common/types/Group.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/common/types/Group.d.ts index 8401173e30..69b7bd89e2 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/common/types/Group.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/common/types/Group.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A group that the given identity. */ diff --git a/sdks/full/typescript/types/api/resources/identity/resources/common/types/Handle.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/common/types/Handle.d.ts index 84ebbaa813..1ccaa84e1f 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/common/types/Handle.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/common/types/Handle.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * An identity handle. */ diff --git a/sdks/full/typescript/types/api/resources/identity/resources/common/types/LinkedAccount.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/common/types/LinkedAccount.d.ts index 369620568b..d3dad67302 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/common/types/LinkedAccount.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/common/types/LinkedAccount.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A union representing an identity's linked accounts. */ diff --git a/sdks/full/typescript/types/api/resources/identity/resources/common/types/Presence.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/common/types/Presence.d.ts index 97629fb9b8..7e9a94567e 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/common/types/Presence.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/common/types/Presence.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * Information about the identity's current status, party, and active game. */ diff --git a/sdks/full/typescript/types/api/resources/identity/resources/common/types/Profile.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/common/types/Profile.d.ts index aec2ea3447..39d296196d 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/common/types/Profile.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/common/types/Profile.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * An identity profile. */ diff --git a/sdks/full/typescript/types/api/resources/identity/resources/common/types/Summary.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/common/types/Summary.d.ts index 71dedb7b26..91cc34f33c 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/common/types/Summary.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/common/types/Summary.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * An identity summary. */ diff --git a/sdks/full/typescript/types/api/resources/identity/resources/events/client/Client.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/events/client/Client.d.ts index e5a2215083..c87c3df117 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/events/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/events/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export declare namespace Events { interface Options { environment?: core.Supplier; @@ -11,8 +11,12 @@ export declare namespace Events { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Events { @@ -20,12 +24,21 @@ export declare class Events { constructor(_options?: Events.Options); /** * Returns all events relative to the current identity. + * + * @param {Rivet.identity.WatchEventsRequest} request + * @param {Events.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.events.watch({ + * watchIndex: "string" + * }) */ watch(request?: Rivet.identity.WatchEventsRequest, requestOptions?: Events.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/identity/resources/events/client/requests/WatchEventsRequest.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/events/client/requests/WatchEventsRequest.d.ts index 7e4f675a21..6009f3555e 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/events/client/requests/WatchEventsRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/events/client/requests/WatchEventsRequest.d.ts @@ -1,7 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../.."; +import * as Rivet from "../../../../../../index"; +/** + * @example + * { + * watchIndex: "string" + * } + */ export interface WatchEventsRequest { watchIndex?: Rivet.WatchQuery; } diff --git a/sdks/full/typescript/types/api/resources/identity/resources/events/client/requests/index.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/events/client/requests/index.d.ts index cb463d9752..9f84f1e664 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/events/client/requests/index.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/events/client/requests/index.d.ts @@ -1 +1 @@ -export { WatchEventsRequest } from "./WatchEventsRequest"; +export { type WatchEventsRequest } from "./WatchEventsRequest"; diff --git a/sdks/full/typescript/types/api/resources/identity/resources/events/types/WatchEventsResponse.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/events/types/WatchEventsResponse.d.ts index 4faa2c21f3..7de8e0c4c0 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/events/types/WatchEventsResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/events/types/WatchEventsResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface WatchEventsResponse { events: Rivet.identity.GlobalEvent[]; watch: Rivet.WatchResponse; diff --git a/sdks/full/typescript/types/api/resources/identity/resources/links/client/Client.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/links/client/Client.d.ts index 81e540a2aa..1e03a6f49a 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/links/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/links/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export declare namespace Links { interface Options { environment?: core.Supplier; @@ -11,8 +11,12 @@ export declare namespace Links { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Links { @@ -35,42 +39,76 @@ export declare class Links { * This is designed to be as flexible as possible so `identity_link_url` can be opened * on any device. For example, when playing a console game, the user can scan a * QR code for `identity_link_url` to authenticate on their phone. + * + * @param {Links.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.links.prepare() */ prepare(requestOptions?: Links.RequestOptions): Promise; /** * Returns the current status of a linking process. Once `status` is `complete`, the identity's profile should be fetched again since they may have switched accounts. + * + * @param {Rivet.identity.GetGameLinkRequest} request + * @param {Links.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.links.get({ + * identityLinkToken: "string", + * watchIndex: "string" + * }) */ get(request: Rivet.identity.GetGameLinkRequest, requestOptions?: Links.RequestOptions): Promise; /** * Completes a game link process and returns whether or not the link is valid. + * + * @param {Rivet.identity.CompleteGameLinkRequest} request + * @param {Links.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.links.complete({ + * identityLinkToken: "string" + * }) */ complete(request: Rivet.identity.CompleteGameLinkRequest, requestOptions?: Links.RequestOptions): Promise; /** * Cancels a game link. It can no longer be used to link after cancellation. + * + * @param {Rivet.identity.CancelGameLinkRequest} request + * @param {Links.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.identity.links.cancel({ + * identityLinkToken: "string" + * }) */ cancel(request: Rivet.identity.CancelGameLinkRequest, requestOptions?: Links.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/identity/resources/links/client/requests/GetGameLinkRequest.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/links/client/requests/GetGameLinkRequest.d.ts index 06b15011c0..86be099fcd 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/links/client/requests/GetGameLinkRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/links/client/requests/GetGameLinkRequest.d.ts @@ -1,7 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../.."; +import * as Rivet from "../../../../../../index"; +/** + * @example + * { + * identityLinkToken: "string", + * watchIndex: "string" + * } + */ export interface GetGameLinkRequest { identityLinkToken: Rivet.Jwt; watchIndex?: Rivet.WatchQuery; diff --git a/sdks/full/typescript/types/api/resources/identity/resources/links/client/requests/index.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/links/client/requests/index.d.ts index ecd1212991..ed39f0a4c8 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/links/client/requests/index.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/links/client/requests/index.d.ts @@ -1 +1 @@ -export { GetGameLinkRequest } from "./GetGameLinkRequest"; +export { type GetGameLinkRequest } from "./GetGameLinkRequest"; diff --git a/sdks/full/typescript/types/api/resources/identity/resources/links/types/CancelGameLinkRequest.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/links/types/CancelGameLinkRequest.d.ts index 176da47cc6..4ad1e23b71 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/links/types/CancelGameLinkRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/links/types/CancelGameLinkRequest.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface CancelGameLinkRequest { identityLinkToken: Rivet.Jwt; } diff --git a/sdks/full/typescript/types/api/resources/identity/resources/links/types/CompleteGameLinkRequest.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/links/types/CompleteGameLinkRequest.d.ts index 617e76e12a..2c320d6b5f 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/links/types/CompleteGameLinkRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/links/types/CompleteGameLinkRequest.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface CompleteGameLinkRequest { identityLinkToken: Rivet.Jwt; } diff --git a/sdks/full/typescript/types/api/resources/identity/resources/links/types/GetGameLinkNewIdentity.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/links/types/GetGameLinkNewIdentity.d.ts index 9bda0b9aa8..aa74a36c51 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/links/types/GetGameLinkNewIdentity.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/links/types/GetGameLinkNewIdentity.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GetGameLinkNewIdentity { identityToken: Rivet.Jwt; identityTokenExpireTs: Rivet.Timestamp; diff --git a/sdks/full/typescript/types/api/resources/identity/resources/links/types/GetGameLinkResponse.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/links/types/GetGameLinkResponse.d.ts index 971352cbca..ae55ceb863 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/links/types/GetGameLinkResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/links/types/GetGameLinkResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GetGameLinkResponse { status: Rivet.identity.GameLinkStatus; game: Rivet.game.Handle; diff --git a/sdks/full/typescript/types/api/resources/identity/resources/links/types/PrepareGameLinkResponse.d.ts b/sdks/full/typescript/types/api/resources/identity/resources/links/types/PrepareGameLinkResponse.d.ts index 57ea911f9f..ddd2446cdf 100644 --- a/sdks/full/typescript/types/api/resources/identity/resources/links/types/PrepareGameLinkResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/resources/links/types/PrepareGameLinkResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface PrepareGameLinkResponse { /** Pass this to `GetGameLink` to get the linking status. Valid for 15 minutes. */ identityLinkToken: string; diff --git a/sdks/full/typescript/types/api/resources/identity/types/GetHandlesResponse.d.ts b/sdks/full/typescript/types/api/resources/identity/types/GetHandlesResponse.d.ts index 88c8538108..52af56edbc 100644 --- a/sdks/full/typescript/types/api/resources/identity/types/GetHandlesResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/types/GetHandlesResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface GetHandlesResponse { identities: Rivet.identity.Handle[]; watch: Rivet.WatchResponse; diff --git a/sdks/full/typescript/types/api/resources/identity/types/GetProfileResponse.d.ts b/sdks/full/typescript/types/api/resources/identity/types/GetProfileResponse.d.ts index 521b5679a6..7c15235312 100644 --- a/sdks/full/typescript/types/api/resources/identity/types/GetProfileResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/types/GetProfileResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface GetProfileResponse { identity: Rivet.identity.Profile; watch: Rivet.WatchResponse; diff --git a/sdks/full/typescript/types/api/resources/identity/types/GetSummariesResponse.d.ts b/sdks/full/typescript/types/api/resources/identity/types/GetSummariesResponse.d.ts index d67b9d7314..7068764dcb 100644 --- a/sdks/full/typescript/types/api/resources/identity/types/GetSummariesResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/types/GetSummariesResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface GetSummariesResponse { identities: Rivet.identity.Summary[]; watch: Rivet.WatchResponse; diff --git a/sdks/full/typescript/types/api/resources/identity/types/ListFollowersResponse.d.ts b/sdks/full/typescript/types/api/resources/identity/types/ListFollowersResponse.d.ts index 7412ba32bc..c54b0ed56e 100644 --- a/sdks/full/typescript/types/api/resources/identity/types/ListFollowersResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/types/ListFollowersResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface ListFollowersResponse { identities: Rivet.identity.Handle[]; anchor?: string; diff --git a/sdks/full/typescript/types/api/resources/identity/types/ListFollowingResponse.d.ts b/sdks/full/typescript/types/api/resources/identity/types/ListFollowingResponse.d.ts index f1970d5504..8c43021f50 100644 --- a/sdks/full/typescript/types/api/resources/identity/types/ListFollowingResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/types/ListFollowingResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface ListFollowingResponse { identities: Rivet.identity.Handle[]; anchor?: string; diff --git a/sdks/full/typescript/types/api/resources/identity/types/ListFriendsResponse.d.ts b/sdks/full/typescript/types/api/resources/identity/types/ListFriendsResponse.d.ts index 0316763179..cd10e0bcf5 100644 --- a/sdks/full/typescript/types/api/resources/identity/types/ListFriendsResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/types/ListFriendsResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface ListFriendsResponse { identities: Rivet.identity.Handle[]; anchor?: string; diff --git a/sdks/full/typescript/types/api/resources/identity/types/ListMutualFriendsResponse.d.ts b/sdks/full/typescript/types/api/resources/identity/types/ListMutualFriendsResponse.d.ts index 173ce16298..59e2f0b7eb 100644 --- a/sdks/full/typescript/types/api/resources/identity/types/ListMutualFriendsResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/types/ListMutualFriendsResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface ListMutualFriendsResponse { identities: Rivet.identity.Handle[]; anchor?: string; diff --git a/sdks/full/typescript/types/api/resources/identity/types/ListRecentFollowersResponse.d.ts b/sdks/full/typescript/types/api/resources/identity/types/ListRecentFollowersResponse.d.ts index e1023f1501..eaa205d369 100644 --- a/sdks/full/typescript/types/api/resources/identity/types/ListRecentFollowersResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/types/ListRecentFollowersResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface ListRecentFollowersResponse { identities: Rivet.identity.Handle[]; anchor?: string; diff --git a/sdks/full/typescript/types/api/resources/identity/types/PrepareAvatarUploadResponse.d.ts b/sdks/full/typescript/types/api/resources/identity/types/PrepareAvatarUploadResponse.d.ts index eb5beb7fb1..7b2f738f39 100644 --- a/sdks/full/typescript/types/api/resources/identity/types/PrepareAvatarUploadResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/types/PrepareAvatarUploadResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface PrepareAvatarUploadResponse { uploadId: string; presignedRequest: Rivet.upload.PresignedRequest; diff --git a/sdks/full/typescript/types/api/resources/identity/types/SearchResponse.d.ts b/sdks/full/typescript/types/api/resources/identity/types/SearchResponse.d.ts index 5e9564c9dc..5a9665a7c8 100644 --- a/sdks/full/typescript/types/api/resources/identity/types/SearchResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/types/SearchResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface SearchResponse { identities: Rivet.identity.Handle[]; /** The pagination anchor. */ diff --git a/sdks/full/typescript/types/api/resources/identity/types/SetupResponse.d.ts b/sdks/full/typescript/types/api/resources/identity/types/SetupResponse.d.ts index d660281e3c..73533dcc14 100644 --- a/sdks/full/typescript/types/api/resources/identity/types/SetupResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/types/SetupResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface SetupResponse { /** * Token used to authenticate the identity. diff --git a/sdks/full/typescript/types/api/resources/identity/types/ValidateProfileResponse.d.ts b/sdks/full/typescript/types/api/resources/identity/types/ValidateProfileResponse.d.ts index a0b69b9ede..f422f8d86b 100644 --- a/sdks/full/typescript/types/api/resources/identity/types/ValidateProfileResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/identity/types/ValidateProfileResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface ValidateProfileResponse { errors: Rivet.ValidationError[]; } diff --git a/sdks/full/typescript/types/api/resources/job/client/Client.d.ts b/sdks/full/typescript/types/api/resources/job/client/Client.d.ts index c3dba311ac..31abc95b04 100644 --- a/sdks/full/typescript/types/api/resources/job/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/job/client/Client.d.ts @@ -11,8 +11,12 @@ export declare namespace Job { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Job { diff --git a/sdks/full/typescript/types/api/resources/job/resources/run/client/Client.d.ts b/sdks/full/typescript/types/api/resources/job/resources/run/client/Client.d.ts index c397b61ddf..c897f412ec 100644 --- a/sdks/full/typescript/types/api/resources/job/resources/run/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/job/resources/run/client/Client.d.ts @@ -10,20 +10,29 @@ export declare namespace Run { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Run { protected readonly _options: Run.Options; constructor(_options?: Run.Options); /** + * @param {Run.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.job.run.cleanup() */ cleanup(requestOptions?: Run.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/kv/client/Client.d.ts b/sdks/full/typescript/types/api/resources/kv/client/Client.d.ts index 95a0e1dfb7..fbad9ee3e8 100644 --- a/sdks/full/typescript/types/api/resources/kv/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/kv/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export declare namespace Kv { interface Options { environment?: core.Supplier; @@ -11,8 +11,12 @@ export declare namespace Kv { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Kv { @@ -20,72 +24,147 @@ export declare class Kv { constructor(_options?: Kv.Options); /** * Returns a specific key-value entry by key. + * + * @param {Rivet.kv.GetOperationRequest} request + * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.kv.get({ + * key: "string", + * watchIndex: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * }) */ get(request: Rivet.kv.GetOperationRequest, requestOptions?: Kv.RequestOptions): Promise; /** * Puts (sets or overwrites) a key-value entry by key. + * + * @param {Rivet.kv.PutRequest} request + * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.kv.put({ + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + * key: "string", + * value: { + * "key": "value" + * } + * }) */ put(request: Rivet.kv.PutRequest, requestOptions?: Kv.RequestOptions): Promise; /** * Deletes a key-value entry by key. + * + * @param {Rivet.kv.DeleteOperationRequest} request + * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.kv.delete({ + * key: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * }) */ delete(request: Rivet.kv.DeleteOperationRequest, requestOptions?: Kv.RequestOptions): Promise; /** * Lists all keys in a directory. + * + * @param {Rivet.kv.ListOperationRequest} request + * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.kv.list({ + * directory: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * }) */ list(request: Rivet.kv.ListOperationRequest, requestOptions?: Kv.RequestOptions): Promise; /** * Gets multiple key-value entries by key(s). + * + * @param {Rivet.kv.GetBatchRequest} request + * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.kv.getBatch({ + * keys: "string", + * watchIndex: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * }) */ getBatch(request: Rivet.kv.GetBatchRequest, requestOptions?: Kv.RequestOptions): Promise; /** * Puts (sets or overwrites) multiple key-value entries by key(s). + * + * @param {Rivet.kv.PutBatchRequest} request + * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.kv.putBatch({ + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + * entries: [{}] + * }) */ putBatch(request: Rivet.kv.PutBatchRequest, requestOptions?: Kv.RequestOptions): Promise; /** * Deletes multiple key-value entries by key(s). + * + * @param {Rivet.kv.DeleteBatchRequest} request + * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.kv.deleteBatch({ + * keys: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * }) */ deleteBatch(request: Rivet.kv.DeleteBatchRequest, requestOptions?: Kv.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/kv/client/requests/DeleteBatchRequest.d.ts b/sdks/full/typescript/types/api/resources/kv/client/requests/DeleteBatchRequest.d.ts index 06e8af4536..f2a54cad99 100644 --- a/sdks/full/typescript/types/api/resources/kv/client/requests/DeleteBatchRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/kv/client/requests/DeleteBatchRequest.d.ts @@ -1,7 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * keys: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * } + */ export interface DeleteBatchRequest { keys: Rivet.kv.Key | Rivet.kv.Key[]; namespaceId?: string; diff --git a/sdks/full/typescript/types/api/resources/kv/client/requests/DeleteOperationRequest.d.ts b/sdks/full/typescript/types/api/resources/kv/client/requests/DeleteOperationRequest.d.ts index 155bb04153..f8644ffbb7 100644 --- a/sdks/full/typescript/types/api/resources/kv/client/requests/DeleteOperationRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/kv/client/requests/DeleteOperationRequest.d.ts @@ -1,7 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * key: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * } + */ export interface DeleteOperationRequest { key: Rivet.kv.Key; namespaceId?: string; diff --git a/sdks/full/typescript/types/api/resources/kv/client/requests/GetBatchRequest.d.ts b/sdks/full/typescript/types/api/resources/kv/client/requests/GetBatchRequest.d.ts index 38d5450bb5..816805b50a 100644 --- a/sdks/full/typescript/types/api/resources/kv/client/requests/GetBatchRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/kv/client/requests/GetBatchRequest.d.ts @@ -1,7 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * keys: "string", + * watchIndex: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * } + */ export interface GetBatchRequest { keys: Rivet.kv.Key | Rivet.kv.Key[]; /** diff --git a/sdks/full/typescript/types/api/resources/kv/client/requests/GetOperationRequest.d.ts b/sdks/full/typescript/types/api/resources/kv/client/requests/GetOperationRequest.d.ts index 7d41b33b47..07ff18b080 100644 --- a/sdks/full/typescript/types/api/resources/kv/client/requests/GetOperationRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/kv/client/requests/GetOperationRequest.d.ts @@ -1,7 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * key: "string", + * watchIndex: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * } + */ export interface GetOperationRequest { key: Rivet.kv.Key; /** diff --git a/sdks/full/typescript/types/api/resources/kv/client/requests/ListOperationRequest.d.ts b/sdks/full/typescript/types/api/resources/kv/client/requests/ListOperationRequest.d.ts index e8f10a9f14..6c615e06b6 100644 --- a/sdks/full/typescript/types/api/resources/kv/client/requests/ListOperationRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/kv/client/requests/ListOperationRequest.d.ts @@ -1,7 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * directory: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * } + */ export interface ListOperationRequest { directory: Rivet.kv.Directory; namespaceId: string; diff --git a/sdks/full/typescript/types/api/resources/kv/client/requests/index.d.ts b/sdks/full/typescript/types/api/resources/kv/client/requests/index.d.ts index 5608eea192..2dc02e572b 100644 --- a/sdks/full/typescript/types/api/resources/kv/client/requests/index.d.ts +++ b/sdks/full/typescript/types/api/resources/kv/client/requests/index.d.ts @@ -1,5 +1,5 @@ -export { GetOperationRequest } from "./GetOperationRequest"; -export { DeleteOperationRequest } from "./DeleteOperationRequest"; -export { ListOperationRequest } from "./ListOperationRequest"; -export { GetBatchRequest } from "./GetBatchRequest"; -export { DeleteBatchRequest } from "./DeleteBatchRequest"; +export { type GetOperationRequest } from "./GetOperationRequest"; +export { type DeleteOperationRequest } from "./DeleteOperationRequest"; +export { type ListOperationRequest } from "./ListOperationRequest"; +export { type GetBatchRequest } from "./GetBatchRequest"; +export { type DeleteBatchRequest } from "./DeleteBatchRequest"; diff --git a/sdks/full/typescript/types/api/resources/kv/resources/common/types/Entry.d.ts b/sdks/full/typescript/types/api/resources/kv/resources/common/types/Entry.d.ts index 559c16b764..e986e76c32 100644 --- a/sdks/full/typescript/types/api/resources/kv/resources/common/types/Entry.d.ts +++ b/sdks/full/typescript/types/api/resources/kv/resources/common/types/Entry.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A key-value entry. */ diff --git a/sdks/full/typescript/types/api/resources/kv/resources/common/types/PutEntry.d.ts b/sdks/full/typescript/types/api/resources/kv/resources/common/types/PutEntry.d.ts index 7f53b400d4..d71f19ce88 100644 --- a/sdks/full/typescript/types/api/resources/kv/resources/common/types/PutEntry.d.ts +++ b/sdks/full/typescript/types/api/resources/kv/resources/common/types/PutEntry.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A new entry to insert into the key-value database. */ diff --git a/sdks/full/typescript/types/api/resources/kv/types/GetBatchResponse.d.ts b/sdks/full/typescript/types/api/resources/kv/types/GetBatchResponse.d.ts index a8a1cecd8c..2a7e1eac3d 100644 --- a/sdks/full/typescript/types/api/resources/kv/types/GetBatchResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/kv/types/GetBatchResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface GetBatchResponse { entries: Rivet.kv.Entry[]; watch: Rivet.WatchResponse; diff --git a/sdks/full/typescript/types/api/resources/kv/types/GetResponse.d.ts b/sdks/full/typescript/types/api/resources/kv/types/GetResponse.d.ts index ce6ac3c10d..dcf4459591 100644 --- a/sdks/full/typescript/types/api/resources/kv/types/GetResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/kv/types/GetResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface GetResponse { value?: Rivet.kv.Value; /** Whether or not the entry has been deleted. Only set when watching this endpoint. */ diff --git a/sdks/full/typescript/types/api/resources/kv/types/ListResponse.d.ts b/sdks/full/typescript/types/api/resources/kv/types/ListResponse.d.ts index 72d29acabe..6d93c897c5 100644 --- a/sdks/full/typescript/types/api/resources/kv/types/ListResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/kv/types/ListResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface ListResponse { entries: Rivet.kv.Entry[]; } diff --git a/sdks/full/typescript/types/api/resources/kv/types/PutBatchRequest.d.ts b/sdks/full/typescript/types/api/resources/kv/types/PutBatchRequest.d.ts index 50b5d75023..7f7c132baa 100644 --- a/sdks/full/typescript/types/api/resources/kv/types/PutBatchRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/kv/types/PutBatchRequest.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface PutBatchRequest { namespaceId?: string; entries: Rivet.kv.PutEntry[]; diff --git a/sdks/full/typescript/types/api/resources/kv/types/PutRequest.d.ts b/sdks/full/typescript/types/api/resources/kv/types/PutRequest.d.ts index 4c82f9ae16..7fd854dc49 100644 --- a/sdks/full/typescript/types/api/resources/kv/types/PutRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/kv/types/PutRequest.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface PutRequest { namespaceId?: string; key: Rivet.kv.Key; diff --git a/sdks/full/typescript/types/api/resources/matchmaker/client/Client.d.ts b/sdks/full/typescript/types/api/resources/matchmaker/client/Client.d.ts index d66c522226..8978188126 100644 --- a/sdks/full/typescript/types/api/resources/matchmaker/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/matchmaker/client/Client.d.ts @@ -13,8 +13,12 @@ export declare namespace Matchmaker { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Matchmaker { diff --git a/sdks/full/typescript/types/api/resources/matchmaker/resources/common/types/GameModeInfo.d.ts b/sdks/full/typescript/types/api/resources/matchmaker/resources/common/types/GameModeInfo.d.ts index 2e19c728cf..ec12873aca 100644 --- a/sdks/full/typescript/types/api/resources/matchmaker/resources/common/types/GameModeInfo.d.ts +++ b/sdks/full/typescript/types/api/resources/matchmaker/resources/common/types/GameModeInfo.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A game mode that the player can join. */ diff --git a/sdks/full/typescript/types/api/resources/matchmaker/resources/common/types/JoinLobby.d.ts b/sdks/full/typescript/types/api/resources/matchmaker/resources/common/types/JoinLobby.d.ts index 8e015450dc..52c1292879 100644 --- a/sdks/full/typescript/types/api/resources/matchmaker/resources/common/types/JoinLobby.d.ts +++ b/sdks/full/typescript/types/api/resources/matchmaker/resources/common/types/JoinLobby.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A matchmaker lobby. */ diff --git a/sdks/full/typescript/types/api/resources/matchmaker/resources/common/types/JoinPlayer.d.ts b/sdks/full/typescript/types/api/resources/matchmaker/resources/common/types/JoinPlayer.d.ts index 8231f66793..27ec29e1fd 100644 --- a/sdks/full/typescript/types/api/resources/matchmaker/resources/common/types/JoinPlayer.d.ts +++ b/sdks/full/typescript/types/api/resources/matchmaker/resources/common/types/JoinPlayer.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A matchmaker lobby player. */ diff --git a/sdks/full/typescript/types/api/resources/matchmaker/resources/common/types/JoinPort.d.ts b/sdks/full/typescript/types/api/resources/matchmaker/resources/common/types/JoinPort.d.ts index a4b9840b0b..ca151135f5 100644 --- a/sdks/full/typescript/types/api/resources/matchmaker/resources/common/types/JoinPort.d.ts +++ b/sdks/full/typescript/types/api/resources/matchmaker/resources/common/types/JoinPort.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface JoinPort { /** The host for the given port. Will be null if using a port range. */ host?: string; diff --git a/sdks/full/typescript/types/api/resources/matchmaker/resources/common/types/JoinRegion.d.ts b/sdks/full/typescript/types/api/resources/matchmaker/resources/common/types/JoinRegion.d.ts index bfdb923ee6..9da970e59b 100644 --- a/sdks/full/typescript/types/api/resources/matchmaker/resources/common/types/JoinRegion.d.ts +++ b/sdks/full/typescript/types/api/resources/matchmaker/resources/common/types/JoinRegion.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A matchmaker lobby region. */ diff --git a/sdks/full/typescript/types/api/resources/matchmaker/resources/common/types/RegionInfo.d.ts b/sdks/full/typescript/types/api/resources/matchmaker/resources/common/types/RegionInfo.d.ts index 6fb9808371..c1ecc0fad5 100644 --- a/sdks/full/typescript/types/api/resources/matchmaker/resources/common/types/RegionInfo.d.ts +++ b/sdks/full/typescript/types/api/resources/matchmaker/resources/common/types/RegionInfo.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A region that the player can connect to. */ diff --git a/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/Client.d.ts b/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/Client.d.ts index 1d7f981392..4fcb3e244e 100644 --- a/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export declare namespace Lobbies { interface Options { environment?: core.Supplier; @@ -11,8 +11,12 @@ export declare namespace Lobbies { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Lobbies { @@ -21,12 +25,18 @@ export declare class Lobbies { /** * Marks the current lobby as ready to accept connections. Players will not be able to connect to this lobby until the lobby is flagged as ready. * This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) for mock responses. When running on Rivet servers, you can access the given lobby token from the [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. + * + * @param {Lobbies.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.lobbies.ready() */ ready(requestOptions?: Lobbies.RequestOptions): Promise; /** @@ -39,12 +49,21 @@ export declare class Lobbies { * authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) * for mock responses. When running on Rivet servers, you can access the given lobby token from the * [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. + * + * @param {Rivet.matchmaker.SetLobbyClosedRequest} request + * @param {Lobbies.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.lobbies.setClosed({ + * isClosed: true + * }) */ setClosed(request: Rivet.matchmaker.SetLobbyClosedRequest, requestOptions?: Lobbies.RequestOptions): Promise; /** @@ -54,12 +73,21 @@ export declare class Lobbies { * authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) * for mock responses. When running on Rivet servers, you can access the given lobby token from the * [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. + * + * @param {unknown} request + * @param {Lobbies.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.lobbies.setState({ + * "key": "value" + * }) */ setState(request?: unknown, requestOptions?: Lobbies.RequestOptions): Promise; /** @@ -69,12 +97,19 @@ export declare class Lobbies { * authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) * for mock responses. When running on Rivet servers, you can access the given lobby token from the * [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. + * + * @param {string} lobbyId + * @param {Lobbies.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.lobbies.getState("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ getState(lobbyId: string, requestOptions?: Lobbies.RequestOptions): Promise; /** @@ -87,12 +122,35 @@ export declare class Lobbies { * [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used * for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) * can be used for general authentication. + * + * @param {Rivet.matchmaker.FindLobbyRequest} request + * @param {Lobbies.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.lobbies.find({ + * origin: "string", + * gameModes: ["string"], + * regions: ["string"], + * preventAutoCreateLobby: true, + * tags: { + * "string": "string" + * }, + * maxPlayers: 1, + * captcha: { + * hcaptcha: {}, + * turnstile: {} + * }, + * verificationData: { + * "key": "value" + * } + * }) */ find(request: Rivet.matchmaker.FindLobbyRequest, requestOptions?: Lobbies.RequestOptions): Promise; /** @@ -105,12 +163,28 @@ export declare class Lobbies { * [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used * for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) * can be used for general authentication. + * + * @param {Rivet.matchmaker.JoinLobbyRequest} request + * @param {Lobbies.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.lobbies.join({ + * lobbyId: "string", + * captcha: { + * hcaptcha: {}, + * turnstile: {} + * }, + * verificationData: { + * "key": "value" + * } + * }) */ join(request: Rivet.matchmaker.JoinLobbyRequest, requestOptions?: Lobbies.RequestOptions): Promise; /** @@ -121,12 +195,37 @@ export declare class Lobbies { * [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used * for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) * can be used for general authentication. + * + * @param {Rivet.matchmaker.CreateLobbyRequest} request + * @param {Lobbies.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.lobbies.create({ + * gameMode: "string", + * region: "string", + * publicity: Rivet.matchmaker.CustomLobbyPublicity.Public, + * tags: { + * "string": "string" + * }, + * maxPlayers: 1, + * lobbyConfig: { + * "key": "value" + * }, + * captcha: { + * hcaptcha: {}, + * turnstile: {} + * }, + * verificationData: { + * "key": "value" + * } + * }) */ create(request: Rivet.matchmaker.CreateLobbyRequest, requestOptions?: Lobbies.RequestOptions): Promise; /** @@ -137,12 +236,21 @@ export declare class Lobbies { * [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used * for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) * can be used for general authentication. + * + * @param {Rivet.matchmaker.ListLobbiesRequest} request + * @param {Lobbies.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.lobbies.list({ + * includeState: true + * }) */ list(request?: Rivet.matchmaker.ListLobbiesRequest, requestOptions?: Lobbies.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/requests/CreateLobbyRequest.d.ts b/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/requests/CreateLobbyRequest.d.ts index 20ff8ea992..12e6f3b25c 100644 --- a/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/requests/CreateLobbyRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/requests/CreateLobbyRequest.d.ts @@ -1,7 +1,29 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../.."; +import * as Rivet from "../../../../../../index"; +/** + * @example + * { + * gameMode: "string", + * region: "string", + * publicity: Rivet.matchmaker.CustomLobbyPublicity.Public, + * tags: { + * "string": "string" + * }, + * maxPlayers: 1, + * lobbyConfig: { + * "key": "value" + * }, + * captcha: { + * hcaptcha: {}, + * turnstile: {} + * }, + * verificationData: { + * "key": "value" + * } + * } + */ export interface CreateLobbyRequest { gameMode: string; region?: string; diff --git a/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/requests/FindLobbyRequest.d.ts b/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/requests/FindLobbyRequest.d.ts index 042d74a3f1..d0031d6217 100644 --- a/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/requests/FindLobbyRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/requests/FindLobbyRequest.d.ts @@ -1,7 +1,27 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../.."; +import * as Rivet from "../../../../../../index"; +/** + * @example + * { + * origin: "string", + * gameModes: ["string"], + * regions: ["string"], + * preventAutoCreateLobby: true, + * tags: { + * "string": "string" + * }, + * maxPlayers: 1, + * captcha: { + * hcaptcha: {}, + * turnstile: {} + * }, + * verificationData: { + * "key": "value" + * } + * } + */ export interface FindLobbyRequest { origin?: string; gameModes: string[]; diff --git a/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/requests/JoinLobbyRequest.d.ts b/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/requests/JoinLobbyRequest.d.ts index 23e4ddad18..56cea11b27 100644 --- a/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/requests/JoinLobbyRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/requests/JoinLobbyRequest.d.ts @@ -1,7 +1,20 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../.."; +import * as Rivet from "../../../../../../index"; +/** + * @example + * { + * lobbyId: "string", + * captcha: { + * hcaptcha: {}, + * turnstile: {} + * }, + * verificationData: { + * "key": "value" + * } + * } + */ export interface JoinLobbyRequest { lobbyId: string; captcha?: Rivet.captcha.Config; diff --git a/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/requests/ListLobbiesRequest.d.ts b/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/requests/ListLobbiesRequest.d.ts index fd87e72377..d3f93f2951 100644 --- a/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/requests/ListLobbiesRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/requests/ListLobbiesRequest.d.ts @@ -1,6 +1,12 @@ /** * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * includeState: true + * } + */ export interface ListLobbiesRequest { includeState?: boolean; } diff --git a/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/requests/SetLobbyClosedRequest.d.ts b/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/requests/SetLobbyClosedRequest.d.ts index 638a23aa4b..29c59c6a62 100644 --- a/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/requests/SetLobbyClosedRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/requests/SetLobbyClosedRequest.d.ts @@ -1,6 +1,12 @@ /** * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * isClosed: true + * } + */ export interface SetLobbyClosedRequest { isClosed: boolean; } diff --git a/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/requests/index.d.ts b/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/requests/index.d.ts index 6bb4afb57f..0e3df8e08a 100644 --- a/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/requests/index.d.ts +++ b/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/client/requests/index.d.ts @@ -1,5 +1,5 @@ -export { SetLobbyClosedRequest } from "./SetLobbyClosedRequest"; -export { FindLobbyRequest } from "./FindLobbyRequest"; -export { JoinLobbyRequest } from "./JoinLobbyRequest"; -export { CreateLobbyRequest } from "./CreateLobbyRequest"; -export { ListLobbiesRequest } from "./ListLobbiesRequest"; +export { type SetLobbyClosedRequest } from "./SetLobbyClosedRequest"; +export { type FindLobbyRequest } from "./FindLobbyRequest"; +export { type JoinLobbyRequest } from "./JoinLobbyRequest"; +export { type CreateLobbyRequest } from "./CreateLobbyRequest"; +export { type ListLobbiesRequest } from "./ListLobbiesRequest"; diff --git a/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/types/CreateLobbyResponse.d.ts b/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/types/CreateLobbyResponse.d.ts index 9af00d7981..796d4f7dbd 100644 --- a/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/types/CreateLobbyResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/types/CreateLobbyResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface CreateLobbyResponse { lobby: Rivet.matchmaker.JoinLobby; ports: Record; diff --git a/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/types/FindLobbyResponse.d.ts b/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/types/FindLobbyResponse.d.ts index fc55689012..8807889ab2 100644 --- a/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/types/FindLobbyResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/types/FindLobbyResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface FindLobbyResponse { lobby: Rivet.matchmaker.JoinLobby; ports: Record; diff --git a/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/types/JoinLobbyResponse.d.ts b/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/types/JoinLobbyResponse.d.ts index 8bd497430a..ec4d0a8ae4 100644 --- a/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/types/JoinLobbyResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/types/JoinLobbyResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface JoinLobbyResponse { lobby: Rivet.matchmaker.JoinLobby; ports: Record; diff --git a/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/types/ListLobbiesResponse.d.ts b/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/types/ListLobbiesResponse.d.ts index 5db3b6c743..867d51869f 100644 --- a/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/types/ListLobbiesResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/matchmaker/resources/lobbies/types/ListLobbiesResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface ListLobbiesResponse { gameModes: Rivet.matchmaker.GameModeInfo[]; regions: Rivet.matchmaker.RegionInfo[]; diff --git a/sdks/full/typescript/types/api/resources/matchmaker/resources/players/client/Client.d.ts b/sdks/full/typescript/types/api/resources/matchmaker/resources/players/client/Client.d.ts index 7d125dc7f2..6f28c1e309 100644 --- a/sdks/full/typescript/types/api/resources/matchmaker/resources/players/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/matchmaker/resources/players/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export declare namespace Players { interface Options { environment?: core.Supplier; @@ -11,8 +11,12 @@ export declare namespace Players { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Players { @@ -54,32 +58,56 @@ export declare class Players { * Otherwise, the player token will likely be automatically sent by the client * once the socket opens. As mentioned above, nothing else should happen until * the player token is validated. + * + * @param {Rivet.matchmaker.PlayerConnectedRequest} request + * @param {Players.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.players.connected({ + * playerToken: "string" + * }) */ connected(request: Rivet.matchmaker.PlayerConnectedRequest, requestOptions?: Players.RequestOptions): Promise; /** * Marks a player as disconnected. # Ghost Players If players are not marked as disconnected, lobbies will result with "ghost players" that the matchmaker thinks exist but are no longer connected to the lobby. + * + * @param {Rivet.matchmaker.PlayerDisconnectedRequest} request + * @param {Players.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.players.disconnected({ + * playerToken: "string" + * }) */ disconnected(request: Rivet.matchmaker.PlayerDisconnectedRequest, requestOptions?: Players.RequestOptions): Promise; /** * Gives matchmaker statistics about the players in game. + * + * @param {Players.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.players.getStatistics() */ getStatistics(requestOptions?: Players.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/matchmaker/resources/players/client/requests/PlayerConnectedRequest.d.ts b/sdks/full/typescript/types/api/resources/matchmaker/resources/players/client/requests/PlayerConnectedRequest.d.ts index 2b57f508db..8230ee1dff 100644 --- a/sdks/full/typescript/types/api/resources/matchmaker/resources/players/client/requests/PlayerConnectedRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/matchmaker/resources/players/client/requests/PlayerConnectedRequest.d.ts @@ -1,6 +1,12 @@ /** * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * playerToken: "string" + * } + */ export interface PlayerConnectedRequest { playerToken: string; } diff --git a/sdks/full/typescript/types/api/resources/matchmaker/resources/players/client/requests/PlayerDisconnectedRequest.d.ts b/sdks/full/typescript/types/api/resources/matchmaker/resources/players/client/requests/PlayerDisconnectedRequest.d.ts index e7db45c276..1e37ebdf77 100644 --- a/sdks/full/typescript/types/api/resources/matchmaker/resources/players/client/requests/PlayerDisconnectedRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/matchmaker/resources/players/client/requests/PlayerDisconnectedRequest.d.ts @@ -1,6 +1,12 @@ /** * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * playerToken: "string" + * } + */ export interface PlayerDisconnectedRequest { playerToken: string; } diff --git a/sdks/full/typescript/types/api/resources/matchmaker/resources/players/client/requests/index.d.ts b/sdks/full/typescript/types/api/resources/matchmaker/resources/players/client/requests/index.d.ts index 254ba86ed3..8dbaaea743 100644 --- a/sdks/full/typescript/types/api/resources/matchmaker/resources/players/client/requests/index.d.ts +++ b/sdks/full/typescript/types/api/resources/matchmaker/resources/players/client/requests/index.d.ts @@ -1,2 +1,2 @@ -export { PlayerConnectedRequest } from "./PlayerConnectedRequest"; -export { PlayerDisconnectedRequest } from "./PlayerDisconnectedRequest"; +export { type PlayerConnectedRequest } from "./PlayerConnectedRequest"; +export { type PlayerDisconnectedRequest } from "./PlayerDisconnectedRequest"; diff --git a/sdks/full/typescript/types/api/resources/matchmaker/resources/players/types/GameModeStatistics.d.ts b/sdks/full/typescript/types/api/resources/matchmaker/resources/players/types/GameModeStatistics.d.ts index b9f9dbf16e..831a896ecb 100644 --- a/sdks/full/typescript/types/api/resources/matchmaker/resources/players/types/GameModeStatistics.d.ts +++ b/sdks/full/typescript/types/api/resources/matchmaker/resources/players/types/GameModeStatistics.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GameModeStatistics { playerCount: number; regions: Record; diff --git a/sdks/full/typescript/types/api/resources/matchmaker/resources/players/types/GetStatisticsResponse.d.ts b/sdks/full/typescript/types/api/resources/matchmaker/resources/players/types/GetStatisticsResponse.d.ts index 905995cc68..0ce4871201 100644 --- a/sdks/full/typescript/types/api/resources/matchmaker/resources/players/types/GetStatisticsResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/matchmaker/resources/players/types/GetStatisticsResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GetStatisticsResponse { playerCount: number; gameModes: Record; diff --git a/sdks/full/typescript/types/api/resources/matchmaker/resources/regions/client/Client.d.ts b/sdks/full/typescript/types/api/resources/matchmaker/resources/regions/client/Client.d.ts index b4d18c7802..731ded1d62 100644 --- a/sdks/full/typescript/types/api/resources/matchmaker/resources/regions/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/matchmaker/resources/regions/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export declare namespace Regions { interface Options { environment?: core.Supplier; @@ -11,8 +11,12 @@ export declare namespace Regions { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Regions { @@ -22,12 +26,18 @@ export declare class Regions { * Returns a list of regions available to this namespace. * Regions are sorted by most optimal to least optimal. The player's IP address * is used to calculate the regions' optimality. + * + * @param {Regions.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.regions.list() */ list(requestOptions?: Regions.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/matchmaker/resources/regions/types/ListRegionsResponse.d.ts b/sdks/full/typescript/types/api/resources/matchmaker/resources/regions/types/ListRegionsResponse.d.ts index da104298e8..3979afb076 100644 --- a/sdks/full/typescript/types/api/resources/matchmaker/resources/regions/types/ListRegionsResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/matchmaker/resources/regions/types/ListRegionsResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface ListRegionsResponse { regions: Rivet.matchmaker.RegionInfo[]; } diff --git a/sdks/full/typescript/types/api/resources/portal/client/Client.d.ts b/sdks/full/typescript/types/api/resources/portal/client/Client.d.ts index dfe0317d55..48558d3a56 100644 --- a/sdks/full/typescript/types/api/resources/portal/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/portal/client/Client.d.ts @@ -11,8 +11,12 @@ export declare namespace Portal { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Portal { diff --git a/sdks/full/typescript/types/api/resources/portal/resources/common/types/NotificationRegisterService.d.ts b/sdks/full/typescript/types/api/resources/portal/resources/common/types/NotificationRegisterService.d.ts index 3207397763..2da383a8f7 100644 --- a/sdks/full/typescript/types/api/resources/portal/resources/common/types/NotificationRegisterService.d.ts +++ b/sdks/full/typescript/types/api/resources/portal/resources/common/types/NotificationRegisterService.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface NotificationRegisterService { firebase?: Rivet.portal.NotificationRegisterFirebaseService; } diff --git a/sdks/full/typescript/types/api/resources/portal/resources/games/client/Client.d.ts b/sdks/full/typescript/types/api/resources/portal/resources/games/client/Client.d.ts index b79b7e771a..1f590195a6 100644 --- a/sdks/full/typescript/types/api/resources/portal/resources/games/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/portal/resources/games/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export declare namespace Games { interface Options { environment?: core.Supplier; @@ -11,8 +11,12 @@ export declare namespace Games { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Games { @@ -20,12 +24,22 @@ export declare class Games { constructor(_options?: Games.Options); /** * Returns a game profile. + * + * @param {string} gameNameId - A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + * @param {Rivet.portal.GetGameProfileRequest} request + * @param {Games.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.portal.games.getGameProfile("string", { + * watchIndex: "string" + * }) */ getGameProfile(gameNameId: string, request?: Rivet.portal.GetGameProfileRequest, requestOptions?: Games.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/portal/resources/games/client/requests/GetGameProfileRequest.d.ts b/sdks/full/typescript/types/api/resources/portal/resources/games/client/requests/GetGameProfileRequest.d.ts index 9edaa69336..0f86272aad 100644 --- a/sdks/full/typescript/types/api/resources/portal/resources/games/client/requests/GetGameProfileRequest.d.ts +++ b/sdks/full/typescript/types/api/resources/portal/resources/games/client/requests/GetGameProfileRequest.d.ts @@ -1,6 +1,12 @@ /** * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * watchIndex: "string" + * } + */ export interface GetGameProfileRequest { /** * A query parameter denoting the requests watch index. diff --git a/sdks/full/typescript/types/api/resources/portal/resources/games/client/requests/index.d.ts b/sdks/full/typescript/types/api/resources/portal/resources/games/client/requests/index.d.ts index 881d9e0696..d504fe504b 100644 --- a/sdks/full/typescript/types/api/resources/portal/resources/games/client/requests/index.d.ts +++ b/sdks/full/typescript/types/api/resources/portal/resources/games/client/requests/index.d.ts @@ -1 +1 @@ -export { GetGameProfileRequest } from "./GetGameProfileRequest"; +export { type GetGameProfileRequest } from "./GetGameProfileRequest"; diff --git a/sdks/full/typescript/types/api/resources/portal/resources/games/types/GetGameProfileResponse.d.ts b/sdks/full/typescript/types/api/resources/portal/resources/games/types/GetGameProfileResponse.d.ts index c9669df04c..61d9a979fe 100644 --- a/sdks/full/typescript/types/api/resources/portal/resources/games/types/GetGameProfileResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/portal/resources/games/types/GetGameProfileResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GetGameProfileResponse { game: Rivet.game.Profile; watch: Rivet.WatchResponse; diff --git a/sdks/full/typescript/types/api/resources/portal/resources/games/types/GetSuggestedGamesResponse.d.ts b/sdks/full/typescript/types/api/resources/portal/resources/games/types/GetSuggestedGamesResponse.d.ts index 076e7af03c..62c314db2f 100644 --- a/sdks/full/typescript/types/api/resources/portal/resources/games/types/GetSuggestedGamesResponse.d.ts +++ b/sdks/full/typescript/types/api/resources/portal/resources/games/types/GetSuggestedGamesResponse.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GetSuggestedGamesResponse { /** A list of game summaries. */ games: Rivet.game.Summary[]; diff --git a/sdks/full/typescript/types/api/resources/provision/client/Client.d.ts b/sdks/full/typescript/types/api/resources/provision/client/Client.d.ts index eacf8de3af..5813622da0 100644 --- a/sdks/full/typescript/types/api/resources/provision/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/provision/client/Client.d.ts @@ -12,8 +12,12 @@ export declare namespace Provision { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Provision { diff --git a/sdks/full/typescript/types/api/resources/provision/resources/datacenters/client/Client.d.ts b/sdks/full/typescript/types/api/resources/provision/resources/datacenters/client/Client.d.ts index b7154a2f07..e5b1c424aa 100644 --- a/sdks/full/typescript/types/api/resources/provision/resources/datacenters/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/provision/resources/datacenters/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export declare namespace Datacenters { interface Options { environment?: core.Supplier; @@ -11,20 +11,30 @@ export declare namespace Datacenters { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Datacenters { protected readonly _options: Datacenters.Options; constructor(_options?: Datacenters.Options); /** + * @param {string} datacenterId + * @param {Datacenters.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.provision.datacenters.getTls("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ getTls(datacenterId: string, requestOptions?: Datacenters.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/api/resources/provision/resources/servers/client/Client.d.ts b/sdks/full/typescript/types/api/resources/provision/resources/servers/client/Client.d.ts index 7a73292ffe..135bc33a74 100644 --- a/sdks/full/typescript/types/api/resources/provision/resources/servers/client/Client.d.ts +++ b/sdks/full/typescript/types/api/resources/provision/resources/servers/client/Client.d.ts @@ -3,7 +3,7 @@ */ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export declare namespace Servers { interface Options { environment?: core.Supplier; @@ -11,20 +11,30 @@ export declare namespace Servers { fetcher?: core.FetchFunction; } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } export declare class Servers { protected readonly _options: Servers.Options; constructor(_options?: Servers.Options); /** + * @param {string} ip + * @param {Servers.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.provision.servers.getInfo("string") */ getInfo(ip: string, requestOptions?: Servers.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; diff --git a/sdks/full/typescript/types/core/fetcher/Fetcher.d.ts b/sdks/full/typescript/types/core/fetcher/Fetcher.d.ts index e92fc0ccbc..801c336517 100644 --- a/sdks/full/typescript/types/core/fetcher/Fetcher.d.ts +++ b/sdks/full/typescript/types/core/fetcher/Fetcher.d.ts @@ -6,12 +6,15 @@ export declare namespace Fetcher { method: string; contentType?: string; headers?: Record; - queryParameters?: Record; + queryParameters?: Record; body?: unknown; timeoutMs?: number; maxRetries?: number; withCredentials?: boolean; - responseType?: "json" | "blob" | "streaming"; + abortSignal?: AbortSignal; + requestType?: "json" | "file" | "bytes"; + responseType?: "json" | "blob" | "sse" | "streaming" | "text"; + duplex?: "half"; } type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError; interface FailedStatusCodeError { @@ -32,4 +35,5 @@ export declare namespace Fetcher { errorMessage: string; } } +export declare function fetcherImpl(args: Fetcher.Args): Promise>; export declare const fetcher: FetchFunction; diff --git a/sdks/full/typescript/types/core/index.d.ts b/sdks/full/typescript/types/core/index.d.ts index e2eb66e805..f0a8603dec 100644 --- a/sdks/full/typescript/types/core/index.d.ts +++ b/sdks/full/typescript/types/core/index.d.ts @@ -1,3 +1,4 @@ +export * from "./runtime"; export * from "./fetcher"; export * from "./auth"; export * as serialization from "./schemas"; diff --git a/sdks/full/typescript/types/core/schemas/Schema.d.ts b/sdks/full/typescript/types/core/schemas/Schema.d.ts index 2ab15fe8f7..66fd54db3d 100644 --- a/sdks/full/typescript/types/core/schemas/Schema.d.ts +++ b/sdks/full/typescript/types/core/schemas/Schema.d.ts @@ -1,12 +1,11 @@ import { SchemaUtils } from "./builders"; -import { MaybePromise } from "./utils/MaybePromise"; export declare type Schema = BaseSchema & SchemaUtils; export declare type inferRaw = S extends Schema ? Raw : never; export declare type inferParsed = S extends Schema ? Parsed : never; export interface BaseSchema { - parse: (raw: unknown, opts?: SchemaOptions) => MaybePromise>; - json: (parsed: unknown, opts?: SchemaOptions) => MaybePromise>; - getType: () => SchemaType | Promise; + parse: (raw: unknown, opts?: SchemaOptions) => MaybeValid; + json: (parsed: unknown, opts?: SchemaOptions) => MaybeValid; + getType: () => SchemaType | SchemaType; } export declare const SchemaType: { readonly DATE: "date"; @@ -78,4 +77,8 @@ export interface SchemaOptions { * helpful for zurg's internal debug logging. */ breadcrumbsPrefix?: string[]; + /** + * whether to send 'null' for optional properties explicitly set to 'undefined'. + */ + omitUndefined?: boolean; } diff --git a/sdks/full/typescript/types/core/schemas/builders/lazy/lazy.d.ts b/sdks/full/typescript/types/core/schemas/builders/lazy/lazy.d.ts index de56b26a5d..c5dc4f6e26 100644 --- a/sdks/full/typescript/types/core/schemas/builders/lazy/lazy.d.ts +++ b/sdks/full/typescript/types/core/schemas/builders/lazy/lazy.d.ts @@ -1,5 +1,5 @@ import { BaseSchema, Schema } from "../../Schema"; -export declare type SchemaGetter> = () => SchemaType | Promise; +export declare type SchemaGetter> = () => SchemaType; export declare function lazy(getter: SchemaGetter>): Schema; export declare function constructLazyBaseSchema(getter: SchemaGetter>): BaseSchema; -export declare function getMemoizedSchema>(getter: SchemaGetter): Promise; +export declare function getMemoizedSchema>(getter: SchemaGetter): SchemaType; diff --git a/sdks/full/typescript/types/core/schemas/builders/object/types.d.ts b/sdks/full/typescript/types/core/schemas/builders/object/types.d.ts index ded5165079..92dfdf5e20 100644 --- a/sdks/full/typescript/types/core/schemas/builders/object/types.d.ts +++ b/sdks/full/typescript/types/core/schemas/builders/object/types.d.ts @@ -5,8 +5,8 @@ import { SchemaUtils } from "../schema-utils"; import { Property } from "./property"; export declare type ObjectSchema = BaseObjectSchema & ObjectLikeUtils & ObjectUtils & SchemaUtils; export interface BaseObjectSchema extends BaseSchema { - _getRawProperties: () => Promise<(keyof Raw)[]>; - _getParsedProperties: () => Promise<(keyof Parsed)[]>; + _getRawProperties: () => (keyof Raw)[]; + _getParsedProperties: () => (keyof Parsed)[]; } export interface ObjectUtils { extend: (schemas: ObjectSchema) => ObjectSchema; diff --git a/sdks/full/typescript/types/core/schemas/builders/schema-utils/getSchemaUtils.d.ts b/sdks/full/typescript/types/core/schemas/builders/schema-utils/getSchemaUtils.d.ts index 7dc9af25a2..dfc074e274 100644 --- a/sdks/full/typescript/types/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +++ b/sdks/full/typescript/types/core/schemas/builders/schema-utils/getSchemaUtils.d.ts @@ -2,8 +2,8 @@ import { BaseSchema, Schema, SchemaOptions } from "../../Schema"; export interface SchemaUtils { optional: () => Schema; transform: (transformer: SchemaTransformer) => Schema; - parseOrThrow: (raw: unknown, opts?: SchemaOptions) => Promise; - jsonOrThrow: (raw: unknown, opts?: SchemaOptions) => Promise; + parseOrThrow: (raw: unknown, opts?: SchemaOptions) => Parsed; + jsonOrThrow: (raw: unknown, opts?: SchemaOptions) => Raw; } export interface SchemaTransformer { transform: (parsed: Parsed) => Transformed; diff --git a/sdks/full/typescript/types/index.d.ts b/sdks/full/typescript/types/index.d.ts index 2dae0b8f99..9e457779dd 100644 --- a/sdks/full/typescript/types/index.d.ts +++ b/sdks/full/typescript/types/index.d.ts @@ -2,7 +2,3 @@ export * as Rivet from "./api"; export { RivetClient } from "./Client"; export { RivetEnvironment } from "./environments"; export { RivetError, RivetTimeoutError } from "./errors"; -export * as core from "./core"; -export * as apiResponse from "./core/fetcher/APIResponse"; -export * as fetcher from "./core/fetcher"; -export * as serialization from "./serialization"; diff --git a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/BuildDeliveryMethod.d.ts b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/BuildDeliveryMethod.d.ts index 9dc93d4b84..8a91369b9a 100644 --- a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/BuildDeliveryMethod.d.ts +++ b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/BuildDeliveryMethod.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const BuildDeliveryMethod: core.serialization.Schema; export declare namespace BuildDeliveryMethod { diff --git a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Cluster.d.ts b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Cluster.d.ts index 19b21a5bf1..afc8f55f84 100644 --- a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Cluster.d.ts +++ b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Cluster.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const Cluster: core.serialization.ObjectSchema; export declare namespace Cluster { diff --git a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Datacenter.d.ts b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Datacenter.d.ts index ca4ec398c2..025b69d77d 100644 --- a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Datacenter.d.ts +++ b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Datacenter.d.ts @@ -1,9 +1,10 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { admin } from "../../../../../../index"; export declare const Datacenter: core.serialization.ObjectSchema; export declare namespace Datacenter { interface Raw { @@ -11,10 +12,10 @@ export declare namespace Datacenter { cluster_id: string; name_id: string; display_name: string; - provider: serializers.admin.clusters.Provider.Raw; + provider: admin.clusters.Provider.Raw; provider_datacenter_id: string; provider_api_token?: string | null; - pools: serializers.admin.clusters.Pool.Raw[]; - build_delivery_method: serializers.admin.clusters.BuildDeliveryMethod.Raw; + pools: admin.clusters.Pool.Raw[]; + build_delivery_method: admin.clusters.BuildDeliveryMethod.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Hardware.d.ts b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Hardware.d.ts index 04c56bb836..0e57bac276 100644 --- a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Hardware.d.ts +++ b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Hardware.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const Hardware: core.serialization.ObjectSchema; export declare namespace Hardware { diff --git a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Pool.d.ts b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Pool.d.ts index fdad214a51..ba3be9b637 100644 --- a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Pool.d.ts +++ b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Pool.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { admin } from "../../../../../../index"; export declare const Pool: core.serialization.ObjectSchema; export declare namespace Pool { interface Raw { - pool_type: serializers.admin.clusters.PoolType.Raw; - hardware: serializers.admin.clusters.Hardware.Raw[]; + pool_type: admin.clusters.PoolType.Raw; + hardware: admin.clusters.Hardware.Raw[]; desired_count: number; min_count: number; max_count: number; diff --git a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/PoolType.d.ts b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/PoolType.d.ts index 5a3817006c..29504f5ba5 100644 --- a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/PoolType.d.ts +++ b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/PoolType.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const PoolType: core.serialization.Schema; export declare namespace PoolType { diff --git a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Provider.d.ts b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Provider.d.ts index 6a345aad8c..8a76ef2195 100644 --- a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Provider.d.ts +++ b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Provider.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const Provider: core.serialization.Schema; export declare namespace Provider { diff --git a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Server.d.ts b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Server.d.ts index ce1e71296a..cd78962777 100644 --- a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Server.d.ts +++ b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/common/types/Server.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const Server: core.serialization.ObjectSchema; export declare namespace Server { diff --git a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/datacenters/types/CreateDatacenterRequest.d.ts b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/datacenters/types/CreateDatacenterRequest.d.ts index 8102b302c9..2677b16688 100644 --- a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/datacenters/types/CreateDatacenterRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/datacenters/types/CreateDatacenterRequest.d.ts @@ -1,17 +1,18 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { admin } from "../../../../../../index"; export declare const CreateDatacenterRequest: core.serialization.ObjectSchema; export declare namespace CreateDatacenterRequest { interface Raw { display_name: string; name_id: string; - provider: serializers.admin.clusters.Provider.Raw; + provider: admin.clusters.Provider.Raw; provider_datacenter_id: string; - build_delivery_method: serializers.admin.clusters.BuildDeliveryMethod.Raw; + build_delivery_method: admin.clusters.BuildDeliveryMethod.Raw; prebakes_enabled: boolean; } } diff --git a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/datacenters/types/CreateDatacenterResponse.d.ts b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/datacenters/types/CreateDatacenterResponse.d.ts index dbef2165f3..e44315d7b7 100644 --- a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/datacenters/types/CreateDatacenterResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/datacenters/types/CreateDatacenterResponse.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const CreateDatacenterResponse: core.serialization.ObjectSchema; export declare namespace CreateDatacenterResponse { diff --git a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/datacenters/types/ListDatacentersResponse.d.ts b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/datacenters/types/ListDatacentersResponse.d.ts index 1f612d201d..cd29421e93 100644 --- a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/datacenters/types/ListDatacentersResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/datacenters/types/ListDatacentersResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { admin } from "../../../../../../index"; export declare const ListDatacentersResponse: core.serialization.ObjectSchema; export declare namespace ListDatacentersResponse { interface Raw { - datacenters: serializers.admin.clusters.Datacenter.Raw[]; + datacenters: admin.clusters.Datacenter.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/datacenters/types/UpdateDatacenterRequest.d.ts b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/datacenters/types/UpdateDatacenterRequest.d.ts index e416579979..1c02cc859a 100644 --- a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/datacenters/types/UpdateDatacenterRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/datacenters/types/UpdateDatacenterRequest.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { admin } from "../../../../../../index"; export declare const UpdateDatacenterRequest: core.serialization.ObjectSchema; export declare namespace UpdateDatacenterRequest { interface Raw { - pools: serializers.admin.clusters.PoolUpdate.Raw[]; + pools: admin.clusters.PoolUpdate.Raw[]; prebakes_enabled?: boolean | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/servers/types/ListServersResponse.d.ts b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/servers/types/ListServersResponse.d.ts index 658a0f0d5c..d204e81b19 100644 --- a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/servers/types/ListServersResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/resources/servers/types/ListServersResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { admin } from "../../../../../../index"; export declare const ListServersResponse: core.serialization.ObjectSchema; export declare namespace ListServersResponse { interface Raw { - servers: serializers.admin.clusters.Server.Raw[]; + servers: admin.clusters.Server.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/types/CreateClusterRequest.d.ts b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/types/CreateClusterRequest.d.ts index d4a7708fc1..9eec4347a3 100644 --- a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/types/CreateClusterRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/types/CreateClusterRequest.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const CreateClusterRequest: core.serialization.ObjectSchema; export declare namespace CreateClusterRequest { diff --git a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/types/CreateClusterResponse.d.ts b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/types/CreateClusterResponse.d.ts index 1b1fdc418a..ab53c0d271 100644 --- a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/types/CreateClusterResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/types/CreateClusterResponse.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const CreateClusterResponse: core.serialization.ObjectSchema; export declare namespace CreateClusterResponse { diff --git a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/types/ListClustersResponse.d.ts b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/types/ListClustersResponse.d.ts index 5757714430..8b14f9fcf9 100644 --- a/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/types/ListClustersResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/admin/resources/clusters/types/ListClustersResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { admin } from "../../../../index"; export declare const ListClustersResponse: core.serialization.ObjectSchema; export declare namespace ListClustersResponse { interface Raw { - clusters: serializers.admin.clusters.Cluster.Raw[]; + clusters: admin.clusters.Cluster.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/admin/types/LoginRequest.d.ts b/sdks/full/typescript/types/serialization/resources/admin/types/LoginRequest.d.ts index dfd4ad9fd4..e9ab033d32 100644 --- a/sdks/full/typescript/types/serialization/resources/admin/types/LoginRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/admin/types/LoginRequest.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export declare const LoginRequest: core.serialization.ObjectSchema; export declare namespace LoginRequest { diff --git a/sdks/full/typescript/types/serialization/resources/admin/types/LoginResponse.d.ts b/sdks/full/typescript/types/serialization/resources/admin/types/LoginResponse.d.ts index 3ea1bd725b..932b2cb2bf 100644 --- a/sdks/full/typescript/types/serialization/resources/admin/types/LoginResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/admin/types/LoginResponse.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export declare const LoginResponse: core.serialization.ObjectSchema; export declare namespace LoginResponse { diff --git a/sdks/full/typescript/types/serialization/resources/auth/resources/common/types/CompleteStatus.d.ts b/sdks/full/typescript/types/serialization/resources/auth/resources/common/types/CompleteStatus.d.ts index df8950b14d..e22e3cbffc 100644 --- a/sdks/full/typescript/types/serialization/resources/auth/resources/common/types/CompleteStatus.d.ts +++ b/sdks/full/typescript/types/serialization/resources/auth/resources/common/types/CompleteStatus.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const CompleteStatus: core.serialization.Schema; export declare namespace CompleteStatus { diff --git a/sdks/full/typescript/types/serialization/resources/auth/resources/identity/resources/accessToken/types/CompleteAccessTokenVerificationRequest.d.ts b/sdks/full/typescript/types/serialization/resources/auth/resources/identity/resources/accessToken/types/CompleteAccessTokenVerificationRequest.d.ts index 16cf8a6d01..083bf62f34 100644 --- a/sdks/full/typescript/types/serialization/resources/auth/resources/identity/resources/accessToken/types/CompleteAccessTokenVerificationRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/auth/resources/identity/resources/accessToken/types/CompleteAccessTokenVerificationRequest.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { common } from "../../../../../../index"; export declare const CompleteAccessTokenVerificationRequest: core.serialization.ObjectSchema; export declare namespace CompleteAccessTokenVerificationRequest { interface Raw { - access_token: serializers.Jwt.Raw; + access_token: common.Jwt.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/auth/resources/identity/resources/email/types/CompleteEmailVerificationRequest.d.ts b/sdks/full/typescript/types/serialization/resources/auth/resources/identity/resources/email/types/CompleteEmailVerificationRequest.d.ts index 30f4abb2e7..9b4efdba60 100644 --- a/sdks/full/typescript/types/serialization/resources/auth/resources/identity/resources/email/types/CompleteEmailVerificationRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/auth/resources/identity/resources/email/types/CompleteEmailVerificationRequest.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const CompleteEmailVerificationRequest: core.serialization.ObjectSchema; export declare namespace CompleteEmailVerificationRequest { diff --git a/sdks/full/typescript/types/serialization/resources/auth/resources/identity/resources/email/types/CompleteEmailVerificationResponse.d.ts b/sdks/full/typescript/types/serialization/resources/auth/resources/identity/resources/email/types/CompleteEmailVerificationResponse.d.ts index 91880bd1d4..97495faad9 100644 --- a/sdks/full/typescript/types/serialization/resources/auth/resources/identity/resources/email/types/CompleteEmailVerificationResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/auth/resources/identity/resources/email/types/CompleteEmailVerificationResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { auth } from "../../../../../../index"; export declare const CompleteEmailVerificationResponse: core.serialization.ObjectSchema; export declare namespace CompleteEmailVerificationResponse { interface Raw { - status: serializers.auth.CompleteStatus.Raw; + status: auth.CompleteStatus.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/auth/resources/identity/resources/email/types/StartEmailVerificationRequest.d.ts b/sdks/full/typescript/types/serialization/resources/auth/resources/identity/resources/email/types/StartEmailVerificationRequest.d.ts index 9cebbe0467..148852118f 100644 --- a/sdks/full/typescript/types/serialization/resources/auth/resources/identity/resources/email/types/StartEmailVerificationRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/auth/resources/identity/resources/email/types/StartEmailVerificationRequest.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { captcha } from "../../../../../../index"; export declare const StartEmailVerificationRequest: core.serialization.ObjectSchema; export declare namespace StartEmailVerificationRequest { interface Raw { email: string; - captcha?: serializers.captcha.Config.Raw | null; + captcha?: captcha.Config.Raw | null; game_id?: string | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/auth/resources/identity/resources/email/types/StartEmailVerificationResponse.d.ts b/sdks/full/typescript/types/serialization/resources/auth/resources/identity/resources/email/types/StartEmailVerificationResponse.d.ts index 5de256c6d0..e5d138dc41 100644 --- a/sdks/full/typescript/types/serialization/resources/auth/resources/identity/resources/email/types/StartEmailVerificationResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/auth/resources/identity/resources/email/types/StartEmailVerificationResponse.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const StartEmailVerificationResponse: core.serialization.ObjectSchema; export declare namespace StartEmailVerificationResponse { diff --git a/sdks/full/typescript/types/serialization/resources/auth/resources/tokens/types/RefreshIdentityTokenRequest.d.ts b/sdks/full/typescript/types/serialization/resources/auth/resources/tokens/types/RefreshIdentityTokenRequest.d.ts index 4fd263a662..65694d725d 100644 --- a/sdks/full/typescript/types/serialization/resources/auth/resources/tokens/types/RefreshIdentityTokenRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/auth/resources/tokens/types/RefreshIdentityTokenRequest.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const RefreshIdentityTokenRequest: core.serialization.ObjectSchema; export declare namespace RefreshIdentityTokenRequest { diff --git a/sdks/full/typescript/types/serialization/resources/auth/resources/tokens/types/RefreshIdentityTokenResponse.d.ts b/sdks/full/typescript/types/serialization/resources/auth/resources/tokens/types/RefreshIdentityTokenResponse.d.ts index 139d7912ed..80bdf07df0 100644 --- a/sdks/full/typescript/types/serialization/resources/auth/resources/tokens/types/RefreshIdentityTokenResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/auth/resources/tokens/types/RefreshIdentityTokenResponse.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const RefreshIdentityTokenResponse: core.serialization.ObjectSchema; export declare namespace RefreshIdentityTokenResponse { diff --git a/sdks/full/typescript/types/serialization/resources/captcha/resources/config/types/Config.d.ts b/sdks/full/typescript/types/serialization/resources/captcha/resources/config/types/Config.d.ts index 9e5a118f6b..1774ffa45c 100644 --- a/sdks/full/typescript/types/serialization/resources/captcha/resources/config/types/Config.d.ts +++ b/sdks/full/typescript/types/serialization/resources/captcha/resources/config/types/Config.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { captcha } from "../../../../index"; export declare const Config: core.serialization.ObjectSchema; export declare namespace Config { interface Raw { - hcaptcha?: serializers.captcha.ConfigHcaptcha.Raw | null; - turnstile?: serializers.captcha.ConfigTurnstile.Raw | null; + hcaptcha?: captcha.ConfigHcaptcha.Raw | null; + turnstile?: captcha.ConfigTurnstile.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/captcha/resources/config/types/ConfigHcaptcha.d.ts b/sdks/full/typescript/types/serialization/resources/captcha/resources/config/types/ConfigHcaptcha.d.ts index 10cd97afb6..e295104371 100644 --- a/sdks/full/typescript/types/serialization/resources/captcha/resources/config/types/ConfigHcaptcha.d.ts +++ b/sdks/full/typescript/types/serialization/resources/captcha/resources/config/types/ConfigHcaptcha.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const ConfigHcaptcha: core.serialization.ObjectSchema; export declare namespace ConfigHcaptcha { diff --git a/sdks/full/typescript/types/serialization/resources/captcha/resources/config/types/ConfigTurnstile.d.ts b/sdks/full/typescript/types/serialization/resources/captcha/resources/config/types/ConfigTurnstile.d.ts index 03b3eb427d..c87e520498 100644 --- a/sdks/full/typescript/types/serialization/resources/captcha/resources/config/types/ConfigTurnstile.d.ts +++ b/sdks/full/typescript/types/serialization/resources/captcha/resources/config/types/ConfigTurnstile.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const ConfigTurnstile: core.serialization.ObjectSchema; export declare namespace ConfigTurnstile { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/auth/types/InspectResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/auth/types/InspectResponse.d.ts index bcc95aa9b6..fcc17a6ef7 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/auth/types/InspectResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/auth/types/InspectResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { cloud } from "../../../../index"; export declare const InspectResponse: core.serialization.ObjectSchema; export declare namespace InspectResponse { interface Raw { - agent: serializers.cloud.AuthAgent.Raw; + agent: cloud.AuthAgent.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/AuthAgent.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/AuthAgent.d.ts index 199018422c..da963e9255 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/AuthAgent.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/AuthAgent.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { cloud } from "../../../../index"; export declare const AuthAgent: core.serialization.ObjectSchema; export declare namespace AuthAgent { interface Raw { - identity?: serializers.cloud.AuthAgentIdentity.Raw | null; - game_cloud?: serializers.cloud.AuthAgentGameCloud.Raw | null; + identity?: cloud.AuthAgentIdentity.Raw | null; + game_cloud?: cloud.AuthAgentGameCloud.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/AuthAgentGameCloud.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/AuthAgentGameCloud.d.ts index 0e45867e08..98a54346f6 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/AuthAgentGameCloud.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/AuthAgentGameCloud.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const AuthAgentGameCloud: core.serialization.ObjectSchema; export declare namespace AuthAgentGameCloud { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/AuthAgentIdentity.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/AuthAgentIdentity.d.ts index c2e4e91bcc..370d22e67d 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/AuthAgentIdentity.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/AuthAgentIdentity.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const AuthAgentIdentity: core.serialization.ObjectSchema; export declare namespace AuthAgentIdentity { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/BuildSummary.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/BuildSummary.d.ts index 743b105c54..87ab52fbc3 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/BuildSummary.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/BuildSummary.d.ts @@ -1,16 +1,17 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common } from "../../../../index"; export declare const BuildSummary: core.serialization.ObjectSchema; export declare namespace BuildSummary { interface Raw { build_id: string; upload_id: string; - display_name: serializers.DisplayName.Raw; - create_ts: serializers.Timestamp.Raw; + display_name: common.DisplayName.Raw; + create_ts: common.Timestamp.Raw; content_length: number; complete: boolean; tags: Record; diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnAuthType.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnAuthType.d.ts index 488dd38dba..1f35021702 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnAuthType.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnAuthType.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const CdnAuthType: core.serialization.Schema; export declare namespace CdnAuthType { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnNamespaceAuthUser.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnNamespaceAuthUser.d.ts index 37b5c9d153..e852cb521c 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnNamespaceAuthUser.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnNamespaceAuthUser.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const CdnNamespaceAuthUser: core.serialization.ObjectSchema; export declare namespace CdnNamespaceAuthUser { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnNamespaceConfig.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnNamespaceConfig.d.ts index f552a12104..c32246c583 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnNamespaceConfig.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnNamespaceConfig.d.ts @@ -1,15 +1,16 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { cloud } from "../../../../index"; export declare const CdnNamespaceConfig: core.serialization.ObjectSchema; export declare namespace CdnNamespaceConfig { interface Raw { enable_domain_public_auth: boolean; - domains: serializers.cloud.CdnNamespaceDomain.Raw[]; - auth_type: serializers.cloud.CdnAuthType.Raw; - auth_user_list: serializers.cloud.CdnNamespaceAuthUser.Raw[]; + domains: cloud.CdnNamespaceDomain.Raw[]; + auth_type: cloud.CdnAuthType.Raw; + auth_user_list: cloud.CdnNamespaceAuthUser.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnNamespaceDomain.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnNamespaceDomain.d.ts index a513b9f301..30c482bc8c 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnNamespaceDomain.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnNamespaceDomain.d.ts @@ -1,16 +1,17 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common, cloud } from "../../../../index"; export declare const CdnNamespaceDomain: core.serialization.ObjectSchema; export declare namespace CdnNamespaceDomain { interface Raw { domain: string; - create_ts: serializers.Timestamp.Raw; - verification_status: serializers.cloud.CdnNamespaceDomainVerificationStatus.Raw; - verification_method: serializers.cloud.CdnNamespaceDomainVerificationMethod.Raw; + create_ts: common.Timestamp.Raw; + verification_status: cloud.CdnNamespaceDomainVerificationStatus.Raw; + verification_method: cloud.CdnNamespaceDomainVerificationMethod.Raw; verification_errors: string[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationMethod.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationMethod.d.ts index b62d5abdec..0146e0e018 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationMethod.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationMethod.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common, cloud } from "../../../../index"; export declare const CdnNamespaceDomainVerificationMethod: core.serialization.ObjectSchema; export declare namespace CdnNamespaceDomainVerificationMethod { interface Raw { - invalid?: serializers.EmptyObject.Raw | null; - http?: serializers.cloud.CdnNamespaceDomainVerificationMethodHttp.Raw | null; + invalid?: common.EmptyObject.Raw | null; + http?: cloud.CdnNamespaceDomainVerificationMethodHttp.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationMethodHttp.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationMethodHttp.d.ts index 0bc8bcdd46..643cb78228 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationMethodHttp.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationMethodHttp.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const CdnNamespaceDomainVerificationMethodHttp: core.serialization.ObjectSchema; export declare namespace CdnNamespaceDomainVerificationMethodHttp { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationStatus.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationStatus.d.ts index 2fa81848fa..54b1cbda38 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationStatus.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnNamespaceDomainVerificationStatus.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const CdnNamespaceDomainVerificationStatus: core.serialization.Schema; export declare namespace CdnNamespaceDomainVerificationStatus { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnSiteSummary.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnSiteSummary.d.ts index 2963d449ac..448c4c75df 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnSiteSummary.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CdnSiteSummary.d.ts @@ -1,16 +1,17 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common } from "../../../../index"; export declare const CdnSiteSummary: core.serialization.ObjectSchema; export declare namespace CdnSiteSummary { interface Raw { site_id: string; upload_id: string; - display_name: serializers.DisplayName.Raw; - create_ts: serializers.Timestamp.Raw; + display_name: common.DisplayName.Raw; + create_ts: common.Timestamp.Raw; content_length: number; complete: boolean; } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CustomAvatarSummary.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CustomAvatarSummary.d.ts index 247e54abd0..edcdeb8f07 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CustomAvatarSummary.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/CustomAvatarSummary.d.ts @@ -1,15 +1,16 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common } from "../../../../index"; export declare const CustomAvatarSummary: core.serialization.ObjectSchema; export declare namespace CustomAvatarSummary { interface Raw { upload_id: string; - display_name: serializers.DisplayName.Raw; - create_ts: serializers.Timestamp.Raw; + display_name: common.DisplayName.Raw; + create_ts: common.Timestamp.Raw; url?: string | null; content_length: number; complete: boolean; diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/GameFull.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/GameFull.d.ts index 8ab2488074..5169c0b812 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/GameFull.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/GameFull.d.ts @@ -1,22 +1,23 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common, cloud } from "../../../../index"; export declare const GameFull: core.serialization.ObjectSchema; export declare namespace GameFull { interface Raw { game_id: string; - create_ts: serializers.Timestamp.Raw; + create_ts: common.Timestamp.Raw; name_id: string; - display_name: serializers.DisplayName.Raw; + display_name: common.DisplayName.Raw; developer_group_id: string; total_player_count: number; logo_url?: string | null; banner_url?: string | null; - namespaces: serializers.cloud.NamespaceSummary.Raw[]; - versions: serializers.cloud.version.Summary.Raw[]; - available_regions: serializers.cloud.RegionSummary.Raw[]; + namespaces: cloud.NamespaceSummary.Raw[]; + versions: cloud.version.Summary.Raw[]; + available_regions: cloud.RegionSummary.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/GameLobbyExpenses.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/GameLobbyExpenses.d.ts index df669c18d4..99eae6e343 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/GameLobbyExpenses.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/GameLobbyExpenses.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { game, cloud } from "../../../../index"; export declare const GameLobbyExpenses: core.serialization.ObjectSchema; export declare namespace GameLobbyExpenses { interface Raw { - game: serializers.game.Handle.Raw; - namespaces: serializers.cloud.NamespaceSummary.Raw[]; - expenses: serializers.cloud.RegionTierExpenses.Raw[]; + game: game.Handle.Raw; + namespaces: cloud.NamespaceSummary.Raw[]; + expenses: cloud.RegionTierExpenses.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/GroupBankSource.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/GroupBankSource.d.ts index c45202dc70..fe486147fd 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/GroupBankSource.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/GroupBankSource.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const GroupBankSource: core.serialization.ObjectSchema; export declare namespace GroupBankSource { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/IdentityNamespaceConfig.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/IdentityNamespaceConfig.d.ts index 791676879e..75e01f5be2 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/IdentityNamespaceConfig.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/IdentityNamespaceConfig.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const IdentityNamespaceConfig: core.serialization.ObjectSchema; export declare namespace IdentityNamespaceConfig { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/KvNamespaceConfig.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/KvNamespaceConfig.d.ts index 6ddc8d1f03..879c1a54e4 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/KvNamespaceConfig.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/KvNamespaceConfig.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const KvNamespaceConfig: core.serialization.ObjectSchema; export declare namespace KvNamespaceConfig { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/LobbySummaryAnalytics.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/LobbySummaryAnalytics.d.ts index 6976f97828..563a2d2bac 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/LobbySummaryAnalytics.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/LobbySummaryAnalytics.d.ts @@ -1,9 +1,10 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common } from "../../../../index"; export declare const LobbySummaryAnalytics: core.serialization.ObjectSchema; export declare namespace LobbySummaryAnalytics { interface Raw { @@ -11,7 +12,7 @@ export declare namespace LobbySummaryAnalytics { lobby_group_id: string; lobby_group_name_id: string; region_id: string; - create_ts: serializers.Timestamp.Raw; + create_ts: common.Timestamp.Raw; is_ready: boolean; is_idle: boolean; is_closed: boolean; diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/LogsLobbyStatus.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/LogsLobbyStatus.d.ts index 88db3b95e5..be3f9c51f0 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/LogsLobbyStatus.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/LogsLobbyStatus.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common, cloud } from "../../../../index"; export declare const LogsLobbyStatus: core.serialization.ObjectSchema; export declare namespace LogsLobbyStatus { interface Raw { - running: serializers.EmptyObject.Raw; - stopped?: serializers.cloud.LogsLobbyStatusStopped.Raw | null; + running: common.EmptyObject.Raw; + stopped?: cloud.LogsLobbyStatusStopped.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/LogsLobbyStatusStopped.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/LogsLobbyStatusStopped.d.ts index a7ca973692..5ba3121b28 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/LogsLobbyStatusStopped.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/LogsLobbyStatusStopped.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common } from "../../../../index"; export declare const LogsLobbyStatusStopped: core.serialization.ObjectSchema; export declare namespace LogsLobbyStatusStopped { interface Raw { - stop_ts: serializers.Timestamp.Raw; + stop_ts: common.Timestamp.Raw; failed: boolean; exit_code: number; } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/LogsLobbySummary.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/LogsLobbySummary.d.ts index 679b72aef7..b570011ed5 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/LogsLobbySummary.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/LogsLobbySummary.d.ts @@ -1,9 +1,10 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common, cloud } from "../../../../index"; export declare const LogsLobbySummary: core.serialization.ObjectSchema; export declare namespace LogsLobbySummary { interface Raw { @@ -11,9 +12,9 @@ export declare namespace LogsLobbySummary { namespace_id: string; lobby_group_name_id: string; region_id: string; - create_ts: serializers.Timestamp.Raw; - start_ts?: serializers.Timestamp.Raw | null; - ready_ts?: serializers.Timestamp.Raw | null; - status: serializers.cloud.LogsLobbyStatus.Raw; + create_ts: common.Timestamp.Raw; + start_ts?: common.Timestamp.Raw | null; + ready_ts?: common.Timestamp.Raw | null; + status: cloud.LogsLobbyStatus.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/LogsPerfMark.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/LogsPerfMark.d.ts index 34fce915a8..dcc7cb9ddf 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/LogsPerfMark.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/LogsPerfMark.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common } from "../../../../index"; export declare const LogsPerfMark: core.serialization.ObjectSchema; export declare namespace LogsPerfMark { interface Raw { label: string; - ts: serializers.Timestamp.Raw; + ts: common.Timestamp.Raw; ray_id?: string | null; req_id?: string | null; } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/LogsPerfSpan.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/LogsPerfSpan.d.ts index f4d537bde0..c1d085b805 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/LogsPerfSpan.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/LogsPerfSpan.d.ts @@ -1,15 +1,16 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common } from "../../../../index"; export declare const LogsPerfSpan: core.serialization.ObjectSchema; export declare namespace LogsPerfSpan { interface Raw { label: string; - start_ts: serializers.Timestamp.Raw; - finish_ts?: serializers.Timestamp.Raw | null; + start_ts: common.Timestamp.Raw; + finish_ts?: common.Timestamp.Raw | null; req_id?: string | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/MatchmakerDevelopmentPort.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/MatchmakerDevelopmentPort.d.ts index f0090a5d81..bd772f7eba 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/MatchmakerDevelopmentPort.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/MatchmakerDevelopmentPort.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { cloud } from "../../../../index"; export declare const MatchmakerDevelopmentPort: core.serialization.ObjectSchema; export declare namespace MatchmakerDevelopmentPort { interface Raw { port?: number | null; - port_range?: serializers.cloud.version.matchmaker.PortRange.Raw | null; - protocol: serializers.cloud.version.matchmaker.PortProtocol.Raw; + port_range?: cloud.version.matchmaker.PortRange.Raw | null; + protocol: cloud.version.matchmaker.PortProtocol.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/MatchmakerNamespaceConfig.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/MatchmakerNamespaceConfig.d.ts index c9091304ee..dbb16f425e 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/MatchmakerNamespaceConfig.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/MatchmakerNamespaceConfig.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const MatchmakerNamespaceConfig: core.serialization.ObjectSchema; export declare namespace MatchmakerNamespaceConfig { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/NamespaceConfig.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/NamespaceConfig.d.ts index da6df182b5..01c918735d 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/NamespaceConfig.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/NamespaceConfig.d.ts @@ -1,15 +1,16 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { cloud } from "../../../../index"; export declare const NamespaceConfig: core.serialization.ObjectSchema; export declare namespace NamespaceConfig { interface Raw { - cdn: serializers.cloud.CdnNamespaceConfig.Raw; - matchmaker: serializers.cloud.MatchmakerNamespaceConfig.Raw; - kv: serializers.cloud.KvNamespaceConfig.Raw; - identity: serializers.cloud.IdentityNamespaceConfig.Raw; + cdn: cloud.CdnNamespaceConfig.Raw; + matchmaker: cloud.MatchmakerNamespaceConfig.Raw; + kv: cloud.KvNamespaceConfig.Raw; + identity: cloud.IdentityNamespaceConfig.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/NamespaceFull.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/NamespaceFull.d.ts index 8f8af215d0..7e1165736f 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/NamespaceFull.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/NamespaceFull.d.ts @@ -1,17 +1,18 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common, cloud } from "../../../../index"; export declare const NamespaceFull: core.serialization.ObjectSchema; export declare namespace NamespaceFull { interface Raw { namespace_id: string; - create_ts: serializers.Timestamp.Raw; - display_name: serializers.DisplayName.Raw; + create_ts: common.Timestamp.Raw; + display_name: common.DisplayName.Raw; version_id: string; name_id: string; - config: serializers.cloud.NamespaceConfig.Raw; + config: cloud.NamespaceConfig.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/NamespaceSummary.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/NamespaceSummary.d.ts index b56183057e..8fb4ebd52e 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/NamespaceSummary.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/NamespaceSummary.d.ts @@ -1,15 +1,16 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common } from "../../../../index"; export declare const NamespaceSummary: core.serialization.ObjectSchema; export declare namespace NamespaceSummary { interface Raw { namespace_id: string; - create_ts: serializers.Timestamp.Raw; - display_name: serializers.DisplayName.Raw; + create_ts: common.Timestamp.Raw; + display_name: common.DisplayName.Raw; version_id: string; name_id: string; } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/NamespaceVersion.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/NamespaceVersion.d.ts index 1411a32a01..7bdaf0fd88 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/NamespaceVersion.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/NamespaceVersion.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common } from "../../../../index"; export declare const NamespaceVersion: core.serialization.ObjectSchema; export declare namespace NamespaceVersion { interface Raw { namespace_id: string; version_id: string; - deploy_ts: serializers.Timestamp.Raw; + deploy_ts: common.Timestamp.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/RegionSummary.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/RegionSummary.d.ts index 270516ee24..8917e29046 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/RegionSummary.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/RegionSummary.d.ts @@ -1,17 +1,18 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { cloud, common } from "../../../../index"; export declare const RegionSummary: core.serialization.ObjectSchema; export declare namespace RegionSummary { interface Raw { region_id: string; region_name_id: string; provider: string; - universal_region: serializers.cloud.UniversalRegion.Raw; - provider_display_name: serializers.DisplayName.Raw; - region_display_name: serializers.DisplayName.Raw; + universal_region: cloud.UniversalRegion.Raw; + provider_display_name: common.DisplayName.Raw; + region_display_name: common.DisplayName.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/RegionTier.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/RegionTier.d.ts index f4ebff5117..95dc40e99d 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/RegionTier.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/RegionTier.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const RegionTier: core.serialization.ObjectSchema; export declare namespace RegionTier { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/RegionTierExpenses.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/RegionTierExpenses.d.ts index 9123765b2c..06bacaa3fd 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/RegionTierExpenses.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/RegionTierExpenses.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const RegionTierExpenses: core.serialization.ObjectSchema; export declare namespace RegionTierExpenses { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/SvcMetrics.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/SvcMetrics.d.ts index 41fb77ea36..8192cf2d54 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/SvcMetrics.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/SvcMetrics.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const SvcMetrics: core.serialization.ObjectSchema; export declare namespace SvcMetrics { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/SvcPerf.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/SvcPerf.d.ts index 6065d04790..42e84225be 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/SvcPerf.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/SvcPerf.d.ts @@ -1,17 +1,18 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common, cloud } from "../../../../index"; export declare const SvcPerf: core.serialization.ObjectSchema; export declare namespace SvcPerf { interface Raw { svc_name: string; - ts: serializers.Timestamp.Raw; + ts: common.Timestamp.Raw; duration: number; req_id?: string | null; - spans: serializers.cloud.LogsPerfSpan.Raw[]; - marks: serializers.cloud.LogsPerfMark.Raw[]; + spans: cloud.LogsPerfSpan.Raw[]; + marks: cloud.LogsPerfMark.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/UniversalRegion.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/UniversalRegion.d.ts index 50533b9e98..93aab4f53c 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/UniversalRegion.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/common/types/UniversalRegion.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const UniversalRegion: core.serialization.Schema; export declare namespace UniversalRegion { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/devices/resources/links/types/CompleteDeviceLinkRequest.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/devices/resources/links/types/CompleteDeviceLinkRequest.d.ts index 0c2e69920d..fd52691277 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/devices/resources/links/types/CompleteDeviceLinkRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/devices/resources/links/types/CompleteDeviceLinkRequest.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { common } from "../../../../../../index"; export declare const CompleteDeviceLinkRequest: core.serialization.ObjectSchema; export declare namespace CompleteDeviceLinkRequest { interface Raw { - device_link_token: serializers.Jwt.Raw; + device_link_token: common.Jwt.Raw; game_id: string; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/devices/resources/links/types/GetDeviceLinkResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/devices/resources/links/types/GetDeviceLinkResponse.d.ts index 314ce5e447..d0f966d888 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/devices/resources/links/types/GetDeviceLinkResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/devices/resources/links/types/GetDeviceLinkResponse.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { common } from "../../../../../../index"; export declare const GetDeviceLinkResponse: core.serialization.ObjectSchema; export declare namespace GetDeviceLinkResponse { interface Raw { cloud_token?: string | null; - watch: serializers.WatchResponse.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/devices/resources/links/types/PrepareDeviceLinkResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/devices/resources/links/types/PrepareDeviceLinkResponse.d.ts index cb11149ce2..e636b15344 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/devices/resources/links/types/PrepareDeviceLinkResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/devices/resources/links/types/PrepareDeviceLinkResponse.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const PrepareDeviceLinkResponse: core.serialization.ObjectSchema; export declare namespace PrepareDeviceLinkResponse { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/avatars/types/ListGameCustomAvatarsResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/avatars/types/ListGameCustomAvatarsResponse.d.ts index dc0607fa0f..d56618690c 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/avatars/types/ListGameCustomAvatarsResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/avatars/types/ListGameCustomAvatarsResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { cloud } from "../../../../../../index"; export declare const ListGameCustomAvatarsResponse: core.serialization.ObjectSchema; export declare namespace ListGameCustomAvatarsResponse { interface Raw { - custom_avatars: serializers.cloud.CustomAvatarSummary.Raw[]; + custom_avatars: cloud.CustomAvatarSummary.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/avatars/types/PrepareCustomAvatarUploadRequest.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/avatars/types/PrepareCustomAvatarUploadRequest.d.ts index 820e4803e4..4d55b35e1c 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/avatars/types/PrepareCustomAvatarUploadRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/avatars/types/PrepareCustomAvatarUploadRequest.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const PrepareCustomAvatarUploadRequest: core.serialization.ObjectSchema; export declare namespace PrepareCustomAvatarUploadRequest { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/avatars/types/PrepareCustomAvatarUploadResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/avatars/types/PrepareCustomAvatarUploadResponse.d.ts index 0671c8153a..d55a949fd1 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/avatars/types/PrepareCustomAvatarUploadResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/avatars/types/PrepareCustomAvatarUploadResponse.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { upload } from "../../../../../../index"; export declare const PrepareCustomAvatarUploadResponse: core.serialization.ObjectSchema; export declare namespace PrepareCustomAvatarUploadResponse { interface Raw { upload_id: string; - presigned_request: serializers.upload.PresignedRequest.Raw; + presigned_request: upload.PresignedRequest.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/builds/types/BuildCompression.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/builds/types/BuildCompression.d.ts index 08547c4351..dc7f7994eb 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/builds/types/BuildCompression.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/builds/types/BuildCompression.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const BuildCompression: core.serialization.Schema; export declare namespace BuildCompression { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/builds/types/BuildKind.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/builds/types/BuildKind.d.ts index 1cb3a8710a..d38d56375d 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/builds/types/BuildKind.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/builds/types/BuildKind.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const BuildKind: core.serialization.Schema; export declare namespace BuildKind { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/builds/types/CreateGameBuildRequest.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/builds/types/CreateGameBuildRequest.d.ts index 6f6d147e3e..a3dfae5694 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/builds/types/CreateGameBuildRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/builds/types/CreateGameBuildRequest.d.ts @@ -1,17 +1,18 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { common, upload, cloud } from "../../../../../../index"; export declare const CreateGameBuildRequest: core.serialization.ObjectSchema; export declare namespace CreateGameBuildRequest { interface Raw { - display_name: serializers.DisplayName.Raw; + display_name: common.DisplayName.Raw; image_tag: string; - image_file: serializers.upload.PrepareFile.Raw; + image_file: upload.PrepareFile.Raw; multipart_upload?: boolean | null; - kind?: serializers.cloud.games.BuildKind.Raw | null; - compression?: serializers.cloud.games.BuildCompression.Raw | null; + kind?: cloud.games.BuildKind.Raw | null; + compression?: cloud.games.BuildCompression.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/builds/types/CreateGameBuildResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/builds/types/CreateGameBuildResponse.d.ts index 0777520280..15ac02fe3a 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/builds/types/CreateGameBuildResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/builds/types/CreateGameBuildResponse.d.ts @@ -1,15 +1,16 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { upload } from "../../../../../../index"; export declare const CreateGameBuildResponse: core.serialization.ObjectSchema; export declare namespace CreateGameBuildResponse { interface Raw { build_id: string; upload_id: string; - image_presigned_request?: serializers.upload.PresignedRequest.Raw | null; - image_presigned_requests?: serializers.upload.PresignedRequest.Raw[] | null; + image_presigned_request?: upload.PresignedRequest.Raw | null; + image_presigned_requests?: upload.PresignedRequest.Raw[] | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/builds/types/ListGameBuildsResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/builds/types/ListGameBuildsResponse.d.ts index 9850e75915..3b6bf3ea15 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/builds/types/ListGameBuildsResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/builds/types/ListGameBuildsResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { cloud } from "../../../../../../index"; export declare const ListGameBuildsResponse: core.serialization.ObjectSchema; export declare namespace ListGameBuildsResponse { interface Raw { - builds: serializers.cloud.BuildSummary.Raw[]; + builds: cloud.BuildSummary.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteRequest.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteRequest.d.ts index 6fdc351e24..5118d64b8f 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteRequest.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { common, upload } from "../../../../../../index"; export declare const CreateGameCdnSiteRequest: core.serialization.ObjectSchema; export declare namespace CreateGameCdnSiteRequest { interface Raw { - display_name: serializers.DisplayName.Raw; - files: serializers.upload.PrepareFile.Raw[]; + display_name: common.DisplayName.Raw; + files: upload.PrepareFile.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteResponse.d.ts index fc8be499b3..6505a3d41a 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/cdn/types/CreateGameCdnSiteResponse.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { upload } from "../../../../../../index"; export declare const CreateGameCdnSiteResponse: core.serialization.ObjectSchema; export declare namespace CreateGameCdnSiteResponse { interface Raw { site_id: string; upload_id: string; - presigned_requests: serializers.upload.PresignedRequest.Raw[]; + presigned_requests: upload.PresignedRequest.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/cdn/types/ListGameCdnSitesResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/cdn/types/ListGameCdnSitesResponse.d.ts index 7d5d1c0568..0cad67379d 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/cdn/types/ListGameCdnSitesResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/cdn/types/ListGameCdnSitesResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { cloud } from "../../../../../../index"; export declare const ListGameCdnSitesResponse: core.serialization.ObjectSchema; export declare namespace ListGameCdnSitesResponse { interface Raw { - sites: serializers.cloud.CdnSiteSummary.Raw[]; + sites: cloud.CdnSiteSummary.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/DeleteMatchmakerLobbyResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/DeleteMatchmakerLobbyResponse.d.ts index 6de046a225..87748f5988 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/DeleteMatchmakerLobbyResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/DeleteMatchmakerLobbyResponse.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const DeleteMatchmakerLobbyResponse: core.serialization.ObjectSchema; export declare namespace DeleteMatchmakerLobbyResponse { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportLobbyLogsRequest.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportLobbyLogsRequest.d.ts index 9e97d5b935..5da4873e26 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportLobbyLogsRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportLobbyLogsRequest.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { cloud } from "../../../../../../index"; export declare const ExportLobbyLogsRequest: core.serialization.ObjectSchema; export declare namespace ExportLobbyLogsRequest { interface Raw { - stream: serializers.cloud.games.LogStream.Raw; + stream: cloud.games.LogStream.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportLobbyLogsResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportLobbyLogsResponse.d.ts index 41dd74146b..f206beed6a 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportLobbyLogsResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportLobbyLogsResponse.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const ExportLobbyLogsResponse: core.serialization.ObjectSchema; export declare namespace ExportLobbyLogsResponse { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportMatchmakerLobbyHistoryRequest.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportMatchmakerLobbyHistoryRequest.d.ts index a905cbc5e1..46ca408b72 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportMatchmakerLobbyHistoryRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportMatchmakerLobbyHistoryRequest.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const ExportMatchmakerLobbyHistoryRequest: core.serialization.ObjectSchema; export declare namespace ExportMatchmakerLobbyHistoryRequest { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportMatchmakerLobbyHistoryResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportMatchmakerLobbyHistoryResponse.d.ts index c688b81a30..0d225d7b44 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportMatchmakerLobbyHistoryResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/ExportMatchmakerLobbyHistoryResponse.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const ExportMatchmakerLobbyHistoryResponse: core.serialization.ObjectSchema; export declare namespace ExportMatchmakerLobbyHistoryResponse { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/GetLobbyLogsResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/GetLobbyLogsResponse.d.ts index 5f85cd3c93..4288d3c879 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/GetLobbyLogsResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/GetLobbyLogsResponse.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { common } from "../../../../../../index"; export declare const GetLobbyLogsResponse: core.serialization.ObjectSchema; export declare namespace GetLobbyLogsResponse { interface Raw { lines: string[]; timestamps: string[]; - watch: serializers.WatchResponse.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/LogStream.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/LogStream.d.ts index 62ebe1a83b..f1e6142f9d 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/LogStream.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/matchmaker/types/LogStream.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const LogStream: core.serialization.Schema; export declare namespace LogStream { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/resources/analytics/types/GetAnalyticsMatchmakerLiveResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/resources/analytics/types/GetAnalyticsMatchmakerLiveResponse.d.ts index e9ca487977..026890fc2c 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/resources/analytics/types/GetAnalyticsMatchmakerLiveResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/resources/analytics/types/GetAnalyticsMatchmakerLiveResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { cloud } from "../../../../../../../../index"; export declare const GetAnalyticsMatchmakerLiveResponse: core.serialization.ObjectSchema; export declare namespace GetAnalyticsMatchmakerLiveResponse { interface Raw { - lobbies: serializers.cloud.LobbySummaryAnalytics.Raw[]; + lobbies: cloud.LobbySummaryAnalytics.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/resources/logs/types/GetNamespaceLobbyResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/resources/logs/types/GetNamespaceLobbyResponse.d.ts index 7af76e0f14..e318190332 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/resources/logs/types/GetNamespaceLobbyResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/resources/logs/types/GetNamespaceLobbyResponse.d.ts @@ -1,16 +1,17 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { cloud } from "../../../../../../../../index"; export declare const GetNamespaceLobbyResponse: core.serialization.ObjectSchema; export declare namespace GetNamespaceLobbyResponse { interface Raw { - lobby: serializers.cloud.LogsLobbySummary.Raw; - metrics?: serializers.cloud.SvcMetrics.Raw | null; + lobby: cloud.LogsLobbySummary.Raw; + metrics?: cloud.SvcMetrics.Raw | null; stdout_presigned_urls: string[]; stderr_presigned_urls: string[]; - perf_lists: serializers.cloud.SvcPerf.Raw[]; + perf_lists: cloud.SvcPerf.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/resources/logs/types/ListNamespaceLobbiesResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/resources/logs/types/ListNamespaceLobbiesResponse.d.ts index 942d1213e6..2f46f21ace 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/resources/logs/types/ListNamespaceLobbiesResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/resources/logs/types/ListNamespaceLobbiesResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { cloud } from "../../../../../../../../index"; export declare const ListNamespaceLobbiesResponse: core.serialization.ObjectSchema; export declare namespace ListNamespaceLobbiesResponse { interface Raw { - lobbies: serializers.cloud.LogsLobbySummary.Raw[]; + lobbies: cloud.LogsLobbySummary.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/AddNamespaceDomainRequest.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/AddNamespaceDomainRequest.d.ts index d0a1c29e23..9558fb4c46 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/AddNamespaceDomainRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/AddNamespaceDomainRequest.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const AddNamespaceDomainRequest: core.serialization.ObjectSchema; export declare namespace AddNamespaceDomainRequest { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceRequest.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceRequest.d.ts index 7ff7ef6841..d23fac134d 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceRequest.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { common } from "../../../../../../index"; export declare const CreateGameNamespaceRequest: core.serialization.ObjectSchema; export declare namespace CreateGameNamespaceRequest { interface Raw { - display_name: serializers.DisplayName.Raw; + display_name: common.DisplayName.Raw; version_id: string; name_id: string; } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceResponse.d.ts index 248f727d19..a1da59778e 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceResponse.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const CreateGameNamespaceResponse: core.serialization.ObjectSchema; export declare namespace CreateGameNamespaceResponse { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenDevelopmentRequest.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenDevelopmentRequest.d.ts index d0ef4a4f88..6514ea96e5 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenDevelopmentRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenDevelopmentRequest.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { cloud } from "../../../../../../index"; export declare const CreateGameNamespaceTokenDevelopmentRequest: core.serialization.ObjectSchema; export declare namespace CreateGameNamespaceTokenDevelopmentRequest { interface Raw { hostname: string; - ports?: Record | null; - lobby_ports?: serializers.cloud.version.matchmaker.LobbyGroupRuntimeDockerPort.Raw[] | null; + ports?: Record | null; + lobby_ports?: cloud.version.matchmaker.LobbyGroupRuntimeDockerPort.Raw[] | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenDevelopmentResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenDevelopmentResponse.d.ts index 9570c58a7b..58f268346c 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenDevelopmentResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenDevelopmentResponse.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const CreateGameNamespaceTokenDevelopmentResponse: core.serialization.ObjectSchema; export declare namespace CreateGameNamespaceTokenDevelopmentResponse { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenPublicResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenPublicResponse.d.ts index 360c58a78b..5cc0fdae5b 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenPublicResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/CreateGameNamespaceTokenPublicResponse.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const CreateGameNamespaceTokenPublicResponse: core.serialization.ObjectSchema; export declare namespace CreateGameNamespaceTokenPublicResponse { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceByIdResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceByIdResponse.d.ts index 3703990a8e..262fe86858 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceByIdResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceByIdResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { cloud } from "../../../../../../index"; export declare const GetGameNamespaceByIdResponse: core.serialization.ObjectSchema; export declare namespace GetGameNamespaceByIdResponse { interface Raw { - namespace: serializers.cloud.NamespaceFull.Raw; + namespace: cloud.NamespaceFull.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceVersionHistoryResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceVersionHistoryResponse.d.ts index 594eea2d8f..cd0b9fb8b3 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceVersionHistoryResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/GetGameNamespaceVersionHistoryResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { cloud } from "../../../../../../index"; export declare const GetGameNamespaceVersionHistoryResponse: core.serialization.ObjectSchema; export declare namespace GetGameNamespaceVersionHistoryResponse { interface Raw { - versions: serializers.cloud.NamespaceVersion.Raw[]; + versions: cloud.NamespaceVersion.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/InspectResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/InspectResponse.d.ts index 2eadf9345c..144a9532c7 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/InspectResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/InspectResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { cloud } from "../../../../../../index"; export declare const InspectResponse: core.serialization.ObjectSchema; export declare namespace InspectResponse { interface Raw { - agent: serializers.cloud.AuthAgent.Raw; + agent: cloud.AuthAgent.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/SetNamespaceCdnAuthTypeRequest.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/SetNamespaceCdnAuthTypeRequest.d.ts index 2140d23438..43418653ff 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/SetNamespaceCdnAuthTypeRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/SetNamespaceCdnAuthTypeRequest.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { cloud } from "../../../../../../index"; export declare const SetNamespaceCdnAuthTypeRequest: core.serialization.ObjectSchema; export declare namespace SetNamespaceCdnAuthTypeRequest { interface Raw { - auth_type: serializers.cloud.CdnAuthType.Raw; + auth_type: cloud.CdnAuthType.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ToggleNamespaceDomainPublicAuthRequest.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ToggleNamespaceDomainPublicAuthRequest.d.ts index cdc546e538..13a99348d6 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ToggleNamespaceDomainPublicAuthRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ToggleNamespaceDomainPublicAuthRequest.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const ToggleNamespaceDomainPublicAuthRequest: core.serialization.ObjectSchema; export declare namespace ToggleNamespaceDomainPublicAuthRequest { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/UpdateGameNamespaceMatchmakerConfigRequest.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/UpdateGameNamespaceMatchmakerConfigRequest.d.ts index 7b23174bab..d1e84ff6d0 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/UpdateGameNamespaceMatchmakerConfigRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/UpdateGameNamespaceMatchmakerConfigRequest.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const UpdateGameNamespaceMatchmakerConfigRequest: core.serialization.ObjectSchema; export declare namespace UpdateGameNamespaceMatchmakerConfigRequest { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/UpdateGameNamespaceVersionRequest.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/UpdateGameNamespaceVersionRequest.d.ts index 8464a49d94..e2a5d1a9dc 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/UpdateGameNamespaceVersionRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/UpdateGameNamespaceVersionRequest.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const UpdateGameNamespaceVersionRequest: core.serialization.ObjectSchema; export declare namespace UpdateGameNamespaceVersionRequest { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/UpdateNamespaceCdnAuthUserRequest.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/UpdateNamespaceCdnAuthUserRequest.d.ts index efbf6f6eea..af2bcbb712 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/UpdateNamespaceCdnAuthUserRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/UpdateNamespaceCdnAuthUserRequest.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const UpdateNamespaceCdnAuthUserRequest: core.serialization.ObjectSchema; export declare namespace UpdateNamespaceCdnAuthUserRequest { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceMatchmakerConfigRequest.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceMatchmakerConfigRequest.d.ts index 9191b53c2c..d9cd5b271e 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceMatchmakerConfigRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceMatchmakerConfigRequest.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const ValidateGameNamespaceMatchmakerConfigRequest: core.serialization.ObjectSchema; export declare namespace ValidateGameNamespaceMatchmakerConfigRequest { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceMatchmakerConfigResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceMatchmakerConfigResponse.d.ts index aa9816de8a..62bfadbe88 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceMatchmakerConfigResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceMatchmakerConfigResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { common } from "../../../../../../index"; export declare const ValidateGameNamespaceMatchmakerConfigResponse: core.serialization.ObjectSchema; export declare namespace ValidateGameNamespaceMatchmakerConfigResponse { interface Raw { - errors: serializers.ValidationError.Raw[]; + errors: common.ValidationError.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceRequest.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceRequest.d.ts index f4b2e5c090..2531b933ab 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceRequest.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { common } from "../../../../../../index"; export declare const ValidateGameNamespaceRequest: core.serialization.ObjectSchema; export declare namespace ValidateGameNamespaceRequest { interface Raw { - display_name: serializers.DisplayName.Raw; + display_name: common.DisplayName.Raw; name_id: string; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceResponse.d.ts index de6f7cf6b6..149e672f90 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { common } from "../../../../../../index"; export declare const ValidateGameNamespaceResponse: core.serialization.ObjectSchema; export declare namespace ValidateGameNamespaceResponse { interface Raw { - errors: serializers.ValidationError.Raw[]; + errors: common.ValidationError.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentRequest.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentRequest.d.ts index a1f18ca73e..edccd28842 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentRequest.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { cloud } from "../../../../../../index"; export declare const ValidateGameNamespaceTokenDevelopmentRequest: core.serialization.ObjectSchema; export declare namespace ValidateGameNamespaceTokenDevelopmentRequest { interface Raw { hostname: string; - lobby_ports: serializers.cloud.version.matchmaker.LobbyGroupRuntimeDockerPort.Raw[]; + lobby_ports: cloud.version.matchmaker.LobbyGroupRuntimeDockerPort.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentResponse.d.ts index 695cbc014f..b3df0cf814 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/namespaces/types/ValidateGameNamespaceTokenDevelopmentResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { common } from "../../../../../../index"; export declare const ValidateGameNamespaceTokenDevelopmentResponse: core.serialization.ObjectSchema; export declare namespace ValidateGameNamespaceTokenDevelopmentResponse { interface Raw { - errors: serializers.ValidationError.Raw[]; + errors: common.ValidationError.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/tokens/types/CreateCloudTokenResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/tokens/types/CreateCloudTokenResponse.d.ts index cf6cb65998..047b5209c5 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/tokens/types/CreateCloudTokenResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/tokens/types/CreateCloudTokenResponse.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const CreateCloudTokenResponse: core.serialization.ObjectSchema; export declare namespace CreateCloudTokenResponse { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/tokens/types/CreateServiceTokenResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/tokens/types/CreateServiceTokenResponse.d.ts index b7f25a2f09..00ec89acb2 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/tokens/types/CreateServiceTokenResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/tokens/types/CreateServiceTokenResponse.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const CreateServiceTokenResponse: core.serialization.ObjectSchema; export declare namespace CreateServiceTokenResponse { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/versions/types/CreateGameVersionRequest.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/versions/types/CreateGameVersionRequest.d.ts index 027a8b25fd..4475865be5 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/versions/types/CreateGameVersionRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/versions/types/CreateGameVersionRequest.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { common, cloud } from "../../../../../../index"; export declare const CreateGameVersionRequest: core.serialization.ObjectSchema; export declare namespace CreateGameVersionRequest { interface Raw { - display_name: serializers.DisplayName.Raw; - config: serializers.cloud.version.Config.Raw; + display_name: common.DisplayName.Raw; + config: cloud.version.Config.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/versions/types/CreateGameVersionResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/versions/types/CreateGameVersionResponse.d.ts index cb71163a26..bd4a3a0014 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/versions/types/CreateGameVersionResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/versions/types/CreateGameVersionResponse.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const CreateGameVersionResponse: core.serialization.ObjectSchema; export declare namespace CreateGameVersionResponse { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/versions/types/GetGameVersionByIdResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/versions/types/GetGameVersionByIdResponse.d.ts index ae2a792f5e..27ca9da35f 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/versions/types/GetGameVersionByIdResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/versions/types/GetGameVersionByIdResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { cloud } from "../../../../../../index"; export declare const GetGameVersionByIdResponse: core.serialization.ObjectSchema; export declare namespace GetGameVersionByIdResponse { interface Raw { - version: serializers.cloud.version.Full.Raw; + version: cloud.version.Full.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/versions/types/ReserveVersionNameResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/versions/types/ReserveVersionNameResponse.d.ts index af0bf7ffa9..1f1b23d638 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/versions/types/ReserveVersionNameResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/versions/types/ReserveVersionNameResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { common } from "../../../../../../index"; export declare const ReserveVersionNameResponse: core.serialization.ObjectSchema; export declare namespace ReserveVersionNameResponse { interface Raw { - version_display_name: serializers.DisplayName.Raw; + version_display_name: common.DisplayName.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionRequest.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionRequest.d.ts index 082e5dceb9..e2c481bdeb 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionRequest.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { common, cloud } from "../../../../../../index"; export declare const ValidateGameVersionRequest: core.serialization.ObjectSchema; export declare namespace ValidateGameVersionRequest { interface Raw { - display_name: serializers.DisplayName.Raw; - config: serializers.cloud.version.Config.Raw; + display_name: common.DisplayName.Raw; + config: cloud.version.Config.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionResponse.d.ts index fd75790bb5..2ebc711fe8 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/games/resources/versions/types/ValidateGameVersionResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { common } from "../../../../../../index"; export declare const ValidateGameVersionResponse: core.serialization.ObjectSchema; export declare namespace ValidateGameVersionResponse { interface Raw { - errors: serializers.ValidationError.Raw[]; + errors: common.ValidationError.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/groups/types/ValidateGroupRequest.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/groups/types/ValidateGroupRequest.d.ts index 3fa1c18d82..241c77d87c 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/groups/types/ValidateGroupRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/groups/types/ValidateGroupRequest.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common } from "../../../../index"; export declare const ValidateGroupRequest: core.serialization.ObjectSchema; export declare namespace ValidateGroupRequest { interface Raw { - display_name: serializers.DisplayName.Raw; + display_name: common.DisplayName.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/groups/types/ValidateGroupResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/groups/types/ValidateGroupResponse.d.ts index 634fef47d9..78bcba0676 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/groups/types/ValidateGroupResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/groups/types/ValidateGroupResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common } from "../../../../index"; export declare const ValidateGroupResponse: core.serialization.ObjectSchema; export declare namespace ValidateGroupResponse { interface Raw { - errors: serializers.ValidationError.Raw[]; + errors: common.ValidationError.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/logs/types/GetRayPerfLogsResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/logs/types/GetRayPerfLogsResponse.d.ts index 2516503c1c..42261b6043 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/logs/types/GetRayPerfLogsResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/logs/types/GetRayPerfLogsResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { cloud } from "../../../../index"; export declare const GetRayPerfLogsResponse: core.serialization.ObjectSchema; export declare namespace GetRayPerfLogsResponse { interface Raw { - perf_lists: serializers.cloud.SvcPerf.Raw[]; + perf_lists: cloud.SvcPerf.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/tiers/types/GetRegionTiersResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/tiers/types/GetRegionTiersResponse.d.ts index e421bb5b3f..5262b43612 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/tiers/types/GetRegionTiersResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/tiers/types/GetRegionTiersResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { cloud } from "../../../../index"; export declare const GetRegionTiersResponse: core.serialization.ObjectSchema; export declare namespace GetRegionTiersResponse { interface Raw { - tiers: serializers.cloud.RegionTier.Raw[]; + tiers: cloud.RegionTier.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/cdn/types/Config.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/cdn/types/Config.d.ts index c55df79e7a..403a4b63b1 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/cdn/types/Config.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/cdn/types/Config.d.ts @@ -1,9 +1,10 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { cloud } from "../../../../../../index"; export declare const Config: core.serialization.ObjectSchema; export declare namespace Config { interface Raw { @@ -11,6 +12,6 @@ export declare namespace Config { build_output?: string | null; build_env?: Record | null; site_id?: string | null; - routes?: serializers.cloud.version.cdn.Route.Raw[] | null; + routes?: cloud.version.cdn.Route.Raw[] | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/cdn/types/CustomHeadersMiddleware.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/cdn/types/CustomHeadersMiddleware.d.ts index 010a9f4b88..627d93343f 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/cdn/types/CustomHeadersMiddleware.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/cdn/types/CustomHeadersMiddleware.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { cloud } from "../../../../../../index"; export declare const CustomHeadersMiddleware: core.serialization.ObjectSchema; export declare namespace CustomHeadersMiddleware { interface Raw { - headers: serializers.cloud.version.cdn.Header.Raw[]; + headers: cloud.version.cdn.Header.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/cdn/types/Header.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/cdn/types/Header.d.ts index 00d5e1c224..5e60bbc617 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/cdn/types/Header.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/cdn/types/Header.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const Header: core.serialization.ObjectSchema; export declare namespace Header { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/cdn/types/Middleware.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/cdn/types/Middleware.d.ts index c006ce4a9f..e3fb5e54dd 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/cdn/types/Middleware.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/cdn/types/Middleware.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { cloud } from "../../../../../../index"; export declare const Middleware: core.serialization.ObjectSchema; export declare namespace Middleware { interface Raw { - kind: serializers.cloud.version.cdn.MiddlewareKind.Raw; + kind: cloud.version.cdn.MiddlewareKind.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/cdn/types/MiddlewareKind.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/cdn/types/MiddlewareKind.d.ts index b8f47c6c8c..02c073fff2 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/cdn/types/MiddlewareKind.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/cdn/types/MiddlewareKind.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { cloud } from "../../../../../../index"; export declare const MiddlewareKind: core.serialization.ObjectSchema; export declare namespace MiddlewareKind { interface Raw { - custom_headers?: serializers.cloud.version.cdn.CustomHeadersMiddleware.Raw | null; + custom_headers?: cloud.version.cdn.CustomHeadersMiddleware.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/cdn/types/Route.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/cdn/types/Route.d.ts index 6632309e1f..6cb1709c36 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/cdn/types/Route.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/cdn/types/Route.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { cloud } from "../../../../../../index"; export declare const Route: core.serialization.ObjectSchema; export declare namespace Route { interface Raw { glob: string; priority: number; - middlewares: serializers.cloud.version.cdn.Middleware.Raw[]; + middlewares: cloud.version.cdn.Middleware.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/engine/resources/custom/types/CustomConfig.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/engine/resources/custom/types/CustomConfig.d.ts index be5ca2ca69..ee730a45e2 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/engine/resources/custom/types/CustomConfig.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/engine/resources/custom/types/CustomConfig.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export declare const CustomConfig: core.serialization.ObjectSchema; export declare namespace CustomConfig { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/engine/resources/godot/types/GodotConfig.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/engine/resources/godot/types/GodotConfig.d.ts index d9a45c21cf..b31723d934 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/engine/resources/godot/types/GodotConfig.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/engine/resources/godot/types/GodotConfig.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export declare const GodotConfig: core.serialization.ObjectSchema; export declare namespace GodotConfig { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/engine/resources/html5/types/Html5Config.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/engine/resources/html5/types/Html5Config.d.ts index 0ab4473e8c..6fa2ba2230 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/engine/resources/html5/types/Html5Config.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/engine/resources/html5/types/Html5Config.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export declare const Html5Config: core.serialization.ObjectSchema; export declare namespace Html5Config { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/engine/resources/unity/types/UnityConfig.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/engine/resources/unity/types/UnityConfig.d.ts index 8856cd92e8..aa81fda772 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/engine/resources/unity/types/UnityConfig.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/engine/resources/unity/types/UnityConfig.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export declare const UnityConfig: core.serialization.ObjectSchema; export declare namespace UnityConfig { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/engine/resources/unreal/types/UnrealConfig.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/engine/resources/unreal/types/UnrealConfig.d.ts index 1497dfba00..e43380a2d5 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/engine/resources/unreal/types/UnrealConfig.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/engine/resources/unreal/types/UnrealConfig.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export declare const UnrealConfig: core.serialization.ObjectSchema; export declare namespace UnrealConfig { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/engine/types/Config.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/engine/types/Config.d.ts index c404b06f2f..0cc03a22f4 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/engine/types/Config.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/engine/types/Config.d.ts @@ -1,16 +1,17 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { cloud } from "../../../../../../index"; export declare const Config: core.serialization.ObjectSchema; export declare namespace Config { interface Raw { - unity?: serializers.cloud.version.engine.UnityConfig.Raw | null; - unreal?: serializers.cloud.version.engine.UnrealConfig.Raw | null; - godot?: serializers.cloud.version.engine.GodotConfig.Raw | null; - html5?: serializers.cloud.version.engine.Html5Config.Raw | null; - custom?: serializers.cloud.version.engine.CustomConfig.Raw | null; + unity?: cloud.version.engine.UnityConfig.Raw | null; + unreal?: cloud.version.engine.UnrealConfig.Raw | null; + godot?: cloud.version.engine.GodotConfig.Raw | null; + html5?: cloud.version.engine.Html5Config.Raw | null; + custom?: cloud.version.engine.CustomConfig.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/identity/types/Config.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/identity/types/Config.d.ts index c457bbe354..0f4bef27a7 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/identity/types/Config.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/identity/types/Config.d.ts @@ -1,15 +1,16 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { cloud } from "../../../../../../index"; export declare const Config: core.serialization.ObjectSchema; export declare namespace Config { interface Raw { display_names?: string[] | null; avatars?: string[] | null; - custom_display_names?: serializers.cloud.version.identity.CustomDisplayName.Raw[] | null; - custom_avatars?: serializers.cloud.version.identity.CustomAvatar.Raw[] | null; + custom_display_names?: cloud.version.identity.CustomDisplayName.Raw[] | null; + custom_avatars?: cloud.version.identity.CustomAvatar.Raw[] | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/identity/types/CustomAvatar.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/identity/types/CustomAvatar.d.ts index 0723b3b102..c28279cb27 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/identity/types/CustomAvatar.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/identity/types/CustomAvatar.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const CustomAvatar: core.serialization.ObjectSchema; export declare namespace CustomAvatar { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/identity/types/CustomDisplayName.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/identity/types/CustomDisplayName.d.ts index 9f65f4c83a..82f9829958 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/identity/types/CustomDisplayName.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/identity/types/CustomDisplayName.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { common } from "../../../../../../index"; export declare const CustomDisplayName: core.serialization.ObjectSchema; export declare namespace CustomDisplayName { interface Raw { - display_name: serializers.DisplayName.Raw; + display_name: common.DisplayName.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/kv/types/Config.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/kv/types/Config.d.ts index 23665091c9..d36d7e4caa 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/kv/types/Config.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/kv/types/Config.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; export declare const Config: core.serialization.ObjectSchema; export declare namespace Config { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/Captcha.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/Captcha.d.ts index 71b968bfb1..284a0d99c6 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/Captcha.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/Captcha.d.ts @@ -1,15 +1,16 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { cloud } from "../../../../../../../../index"; export declare const Captcha: core.serialization.ObjectSchema; export declare namespace Captcha { interface Raw { requests_before_reverify: number; verification_ttl: number; - hcaptcha?: serializers.cloud.version.matchmaker.CaptchaHcaptcha.Raw | null; - turnstile?: serializers.cloud.version.matchmaker.CaptchaTurnstile.Raw | null; + hcaptcha?: cloud.version.matchmaker.CaptchaHcaptcha.Raw | null; + turnstile?: cloud.version.matchmaker.CaptchaTurnstile.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaHcaptcha.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaHcaptcha.d.ts index d1a23d393f..97344c84d6 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaHcaptcha.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaHcaptcha.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { cloud } from "../../../../../../../../index"; export declare const CaptchaHcaptcha: core.serialization.ObjectSchema; export declare namespace CaptchaHcaptcha { interface Raw { - level?: serializers.cloud.version.matchmaker.CaptchaHcaptchaLevel.Raw | null; + level?: cloud.version.matchmaker.CaptchaHcaptchaLevel.Raw | null; site_key?: string | null; secret_key?: string | null; } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaHcaptchaLevel.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaHcaptchaLevel.d.ts index 0381db02a9..863cd9e2a8 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaHcaptchaLevel.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaHcaptchaLevel.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export declare const CaptchaHcaptchaLevel: core.serialization.Schema; export declare namespace CaptchaHcaptchaLevel { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaTurnstile.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaTurnstile.d.ts index 8c7cdcbfeb..7696454710 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaTurnstile.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/CaptchaTurnstile.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export declare const CaptchaTurnstile: core.serialization.ObjectSchema; export declare namespace CaptchaTurnstile { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/NetworkMode.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/NetworkMode.d.ts index 0126cedabf..1ca861a5fa 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/NetworkMode.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/NetworkMode.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export declare const NetworkMode: core.serialization.Schema; export declare namespace NetworkMode { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/PortProtocol.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/PortProtocol.d.ts index 3e3b21314d..43d88a1301 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/PortProtocol.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/PortProtocol.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export declare const PortProtocol: core.serialization.Schema; export declare namespace PortProtocol { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/PortRange.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/PortRange.d.ts index 08b687adfa..669df1e845 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/PortRange.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/PortRange.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export declare const PortRange: core.serialization.ObjectSchema; export declare namespace PortRange { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/ProxyKind.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/ProxyKind.d.ts index d0b558240f..faf428a137 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/ProxyKind.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/common/types/ProxyKind.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export declare const ProxyKind: core.serialization.Schema; export declare namespace ProxyKind { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameMode.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameMode.d.ts index 22e7a34f7d..e905e4a1d2 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameMode.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameMode.d.ts @@ -1,22 +1,23 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { cloud } from "../../../../../../../../index"; export declare const GameMode: core.serialization.ObjectSchema; export declare namespace GameMode { interface Raw { - regions?: Record | null; + regions?: Record | null; max_players?: number | null; max_players_direct?: number | null; max_players_party?: number | null; - docker?: serializers.cloud.version.matchmaker.GameModeRuntimeDocker.Raw | null; + docker?: cloud.version.matchmaker.GameModeRuntimeDocker.Raw | null; listable?: boolean | null; taggable?: boolean | null; allow_dynamic_max_players?: boolean | null; - actions?: serializers.cloud.version.matchmaker.GameModeActions.Raw | null; + actions?: cloud.version.matchmaker.GameModeActions.Raw | null; tier?: string | null; - idle_lobbies?: serializers.cloud.version.matchmaker.GameModeIdleLobbiesConfig.Raw | null; + idle_lobbies?: cloud.version.matchmaker.GameModeIdleLobbiesConfig.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeActions.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeActions.d.ts index 3aff748083..64744d03c0 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeActions.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeActions.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { cloud } from "../../../../../../../../index"; export declare const GameModeActions: core.serialization.ObjectSchema; export declare namespace GameModeActions { interface Raw { - find?: serializers.cloud.version.matchmaker.GameModeFindConfig.Raw | null; - join?: serializers.cloud.version.matchmaker.GameModeJoinConfig.Raw | null; - create?: serializers.cloud.version.matchmaker.GameModeCreateConfig.Raw | null; + find?: cloud.version.matchmaker.GameModeFindConfig.Raw | null; + join?: cloud.version.matchmaker.GameModeJoinConfig.Raw | null; + create?: cloud.version.matchmaker.GameModeCreateConfig.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeCreateConfig.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeCreateConfig.d.ts index 2bf12d0507..d6477317de 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeCreateConfig.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeCreateConfig.d.ts @@ -1,15 +1,16 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { cloud } from "../../../../../../../../index"; export declare const GameModeCreateConfig: core.serialization.ObjectSchema; export declare namespace GameModeCreateConfig { interface Raw { enabled: boolean; - identity_requirement?: serializers.cloud.version.matchmaker.GameModeIdentityRequirement.Raw | null; - verification?: serializers.cloud.version.matchmaker.GameModeVerificationConfig.Raw | null; + identity_requirement?: cloud.version.matchmaker.GameModeIdentityRequirement.Raw | null; + verification?: cloud.version.matchmaker.GameModeVerificationConfig.Raw | null; enable_public?: boolean | null; enable_private?: boolean | null; max_lobbies_per_identity?: number | null; diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeFindConfig.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeFindConfig.d.ts index e5098f51f8..b2cbbbd0eb 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeFindConfig.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeFindConfig.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { cloud } from "../../../../../../../../index"; export declare const GameModeFindConfig: core.serialization.ObjectSchema; export declare namespace GameModeFindConfig { interface Raw { enabled: boolean; - identity_requirement?: serializers.cloud.version.matchmaker.GameModeIdentityRequirement.Raw | null; - verification?: serializers.cloud.version.matchmaker.GameModeVerificationConfig.Raw | null; + identity_requirement?: cloud.version.matchmaker.GameModeIdentityRequirement.Raw | null; + verification?: cloud.version.matchmaker.GameModeVerificationConfig.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeIdentityRequirement.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeIdentityRequirement.d.ts index 6ae4ceddc2..3556e2c281 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeIdentityRequirement.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeIdentityRequirement.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export declare const GameModeIdentityRequirement: core.serialization.Schema; export declare namespace GameModeIdentityRequirement { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeIdleLobbiesConfig.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeIdleLobbiesConfig.d.ts index d1b46b7070..e099b9694c 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeIdleLobbiesConfig.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeIdleLobbiesConfig.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export declare const GameModeIdleLobbiesConfig: core.serialization.ObjectSchema; export declare namespace GameModeIdleLobbiesConfig { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeJoinConfig.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeJoinConfig.d.ts index c6f3ba71a7..9c7bd60cf6 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeJoinConfig.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeJoinConfig.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { cloud } from "../../../../../../../../index"; export declare const GameModeJoinConfig: core.serialization.ObjectSchema; export declare namespace GameModeJoinConfig { interface Raw { enabled: boolean; - identity_requirement?: serializers.cloud.version.matchmaker.GameModeIdentityRequirement.Raw | null; - verification?: serializers.cloud.version.matchmaker.GameModeVerificationConfig.Raw | null; + identity_requirement?: cloud.version.matchmaker.GameModeIdentityRequirement.Raw | null; + verification?: cloud.version.matchmaker.GameModeVerificationConfig.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRegion.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRegion.d.ts index b399d32885..8488ea818f 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRegion.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRegion.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { cloud } from "../../../../../../../../index"; export declare const GameModeRegion: core.serialization.ObjectSchema; export declare namespace GameModeRegion { interface Raw { tier?: string | null; - idle_lobbies?: serializers.cloud.version.matchmaker.GameModeIdleLobbiesConfig.Raw | null; + idle_lobbies?: cloud.version.matchmaker.GameModeIdleLobbiesConfig.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDocker.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDocker.d.ts index 92e524cef0..ea996df3c0 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDocker.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDocker.d.ts @@ -1,9 +1,10 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { cloud } from "../../../../../../../../index"; export declare const GameModeRuntimeDocker: core.serialization.ObjectSchema; export declare namespace GameModeRuntimeDocker { interface Raw { @@ -13,7 +14,7 @@ export declare namespace GameModeRuntimeDocker { image_id?: string | null; args?: string[] | null; env?: Record | null; - network_mode?: serializers.cloud.version.matchmaker.NetworkMode.Raw | null; - ports?: Record | null; + network_mode?: cloud.version.matchmaker.NetworkMode.Raw | null; + ports?: Record | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDockerPort.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDockerPort.d.ts index 2d75c6f5a5..0e2fba8301 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDockerPort.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeRuntimeDockerPort.d.ts @@ -1,18 +1,19 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { cloud } from "../../../../../../../../index"; export declare const GameModeRuntimeDockerPort: core.serialization.ObjectSchema; export declare namespace GameModeRuntimeDockerPort { interface Raw { port?: number | null; - port_range?: serializers.cloud.version.matchmaker.PortRange.Raw | null; - protocol?: serializers.cloud.version.matchmaker.PortProtocol.Raw | null; - proxy?: serializers.cloud.version.matchmaker.ProxyKind.Raw | null; + port_range?: cloud.version.matchmaker.PortRange.Raw | null; + protocol?: cloud.version.matchmaker.PortProtocol.Raw | null; + proxy?: cloud.version.matchmaker.ProxyKind.Raw | null; dev_port?: number | null; - dev_port_range?: serializers.cloud.version.matchmaker.PortRange.Raw | null; - dev_protocol?: serializers.cloud.version.matchmaker.PortProtocol.Raw | null; + dev_port_range?: cloud.version.matchmaker.PortRange.Raw | null; + dev_protocol?: cloud.version.matchmaker.PortProtocol.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeVerificationConfig.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeVerificationConfig.d.ts index 95152f6776..8e212faff7 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeVerificationConfig.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/gameMode/types/GameModeVerificationConfig.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export declare const GameModeVerificationConfig: core.serialization.ObjectSchema; export declare namespace GameModeVerificationConfig { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroup.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroup.d.ts index a17437d28a..21e3002340 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroup.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroup.d.ts @@ -1,17 +1,18 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { cloud } from "../../../../../../../../index"; export declare const LobbyGroup: core.serialization.ObjectSchema; export declare namespace LobbyGroup { interface Raw { name_id: string; - regions: serializers.cloud.version.matchmaker.LobbyGroupRegion.Raw[]; + regions: cloud.version.matchmaker.LobbyGroupRegion.Raw[]; max_players_normal: number; max_players_direct: number; max_players_party: number; - runtime: serializers.cloud.version.matchmaker.LobbyGroupRuntime.Raw; + runtime: cloud.version.matchmaker.LobbyGroupRuntime.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupIdleLobbiesConfig.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupIdleLobbiesConfig.d.ts index c1aa07ca4c..3b5334b9e3 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupIdleLobbiesConfig.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupIdleLobbiesConfig.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export declare const LobbyGroupIdleLobbiesConfig: core.serialization.ObjectSchema; export declare namespace LobbyGroupIdleLobbiesConfig { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRegion.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRegion.d.ts index c1cde367ce..94fb2ce4d6 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRegion.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRegion.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { cloud } from "../../../../../../../../index"; export declare const LobbyGroupRegion: core.serialization.ObjectSchema; export declare namespace LobbyGroupRegion { interface Raw { region_id: string; tier_name_id: string; - idle_lobbies?: serializers.cloud.version.matchmaker.LobbyGroupIdleLobbiesConfig.Raw | null; + idle_lobbies?: cloud.version.matchmaker.LobbyGroupIdleLobbiesConfig.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntime.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntime.d.ts index 1fb1f00ed5..0cf46f8ea8 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntime.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntime.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { cloud } from "../../../../../../../../index"; export declare const LobbyGroupRuntime: core.serialization.ObjectSchema; export declare namespace LobbyGroupRuntime { interface Raw { - docker?: serializers.cloud.version.matchmaker.LobbyGroupRuntimeDocker.Raw | null; + docker?: cloud.version.matchmaker.LobbyGroupRuntimeDocker.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDocker.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDocker.d.ts index 2690f64a3d..b2e03f6883 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDocker.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDocker.d.ts @@ -1,16 +1,17 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { cloud } from "../../../../../../../../index"; export declare const LobbyGroupRuntimeDocker: core.serialization.ObjectSchema; export declare namespace LobbyGroupRuntimeDocker { interface Raw { build_id?: string | null; args: string[]; - env_vars: serializers.cloud.version.matchmaker.LobbyGroupRuntimeDockerEnvVar.Raw[]; - network_mode?: serializers.cloud.version.matchmaker.NetworkMode.Raw | null; - ports: serializers.cloud.version.matchmaker.LobbyGroupRuntimeDockerPort.Raw[]; + env_vars: cloud.version.matchmaker.LobbyGroupRuntimeDockerEnvVar.Raw[]; + network_mode?: cloud.version.matchmaker.NetworkMode.Raw | null; + ports: cloud.version.matchmaker.LobbyGroupRuntimeDockerPort.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDockerEnvVar.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDockerEnvVar.d.ts index 2d33d3645d..3ede5d2e97 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDockerEnvVar.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDockerEnvVar.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; export declare const LobbyGroupRuntimeDockerEnvVar: core.serialization.ObjectSchema; export declare namespace LobbyGroupRuntimeDockerEnvVar { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDockerPort.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDockerPort.d.ts index 61847bf03d..95efa0cf9f 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDockerPort.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/resources/lobbyGroup/types/LobbyGroupRuntimeDockerPort.d.ts @@ -1,15 +1,16 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../../../.."; -import * as Rivet from "../../../../../../../../../../api"; +import * as serializers from "../../../../../../../../../index"; +import * as Rivet from "../../../../../../../../../../api/index"; import * as core from "../../../../../../../../../../core"; +import { cloud } from "../../../../../../../../index"; export declare const LobbyGroupRuntimeDockerPort: core.serialization.ObjectSchema; export declare namespace LobbyGroupRuntimeDockerPort { interface Raw { label: string; target_port?: number | null; - port_range?: serializers.cloud.version.matchmaker.PortRange.Raw | null; - proxy_protocol: serializers.cloud.version.matchmaker.PortProtocol.Raw; + port_range?: cloud.version.matchmaker.PortRange.Raw | null; + proxy_protocol: cloud.version.matchmaker.PortProtocol.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/types/Config.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/types/Config.d.ts index 40e104fe0d..52f275f562 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/types/Config.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/resources/matchmaker/types/Config.d.ts @@ -1,22 +1,23 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../../.."; -import * as Rivet from "../../../../../../../../api"; +import * as serializers from "../../../../../../../index"; +import * as Rivet from "../../../../../../../../api/index"; import * as core from "../../../../../../../../core"; +import { cloud } from "../../../../../../index"; export declare const Config: core.serialization.ObjectSchema; export declare namespace Config { interface Raw { - game_modes?: Record | null; - captcha?: serializers.cloud.version.matchmaker.Captcha.Raw | null; + game_modes?: Record | null; + captcha?: cloud.version.matchmaker.Captcha.Raw | null; dev_hostname?: string | null; - regions?: Record | null; + regions?: Record | null; max_players?: number | null; max_players_direct?: number | null; max_players_party?: number | null; - docker?: serializers.cloud.version.matchmaker.GameModeRuntimeDocker.Raw | null; + docker?: cloud.version.matchmaker.GameModeRuntimeDocker.Raw | null; tier?: string | null; - idle_lobbies?: serializers.cloud.version.matchmaker.GameModeIdleLobbiesConfig.Raw | null; - lobby_groups?: serializers.cloud.version.matchmaker.LobbyGroup.Raw[] | null; + idle_lobbies?: cloud.version.matchmaker.GameModeIdleLobbiesConfig.Raw | null; + lobby_groups?: cloud.version.matchmaker.LobbyGroup.Raw[] | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/types/Config.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/types/Config.d.ts index cd80247b7b..fe008b9cb1 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/types/Config.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/types/Config.d.ts @@ -1,17 +1,18 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { cloud } from "../../../../index"; export declare const Config: core.serialization.ObjectSchema; export declare namespace Config { interface Raw { scripts?: Record | null; - engine?: serializers.cloud.version.engine.Config.Raw | null; - cdn?: serializers.cloud.version.cdn.Config.Raw | null; - matchmaker?: serializers.cloud.version.matchmaker.Config.Raw | null; - kv?: serializers.cloud.version.kv.Config.Raw | null; - identity?: serializers.cloud.version.identity.Config.Raw | null; + engine?: cloud.version.engine.Config.Raw | null; + cdn?: cloud.version.cdn.Config.Raw | null; + matchmaker?: cloud.version.matchmaker.Config.Raw | null; + kv?: cloud.version.kv.Config.Raw | null; + identity?: cloud.version.identity.Config.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/types/Full.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/types/Full.d.ts index 20d9e5b4fe..6b5cc7fc0a 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/types/Full.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/types/Full.d.ts @@ -1,15 +1,16 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common, cloud } from "../../../../index"; export declare const Full: core.serialization.ObjectSchema; export declare namespace Full { interface Raw { version_id: string; - create_ts: serializers.Timestamp.Raw; - display_name: serializers.DisplayName.Raw; - config: serializers.cloud.version.Config.Raw; + create_ts: common.Timestamp.Raw; + display_name: common.DisplayName.Raw; + config: cloud.version.Config.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/types/Summary.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/types/Summary.d.ts index 03e6ae241d..3f7322834c 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/resources/version/types/Summary.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/resources/version/types/Summary.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common } from "../../../../index"; export declare const Summary: core.serialization.ObjectSchema; export declare namespace Summary { interface Raw { version_id: string; - create_ts: serializers.Timestamp.Raw; - display_name: serializers.DisplayName.Raw; + create_ts: common.Timestamp.Raw; + display_name: common.DisplayName.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapAccess.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapAccess.d.ts index 0531d333c1..a4b56f483e 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapAccess.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapAccess.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export declare const BootstrapAccess: core.serialization.Schema; export declare namespace BootstrapAccess { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapCaptcha.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapCaptcha.d.ts index 07d3ced6eb..7c554bfdea 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapCaptcha.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapCaptcha.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { cloud } from "../../index"; export declare const BootstrapCaptcha: core.serialization.ObjectSchema; export declare namespace BootstrapCaptcha { interface Raw { - turnstile?: serializers.cloud.BootstrapCaptchaTurnstile.Raw | null; + turnstile?: cloud.BootstrapCaptchaTurnstile.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapCaptchaTurnstile.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapCaptchaTurnstile.d.ts index cd2a00d0a6..6123d3863f 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapCaptchaTurnstile.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapCaptchaTurnstile.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export declare const BootstrapCaptchaTurnstile: core.serialization.ObjectSchema; export declare namespace BootstrapCaptchaTurnstile { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapCluster.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapCluster.d.ts index a7d0ac0d4a..04e6427725 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapCluster.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapCluster.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export declare const BootstrapCluster: core.serialization.Schema; export declare namespace BootstrapCluster { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapDomains.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapDomains.d.ts index 8e5c9d6f04..04aebe5f06 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapDomains.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapDomains.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export declare const BootstrapDomains: core.serialization.ObjectSchema; export declare namespace BootstrapDomains { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapLoginMethods.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapLoginMethods.d.ts index 1b2a158fae..a904392110 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapLoginMethods.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapLoginMethods.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export declare const BootstrapLoginMethods: core.serialization.ObjectSchema; export declare namespace BootstrapLoginMethods { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapOrigins.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapOrigins.d.ts index 903127cc22..bf9b9b9c71 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapOrigins.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapOrigins.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export declare const BootstrapOrigins: core.serialization.ObjectSchema; export declare namespace BootstrapOrigins { diff --git a/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapResponse.d.ts b/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapResponse.d.ts index 85306aace7..1d7d03e88b 100644 --- a/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/cloud/types/BootstrapResponse.d.ts @@ -1,17 +1,18 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { cloud } from "../../index"; export declare const BootstrapResponse: core.serialization.ObjectSchema; export declare namespace BootstrapResponse { interface Raw { - cluster: serializers.cloud.BootstrapCluster.Raw; - access: serializers.cloud.BootstrapAccess.Raw; - domains?: serializers.cloud.BootstrapDomains.Raw | null; - origins: serializers.cloud.BootstrapOrigins.Raw; - captcha: serializers.cloud.BootstrapCaptcha.Raw; - login_methods: serializers.cloud.BootstrapLoginMethods.Raw; + cluster: cloud.BootstrapCluster.Raw; + access: cloud.BootstrapAccess.Raw; + domains?: cloud.BootstrapDomains.Raw | null; + origins: cloud.BootstrapOrigins.Raw; + captcha: cloud.BootstrapCaptcha.Raw; + login_methods: cloud.BootstrapLoginMethods.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/common/types/AccountNumber.d.ts b/sdks/full/typescript/types/serialization/resources/common/types/AccountNumber.d.ts index cfba05b3bf..d019ffacd2 100644 --- a/sdks/full/typescript/types/serialization/resources/common/types/AccountNumber.d.ts +++ b/sdks/full/typescript/types/serialization/resources/common/types/AccountNumber.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export declare const AccountNumber: core.serialization.Schema; export declare namespace AccountNumber { diff --git a/sdks/full/typescript/types/serialization/resources/common/types/Bio.d.ts b/sdks/full/typescript/types/serialization/resources/common/types/Bio.d.ts index cf50625857..34ebe020dc 100644 --- a/sdks/full/typescript/types/serialization/resources/common/types/Bio.d.ts +++ b/sdks/full/typescript/types/serialization/resources/common/types/Bio.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export declare const Bio: core.serialization.Schema; export declare namespace Bio { diff --git a/sdks/full/typescript/types/serialization/resources/common/types/DisplayName.d.ts b/sdks/full/typescript/types/serialization/resources/common/types/DisplayName.d.ts index 7bf5972541..3bcadb72c2 100644 --- a/sdks/full/typescript/types/serialization/resources/common/types/DisplayName.d.ts +++ b/sdks/full/typescript/types/serialization/resources/common/types/DisplayName.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export declare const DisplayName: core.serialization.Schema; export declare namespace DisplayName { diff --git a/sdks/full/typescript/types/serialization/resources/common/types/Email.d.ts b/sdks/full/typescript/types/serialization/resources/common/types/Email.d.ts index 5b027ca499..a79f60e52a 100644 --- a/sdks/full/typescript/types/serialization/resources/common/types/Email.d.ts +++ b/sdks/full/typescript/types/serialization/resources/common/types/Email.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export declare const Email: core.serialization.Schema; export declare namespace Email { diff --git a/sdks/full/typescript/types/serialization/resources/common/types/EmptyObject.d.ts b/sdks/full/typescript/types/serialization/resources/common/types/EmptyObject.d.ts index ec70d42522..6d4cd3ad8b 100644 --- a/sdks/full/typescript/types/serialization/resources/common/types/EmptyObject.d.ts +++ b/sdks/full/typescript/types/serialization/resources/common/types/EmptyObject.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export declare const EmptyObject: core.serialization.ObjectSchema; export declare namespace EmptyObject { diff --git a/sdks/full/typescript/types/serialization/resources/common/types/ErrorBody.d.ts b/sdks/full/typescript/types/serialization/resources/common/types/ErrorBody.d.ts index 5999c4f0c9..36f1711853 100644 --- a/sdks/full/typescript/types/serialization/resources/common/types/ErrorBody.d.ts +++ b/sdks/full/typescript/types/serialization/resources/common/types/ErrorBody.d.ts @@ -1,9 +1,10 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { common } from "../../index"; export declare const ErrorBody: core.serialization.ObjectSchema; export declare namespace ErrorBody { interface Raw { @@ -11,6 +12,6 @@ export declare namespace ErrorBody { message: string; ray_id: string; documentation?: string | null; - metadata?: (serializers.ErrorMetadata.Raw | undefined) | null; + metadata?: (common.ErrorMetadata.Raw | undefined) | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/common/types/ErrorMetadata.d.ts b/sdks/full/typescript/types/serialization/resources/common/types/ErrorMetadata.d.ts index 5618ee9911..3cfeff70a3 100644 --- a/sdks/full/typescript/types/serialization/resources/common/types/ErrorMetadata.d.ts +++ b/sdks/full/typescript/types/serialization/resources/common/types/ErrorMetadata.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export declare const ErrorMetadata: core.serialization.Schema; export declare namespace ErrorMetadata { diff --git a/sdks/full/typescript/types/serialization/resources/common/types/GlobalEventNotification.d.ts b/sdks/full/typescript/types/serialization/resources/common/types/GlobalEventNotification.d.ts index 64ea19e566..0dbdccde56 100644 --- a/sdks/full/typescript/types/serialization/resources/common/types/GlobalEventNotification.d.ts +++ b/sdks/full/typescript/types/serialization/resources/common/types/GlobalEventNotification.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export declare const GlobalEventNotification: core.serialization.ObjectSchema; export declare namespace GlobalEventNotification { diff --git a/sdks/full/typescript/types/serialization/resources/common/types/Identifier.d.ts b/sdks/full/typescript/types/serialization/resources/common/types/Identifier.d.ts index 2466523b35..6c9dd62684 100644 --- a/sdks/full/typescript/types/serialization/resources/common/types/Identifier.d.ts +++ b/sdks/full/typescript/types/serialization/resources/common/types/Identifier.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export declare const Identifier: core.serialization.Schema; export declare namespace Identifier { diff --git a/sdks/full/typescript/types/serialization/resources/common/types/Jwt.d.ts b/sdks/full/typescript/types/serialization/resources/common/types/Jwt.d.ts index b6fea3e063..692ba72882 100644 --- a/sdks/full/typescript/types/serialization/resources/common/types/Jwt.d.ts +++ b/sdks/full/typescript/types/serialization/resources/common/types/Jwt.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export declare const Jwt: core.serialization.Schema; export declare namespace Jwt { diff --git a/sdks/full/typescript/types/serialization/resources/common/types/Timestamp.d.ts b/sdks/full/typescript/types/serialization/resources/common/types/Timestamp.d.ts index e0a879708c..7ad8282e3a 100644 --- a/sdks/full/typescript/types/serialization/resources/common/types/Timestamp.d.ts +++ b/sdks/full/typescript/types/serialization/resources/common/types/Timestamp.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export declare const Timestamp: core.serialization.Schema; export declare namespace Timestamp { diff --git a/sdks/full/typescript/types/serialization/resources/common/types/ValidationError.d.ts b/sdks/full/typescript/types/serialization/resources/common/types/ValidationError.d.ts index 127a778827..7dad7bc619 100644 --- a/sdks/full/typescript/types/serialization/resources/common/types/ValidationError.d.ts +++ b/sdks/full/typescript/types/serialization/resources/common/types/ValidationError.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export declare const ValidationError: core.serialization.ObjectSchema; export declare namespace ValidationError { diff --git a/sdks/full/typescript/types/serialization/resources/common/types/WatchQuery.d.ts b/sdks/full/typescript/types/serialization/resources/common/types/WatchQuery.d.ts index 8d111ed245..6b0d7468b9 100644 --- a/sdks/full/typescript/types/serialization/resources/common/types/WatchQuery.d.ts +++ b/sdks/full/typescript/types/serialization/resources/common/types/WatchQuery.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export declare const WatchQuery: core.serialization.Schema; export declare namespace WatchQuery { diff --git a/sdks/full/typescript/types/serialization/resources/common/types/WatchResponse.d.ts b/sdks/full/typescript/types/serialization/resources/common/types/WatchResponse.d.ts index bc39bcec15..f3017c97f4 100644 --- a/sdks/full/typescript/types/serialization/resources/common/types/WatchResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/common/types/WatchResponse.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export declare const WatchResponse: core.serialization.ObjectSchema; export declare namespace WatchResponse { diff --git a/sdks/full/typescript/types/serialization/resources/game/resources/common/types/Handle.d.ts b/sdks/full/typescript/types/serialization/resources/game/resources/common/types/Handle.d.ts index 36d96fe56a..9c6f87688d 100644 --- a/sdks/full/typescript/types/serialization/resources/game/resources/common/types/Handle.d.ts +++ b/sdks/full/typescript/types/serialization/resources/game/resources/common/types/Handle.d.ts @@ -1,15 +1,16 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common } from "../../../../index"; export declare const Handle: core.serialization.ObjectSchema; export declare namespace Handle { interface Raw { game_id: string; - name_id: serializers.Identifier.Raw; - display_name: serializers.DisplayName.Raw; + name_id: common.Identifier.Raw; + display_name: common.DisplayName.Raw; logo_url?: string | null; banner_url?: string | null; } diff --git a/sdks/full/typescript/types/serialization/resources/game/resources/common/types/LeaderboardCategory.d.ts b/sdks/full/typescript/types/serialization/resources/game/resources/common/types/LeaderboardCategory.d.ts index d534e56ec4..b4161fe3a3 100644 --- a/sdks/full/typescript/types/serialization/resources/game/resources/common/types/LeaderboardCategory.d.ts +++ b/sdks/full/typescript/types/serialization/resources/game/resources/common/types/LeaderboardCategory.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common } from "../../../../index"; export declare const LeaderboardCategory: core.serialization.ObjectSchema; export declare namespace LeaderboardCategory { interface Raw { - display_name: serializers.DisplayName.Raw; + display_name: common.DisplayName.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/game/resources/common/types/PlatformLink.d.ts b/sdks/full/typescript/types/serialization/resources/game/resources/common/types/PlatformLink.d.ts index 1124f0dbd4..6ad42cd7ab 100644 --- a/sdks/full/typescript/types/serialization/resources/game/resources/common/types/PlatformLink.d.ts +++ b/sdks/full/typescript/types/serialization/resources/game/resources/common/types/PlatformLink.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common } from "../../../../index"; export declare const PlatformLink: core.serialization.ObjectSchema; export declare namespace PlatformLink { interface Raw { - display_name: serializers.DisplayName.Raw; + display_name: common.DisplayName.Raw; url: string; } } diff --git a/sdks/full/typescript/types/serialization/resources/game/resources/common/types/Profile.d.ts b/sdks/full/typescript/types/serialization/resources/game/resources/common/types/Profile.d.ts index 9875962fe5..334ff48ba4 100644 --- a/sdks/full/typescript/types/serialization/resources/game/resources/common/types/Profile.d.ts +++ b/sdks/full/typescript/types/serialization/resources/game/resources/common/types/Profile.d.ts @@ -1,24 +1,25 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common, group, game } from "../../../../index"; export declare const Profile: core.serialization.ObjectSchema; export declare namespace Profile { interface Raw { game_id: string; name_id: string; - display_name: serializers.DisplayName.Raw; + display_name: common.DisplayName.Raw; logo_url?: string | null; banner_url?: string | null; url: string; - developer: serializers.group.Summary.Raw; + developer: group.Summary.Raw; tags: string[]; description: string; - platforms: serializers.game.PlatformLink.Raw[]; - recommended_groups: serializers.group.Summary.Raw[]; - identity_leaderboard_categories: serializers.game.LeaderboardCategory.Raw[]; - group_leaderboard_categories: serializers.game.LeaderboardCategory.Raw[]; + platforms: game.PlatformLink.Raw[]; + recommended_groups: group.Summary.Raw[]; + identity_leaderboard_categories: game.LeaderboardCategory.Raw[]; + group_leaderboard_categories: game.LeaderboardCategory.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/game/resources/common/types/Stat.d.ts b/sdks/full/typescript/types/serialization/resources/game/resources/common/types/Stat.d.ts index 8e0c3eb7e4..ef2c705f5e 100644 --- a/sdks/full/typescript/types/serialization/resources/game/resources/common/types/Stat.d.ts +++ b/sdks/full/typescript/types/serialization/resources/game/resources/common/types/Stat.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { game } from "../../../../index"; export declare const Stat: core.serialization.ObjectSchema; export declare namespace Stat { interface Raw { - config: serializers.game.StatConfig.Raw; + config: game.StatConfig.Raw; overall_value: number; } } diff --git a/sdks/full/typescript/types/serialization/resources/game/resources/common/types/StatAggregationMethod.d.ts b/sdks/full/typescript/types/serialization/resources/game/resources/common/types/StatAggregationMethod.d.ts index e8fdc778de..3f4c1feb97 100644 --- a/sdks/full/typescript/types/serialization/resources/game/resources/common/types/StatAggregationMethod.d.ts +++ b/sdks/full/typescript/types/serialization/resources/game/resources/common/types/StatAggregationMethod.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const StatAggregationMethod: core.serialization.Schema; export declare namespace StatAggregationMethod { diff --git a/sdks/full/typescript/types/serialization/resources/game/resources/common/types/StatConfig.d.ts b/sdks/full/typescript/types/serialization/resources/game/resources/common/types/StatConfig.d.ts index 35c3dac6af..dbb252ba28 100644 --- a/sdks/full/typescript/types/serialization/resources/game/resources/common/types/StatConfig.d.ts +++ b/sdks/full/typescript/types/serialization/resources/game/resources/common/types/StatConfig.d.ts @@ -1,19 +1,20 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { game, common } from "../../../../index"; export declare const StatConfig: core.serialization.ObjectSchema; export declare namespace StatConfig { interface Raw { record_id: string; icon_id: string; - format: serializers.game.StatFormatMethod.Raw; - aggregation: serializers.game.StatAggregationMethod.Raw; - sorting: serializers.game.StatSortingMethod.Raw; + format: game.StatFormatMethod.Raw; + aggregation: game.StatAggregationMethod.Raw; + sorting: game.StatSortingMethod.Raw; priority: number; - display_name: serializers.DisplayName.Raw; + display_name: common.DisplayName.Raw; postfix_singular?: string | null; postfix_plural?: string | null; prefix_singular?: string | null; diff --git a/sdks/full/typescript/types/serialization/resources/game/resources/common/types/StatFormatMethod.d.ts b/sdks/full/typescript/types/serialization/resources/game/resources/common/types/StatFormatMethod.d.ts index a9b4f10fe6..e8546a61c2 100644 --- a/sdks/full/typescript/types/serialization/resources/game/resources/common/types/StatFormatMethod.d.ts +++ b/sdks/full/typescript/types/serialization/resources/game/resources/common/types/StatFormatMethod.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const StatFormatMethod: core.serialization.Schema; export declare namespace StatFormatMethod { diff --git a/sdks/full/typescript/types/serialization/resources/game/resources/common/types/StatSortingMethod.d.ts b/sdks/full/typescript/types/serialization/resources/game/resources/common/types/StatSortingMethod.d.ts index 984b0b6f11..a29e84d616 100644 --- a/sdks/full/typescript/types/serialization/resources/game/resources/common/types/StatSortingMethod.d.ts +++ b/sdks/full/typescript/types/serialization/resources/game/resources/common/types/StatSortingMethod.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const StatSortingMethod: core.serialization.Schema; export declare namespace StatSortingMethod { diff --git a/sdks/full/typescript/types/serialization/resources/game/resources/common/types/StatSummary.d.ts b/sdks/full/typescript/types/serialization/resources/game/resources/common/types/StatSummary.d.ts index cecf803003..0eace48190 100644 --- a/sdks/full/typescript/types/serialization/resources/game/resources/common/types/StatSummary.d.ts +++ b/sdks/full/typescript/types/serialization/resources/game/resources/common/types/StatSummary.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { game } from "../../../../index"; export declare const StatSummary: core.serialization.ObjectSchema; export declare namespace StatSummary { interface Raw { - game: serializers.game.Handle.Raw; - stats: serializers.game.Stat.Raw[]; + game: game.Handle.Raw; + stats: game.Stat.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/game/resources/common/types/Summary.d.ts b/sdks/full/typescript/types/serialization/resources/game/resources/common/types/Summary.d.ts index 2dfb18ac75..6e36e95553 100644 --- a/sdks/full/typescript/types/serialization/resources/game/resources/common/types/Summary.d.ts +++ b/sdks/full/typescript/types/serialization/resources/game/resources/common/types/Summary.d.ts @@ -1,19 +1,20 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common, group } from "../../../../index"; export declare const Summary: core.serialization.ObjectSchema; export declare namespace Summary { interface Raw { game_id: string; - name_id: serializers.Identifier.Raw; - display_name: serializers.DisplayName.Raw; + name_id: common.Identifier.Raw; + display_name: common.DisplayName.Raw; logo_url?: string | null; banner_url?: string | null; url: string; - developer: serializers.group.Handle.Raw; + developer: group.Handle.Raw; total_player_count: number; } } diff --git a/sdks/full/typescript/types/serialization/resources/geo/resources/common/types/Coord.d.ts b/sdks/full/typescript/types/serialization/resources/geo/resources/common/types/Coord.d.ts index f8bee7ea32..fb3b245247 100644 --- a/sdks/full/typescript/types/serialization/resources/geo/resources/common/types/Coord.d.ts +++ b/sdks/full/typescript/types/serialization/resources/geo/resources/common/types/Coord.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const Coord: core.serialization.ObjectSchema; export declare namespace Coord { diff --git a/sdks/full/typescript/types/serialization/resources/geo/resources/common/types/Distance.d.ts b/sdks/full/typescript/types/serialization/resources/geo/resources/common/types/Distance.d.ts index 6dfb32ee24..9b20d1c156 100644 --- a/sdks/full/typescript/types/serialization/resources/geo/resources/common/types/Distance.d.ts +++ b/sdks/full/typescript/types/serialization/resources/geo/resources/common/types/Distance.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const Distance: core.serialization.ObjectSchema; export declare namespace Distance { diff --git a/sdks/full/typescript/types/serialization/resources/group/resources/common/types/BannedIdentity.d.ts b/sdks/full/typescript/types/serialization/resources/group/resources/common/types/BannedIdentity.d.ts index 2385660faf..6dbabe0425 100644 --- a/sdks/full/typescript/types/serialization/resources/group/resources/common/types/BannedIdentity.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/resources/common/types/BannedIdentity.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { identity, common } from "../../../../index"; export declare const BannedIdentity: core.serialization.ObjectSchema; export declare namespace BannedIdentity { interface Raw { - identity: serializers.identity.Handle.Raw; - ban_ts: serializers.Timestamp.Raw; + identity: identity.Handle.Raw; + ban_ts: common.Timestamp.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/group/resources/common/types/ExternalLinks.d.ts b/sdks/full/typescript/types/serialization/resources/group/resources/common/types/ExternalLinks.d.ts index af2e066cc2..d4ad714486 100644 --- a/sdks/full/typescript/types/serialization/resources/group/resources/common/types/ExternalLinks.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/resources/common/types/ExternalLinks.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const ExternalLinks: core.serialization.ObjectSchema; export declare namespace ExternalLinks { diff --git a/sdks/full/typescript/types/serialization/resources/group/resources/common/types/Handle.d.ts b/sdks/full/typescript/types/serialization/resources/group/resources/common/types/Handle.d.ts index ee3d90c167..5df26a58c2 100644 --- a/sdks/full/typescript/types/serialization/resources/group/resources/common/types/Handle.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/resources/common/types/Handle.d.ts @@ -1,16 +1,17 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common, group } from "../../../../index"; export declare const Handle: core.serialization.ObjectSchema; export declare namespace Handle { interface Raw { group_id: string; - display_name: serializers.DisplayName.Raw; + display_name: common.DisplayName.Raw; avatar_url?: string | null; - external: serializers.group.ExternalLinks.Raw; + external: group.ExternalLinks.Raw; is_developer?: boolean | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/group/resources/common/types/JoinRequest.d.ts b/sdks/full/typescript/types/serialization/resources/group/resources/common/types/JoinRequest.d.ts index b86b9cc931..f72bef9df0 100644 --- a/sdks/full/typescript/types/serialization/resources/group/resources/common/types/JoinRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/resources/common/types/JoinRequest.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { identity, common } from "../../../../index"; export declare const JoinRequest: core.serialization.ObjectSchema; export declare namespace JoinRequest { interface Raw { - identity: serializers.identity.Handle.Raw; - ts: serializers.Timestamp.Raw; + identity: identity.Handle.Raw; + ts: common.Timestamp.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/group/resources/common/types/Member.d.ts b/sdks/full/typescript/types/serialization/resources/group/resources/common/types/Member.d.ts index 7760c61c48..7d2ba80c60 100644 --- a/sdks/full/typescript/types/serialization/resources/group/resources/common/types/Member.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/resources/common/types/Member.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { identity } from "../../../../index"; export declare const Member: core.serialization.ObjectSchema; export declare namespace Member { interface Raw { - identity: serializers.identity.Handle.Raw; + identity: identity.Handle.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/group/resources/common/types/Profile.d.ts b/sdks/full/typescript/types/serialization/resources/group/resources/common/types/Profile.d.ts index 2e305ba0b5..5c40a04984 100644 --- a/sdks/full/typescript/types/serialization/resources/group/resources/common/types/Profile.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/resources/common/types/Profile.d.ts @@ -1,23 +1,24 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common, group } from "../../../../index"; export declare const Profile: core.serialization.ObjectSchema; export declare namespace Profile { interface Raw { group_id: string; - display_name: serializers.DisplayName.Raw; + display_name: common.DisplayName.Raw; avatar_url?: string | null; - external: serializers.group.ExternalLinks.Raw; + external: group.ExternalLinks.Raw; is_developer?: boolean | null; bio: string; is_current_identity_member?: boolean | null; - publicity: serializers.group.Publicity.Raw; + publicity: group.Publicity.Raw; member_count?: number | null; - members: serializers.group.Member.Raw[]; - join_requests: serializers.group.JoinRequest.Raw[]; + members: group.Member.Raw[]; + join_requests: group.JoinRequest.Raw[]; is_current_identity_requesting_join?: boolean | null; owner_identity_id: string; } diff --git a/sdks/full/typescript/types/serialization/resources/group/resources/common/types/Publicity.d.ts b/sdks/full/typescript/types/serialization/resources/group/resources/common/types/Publicity.d.ts index 97ad8071da..d5defcc16a 100644 --- a/sdks/full/typescript/types/serialization/resources/group/resources/common/types/Publicity.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/resources/common/types/Publicity.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const Publicity: core.serialization.Schema; export declare namespace Publicity { diff --git a/sdks/full/typescript/types/serialization/resources/group/resources/common/types/Summary.d.ts b/sdks/full/typescript/types/serialization/resources/group/resources/common/types/Summary.d.ts index f8ee6e89a0..de4d4e2eba 100644 --- a/sdks/full/typescript/types/serialization/resources/group/resources/common/types/Summary.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/resources/common/types/Summary.d.ts @@ -1,20 +1,21 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common, group } from "../../../../index"; export declare const Summary: core.serialization.ObjectSchema; export declare namespace Summary { interface Raw { group_id: string; - display_name: serializers.DisplayName.Raw; + display_name: common.DisplayName.Raw; avatar_url?: string | null; - external: serializers.group.ExternalLinks.Raw; + external: group.ExternalLinks.Raw; is_developer: boolean; - bio: serializers.Bio.Raw; + bio: common.Bio.Raw; is_current_identity_member: boolean; - publicity: serializers.group.Publicity.Raw; + publicity: group.Publicity.Raw; member_count: number; owner_identity_id: string; } diff --git a/sdks/full/typescript/types/serialization/resources/group/resources/invites/types/ConsumeInviteResponse.d.ts b/sdks/full/typescript/types/serialization/resources/group/resources/invites/types/ConsumeInviteResponse.d.ts index bf7bc73e03..470fd7a70b 100644 --- a/sdks/full/typescript/types/serialization/resources/group/resources/invites/types/ConsumeInviteResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/resources/invites/types/ConsumeInviteResponse.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const ConsumeInviteResponse: core.serialization.ObjectSchema; export declare namespace ConsumeInviteResponse { diff --git a/sdks/full/typescript/types/serialization/resources/group/resources/invites/types/CreateInviteRequest.d.ts b/sdks/full/typescript/types/serialization/resources/group/resources/invites/types/CreateInviteRequest.d.ts index 55ebec5830..495e04b875 100644 --- a/sdks/full/typescript/types/serialization/resources/group/resources/invites/types/CreateInviteRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/resources/invites/types/CreateInviteRequest.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const CreateInviteRequest: core.serialization.ObjectSchema; export declare namespace CreateInviteRequest { diff --git a/sdks/full/typescript/types/serialization/resources/group/resources/invites/types/CreateInviteResponse.d.ts b/sdks/full/typescript/types/serialization/resources/group/resources/invites/types/CreateInviteResponse.d.ts index df8d741772..89eebfec2e 100644 --- a/sdks/full/typescript/types/serialization/resources/group/resources/invites/types/CreateInviteResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/resources/invites/types/CreateInviteResponse.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const CreateInviteResponse: core.serialization.ObjectSchema; export declare namespace CreateInviteResponse { diff --git a/sdks/full/typescript/types/serialization/resources/group/resources/invites/types/GetInviteResponse.d.ts b/sdks/full/typescript/types/serialization/resources/group/resources/invites/types/GetInviteResponse.d.ts index 50d66e5492..83cf942298 100644 --- a/sdks/full/typescript/types/serialization/resources/group/resources/invites/types/GetInviteResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/resources/invites/types/GetInviteResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { group } from "../../../../index"; export declare const GetInviteResponse: core.serialization.ObjectSchema; export declare namespace GetInviteResponse { interface Raw { - group: serializers.group.Handle.Raw; + group: group.Handle.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/group/resources/joinRequests/types/ResolveJoinRequestRequest.d.ts b/sdks/full/typescript/types/serialization/resources/group/resources/joinRequests/types/ResolveJoinRequestRequest.d.ts index 5bd7ecbf9a..07c34ee471 100644 --- a/sdks/full/typescript/types/serialization/resources/group/resources/joinRequests/types/ResolveJoinRequestRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/resources/joinRequests/types/ResolveJoinRequestRequest.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const ResolveJoinRequestRequest: core.serialization.ObjectSchema; export declare namespace ResolveJoinRequestRequest { diff --git a/sdks/full/typescript/types/serialization/resources/group/types/CreateRequest.d.ts b/sdks/full/typescript/types/serialization/resources/group/types/CreateRequest.d.ts index fc9bf7f855..a68be1740f 100644 --- a/sdks/full/typescript/types/serialization/resources/group/types/CreateRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/types/CreateRequest.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { common } from "../../index"; export declare const CreateRequest: core.serialization.ObjectSchema; export declare namespace CreateRequest { interface Raw { - display_name: serializers.DisplayName.Raw; + display_name: common.DisplayName.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/group/types/CreateResponse.d.ts b/sdks/full/typescript/types/serialization/resources/group/types/CreateResponse.d.ts index fb31621346..b9b81a9209 100644 --- a/sdks/full/typescript/types/serialization/resources/group/types/CreateResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/types/CreateResponse.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export declare const CreateResponse: core.serialization.ObjectSchema; export declare namespace CreateResponse { diff --git a/sdks/full/typescript/types/serialization/resources/group/types/GetBansResponse.d.ts b/sdks/full/typescript/types/serialization/resources/group/types/GetBansResponse.d.ts index 56f26762bd..ccdbec1f4f 100644 --- a/sdks/full/typescript/types/serialization/resources/group/types/GetBansResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/types/GetBansResponse.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { group, common } from "../../index"; export declare const GetBansResponse: core.serialization.ObjectSchema; export declare namespace GetBansResponse { interface Raw { - banned_identities: serializers.group.BannedIdentity.Raw[]; + banned_identities: group.BannedIdentity.Raw[]; anchor?: string | null; - watch: serializers.WatchResponse.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/group/types/GetJoinRequestsResponse.d.ts b/sdks/full/typescript/types/serialization/resources/group/types/GetJoinRequestsResponse.d.ts index d4624d6470..db878dd3d2 100644 --- a/sdks/full/typescript/types/serialization/resources/group/types/GetJoinRequestsResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/types/GetJoinRequestsResponse.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { group, common } from "../../index"; export declare const GetJoinRequestsResponse: core.serialization.ObjectSchema; export declare namespace GetJoinRequestsResponse { interface Raw { - join_requests: serializers.group.JoinRequest.Raw[]; + join_requests: group.JoinRequest.Raw[]; anchor?: string | null; - watch: serializers.WatchResponse.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/group/types/GetMembersResponse.d.ts b/sdks/full/typescript/types/serialization/resources/group/types/GetMembersResponse.d.ts index fa6696e626..dc31ef285e 100644 --- a/sdks/full/typescript/types/serialization/resources/group/types/GetMembersResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/types/GetMembersResponse.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { group, common } from "../../index"; export declare const GetMembersResponse: core.serialization.ObjectSchema; export declare namespace GetMembersResponse { interface Raw { - members: serializers.group.Member.Raw[]; + members: group.Member.Raw[]; anchor?: string | null; - watch: serializers.WatchResponse.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/group/types/GetProfileResponse.d.ts b/sdks/full/typescript/types/serialization/resources/group/types/GetProfileResponse.d.ts index 9b30ad9cfd..bb98b2f484 100644 --- a/sdks/full/typescript/types/serialization/resources/group/types/GetProfileResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/types/GetProfileResponse.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { group, common } from "../../index"; export declare const GetProfileResponse: core.serialization.ObjectSchema; export declare namespace GetProfileResponse { interface Raw { - group: serializers.group.Profile.Raw; - watch: serializers.WatchResponse.Raw; + group: group.Profile.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/group/types/GetSummaryResponse.d.ts b/sdks/full/typescript/types/serialization/resources/group/types/GetSummaryResponse.d.ts index eae0992607..a6929920e5 100644 --- a/sdks/full/typescript/types/serialization/resources/group/types/GetSummaryResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/types/GetSummaryResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { group } from "../../index"; export declare const GetSummaryResponse: core.serialization.ObjectSchema; export declare namespace GetSummaryResponse { interface Raw { - group: serializers.group.Summary.Raw; + group: group.Summary.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/group/types/ListSuggestedResponse.d.ts b/sdks/full/typescript/types/serialization/resources/group/types/ListSuggestedResponse.d.ts index 7bf3d04c12..ae7eb066cf 100644 --- a/sdks/full/typescript/types/serialization/resources/group/types/ListSuggestedResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/types/ListSuggestedResponse.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { group, common } from "../../index"; export declare const ListSuggestedResponse: core.serialization.ObjectSchema; export declare namespace ListSuggestedResponse { interface Raw { - groups: serializers.group.Summary.Raw[]; - watch: serializers.WatchResponse.Raw; + groups: group.Summary.Raw[]; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/group/types/PrepareAvatarUploadRequest.d.ts b/sdks/full/typescript/types/serialization/resources/group/types/PrepareAvatarUploadRequest.d.ts index a52b3158ff..0aca269b08 100644 --- a/sdks/full/typescript/types/serialization/resources/group/types/PrepareAvatarUploadRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/types/PrepareAvatarUploadRequest.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export declare const PrepareAvatarUploadRequest: core.serialization.ObjectSchema; export declare namespace PrepareAvatarUploadRequest { diff --git a/sdks/full/typescript/types/serialization/resources/group/types/PrepareAvatarUploadResponse.d.ts b/sdks/full/typescript/types/serialization/resources/group/types/PrepareAvatarUploadResponse.d.ts index 821a2e9f77..34e71e63b8 100644 --- a/sdks/full/typescript/types/serialization/resources/group/types/PrepareAvatarUploadResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/types/PrepareAvatarUploadResponse.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { upload } from "../../index"; export declare const PrepareAvatarUploadResponse: core.serialization.ObjectSchema; export declare namespace PrepareAvatarUploadResponse { interface Raw { upload_id: string; - presigned_request: serializers.upload.PresignedRequest.Raw; + presigned_request: upload.PresignedRequest.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/group/types/SearchResponse.d.ts b/sdks/full/typescript/types/serialization/resources/group/types/SearchResponse.d.ts index a53672f888..97613c6f6c 100644 --- a/sdks/full/typescript/types/serialization/resources/group/types/SearchResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/types/SearchResponse.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { group } from "../../index"; export declare const SearchResponse: core.serialization.ObjectSchema; export declare namespace SearchResponse { interface Raw { - groups: serializers.group.Handle.Raw[]; + groups: group.Handle.Raw[]; anchor?: string | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/group/types/TransferOwnershipRequest.d.ts b/sdks/full/typescript/types/serialization/resources/group/types/TransferOwnershipRequest.d.ts index 67af14a269..77453796af 100644 --- a/sdks/full/typescript/types/serialization/resources/group/types/TransferOwnershipRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/types/TransferOwnershipRequest.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export declare const TransferOwnershipRequest: core.serialization.ObjectSchema; export declare namespace TransferOwnershipRequest { diff --git a/sdks/full/typescript/types/serialization/resources/group/types/UpdateProfileRequest.d.ts b/sdks/full/typescript/types/serialization/resources/group/types/UpdateProfileRequest.d.ts index 8ddf72e59c..d9d53dfa8a 100644 --- a/sdks/full/typescript/types/serialization/resources/group/types/UpdateProfileRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/types/UpdateProfileRequest.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { common, group } from "../../index"; export declare const UpdateProfileRequest: core.serialization.ObjectSchema; export declare namespace UpdateProfileRequest { interface Raw { - display_name?: serializers.DisplayName.Raw | null; + display_name?: common.DisplayName.Raw | null; bio?: string | null; - publicity?: serializers.group.Publicity.Raw | null; + publicity?: group.Publicity.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/group/types/ValidateProfileRequest.d.ts b/sdks/full/typescript/types/serialization/resources/group/types/ValidateProfileRequest.d.ts index 65aeb4a76d..7026e8738d 100644 --- a/sdks/full/typescript/types/serialization/resources/group/types/ValidateProfileRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/types/ValidateProfileRequest.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { common, group } from "../../index"; export declare const ValidateProfileRequest: core.serialization.ObjectSchema; export declare namespace ValidateProfileRequest { interface Raw { - display_name?: serializers.DisplayName.Raw | null; - bio?: serializers.DisplayName.Raw | null; - publicity?: serializers.group.Publicity.Raw | null; + display_name?: common.DisplayName.Raw | null; + bio?: common.DisplayName.Raw | null; + publicity?: group.Publicity.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/group/types/ValidateProfileResponse.d.ts b/sdks/full/typescript/types/serialization/resources/group/types/ValidateProfileResponse.d.ts index 9c791401db..eef359ad34 100644 --- a/sdks/full/typescript/types/serialization/resources/group/types/ValidateProfileResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/group/types/ValidateProfileResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { common } from "../../index"; export declare const ValidateProfileResponse: core.serialization.ObjectSchema; export declare namespace ValidateProfileResponse { interface Raw { - errors: serializers.ValidationError.Raw[]; + errors: common.ValidationError.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/client/requests/PrepareAvatarUploadRequest.d.ts b/sdks/full/typescript/types/serialization/resources/identity/client/requests/PrepareAvatarUploadRequest.d.ts index c0f0461611..0a6f543003 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/client/requests/PrepareAvatarUploadRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/client/requests/PrepareAvatarUploadRequest.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../.."; -import * as Rivet from "../../../../../api"; +import * as serializers from "../../../../index"; +import * as Rivet from "../../../../../api/index"; import * as core from "../../../../../core"; export declare const PrepareAvatarUploadRequest: core.serialization.Schema; export declare namespace PrepareAvatarUploadRequest { diff --git a/sdks/full/typescript/types/serialization/resources/identity/client/requests/ReportRequest.d.ts b/sdks/full/typescript/types/serialization/resources/identity/client/requests/ReportRequest.d.ts index 8f952f4e6a..35df65edac 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/client/requests/ReportRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/client/requests/ReportRequest.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../.."; -import * as Rivet from "../../../../../api"; +import * as serializers from "../../../../index"; +import * as Rivet from "../../../../../api/index"; import * as core from "../../../../../core"; export declare const ReportRequest: core.serialization.Schema; export declare namespace ReportRequest { diff --git a/sdks/full/typescript/types/serialization/resources/identity/client/requests/SetGameActivityRequest.d.ts b/sdks/full/typescript/types/serialization/resources/identity/client/requests/SetGameActivityRequest.d.ts index 20637f0640..851381f46b 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/client/requests/SetGameActivityRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/client/requests/SetGameActivityRequest.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../.."; -import * as Rivet from "../../../../../api"; +import * as serializers from "../../../../index"; +import * as Rivet from "../../../../../api/index"; import * as core from "../../../../../core"; +import { identity } from "../../../index"; export declare const SetGameActivityRequest: core.serialization.Schema; export declare namespace SetGameActivityRequest { interface Raw { - game_activity: serializers.identity.UpdateGameActivity.Raw; + game_activity: identity.UpdateGameActivity.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/client/requests/SetupRequest.d.ts b/sdks/full/typescript/types/serialization/resources/identity/client/requests/SetupRequest.d.ts index 5dbf402497..8ba73aedaf 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/client/requests/SetupRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/client/requests/SetupRequest.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../.."; -import * as Rivet from "../../../../../api"; +import * as serializers from "../../../../index"; +import * as Rivet from "../../../../../api/index"; import * as core from "../../../../../core"; +import { common } from "../../../index"; export declare const SetupRequest: core.serialization.Schema; export declare namespace SetupRequest { interface Raw { - existing_identity_token?: serializers.Jwt.Raw | null; + existing_identity_token?: common.Jwt.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/client/requests/SignupForBetaRequest.d.ts b/sdks/full/typescript/types/serialization/resources/identity/client/requests/SignupForBetaRequest.d.ts index 63197979e1..deef572da3 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/client/requests/SignupForBetaRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/client/requests/SignupForBetaRequest.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../.."; -import * as Rivet from "../../../../../api"; +import * as serializers from "../../../../index"; +import * as Rivet from "../../../../../api/index"; import * as core from "../../../../../core"; export declare const SignupForBetaRequest: core.serialization.Schema; export declare namespace SignupForBetaRequest { diff --git a/sdks/full/typescript/types/serialization/resources/identity/client/requests/UpdateProfileRequest.d.ts b/sdks/full/typescript/types/serialization/resources/identity/client/requests/UpdateProfileRequest.d.ts index 177ec20ff7..82bb4e8589 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/client/requests/UpdateProfileRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/client/requests/UpdateProfileRequest.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../.."; -import * as Rivet from "../../../../../api"; +import * as serializers from "../../../../index"; +import * as Rivet from "../../../../../api/index"; import * as core from "../../../../../core"; +import { common } from "../../../index"; export declare const UpdateProfileRequest: core.serialization.Schema; export declare namespace UpdateProfileRequest { interface Raw { - display_name?: serializers.DisplayName.Raw | null; - account_number?: serializers.AccountNumber.Raw | null; - bio?: serializers.Bio.Raw | null; + display_name?: common.DisplayName.Raw | null; + account_number?: common.AccountNumber.Raw | null; + bio?: common.Bio.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/client/requests/UpdateStatusRequest.d.ts b/sdks/full/typescript/types/serialization/resources/identity/client/requests/UpdateStatusRequest.d.ts index 2f952ea8dc..0376b4356a 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/client/requests/UpdateStatusRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/client/requests/UpdateStatusRequest.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../.."; -import * as Rivet from "../../../../../api"; +import * as serializers from "../../../../index"; +import * as Rivet from "../../../../../api/index"; import * as core from "../../../../../core"; +import { identity } from "../../../index"; export declare const UpdateStatusRequest: core.serialization.Schema; export declare namespace UpdateStatusRequest { interface Raw { - status: serializers.identity.Status.Raw; + status: identity.Status.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/client/requests/ValidateProfileRequest.d.ts b/sdks/full/typescript/types/serialization/resources/identity/client/requests/ValidateProfileRequest.d.ts index 0b5b644b67..0f1fe7c6f7 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/client/requests/ValidateProfileRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/client/requests/ValidateProfileRequest.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../.."; -import * as Rivet from "../../../../../api"; +import * as serializers from "../../../../index"; +import * as Rivet from "../../../../../api/index"; import * as core from "../../../../../core"; +import { common } from "../../../index"; export declare const ValidateProfileRequest: core.serialization.Schema; export declare namespace ValidateProfileRequest { interface Raw { - display_name?: serializers.DisplayName.Raw | null; - account_number?: serializers.AccountNumber.Raw | null; - bio?: serializers.Bio.Raw | null; + display_name?: common.DisplayName.Raw | null; + account_number?: common.AccountNumber.Raw | null; + bio?: common.Bio.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/activities/types/ListActivitiesResponse.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/activities/types/ListActivitiesResponse.d.ts index 943bc4c4fe..d2e022bceb 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/activities/types/ListActivitiesResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/activities/types/ListActivitiesResponse.d.ts @@ -1,16 +1,17 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { identity, game, group, common } from "../../../../index"; export declare const ListActivitiesResponse: core.serialization.ObjectSchema; export declare namespace ListActivitiesResponse { interface Raw { - identities: serializers.identity.Handle.Raw[]; - games: serializers.game.Summary.Raw[]; - suggested_groups: serializers.group.Summary.Raw[]; - suggested_players: serializers.identity.Handle.Raw[]; - watch: serializers.WatchResponse.Raw; + identities: identity.Handle.Raw[]; + games: game.Summary.Raw[]; + suggested_groups: group.Summary.Raw[]; + suggested_players: identity.Handle.Raw[]; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/AccessTokenLinkedAccount.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/AccessTokenLinkedAccount.d.ts index df43f057ae..973a2dc458 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/AccessTokenLinkedAccount.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/AccessTokenLinkedAccount.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const AccessTokenLinkedAccount: core.serialization.ObjectSchema; export declare namespace AccessTokenLinkedAccount { diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/DevState.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/DevState.d.ts index e7b1c68c29..d47ce89c64 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/DevState.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/DevState.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const DevState: core.serialization.Schema; export declare namespace DevState { diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/EmailLinkedAccount.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/EmailLinkedAccount.d.ts index 623941eb1d..2ef7f5978b 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/EmailLinkedAccount.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/EmailLinkedAccount.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common } from "../../../../index"; export declare const EmailLinkedAccount: core.serialization.ObjectSchema; export declare namespace EmailLinkedAccount { interface Raw { - email: serializers.Email.Raw; + email: common.Email.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/ExternalLinks.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/ExternalLinks.d.ts index 14df8c7eb2..168c068d6b 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/ExternalLinks.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/ExternalLinks.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const ExternalLinks: core.serialization.ObjectSchema; export declare namespace ExternalLinks { diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GameActivity.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GameActivity.d.ts index 0006687b6b..0231e2e64c 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GameActivity.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GameActivity.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { game } from "../../../../index"; export declare const GameActivity: core.serialization.ObjectSchema; export declare namespace GameActivity { interface Raw { - game: serializers.game.Handle.Raw; + game: game.Handle.Raw; message: string; public_metadata?: unknown | null; mutual_metadata?: unknown | null; diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GameLinkStatus.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GameLinkStatus.d.ts index 58a752ed34..e6d6a13bda 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GameLinkStatus.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GameLinkStatus.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const GameLinkStatus: core.serialization.Schema; export declare namespace GameLinkStatus { diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GlobalEvent.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GlobalEvent.d.ts index 81a6a935e3..74262f0d7f 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GlobalEvent.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GlobalEvent.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common, identity } from "../../../../index"; export declare const GlobalEvent: core.serialization.ObjectSchema; export declare namespace GlobalEvent { interface Raw { - ts: serializers.Timestamp.Raw; - kind: serializers.identity.GlobalEventKind.Raw; - notification?: serializers.identity.GlobalEventNotification.Raw | null; + ts: common.Timestamp.Raw; + kind: identity.GlobalEventKind.Raw; + notification?: identity.GlobalEventNotification.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GlobalEventIdentityUpdate.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GlobalEventIdentityUpdate.d.ts index e4db0e2284..2d7563ce13 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GlobalEventIdentityUpdate.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GlobalEventIdentityUpdate.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { identity } from "../../../../index"; export declare const GlobalEventIdentityUpdate: core.serialization.ObjectSchema; export declare namespace GlobalEventIdentityUpdate { interface Raw { - identity: serializers.identity.Profile.Raw; + identity: identity.Profile.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GlobalEventKind.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GlobalEventKind.d.ts index 542af0788d..64780f9966 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GlobalEventKind.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GlobalEventKind.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { identity } from "../../../../index"; export declare const GlobalEventKind: core.serialization.ObjectSchema; export declare namespace GlobalEventKind { interface Raw { - identity_update?: serializers.identity.GlobalEventIdentityUpdate.Raw | null; - matchmaker_lobby_join?: serializers.identity.GlobalEventMatchmakerLobbyJoin.Raw | null; + identity_update?: identity.GlobalEventIdentityUpdate.Raw | null; + matchmaker_lobby_join?: identity.GlobalEventMatchmakerLobbyJoin.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GlobalEventMatchmakerLobbyJoin.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GlobalEventMatchmakerLobbyJoin.d.ts index 7a26a512ef..7397191c58 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GlobalEventMatchmakerLobbyJoin.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GlobalEventMatchmakerLobbyJoin.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { matchmaker } from "../../../../index"; export declare const GlobalEventMatchmakerLobbyJoin: core.serialization.ObjectSchema; export declare namespace GlobalEventMatchmakerLobbyJoin { interface Raw { - lobby: serializers.matchmaker.JoinLobby.Raw; - ports: Record; - player: serializers.matchmaker.JoinPlayer.Raw; + lobby: matchmaker.JoinLobby.Raw; + ports: Record; + player: matchmaker.JoinPlayer.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GlobalEventNotification.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GlobalEventNotification.d.ts index 3c7aa072dd..2584655bff 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GlobalEventNotification.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/GlobalEventNotification.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const GlobalEventNotification: core.serialization.ObjectSchema; export declare namespace GlobalEventNotification { diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/Group.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/Group.d.ts index cd9e269667..2232e87ec8 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/Group.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/Group.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { group } from "../../../../index"; export declare const Group: core.serialization.ObjectSchema; export declare namespace Group { interface Raw { - group: serializers.group.Handle.Raw; + group: group.Handle.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/Handle.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/Handle.d.ts index 66b83b89ab..93c0aa1efb 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/Handle.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/Handle.d.ts @@ -1,18 +1,19 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common, identity } from "../../../../index"; export declare const Handle: core.serialization.ObjectSchema; export declare namespace Handle { interface Raw { identity_id: string; - display_name: serializers.DisplayName.Raw; - account_number: serializers.AccountNumber.Raw; + display_name: common.DisplayName.Raw; + account_number: common.AccountNumber.Raw; avatar_url: string; - presence?: serializers.identity.Presence.Raw | null; + presence?: identity.Presence.Raw | null; is_registered: boolean; - external: serializers.identity.ExternalLinks.Raw; + external: identity.ExternalLinks.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/LinkedAccount.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/LinkedAccount.d.ts index a22c060cdb..ff42678b55 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/LinkedAccount.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/LinkedAccount.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { identity } from "../../../../index"; export declare const LinkedAccount: core.serialization.ObjectSchema; export declare namespace LinkedAccount { interface Raw { - email?: serializers.identity.EmailLinkedAccount.Raw | null; - access_token?: serializers.identity.AccessTokenLinkedAccount.Raw | null; + email?: identity.EmailLinkedAccount.Raw | null; + access_token?: identity.AccessTokenLinkedAccount.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/Presence.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/Presence.d.ts index 54dd0db80e..d01537948c 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/Presence.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/Presence.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common, identity } from "../../../../index"; export declare const Presence: core.serialization.ObjectSchema; export declare namespace Presence { interface Raw { - update_ts: serializers.Timestamp.Raw; - status: serializers.identity.Status.Raw; - game_activity?: serializers.identity.GameActivity.Raw | null; + update_ts: common.Timestamp.Raw; + status: identity.Status.Raw; + game_activity?: identity.GameActivity.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/Profile.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/Profile.d.ts index 3797735c2b..90c083b8ea 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/Profile.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/Profile.d.ts @@ -1,32 +1,33 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common, identity, game } from "../../../../index"; export declare const Profile: core.serialization.ObjectSchema; export declare namespace Profile { interface Raw { identity_id: string; - display_name: serializers.DisplayName.Raw; - account_number: serializers.AccountNumber.Raw; + display_name: common.DisplayName.Raw; + account_number: common.AccountNumber.Raw; avatar_url: string; - presence?: serializers.identity.Presence.Raw | null; + presence?: identity.Presence.Raw | null; is_registered: boolean; - external: serializers.identity.ExternalLinks.Raw; + external: identity.ExternalLinks.Raw; is_admin: boolean; is_game_linked?: boolean | null; - dev_state?: serializers.identity.DevState.Raw | null; + dev_state?: identity.DevState.Raw | null; follower_count: number; following_count: number; following: boolean; is_following_me: boolean; is_mutual_following: boolean; - join_ts: serializers.Timestamp.Raw; - bio: serializers.Bio.Raw; - linked_accounts: serializers.identity.LinkedAccount.Raw[]; - groups: serializers.identity.Group.Raw[]; - games: serializers.game.StatSummary.Raw[]; + join_ts: common.Timestamp.Raw; + bio: common.Bio.Raw; + linked_accounts: identity.LinkedAccount.Raw[]; + groups: identity.Group.Raw[]; + games: game.StatSummary.Raw[]; awaiting_deletion?: boolean | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/Status.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/Status.d.ts index 7572271145..b702d1437a 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/Status.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/Status.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const Status: core.serialization.Schema; export declare namespace Status { diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/Summary.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/Summary.d.ts index 90b8d7443d..cad29f2444 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/Summary.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/Summary.d.ts @@ -1,19 +1,20 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common, identity } from "../../../../index"; export declare const Summary: core.serialization.ObjectSchema; export declare namespace Summary { interface Raw { identity_id: string; - display_name: serializers.DisplayName.Raw; - account_number: serializers.AccountNumber.Raw; + display_name: common.DisplayName.Raw; + account_number: common.AccountNumber.Raw; avatar_url: string; - presence?: serializers.identity.Presence.Raw | null; + presence?: identity.Presence.Raw | null; is_registered: boolean; - external: serializers.identity.ExternalLinks.Raw; + external: identity.ExternalLinks.Raw; following: boolean; is_following_me: boolean; is_mutual_following: boolean; diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/UpdateGameActivity.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/UpdateGameActivity.d.ts index 1343a964b9..3305c5544b 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/UpdateGameActivity.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/common/types/UpdateGameActivity.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const UpdateGameActivity: core.serialization.ObjectSchema; export declare namespace UpdateGameActivity { diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/events/types/WatchEventsResponse.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/events/types/WatchEventsResponse.d.ts index 42098ed1fa..11d7f23cc1 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/events/types/WatchEventsResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/events/types/WatchEventsResponse.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { identity, common } from "../../../../index"; export declare const WatchEventsResponse: core.serialization.ObjectSchema; export declare namespace WatchEventsResponse { interface Raw { - events: serializers.identity.GlobalEvent.Raw[]; - watch: serializers.WatchResponse.Raw; + events: identity.GlobalEvent.Raw[]; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/links/types/CancelGameLinkRequest.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/links/types/CancelGameLinkRequest.d.ts index e6c56efe3c..6ef60678f5 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/links/types/CancelGameLinkRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/links/types/CancelGameLinkRequest.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common } from "../../../../index"; export declare const CancelGameLinkRequest: core.serialization.ObjectSchema; export declare namespace CancelGameLinkRequest { interface Raw { - identity_link_token: serializers.Jwt.Raw; + identity_link_token: common.Jwt.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/links/types/CompleteGameLinkRequest.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/links/types/CompleteGameLinkRequest.d.ts index 0f0b20c320..1fec268d20 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/links/types/CompleteGameLinkRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/links/types/CompleteGameLinkRequest.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common } from "../../../../index"; export declare const CompleteGameLinkRequest: core.serialization.ObjectSchema; export declare namespace CompleteGameLinkRequest { interface Raw { - identity_link_token: serializers.Jwt.Raw; + identity_link_token: common.Jwt.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/links/types/GetGameLinkNewIdentity.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/links/types/GetGameLinkNewIdentity.d.ts index d79ae35c6e..3efcebe676 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/links/types/GetGameLinkNewIdentity.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/links/types/GetGameLinkNewIdentity.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common, identity } from "../../../../index"; export declare const GetGameLinkNewIdentity: core.serialization.ObjectSchema; export declare namespace GetGameLinkNewIdentity { interface Raw { - identity_token: serializers.Jwt.Raw; - identity_token_expire_ts: serializers.Timestamp.Raw; - identity: serializers.identity.Profile.Raw; + identity_token: common.Jwt.Raw; + identity_token_expire_ts: common.Timestamp.Raw; + identity: identity.Profile.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/links/types/GetGameLinkResponse.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/links/types/GetGameLinkResponse.d.ts index 4c42d7bc03..a819a990e3 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/links/types/GetGameLinkResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/links/types/GetGameLinkResponse.d.ts @@ -1,16 +1,17 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { identity, game, common } from "../../../../index"; export declare const GetGameLinkResponse: core.serialization.ObjectSchema; export declare namespace GetGameLinkResponse { interface Raw { - status: serializers.identity.GameLinkStatus.Raw; - game: serializers.game.Handle.Raw; - current_identity: serializers.identity.Handle.Raw; - new_identity?: serializers.identity.GetGameLinkNewIdentity.Raw | null; - watch: serializers.WatchResponse.Raw; + status: identity.GameLinkStatus.Raw; + game: game.Handle.Raw; + current_identity: identity.Handle.Raw; + new_identity?: identity.GetGameLinkNewIdentity.Raw | null; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/resources/links/types/PrepareGameLinkResponse.d.ts b/sdks/full/typescript/types/serialization/resources/identity/resources/links/types/PrepareGameLinkResponse.d.ts index af12b7a365..e5eef2e9a7 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/resources/links/types/PrepareGameLinkResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/resources/links/types/PrepareGameLinkResponse.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common } from "../../../../index"; export declare const PrepareGameLinkResponse: core.serialization.ObjectSchema; export declare namespace PrepareGameLinkResponse { interface Raw { identity_link_token: string; identity_link_url: string; - expire_ts: serializers.Timestamp.Raw; + expire_ts: common.Timestamp.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/types/GetHandlesResponse.d.ts b/sdks/full/typescript/types/serialization/resources/identity/types/GetHandlesResponse.d.ts index c329ff1424..9e922a9b1b 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/types/GetHandlesResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/types/GetHandlesResponse.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { identity, common } from "../../index"; export declare const GetHandlesResponse: core.serialization.ObjectSchema; export declare namespace GetHandlesResponse { interface Raw { - identities: serializers.identity.Handle.Raw[]; - watch: serializers.WatchResponse.Raw; + identities: identity.Handle.Raw[]; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/types/GetProfileResponse.d.ts b/sdks/full/typescript/types/serialization/resources/identity/types/GetProfileResponse.d.ts index 448b093474..a14b53d8a2 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/types/GetProfileResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/types/GetProfileResponse.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { identity, common } from "../../index"; export declare const GetProfileResponse: core.serialization.ObjectSchema; export declare namespace GetProfileResponse { interface Raw { - identity: serializers.identity.Profile.Raw; - watch: serializers.WatchResponse.Raw; + identity: identity.Profile.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/types/GetSummariesResponse.d.ts b/sdks/full/typescript/types/serialization/resources/identity/types/GetSummariesResponse.d.ts index 3aaf0ef730..a760bf4318 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/types/GetSummariesResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/types/GetSummariesResponse.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { identity, common } from "../../index"; export declare const GetSummariesResponse: core.serialization.ObjectSchema; export declare namespace GetSummariesResponse { interface Raw { - identities: serializers.identity.Summary.Raw[]; - watch: serializers.WatchResponse.Raw; + identities: identity.Summary.Raw[]; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/types/ListFollowersResponse.d.ts b/sdks/full/typescript/types/serialization/resources/identity/types/ListFollowersResponse.d.ts index 6c3313eb5e..d74c96724a 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/types/ListFollowersResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/types/ListFollowersResponse.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { identity, common } from "../../index"; export declare const ListFollowersResponse: core.serialization.ObjectSchema; export declare namespace ListFollowersResponse { interface Raw { - identities: serializers.identity.Handle.Raw[]; + identities: identity.Handle.Raw[]; anchor?: string | null; - watch: serializers.WatchResponse.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/types/ListFollowingResponse.d.ts b/sdks/full/typescript/types/serialization/resources/identity/types/ListFollowingResponse.d.ts index 47b96b5355..7b7c56fc89 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/types/ListFollowingResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/types/ListFollowingResponse.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { identity, common } from "../../index"; export declare const ListFollowingResponse: core.serialization.ObjectSchema; export declare namespace ListFollowingResponse { interface Raw { - identities: serializers.identity.Handle.Raw[]; + identities: identity.Handle.Raw[]; anchor?: string | null; - watch: serializers.WatchResponse.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/types/ListFriendsResponse.d.ts b/sdks/full/typescript/types/serialization/resources/identity/types/ListFriendsResponse.d.ts index e570f641a9..946fcadacc 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/types/ListFriendsResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/types/ListFriendsResponse.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { identity, common } from "../../index"; export declare const ListFriendsResponse: core.serialization.ObjectSchema; export declare namespace ListFriendsResponse { interface Raw { - identities: serializers.identity.Handle.Raw[]; + identities: identity.Handle.Raw[]; anchor?: string | null; - watch: serializers.WatchResponse.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/types/ListMutualFriendsResponse.d.ts b/sdks/full/typescript/types/serialization/resources/identity/types/ListMutualFriendsResponse.d.ts index ee681fbab2..a5acdadacf 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/types/ListMutualFriendsResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/types/ListMutualFriendsResponse.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { identity } from "../../index"; export declare const ListMutualFriendsResponse: core.serialization.ObjectSchema; export declare namespace ListMutualFriendsResponse { interface Raw { - identities: serializers.identity.Handle.Raw[]; + identities: identity.Handle.Raw[]; anchor?: string | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/types/ListRecentFollowersResponse.d.ts b/sdks/full/typescript/types/serialization/resources/identity/types/ListRecentFollowersResponse.d.ts index 7f23dca781..d257065a22 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/types/ListRecentFollowersResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/types/ListRecentFollowersResponse.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { identity, common } from "../../index"; export declare const ListRecentFollowersResponse: core.serialization.ObjectSchema; export declare namespace ListRecentFollowersResponse { interface Raw { - identities: serializers.identity.Handle.Raw[]; + identities: identity.Handle.Raw[]; anchor?: string | null; - watch: serializers.WatchResponse.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/types/PrepareAvatarUploadResponse.d.ts b/sdks/full/typescript/types/serialization/resources/identity/types/PrepareAvatarUploadResponse.d.ts index e641aaad28..a1fa12741f 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/types/PrepareAvatarUploadResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/types/PrepareAvatarUploadResponse.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { upload } from "../../index"; export declare const PrepareAvatarUploadResponse: core.serialization.ObjectSchema; export declare namespace PrepareAvatarUploadResponse { interface Raw { upload_id: string; - presigned_request: serializers.upload.PresignedRequest.Raw; + presigned_request: upload.PresignedRequest.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/types/SearchResponse.d.ts b/sdks/full/typescript/types/serialization/resources/identity/types/SearchResponse.d.ts index 16cca21f19..c84a291402 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/types/SearchResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/types/SearchResponse.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { identity } from "../../index"; export declare const SearchResponse: core.serialization.ObjectSchema; export declare namespace SearchResponse { interface Raw { - identities: serializers.identity.Handle.Raw[]; + identities: identity.Handle.Raw[]; anchor?: string | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/types/SetupResponse.d.ts b/sdks/full/typescript/types/serialization/resources/identity/types/SetupResponse.d.ts index 4fc1e64059..139c9f045d 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/types/SetupResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/types/SetupResponse.d.ts @@ -1,15 +1,16 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { common, identity } from "../../index"; export declare const SetupResponse: core.serialization.ObjectSchema; export declare namespace SetupResponse { interface Raw { - identity_token: serializers.Jwt.Raw; - identity_token_expire_ts: serializers.Timestamp.Raw; - identity: serializers.identity.Profile.Raw; + identity_token: common.Jwt.Raw; + identity_token_expire_ts: common.Timestamp.Raw; + identity: identity.Profile.Raw; game_id: string; } } diff --git a/sdks/full/typescript/types/serialization/resources/identity/types/ValidateProfileResponse.d.ts b/sdks/full/typescript/types/serialization/resources/identity/types/ValidateProfileResponse.d.ts index 4c68970110..9b19b63015 100644 --- a/sdks/full/typescript/types/serialization/resources/identity/types/ValidateProfileResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/identity/types/ValidateProfileResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { common } from "../../index"; export declare const ValidateProfileResponse: core.serialization.ObjectSchema; export declare namespace ValidateProfileResponse { interface Raw { - errors: serializers.ValidationError.Raw[]; + errors: common.ValidationError.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/kv/resources/common/types/Directory.d.ts b/sdks/full/typescript/types/serialization/resources/kv/resources/common/types/Directory.d.ts index 7b58a9061b..abb5a417ac 100644 --- a/sdks/full/typescript/types/serialization/resources/kv/resources/common/types/Directory.d.ts +++ b/sdks/full/typescript/types/serialization/resources/kv/resources/common/types/Directory.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const Directory: core.serialization.Schema; export declare namespace Directory { diff --git a/sdks/full/typescript/types/serialization/resources/kv/resources/common/types/Entry.d.ts b/sdks/full/typescript/types/serialization/resources/kv/resources/common/types/Entry.d.ts index e94b73dd7c..7dcaefc280 100644 --- a/sdks/full/typescript/types/serialization/resources/kv/resources/common/types/Entry.d.ts +++ b/sdks/full/typescript/types/serialization/resources/kv/resources/common/types/Entry.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { kv } from "../../../../index"; export declare const Entry: core.serialization.ObjectSchema; export declare namespace Entry { interface Raw { - key: serializers.kv.Key.Raw; - value?: serializers.kv.Value.Raw; + key: kv.Key.Raw; + value?: kv.Value.Raw; deleted?: boolean | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/kv/resources/common/types/Key.d.ts b/sdks/full/typescript/types/serialization/resources/kv/resources/common/types/Key.d.ts index efb978f544..edf4f034f3 100644 --- a/sdks/full/typescript/types/serialization/resources/kv/resources/common/types/Key.d.ts +++ b/sdks/full/typescript/types/serialization/resources/kv/resources/common/types/Key.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const Key: core.serialization.Schema; export declare namespace Key { diff --git a/sdks/full/typescript/types/serialization/resources/kv/resources/common/types/PutEntry.d.ts b/sdks/full/typescript/types/serialization/resources/kv/resources/common/types/PutEntry.d.ts index b93a8ce1e2..520f391c4f 100644 --- a/sdks/full/typescript/types/serialization/resources/kv/resources/common/types/PutEntry.d.ts +++ b/sdks/full/typescript/types/serialization/resources/kv/resources/common/types/PutEntry.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { kv } from "../../../../index"; export declare const PutEntry: core.serialization.ObjectSchema; export declare namespace PutEntry { interface Raw { - key: serializers.kv.Key.Raw; - value?: serializers.kv.Value.Raw; + key: kv.Key.Raw; + value?: kv.Value.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/kv/resources/common/types/Value.d.ts b/sdks/full/typescript/types/serialization/resources/kv/resources/common/types/Value.d.ts index 2d83f95f58..2f16bd4cd6 100644 --- a/sdks/full/typescript/types/serialization/resources/kv/resources/common/types/Value.d.ts +++ b/sdks/full/typescript/types/serialization/resources/kv/resources/common/types/Value.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const Value: core.serialization.Schema; export declare namespace Value { diff --git a/sdks/full/typescript/types/serialization/resources/kv/types/GetBatchResponse.d.ts b/sdks/full/typescript/types/serialization/resources/kv/types/GetBatchResponse.d.ts index 467de4ed49..9be9c3b601 100644 --- a/sdks/full/typescript/types/serialization/resources/kv/types/GetBatchResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/kv/types/GetBatchResponse.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { kv, common } from "../../index"; export declare const GetBatchResponse: core.serialization.ObjectSchema; export declare namespace GetBatchResponse { interface Raw { - entries: serializers.kv.Entry.Raw[]; - watch: serializers.WatchResponse.Raw; + entries: kv.Entry.Raw[]; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/kv/types/GetResponse.d.ts b/sdks/full/typescript/types/serialization/resources/kv/types/GetResponse.d.ts index 0a02824174..d907618914 100644 --- a/sdks/full/typescript/types/serialization/resources/kv/types/GetResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/kv/types/GetResponse.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { kv, common } from "../../index"; export declare const GetResponse: core.serialization.ObjectSchema; export declare namespace GetResponse { interface Raw { - value?: serializers.kv.Value.Raw; + value?: kv.Value.Raw; deleted?: boolean | null; - watch: serializers.WatchResponse.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/kv/types/ListResponse.d.ts b/sdks/full/typescript/types/serialization/resources/kv/types/ListResponse.d.ts index 600f45cca3..b25c76e436 100644 --- a/sdks/full/typescript/types/serialization/resources/kv/types/ListResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/kv/types/ListResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { kv } from "../../index"; export declare const ListResponse: core.serialization.ObjectSchema; export declare namespace ListResponse { interface Raw { - entries: serializers.kv.Entry.Raw[]; + entries: kv.Entry.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/kv/types/PutBatchRequest.d.ts b/sdks/full/typescript/types/serialization/resources/kv/types/PutBatchRequest.d.ts index b3b1cf9809..e0849acdf6 100644 --- a/sdks/full/typescript/types/serialization/resources/kv/types/PutBatchRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/kv/types/PutBatchRequest.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { kv } from "../../index"; export declare const PutBatchRequest: core.serialization.ObjectSchema; export declare namespace PutBatchRequest { interface Raw { namespace_id?: string | null; - entries: serializers.kv.PutEntry.Raw[]; + entries: kv.PutEntry.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/kv/types/PutRequest.d.ts b/sdks/full/typescript/types/serialization/resources/kv/types/PutRequest.d.ts index 95ede774a4..c09f6e4b27 100644 --- a/sdks/full/typescript/types/serialization/resources/kv/types/PutRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/kv/types/PutRequest.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { kv } from "../../index"; export declare const PutRequest: core.serialization.ObjectSchema; export declare namespace PutRequest { interface Raw { namespace_id?: string | null; - key: serializers.kv.Key.Raw; - value?: serializers.kv.Value.Raw; + key: kv.Key.Raw; + value?: kv.Value.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/CustomLobbyPublicity.d.ts b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/CustomLobbyPublicity.d.ts index 8c13c75acb..a4666c0a14 100644 --- a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/CustomLobbyPublicity.d.ts +++ b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/CustomLobbyPublicity.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const CustomLobbyPublicity: core.serialization.Schema; export declare namespace CustomLobbyPublicity { diff --git a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/GameModeInfo.d.ts b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/GameModeInfo.d.ts index 6f5ff4a8d8..76a76bb6d7 100644 --- a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/GameModeInfo.d.ts +++ b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/GameModeInfo.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common } from "../../../../index"; export declare const GameModeInfo: core.serialization.ObjectSchema; export declare namespace GameModeInfo { interface Raw { - game_mode_id: serializers.Identifier.Raw; + game_mode_id: common.Identifier.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/JoinLobby.d.ts b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/JoinLobby.d.ts index c40eb74a8d..023421438f 100644 --- a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/JoinLobby.d.ts +++ b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/JoinLobby.d.ts @@ -1,15 +1,16 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { matchmaker } from "../../../../index"; export declare const JoinLobby: core.serialization.ObjectSchema; export declare namespace JoinLobby { interface Raw { lobby_id: string; - region: serializers.matchmaker.JoinRegion.Raw; - ports: Record; - player: serializers.matchmaker.JoinPlayer.Raw; + region: matchmaker.JoinRegion.Raw; + ports: Record; + player: matchmaker.JoinPlayer.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/JoinPlayer.d.ts b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/JoinPlayer.d.ts index 9c21f049bb..707e160f28 100644 --- a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/JoinPlayer.d.ts +++ b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/JoinPlayer.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common } from "../../../../index"; export declare const JoinPlayer: core.serialization.ObjectSchema; export declare namespace JoinPlayer { interface Raw { - token: serializers.Jwt.Raw; + token: common.Jwt.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/JoinPort.d.ts b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/JoinPort.d.ts index 21babb506f..ca313c8fc1 100644 --- a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/JoinPort.d.ts +++ b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/JoinPort.d.ts @@ -1,16 +1,17 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { matchmaker } from "../../../../index"; export declare const JoinPort: core.serialization.ObjectSchema; export declare namespace JoinPort { interface Raw { host?: string | null; hostname: string; port?: number | null; - port_range?: serializers.matchmaker.JoinPortRange.Raw | null; + port_range?: matchmaker.JoinPortRange.Raw | null; is_tls: boolean; } } diff --git a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/JoinPortRange.d.ts b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/JoinPortRange.d.ts index 6fbc7b7877..732be028b5 100644 --- a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/JoinPortRange.d.ts +++ b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/JoinPortRange.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const JoinPortRange: core.serialization.ObjectSchema; export declare namespace JoinPortRange { diff --git a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/JoinRegion.d.ts b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/JoinRegion.d.ts index d97fd93f08..4b1458ffbc 100644 --- a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/JoinRegion.d.ts +++ b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/JoinRegion.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common } from "../../../../index"; export declare const JoinRegion: core.serialization.ObjectSchema; export declare namespace JoinRegion { interface Raw { - region_id: serializers.Identifier.Raw; - display_name: serializers.DisplayName.Raw; + region_id: common.Identifier.Raw; + display_name: common.DisplayName.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/LobbyInfo.d.ts b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/LobbyInfo.d.ts index dfd901818b..b2cddef327 100644 --- a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/LobbyInfo.d.ts +++ b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/LobbyInfo.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const LobbyInfo: core.serialization.ObjectSchema; export declare namespace LobbyInfo { diff --git a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/RegionInfo.d.ts b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/RegionInfo.d.ts index 3f78fb1d16..12f821e169 100644 --- a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/RegionInfo.d.ts +++ b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/common/types/RegionInfo.d.ts @@ -1,16 +1,17 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common, geo } from "../../../../index"; export declare const RegionInfo: core.serialization.ObjectSchema; export declare namespace RegionInfo { interface Raw { - region_id: serializers.Identifier.Raw; - provider_display_name: serializers.DisplayName.Raw; - region_display_name: serializers.DisplayName.Raw; - datacenter_coord: serializers.geo.Coord.Raw; - datacenter_distance_from_client: serializers.geo.Distance.Raw; + region_id: common.Identifier.Raw; + provider_display_name: common.DisplayName.Raw; + region_display_name: common.DisplayName.Raw; + datacenter_coord: geo.Coord.Raw; + datacenter_distance_from_client: geo.Distance.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/client/getState.d.ts b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/client/getState.d.ts index 46aaf8cc41..cfcbb90b86 100644 --- a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/client/getState.d.ts +++ b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/client/getState.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; +import * as serializers from "../../../../../index"; import * as core from "../../../../../../core"; export declare const Response: core.serialization.Schema; export declare namespace Response { diff --git a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/client/requests/CreateLobbyRequest.d.ts b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/client/requests/CreateLobbyRequest.d.ts index 616d4141ae..2cf41129a8 100644 --- a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/client/requests/CreateLobbyRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/client/requests/CreateLobbyRequest.d.ts @@ -1,19 +1,20 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Rivet from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Rivet from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { matchmaker, captcha } from "../../../../../index"; export declare const CreateLobbyRequest: core.serialization.Schema; export declare namespace CreateLobbyRequest { interface Raw { game_mode: string; region?: string | null; - publicity?: serializers.matchmaker.CustomLobbyPublicity.Raw | null; + publicity?: matchmaker.CustomLobbyPublicity.Raw | null; tags?: Record | null; max_players?: number | null; lobby_config?: unknown | null; - captcha?: serializers.captcha.Config.Raw | null; + captcha?: captcha.Config.Raw | null; verification_data?: unknown | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/client/requests/FindLobbyRequest.d.ts b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/client/requests/FindLobbyRequest.d.ts index ea3d543ba0..cd9a3b6b10 100644 --- a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/client/requests/FindLobbyRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/client/requests/FindLobbyRequest.d.ts @@ -1,9 +1,10 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Rivet from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Rivet from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { captcha } from "../../../../../index"; export declare const FindLobbyRequest: core.serialization.Schema>; export declare namespace FindLobbyRequest { interface Raw { @@ -12,7 +13,7 @@ export declare namespace FindLobbyRequest { prevent_auto_create_lobby?: boolean | null; tags?: Record | null; max_players?: number | null; - captcha?: serializers.captcha.Config.Raw | null; + captcha?: captcha.Config.Raw | null; verification_data?: unknown | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/client/requests/JoinLobbyRequest.d.ts b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/client/requests/JoinLobbyRequest.d.ts index 073403d1b9..2588d4ea27 100644 --- a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/client/requests/JoinLobbyRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/client/requests/JoinLobbyRequest.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Rivet from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Rivet from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { captcha } from "../../../../../index"; export declare const JoinLobbyRequest: core.serialization.Schema; export declare namespace JoinLobbyRequest { interface Raw { lobby_id: string; - captcha?: serializers.captcha.Config.Raw | null; + captcha?: captcha.Config.Raw | null; verification_data?: unknown | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/client/requests/SetLobbyClosedRequest.d.ts b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/client/requests/SetLobbyClosedRequest.d.ts index ae9b8889c8..9ea766f30b 100644 --- a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/client/requests/SetLobbyClosedRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/client/requests/SetLobbyClosedRequest.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Rivet from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Rivet from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export declare const SetLobbyClosedRequest: core.serialization.Schema; export declare namespace SetLobbyClosedRequest { diff --git a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/client/setState.d.ts b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/client/setState.d.ts index a1a3f3d474..db10eadf47 100644 --- a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/client/setState.d.ts +++ b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/client/setState.d.ts @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; +import * as serializers from "../../../../../index"; import * as core from "../../../../../../core"; export declare const Request: core.serialization.Schema; export declare namespace Request { diff --git a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/types/CreateLobbyResponse.d.ts b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/types/CreateLobbyResponse.d.ts index e14e589f32..8313467be8 100644 --- a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/types/CreateLobbyResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/types/CreateLobbyResponse.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { matchmaker } from "../../../../index"; export declare const CreateLobbyResponse: core.serialization.ObjectSchema; export declare namespace CreateLobbyResponse { interface Raw { - lobby: serializers.matchmaker.JoinLobby.Raw; - ports: Record; - player: serializers.matchmaker.JoinPlayer.Raw; + lobby: matchmaker.JoinLobby.Raw; + ports: Record; + player: matchmaker.JoinPlayer.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/types/FindLobbyResponse.d.ts b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/types/FindLobbyResponse.d.ts index a4b366f1eb..ae6de316d7 100644 --- a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/types/FindLobbyResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/types/FindLobbyResponse.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { matchmaker } from "../../../../index"; export declare const FindLobbyResponse: core.serialization.ObjectSchema; export declare namespace FindLobbyResponse { interface Raw { - lobby: serializers.matchmaker.JoinLobby.Raw; - ports: Record; - player: serializers.matchmaker.JoinPlayer.Raw; + lobby: matchmaker.JoinLobby.Raw; + ports: Record; + player: matchmaker.JoinPlayer.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/types/JoinLobbyResponse.d.ts b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/types/JoinLobbyResponse.d.ts index ff4f589ce3..f06a6815be 100644 --- a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/types/JoinLobbyResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/types/JoinLobbyResponse.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { matchmaker } from "../../../../index"; export declare const JoinLobbyResponse: core.serialization.ObjectSchema; export declare namespace JoinLobbyResponse { interface Raw { - lobby: serializers.matchmaker.JoinLobby.Raw; - ports: Record; - player: serializers.matchmaker.JoinPlayer.Raw; + lobby: matchmaker.JoinLobby.Raw; + ports: Record; + player: matchmaker.JoinPlayer.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/types/ListLobbiesResponse.d.ts b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/types/ListLobbiesResponse.d.ts index f3af5b7f77..4cd05d8622 100644 --- a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/types/ListLobbiesResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/lobbies/types/ListLobbiesResponse.d.ts @@ -1,14 +1,15 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { matchmaker } from "../../../../index"; export declare const ListLobbiesResponse: core.serialization.ObjectSchema; export declare namespace ListLobbiesResponse { interface Raw { - game_modes: serializers.matchmaker.GameModeInfo.Raw[]; - regions: serializers.matchmaker.RegionInfo.Raw[]; - lobbies: serializers.matchmaker.LobbyInfo.Raw[]; + game_modes: matchmaker.GameModeInfo.Raw[]; + regions: matchmaker.RegionInfo.Raw[]; + lobbies: matchmaker.LobbyInfo.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/players/client/requests/PlayerConnectedRequest.d.ts b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/players/client/requests/PlayerConnectedRequest.d.ts index 7a963a482f..3e7d6352d7 100644 --- a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/players/client/requests/PlayerConnectedRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/players/client/requests/PlayerConnectedRequest.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Rivet from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Rivet from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export declare const PlayerConnectedRequest: core.serialization.Schema; export declare namespace PlayerConnectedRequest { diff --git a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/players/client/requests/PlayerDisconnectedRequest.d.ts b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/players/client/requests/PlayerDisconnectedRequest.d.ts index 9f411624ca..89943c8426 100644 --- a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/players/client/requests/PlayerDisconnectedRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/players/client/requests/PlayerDisconnectedRequest.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Rivet from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Rivet from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export declare const PlayerDisconnectedRequest: core.serialization.Schema; export declare namespace PlayerDisconnectedRequest { diff --git a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/players/types/GameModeStatistics.d.ts b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/players/types/GameModeStatistics.d.ts index 107aef90f5..fb12a8e1a6 100644 --- a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/players/types/GameModeStatistics.d.ts +++ b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/players/types/GameModeStatistics.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common, matchmaker } from "../../../../index"; export declare const GameModeStatistics: core.serialization.ObjectSchema; export declare namespace GameModeStatistics { interface Raw { player_count: number; - regions: Record; + regions: Record; } } diff --git a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/players/types/GetStatisticsResponse.d.ts b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/players/types/GetStatisticsResponse.d.ts index 6792b58734..2af8e53566 100644 --- a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/players/types/GetStatisticsResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/players/types/GetStatisticsResponse.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { common, matchmaker } from "../../../../index"; export declare const GetStatisticsResponse: core.serialization.ObjectSchema; export declare namespace GetStatisticsResponse { interface Raw { player_count: number; - game_modes: Record; + game_modes: Record; } } diff --git a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/players/types/RegionStatistics.d.ts b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/players/types/RegionStatistics.d.ts index 951803449d..35c4ba3a98 100644 --- a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/players/types/RegionStatistics.d.ts +++ b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/players/types/RegionStatistics.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const RegionStatistics: core.serialization.ObjectSchema; export declare namespace RegionStatistics { diff --git a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/regions/types/ListRegionsResponse.d.ts b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/regions/types/ListRegionsResponse.d.ts index 39d0c06ab7..0c79fa92a3 100644 --- a/sdks/full/typescript/types/serialization/resources/matchmaker/resources/regions/types/ListRegionsResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/matchmaker/resources/regions/types/ListRegionsResponse.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { matchmaker } from "../../../../index"; export declare const ListRegionsResponse: core.serialization.ObjectSchema; export declare namespace ListRegionsResponse { interface Raw { - regions: serializers.matchmaker.RegionInfo.Raw[]; + regions: matchmaker.RegionInfo.Raw[]; } } diff --git a/sdks/full/typescript/types/serialization/resources/portal/resources/common/types/NotificationRegisterFirebaseService.d.ts b/sdks/full/typescript/types/serialization/resources/portal/resources/common/types/NotificationRegisterFirebaseService.d.ts index faa815950a..fd89f6a394 100644 --- a/sdks/full/typescript/types/serialization/resources/portal/resources/common/types/NotificationRegisterFirebaseService.d.ts +++ b/sdks/full/typescript/types/serialization/resources/portal/resources/common/types/NotificationRegisterFirebaseService.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const NotificationRegisterFirebaseService: core.serialization.ObjectSchema; export declare namespace NotificationRegisterFirebaseService { diff --git a/sdks/full/typescript/types/serialization/resources/portal/resources/common/types/NotificationRegisterService.d.ts b/sdks/full/typescript/types/serialization/resources/portal/resources/common/types/NotificationRegisterService.d.ts index e0208b9aec..0f6afbfe94 100644 --- a/sdks/full/typescript/types/serialization/resources/portal/resources/common/types/NotificationRegisterService.d.ts +++ b/sdks/full/typescript/types/serialization/resources/portal/resources/common/types/NotificationRegisterService.d.ts @@ -1,12 +1,13 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { portal } from "../../../../index"; export declare const NotificationRegisterService: core.serialization.ObjectSchema; export declare namespace NotificationRegisterService { interface Raw { - firebase?: serializers.portal.NotificationRegisterFirebaseService.Raw | null; + firebase?: portal.NotificationRegisterFirebaseService.Raw | null; } } diff --git a/sdks/full/typescript/types/serialization/resources/portal/resources/common/types/NotificationUnregisterService.d.ts b/sdks/full/typescript/types/serialization/resources/portal/resources/common/types/NotificationUnregisterService.d.ts index 22273c0631..7bd52b6a10 100644 --- a/sdks/full/typescript/types/serialization/resources/portal/resources/common/types/NotificationUnregisterService.d.ts +++ b/sdks/full/typescript/types/serialization/resources/portal/resources/common/types/NotificationUnregisterService.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const NotificationUnregisterService: core.serialization.Schema; export declare namespace NotificationUnregisterService { diff --git a/sdks/full/typescript/types/serialization/resources/portal/resources/games/types/GetGameProfileResponse.d.ts b/sdks/full/typescript/types/serialization/resources/portal/resources/games/types/GetGameProfileResponse.d.ts index 435b7bbfaa..78165a0324 100644 --- a/sdks/full/typescript/types/serialization/resources/portal/resources/games/types/GetGameProfileResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/portal/resources/games/types/GetGameProfileResponse.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { game, common } from "../../../../index"; export declare const GetGameProfileResponse: core.serialization.ObjectSchema; export declare namespace GetGameProfileResponse { interface Raw { - game: serializers.game.Profile.Raw; - watch: serializers.WatchResponse.Raw; + game: game.Profile.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/portal/resources/games/types/GetSuggestedGamesResponse.d.ts b/sdks/full/typescript/types/serialization/resources/portal/resources/games/types/GetSuggestedGamesResponse.d.ts index 837cfa4b58..b00943d5f5 100644 --- a/sdks/full/typescript/types/serialization/resources/portal/resources/games/types/GetSuggestedGamesResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/portal/resources/games/types/GetSuggestedGamesResponse.d.ts @@ -1,13 +1,14 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { game, common } from "../../../../index"; export declare const GetSuggestedGamesResponse: core.serialization.ObjectSchema; export declare namespace GetSuggestedGamesResponse { interface Raw { - games: serializers.game.Summary.Raw[]; - watch: serializers.WatchResponse.Raw; + games: game.Summary.Raw[]; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/full/typescript/types/serialization/resources/provision/resources/datacenters/types/GetTlsResponse.d.ts b/sdks/full/typescript/types/serialization/resources/provision/resources/datacenters/types/GetTlsResponse.d.ts index f07df1bc2b..c758371da9 100644 --- a/sdks/full/typescript/types/serialization/resources/provision/resources/datacenters/types/GetTlsResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/provision/resources/datacenters/types/GetTlsResponse.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const GetTlsResponse: core.serialization.ObjectSchema; export declare namespace GetTlsResponse { diff --git a/sdks/full/typescript/types/serialization/resources/provision/resources/servers/types/GetInfoResponse.d.ts b/sdks/full/typescript/types/serialization/resources/provision/resources/servers/types/GetInfoResponse.d.ts index 1e2424d6fe..078db9fa95 100644 --- a/sdks/full/typescript/types/serialization/resources/provision/resources/servers/types/GetInfoResponse.d.ts +++ b/sdks/full/typescript/types/serialization/resources/provision/resources/servers/types/GetInfoResponse.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const GetInfoResponse: core.serialization.ObjectSchema; export declare namespace GetInfoResponse { diff --git a/sdks/full/typescript/types/serialization/resources/upload/resources/common/types/PrepareFile.d.ts b/sdks/full/typescript/types/serialization/resources/upload/resources/common/types/PrepareFile.d.ts index da18f6adec..4dbf4ae2cd 100644 --- a/sdks/full/typescript/types/serialization/resources/upload/resources/common/types/PrepareFile.d.ts +++ b/sdks/full/typescript/types/serialization/resources/upload/resources/common/types/PrepareFile.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const PrepareFile: core.serialization.ObjectSchema; export declare namespace PrepareFile { diff --git a/sdks/full/typescript/types/serialization/resources/upload/resources/common/types/PresignedRequest.d.ts b/sdks/full/typescript/types/serialization/resources/upload/resources/common/types/PresignedRequest.d.ts index 498798b274..56507d410c 100644 --- a/sdks/full/typescript/types/serialization/resources/upload/resources/common/types/PresignedRequest.d.ts +++ b/sdks/full/typescript/types/serialization/resources/upload/resources/common/types/PresignedRequest.d.ts @@ -1,8 +1,8 @@ /** * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export declare const PresignedRequest: core.serialization.ObjectSchema; export declare namespace PresignedRequest { diff --git a/sdks/full/typescript/yarn.lock b/sdks/full/typescript/yarn.lock index 834dd40aed..6242defc20 100644 --- a/sdks/full/typescript/yarn.lock +++ b/sdks/full/typescript/yarn.lock @@ -117,6 +117,21 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz#a5d300008960bb39677c46bf16f53ec70d8dee04" integrity sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw== +"@types/node-fetch@2.6.11": + version "2.6.11" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.11.tgz#9b39b78665dae0e82a08f02f4967d62c66f95d24" + integrity sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g== + dependencies: + "@types/node" "*" + form-data "^4.0.0" + +"@types/node@*": + version "22.1.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.1.0.tgz#6d6adc648b5e03f0e83c78dc788c2b037d0ad94b" + integrity sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw== + dependencies: + undici-types "~6.13.0" + "@types/node@17.0.33": version "17.0.33" resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.33.tgz#3c1879b276dc63e73030bb91165e62a4509cd506" @@ -321,6 +336,11 @@ typescript@4.6.4: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9" integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg== +undici-types@~6.13.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.13.0.tgz#e3e79220ab8c81ed1496b5812471afd7cf075ea5" + integrity sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg== + url-join@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/url-join/-/url-join-5.0.0.tgz#c2f1e5cbd95fa91082a93b58a1f42fecb4bdbcf1" diff --git a/sdks/runtime/typescript/archive.tgz b/sdks/runtime/typescript/archive.tgz index 79948d5de9..0603d96ee5 100644 --- a/sdks/runtime/typescript/archive.tgz +++ b/sdks/runtime/typescript/archive.tgz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c9fd73e4027a9c2ebf3aadffbe215ff7ed6ff3adf0c20cd1e0d5448dc78250a8 -size 371620 +oid sha256:1646343b57ad54ab6861ca9469a9657ffae6c8bbe4bcb2b2b75067b3bc1aedfa +size 283075 diff --git a/sdks/runtime/typescript/package.json b/sdks/runtime/typescript/package.json index 2818139780..7687b6f0ff 100644 --- a/sdks/runtime/typescript/package.json +++ b/sdks/runtime/typescript/package.json @@ -1,58 +1,59 @@ { - "name": "@rivet-gg/api", - "version": "24.1.0", - "private": false, - "repository": "https://github.com/rivet-gg/rivet/tree/main/sdks/typescript", - "files": [ - "dist", - "types", - "core.d.ts", - "serialization.d.ts" - ], - "exports": { - ".": { - "node": "./dist/node/index.js", - "import": "./dist/browser/esm/index.js", - "require": "./dist/browser/cjs/index.js", - "default": "./dist/browser/cjs/index.js", - "types": "./types/index.d.ts" - }, - "./core": { - "node": "./dist/node/core.js", - "import": "./dist/browser/esm/core.js", - "require": "./dist/browser/cjs/core.js", - "default": "./dist/browser/cjs/core.js", - "types": "./types/core/index.d.ts" - }, - "./serialization": { - "node": "./dist/node/serialization.js", - "import": "./dist/browser/esm/serialization.js", - "require": "./dist/browser/cjs/serialization.js", - "default": "./dist/browser/cjs/serialization.js", - "types": "./types/serialization/index.d.ts" - } + "name": "@rivet-gg/api", + "version": "24.1.0", + "private": false, + "repository": "https://github.com/rivet-gg/rivet/tree/main/sdks/typescript", + "files": [ + "dist", + "types", + "core.d.ts", + "serialization.d.ts" + ], + "exports": { + ".": { + "node": "./dist/node/index.js", + "import": "./dist/browser/esm/index.js", + "require": "./dist/browser/cjs/index.js", + "default": "./dist/browser/cjs/index.js", + "types": "./types/index.d.ts" }, - "types": "./types/index.d.ts", - "scripts": { - "format": "prettier --write 'src/**/*.ts'", - "compile": "tsc", - "bundle": "node build.js", - "build": "yarn compile && yarn bundle", - "prepack": "yarn run build" + "./core": { + "node": "./dist/node/core.js", + "import": "./dist/browser/esm/core.js", + "require": "./dist/browser/cjs/core.js", + "default": "./dist/browser/cjs/core.js", + "types": "./types/core/index.d.ts" }, - "dependencies": { - "form-data": "^4.0.0", - "js-base64": "^3.7.5", - "node-fetch": "2", - "qs": "^6.11.2", - "url-join": "^5.0.0" - }, - "devDependencies": { - "@types/node": "17.0.33", - "@types/qs": "6.9.8", - "@types/url-join": "4.0.1", - "esbuild": "^0.19.11", - "prettier": "2.7.1", - "typescript": "4.6.4" + "./serialization": { + "node": "./dist/node/serialization.js", + "import": "./dist/browser/esm/serialization.js", + "require": "./dist/browser/cjs/serialization.js", + "default": "./dist/browser/cjs/serialization.js", + "types": "./types/serialization/index.d.ts" } + }, + "types": "./types/index.d.ts", + "scripts": { + "format": "prettier --write 'src/**/*.ts'", + "compile": "tsc", + "bundle": "node build.js", + "build": "yarn compile && yarn bundle", + "prepack": "yarn run build" + }, + "dependencies": { + "form-data": "^4.0.0", + "js-base64": "^3.7.5", + "node-fetch": "2", + "qs": "^6.11.2", + "url-join": "^5.0.0" + }, + "devDependencies": { + "@types/node": "17.0.33", + "@types/qs": "6.9.8", + "@types/url-join": "4.0.1", + "esbuild": "^0.19.11", + "prettier": "2.7.1", + "typescript": "4.6.4", + "@types/node-fetch": "2.6.11" + } } diff --git a/sdks/runtime/typescript/src/Client.ts b/sdks/runtime/typescript/src/Client.ts index 74f6afa0c0..af05da7466 100644 --- a/sdks/runtime/typescript/src/Client.ts +++ b/sdks/runtime/typescript/src/Client.ts @@ -15,8 +15,12 @@ export declare namespace RivetClient { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } diff --git a/sdks/runtime/typescript/src/api/resources/captcha/resources/config/types/Config.ts b/sdks/runtime/typescript/src/api/resources/captcha/resources/config/types/Config.ts index ad2a83861d..a51a51aee9 100644 --- a/sdks/runtime/typescript/src/api/resources/captcha/resources/config/types/Config.ts +++ b/sdks/runtime/typescript/src/api/resources/captcha/resources/config/types/Config.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * Methods to verify a captcha diff --git a/sdks/runtime/typescript/src/api/resources/common/errors/BadRequestError.ts b/sdks/runtime/typescript/src/api/resources/common/errors/BadRequestError.ts index 83528124ac..862667ba25 100644 --- a/sdks/runtime/typescript/src/api/resources/common/errors/BadRequestError.ts +++ b/sdks/runtime/typescript/src/api/resources/common/errors/BadRequestError.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as errors from "../../../../errors"; -import * as Rivet from "../../.."; +import * as errors from "../../../../errors/index"; +import * as Rivet from "../../../index"; export class BadRequestError extends errors.RivetError { constructor(body: Rivet.ErrorBody) { diff --git a/sdks/runtime/typescript/src/api/resources/common/errors/ForbiddenError.ts b/sdks/runtime/typescript/src/api/resources/common/errors/ForbiddenError.ts index d8f88a4565..ba42772a32 100644 --- a/sdks/runtime/typescript/src/api/resources/common/errors/ForbiddenError.ts +++ b/sdks/runtime/typescript/src/api/resources/common/errors/ForbiddenError.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as errors from "../../../../errors"; -import * as Rivet from "../../.."; +import * as errors from "../../../../errors/index"; +import * as Rivet from "../../../index"; export class ForbiddenError extends errors.RivetError { constructor(body: Rivet.ErrorBody) { diff --git a/sdks/runtime/typescript/src/api/resources/common/errors/InternalError.ts b/sdks/runtime/typescript/src/api/resources/common/errors/InternalError.ts index 09e37459f6..1bc1140f5b 100644 --- a/sdks/runtime/typescript/src/api/resources/common/errors/InternalError.ts +++ b/sdks/runtime/typescript/src/api/resources/common/errors/InternalError.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as errors from "../../../../errors"; -import * as Rivet from "../../.."; +import * as errors from "../../../../errors/index"; +import * as Rivet from "../../../index"; export class InternalError extends errors.RivetError { constructor(body: Rivet.ErrorBody) { diff --git a/sdks/runtime/typescript/src/api/resources/common/errors/NotFoundError.ts b/sdks/runtime/typescript/src/api/resources/common/errors/NotFoundError.ts index f66c709362..67c2019811 100644 --- a/sdks/runtime/typescript/src/api/resources/common/errors/NotFoundError.ts +++ b/sdks/runtime/typescript/src/api/resources/common/errors/NotFoundError.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as errors from "../../../../errors"; -import * as Rivet from "../../.."; +import * as errors from "../../../../errors/index"; +import * as Rivet from "../../../index"; export class NotFoundError extends errors.RivetError { constructor(body: Rivet.ErrorBody) { diff --git a/sdks/runtime/typescript/src/api/resources/common/errors/RateLimitError.ts b/sdks/runtime/typescript/src/api/resources/common/errors/RateLimitError.ts index 0b416bf2fc..64591f50c9 100644 --- a/sdks/runtime/typescript/src/api/resources/common/errors/RateLimitError.ts +++ b/sdks/runtime/typescript/src/api/resources/common/errors/RateLimitError.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as errors from "../../../../errors"; -import * as Rivet from "../../.."; +import * as errors from "../../../../errors/index"; +import * as Rivet from "../../../index"; export class RateLimitError extends errors.RivetError { constructor(body: Rivet.ErrorBody) { diff --git a/sdks/runtime/typescript/src/api/resources/common/errors/UnauthorizedError.ts b/sdks/runtime/typescript/src/api/resources/common/errors/UnauthorizedError.ts index c664f00643..5b522ed874 100644 --- a/sdks/runtime/typescript/src/api/resources/common/errors/UnauthorizedError.ts +++ b/sdks/runtime/typescript/src/api/resources/common/errors/UnauthorizedError.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as errors from "../../../../errors"; -import * as Rivet from "../../.."; +import * as errors from "../../../../errors/index"; +import * as Rivet from "../../../index"; export class UnauthorizedError extends errors.RivetError { constructor(body: Rivet.ErrorBody) { diff --git a/sdks/runtime/typescript/src/api/resources/common/types/ErrorBody.ts b/sdks/runtime/typescript/src/api/resources/common/types/ErrorBody.ts index e820bea2e0..dd97458572 100644 --- a/sdks/runtime/typescript/src/api/resources/common/types/ErrorBody.ts +++ b/sdks/runtime/typescript/src/api/resources/common/types/ErrorBody.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface ErrorBody { code: string; diff --git a/sdks/runtime/typescript/src/api/resources/kv/client/Client.ts b/sdks/runtime/typescript/src/api/resources/kv/client/Client.ts index 2b8d581aae..534b11177e 100644 --- a/sdks/runtime/typescript/src/api/resources/kv/client/Client.ts +++ b/sdks/runtime/typescript/src/api/resources/kv/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../environments"; import * as core from "../../../../core"; -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../serialization"; -import * as errors from "../../../../errors"; +import * as serializers from "../../../../serialization/index"; +import * as errors from "../../../../errors/index"; export declare namespace Kv { interface Options { @@ -17,8 +17,12 @@ export declare namespace Kv { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -27,19 +31,30 @@ export class Kv { /** * Returns a specific key-value entry by key. + * + * @param {Rivet.kv.GetOperationRequest} request + * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.kv.get({ + * key: "string", + * watchIndex: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * }) */ public async get( request: Rivet.kv.GetOperationRequest, requestOptions?: Kv.RequestOptions ): Promise { const { key, watchIndex, namespaceId } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; _queryParams["key"] = key; if (watchIndex != null) { _queryParams["watch_index"] = watchIndex; @@ -60,11 +75,13 @@ export class Kv { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.kv.GetResponse.parseOrThrow(_response.body, { + return serializers.kv.GetResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -77,7 +94,7 @@ export class Kv { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -87,7 +104,7 @@ export class Kv { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -97,7 +114,7 @@ export class Kv { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -107,7 +124,7 @@ export class Kv { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -117,7 +134,7 @@ export class Kv { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -127,7 +144,7 @@ export class Kv { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -160,12 +177,25 @@ export class Kv { /** * Puts (sets or overwrites) a key-value entry by key. + * + * @param {Rivet.kv.PutRequest} request + * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.kv.put({ + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + * key: "string", + * value: { + * "key": "value" + * } + * }) */ public async put(request: Rivet.kv.PutRequest, requestOptions?: Kv.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -178,9 +208,11 @@ export class Kv { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.kv.PutRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + requestType: "json", + body: serializers.kv.PutRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -190,7 +222,7 @@ export class Kv { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -200,7 +232,7 @@ export class Kv { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -210,7 +242,7 @@ export class Kv { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -220,7 +252,7 @@ export class Kv { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -230,7 +262,7 @@ export class Kv { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -240,7 +272,7 @@ export class Kv { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -273,16 +305,26 @@ export class Kv { /** * Deletes a key-value entry by key. + * + * @param {Rivet.kv.DeleteOperationRequest} request + * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.kv.delete({ + * key: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * }) */ public async delete(request: Rivet.kv.DeleteOperationRequest, requestOptions?: Kv.RequestOptions): Promise { const { key, namespaceId } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; _queryParams["key"] = key; if (namespaceId != null) { _queryParams["namespace_id"] = namespaceId; @@ -299,8 +341,10 @@ export class Kv { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -310,7 +354,7 @@ export class Kv { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -320,7 +364,7 @@ export class Kv { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -330,7 +374,7 @@ export class Kv { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -340,7 +384,7 @@ export class Kv { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -350,7 +394,7 @@ export class Kv { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -360,7 +404,7 @@ export class Kv { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -393,19 +437,29 @@ export class Kv { /** * Lists all keys in a directory. + * + * @param {Rivet.kv.ListOperationRequest} request + * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.kv.list({ + * directory: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * }) */ public async list( request: Rivet.kv.ListOperationRequest, requestOptions?: Kv.RequestOptions ): Promise { const { directory, namespaceId } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; _queryParams["directory"] = directory; _queryParams["namespace_id"] = namespaceId; const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -419,11 +473,13 @@ export class Kv { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.kv.ListResponse.parseOrThrow(_response.body, { + return serializers.kv.ListResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -436,7 +492,7 @@ export class Kv { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -446,7 +502,7 @@ export class Kv { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -456,7 +512,7 @@ export class Kv { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -466,7 +522,7 @@ export class Kv { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -476,7 +532,7 @@ export class Kv { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -486,7 +542,7 @@ export class Kv { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -519,19 +575,30 @@ export class Kv { /** * Gets multiple key-value entries by key(s). + * + * @param {Rivet.kv.GetBatchRequest} request + * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.kv.getBatch({ + * keys: "string", + * watchIndex: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * }) */ public async getBatch( request: Rivet.kv.GetBatchRequest, requestOptions?: Kv.RequestOptions ): Promise { const { keys, watchIndex, namespaceId } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (Array.isArray(keys)) { _queryParams["keys"] = keys.map((item) => item); } else { @@ -557,11 +624,13 @@ export class Kv { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.kv.GetBatchResponse.parseOrThrow(_response.body, { + return serializers.kv.GetBatchResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -574,7 +643,7 @@ export class Kv { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -584,7 +653,7 @@ export class Kv { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -594,7 +663,7 @@ export class Kv { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -604,7 +673,7 @@ export class Kv { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -614,7 +683,7 @@ export class Kv { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -624,7 +693,7 @@ export class Kv { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -657,12 +726,22 @@ export class Kv { /** * Puts (sets or overwrites) multiple key-value entries by key(s). + * + * @param {Rivet.kv.PutBatchRequest} request + * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.kv.putBatch({ + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + * entries: [{}] + * }) */ public async putBatch(request: Rivet.kv.PutBatchRequest, requestOptions?: Kv.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -675,9 +754,11 @@ export class Kv { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.kv.PutBatchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + requestType: "json", + body: serializers.kv.PutBatchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -687,7 +768,7 @@ export class Kv { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -697,7 +778,7 @@ export class Kv { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -707,7 +788,7 @@ export class Kv { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -717,7 +798,7 @@ export class Kv { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -727,7 +808,7 @@ export class Kv { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -737,7 +818,7 @@ export class Kv { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -770,16 +851,26 @@ export class Kv { /** * Deletes multiple key-value entries by key(s). + * + * @param {Rivet.kv.DeleteBatchRequest} request + * @param {Kv.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.kv.deleteBatch({ + * keys: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * }) */ public async deleteBatch(request: Rivet.kv.DeleteBatchRequest, requestOptions?: Kv.RequestOptions): Promise { const { keys, namespaceId } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (Array.isArray(keys)) { _queryParams["keys"] = keys.map((item) => item); } else { @@ -801,8 +892,10 @@ export class Kv { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -812,7 +905,7 @@ export class Kv { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -822,7 +915,7 @@ export class Kv { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -832,7 +925,7 @@ export class Kv { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -842,7 +935,7 @@ export class Kv { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -852,7 +945,7 @@ export class Kv { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -862,7 +955,7 @@ export class Kv { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -893,7 +986,7 @@ export class Kv { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.token)}`; } } diff --git a/sdks/runtime/typescript/src/api/resources/kv/client/requests/DeleteBatchRequest.ts b/sdks/runtime/typescript/src/api/resources/kv/client/requests/DeleteBatchRequest.ts index 747d68c692..06a8f40701 100644 --- a/sdks/runtime/typescript/src/api/resources/kv/client/requests/DeleteBatchRequest.ts +++ b/sdks/runtime/typescript/src/api/resources/kv/client/requests/DeleteBatchRequest.ts @@ -2,8 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * keys: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * } + */ export interface DeleteBatchRequest { keys: Rivet.kv.Key | Rivet.kv.Key[]; namespaceId?: string; diff --git a/sdks/runtime/typescript/src/api/resources/kv/client/requests/DeleteOperationRequest.ts b/sdks/runtime/typescript/src/api/resources/kv/client/requests/DeleteOperationRequest.ts index 5a480fe79a..4a4acf3119 100644 --- a/sdks/runtime/typescript/src/api/resources/kv/client/requests/DeleteOperationRequest.ts +++ b/sdks/runtime/typescript/src/api/resources/kv/client/requests/DeleteOperationRequest.ts @@ -2,8 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * key: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * } + */ export interface DeleteOperationRequest { key: Rivet.kv.Key; namespaceId?: string; diff --git a/sdks/runtime/typescript/src/api/resources/kv/client/requests/GetBatchRequest.ts b/sdks/runtime/typescript/src/api/resources/kv/client/requests/GetBatchRequest.ts index cdd0e820a9..dee7e0ecf0 100644 --- a/sdks/runtime/typescript/src/api/resources/kv/client/requests/GetBatchRequest.ts +++ b/sdks/runtime/typescript/src/api/resources/kv/client/requests/GetBatchRequest.ts @@ -2,8 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * keys: "string", + * watchIndex: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * } + */ export interface GetBatchRequest { keys: Rivet.kv.Key | Rivet.kv.Key[]; /** diff --git a/sdks/runtime/typescript/src/api/resources/kv/client/requests/GetOperationRequest.ts b/sdks/runtime/typescript/src/api/resources/kv/client/requests/GetOperationRequest.ts index 97844811a5..c41a9a3add 100644 --- a/sdks/runtime/typescript/src/api/resources/kv/client/requests/GetOperationRequest.ts +++ b/sdks/runtime/typescript/src/api/resources/kv/client/requests/GetOperationRequest.ts @@ -2,8 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * key: "string", + * watchIndex: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * } + */ export interface GetOperationRequest { key: Rivet.kv.Key; /** diff --git a/sdks/runtime/typescript/src/api/resources/kv/client/requests/ListOperationRequest.ts b/sdks/runtime/typescript/src/api/resources/kv/client/requests/ListOperationRequest.ts index c7ed56d6ca..ac3740b405 100644 --- a/sdks/runtime/typescript/src/api/resources/kv/client/requests/ListOperationRequest.ts +++ b/sdks/runtime/typescript/src/api/resources/kv/client/requests/ListOperationRequest.ts @@ -2,8 +2,15 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../.."; +import * as Rivet from "../../../../index"; +/** + * @example + * { + * directory: "string", + * namespaceId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + * } + */ export interface ListOperationRequest { directory: Rivet.kv.Directory; namespaceId: string; diff --git a/sdks/runtime/typescript/src/api/resources/kv/client/requests/index.ts b/sdks/runtime/typescript/src/api/resources/kv/client/requests/index.ts index 5608eea192..2dc02e572b 100644 --- a/sdks/runtime/typescript/src/api/resources/kv/client/requests/index.ts +++ b/sdks/runtime/typescript/src/api/resources/kv/client/requests/index.ts @@ -1,5 +1,5 @@ -export { GetOperationRequest } from "./GetOperationRequest"; -export { DeleteOperationRequest } from "./DeleteOperationRequest"; -export { ListOperationRequest } from "./ListOperationRequest"; -export { GetBatchRequest } from "./GetBatchRequest"; -export { DeleteBatchRequest } from "./DeleteBatchRequest"; +export { type GetOperationRequest } from "./GetOperationRequest"; +export { type DeleteOperationRequest } from "./DeleteOperationRequest"; +export { type ListOperationRequest } from "./ListOperationRequest"; +export { type GetBatchRequest } from "./GetBatchRequest"; +export { type DeleteBatchRequest } from "./DeleteBatchRequest"; diff --git a/sdks/runtime/typescript/src/api/resources/kv/resources/common/types/Entry.ts b/sdks/runtime/typescript/src/api/resources/kv/resources/common/types/Entry.ts index 9a8b949d2b..73548a04d2 100644 --- a/sdks/runtime/typescript/src/api/resources/kv/resources/common/types/Entry.ts +++ b/sdks/runtime/typescript/src/api/resources/kv/resources/common/types/Entry.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A key-value entry. diff --git a/sdks/runtime/typescript/src/api/resources/kv/resources/common/types/PutEntry.ts b/sdks/runtime/typescript/src/api/resources/kv/resources/common/types/PutEntry.ts index 147aa69584..b675c847a9 100644 --- a/sdks/runtime/typescript/src/api/resources/kv/resources/common/types/PutEntry.ts +++ b/sdks/runtime/typescript/src/api/resources/kv/resources/common/types/PutEntry.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A new entry to insert into the key-value database. diff --git a/sdks/runtime/typescript/src/api/resources/kv/types/GetBatchResponse.ts b/sdks/runtime/typescript/src/api/resources/kv/types/GetBatchResponse.ts index 33d7ab924e..3d7bc9ed00 100644 --- a/sdks/runtime/typescript/src/api/resources/kv/types/GetBatchResponse.ts +++ b/sdks/runtime/typescript/src/api/resources/kv/types/GetBatchResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface GetBatchResponse { entries: Rivet.kv.Entry[]; diff --git a/sdks/runtime/typescript/src/api/resources/kv/types/GetResponse.ts b/sdks/runtime/typescript/src/api/resources/kv/types/GetResponse.ts index 4042b12f97..7b8ee46b50 100644 --- a/sdks/runtime/typescript/src/api/resources/kv/types/GetResponse.ts +++ b/sdks/runtime/typescript/src/api/resources/kv/types/GetResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface GetResponse { value?: Rivet.kv.Value; diff --git a/sdks/runtime/typescript/src/api/resources/kv/types/ListResponse.ts b/sdks/runtime/typescript/src/api/resources/kv/types/ListResponse.ts index b8e4f8b637..5389e9e4c9 100644 --- a/sdks/runtime/typescript/src/api/resources/kv/types/ListResponse.ts +++ b/sdks/runtime/typescript/src/api/resources/kv/types/ListResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface ListResponse { entries: Rivet.kv.Entry[]; diff --git a/sdks/runtime/typescript/src/api/resources/kv/types/PutBatchRequest.ts b/sdks/runtime/typescript/src/api/resources/kv/types/PutBatchRequest.ts index d67cf356d0..cd7e884c65 100644 --- a/sdks/runtime/typescript/src/api/resources/kv/types/PutBatchRequest.ts +++ b/sdks/runtime/typescript/src/api/resources/kv/types/PutBatchRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface PutBatchRequest { namespaceId?: string; diff --git a/sdks/runtime/typescript/src/api/resources/kv/types/PutRequest.ts b/sdks/runtime/typescript/src/api/resources/kv/types/PutRequest.ts index bfe06966cb..08cca59818 100644 --- a/sdks/runtime/typescript/src/api/resources/kv/types/PutRequest.ts +++ b/sdks/runtime/typescript/src/api/resources/kv/types/PutRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../.."; +import * as Rivet from "../../../index"; export interface PutRequest { namespaceId?: string; diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/client/Client.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/client/Client.ts index 15f57f1e1a..734f320327 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/client/Client.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/client/Client.ts @@ -16,8 +16,12 @@ export declare namespace Matchmaker { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/GameModeInfo.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/GameModeInfo.ts index f28cd48373..6995a490ec 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/GameModeInfo.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/GameModeInfo.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A game mode that the player can join. diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/JoinLobby.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/JoinLobby.ts index eae328d5af..bf253efda7 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/JoinLobby.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/JoinLobby.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A matchmaker lobby. diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/JoinPlayer.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/JoinPlayer.ts index 07797eaffa..f640d289ae 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/JoinPlayer.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/JoinPlayer.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A matchmaker lobby player. diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/JoinPort.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/JoinPort.ts index 92a05b6beb..17a8dbdb4b 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/JoinPort.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/JoinPort.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface JoinPort { /** The host for the given port. Will be null if using a port range. */ diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/JoinRegion.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/JoinRegion.ts index 2995a7a5da..b4070ecfa4 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/JoinRegion.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/JoinRegion.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A matchmaker lobby region. diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/RegionInfo.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/RegionInfo.ts index 666d7892d4..8ed9a3cb6e 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/RegionInfo.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/common/types/RegionInfo.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; /** * A region that the player can connect to. diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/Client.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/Client.ts index 728b7aa4e1..14ecad157e 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/Client.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; -import * as serializers from "../../../../../../serialization"; +import * as errors from "../../../../../../errors/index"; +import * as serializers from "../../../../../../serialization/index"; export declare namespace Lobbies { interface Options { @@ -17,8 +17,12 @@ export declare namespace Lobbies { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -28,12 +32,18 @@ export class Lobbies { /** * Marks the current lobby as ready to accept connections. Players will not be able to connect to this lobby until the lobby is flagged as ready. * This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) for mock responses. When running on Rivet servers, you can access the given lobby token from the [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. + * + * @param {Lobbies.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.lobbies.ready() */ public async ready(requestOptions?: Lobbies.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -46,8 +56,10 @@ export class Lobbies { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -57,7 +69,7 @@ export class Lobbies { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -67,7 +79,7 @@ export class Lobbies { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -77,7 +89,7 @@ export class Lobbies { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -87,7 +99,7 @@ export class Lobbies { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -97,7 +109,7 @@ export class Lobbies { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -107,7 +119,7 @@ export class Lobbies { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -148,12 +160,21 @@ export class Lobbies { * authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) * for mock responses. When running on Rivet servers, you can access the given lobby token from the * [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. + * + * @param {Rivet.matchmaker.SetLobbyClosedRequest} request + * @param {Lobbies.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.lobbies.setClosed({ + * isClosed: true + * }) */ public async setClosed( request: Rivet.matchmaker.SetLobbyClosedRequest, @@ -169,11 +190,13 @@ export class Lobbies { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.matchmaker.SetLobbyClosedRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.matchmaker.SetLobbyClosedRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -183,7 +206,7 @@ export class Lobbies { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -193,7 +216,7 @@ export class Lobbies { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -203,7 +226,7 @@ export class Lobbies { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -213,7 +236,7 @@ export class Lobbies { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -223,7 +246,7 @@ export class Lobbies { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -233,7 +256,7 @@ export class Lobbies { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -271,12 +294,21 @@ export class Lobbies { * authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) * for mock responses. When running on Rivet servers, you can access the given lobby token from the * [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. + * + * @param {unknown} request + * @param {Lobbies.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.lobbies.setState({ + * "key": "value" + * }) */ public async setState(request?: unknown, requestOptions?: Lobbies.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -289,14 +321,16 @@ export class Lobbies { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", body: request != null - ? await serializers.matchmaker.lobbies.setState.Request.jsonOrThrow(request, { + ? serializers.matchmaker.lobbies.setState.Request.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }) : undefined, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -306,7 +340,7 @@ export class Lobbies { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -316,7 +350,7 @@ export class Lobbies { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -326,7 +360,7 @@ export class Lobbies { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -336,7 +370,7 @@ export class Lobbies { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -346,7 +380,7 @@ export class Lobbies { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -356,7 +390,7 @@ export class Lobbies { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -394,29 +428,38 @@ export class Lobbies { * authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) * for mock responses. When running on Rivet servers, you can access the given lobby token from the * [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. + * + * @param {string} lobbyId + * @param {Lobbies.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.lobbies.getState("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") */ public async getState(lobbyId: string, requestOptions?: Lobbies.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.RivetEnvironment.Production, - `/matchmaker/lobbies/${lobbyId}/state` + `/matchmaker/lobbies/${encodeURIComponent(lobbyId)}/state` ), method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.matchmaker.lobbies.getState.Response.parseOrThrow(_response.body, { + return serializers.matchmaker.lobbies.getState.Response.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -429,7 +472,7 @@ export class Lobbies { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -439,7 +482,7 @@ export class Lobbies { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -449,7 +492,7 @@ export class Lobbies { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -459,7 +502,7 @@ export class Lobbies { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -469,7 +512,7 @@ export class Lobbies { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -479,7 +522,7 @@ export class Lobbies { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -520,12 +563,35 @@ export class Lobbies { * [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used * for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) * can be used for general authentication. + * + * @param {Rivet.matchmaker.FindLobbyRequest} request + * @param {Lobbies.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.lobbies.find({ + * origin: "string", + * gameModes: ["string"], + * regions: ["string"], + * preventAutoCreateLobby: true, + * tags: { + * "string": "string" + * }, + * maxPlayers: 1, + * captcha: { + * hcaptcha: {}, + * turnstile: {} + * }, + * verificationData: { + * "key": "value" + * } + * }) */ public async find( request: Rivet.matchmaker.FindLobbyRequest, @@ -543,12 +609,14 @@ export class Lobbies { origin: origin != null ? origin : undefined, }, contentType: "application/json", - body: await serializers.matchmaker.FindLobbyRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), + requestType: "json", + body: serializers.matchmaker.FindLobbyRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.matchmaker.FindLobbyResponse.parseOrThrow(_response.body, { + return serializers.matchmaker.FindLobbyResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -561,7 +629,7 @@ export class Lobbies { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -571,7 +639,7 @@ export class Lobbies { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -581,7 +649,7 @@ export class Lobbies { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -591,7 +659,7 @@ export class Lobbies { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -601,7 +669,7 @@ export class Lobbies { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -611,7 +679,7 @@ export class Lobbies { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -652,12 +720,28 @@ export class Lobbies { * [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used * for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) * can be used for general authentication. + * + * @param {Rivet.matchmaker.JoinLobbyRequest} request + * @param {Lobbies.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.lobbies.join({ + * lobbyId: "string", + * captcha: { + * hcaptcha: {}, + * turnstile: {} + * }, + * verificationData: { + * "key": "value" + * } + * }) */ public async join( request: Rivet.matchmaker.JoinLobbyRequest, @@ -673,14 +757,14 @@ export class Lobbies { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.matchmaker.JoinLobbyRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.matchmaker.JoinLobbyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.matchmaker.JoinLobbyResponse.parseOrThrow(_response.body, { + return serializers.matchmaker.JoinLobbyResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -693,7 +777,7 @@ export class Lobbies { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -703,7 +787,7 @@ export class Lobbies { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -713,7 +797,7 @@ export class Lobbies { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -723,7 +807,7 @@ export class Lobbies { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -733,7 +817,7 @@ export class Lobbies { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -743,7 +827,7 @@ export class Lobbies { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -782,12 +866,37 @@ export class Lobbies { * [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used * for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) * can be used for general authentication. + * + * @param {Rivet.matchmaker.CreateLobbyRequest} request + * @param {Lobbies.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.lobbies.create({ + * gameMode: "string", + * region: "string", + * publicity: Rivet.matchmaker.CustomLobbyPublicity.Public, + * tags: { + * "string": "string" + * }, + * maxPlayers: 1, + * lobbyConfig: { + * "key": "value" + * }, + * captcha: { + * hcaptcha: {}, + * turnstile: {} + * }, + * verificationData: { + * "key": "value" + * } + * }) */ public async create( request: Rivet.matchmaker.CreateLobbyRequest, @@ -803,14 +912,14 @@ export class Lobbies { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.matchmaker.CreateLobbyRequest.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), + requestType: "json", + body: serializers.matchmaker.CreateLobbyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.matchmaker.CreateLobbyResponse.parseOrThrow(_response.body, { + return serializers.matchmaker.CreateLobbyResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -823,7 +932,7 @@ export class Lobbies { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -833,7 +942,7 @@ export class Lobbies { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -843,7 +952,7 @@ export class Lobbies { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -853,7 +962,7 @@ export class Lobbies { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -863,7 +972,7 @@ export class Lobbies { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -873,7 +982,7 @@ export class Lobbies { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -912,19 +1021,28 @@ export class Lobbies { * [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used * for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) * can be used for general authentication. + * + * @param {Rivet.matchmaker.ListLobbiesRequest} request + * @param {Lobbies.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.lobbies.list({ + * includeState: true + * }) */ public async list( request: Rivet.matchmaker.ListLobbiesRequest = {}, requestOptions?: Lobbies.RequestOptions ): Promise { const { includeState } = request; - const _queryParams: Record = {}; + const _queryParams: Record = {}; if (includeState != null) { _queryParams["include_state"] = includeState.toString(); } @@ -940,11 +1058,13 @@ export class Lobbies { }, contentType: "application/json", queryParameters: _queryParams, + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.matchmaker.ListLobbiesResponse.parseOrThrow(_response.body, { + return serializers.matchmaker.ListLobbiesResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -957,7 +1077,7 @@ export class Lobbies { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -967,7 +1087,7 @@ export class Lobbies { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -977,7 +1097,7 @@ export class Lobbies { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -987,7 +1107,7 @@ export class Lobbies { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -997,7 +1117,7 @@ export class Lobbies { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1007,7 +1127,7 @@ export class Lobbies { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1038,7 +1158,7 @@ export class Lobbies { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.token)}`; } } diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/CreateLobbyRequest.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/CreateLobbyRequest.ts index c88a9f53cd..92e3dda163 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/CreateLobbyRequest.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/CreateLobbyRequest.ts @@ -2,8 +2,30 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../.."; +import * as Rivet from "../../../../../../index"; +/** + * @example + * { + * gameMode: "string", + * region: "string", + * publicity: Rivet.matchmaker.CustomLobbyPublicity.Public, + * tags: { + * "string": "string" + * }, + * maxPlayers: 1, + * lobbyConfig: { + * "key": "value" + * }, + * captcha: { + * hcaptcha: {}, + * turnstile: {} + * }, + * verificationData: { + * "key": "value" + * } + * } + */ export interface CreateLobbyRequest { gameMode: string; region?: string; diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/FindLobbyRequest.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/FindLobbyRequest.ts index c683464727..045d3bcda8 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/FindLobbyRequest.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/FindLobbyRequest.ts @@ -2,8 +2,28 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../.."; +import * as Rivet from "../../../../../../index"; +/** + * @example + * { + * origin: "string", + * gameModes: ["string"], + * regions: ["string"], + * preventAutoCreateLobby: true, + * tags: { + * "string": "string" + * }, + * maxPlayers: 1, + * captcha: { + * hcaptcha: {}, + * turnstile: {} + * }, + * verificationData: { + * "key": "value" + * } + * } + */ export interface FindLobbyRequest { origin?: string; gameModes: string[]; diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/JoinLobbyRequest.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/JoinLobbyRequest.ts index 4452cda6c5..e155266659 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/JoinLobbyRequest.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/JoinLobbyRequest.ts @@ -2,8 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../.."; +import * as Rivet from "../../../../../../index"; +/** + * @example + * { + * lobbyId: "string", + * captcha: { + * hcaptcha: {}, + * turnstile: {} + * }, + * verificationData: { + * "key": "value" + * } + * } + */ export interface JoinLobbyRequest { lobbyId: string; captcha?: Rivet.captcha.Config; diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/ListLobbiesRequest.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/ListLobbiesRequest.ts index 53d8c6bba9..31c4be4ab6 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/ListLobbiesRequest.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/ListLobbiesRequest.ts @@ -2,6 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * includeState: true + * } + */ export interface ListLobbiesRequest { includeState?: boolean; } diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/SetLobbyClosedRequest.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/SetLobbyClosedRequest.ts index c852ab145f..c8c03f252d 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/SetLobbyClosedRequest.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/SetLobbyClosedRequest.ts @@ -2,6 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * isClosed: true + * } + */ export interface SetLobbyClosedRequest { isClosed: boolean; } diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/index.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/index.ts index 6bb4afb57f..0e3df8e08a 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/index.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/client/requests/index.ts @@ -1,5 +1,5 @@ -export { SetLobbyClosedRequest } from "./SetLobbyClosedRequest"; -export { FindLobbyRequest } from "./FindLobbyRequest"; -export { JoinLobbyRequest } from "./JoinLobbyRequest"; -export { CreateLobbyRequest } from "./CreateLobbyRequest"; -export { ListLobbiesRequest } from "./ListLobbiesRequest"; +export { type SetLobbyClosedRequest } from "./SetLobbyClosedRequest"; +export { type FindLobbyRequest } from "./FindLobbyRequest"; +export { type JoinLobbyRequest } from "./JoinLobbyRequest"; +export { type CreateLobbyRequest } from "./CreateLobbyRequest"; +export { type ListLobbiesRequest } from "./ListLobbiesRequest"; diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/types/CreateLobbyResponse.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/types/CreateLobbyResponse.ts index b28272cde9..9ec13da24f 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/types/CreateLobbyResponse.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/types/CreateLobbyResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface CreateLobbyResponse { lobby: Rivet.matchmaker.JoinLobby; diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/types/FindLobbyResponse.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/types/FindLobbyResponse.ts index 67f8f31f33..e32b79cae3 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/types/FindLobbyResponse.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/types/FindLobbyResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface FindLobbyResponse { lobby: Rivet.matchmaker.JoinLobby; diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/types/JoinLobbyResponse.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/types/JoinLobbyResponse.ts index 526d94df42..06ec55d55b 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/types/JoinLobbyResponse.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/types/JoinLobbyResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface JoinLobbyResponse { lobby: Rivet.matchmaker.JoinLobby; diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/types/ListLobbiesResponse.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/types/ListLobbiesResponse.ts index f0fe668fd0..fa234058bc 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/types/ListLobbiesResponse.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/lobbies/types/ListLobbiesResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface ListLobbiesResponse { gameModes: Rivet.matchmaker.GameModeInfo[]; diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/client/Client.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/client/Client.ts index 7d32e0edd6..a58dd115a6 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/client/Client.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; -import * as serializers from "../../../../../../serialization"; +import * as Rivet from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; -import * as errors from "../../../../../../errors"; +import * as errors from "../../../../../../errors/index"; export declare namespace Players { interface Options { @@ -17,8 +17,12 @@ export declare namespace Players { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -61,12 +65,21 @@ export class Players { * Otherwise, the player token will likely be automatically sent by the client * once the socket opens. As mentioned above, nothing else should happen until * the player token is validated. + * + * @param {Rivet.matchmaker.PlayerConnectedRequest} request + * @param {Players.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.players.connected({ + * playerToken: "string" + * }) */ public async connected( request: Rivet.matchmaker.PlayerConnectedRequest, @@ -82,11 +95,13 @@ export class Players { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.matchmaker.PlayerConnectedRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.matchmaker.PlayerConnectedRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -96,7 +111,7 @@ export class Players { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -106,7 +121,7 @@ export class Players { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -116,7 +131,7 @@ export class Players { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -126,7 +141,7 @@ export class Players { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -136,7 +151,7 @@ export class Players { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -146,7 +161,7 @@ export class Players { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -179,12 +194,21 @@ export class Players { /** * Marks a player as disconnected. # Ghost Players If players are not marked as disconnected, lobbies will result with "ghost players" that the matchmaker thinks exist but are no longer connected to the lobby. + * + * @param {Rivet.matchmaker.PlayerDisconnectedRequest} request + * @param {Players.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.players.disconnected({ + * playerToken: "string" + * }) */ public async disconnected( request: Rivet.matchmaker.PlayerDisconnectedRequest, @@ -200,11 +224,13 @@ export class Players { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", - body: await serializers.matchmaker.PlayerDisconnectedRequest.jsonOrThrow(request, { + requestType: "json", + body: serializers.matchmaker.PlayerDisconnectedRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { return; @@ -214,7 +240,7 @@ export class Players { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -224,7 +250,7 @@ export class Players { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -234,7 +260,7 @@ export class Players { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -244,7 +270,7 @@ export class Players { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -254,7 +280,7 @@ export class Players { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -264,7 +290,7 @@ export class Players { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -297,12 +323,18 @@ export class Players { /** * Gives matchmaker statistics about the players in game. + * + * @param {Players.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.players.getStatistics() */ public async getStatistics( requestOptions?: Players.RequestOptions @@ -317,11 +349,13 @@ export class Players { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.matchmaker.GetStatisticsResponse.parseOrThrow(_response.body, { + return serializers.matchmaker.GetStatisticsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -334,7 +368,7 @@ export class Players { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -344,7 +378,7 @@ export class Players { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -354,7 +388,7 @@ export class Players { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -364,7 +398,7 @@ export class Players { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -374,7 +408,7 @@ export class Players { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -384,7 +418,7 @@ export class Players { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -415,7 +449,7 @@ export class Players { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.token)}`; } } diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/client/requests/PlayerConnectedRequest.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/client/requests/PlayerConnectedRequest.ts index 5c5b293e40..12170bcfef 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/client/requests/PlayerConnectedRequest.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/client/requests/PlayerConnectedRequest.ts @@ -2,6 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * playerToken: "string" + * } + */ export interface PlayerConnectedRequest { playerToken: string; } diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/client/requests/PlayerDisconnectedRequest.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/client/requests/PlayerDisconnectedRequest.ts index cb40f5c902..354f0a83a4 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/client/requests/PlayerDisconnectedRequest.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/client/requests/PlayerDisconnectedRequest.ts @@ -2,6 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * playerToken: "string" + * } + */ export interface PlayerDisconnectedRequest { playerToken: string; } diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/client/requests/index.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/client/requests/index.ts index 254ba86ed3..8dbaaea743 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/client/requests/index.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/client/requests/index.ts @@ -1,2 +1,2 @@ -export { PlayerConnectedRequest } from "./PlayerConnectedRequest"; -export { PlayerDisconnectedRequest } from "./PlayerDisconnectedRequest"; +export { type PlayerConnectedRequest } from "./PlayerConnectedRequest"; +export { type PlayerDisconnectedRequest } from "./PlayerDisconnectedRequest"; diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/types/GameModeStatistics.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/types/GameModeStatistics.ts index 432caa5ae6..42c7eef739 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/types/GameModeStatistics.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/types/GameModeStatistics.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GameModeStatistics { playerCount: number; diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/types/GetStatisticsResponse.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/types/GetStatisticsResponse.ts index d67b3dbab2..c14c2208fe 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/types/GetStatisticsResponse.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/players/types/GetStatisticsResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface GetStatisticsResponse { playerCount: number; diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/regions/client/Client.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/regions/client/Client.ts index aa6e05cbaa..03f846c1f4 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/regions/client/Client.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/regions/client/Client.ts @@ -4,10 +4,10 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; export declare namespace Regions { interface Options { @@ -17,8 +17,12 @@ export declare namespace Regions { } interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; } } @@ -29,12 +33,18 @@ export class Regions { * Returns a list of regions available to this namespace. * Regions are sorted by most optimal to least optimal. The player's IP address * is used to calculate the regions' optimality. + * + * @param {Regions.RequestOptions} requestOptions - Request-specific configuration. + * * @throws {@link Rivet.InternalError} * @throws {@link Rivet.RateLimitError} * @throws {@link Rivet.ForbiddenError} * @throws {@link Rivet.UnauthorizedError} * @throws {@link Rivet.NotFoundError} * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.matchmaker.regions.list() */ public async list(requestOptions?: Regions.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -47,11 +57,13 @@ export class Regions { Authorization: await this._getAuthorizationHeader(), }, contentType: "application/json", + requestType: "json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return await serializers.matchmaker.ListRegionsResponse.parseOrThrow(_response.body, { + return serializers.matchmaker.ListRegionsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -64,7 +76,7 @@ export class Regions { switch (_response.error.statusCode) { case 500: throw new Rivet.InternalError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -74,7 +86,7 @@ export class Regions { ); case 429: throw new Rivet.RateLimitError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -84,7 +96,7 @@ export class Regions { ); case 403: throw new Rivet.ForbiddenError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -94,7 +106,7 @@ export class Regions { ); case 408: throw new Rivet.UnauthorizedError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -104,7 +116,7 @@ export class Regions { ); case 404: throw new Rivet.NotFoundError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -114,7 +126,7 @@ export class Regions { ); case 400: throw new Rivet.BadRequestError( - await serializers.ErrorBody.parseOrThrow(_response.error.body, { + serializers.ErrorBody.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -145,7 +157,7 @@ export class Regions { } } - protected async _getAuthorizationHeader() { + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.token)}`; } } diff --git a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/regions/types/ListRegionsResponse.ts b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/regions/types/ListRegionsResponse.ts index 655fa4f9dd..f31f4c32f5 100644 --- a/sdks/runtime/typescript/src/api/resources/matchmaker/resources/regions/types/ListRegionsResponse.ts +++ b/sdks/runtime/typescript/src/api/resources/matchmaker/resources/regions/types/ListRegionsResponse.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../.."; +import * as Rivet from "../../../../../index"; export interface ListRegionsResponse { regions: Rivet.matchmaker.RegionInfo[]; diff --git a/sdks/runtime/typescript/src/core/fetcher/Fetcher.ts b/sdks/runtime/typescript/src/core/fetcher/Fetcher.ts index 19de5d475e..d67bc04210 100644 --- a/sdks/runtime/typescript/src/core/fetcher/Fetcher.ts +++ b/sdks/runtime/typescript/src/core/fetcher/Fetcher.ts @@ -1,6 +1,10 @@ -import { default as FormData } from "form-data"; -import qs from "qs"; import { APIResponse } from "./APIResponse"; +import { createRequestUrl } from "./createRequestUrl"; +import { getFetchFn } from "./getFetchFn"; +import { getRequestBody } from "./getRequestBody"; +import { getResponseBody } from "./getResponseBody"; +import { makeRequest } from "./makeRequest"; +import { requestWithRetries } from "./requestWithRetries"; export type FetchFunction = (args: Fetcher.Args) => Promise>; @@ -10,12 +14,15 @@ export declare namespace Fetcher { method: string; contentType?: string; headers?: Record; - queryParameters?: Record; + queryParameters?: Record; body?: unknown; timeoutMs?: number; maxRetries?: number; withCredentials?: boolean; - responseType?: "json" | "blob" | "streaming"; + abortSignal?: AbortSignal; + requestType?: "json" | "file" | "bytes"; + responseType?: "json" | "blob" | "sse" | "streaming" | "text"; + duplex?: "half"; } export type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError; @@ -42,11 +49,7 @@ export declare namespace Fetcher { } } -const INITIAL_RETRY_DELAY = 1; -const MAX_RETRY_DELAY = 60; -const DEFAULT_MAX_RETRIES = 2; - -async function fetcherImpl(args: Fetcher.Args): Promise> { +export async function fetcherImpl(args: Fetcher.Args): Promise> { const headers: Record = {}; if (args.body !== undefined && args.contentType != null) { headers["Content-Type"] = args.contentType; @@ -60,85 +63,35 @@ async function fetcherImpl(args: Fetcher.Args): Promise 0 - ? `${args.url}?${qs.stringify(args.queryParameters, { arrayFormat: "repeat" })}` - : args.url; - - let body: BodyInit | undefined = undefined; - if (args.body instanceof FormData) { - // @ts-expect-error - body = args.body; - } else { - body = JSON.stringify(args.body); - } - - const fetchFn = typeof fetch == "function" ? fetch : require("node-fetch"); - - const makeRequest = async (): Promise => { - const controller = new AbortController(); - let abortId = undefined; - if (args.timeoutMs != null) { - abortId = setTimeout(() => controller.abort(), args.timeoutMs); - } - const response = await fetchFn(url, { - method: args.method, - headers, - body, - signal: controller.signal, - credentials: args.withCredentials ? "include" : undefined, - }); - if (abortId != null) { - clearTimeout(abortId); - } - return response; - }; + const url = createRequestUrl(args.url, args.queryParameters); + let requestBody: BodyInit | undefined = await getRequestBody({ + body: args.body, + type: args.requestType === "json" ? "json" : "other", + }); + const fetchFn = await getFetchFn(); try { - let response = await makeRequest(); - - for (let i = 0; i < (args.maxRetries ?? DEFAULT_MAX_RETRIES); ++i) { - if ( - response.status === 408 || - response.status === 409 || - response.status === 429 || - response.status >= 500 - ) { - const delay = Math.min(INITIAL_RETRY_DELAY * Math.pow(i, 2), MAX_RETRY_DELAY); - await new Promise((resolve) => setTimeout(resolve, delay)); - response = await makeRequest(); - } else { - break; - } - } - - let body: unknown; - if (response.body != null && args.responseType === "blob") { - body = await response.blob(); - } else if (response.body != null && args.responseType === "streaming") { - body = response.body; - } else { - const text = await response.text(); - if (text.length > 0) { - try { - body = JSON.parse(text); - } catch (err) { - return { - ok: false, - error: { - reason: "non-json", - statusCode: response.status, - rawBody: text, - }, - }; - } - } - } + const response = await requestWithRetries( + async () => + makeRequest( + fetchFn, + url, + args.method, + headers, + requestBody, + args.timeoutMs, + args.abortSignal, + args.withCredentials, + args.duplex + ), + args.maxRetries + ); + let responseBody = await getResponseBody(response, args.responseType); if (response.status >= 200 && response.status < 400) { return { ok: true, - body: body as R, + body: responseBody as R, headers: response.headers, }; } else { @@ -147,12 +100,20 @@ async function fetcherImpl(args: Fetcher.Args): Promise +): string { + return Object.keys(queryParameters ?? {}).length > 0 + ? `${baseUrl}?${qs.stringify(queryParameters, { arrayFormat: "repeat" })}` + : baseUrl; +} diff --git a/sdks/runtime/typescript/src/core/fetcher/getFetchFn.ts b/sdks/runtime/typescript/src/core/fetcher/getFetchFn.ts new file mode 100644 index 0000000000..9fd9bfc42b --- /dev/null +++ b/sdks/runtime/typescript/src/core/fetcher/getFetchFn.ts @@ -0,0 +1,25 @@ +import { RUNTIME } from "../runtime"; + +/** + * Returns a fetch function based on the runtime + */ +export async function getFetchFn(): Promise { + // In Node.js 18+ environments, use native fetch + if (RUNTIME.type === "node" && RUNTIME.parsedVersion != null && RUNTIME.parsedVersion >= 18) { + return fetch; + } + + // In Node.js 18 or lower environments, the SDK always uses`node-fetch`. + if (RUNTIME.type === "node") { + return (await import("node-fetch")).default as any; + } + + // Otherwise the SDK uses global fetch if available, + // and falls back to node-fetch. + if (typeof fetch == "function") { + return fetch; + } + + // Defaults to node `node-fetch` if global fetch isn't available + return (await import("node-fetch")).default as any; +} diff --git a/sdks/runtime/typescript/src/core/fetcher/getRequestBody.ts b/sdks/runtime/typescript/src/core/fetcher/getRequestBody.ts new file mode 100644 index 0000000000..1138414b1c --- /dev/null +++ b/sdks/runtime/typescript/src/core/fetcher/getRequestBody.ts @@ -0,0 +1,14 @@ +export declare namespace GetRequestBody { + interface Args { + body: unknown; + type: "json" | "file" | "bytes" | "other"; + } +} + +export async function getRequestBody({ body, type }: GetRequestBody.Args): Promise { + if (type.includes("json")) { + return JSON.stringify(body); + } else { + return body as BodyInit; + } +} diff --git a/sdks/runtime/typescript/src/core/fetcher/getResponseBody.ts b/sdks/runtime/typescript/src/core/fetcher/getResponseBody.ts new file mode 100644 index 0000000000..a7a9c50877 --- /dev/null +++ b/sdks/runtime/typescript/src/core/fetcher/getResponseBody.ts @@ -0,0 +1,32 @@ +import { chooseStreamWrapper } from "./stream-wrappers/chooseStreamWrapper"; + +export async function getResponseBody(response: Response, responseType?: string): Promise { + if (response.body != null && responseType === "blob") { + return await response.blob(); + } else if (response.body != null && responseType === "sse") { + return response.body; + } else if (response.body != null && responseType === "streaming") { + return chooseStreamWrapper(response.body); + } else if (response.body != null && responseType === "text") { + return await response.text(); + } else { + const text = await response.text(); + if (text.length > 0) { + try { + let responseBody = JSON.parse(text); + return responseBody; + } catch (err) { + return { + ok: false, + error: { + reason: "non-json", + statusCode: response.status, + rawBody: text, + }, + }; + } + } else { + return undefined; + } + } +} diff --git a/sdks/runtime/typescript/src/core/fetcher/makeRequest.ts b/sdks/runtime/typescript/src/core/fetcher/makeRequest.ts new file mode 100644 index 0000000000..8fb4bace46 --- /dev/null +++ b/sdks/runtime/typescript/src/core/fetcher/makeRequest.ts @@ -0,0 +1,44 @@ +import { anySignal, getTimeoutSignal } from "./signals"; + +export const makeRequest = async ( + fetchFn: (url: string, init: RequestInit) => Promise, + url: string, + method: string, + headers: Record, + requestBody: BodyInit | undefined, + timeoutMs?: number, + abortSignal?: AbortSignal, + withCredentials?: boolean, + duplex?: "half" +): Promise => { + const signals: AbortSignal[] = []; + + // Add timeout signal + let timeoutAbortId: NodeJS.Timeout | undefined = undefined; + if (timeoutMs != null) { + const { signal, abortId } = getTimeoutSignal(timeoutMs); + timeoutAbortId = abortId; + signals.push(signal); + } + + // Add arbitrary signal + if (abortSignal != null) { + signals.push(abortSignal); + } + let newSignals = anySignal(signals); + const response = await fetchFn(url, { + method: method, + headers, + body: requestBody, + signal: newSignals, + credentials: withCredentials ? "include" : undefined, + // @ts-ignore + duplex, + }); + + if (timeoutAbortId != null) { + clearTimeout(timeoutAbortId); + } + + return response; +}; diff --git a/sdks/runtime/typescript/src/core/fetcher/requestWithRetries.ts b/sdks/runtime/typescript/src/core/fetcher/requestWithRetries.ts new file mode 100644 index 0000000000..ff5dc3bbab --- /dev/null +++ b/sdks/runtime/typescript/src/core/fetcher/requestWithRetries.ts @@ -0,0 +1,21 @@ +const INITIAL_RETRY_DELAY = 1; +const MAX_RETRY_DELAY = 60; +const DEFAULT_MAX_RETRIES = 2; + +export async function requestWithRetries( + requestFn: () => Promise, + maxRetries: number = DEFAULT_MAX_RETRIES +): Promise { + let response: Response = await requestFn(); + + for (let i = 0; i < maxRetries; ++i) { + if ([408, 409, 429].includes(response.status) || response.status >= 500) { + const delay = Math.min(INITIAL_RETRY_DELAY * Math.pow(2, i), MAX_RETRY_DELAY); + await new Promise((resolve) => setTimeout(resolve, delay)); + response = await requestFn(); + } else { + break; + } + } + return response!; +} diff --git a/sdks/runtime/typescript/src/core/fetcher/signals.ts b/sdks/runtime/typescript/src/core/fetcher/signals.ts new file mode 100644 index 0000000000..6c124ff798 --- /dev/null +++ b/sdks/runtime/typescript/src/core/fetcher/signals.ts @@ -0,0 +1,38 @@ +const TIMEOUT = "timeout"; + +export function getTimeoutSignal(timeoutMs: number): { signal: AbortSignal; abortId: NodeJS.Timeout } { + const controller = new AbortController(); + const abortId = setTimeout(() => controller.abort(TIMEOUT), timeoutMs); + return { signal: controller.signal, abortId }; +} + +/** + * Returns an abort signal that is getting aborted when + * at least one of the specified abort signals is aborted. + * + * Requires at least node.js 18. + */ +export function anySignal(...args: AbortSignal[] | [AbortSignal[]]): AbortSignal { + // Allowing signals to be passed either as array + // of signals or as multiple arguments. + const signals = (args.length === 1 && Array.isArray(args[0]) ? args[0] : args); + + const controller = new AbortController(); + + for (const signal of signals) { + if (signal.aborted) { + // Exiting early if one of the signals + // is already aborted. + controller.abort((signal as any)?.reason); + break; + } + + // Listening for signals and removing the listeners + // when at least one symbol is aborted. + signal.addEventListener("abort", () => controller.abort((signal as any)?.reason), { + signal: controller.signal, + }); + } + + return controller.signal; +} diff --git a/sdks/runtime/typescript/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts b/sdks/runtime/typescript/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts new file mode 100644 index 0000000000..5cc74b6b1b --- /dev/null +++ b/sdks/runtime/typescript/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts @@ -0,0 +1,231 @@ +import type { Writable } from "stream"; +import { EventCallback, StreamWrapper } from "./chooseStreamWrapper"; + +export class Node18UniversalStreamWrapper + implements StreamWrapper, Uint8Array> +{ + private readableStream: ReadableStream; + private reader: ReadableStreamDefaultReader; + private events: Record; + private paused: boolean; + private resumeCallback: ((value?: unknown) => void) | null; + private encoding: string | null; + + constructor(readableStream: ReadableStream) { + this.readableStream = readableStream; + this.reader = this.readableStream.getReader(); + this.events = { + data: [], + end: [], + error: [], + readable: [], + close: [], + pause: [], + resume: [], + }; + this.paused = false; + this.resumeCallback = null; + this.encoding = null; + } + + public on(event: string, callback: EventCallback): void { + this.events[event]?.push(callback); + } + + public off(event: string, callback: EventCallback): void { + this.events[event] = this.events[event]?.filter((cb) => cb !== callback); + } + + public pipe( + dest: Node18UniversalStreamWrapper | Writable | WritableStream + ): Node18UniversalStreamWrapper | Writable | WritableStream { + this.on("data", async (chunk) => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._write(chunk); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.write(chunk).then(() => writer.releaseLock()); + } else { + dest.write(chunk); + } + }); + + this.on("end", async () => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._end(); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.close(); + } else { + dest.end(); + } + }); + + this.on("error", async (error) => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._error(error); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.abort(error); + } else { + dest.destroy(error); + } + }); + + this._startReading(); + + return dest; + } + + public pipeTo( + dest: Node18UniversalStreamWrapper | Writable | WritableStream + ): Node18UniversalStreamWrapper | Writable | WritableStream { + return this.pipe(dest); + } + + public unpipe(dest: Node18UniversalStreamWrapper | Writable | WritableStream): void { + this.off("data", async (chunk) => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._write(chunk); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.write(chunk).then(() => writer.releaseLock()); + } else { + dest.write(chunk); + } + }); + + this.off("end", async () => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._end(); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.close(); + } else { + dest.end(); + } + }); + + this.off("error", async (error) => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._error(error); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.abort(error); + } else { + dest.destroy(error); + } + }); + } + + public destroy(error?: Error): void { + this.reader + .cancel(error) + .then(() => { + this._emit("close"); + }) + .catch((err) => { + this._emit("error", err); + }); + } + + public pause(): void { + this.paused = true; + this._emit("pause"); + } + + public resume(): void { + if (this.paused) { + this.paused = false; + this._emit("resume"); + if (this.resumeCallback) { + this.resumeCallback(); + this.resumeCallback = null; + } + } + } + + public get isPaused(): boolean { + return this.paused; + } + + public async read(): Promise { + if (this.paused) { + await new Promise((resolve) => { + this.resumeCallback = resolve; + }); + } + const { done, value } = await this.reader.read(); + + if (done) { + return undefined; + } + return value; + } + + public setEncoding(encoding: string): void { + this.encoding = encoding; + } + + public async text(): Promise { + const chunks: Uint8Array[] = []; + + while (true) { + const { done, value } = await this.reader.read(); + if (done) break; + if (value) chunks.push(value); + } + + const decoder = new TextDecoder(this.encoding || "utf-8"); + return decoder.decode(await new Blob(chunks).arrayBuffer()); + } + + public async json(): Promise { + const text = await this.text(); + return JSON.parse(text); + } + + private _write(chunk: Uint8Array): void { + this._emit("data", chunk); + } + + private _end(): void { + this._emit("end"); + } + + private _error(error: any): void { + this._emit("error", error); + } + + private _emit(event: string, data?: any): void { + if (this.events[event]) { + for (const callback of this.events[event] || []) { + callback(data); + } + } + } + + private async _startReading(): Promise { + try { + this._emit("readable"); + while (true) { + if (this.paused) { + await new Promise((resolve) => { + this.resumeCallback = resolve; + }); + } + const { done, value } = await this.reader.read(); + if (done) { + this._emit("end"); + this._emit("close"); + break; + } + if (value) { + this._emit("data", value); + } + } + } catch (error) { + this._emit("error", error); + } + } +} diff --git a/sdks/runtime/typescript/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts b/sdks/runtime/typescript/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts new file mode 100644 index 0000000000..d73daba8ce --- /dev/null +++ b/sdks/runtime/typescript/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts @@ -0,0 +1,90 @@ +import type { Readable, Writable } from "stream"; +import { EventCallback, StreamWrapper } from "./chooseStreamWrapper"; + +export class NodePre18StreamWrapper implements StreamWrapper { + private readableStream: Readable; + private encoding: string | undefined; + + constructor(readableStream: Readable) { + this.readableStream = readableStream; + } + + public on(event: string, callback: EventCallback): void { + this.readableStream.on(event, callback); + } + + public off(event: string, callback: EventCallback): void { + this.readableStream.off(event, callback); + } + + public pipe(dest: Writable): Writable { + this.readableStream.pipe(dest); + return dest; + } + + public pipeTo(dest: Writable): Writable { + return this.pipe(dest); + } + + public unpipe(dest?: Writable): void { + if (dest) { + this.readableStream.unpipe(dest); + } else { + this.readableStream.unpipe(); + } + } + + public destroy(error?: Error): void { + this.readableStream.destroy(error); + } + + public pause(): void { + this.readableStream.pause(); + } + + public resume(): void { + this.readableStream.resume(); + } + + public get isPaused(): boolean { + return this.readableStream.isPaused(); + } + + public async read(): Promise { + return new Promise((resolve, reject) => { + const chunk = this.readableStream.read(); + if (chunk) { + resolve(chunk); + } else { + this.readableStream.once("readable", () => { + const chunk = this.readableStream.read(); + resolve(chunk); + }); + this.readableStream.once("error", reject); + } + }); + } + + public setEncoding(encoding?: string): void { + this.readableStream.setEncoding(encoding as BufferEncoding); + this.encoding = encoding; + } + + public async text(): Promise { + const chunks: Uint8Array[] = []; + const encoder = new TextEncoder(); + this.readableStream.setEncoding((this.encoding || "utf-8") as BufferEncoding); + + for await (const chunk of this.readableStream) { + chunks.push(encoder.encode(chunk)); + } + + const decoder = new TextDecoder(this.encoding || "utf-8"); + return decoder.decode(Buffer.concat(chunks)); + } + + public async json(): Promise { + const text = await this.text(); + return JSON.parse(text); + } +} diff --git a/sdks/runtime/typescript/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts b/sdks/runtime/typescript/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts new file mode 100644 index 0000000000..55c048732c --- /dev/null +++ b/sdks/runtime/typescript/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts @@ -0,0 +1,219 @@ +import { StreamWrapper } from "./chooseStreamWrapper"; + +type EventCallback = (data?: any) => void; + +export class UndiciStreamWrapper + implements StreamWrapper | WritableStream, ReadFormat> +{ + private readableStream: ReadableStream; + private reader: ReadableStreamDefaultReader; + private events: Record; + private paused: boolean; + private resumeCallback: ((value?: unknown) => void) | null; + private encoding: string | null; + + constructor(readableStream: ReadableStream) { + this.readableStream = readableStream; + this.reader = this.readableStream.getReader(); + this.events = { + data: [], + end: [], + error: [], + readable: [], + close: [], + pause: [], + resume: [], + }; + this.paused = false; + this.resumeCallback = null; + this.encoding = null; + } + + public on(event: string, callback: EventCallback): void { + this.events[event]?.push(callback); + } + + public off(event: string, callback: EventCallback): void { + this.events[event] = this.events[event]?.filter((cb) => cb !== callback); + } + + public pipe( + dest: UndiciStreamWrapper | WritableStream + ): UndiciStreamWrapper | WritableStream { + this.on("data", (chunk) => { + if (dest instanceof UndiciStreamWrapper) { + dest._write(chunk); + } else { + const writer = dest.getWriter(); + writer.write(chunk).then(() => writer.releaseLock()); + } + }); + + this.on("end", () => { + if (dest instanceof UndiciStreamWrapper) { + dest._end(); + } else { + const writer = dest.getWriter(); + writer.close(); + } + }); + + this.on("error", (error) => { + if (dest instanceof UndiciStreamWrapper) { + dest._error(error); + } else { + const writer = dest.getWriter(); + writer.abort(error); + } + }); + + this._startReading(); + + return dest; + } + + public pipeTo( + dest: UndiciStreamWrapper | WritableStream + ): UndiciStreamWrapper | WritableStream { + return this.pipe(dest); + } + + public unpipe(dest: UndiciStreamWrapper | WritableStream): void { + this.off("data", (chunk) => { + if (dest instanceof UndiciStreamWrapper) { + dest._write(chunk); + } else { + const writer = dest.getWriter(); + writer.write(chunk).then(() => writer.releaseLock()); + } + }); + + this.off("end", () => { + if (dest instanceof UndiciStreamWrapper) { + dest._end(); + } else { + const writer = dest.getWriter(); + writer.close(); + } + }); + + this.off("error", (error) => { + if (dest instanceof UndiciStreamWrapper) { + dest._error(error); + } else { + const writer = dest.getWriter(); + writer.abort(error); + } + }); + } + + public destroy(error?: Error): void { + this.reader + .cancel(error) + .then(() => { + this._emit("close"); + }) + .catch((err) => { + this._emit("error", err); + }); + } + + public pause(): void { + this.paused = true; + this._emit("pause"); + } + + public resume(): void { + if (this.paused) { + this.paused = false; + this._emit("resume"); + if (this.resumeCallback) { + this.resumeCallback(); + this.resumeCallback = null; + } + } + } + + public get isPaused(): boolean { + return this.paused; + } + + public async read(): Promise { + if (this.paused) { + await new Promise((resolve) => { + this.resumeCallback = resolve; + }); + } + const { done, value } = await this.reader.read(); + if (done) { + return undefined; + } + return value; + } + + public setEncoding(encoding: string): void { + this.encoding = encoding; + } + + public async text(): Promise { + const chunks: BlobPart[] = []; + + while (true) { + const { done, value } = await this.reader.read(); + if (done) break; + if (value) chunks.push(value); + } + + const decoder = new TextDecoder(this.encoding || "utf-8"); + return decoder.decode(await new Blob(chunks).arrayBuffer()); + } + + public async json(): Promise { + const text = await this.text(); + return JSON.parse(text); + } + + private _write(chunk: ReadFormat): void { + this._emit("data", chunk); + } + + private _end(): void { + this._emit("end"); + } + + private _error(error: any): void { + this._emit("error", error); + } + + private _emit(event: string, data?: any): void { + if (this.events[event]) { + for (const callback of this.events[event] || []) { + callback(data); + } + } + } + + private async _startReading(): Promise { + try { + this._emit("readable"); + while (true) { + if (this.paused) { + await new Promise((resolve) => { + this.resumeCallback = resolve; + }); + } + const { done, value } = await this.reader.read(); + if (done) { + this._emit("end"); + this._emit("close"); + break; + } + if (value) { + this._emit("data", value); + } + } + } catch (error) { + this._emit("error", error); + } + } +} diff --git a/sdks/runtime/typescript/src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts b/sdks/runtime/typescript/src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts new file mode 100644 index 0000000000..3295582d02 --- /dev/null +++ b/sdks/runtime/typescript/src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts @@ -0,0 +1,32 @@ +import type { Readable } from "stream"; +import { RUNTIME } from "../../runtime"; + +export type EventCallback = (data?: any) => void; + +export interface StreamWrapper { + setEncoding(encoding?: string): void; + on(event: string, callback: EventCallback): void; + off(event: string, callback: EventCallback): void; + pipe(dest: WritableStream): WritableStream; + pipeTo(dest: WritableStream): WritableStream; + unpipe(dest?: WritableStream): void; + destroy(error?: Error): void; + pause(): void; + resume(): void; + get isPaused(): boolean; + read(): Promise; + text(): Promise; + json(): Promise; +} + +export async function chooseStreamWrapper(responseBody: any): Promise>> { + if (RUNTIME.type === "node" && RUNTIME.parsedVersion != null && RUNTIME.parsedVersion >= 18) { + return new (await import("./Node18UniversalStreamWrapper")).Node18UniversalStreamWrapper( + responseBody as ReadableStream + ); + } else if (RUNTIME.type !== "node" && typeof fetch == "function") { + return new (await import("./UndiciStreamWrapper")).UndiciStreamWrapper(responseBody as ReadableStream); + } else { + return new (await import("./NodePre18StreamWrapper")).NodePre18StreamWrapper(responseBody as Readable); + } +} diff --git a/sdks/runtime/typescript/src/core/index.ts b/sdks/runtime/typescript/src/core/index.ts index e2eb66e805..f0a8603dec 100644 --- a/sdks/runtime/typescript/src/core/index.ts +++ b/sdks/runtime/typescript/src/core/index.ts @@ -1,3 +1,4 @@ +export * from "./runtime"; export * from "./fetcher"; export * from "./auth"; export * as serialization from "./schemas"; diff --git a/sdks/runtime/typescript/src/core/runtime/index.ts b/sdks/runtime/typescript/src/core/runtime/index.ts new file mode 100644 index 0000000000..5c76dbb133 --- /dev/null +++ b/sdks/runtime/typescript/src/core/runtime/index.ts @@ -0,0 +1 @@ +export { RUNTIME } from "./runtime"; diff --git a/sdks/runtime/typescript/src/core/runtime/runtime.ts b/sdks/runtime/typescript/src/core/runtime/runtime.ts new file mode 100644 index 0000000000..4d0687e8eb --- /dev/null +++ b/sdks/runtime/typescript/src/core/runtime/runtime.ts @@ -0,0 +1,126 @@ +interface DenoGlobal { + version: { + deno: string; + }; +} + +interface BunGlobal { + version: string; +} + +declare const Deno: DenoGlobal; +declare const Bun: BunGlobal; + +/** + * A constant that indicates whether the environment the code is running is a Web Browser. + */ +const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; + +/** + * A constant that indicates whether the environment the code is running is a Web Worker. + */ +const isWebWorker = + typeof self === "object" && + // @ts-ignore + typeof self?.importScripts === "function" && + (self.constructor?.name === "DedicatedWorkerGlobalScope" || + self.constructor?.name === "ServiceWorkerGlobalScope" || + self.constructor?.name === "SharedWorkerGlobalScope"); + +/** + * A constant that indicates whether the environment the code is running is Deno. + */ +const isDeno = + typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; + +/** + * A constant that indicates whether the environment the code is running is Bun.sh. + */ +const isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; + +/** + * A constant that indicates whether the environment the code is running is Node.JS. + */ +const isNode = + typeof process !== "undefined" && + Boolean(process.version) && + Boolean(process.versions?.node) && + // Deno spoofs process.versions.node, see https://deno.land/std@0.177.0/node/process.ts?s=versions + !isDeno && + !isBun; + +/** + * A constant that indicates whether the environment the code is running is in React-Native. + * https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js + */ +const isReactNative = typeof navigator !== "undefined" && navigator?.product === "ReactNative"; + +/** + * A constant that indicates whether the environment the code is running is Cloudflare. + * https://developers.cloudflare.com/workers/runtime-apis/web-standards/#navigatoruseragent + */ +const isCloudflare = typeof globalThis !== "undefined" && globalThis?.navigator?.userAgent === "Cloudflare-Workers"; + +/** + * A constant that indicates which environment and version the SDK is running in. + */ +export const RUNTIME: Runtime = evaluateRuntime(); + +export interface Runtime { + type: "browser" | "web-worker" | "deno" | "bun" | "node" | "react-native" | "unknown" | "workerd"; + version?: string; + parsedVersion?: number; +} + +function evaluateRuntime(): Runtime { + if (isBrowser) { + return { + type: "browser", + version: window.navigator.userAgent, + }; + } + + if (isCloudflare) { + return { + type: "workerd", + }; + } + + if (isWebWorker) { + return { + type: "web-worker", + }; + } + + if (isDeno) { + return { + type: "deno", + version: Deno.version.deno, + }; + } + + if (isBun) { + return { + type: "bun", + version: Bun.version, + }; + } + + if (isNode) { + return { + type: "node", + version: process.versions.node, + parsedVersion: Number(process.versions.node.split(".")[0]), + }; + } + + if (isReactNative) { + return { + type: "react-native", + }; + } + + return { + type: "unknown", + }; +} diff --git a/sdks/runtime/typescript/src/core/schemas/Schema.ts b/sdks/runtime/typescript/src/core/schemas/Schema.ts index 870f373ba8..19acc5dc44 100644 --- a/sdks/runtime/typescript/src/core/schemas/Schema.ts +++ b/sdks/runtime/typescript/src/core/schemas/Schema.ts @@ -1,5 +1,4 @@ import { SchemaUtils } from "./builders"; -import { MaybePromise } from "./utils/MaybePromise"; export type Schema = BaseSchema & SchemaUtils; @@ -7,9 +6,9 @@ export type inferRaw = S extends Schema ? Raw export type inferParsed = S extends Schema ? Parsed : never; export interface BaseSchema { - parse: (raw: unknown, opts?: SchemaOptions) => MaybePromise>; - json: (parsed: unknown, opts?: SchemaOptions) => MaybePromise>; - getType: () => SchemaType | Promise; + parse: (raw: unknown, opts?: SchemaOptions) => MaybeValid; + json: (parsed: unknown, opts?: SchemaOptions) => MaybeValid; + getType: () => SchemaType | SchemaType; } export const SchemaType = { @@ -91,4 +90,9 @@ export interface SchemaOptions { * helpful for zurg's internal debug logging. */ breadcrumbsPrefix?: string[]; + + /** + * whether to send 'null' for optional properties explicitly set to 'undefined'. + */ + omitUndefined?: boolean; } diff --git a/sdks/runtime/typescript/src/core/schemas/builders/lazy/lazy.ts b/sdks/runtime/typescript/src/core/schemas/builders/lazy/lazy.ts index a665472d22..835c61f8a5 100644 --- a/sdks/runtime/typescript/src/core/schemas/builders/lazy/lazy.ts +++ b/sdks/runtime/typescript/src/core/schemas/builders/lazy/lazy.ts @@ -1,7 +1,7 @@ import { BaseSchema, Schema } from "../../Schema"; import { getSchemaUtils } from "../schema-utils"; -export type SchemaGetter> = () => SchemaType | Promise; +export type SchemaGetter> = () => SchemaType; export function lazy(getter: SchemaGetter>): Schema { const baseSchema = constructLazyBaseSchema(getter); @@ -15,20 +15,18 @@ export function constructLazyBaseSchema( getter: SchemaGetter> ): BaseSchema { return { - parse: async (raw, opts) => (await getMemoizedSchema(getter)).parse(raw, opts), - json: async (parsed, opts) => (await getMemoizedSchema(getter)).json(parsed, opts), - getType: async () => (await getMemoizedSchema(getter)).getType(), + parse: (raw, opts) => getMemoizedSchema(getter).parse(raw, opts), + json: (parsed, opts) => getMemoizedSchema(getter).json(parsed, opts), + getType: () => getMemoizedSchema(getter).getType(), }; } type MemoizedGetter> = SchemaGetter & { __zurg_memoized?: SchemaType }; -export async function getMemoizedSchema>( - getter: SchemaGetter -): Promise { +export function getMemoizedSchema>(getter: SchemaGetter): SchemaType { const castedGetter = getter as MemoizedGetter; if (castedGetter.__zurg_memoized == null) { - castedGetter.__zurg_memoized = await getter(); + castedGetter.__zurg_memoized = getter(); } return castedGetter.__zurg_memoized; } diff --git a/sdks/runtime/typescript/src/core/schemas/builders/lazy/lazyObject.ts b/sdks/runtime/typescript/src/core/schemas/builders/lazy/lazyObject.ts index e48c016667..38c9e28404 100644 --- a/sdks/runtime/typescript/src/core/schemas/builders/lazy/lazyObject.ts +++ b/sdks/runtime/typescript/src/core/schemas/builders/lazy/lazyObject.ts @@ -7,8 +7,8 @@ import { constructLazyBaseSchema, getMemoizedSchema, SchemaGetter } from "./lazy export function lazyObject(getter: SchemaGetter>): ObjectSchema { const baseSchema: BaseObjectSchema = { ...constructLazyBaseSchema(getter), - _getRawProperties: async () => (await getMemoizedSchema(getter))._getRawProperties(), - _getParsedProperties: async () => (await getMemoizedSchema(getter))._getParsedProperties(), + _getRawProperties: () => getMemoizedSchema(getter)._getRawProperties(), + _getParsedProperties: () => getMemoizedSchema(getter)._getParsedProperties(), }; return { diff --git a/sdks/runtime/typescript/src/core/schemas/builders/list/list.ts b/sdks/runtime/typescript/src/core/schemas/builders/list/list.ts index b333321b50..e4c5c4a4a9 100644 --- a/sdks/runtime/typescript/src/core/schemas/builders/list/list.ts +++ b/sdks/runtime/typescript/src/core/schemas/builders/list/list.ts @@ -1,12 +1,11 @@ import { BaseSchema, MaybeValid, Schema, SchemaType, ValidationError } from "../../Schema"; import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; -import { MaybePromise } from "../../utils/MaybePromise"; import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; import { getSchemaUtils } from "../schema-utils"; export function list(schema: Schema): Schema { const baseSchema: BaseSchema = { - parse: async (raw, opts) => + parse: (raw, opts) => validateAndTransformArray(raw, (item, index) => schema.parse(item, { ...opts, @@ -29,10 +28,10 @@ export function list(schema: Schema): Schema( +function validateAndTransformArray( value: unknown, - transformItem: (item: Raw, index: number) => MaybePromise> -): Promise> { + transformItem: (item: Raw, index: number) => MaybeValid +): MaybeValid { if (!Array.isArray(value)) { return { ok: false, @@ -45,7 +44,7 @@ async function validateAndTransformArray( }; } - const maybeValidItems = await Promise.all(value.map((item, index) => transformItem(item, index))); + const maybeValidItems = value.map((item, index) => transformItem(item, index)); return maybeValidItems.reduce>( (acc, item) => { diff --git a/sdks/runtime/typescript/src/core/schemas/builders/object-like/getObjectLikeUtils.ts b/sdks/runtime/typescript/src/core/schemas/builders/object-like/getObjectLikeUtils.ts index 270ea170c8..8331d08da8 100644 --- a/sdks/runtime/typescript/src/core/schemas/builders/object-like/getObjectLikeUtils.ts +++ b/sdks/runtime/typescript/src/core/schemas/builders/object-like/getObjectLikeUtils.ts @@ -20,8 +20,8 @@ export function withParsedProperties Properties[K]) } ): ObjectLikeSchema { const objectSchema: BaseSchema = { - parse: async (raw, opts) => { - const parsedObject = await objectLike.parse(raw, opts); + parse: (raw, opts) => { + const parsedObject = objectLike.parse(raw, opts); if (!parsedObject.ok) { return parsedObject; } diff --git a/sdks/runtime/typescript/src/core/schemas/builders/object/object.ts b/sdks/runtime/typescript/src/core/schemas/builders/object/object.ts index 4abadfb38b..e00136d72f 100644 --- a/sdks/runtime/typescript/src/core/schemas/builders/object/object.ts +++ b/sdks/runtime/typescript/src/core/schemas/builders/object/object.ts @@ -4,7 +4,6 @@ import { filterObject } from "../../utils/filterObject"; import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; import { isPlainObject } from "../../utils/isPlainObject"; import { keys } from "../../utils/keys"; -import { MaybePromise } from "../../utils/MaybePromise"; import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; import { partition } from "../../utils/partition"; import { getObjectLikeUtils } from "../object-like"; @@ -34,15 +33,12 @@ export function object > = { _getRawProperties: () => - Promise.resolve( - Object.entries(schemas).map(([parsedKey, propertySchema]) => - isProperty(propertySchema) ? propertySchema.rawKey : parsedKey - ) as unknown as (keyof inferRawObjectFromPropertySchemas)[] - ), - _getParsedProperties: () => - Promise.resolve(keys(schemas) as unknown as (keyof inferParsedObjectFromPropertySchemas)[]), + Object.entries(schemas).map(([parsedKey, propertySchema]) => + isProperty(propertySchema) ? propertySchema.rawKey : parsedKey + ) as unknown as (keyof inferRawObjectFromPropertySchemas)[], + _getParsedProperties: () => keys(schemas) as unknown as (keyof inferParsedObjectFromPropertySchemas)[], - parse: async (raw, opts) => { + parse: (raw, opts) => { const rawKeyToProperty: Record = {}; const requiredKeys: string[] = []; @@ -60,7 +56,7 @@ export function object { + json: (parsed, opts) => { const requiredKeys: string[] = []; for (const [parsedKey, schemaOrObjectProperty] of entries(schemas)) { @@ -96,7 +93,7 @@ export function object MaybePromise> } - | undefined => { + ): { transformedKey: string; transform: (propertyValue: unknown) => MaybeValid } | undefined => { const property = schemas[parsedKey as keyof T]; // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition @@ -139,6 +134,7 @@ export function object({ +function validateAndTransformObject({ value, requiredKeys, getProperty, @@ -165,11 +161,12 @@ async function validateAndTransformObject({ requiredKeys: string[]; getProperty: ( preTransformedKey: string - ) => { transformedKey: string; transform: (propertyValue: unknown) => MaybePromise> } | undefined; + ) => { transformedKey: string; transform: (propertyValue: unknown) => MaybeValid } | undefined; unrecognizedObjectKeys: "fail" | "passthrough" | "strip" | undefined; skipValidation: boolean | undefined; breadcrumbsPrefix: string[] | undefined; -}): Promise> { + omitUndefined: boolean | undefined; +}): MaybeValid { if (!isPlainObject(value)) { return { ok: false, @@ -192,7 +189,7 @@ async function validateAndTransformObject({ if (property != null) { missingRequiredKeys.delete(preTransformedKey); - const value = await property.transform(preTransformedItemValue); + const value = property.transform(preTransformedItemValue); if (value.ok) { transformed[property.transformedKey] = value.value; } else { @@ -242,25 +239,19 @@ export function getObjectUtils(schema: BaseObjectSchema(extension: ObjectSchema) => { const baseSchema: BaseObjectSchema = { - _getParsedProperties: async () => [ - ...(await schema._getParsedProperties()), - ...(await extension._getParsedProperties()), - ], - _getRawProperties: async () => [ - ...(await schema._getRawProperties()), - ...(await extension._getRawProperties()), - ], - parse: async (raw, opts) => { + _getParsedProperties: () => [...schema._getParsedProperties(), ...extension._getParsedProperties()], + _getRawProperties: () => [...schema._getRawProperties(), ...extension._getRawProperties()], + parse: (raw, opts) => { return validateAndTransformExtendedObject({ - extensionKeys: await extension._getRawProperties(), + extensionKeys: extension._getRawProperties(), value: raw, transformBase: (rawBase) => schema.parse(rawBase, opts), transformExtension: (rawExtension) => extension.parse(rawExtension, opts), }); }, - json: async (parsed, opts) => { + json: (parsed, opts) => { return validateAndTransformExtendedObject({ - extensionKeys: await extension._getParsedProperties(), + extensionKeys: extension._getParsedProperties(), value: parsed, transformBase: (parsedBase) => schema.json(parsedBase, opts), transformExtension: (parsedExtension) => extension.json(parsedExtension, opts), @@ -279,7 +270,7 @@ export function getObjectUtils(schema: BaseObjectSchema({ +function validateAndTransformExtendedObject({ extensionKeys, value, transformBase, @@ -287,16 +278,16 @@ async function validateAndTransformExtendedObject MaybePromise>; - transformExtension: (value: unknown) => MaybePromise>; -}): Promise> { + transformBase: (value: unknown) => MaybeValid; + transformExtension: (value: unknown) => MaybeValid; +}): MaybeValid { const extensionPropertiesSet = new Set(extensionKeys); const [extensionProperties, baseProperties] = partition(keys(value), (key) => extensionPropertiesSet.has(key as keyof PreTransformedExtension) ); - const transformedBase = await transformBase(filterObject(value, baseProperties)); - const transformedExtension = await transformExtension(filterObject(value, extensionProperties)); + const transformedBase = transformBase(filterObject(value, baseProperties)); + const transformedExtension = transformExtension(filterObject(value, extensionProperties)); if (transformedBase.ok && transformedExtension.ok) { return { @@ -317,12 +308,12 @@ async function validateAndTransformExtendedObject): Promise { - return !(await isSchemaOptional(schema)); +function isSchemaRequired(schema: Schema): boolean { + return !isSchemaOptional(schema); } -async function isSchemaOptional(schema: Schema): Promise { - switch (await schema.getType()) { +function isSchemaOptional(schema: Schema): boolean { + switch (schema.getType()) { case SchemaType.ANY: case SchemaType.UNKNOWN: case SchemaType.OPTIONAL: diff --git a/sdks/runtime/typescript/src/core/schemas/builders/object/types.ts b/sdks/runtime/typescript/src/core/schemas/builders/object/types.ts index 17cff4f86d..de9bb4074e 100644 --- a/sdks/runtime/typescript/src/core/schemas/builders/object/types.ts +++ b/sdks/runtime/typescript/src/core/schemas/builders/object/types.ts @@ -10,8 +10,8 @@ export type ObjectSchema = BaseObjectSchema & SchemaUtils; export interface BaseObjectSchema extends BaseSchema { - _getRawProperties: () => Promise<(keyof Raw)[]>; - _getParsedProperties: () => Promise<(keyof Parsed)[]>; + _getRawProperties: () => (keyof Raw)[]; + _getParsedProperties: () => (keyof Parsed)[]; } export interface ObjectUtils { diff --git a/sdks/runtime/typescript/src/core/schemas/builders/record/record.ts b/sdks/runtime/typescript/src/core/schemas/builders/record/record.ts index ac1cd22ade..6683ac3609 100644 --- a/sdks/runtime/typescript/src/core/schemas/builders/record/record.ts +++ b/sdks/runtime/typescript/src/core/schemas/builders/record/record.ts @@ -2,7 +2,6 @@ import { MaybeValid, Schema, SchemaType, ValidationError } from "../../Schema"; import { entries } from "../../utils/entries"; import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; import { isPlainObject } from "../../utils/isPlainObject"; -import { MaybePromise } from "../../utils/MaybePromise"; import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; import { getSchemaUtils } from "../schema-utils"; import { BaseRecordSchema, RecordSchema } from "./types"; @@ -12,10 +11,10 @@ export function record ): RecordSchema { const baseSchema: BaseRecordSchema = { - parse: async (raw, opts) => { + parse: (raw, opts) => { return validateAndTransformRecord({ value: raw, - isKeyNumeric: (await keySchema.getType()) === SchemaType.NUMBER, + isKeyNumeric: keySchema.getType() === SchemaType.NUMBER, transformKey: (key) => keySchema.parse(key, { ...opts, @@ -29,10 +28,10 @@ export function record { + json: (parsed, opts) => { return validateAndTransformRecord({ value: parsed, - isKeyNumeric: (await keySchema.getType()) === SchemaType.NUMBER, + isKeyNumeric: keySchema.getType() === SchemaType.NUMBER, transformKey: (key) => keySchema.json(key, { ...opts, @@ -55,7 +54,7 @@ export function record({ +function validateAndTransformRecord({ value, isKeyNumeric, transformKey, @@ -64,10 +63,10 @@ async function validateAndTransformRecord MaybePromise>; - transformValue: (value: unknown, key: string | number) => MaybePromise>; + transformKey: (key: string | number) => MaybeValid; + transformValue: (value: unknown, key: string | number) => MaybeValid; breadcrumbsPrefix: string[] | undefined; -}): Promise>> { +}): MaybeValid> { if (!isPlainObject(value)) { return { ok: false, @@ -80,14 +79,14 @@ async function validateAndTransformRecord>>>( - async (accPromise, [stringKey, value]) => { + return entries(value).reduce>>( + (accPromise, [stringKey, value]) => { // skip nullish keys if (value == null) { return accPromise; } - const acc = await accPromise; + const acc = accPromise; let key: string | number = stringKey; if (isKeyNumeric) { @@ -96,9 +95,9 @@ async function validateAndTransformRecord }) + { ok: true, value: {} as Record } ); } diff --git a/sdks/runtime/typescript/src/core/schemas/builders/schema-utils/getSchemaUtils.ts b/sdks/runtime/typescript/src/core/schemas/builders/schema-utils/getSchemaUtils.ts index 0c0d379d80..79ecad9213 100644 --- a/sdks/runtime/typescript/src/core/schemas/builders/schema-utils/getSchemaUtils.ts +++ b/sdks/runtime/typescript/src/core/schemas/builders/schema-utils/getSchemaUtils.ts @@ -5,8 +5,8 @@ import { ParseError } from "./ParseError"; export interface SchemaUtils { optional: () => Schema; transform: (transformer: SchemaTransformer) => Schema; - parseOrThrow: (raw: unknown, opts?: SchemaOptions) => Promise; - jsonOrThrow: (raw: unknown, opts?: SchemaOptions) => Promise; + parseOrThrow: (raw: unknown, opts?: SchemaOptions) => Parsed; + jsonOrThrow: (raw: unknown, opts?: SchemaOptions) => Raw; } export interface SchemaTransformer { @@ -18,15 +18,15 @@ export function getSchemaUtils(schema: BaseSchema): Sc return { optional: () => optional(schema), transform: (transformer) => transform(schema, transformer), - parseOrThrow: async (raw, opts) => { - const parsed = await schema.parse(raw, opts); + parseOrThrow: (raw, opts) => { + const parsed = schema.parse(raw, opts); if (parsed.ok) { return parsed.value; } throw new ParseError(parsed.errors); }, - jsonOrThrow: async (parsed, opts) => { - const raw = await schema.json(parsed, opts); + jsonOrThrow: (parsed, opts) => { + const raw = schema.json(parsed, opts); if (raw.ok) { return raw.value; } @@ -53,6 +53,12 @@ export function optional( return schema.parse(raw, opts); }, json: (parsed, opts) => { + if (opts?.omitUndefined && parsed === undefined) { + return { + ok: true, + value: undefined, + }; + } if (parsed == null) { return { ok: true, @@ -75,8 +81,8 @@ export function transform( transformer: SchemaTransformer ): Schema { const baseSchema: BaseSchema = { - parse: async (raw, opts) => { - const parsed = await schema.parse(raw, opts); + parse: (raw, opts) => { + const parsed = schema.parse(raw, opts); if (!parsed.ok) { return parsed; } @@ -85,8 +91,8 @@ export function transform( value: transformer.transform(parsed.value), }; }, - json: async (transformed, opts) => { - const parsed = await transformer.untransform(transformed); + json: (transformed, opts) => { + const parsed = transformer.untransform(transformed); return schema.json(parsed, opts); }, getType: () => schema.getType(), diff --git a/sdks/runtime/typescript/src/core/schemas/builders/set/set.ts b/sdks/runtime/typescript/src/core/schemas/builders/set/set.ts index 3113bcba30..e9e6bb7e53 100644 --- a/sdks/runtime/typescript/src/core/schemas/builders/set/set.ts +++ b/sdks/runtime/typescript/src/core/schemas/builders/set/set.ts @@ -7,8 +7,8 @@ import { getSchemaUtils } from "../schema-utils"; export function set(schema: Schema): Schema> { const listSchema = list(schema); const baseSchema: BaseSchema> = { - parse: async (raw, opts) => { - const parsedList = await listSchema.parse(raw, opts); + parse: (raw, opts) => { + const parsedList = listSchema.parse(raw, opts); if (parsedList.ok) { return { ok: true, @@ -18,7 +18,7 @@ export function set(schema: Schema): Schema { + json: (parsed, opts) => { if (!(parsed instanceof Set)) { return { ok: false, @@ -30,7 +30,7 @@ export function set(schema: Schema): Schema SchemaType.SET, diff --git a/sdks/runtime/typescript/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts b/sdks/runtime/typescript/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts index 771dc6a7ef..21ed3df0f4 100644 --- a/sdks/runtime/typescript/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts +++ b/sdks/runtime/typescript/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts @@ -1,5 +1,4 @@ import { BaseSchema, MaybeValid, Schema, SchemaOptions, SchemaType, ValidationError } from "../../Schema"; -import { MaybePromise } from "../../utils/MaybePromise"; import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; import { getSchemaUtils } from "../schema-utils"; import { inferParsedUnidiscriminatedUnionSchema, inferRawUnidiscriminatedUnionSchema } from "./types"; @@ -11,14 +10,14 @@ export function undiscriminatedUnion, ...Schem inferRawUnidiscriminatedUnionSchema, inferParsedUnidiscriminatedUnionSchema > = { - parse: async (raw, opts) => { + parse: (raw, opts) => { return validateAndTransformUndiscriminatedUnion>( (schema, opts) => schema.parse(raw, opts), schemas, opts ); }, - json: async (parsed, opts) => { + json: (parsed, opts) => { return validateAndTransformUndiscriminatedUnion>( (schema, opts) => schema.json(parsed, opts), schemas, @@ -34,14 +33,14 @@ export function undiscriminatedUnion, ...Schem }; } -async function validateAndTransformUndiscriminatedUnion( - transform: (schema: Schema, opts: SchemaOptions) => MaybePromise>, +function validateAndTransformUndiscriminatedUnion( + transform: (schema: Schema, opts: SchemaOptions) => MaybeValid, schemas: Schema[], opts: SchemaOptions | undefined -): Promise> { +): MaybeValid { const errors: ValidationError[] = []; for (const [index, schema] of schemas.entries()) { - const transformed = await transform(schema, { ...opts, skipValidation: false }); + const transformed = transform(schema, { ...opts, skipValidation: false }); if (transformed.ok) { return transformed; } else { diff --git a/sdks/runtime/typescript/src/core/schemas/builders/union/union.ts b/sdks/runtime/typescript/src/core/schemas/builders/union/union.ts index ed659beb62..ab61475a57 100644 --- a/sdks/runtime/typescript/src/core/schemas/builders/union/union.ts +++ b/sdks/runtime/typescript/src/core/schemas/builders/union/union.ts @@ -2,7 +2,6 @@ import { BaseSchema, MaybeValid, SchemaType } from "../../Schema"; import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; import { isPlainObject } from "../../utils/isPlainObject"; import { keys } from "../../utils/keys"; -import { MaybePromise } from "../../utils/MaybePromise"; import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; import { enum_ } from "../enum"; import { ObjectSchema } from "../object"; @@ -25,7 +24,7 @@ export function union, U extends Union const discriminantValueSchema = enum_(keys(union) as string[]); const baseSchema: BaseSchema, inferParsedUnion> = { - parse: async (raw, opts) => { + parse: (raw, opts) => { return transformAndValidateUnion({ value: raw, discriminant: rawDiscriminant, @@ -42,7 +41,7 @@ export function union, U extends Union breadcrumbsPrefix: opts?.breadcrumbsPrefix, }); }, - json: async (parsed, opts) => { + json: (parsed, opts) => { return transformAndValidateUnion({ value: parsed, discriminant: parsedDiscriminant, @@ -69,7 +68,7 @@ export function union, U extends Union }; } -async function transformAndValidateUnion< +function transformAndValidateUnion< TransformedDiscriminant extends string, TransformedDiscriminantValue extends string, TransformedAdditionalProperties @@ -86,17 +85,15 @@ async function transformAndValidateUnion< value: unknown; discriminant: string; transformedDiscriminant: TransformedDiscriminant; - transformDiscriminantValue: (discriminantValue: unknown) => MaybePromise>; + transformDiscriminantValue: (discriminantValue: unknown) => MaybeValid; getAdditionalPropertiesSchema: (discriminantValue: string) => ObjectSchema | undefined; allowUnrecognizedUnionMembers: boolean | undefined; transformAdditionalProperties: ( additionalProperties: unknown, additionalPropertiesSchema: ObjectSchema - ) => MaybePromise>; + ) => MaybeValid; breadcrumbsPrefix: string[] | undefined; -}): Promise< - MaybeValid & TransformedAdditionalProperties> -> { +}): MaybeValid & TransformedAdditionalProperties> { if (!isPlainObject(value)) { return { ok: false, @@ -123,7 +120,7 @@ async function transformAndValidateUnion< }; } - const transformedDiscriminantValue = await transformDiscriminantValue(discriminantValue); + const transformedDiscriminantValue = transformDiscriminantValue(discriminantValue); if (!transformedDiscriminantValue.ok) { return { ok: false, @@ -155,7 +152,7 @@ async function transformAndValidateUnion< } } - const transformedAdditionalProperties = await transformAdditionalProperties( + const transformedAdditionalProperties = transformAdditionalProperties( additionalProperties, additionalPropertiesSchema ); diff --git a/sdks/runtime/typescript/src/core/schemas/utils/maybeSkipValidation.ts b/sdks/runtime/typescript/src/core/schemas/utils/maybeSkipValidation.ts index 99c02c32bd..86c07abf2b 100644 --- a/sdks/runtime/typescript/src/core/schemas/utils/maybeSkipValidation.ts +++ b/sdks/runtime/typescript/src/core/schemas/utils/maybeSkipValidation.ts @@ -1,5 +1,4 @@ import { BaseSchema, MaybeValid, SchemaOptions } from "../Schema"; -import { MaybePromise } from "./MaybePromise"; export function maybeSkipValidation, Raw, Parsed>(schema: S): S { return { @@ -10,10 +9,10 @@ export function maybeSkipValidation, Raw, Pars } function transformAndMaybeSkipValidation( - transform: (value: unknown, opts?: SchemaOptions) => MaybePromise> -): (value: unknown, opts?: SchemaOptions) => MaybePromise> { - return async (value, opts): Promise> => { - const transformed = await transform(value, opts); + transform: (value: unknown, opts?: SchemaOptions) => MaybeValid +): (value: unknown, opts?: SchemaOptions) => MaybeValid { + return (value, opts): MaybeValid => { + const transformed = transform(value, opts); const { skipValidation = false } = opts ?? {}; if (!transformed.ok && skipValidation) { // eslint-disable-next-line no-console diff --git a/sdks/runtime/typescript/src/index.ts b/sdks/runtime/typescript/src/index.ts index 2dae0b8f99..9e457779dd 100644 --- a/sdks/runtime/typescript/src/index.ts +++ b/sdks/runtime/typescript/src/index.ts @@ -2,7 +2,3 @@ export * as Rivet from "./api"; export { RivetClient } from "./Client"; export { RivetEnvironment } from "./environments"; export { RivetError, RivetTimeoutError } from "./errors"; -export * as core from "./core"; -export * as apiResponse from "./core/fetcher/APIResponse"; -export * as fetcher from "./core/fetcher"; -export * as serialization from "./serialization"; diff --git a/sdks/runtime/typescript/src/serialization/resources/captcha/resources/config/types/Config.ts b/sdks/runtime/typescript/src/serialization/resources/captcha/resources/config/types/Config.ts index 8497e68361..1305d71bf1 100644 --- a/sdks/runtime/typescript/src/serialization/resources/captcha/resources/config/types/Config.ts +++ b/sdks/runtime/typescript/src/serialization/resources/captcha/resources/config/types/Config.ts @@ -2,23 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { ConfigHcaptcha as captcha_config$$configHcaptcha } from "./ConfigHcaptcha"; +import { ConfigTurnstile as captcha_config$$configTurnstile } from "./ConfigTurnstile"; +import { captcha } from "../../../../index"; export const Config: core.serialization.ObjectSchema = core.serialization.object({ - hcaptcha: core.serialization - .lazyObject(async () => (await import("../../../../..")).captcha.ConfigHcaptcha) - .optional(), - turnstile: core.serialization - .lazyObject(async () => (await import("../../../../..")).captcha.ConfigTurnstile) - .optional(), + hcaptcha: captcha_config$$configHcaptcha.optional(), + turnstile: captcha_config$$configTurnstile.optional(), }); export declare namespace Config { interface Raw { - hcaptcha?: serializers.captcha.ConfigHcaptcha.Raw | null; - turnstile?: serializers.captcha.ConfigTurnstile.Raw | null; + hcaptcha?: captcha.ConfigHcaptcha.Raw | null; + turnstile?: captcha.ConfigTurnstile.Raw | null; } } diff --git a/sdks/runtime/typescript/src/serialization/resources/captcha/resources/config/types/ConfigHcaptcha.ts b/sdks/runtime/typescript/src/serialization/resources/captcha/resources/config/types/ConfigHcaptcha.ts index 7c60ba5bfa..9f82e146f6 100644 --- a/sdks/runtime/typescript/src/serialization/resources/captcha/resources/config/types/ConfigHcaptcha.ts +++ b/sdks/runtime/typescript/src/serialization/resources/captcha/resources/config/types/ConfigHcaptcha.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const ConfigHcaptcha: core.serialization.ObjectSchema< diff --git a/sdks/runtime/typescript/src/serialization/resources/captcha/resources/config/types/ConfigTurnstile.ts b/sdks/runtime/typescript/src/serialization/resources/captcha/resources/config/types/ConfigTurnstile.ts index b7614ac985..fdb270007e 100644 --- a/sdks/runtime/typescript/src/serialization/resources/captcha/resources/config/types/ConfigTurnstile.ts +++ b/sdks/runtime/typescript/src/serialization/resources/captcha/resources/config/types/ConfigTurnstile.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const ConfigTurnstile: core.serialization.ObjectSchema< diff --git a/sdks/runtime/typescript/src/serialization/resources/common/types/DisplayName.ts b/sdks/runtime/typescript/src/serialization/resources/common/types/DisplayName.ts index f315a99305..e9852bbde3 100644 --- a/sdks/runtime/typescript/src/serialization/resources/common/types/DisplayName.ts +++ b/sdks/runtime/typescript/src/serialization/resources/common/types/DisplayName.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const DisplayName: core.serialization.Schema = diff --git a/sdks/runtime/typescript/src/serialization/resources/common/types/ErrorBody.ts b/sdks/runtime/typescript/src/serialization/resources/common/types/ErrorBody.ts index c36a596cf5..6360c55333 100644 --- a/sdks/runtime/typescript/src/serialization/resources/common/types/ErrorBody.ts +++ b/sdks/runtime/typescript/src/serialization/resources/common/types/ErrorBody.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { ErrorMetadata as common$$errorMetadata } from "./ErrorMetadata"; +import { common } from "../../index"; export const ErrorBody: core.serialization.ObjectSchema = core.serialization.object({ @@ -12,7 +14,7 @@ export const ErrorBody: core.serialization.ObjectSchema (await import("../../..")).ErrorMetadata).optional(), + metadata: common$$errorMetadata.optional(), }); export declare namespace ErrorBody { @@ -21,6 +23,6 @@ export declare namespace ErrorBody { message: string; ray_id: string; documentation?: string | null; - metadata?: (serializers.ErrorMetadata.Raw | undefined) | null; + metadata?: (common.ErrorMetadata.Raw | undefined) | null; } } diff --git a/sdks/runtime/typescript/src/serialization/resources/common/types/ErrorMetadata.ts b/sdks/runtime/typescript/src/serialization/resources/common/types/ErrorMetadata.ts index c060927b7b..df2633a06a 100644 --- a/sdks/runtime/typescript/src/serialization/resources/common/types/ErrorMetadata.ts +++ b/sdks/runtime/typescript/src/serialization/resources/common/types/ErrorMetadata.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const ErrorMetadata: core.serialization.Schema = diff --git a/sdks/runtime/typescript/src/serialization/resources/common/types/Identifier.ts b/sdks/runtime/typescript/src/serialization/resources/common/types/Identifier.ts index 043a639c46..d214516c24 100644 --- a/sdks/runtime/typescript/src/serialization/resources/common/types/Identifier.ts +++ b/sdks/runtime/typescript/src/serialization/resources/common/types/Identifier.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const Identifier: core.serialization.Schema = diff --git a/sdks/runtime/typescript/src/serialization/resources/common/types/Jwt.ts b/sdks/runtime/typescript/src/serialization/resources/common/types/Jwt.ts index 936f045bfa..0527bf6e24 100644 --- a/sdks/runtime/typescript/src/serialization/resources/common/types/Jwt.ts +++ b/sdks/runtime/typescript/src/serialization/resources/common/types/Jwt.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const Jwt: core.serialization.Schema = core.serialization.string(); diff --git a/sdks/runtime/typescript/src/serialization/resources/common/types/WatchResponse.ts b/sdks/runtime/typescript/src/serialization/resources/common/types/WatchResponse.ts index c19fb79c53..9180fc3b44 100644 --- a/sdks/runtime/typescript/src/serialization/resources/common/types/WatchResponse.ts +++ b/sdks/runtime/typescript/src/serialization/resources/common/types/WatchResponse.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; export const WatchResponse: core.serialization.ObjectSchema = diff --git a/sdks/runtime/typescript/src/serialization/resources/geo/resources/common/types/Coord.ts b/sdks/runtime/typescript/src/serialization/resources/geo/resources/common/types/Coord.ts index c62dbff1b5..7d74fc7318 100644 --- a/sdks/runtime/typescript/src/serialization/resources/geo/resources/common/types/Coord.ts +++ b/sdks/runtime/typescript/src/serialization/resources/geo/resources/common/types/Coord.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const Coord: core.serialization.ObjectSchema = diff --git a/sdks/runtime/typescript/src/serialization/resources/geo/resources/common/types/Distance.ts b/sdks/runtime/typescript/src/serialization/resources/geo/resources/common/types/Distance.ts index 1f842b82a7..4e3185c4df 100644 --- a/sdks/runtime/typescript/src/serialization/resources/geo/resources/common/types/Distance.ts +++ b/sdks/runtime/typescript/src/serialization/resources/geo/resources/common/types/Distance.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const Distance: core.serialization.ObjectSchema = diff --git a/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Directory.ts b/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Directory.ts index 551cfbd892..f11ee98039 100644 --- a/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Directory.ts +++ b/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Directory.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const Directory: core.serialization.Schema = diff --git a/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Entry.ts b/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Entry.ts index d621b55722..2cefd67728 100644 --- a/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Entry.ts +++ b/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Entry.ts @@ -2,21 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Key as kv_common$$key } from "./Key"; +import { Value as kv_common$$value } from "./Value"; +import { kv } from "../../../../index"; export const Entry: core.serialization.ObjectSchema = core.serialization.object({ - key: core.serialization.lazy(async () => (await import("../../../../..")).kv.Key), - value: core.serialization.lazy(async () => (await import("../../../../..")).kv.Value), + key: kv_common$$key, + value: kv_common$$value, deleted: core.serialization.boolean().optional(), }); export declare namespace Entry { interface Raw { - key: serializers.kv.Key.Raw; - value?: serializers.kv.Value.Raw; + key: kv.Key.Raw; + value?: kv.Value.Raw; deleted?: boolean | null; } } diff --git a/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Key.ts b/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Key.ts index f1c6b42a71..5d31f57255 100644 --- a/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Key.ts +++ b/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Key.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const Key: core.serialization.Schema = core.serialization.string(); diff --git a/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/PutEntry.ts b/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/PutEntry.ts index a309e573c0..d7a197d311 100644 --- a/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/PutEntry.ts +++ b/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/PutEntry.ts @@ -2,19 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Key as kv_common$$key } from "./Key"; +import { Value as kv_common$$value } from "./Value"; +import { kv } from "../../../../index"; export const PutEntry: core.serialization.ObjectSchema = core.serialization.object({ - key: core.serialization.lazy(async () => (await import("../../../../..")).kv.Key), - value: core.serialization.lazy(async () => (await import("../../../../..")).kv.Value), + key: kv_common$$key, + value: kv_common$$value, }); export declare namespace PutEntry { interface Raw { - key: serializers.kv.Key.Raw; - value?: serializers.kv.Value.Raw; + key: kv.Key.Raw; + value?: kv.Value.Raw; } } diff --git a/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Value.ts b/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Value.ts index 2e5d3b8267..8862823529 100644 --- a/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Value.ts +++ b/sdks/runtime/typescript/src/serialization/resources/kv/resources/common/types/Value.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const Value: core.serialization.Schema = core.serialization.unknown(); diff --git a/sdks/runtime/typescript/src/serialization/resources/kv/types/GetBatchResponse.ts b/sdks/runtime/typescript/src/serialization/resources/kv/types/GetBatchResponse.ts index 59e09e1c57..41741a1e54 100644 --- a/sdks/runtime/typescript/src/serialization/resources/kv/types/GetBatchResponse.ts +++ b/sdks/runtime/typescript/src/serialization/resources/kv/types/GetBatchResponse.ts @@ -2,21 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { Entry as kv_common$$entry } from "../resources/common/types/Entry"; +import { WatchResponse as common$$watchResponse } from "../../common/types/WatchResponse"; +import { kv, common } from "../../index"; export const GetBatchResponse: core.serialization.ObjectSchema< serializers.kv.GetBatchResponse.Raw, Rivet.kv.GetBatchResponse > = core.serialization.object({ - entries: core.serialization.list(core.serialization.lazyObject(async () => (await import("../../..")).kv.Entry)), - watch: core.serialization.lazyObject(async () => (await import("../../..")).WatchResponse), + entries: core.serialization.list(kv_common$$entry), + watch: common$$watchResponse, }); export declare namespace GetBatchResponse { interface Raw { - entries: serializers.kv.Entry.Raw[]; - watch: serializers.WatchResponse.Raw; + entries: kv.Entry.Raw[]; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/runtime/typescript/src/serialization/resources/kv/types/GetResponse.ts b/sdks/runtime/typescript/src/serialization/resources/kv/types/GetResponse.ts index 4ca3a825a6..23e14dcd81 100644 --- a/sdks/runtime/typescript/src/serialization/resources/kv/types/GetResponse.ts +++ b/sdks/runtime/typescript/src/serialization/resources/kv/types/GetResponse.ts @@ -2,21 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { Value as kv_common$$value } from "../resources/common/types/Value"; +import { WatchResponse as common$$watchResponse } from "../../common/types/WatchResponse"; +import { kv, common } from "../../index"; export const GetResponse: core.serialization.ObjectSchema = core.serialization.object({ - value: core.serialization.lazy(async () => (await import("../../..")).kv.Value), + value: kv_common$$value, deleted: core.serialization.boolean().optional(), - watch: core.serialization.lazyObject(async () => (await import("../../..")).WatchResponse), + watch: common$$watchResponse, }); export declare namespace GetResponse { interface Raw { - value?: serializers.kv.Value.Raw; + value?: kv.Value.Raw; deleted?: boolean | null; - watch: serializers.WatchResponse.Raw; + watch: common.WatchResponse.Raw; } } diff --git a/sdks/runtime/typescript/src/serialization/resources/kv/types/ListResponse.ts b/sdks/runtime/typescript/src/serialization/resources/kv/types/ListResponse.ts index ddf5176c0c..3316e0fd71 100644 --- a/sdks/runtime/typescript/src/serialization/resources/kv/types/ListResponse.ts +++ b/sdks/runtime/typescript/src/serialization/resources/kv/types/ListResponse.ts @@ -2,19 +2,19 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { Entry as kv_common$$entry } from "../resources/common/types/Entry"; +import { kv } from "../../index"; export const ListResponse: core.serialization.ObjectSchema = core.serialization.object({ - entries: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../..")).kv.Entry) - ), + entries: core.serialization.list(kv_common$$entry), }); export declare namespace ListResponse { interface Raw { - entries: serializers.kv.Entry.Raw[]; + entries: kv.Entry.Raw[]; } } diff --git a/sdks/runtime/typescript/src/serialization/resources/kv/types/PutBatchRequest.ts b/sdks/runtime/typescript/src/serialization/resources/kv/types/PutBatchRequest.ts index e98c4d5acc..7f45dc3a59 100644 --- a/sdks/runtime/typescript/src/serialization/resources/kv/types/PutBatchRequest.ts +++ b/sdks/runtime/typescript/src/serialization/resources/kv/types/PutBatchRequest.ts @@ -2,21 +2,23 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { PutEntry as kv_common$$putEntry } from "../resources/common/types/PutEntry"; +import { kv } from "../../index"; export const PutBatchRequest: core.serialization.ObjectSchema< serializers.kv.PutBatchRequest.Raw, Rivet.kv.PutBatchRequest > = core.serialization.object({ namespaceId: core.serialization.property("namespace_id", core.serialization.string().optional()), - entries: core.serialization.list(core.serialization.lazyObject(async () => (await import("../../..")).kv.PutEntry)), + entries: core.serialization.list(kv_common$$putEntry), }); export declare namespace PutBatchRequest { interface Raw { namespace_id?: string | null; - entries: serializers.kv.PutEntry.Raw[]; + entries: kv.PutEntry.Raw[]; } } diff --git a/sdks/runtime/typescript/src/serialization/resources/kv/types/PutRequest.ts b/sdks/runtime/typescript/src/serialization/resources/kv/types/PutRequest.ts index 578bfed0b0..b2cf72018b 100644 --- a/sdks/runtime/typescript/src/serialization/resources/kv/types/PutRequest.ts +++ b/sdks/runtime/typescript/src/serialization/resources/kv/types/PutRequest.ts @@ -2,21 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../.."; -import * as Rivet from "../../../../api"; +import * as serializers from "../../../index"; +import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; +import { Key as kv_common$$key } from "../resources/common/types/Key"; +import { Value as kv_common$$value } from "../resources/common/types/Value"; +import { kv } from "../../index"; export const PutRequest: core.serialization.ObjectSchema = core.serialization.object({ namespaceId: core.serialization.property("namespace_id", core.serialization.string().optional()), - key: core.serialization.lazy(async () => (await import("../../..")).kv.Key), - value: core.serialization.lazy(async () => (await import("../../..")).kv.Value), + key: kv_common$$key, + value: kv_common$$value, }); export declare namespace PutRequest { interface Raw { namespace_id?: string | null; - key: serializers.kv.Key.Raw; - value?: serializers.kv.Value.Raw; + key: kv.Key.Raw; + value?: kv.Value.Raw; } } diff --git a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/CustomLobbyPublicity.ts b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/CustomLobbyPublicity.ts index a82627c1d5..10885e8489 100644 --- a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/CustomLobbyPublicity.ts +++ b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/CustomLobbyPublicity.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const CustomLobbyPublicity: core.serialization.Schema< diff --git a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/GameModeInfo.ts b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/GameModeInfo.ts index d84d040283..893198efad 100644 --- a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/GameModeInfo.ts +++ b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/GameModeInfo.ts @@ -2,22 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Identifier as common$$identifier } from "../../../../common/types/Identifier"; +import { common } from "../../../../index"; export const GameModeInfo: core.serialization.ObjectSchema< serializers.matchmaker.GameModeInfo.Raw, Rivet.matchmaker.GameModeInfo > = core.serialization.object({ - gameModeId: core.serialization.property( - "game_mode_id", - core.serialization.lazy(async () => (await import("../../../../..")).Identifier) - ), + gameModeId: core.serialization.property("game_mode_id", common$$identifier), }); export declare namespace GameModeInfo { interface Raw { - game_mode_id: serializers.Identifier.Raw; + game_mode_id: common.Identifier.Raw; } } diff --git a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinLobby.ts b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinLobby.ts index ac863e7e43..8d0fed2835 100644 --- a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinLobby.ts +++ b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinLobby.ts @@ -2,28 +2,29 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { JoinRegion as matchmaker_common$$joinRegion } from "./JoinRegion"; +import { JoinPort as matchmaker_common$$joinPort } from "./JoinPort"; +import { JoinPlayer as matchmaker_common$$joinPlayer } from "./JoinPlayer"; +import { matchmaker } from "../../../../index"; export const JoinLobby: core.serialization.ObjectSchema< serializers.matchmaker.JoinLobby.Raw, Rivet.matchmaker.JoinLobby > = core.serialization.object({ lobbyId: core.serialization.property("lobby_id", core.serialization.string()), - region: core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinRegion), - ports: core.serialization.record( - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinPort) - ), - player: core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinPlayer), + region: matchmaker_common$$joinRegion, + ports: core.serialization.record(core.serialization.string(), matchmaker_common$$joinPort), + player: matchmaker_common$$joinPlayer, }); export declare namespace JoinLobby { interface Raw { lobby_id: string; - region: serializers.matchmaker.JoinRegion.Raw; - ports: Record; - player: serializers.matchmaker.JoinPlayer.Raw; + region: matchmaker.JoinRegion.Raw; + ports: Record; + player: matchmaker.JoinPlayer.Raw; } } diff --git a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinPlayer.ts b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinPlayer.ts index b671fb8b3e..d2ceb3cd5a 100644 --- a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinPlayer.ts +++ b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinPlayer.ts @@ -2,19 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Jwt as common$$jwt } from "../../../../common/types/Jwt"; +import { common } from "../../../../index"; export const JoinPlayer: core.serialization.ObjectSchema< serializers.matchmaker.JoinPlayer.Raw, Rivet.matchmaker.JoinPlayer > = core.serialization.object({ - token: core.serialization.lazy(async () => (await import("../../../../..")).Jwt), + token: common$$jwt, }); export declare namespace JoinPlayer { interface Raw { - token: serializers.Jwt.Raw; + token: common.Jwt.Raw; } } diff --git a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinPort.ts b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinPort.ts index 6f9413c750..397de3d732 100644 --- a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinPort.ts +++ b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinPort.ts @@ -2,21 +2,18 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { JoinPortRange as matchmaker_common$$joinPortRange } from "./JoinPortRange"; +import { matchmaker } from "../../../../index"; export const JoinPort: core.serialization.ObjectSchema = core.serialization.object({ host: core.serialization.string().optional(), hostname: core.serialization.string(), port: core.serialization.number().optional(), - portRange: core.serialization.property( - "port_range", - core.serialization - .lazyObject(async () => (await import("../../../../..")).matchmaker.JoinPortRange) - .optional() - ), + portRange: core.serialization.property("port_range", matchmaker_common$$joinPortRange.optional()), isTls: core.serialization.property("is_tls", core.serialization.boolean()), }); @@ -25,7 +22,7 @@ export declare namespace JoinPort { host?: string | null; hostname: string; port?: number | null; - port_range?: serializers.matchmaker.JoinPortRange.Raw | null; + port_range?: matchmaker.JoinPortRange.Raw | null; is_tls: boolean; } } diff --git a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinPortRange.ts b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinPortRange.ts index f970256c39..fa51f669e5 100644 --- a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinPortRange.ts +++ b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinPortRange.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const JoinPortRange: core.serialization.ObjectSchema< diff --git a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinRegion.ts b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinRegion.ts index 1bd0c52094..90fef0a73b 100644 --- a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinRegion.ts +++ b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/JoinRegion.ts @@ -2,27 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Identifier as common$$identifier } from "../../../../common/types/Identifier"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { common } from "../../../../index"; export const JoinRegion: core.serialization.ObjectSchema< serializers.matchmaker.JoinRegion.Raw, Rivet.matchmaker.JoinRegion > = core.serialization.object({ - regionId: core.serialization.property( - "region_id", - core.serialization.lazy(async () => (await import("../../../../..")).Identifier) - ), - displayName: core.serialization.property( - "display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), + regionId: core.serialization.property("region_id", common$$identifier), + displayName: core.serialization.property("display_name", common$$displayName), }); export declare namespace JoinRegion { interface Raw { - region_id: serializers.Identifier.Raw; - display_name: serializers.DisplayName.Raw; + region_id: common.Identifier.Raw; + display_name: common.DisplayName.Raw; } } diff --git a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/LobbyInfo.ts b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/LobbyInfo.ts index 0e89aadff0..bac822d7b6 100644 --- a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/LobbyInfo.ts +++ b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/LobbyInfo.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const LobbyInfo: core.serialization.ObjectSchema< diff --git a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/RegionInfo.ts b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/RegionInfo.ts index 6268b0e956..09cd474cea 100644 --- a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/RegionInfo.ts +++ b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/common/types/RegionInfo.ts @@ -2,42 +2,32 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Identifier as common$$identifier } from "../../../../common/types/Identifier"; +import { DisplayName as common$$displayName } from "../../../../common/types/DisplayName"; +import { Coord as geo_common$$coord } from "../../../../geo/resources/common/types/Coord"; +import { Distance as geo_common$$distance } from "../../../../geo/resources/common/types/Distance"; +import { common, geo } from "../../../../index"; export const RegionInfo: core.serialization.ObjectSchema< serializers.matchmaker.RegionInfo.Raw, Rivet.matchmaker.RegionInfo > = core.serialization.object({ - regionId: core.serialization.property( - "region_id", - core.serialization.lazy(async () => (await import("../../../../..")).Identifier) - ), - providerDisplayName: core.serialization.property( - "provider_display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), - regionDisplayName: core.serialization.property( - "region_display_name", - core.serialization.lazy(async () => (await import("../../../../..")).DisplayName) - ), - datacenterCoord: core.serialization.property( - "datacenter_coord", - core.serialization.lazyObject(async () => (await import("../../../../..")).geo.Coord) - ), - datacenterDistanceFromClient: core.serialization.property( - "datacenter_distance_from_client", - core.serialization.lazyObject(async () => (await import("../../../../..")).geo.Distance) - ), + regionId: core.serialization.property("region_id", common$$identifier), + providerDisplayName: core.serialization.property("provider_display_name", common$$displayName), + regionDisplayName: core.serialization.property("region_display_name", common$$displayName), + datacenterCoord: core.serialization.property("datacenter_coord", geo_common$$coord), + datacenterDistanceFromClient: core.serialization.property("datacenter_distance_from_client", geo_common$$distance), }); export declare namespace RegionInfo { interface Raw { - region_id: serializers.Identifier.Raw; - provider_display_name: serializers.DisplayName.Raw; - region_display_name: serializers.DisplayName.Raw; - datacenter_coord: serializers.geo.Coord.Raw; - datacenter_distance_from_client: serializers.geo.Distance.Raw; + region_id: common.Identifier.Raw; + provider_display_name: common.DisplayName.Raw; + region_display_name: common.DisplayName.Raw; + datacenter_coord: geo.Coord.Raw; + datacenter_distance_from_client: geo.Distance.Raw; } } diff --git a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/getState.ts b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/getState.ts index fa5cd74c8d..b442673254 100644 --- a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/getState.ts +++ b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/getState.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; +import * as serializers from "../../../../../index"; import * as core from "../../../../../../core"; export const Response: core.serialization.Schema< diff --git a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/CreateLobbyRequest.ts b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/CreateLobbyRequest.ts index 72fe4ebe94..f18e1cbbcc 100644 --- a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/CreateLobbyRequest.ts +++ b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/CreateLobbyRequest.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Rivet from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Rivet from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { CustomLobbyPublicity as matchmaker_common$$customLobbyPublicity } from "../../../common/types/CustomLobbyPublicity"; +import { Config as captcha_config$$config } from "../../../../../captcha/resources/config/types/Config"; +import { matchmaker, captcha } from "../../../../../index"; export const CreateLobbyRequest: core.serialization.Schema< serializers.matchmaker.CreateLobbyRequest.Raw, @@ -12,13 +15,11 @@ export const CreateLobbyRequest: core.serialization.Schema< > = core.serialization.object({ gameMode: core.serialization.property("game_mode", core.serialization.string()), region: core.serialization.string().optional(), - publicity: core.serialization - .lazy(async () => (await import("../../../../../..")).matchmaker.CustomLobbyPublicity) - .optional(), + publicity: matchmaker_common$$customLobbyPublicity.optional(), tags: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), maxPlayers: core.serialization.property("max_players", core.serialization.number().optional()), lobbyConfig: core.serialization.property("lobby_config", core.serialization.unknown().optional()), - captcha: core.serialization.lazyObject(async () => (await import("../../../../../..")).captcha.Config).optional(), + captcha: captcha_config$$config.optional(), verificationData: core.serialization.property("verification_data", core.serialization.unknown().optional()), }); @@ -26,11 +27,11 @@ export declare namespace CreateLobbyRequest { interface Raw { game_mode: string; region?: string | null; - publicity?: serializers.matchmaker.CustomLobbyPublicity.Raw | null; + publicity?: matchmaker.CustomLobbyPublicity.Raw | null; tags?: Record | null; max_players?: number | null; lobby_config?: unknown | null; - captcha?: serializers.captcha.Config.Raw | null; + captcha?: captcha.Config.Raw | null; verification_data?: unknown | null; } } diff --git a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/FindLobbyRequest.ts b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/FindLobbyRequest.ts index 696ced91d1..3a3c260e3b 100644 --- a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/FindLobbyRequest.ts +++ b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/FindLobbyRequest.ts @@ -2,9 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Rivet from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Rivet from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { Config as captcha_config$$config } from "../../../../../captcha/resources/config/types/Config"; +import { captcha } from "../../../../../index"; export const FindLobbyRequest: core.serialization.Schema< serializers.matchmaker.FindLobbyRequest.Raw, @@ -18,7 +20,7 @@ export const FindLobbyRequest: core.serialization.Schema< ), tags: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), maxPlayers: core.serialization.property("max_players", core.serialization.number().optional()), - captcha: core.serialization.lazyObject(async () => (await import("../../../../../..")).captcha.Config).optional(), + captcha: captcha_config$$config.optional(), verificationData: core.serialization.property("verification_data", core.serialization.unknown().optional()), }); @@ -29,7 +31,7 @@ export declare namespace FindLobbyRequest { prevent_auto_create_lobby?: boolean | null; tags?: Record | null; max_players?: number | null; - captcha?: serializers.captcha.Config.Raw | null; + captcha?: captcha.Config.Raw | null; verification_data?: unknown | null; } } diff --git a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/JoinLobbyRequest.ts b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/JoinLobbyRequest.ts index f9b444edb3..511e171a4b 100644 --- a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/JoinLobbyRequest.ts +++ b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/JoinLobbyRequest.ts @@ -2,23 +2,25 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Rivet from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Rivet from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; +import { Config as captcha_config$$config } from "../../../../../captcha/resources/config/types/Config"; +import { captcha } from "../../../../../index"; export const JoinLobbyRequest: core.serialization.Schema< serializers.matchmaker.JoinLobbyRequest.Raw, Rivet.matchmaker.JoinLobbyRequest > = core.serialization.object({ lobbyId: core.serialization.property("lobby_id", core.serialization.string()), - captcha: core.serialization.lazyObject(async () => (await import("../../../../../..")).captcha.Config).optional(), + captcha: captcha_config$$config.optional(), verificationData: core.serialization.property("verification_data", core.serialization.unknown().optional()), }); export declare namespace JoinLobbyRequest { interface Raw { lobby_id: string; - captcha?: serializers.captcha.Config.Raw | null; + captcha?: captcha.Config.Raw | null; verification_data?: unknown | null; } } diff --git a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/SetLobbyClosedRequest.ts b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/SetLobbyClosedRequest.ts index 34dd4f5e81..dc16f64f1f 100644 --- a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/SetLobbyClosedRequest.ts +++ b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/requests/SetLobbyClosedRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Rivet from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Rivet from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const SetLobbyClosedRequest: core.serialization.Schema< diff --git a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/setState.ts b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/setState.ts index 0c8e7b7127..87703edf93 100644 --- a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/setState.ts +++ b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/client/setState.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; +import * as serializers from "../../../../../index"; import * as core from "../../../../../../core"; export const Request: core.serialization.Schema< diff --git a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/CreateLobbyResponse.ts b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/CreateLobbyResponse.ts index cb70e64ac3..b128c857ac 100644 --- a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/CreateLobbyResponse.ts +++ b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/CreateLobbyResponse.ts @@ -2,26 +2,27 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { JoinLobby as matchmaker_common$$joinLobby } from "../../common/types/JoinLobby"; +import { JoinPort as matchmaker_common$$joinPort } from "../../common/types/JoinPort"; +import { JoinPlayer as matchmaker_common$$joinPlayer } from "../../common/types/JoinPlayer"; +import { matchmaker } from "../../../../index"; export const CreateLobbyResponse: core.serialization.ObjectSchema< serializers.matchmaker.CreateLobbyResponse.Raw, Rivet.matchmaker.CreateLobbyResponse > = core.serialization.object({ - lobby: core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinLobby), - ports: core.serialization.record( - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinPort) - ), - player: core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinPlayer), + lobby: matchmaker_common$$joinLobby, + ports: core.serialization.record(core.serialization.string(), matchmaker_common$$joinPort), + player: matchmaker_common$$joinPlayer, }); export declare namespace CreateLobbyResponse { interface Raw { - lobby: serializers.matchmaker.JoinLobby.Raw; - ports: Record; - player: serializers.matchmaker.JoinPlayer.Raw; + lobby: matchmaker.JoinLobby.Raw; + ports: Record; + player: matchmaker.JoinPlayer.Raw; } } diff --git a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/FindLobbyResponse.ts b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/FindLobbyResponse.ts index 9eae87d8c5..375882ae9c 100644 --- a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/FindLobbyResponse.ts +++ b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/FindLobbyResponse.ts @@ -2,26 +2,27 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { JoinLobby as matchmaker_common$$joinLobby } from "../../common/types/JoinLobby"; +import { JoinPort as matchmaker_common$$joinPort } from "../../common/types/JoinPort"; +import { JoinPlayer as matchmaker_common$$joinPlayer } from "../../common/types/JoinPlayer"; +import { matchmaker } from "../../../../index"; export const FindLobbyResponse: core.serialization.ObjectSchema< serializers.matchmaker.FindLobbyResponse.Raw, Rivet.matchmaker.FindLobbyResponse > = core.serialization.object({ - lobby: core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinLobby), - ports: core.serialization.record( - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinPort) - ), - player: core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinPlayer), + lobby: matchmaker_common$$joinLobby, + ports: core.serialization.record(core.serialization.string(), matchmaker_common$$joinPort), + player: matchmaker_common$$joinPlayer, }); export declare namespace FindLobbyResponse { interface Raw { - lobby: serializers.matchmaker.JoinLobby.Raw; - ports: Record; - player: serializers.matchmaker.JoinPlayer.Raw; + lobby: matchmaker.JoinLobby.Raw; + ports: Record; + player: matchmaker.JoinPlayer.Raw; } } diff --git a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/JoinLobbyResponse.ts b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/JoinLobbyResponse.ts index 289cf984c4..a721e3eb07 100644 --- a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/JoinLobbyResponse.ts +++ b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/JoinLobbyResponse.ts @@ -2,26 +2,27 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { JoinLobby as matchmaker_common$$joinLobby } from "../../common/types/JoinLobby"; +import { JoinPort as matchmaker_common$$joinPort } from "../../common/types/JoinPort"; +import { JoinPlayer as matchmaker_common$$joinPlayer } from "../../common/types/JoinPlayer"; +import { matchmaker } from "../../../../index"; export const JoinLobbyResponse: core.serialization.ObjectSchema< serializers.matchmaker.JoinLobbyResponse.Raw, Rivet.matchmaker.JoinLobbyResponse > = core.serialization.object({ - lobby: core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinLobby), - ports: core.serialization.record( - core.serialization.string(), - core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinPort) - ), - player: core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.JoinPlayer), + lobby: matchmaker_common$$joinLobby, + ports: core.serialization.record(core.serialization.string(), matchmaker_common$$joinPort), + player: matchmaker_common$$joinPlayer, }); export declare namespace JoinLobbyResponse { interface Raw { - lobby: serializers.matchmaker.JoinLobby.Raw; - ports: Record; - player: serializers.matchmaker.JoinPlayer.Raw; + lobby: matchmaker.JoinLobby.Raw; + ports: Record; + player: matchmaker.JoinPlayer.Raw; } } diff --git a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/ListLobbiesResponse.ts b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/ListLobbiesResponse.ts index 5de03f5fd7..7b6eae5b12 100644 --- a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/ListLobbiesResponse.ts +++ b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/lobbies/types/ListLobbiesResponse.ts @@ -2,32 +2,27 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { GameModeInfo as matchmaker_common$$gameModeInfo } from "../../common/types/GameModeInfo"; +import { RegionInfo as matchmaker_common$$regionInfo } from "../../common/types/RegionInfo"; +import { LobbyInfo as matchmaker_common$$lobbyInfo } from "../../common/types/LobbyInfo"; +import { matchmaker } from "../../../../index"; export const ListLobbiesResponse: core.serialization.ObjectSchema< serializers.matchmaker.ListLobbiesResponse.Raw, Rivet.matchmaker.ListLobbiesResponse > = core.serialization.object({ - gameModes: core.serialization.property( - "game_modes", - core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.GameModeInfo) - ) - ), - regions: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.RegionInfo) - ), - lobbies: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.LobbyInfo) - ), + gameModes: core.serialization.property("game_modes", core.serialization.list(matchmaker_common$$gameModeInfo)), + regions: core.serialization.list(matchmaker_common$$regionInfo), + lobbies: core.serialization.list(matchmaker_common$$lobbyInfo), }); export declare namespace ListLobbiesResponse { interface Raw { - game_modes: serializers.matchmaker.GameModeInfo.Raw[]; - regions: serializers.matchmaker.RegionInfo.Raw[]; - lobbies: serializers.matchmaker.LobbyInfo.Raw[]; + game_modes: matchmaker.GameModeInfo.Raw[]; + regions: matchmaker.RegionInfo.Raw[]; + lobbies: matchmaker.LobbyInfo.Raw[]; } } diff --git a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/players/client/requests/PlayerConnectedRequest.ts b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/players/client/requests/PlayerConnectedRequest.ts index 271b9135d0..9a01e7e1a9 100644 --- a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/players/client/requests/PlayerConnectedRequest.ts +++ b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/players/client/requests/PlayerConnectedRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Rivet from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Rivet from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const PlayerConnectedRequest: core.serialization.Schema< diff --git a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/players/client/requests/PlayerDisconnectedRequest.ts b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/players/client/requests/PlayerDisconnectedRequest.ts index df0258ffa9..4af2aab40d 100644 --- a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/players/client/requests/PlayerDisconnectedRequest.ts +++ b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/players/client/requests/PlayerDisconnectedRequest.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../../.."; -import * as Rivet from "../../../../../../../api"; +import * as serializers from "../../../../../../index"; +import * as Rivet from "../../../../../../../api/index"; import * as core from "../../../../../../../core"; export const PlayerDisconnectedRequest: core.serialization.Schema< diff --git a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/players/types/GameModeStatistics.ts b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/players/types/GameModeStatistics.ts index 37ce994b1d..8f2c6bddeb 100644 --- a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/players/types/GameModeStatistics.ts +++ b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/players/types/GameModeStatistics.ts @@ -2,24 +2,24 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Identifier as common$$identifier } from "../../../../common/types/Identifier"; +import { RegionStatistics as matchmaker_players$$regionStatistics } from "./RegionStatistics"; +import { common, matchmaker } from "../../../../index"; export const GameModeStatistics: core.serialization.ObjectSchema< serializers.matchmaker.GameModeStatistics.Raw, Rivet.matchmaker.GameModeStatistics > = core.serialization.object({ playerCount: core.serialization.property("player_count", core.serialization.number()), - regions: core.serialization.record( - core.serialization.lazy(async () => (await import("../../../../..")).Identifier), - core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.RegionStatistics) - ), + regions: core.serialization.record(common$$identifier, matchmaker_players$$regionStatistics), }); export declare namespace GameModeStatistics { interface Raw { player_count: number; - regions: Record; + regions: Record; } } diff --git a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/players/types/GetStatisticsResponse.ts b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/players/types/GetStatisticsResponse.ts index 625d73d4a4..1cde117ac3 100644 --- a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/players/types/GetStatisticsResponse.ts +++ b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/players/types/GetStatisticsResponse.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { Identifier as common$$identifier } from "../../../../common/types/Identifier"; +import { GameModeStatistics as matchmaker_players$$gameModeStatistics } from "./GameModeStatistics"; +import { common, matchmaker } from "../../../../index"; export const GetStatisticsResponse: core.serialization.ObjectSchema< serializers.matchmaker.GetStatisticsResponse.Raw, @@ -13,16 +16,13 @@ export const GetStatisticsResponse: core.serialization.ObjectSchema< playerCount: core.serialization.property("player_count", core.serialization.number()), gameModes: core.serialization.property( "game_modes", - core.serialization.record( - core.serialization.lazy(async () => (await import("../../../../..")).Identifier), - core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.GameModeStatistics) - ) + core.serialization.record(common$$identifier, matchmaker_players$$gameModeStatistics) ), }); export declare namespace GetStatisticsResponse { interface Raw { player_count: number; - game_modes: Record; + game_modes: Record; } } diff --git a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/players/types/RegionStatistics.ts b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/players/types/RegionStatistics.ts index da7ec7253e..179f5ce3b9 100644 --- a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/players/types/RegionStatistics.ts +++ b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/players/types/RegionStatistics.ts @@ -2,8 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const RegionStatistics: core.serialization.ObjectSchema< diff --git a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/regions/types/ListRegionsResponse.ts b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/regions/types/ListRegionsResponse.ts index 608d29cf57..52b47b98d7 100644 --- a/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/regions/types/ListRegionsResponse.ts +++ b/sdks/runtime/typescript/src/serialization/resources/matchmaker/resources/regions/types/ListRegionsResponse.ts @@ -2,21 +2,21 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../.."; -import * as Rivet from "../../../../../../api"; +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { RegionInfo as matchmaker_common$$regionInfo } from "../../common/types/RegionInfo"; +import { matchmaker } from "../../../../index"; export const ListRegionsResponse: core.serialization.ObjectSchema< serializers.matchmaker.ListRegionsResponse.Raw, Rivet.matchmaker.ListRegionsResponse > = core.serialization.object({ - regions: core.serialization.list( - core.serialization.lazyObject(async () => (await import("../../../../..")).matchmaker.RegionInfo) - ), + regions: core.serialization.list(matchmaker_common$$regionInfo), }); export declare namespace ListRegionsResponse { interface Raw { - regions: serializers.matchmaker.RegionInfo.Raw[]; + regions: matchmaker.RegionInfo.Raw[]; } } diff --git a/sdks/runtime/typescript/yarn.lock b/sdks/runtime/typescript/yarn.lock index 834dd40aed..6242defc20 100644 --- a/sdks/runtime/typescript/yarn.lock +++ b/sdks/runtime/typescript/yarn.lock @@ -117,6 +117,21 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz#a5d300008960bb39677c46bf16f53ec70d8dee04" integrity sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw== +"@types/node-fetch@2.6.11": + version "2.6.11" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.11.tgz#9b39b78665dae0e82a08f02f4967d62c66f95d24" + integrity sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g== + dependencies: + "@types/node" "*" + form-data "^4.0.0" + +"@types/node@*": + version "22.1.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.1.0.tgz#6d6adc648b5e03f0e83c78dc788c2b037d0ad94b" + integrity sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw== + dependencies: + undici-types "~6.13.0" + "@types/node@17.0.33": version "17.0.33" resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.33.tgz#3c1879b276dc63e73030bb91165e62a4509cd506" @@ -321,6 +336,11 @@ typescript@4.6.4: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9" integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg== +undici-types@~6.13.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.13.0.tgz#e3e79220ab8c81ed1496b5812471afd7cf075ea5" + integrity sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg== + url-join@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/url-join/-/url-join-5.0.0.tgz#c2f1e5cbd95fa91082a93b58a1f42fecb4bdbcf1"