diff --git a/.speakeasy/codeSamples.yaml b/.speakeasy/codeSamples.yaml index e62339da..4a0086d5 100644 --- a/.speakeasy/codeSamples.yaml +++ b/.speakeasy/codeSamples.yaml @@ -3,1707 +3,519 @@ info: title: CodeSamples overlay for typescript target version: 0.0.0 actions: - - target: $["paths"]["/deployments/v1/{appId}/create/{buildId}"]["post"] - update: - "x-codeSamples": - - "lang": "typescript" - "label": "CreateDeploymentDeprecated" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.deploymentsV1.createDeploymentDeprecated(1, { - env: [ - { - value: "TRUE", - name: "EULA", - }, - ], - roomsPerProcess: 3, - planName: "tiny", - additionalContainerPorts: [ - { - transportType: "udp", - port: 8000, - name: "default", - }, - ], - transportType: "tls", - containerPort: 4000, - }, "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/orgs/v1"]["get"] + - target: $["paths"]["/deployments/v2/{appId}/list"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetOrgs" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.organizationsV1.getOrgs(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/orgs/v1/{orgId}/invites/reject"]["post"] + "label": "GetDeployments" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.deploymentsV2.getDeployments(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/processes/v1/{appId}/info/{processId}"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "RejectInvite" - "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n await hathoraCloud.organizationsV1.rejectInvite(\"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\");\n\n \n}\n\nrun();" - - target: $["paths"]["/processes/v2/{appId}/info/{processId}"]["get"] + "label": "GetProcessInfoDeprecated" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.processesV1.getProcessInfoDeprecated(\"cbfcddd2-0006-43ae-996c-995fff7bed2e\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/lobby/v1/{appId}/list"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetProcessInfo" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.processesV2.getProcessInfo("cbfcddd2-0006-43ae-996c-995fff7bed2e", "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/processes/v2/{appId}/stop/{processId}"]["post"] + "label": "ListActivePublicLobbiesDeprecatedV1" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.lobbiesV1.listActivePublicLobbiesDeprecatedV1(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\", false, \"Sydney\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/lobby/v2/{appId}/create/private"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "StopProcess" - "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n await hathoraCloud.processesV2.stopProcess(\"cbfcddd2-0006-43ae-996c-995fff7bed2e\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n \n}\n\nrun();" - - target: $["paths"]["/rooms/v1/{appId}/destroy/{roomId}"]["post"] + "label": "CreatePrivateLobby" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.lobbiesV2.createPrivateLobby(\"\", {\n initialConfig: \"\",\n region: \"Chicago\",\n }, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\", \"2swovpy1fnunu\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/tokens/v1/orgs/{orgId}"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "DestroyRoomDeprecated" - "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n await hathoraCloud.roomsV1.destroyRoomDeprecated(\"2swovpy1fnunu\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n \n}\n\nrun();" - - target: $["paths"]["/processes/v2/{appId}/list/latest"]["get"] + "label": "GetOrgTokens" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.tokensV1.getOrgTokens(\"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/builds/v1/{appId}/run/{buildId}"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetLatestProcesses" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.processesV2.getLatestProcesses("app-af469a92-5b45-4565-b3c4-b79878de67d2", [ - "stopped", - ], [ - "Frankfurt", - ]); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/rooms/v2/{appId}/info/{roomId}"]["get"] + "label": "RunBuildDeprecated" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\nimport { openAsBlob } from \"node:fs\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.buildsV1.runBuildDeprecated(1, {\n file: await openAsBlob(\"./sample-file\"),\n }, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/builds/v2/{appId}/create"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetRoomInfo" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.roomsV2.getRoomInfo("2swovpy1fnunu", "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/auth/v1/{appId}/login/nickname"]["post"] + "label": "CreateBuild" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.buildsV2.createBuild({\n buildTag: \"0.1.14-14c793\",\n }, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/deployments/v1/{appId}/info/{deploymentId}"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "LoginNickname" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.authV1.loginNickname({ - nickname: "squiddytwoshoes", - }, "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/builds/v1/{appId}/delete/{buildId}"]["delete"] + "label": "GetDeploymentInfoDeprecated" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.deploymentsV1.getDeploymentInfoDeprecated(1, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/rooms/v2/{appId}/list/{processId}/inactive"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "DeleteBuildDeprecated" - "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n await hathoraCloud.buildsV1.deleteBuildDeprecated(1, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n \n}\n\nrun();" - - target: $["paths"]["/builds/v2/{appId}/delete/{buildId}"]["delete"] + "label": "GetInactiveRoomsForProcess" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.roomsV2.getInactiveRoomsForProcess(\"cbfcddd2-0006-43ae-996c-995fff7bed2e\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/deployments/v2/{appId}/latest"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "DeleteBuild" - "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n await hathoraCloud.buildsV2.deleteBuild(1, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n \n}\n\nrun();" - - target: $["paths"]["/deployments/v1/{appId}/info/{deploymentId}"]["get"] + "label": "GetLatestDeployment" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.deploymentsV2.getLatestDeployment(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/deployments/v2/{appId}/info/{deploymentId}"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetDeploymentInfoDeprecated" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.deploymentsV1.getDeploymentInfoDeprecated(1, "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/lobby/v2/{appId}/info/{roomId}"]["get"] + "label": "GetDeploymentInfo" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.deploymentsV2.getDeploymentInfo(1, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/logs/v1/{appId}/process/{processId}"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetLobbyInfo" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.lobbiesV2.getLobbyInfo("2swovpy1fnunu", "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/logs/v1/{appId}/process/{processId}/download"]["get"] + "label": "GetLogsForProcess" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.logsV1.getLogsForProcess(\"cbfcddd2-0006-43ae-996c-995fff7bed2e\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\", true, 100);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/management/v1/sendverificationemail"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "DownloadLogForProcess" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.logsV1.downloadLogForProcess("cbfcddd2-0006-43ae-996c-995fff7bed2e", "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/billing/v1/customerportalurl"]["post"] + "label": "SendVerificationEmail" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.managementV1.sendVerificationEmail({\n userId: \"\",\n });\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/apps/v1/info/{appId}"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "InitStripeCustomerPortalUrl" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.billingV1.initStripeCustomerPortalUrl({ - returnUrl: "", - }); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/deployments/v2/{appId}/list"]["get"] + "label": "GetAppInfo" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.appsV1.getAppInfo(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/auth/v1/{appId}/login/google"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetDeployments" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.deploymentsV2.getDeployments("app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/lobby/v2/{appId}/create/public"]["post"] + "label": "LoginGoogle" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.authV1.loginGoogle({\n idToken: \"eyJhbGciOiJSUzI1NiIsImtpZCI6ImZkNDhhNzUxMzhkOWQ0OGYwYWE2MzVlZjU2OWM0ZTE5NmY3YWU4ZDYiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJhY2NvdW50cy5nb29nbGUuY29tIiwiYXpwIjoiODQ4NDEyODI2Nzg4LW00bXNyYjZxNDRkbTJ1ZTNrZ3Z1aTBmcTdrZGE1NWxzLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwiYXVkIjoiODQ4NDEyODI2Nzg4LW00bXNyYjZxNDRkbTJ1ZTNrZ3Z1aTBmcTdrZGE1NWxzLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwic3ViIjoiMTE0NTQyMzMwNzI3MTU2MTMzNzc2IiwiZW1haWwiOiJocGFdkeivmeuzQGdtYWlsLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJhdF9oYXNoIjoidno1NGhhdTNxbnVR\",\n }, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/billing/v1/paymentmethod"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "CreatePublicLobby" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.lobbiesV2.createPublicLobby("", { - initialConfig: "", - region: "Sao_Paulo", - }, "app-af469a92-5b45-4565-b3c4-b79878de67d2", "2swovpy1fnunu"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/metrics/v1/{appId}/process/{processId}"]["get"] + "label": "GetPaymentMethod" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.billingV1.getPaymentMethod();\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/billing/v1/customerportalurl"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetMetrics" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.metricsV1.getMetrics({ - processId: "cbfcddd2-0006-43ae-996c-995fff7bed2e", - }); - - // Handle the result - console.log(result) - } - - run(); + "label": "InitStripeCustomerPortalUrl" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.billingV1.initStripeCustomerPortalUrl({\n returnUrl: \"\",\n });\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - target: $["paths"]["/orgs/v1/user/invites/pending"]["get"] update: "x-codeSamples": - "lang": "typescript" "label": "GetUserPendingInvites" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.organizationsV1.getUserPendingInvites(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/orgs/v1/{orgId}/members"]["get"] + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.organizationsV1.getUserPendingInvites();\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/orgs/v1/{orgId}/invites/pending"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetOrgMembers" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.organizationsV1.getOrgMembers("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/processes/v2/{appId}/create/{region}"]["post"] + "label": "GetOrgPendingInvites" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.organizationsV1.getOrgPendingInvites(\"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/orgs/v1/{orgId}/invites/reject"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "CreateProcess" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.processesV2.createProcess("Tokyo", "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/rooms/v2/{appId}/create"]["post"] + "label": "RejectInvite" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n await hathoraCloud.organizationsV1.rejectInvite(\"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\");\n\n \n}\n\nrun();" + - target: $["paths"]["/lobby/v2/{appId}/info/{roomId}"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "CreateRoom" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.roomsV2.createRoom({ - roomConfig: "{\"name\":\"my-room\"}", - region: "Sao_Paulo", - }, "app-af469a92-5b45-4565-b3c4-b79878de67d2", "2swovpy1fnunu"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/apps/v1/info/{appId}"]["get"] + "label": "GetLobbyInfo" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.lobbiesV2.getLobbyInfo(\"2swovpy1fnunu\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/lobby/v3/{appId}/create"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetAppInfo" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.appsV1.getAppInfo("app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/builds/v2/{appId}/info/{buildId}"]["get"] + "label": "CreateLobby" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.lobbiesV3.createLobby(\"\", {\n visibility: \"private\",\n roomConfig: \"{\\\"name\\\":\\\"my-room\\\"}\",\n region: \"Seattle\",\n }, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\", \"LFG4\", \"2swovpy1fnunu\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/rooms/v1/{appId}/create"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetBuildInfo" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.buildsV2.getBuildInfo(1, "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/builds/v2/{appId}/run/{buildId}"]["post"] + "label": "CreateRoomDeprecated" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.roomsV1.createRoomDeprecated({\n roomConfig: \"{\\\"name\\\":\\\"my-room\\\"}\",\n region: \"Chicago\",\n }, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\", \"2swovpy1fnunu\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/rooms/v1/{appId}/list/{processId}/active"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "RunBuild" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - import { openAsBlob } from "node:fs"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.buildsV2.runBuild(1, { - file: await openAsBlob("./sample-file"), - }, "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/lobby/v3/{appId}/info/roomid/{roomId}"]["get"] + "label": "GetActiveRoomsForProcessDeprecated" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.roomsV1.getActiveRoomsForProcessDeprecated(\"cbfcddd2-0006-43ae-996c-995fff7bed2e\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/apps/v1/create"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetLobbyInfoByRoomId" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.lobbiesV3.getLobbyInfoByRoomId("2swovpy1fnunu", "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/orgs/v1/{orgId}/invites/pending"]["get"] + "label": "CreateApp" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.appsV1.createApp({\n authConfiguration: {},\n appName: \"minecraft\",\n });\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/builds/v1/{appId}/create"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetOrgPendingInvites" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.organizationsV1.getOrgPendingInvites("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/rooms/v1/{appId}/info/{roomId}"]["get"] + "label": "CreateBuildDeprecated" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.buildsV1.createBuildDeprecated({\n buildTag: \"0.1.14-14c793\",\n }, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/builds/v1/{appId}/delete/{buildId}"]["delete"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetRoomInfoDeprecated" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.roomsV1.getRoomInfoDeprecated("2swovpy1fnunu", "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/apps/v1/update/{appId}"]["post"] + "label": "DeleteBuildDeprecated" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n await hathoraCloud.buildsV1.deleteBuildDeprecated(1, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n \n}\n\nrun();" + - target: $["paths"]["/discovery/v2/ping"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "UpdateApp" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.appsV1.updateApp({ - authConfiguration: {}, - appName: "minecraft", - }, "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/auth/v1/{appId}/login/google"]["post"] + "label": "GetPingServiceEndpoints" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.discoveryV2.getPingServiceEndpoints();\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/rooms/v2/{appId}/list/{processId}/active"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "LoginGoogle" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.authV1.loginGoogle({ - idToken: "eyJhbGciOiJSUzI1NiIsImtpZCI6ImZkNDhhNzUxMzhkOWQ0OGYwYWE2MzVlZjU2OWM0ZTE5NmY3YWU4ZDYiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJhY2NvdW50cy5nb29nbGUuY29tIiwiYXpwIjoiODQ4NDEyODI2Nzg4LW00bXNyYjZxNDRkbTJ1ZTNrZ3Z1aTBmcTdrZGE1NWxzLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwiYXVkIjoiODQ4NDEyODI2Nzg4LW00bXNyYjZxNDRkbTJ1ZTNrZ3Z1aTBmcTdrZGE1NWxzLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwic3ViIjoiMTE0NTQyMzMwNzI3MTU2MTMzNzc2IiwiZW1haWwiOiJocGFdkeivmeuzQGdtYWlsLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJhdF9oYXNoIjoidno1NGhhdTNxbnVR", - }, "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/builds/v2/{appId}/createWithUploadUrl"]["post"] + "label": "GetActiveRoomsForProcess" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.roomsV2.getActiveRoomsForProcess(\"cbfcddd2-0006-43ae-996c-995fff7bed2e\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/tokens/v1/orgs/{orgId}/create"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "CreateBuildWithUploadUrl" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.buildsV2.createBuildWithUploadUrl({ - buildTag: "0.1.14-14c793", - }, "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/discovery/v1/ping"]["get"] + "label": "CreateOrgToken" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.tokensV1.createOrgToken(\"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\", {\n name: \"ci-token\",\n });\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/lobby/v3/{appId}/info/roomid/{roomId}"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetPingServiceEndpointsDeprecated" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.discoveryV1.getPingServiceEndpointsDeprecated(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/orgs/v1/{orgId}/invites"]["put"] + "label": "GetLobbyInfoByRoomId" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.lobbiesV3.getLobbyInfoByRoomId(\"2swovpy1fnunu\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/rooms/v1/{appId}/connectioninfo/{roomId}"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "InviteUser" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.organizationsV1.inviteUser("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39", { - userEmail: "noreply@hathora.dev", - }); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/rooms/v2/{appId}/destroy/{roomId}"]["post"] + "label": "GetConnectionInfoDeprecated" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.roomsV1.getConnectionInfoDeprecated(\"2swovpy1fnunu\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/tokens/v1/orgs/{orgId}/tokens/{orgTokenId}/revoke"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "DestroyRoom" - "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n await hathoraCloud.roomsV2.destroyRoom(\"2swovpy1fnunu\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n \n}\n\nrun();" - - target: $["paths"]["/tokens/v1/orgs/{orgId}/create"]["post"] + "label": "RevokeOrgToken" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.tokensV1.revokeOrgToken(\"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\", \"org-token-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/builds/v2/{appId}/list"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "CreateOrgToken" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.tokensV1.createOrgToken("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39", { - name: "ci-token", - }); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/apps/v1/create"]["post"] + "label": "GetBuilds" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.buildsV2.getBuilds(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/builds/v2/{appId}/createWithUploadUrl"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "CreateApp" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.appsV1.createApp({ - authConfiguration: {}, - appName: "minecraft", - }); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/billing/v1/balance"]["get"] + "label": "CreateBuildWithUploadUrl" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.buildsV2.createBuildWithUploadUrl({\n buildTag: \"0.1.14-14c793\",\n }, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/lobby/v3/{appId}/info/shortcode/{shortCode}"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetBalance" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.billingV1.getBalance(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/builds/v1/{appId}/info/{buildId}"]["get"] + "label": "GetLobbyInfoByShortCode" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.lobbiesV3.getLobbyInfoByShortCode(\"LFG4\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/processes/v2/{appId}/stop/{processId}"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetBuildInfoDeprecated" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.buildsV1.getBuildInfoDeprecated(1, "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/deployments/v2/{appId}/info/{deploymentId}"]["get"] + "label": "StopProcess" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n await hathoraCloud.processesV2.stopProcess(\"cbfcddd2-0006-43ae-996c-995fff7bed2e\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n \n}\n\nrun();" + - target: $["paths"]["/rooms/v2/{appId}/create"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetDeploymentInfo" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.deploymentsV2.getDeploymentInfo(1, "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/lobby/v3/{appId}/list/public"]["get"] + "label": "CreateRoom" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.roomsV2.createRoom({\n roomConfig: \"{\\\"name\\\":\\\"my-room\\\"}\",\n region: \"Sao_Paulo\",\n }, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\", \"2swovpy1fnunu\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/rooms/v2/{appId}/update/{roomId}"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "ListActivePublicLobbies" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.lobbiesV3.listActivePublicLobbies("app-af469a92-5b45-4565-b3c4-b79878de67d2", "Seattle"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/rooms/v2/{appId}/list/{processId}/inactive"]["get"] + "label": "UpdateRoomConfig" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n await hathoraCloud.roomsV2.updateRoomConfig(\"2swovpy1fnunu\", {\n roomConfig: \"{\\\"name\\\":\\\"my-room\\\"}\",\n }, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n \n}\n\nrun();" + - target: $["paths"]["/builds/v1/{appId}/info/{buildId}"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetInactiveRoomsForProcess" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.roomsV2.getInactiveRoomsForProcess("cbfcddd2-0006-43ae-996c-995fff7bed2e", "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/auth/v1/{appId}/login/anonymous"]["post"] + "label": "GetBuildInfoDeprecated" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.buildsV1.getBuildInfoDeprecated(1, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/deployments/v1/{appId}/latest"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "LoginAnonymous" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.authV1.loginAnonymous("app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/deployments/v1/{appId}/list"]["get"] + "label": "GetLatestDeploymentDeprecated" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.deploymentsV1.getLatestDeploymentDeprecated(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/lobby/v2/{appId}/create/local"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetDeploymentsDeprecated" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.deploymentsV1.getDeploymentsDeprecated("app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/deployments/v2/{appId}/latest"]["get"] + "label": "CreateLocalLobby" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.lobbiesV2.createLocalLobby(\"\", {\n initialConfig: \"\",\n region: \"Sao_Paulo\",\n }, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\", \"2swovpy1fnunu\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/processes/v2/{appId}/list/latest"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetLatestDeployment" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.deploymentsV2.getLatestDeployment("app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/lobby/v2/{appId}/create/local"]["post"] + "label": "GetLatestProcesses" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.processesV2.getLatestProcesses(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\", [\n \"stopped\",\n ], [\n \"Frankfurt\",\n ]);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/rooms/v2/{appId}/destroy/{roomId}"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "CreateLocalLobby" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.lobbiesV2.createLocalLobby("", { - initialConfig: "", - region: "Sao_Paulo", - }, "app-af469a92-5b45-4565-b3c4-b79878de67d2", "2swovpy1fnunu"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/lobby/v3/{appId}/info/shortcode/{shortCode}"]["get"] + "label": "DestroyRoom" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n await hathoraCloud.roomsV2.destroyRoom(\"2swovpy1fnunu\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n \n}\n\nrun();" + - target: $["paths"]["/builds/v1/{appId}/list"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetLobbyInfoByShortCode" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.lobbiesV3.getLobbyInfoByShortCode("LFG4", "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/processes/v1/{appId}/info/{processId}"]["get"] + "label": "GetBuildsDeprecated" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.buildsV1.getBuildsDeprecated(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/lobby/v1/{appId}/create/public"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetProcessInfoDeprecated" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.processesV1.getProcessInfoDeprecated("cbfcddd2-0006-43ae-996c-995fff7bed2e", "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/orgs/v1/{orgId}/invites/accept"]["post"] + "label": "CreatePublicLobbyDeprecated" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.lobbiesV1.createPublicLobbyDeprecated(\"\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\", \"Frankfurt\", false);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/orgs/v1/{orgId}/invites"]["put"] update: "x-codeSamples": - "lang": "typescript" - "label": "AcceptInvite" - "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n await hathoraCloud.organizationsV1.acceptInvite(\"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\");\n\n \n}\n\nrun();" - - target: $["paths"]["/rooms/v1/{appId}/create"]["post"] + "label": "InviteUser" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.organizationsV1.inviteUser(\"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\", {\n userEmail: \"noreply@hathora.dev\",\n });\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/rooms/v1/{appId}/destroy/{roomId}"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "CreateRoomDeprecated" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.roomsV1.createRoomDeprecated({ - roomConfig: "{\"name\":\"my-room\"}", - region: "Chicago", - }, "app-af469a92-5b45-4565-b3c4-b79878de67d2", "2swovpy1fnunu"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/apps/v1/list"]["get"] + "label": "DestroyRoomDeprecated" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n await hathoraCloud.roomsV1.destroyRoomDeprecated(\"2swovpy1fnunu\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n \n}\n\nrun();" + - target: $["paths"]["/processes/v2/{appId}/create/{region}"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetApps" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.appsV1.getApps(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/apps/v1/delete/{appId}"]["delete"] + "label": "CreateProcess" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.processesV2.createProcess(\"Tokyo\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/rooms/v1/{appId}/info/{roomId}"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "DeleteApp" - "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n await hathoraCloud.appsV1.deleteApp(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n \n}\n\nrun();" - - target: $["paths"]["/builds/v1/{appId}/create"]["post"] + "label": "GetRoomInfoDeprecated" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.roomsV1.getRoomInfoDeprecated(\"2swovpy1fnunu\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/rooms/v1/{appId}/list/{processId}/inactive"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "CreateBuildDeprecated" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.buildsV1.createBuildDeprecated({ - buildTag: "0.1.14-14c793", - }, "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/deployments/v2/{appId}/create/{buildId}"]["post"] + "label": "GetInactiveRoomsForProcessDeprecated" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.roomsV1.getInactiveRoomsForProcessDeprecated(\"cbfcddd2-0006-43ae-996c-995fff7bed2e\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/rooms/v2/{appId}/suspend/{roomId}"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "CreateDeployment" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.deploymentsV2.createDeployment(1, { - idleTimeoutEnabled: false, - env: [ - { - value: "TRUE", - name: "EULA", - }, - ], - roomsPerProcess: 3, - additionalContainerPorts: [ - { - transportType: "udp", - port: 8000, - name: "default", - }, - ], - transportType: "tcp", - containerPort: 4000, - requestedMemoryMB: 1024, - requestedCPU: 0.5, - }, "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/lobby/v2/{appId}/create/private"]["post"] + "label": "SuspendRoomV2Deprecated" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n await hathoraCloud.roomsV2.suspendRoomV2Deprecated(\"2swovpy1fnunu\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n \n}\n\nrun();" + - target: $["paths"]["/builds/v2/{appId}/delete/{buildId}"]["delete"] update: "x-codeSamples": - "lang": "typescript" - "label": "CreatePrivateLobby" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.lobbiesV2.createPrivateLobby("", { - initialConfig: "", - region: "Chicago", - }, "app-af469a92-5b45-4565-b3c4-b79878de67d2", "2swovpy1fnunu"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/logs/v1/{appId}/all"]["get"] + "label": "DeleteBuild" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n await hathoraCloud.buildsV2.deleteBuild(1, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n \n}\n\nrun();" + - target: $["paths"]["/deployments/v1/{appId}/list"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetLogsForApp" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.logsV1.getLogsForApp("app-af469a92-5b45-4565-b3c4-b79878de67d2", true, 100, "Tokyo"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/rooms/v1/{appId}/suspend/{roomId}"]["post"] + "label": "GetDeploymentsDeprecated" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.deploymentsV1.getDeploymentsDeprecated(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/lobby/v1/{appId}/create/private"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "SuspendRoomDeprecated" - "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n await hathoraCloud.roomsV1.suspendRoomDeprecated(\"2swovpy1fnunu\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n \n}\n\nrun();" - - target: $["paths"]["/rooms/v2/{appId}/connectioninfo/{roomId}"]["get"] + "label": "CreatePrivateLobbyDeprecated" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.lobbiesV1.createPrivateLobbyDeprecated(\"\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\", \"London\", false);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/logs/v1/{appId}/deployment/{deploymentId}"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetConnectionInfo" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.roomsV2.getConnectionInfo("2swovpy1fnunu", "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/builds/v1/{appId}/run/{buildId}"]["post"] + "label": "GetLogsForDeployment" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.logsV1.getLogsForDeployment(1, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\", true, 100);\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/rooms/v1/{appId}/suspend/{roomId}"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "RunBuildDeprecated" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - import { openAsBlob } from "node:fs"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.buildsV1.runBuildDeprecated(1, { - file: await openAsBlob("./sample-file"), - }, "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/builds/v2/{appId}/create"]["post"] + "label": "SuspendRoomDeprecated" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n await hathoraCloud.roomsV1.suspendRoomDeprecated(\"2swovpy1fnunu\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n \n}\n\nrun();" + - target: $["paths"]["/apps/v1/delete/{appId}"]["delete"] update: "x-codeSamples": - "lang": "typescript" - "label": "CreateBuild" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.buildsV2.createBuild({ - buildTag: "0.1.14-14c793", - }, "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/discovery/v2/ping"]["get"] + "label": "DeleteApp" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n await hathoraCloud.appsV1.deleteApp(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n \n}\n\nrun();" + - target: $["paths"]["/auth/v1/{appId}/login/anonymous"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetPingServiceEndpoints" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.discoveryV2.getPingServiceEndpoints(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/lobby/v2/{appId}/list/public"]["get"] + "label": "LoginAnonymous" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.authV1.loginAnonymous(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/deployments/v1/{appId}/create/{buildId}"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "ListActivePublicLobbiesDeprecatedV2" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.lobbiesV2.listActivePublicLobbiesDeprecatedV2("app-af469a92-5b45-4565-b3c4-b79878de67d2", "Frankfurt"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/rooms/v2/{appId}/list/{processId}/active"]["get"] + "label": "CreateDeploymentDeprecated" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.deploymentsV1.createDeploymentDeprecated(1, {\n env: [\n {\n value: \"TRUE\",\n name: \"EULA\",\n },\n ],\n roomsPerProcess: 3,\n planName: \"tiny\",\n additionalContainerPorts: [\n {\n transportType: \"udp\",\n port: 8000,\n name: \"default\",\n },\n ],\n transportType: \"tls\",\n containerPort: 4000,\n }, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/orgs/v1/{orgId}/invites/rescind"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetActiveRoomsForProcess" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.roomsV2.getActiveRoomsForProcess("cbfcddd2-0006-43ae-996c-995fff7bed2e", "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/lobby/v2/{appId}/setState/{roomId}"]["post"] + "label": "RescindInvite" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n await hathoraCloud.organizationsV1.rescindInvite(\"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\", {\n userEmail: \"noreply@hathora.dev\",\n });\n\n \n}\n\nrun();" + - target: $["paths"]["/orgs/v1"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "SetLobbyState" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.lobbiesV2.setLobbyState("2swovpy1fnunu", { - state: "", - }, "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/lobby/v3/{appId}/create"]["post"] + "label": "GetOrgs" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.organizationsV1.getOrgs();\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/rooms/v2/{appId}/info/{roomId}"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "CreateLobby" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.lobbiesV3.createLobby("", { - visibility: "private", - roomConfig: "{\"name\":\"my-room\"}", - region: "Seattle", - }, "app-af469a92-5b45-4565-b3c4-b79878de67d2", "LFG4", "2swovpy1fnunu"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/logs/v1/{appId}/process/{processId}"]["get"] + "label": "GetRoomInfo" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.roomsV2.getRoomInfo(\"2swovpy1fnunu\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/builds/v2/{appId}/run/{buildId}"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetLogsForProcess" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.logsV1.getLogsForProcess("cbfcddd2-0006-43ae-996c-995fff7bed2e", "app-af469a92-5b45-4565-b3c4-b79878de67d2", true, 100); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/rooms/v1/{appId}/list/{processId}/inactive"]["get"] + "label": "RunBuild" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.buildsV2.runBuild(1, {}, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/lobby/v2/{appId}/create"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetInactiveRoomsForProcessDeprecated" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.roomsV1.getInactiveRoomsForProcessDeprecated("cbfcddd2-0006-43ae-996c-995fff7bed2e", "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/builds/v2/{appId}/list"]["get"] + "label": "CreateLobbyDeprecated" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.lobbiesV2.createLobbyDeprecated(\"\", {\n visibility: \"private\",\n initialConfig: \"\",\n region: \"Tokyo\",\n }, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\", \"2swovpy1fnunu\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/lobby/v2/{appId}/list/public"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetBuilds" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.buildsV2.getBuilds("app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/lobby/v1/{appId}/create/private"]["post"] + "label": "ListActivePublicLobbiesDeprecatedV2" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.lobbiesV2.listActivePublicLobbiesDeprecatedV2(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\", \"Frankfurt\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/lobby/v3/{appId}/list/public"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "CreatePrivateLobbyDeprecated" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.lobbiesV1.createPrivateLobbyDeprecated("", "app-af469a92-5b45-4565-b3c4-b79878de67d2", "London", false); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/management/v1/sendverificationemail"]["post"] + "label": "ListActivePublicLobbies" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.lobbiesV3.listActivePublicLobbies(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\", \"Seattle\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/lobby/v2/{appId}/setState/{roomId}"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "SendVerificationEmail" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.managementV1.sendVerificationEmail({ - userId: "", - }); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/orgs/v1/{orgId}/invites/rescind"]["post"] + "label": "SetLobbyState" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.lobbiesV2.setLobbyState(\"2swovpy1fnunu\", {\n state: \"\",\n }, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/metrics/v1/{appId}/process/{processId}"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "RescindInvite" - "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n await hathoraCloud.organizationsV1.rescindInvite(\"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\", {\n userEmail: \"noreply@hathora.dev\",\n });\n\n \n}\n\nrun();" - - target: $["paths"]["/rooms/v1/{appId}/list/{processId}/active"]["get"] + "label": "GetMetrics" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.metricsV1.getMetrics({\n processId: \"cbfcddd2-0006-43ae-996c-995fff7bed2e\",\n });\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/orgs/v1/{orgId}/members"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetActiveRoomsForProcessDeprecated" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.roomsV1.getActiveRoomsForProcessDeprecated("cbfcddd2-0006-43ae-996c-995fff7bed2e", "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/rooms/v1/{appId}/connectioninfo/{roomId}"]["get"] + "label": "GetOrgMembers" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.organizationsV1.getOrgMembers(\"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/processes/v1/{appId}/list/running"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetConnectionInfoDeprecated" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.roomsV1.getConnectionInfoDeprecated("2swovpy1fnunu", "app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/logs/v1/{appId}/deployment/{deploymentId}"]["get"] + "label": "GetRunningProcesses" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.processesV1.getRunningProcesses(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\", \"Tokyo\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/processes/v1/{appId}/list/stopped"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetLogsForDeployment" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.logsV1.getLogsForDeployment(1, "app-af469a92-5b45-4565-b3c4-b79878de67d2", true, 100); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/processes/v1/{appId}/list/running"]["get"] + "label": "GetStoppedProcesses" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.processesV1.getStoppedProcesses(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\", \"Sydney\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/apps/v1/list"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetRunningProcesses" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.processesV1.getRunningProcesses("app-af469a92-5b45-4565-b3c4-b79878de67d2", "Tokyo"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/tokens/v1/orgs/{orgId}"]["get"] + "label": "GetApps" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.appsV1.getApps();\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/apps/v1/update/{appId}"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetOrgTokens" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.tokensV1.getOrgTokens("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/builds/v1/{appId}/list"]["get"] + "label": "UpdateApp" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.appsV1.updateApp({\n authConfiguration: {},\n appName: \"minecraft\",\n }, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/lobby/v2/{appId}/create/public"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetBuildsDeprecated" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.buildsV1.getBuildsDeprecated("app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/lobby/v1/{appId}/list"]["get"] + "label": "CreatePublicLobby" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.lobbiesV2.createPublicLobby(\"\", {\n initialConfig: \"\",\n region: \"Sao_Paulo\",\n }, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\", \"2swovpy1fnunu\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/logs/v1/{appId}/process/{processId}/download"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "ListActivePublicLobbiesDeprecatedV1" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.lobbiesV1.listActivePublicLobbiesDeprecatedV1("app-af469a92-5b45-4565-b3c4-b79878de67d2", false, "Sydney"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/rooms/v2/{appId}/update/{roomId}"]["post"] + "label": "DownloadLogForProcess" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.logsV1.downloadLogForProcess(\"cbfcddd2-0006-43ae-996c-995fff7bed2e\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/processes/v2/{appId}/info/{processId}"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "UpdateRoomConfig" - "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n await hathoraCloud.roomsV2.updateRoomConfig(\"2swovpy1fnunu\", {\n roomConfig: \"{\\\"name\\\":\\\"my-room\\\"}\",\n }, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n \n}\n\nrun();" - - target: $["paths"]["/billing/v1/paymentmethod"]["get"] + "label": "GetProcessInfo" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.processesV2.getProcessInfo(\"cbfcddd2-0006-43ae-996c-995fff7bed2e\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/billing/v1/balance"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetPaymentMethod" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.billingV1.getPaymentMethod(); - - // Handle the result - console.log(result) - } - - run(); + "label": "GetBalance" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.billingV1.getBalance();\n\n // Handle the result\n console.log(result)\n}\n\nrun();" - target: $["paths"]["/billing/v1/invoices"]["get"] update: "x-codeSamples": - "lang": "typescript" "label": "GetInvoices" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.billingV1.getInvoices(); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/processes/v1/{appId}/list/stopped"]["get"] + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.billingV1.getInvoices();\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/deployments/v2/{appId}/create/{buildId}"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetStoppedProcesses" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.processesV1.getStoppedProcesses("app-af469a92-5b45-4565-b3c4-b79878de67d2", "Sydney"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/tokens/v1/orgs/{orgId}/tokens/{orgTokenId}/revoke"]["post"] + "label": "CreateDeployment" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.deploymentsV2.createDeployment(1, {\n idleTimeoutEnabled: false,\n env: [\n {\n value: \"TRUE\",\n name: \"EULA\",\n },\n ],\n roomsPerProcess: 3,\n additionalContainerPorts: [\n {\n transportType: \"udp\",\n port: 8000,\n name: \"default\",\n },\n ],\n transportType: \"tcp\",\n containerPort: 4000,\n requestedMemoryMB: 1024,\n requestedCPU: 0.5,\n }, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/discovery/v1/ping"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "RevokeOrgToken" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.tokensV1.revokeOrgToken("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39", "org-token-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/deployments/v1/{appId}/latest"]["get"] + "label": "GetPingServiceEndpointsDeprecated" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.discoveryV1.getPingServiceEndpointsDeprecated();\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/rooms/v2/{appId}/connectioninfo/{roomId}"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "GetLatestDeploymentDeprecated" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - hathoraDevToken: "", - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.deploymentsV1.getLatestDeploymentDeprecated("app-af469a92-5b45-4565-b3c4-b79878de67d2"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/lobby/v1/{appId}/create/public"]["post"] + "label": "GetConnectionInfo" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.roomsV2.getConnectionInfo(\"2swovpy1fnunu\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/auth/v1/{appId}/login/nickname"]["post"] update: "x-codeSamples": - "lang": "typescript" - "label": "CreatePublicLobbyDeprecated" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.lobbiesV1.createPublicLobbyDeprecated("", "app-af469a92-5b45-4565-b3c4-b79878de67d2", "Frankfurt", false); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/lobby/v2/{appId}/create"]["post"] + "label": "LoginNickname" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.authV1.loginNickname({\n nickname: \"squiddytwoshoes\",\n }, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/builds/v2/{appId}/info/{buildId}"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "CreateLobbyDeprecated" - "source": |- - import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; - - const hathoraCloud = new HathoraCloud({ - appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2", - }); - - async function run() { - const result = await hathoraCloud.lobbiesV2.createLobbyDeprecated("", { - visibility: "private", - initialConfig: "", - region: "Tokyo", - }, "app-af469a92-5b45-4565-b3c4-b79878de67d2", "2swovpy1fnunu"); - - // Handle the result - console.log(result) - } - - run(); - - target: $["paths"]["/rooms/v2/{appId}/suspend/{roomId}"]["post"] + "label": "GetBuildInfo" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.buildsV2.getBuildInfo(1, \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/logs/v1/{appId}/all"]["get"] update: "x-codeSamples": - "lang": "typescript" - "label": "SuspendRoomV2Deprecated" - "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n await hathoraCloud.roomsV2.suspendRoomV2Deprecated(\"2swovpy1fnunu\", \"app-af469a92-5b45-4565-b3c4-b79878de67d2\");\n\n \n}\n\nrun();" + "label": "GetLogsForApp" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n const result = await hathoraCloud.logsV1.getLogsForApp(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\", true, 100, \"Tokyo\");\n\n // Handle the result\n console.log(result)\n}\n\nrun();" + - target: $["paths"]["/orgs/v1/{orgId}/invites/accept"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "AcceptInvite" + "source": "import { HathoraCloud } from \"@hathora/cloud-sdk-typescript\";\n\nconst hathoraCloud = new HathoraCloud({\n hathoraDevToken: \"\",\n appId: \"app-af469a92-5b45-4565-b3c4-b79878de67d2\",\n});\n\nasync function run() {\n await hathoraCloud.organizationsV1.acceptInvite(\"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\");\n\n \n}\n\nrun();" diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index bfe902a4..4dc5950f 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 1b06df09-5141-4b14-b0b7-5415dbf16cfb management: - docChecksum: aab9fbbed986e8a2acaae5f2f1efe3f9 + docChecksum: 9a202a3dffb804a6396c0137bce9b822 docVersion: 0.0.1 - speakeasyVersion: 1.337.1 - generationVersion: 2.373.2 - releaseVersion: 2.5.0 - configChecksum: afcb732e0198a14e8dc095f4c5604f66 + speakeasyVersion: 1.345.4 + generationVersion: 2.378.3 + releaseVersion: 2.5.1 + configChecksum: 93ad0df54fed52ace24d75b9cca3da90 repoURL: https://github.com/hathora/cloud-sdk-typescript.git installationURL: https://github.com/hathora/cloud-sdk-typescript published: true @@ -14,7 +14,7 @@ features: typescript: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.5 - core: 3.11.7 + core: 3.11.9 defaultEnabledRetries: 0.1.0 deprecations: 2.81.1 downloadStreams: 0.1.1 @@ -31,7 +31,7 @@ features: responseFormat: 0.2.3 retries: 2.83.0 sdkHooks: 0.1.0 - unions: 2.85.5 + unions: 2.85.6 generatedFiles: - src/sdk/appsv1.ts - src/sdk/authv1.ts diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index b6adea2d..53a5b0ac 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.337.1 +speakeasyVersion: 1.345.4 sources: my-source: sourceNamespace: my-source - sourceRevisionDigest: sha256:6f05e45136b9d440fed3278a6e5ee2c9240307e0f3098cbe98bf7cbda4dcf829 - sourceBlobDigest: sha256:2e7168b386b1b5d4bf6a2d6b4022095c8a7c6a8228fb734ce2f38fd6704363d0 + sourceRevisionDigest: sha256:dbde55f9b77b7952fb8b1d491fbd428c231122deb0fc282fa01308deae2e240a + sourceBlobDigest: sha256:2fa5ced81a7d0b7782bdf710269d1c07cd00397e7628cb49e289e5fe22e9be38 tags: - latest - main @@ -11,8 +11,8 @@ targets: hathora-typescript: source: my-source sourceNamespace: my-source - sourceRevisionDigest: sha256:6f05e45136b9d440fed3278a6e5ee2c9240307e0f3098cbe98bf7cbda4dcf829 - sourceBlobDigest: sha256:2e7168b386b1b5d4bf6a2d6b4022095c8a7c6a8228fb734ce2f38fd6704363d0 + sourceRevisionDigest: sha256:dbde55f9b77b7952fb8b1d491fbd428c231122deb0fc282fa01308deae2e240a + sourceBlobDigest: sha256:2fa5ced81a7d0b7782bdf710269d1c07cd00397e7628cb49e289e5fe22e9be38 outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/RELEASES.md b/RELEASES.md index 0324edd6..2404f063 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -550,4 +550,14 @@ Based on: ### Generated - [typescript v2.5.0] . ### Releases -- [NPM v2.5.0] https://www.npmjs.com/package/@hathora/cloud-sdk-typescript/v/2.5.0 - . \ No newline at end of file +- [NPM v2.5.0] https://www.npmjs.com/package/@hathora/cloud-sdk-typescript/v/2.5.0 - . + +## 2024-07-24 00:14:03 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.345.4 (2.378.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v2.5.1] . +### Releases +- [NPM v2.5.1] https://www.npmjs.com/package/@hathora/cloud-sdk-typescript/v/2.5.1 - . \ No newline at end of file diff --git a/docs/models/components/orgmember.md b/docs/models/components/orgmember.md index be7417e5..fcf35463 100644 --- a/docs/models/components/orgmember.md +++ b/docs/models/components/orgmember.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | | `lastLogin` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | -| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | N/A | | +| `joinedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | N/A | | | `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | N/A | | | `invitedBy` | *string* | :heavy_check_mark: | N/A | noreply@hathora.dev | | `userEmail` | *string* | :heavy_check_mark: | A user's email. | noreply@hathora.dev | diff --git a/docs/models/operations/runbuildrequestbody.md b/docs/models/operations/runbuildrequestbody.md index 1b10ece3..4f105f34 100644 --- a/docs/models/operations/runbuildrequestbody.md +++ b/docs/models/operations/runbuildrequestbody.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `file` | [File](https://developer.mozilla.org/en-US/docs/Web/API/File) \| [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) \| [operations.RunBuildFile](../../models/operations/runbuildfile.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `file` | [File](https://developer.mozilla.org/en-US/docs/Web/API/File) \| [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) \| [operations.RunBuildFile](../../models/operations/runbuildfile.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdks/buildsv2/README.md b/docs/sdks/buildsv2/README.md index f49fae42..0db1aa2c 100644 --- a/docs/sdks/buildsv2/README.md +++ b/docs/sdks/buildsv2/README.md @@ -201,7 +201,6 @@ Builds a game server artifact from a tarball you provide. Pass in the `buildId` ```typescript import { HathoraCloud } from "@hathora/cloud-sdk-typescript"; -import { openAsBlob } from "node:fs"; const hathoraCloud = new HathoraCloud({ hathoraDevToken: "", @@ -209,9 +208,7 @@ const hathoraCloud = new HathoraCloud({ }); async function run() { - const result = await hathoraCloud.buildsV2.runBuild(1, { - file: await openAsBlob("./sample-file"), - }, "app-af469a92-5b45-4565-b3c4-b79878de67d2"); + const result = await hathoraCloud.buildsV2.runBuild(1, {}, "app-af469a92-5b45-4565-b3c4-b79878de67d2"); // Handle the result console.log(result) diff --git a/docs/sdks/organizationsv1/README.md b/docs/sdks/organizationsv1/README.md index 3290bc64..ae930c78 100644 --- a/docs/sdks/organizationsv1/README.md +++ b/docs/sdks/organizationsv1/README.md @@ -222,10 +222,10 @@ run(); **Promise\** ### Errors -| Error Object | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.ApiError | 401,404,429,500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------- | ------------------- | ------------------- | +| errors.ApiError | 401,404,422,429,500 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getOrgPendingInvites diff --git a/gen.yaml b/gen.yaml index 03072bea..13e4113e 100644 --- a/gen.yaml +++ b/gen.yaml @@ -18,7 +18,7 @@ management: generationVersion: 2.188.3 speakeasyVersion: 1.120.0 typescript: - version: 2.5.0 + version: 2.5.1 additionalDependencies: dependencies: {} devDependencies: {} diff --git a/jsr.json b/jsr.json index 47ab812c..20170501 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@hathora/cloud-sdk-typescript", - "version": "2.5.0", + "version": "2.5.1", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 399a3322..95aa7417 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@hathora/cloud-sdk-typescript", - "version": "2.5.0", + "version": "2.5.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@hathora/cloud-sdk-typescript", - "version": "2.5.0", + "version": "2.5.1", "devDependencies": { "@typescript-eslint/eslint-plugin": "^7.7.1", "@typescript-eslint/parser": "^7.7.1", diff --git a/package.json b/package.json index 140645ed..a5eb7eb4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hathora/cloud-sdk-typescript", - "version": "2.5.0", + "version": "2.5.1", "author": "Hathora", "main": "./index.js", "sideEffects": false, diff --git a/src/lib/config.ts b/src/lib/config.ts index 423bc988..9ef1f68e 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -55,7 +55,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "0.0.1", - sdkVersion: "2.5.0", - genVersion: "2.373.2", - userAgent: "speakeasy-sdk/typescript 2.5.0 2.373.2 0.0.1 @hathora/cloud-sdk-typescript", + sdkVersion: "2.5.1", + genVersion: "2.378.3", + userAgent: "speakeasy-sdk/typescript 2.5.1 2.378.3 0.0.1 @hathora/cloud-sdk-typescript", } as const; diff --git a/src/lib/encodings.ts b/src/lib/encodings.ts index 49f536b6..9ddea674 100644 --- a/src/lib/encodings.ts +++ b/src/lib/encodings.ts @@ -212,6 +212,24 @@ export function encodeDeepObject( return ""; } + if (!isPlainObject(value)) { + throw new EncodingError( + `Value of parameter '${key}' which uses deepObject encoding must be an object`, + ); + } + + return encodeDeepObjectObject(key, value, options); +} + +export function encodeDeepObjectObject( + key: string, + value: unknown, + options?: { charEncoding?: "percent" | "none" }, +): string { + if (value == null) { + return ""; + } + let out = ""; const encodeString = (v: string) => { @@ -219,9 +237,7 @@ export function encodeDeepObject( }; if (!isPlainObject(value)) { - throw new EncodingError( - `Value of parameter '${key}' which uses deepObject encoding must be an object`, - ); + throw new EncodingError(`Expected parameter '${key}' to be an object.`); } Object.entries(value).forEach(([ck, cv]) => { @@ -232,9 +248,11 @@ export function encodeDeepObject( const pk = `${key}[${ck}]`; if (isPlainObject(cv)) { - throw new EncodingError( - `Value of parameter field '${pk}' cannot be an array or object.`, - ); + const objOut = encodeDeepObjectObject(pk, cv, options); + + out += `&${objOut}`; + + return; } const pairs: unknown[] = Array.isArray(cv) ? cv : [cv]; diff --git a/src/models/components/orgmember.ts b/src/models/components/orgmember.ts index 37ffe7c6..2d55bad1 100644 --- a/src/models/components/orgmember.ts +++ b/src/models/components/orgmember.ts @@ -6,7 +6,7 @@ import * as z from "zod"; export type OrgMember = { lastLogin?: Date | undefined; - updatedAt: Date; + joinedAt: Date; createdAt: Date; invitedBy: string; /** @@ -26,7 +26,7 @@ export const OrgMember$inboundSchema: z.ZodType new Date(v)) .optional(), - updatedAt: z + joinedAt: z .string() .datetime({ offset: true }) .transform((v) => new Date(v)), @@ -42,7 +42,7 @@ export const OrgMember$inboundSchema: z.ZodType v.toISOString()) .optional(), - updatedAt: z.date().transform((v) => v.toISOString()), + joinedAt: z.date().transform((v) => v.toISOString()), createdAt: z.date().transform((v) => v.toISOString()), invitedBy: z.string(), userEmail: z.string(), diff --git a/src/models/operations/runbuild.ts b/src/models/operations/runbuild.ts index 28ca7525..b0dfbfd3 100644 --- a/src/models/operations/runbuild.ts +++ b/src/models/operations/runbuild.ts @@ -17,7 +17,7 @@ export type RunBuildFile = { }; export type RunBuildRequestBody = { - file: RunBuildFile | Blob; + file?: RunBuildFile | Blob | undefined; }; export type RunBuildRequest = { @@ -100,12 +100,12 @@ export const RunBuildRequestBody$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - file: z.lazy(() => RunBuildFile$inboundSchema), + file: z.lazy(() => RunBuildFile$inboundSchema).optional(), }); /** @internal */ export type RunBuildRequestBody$Outbound = { - file: RunBuildFile$Outbound | Blob; + file?: RunBuildFile$Outbound | Blob | undefined; }; /** @internal */ @@ -114,7 +114,10 @@ export const RunBuildRequestBody$outboundSchema: z.ZodType< z.ZodTypeDef, RunBuildRequestBody > = z.object({ - file: z.lazy(() => RunBuildFile$outboundSchema).or(blobLikeSchema), + file: z + .lazy(() => RunBuildFile$outboundSchema) + .or(blobLikeSchema) + .optional(), }); /** diff --git a/src/sdk/buildsv2.ts b/src/sdk/buildsv2.ts index e96d7590..93bd99e1 100644 --- a/src/sdk/buildsv2.ts +++ b/src/sdk/buildsv2.ts @@ -401,14 +401,18 @@ export class BuildsV2 extends ClientSDK { ); const body$ = new FormData(); - if (isBlobLike(payload$.RequestBody.file)) { - body$.append("file", payload$.RequestBody.file); - } else { - body$.append( - "file", - new Blob([payload$.RequestBody.file.content], { type: "application/octet-stream" }), - payload$.RequestBody.file.fileName - ); + if (payload$.RequestBody.file !== undefined) { + if (isBlobLike(payload$.RequestBody.file)) { + body$.append("file", payload$.RequestBody.file); + } else { + body$.append( + "file", + new Blob([payload$.RequestBody.file.content], { + type: "application/octet-stream", + }), + payload$.RequestBody.file.fileName + ); + } } const pathParams$ = { diff --git a/src/sdk/organizationsv1.ts b/src/sdk/organizationsv1.ts index 59c822b6..f7fe41f4 100644 --- a/src/sdk/organizationsv1.ts +++ b/src/sdk/organizationsv1.ts @@ -381,7 +381,7 @@ export class OrganizationsV1 extends ClientSDK { const response = await this.do$(request$, { context, - errorCodes: ["401", "404", "429", "4XX", "500", "5XX"], + errorCodes: ["401", "404", "422", "429", "4XX", "500", "5XX"], retryConfig: options?.retries || this.options$.retryConfig, retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }); @@ -392,7 +392,7 @@ export class OrganizationsV1 extends ClientSDK { const [result$] = await this.matcher() .void(204, z.void()) - .json([401, 404, 429, 500], errors.ApiError$inboundSchema, { err: true }) + .json([401, 404, 422, 429, 500], errors.ApiError$inboundSchema, { err: true }) .fail(["4XX", "5XX"]) .match(response, { extraFields: responseFields$ });