From bf2f448dc9150c554398455d15f63f33a885cad4 Mon Sep 17 00:00:00 2001 From: Guilherme Werner Date: Sat, 17 May 2025 11:20:14 -0300 Subject: [PATCH] Patch v1.0.1 --- package.json | 2 +- src/api/generated.ts | 49 +++++++++++++++++++++++++++----------------- 2 files changed, 31 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index fabc397..956f8ab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tribufu", - "version": "1.0.0", + "version": "1.0.1", "description": "Tribufu JS SDK", "repository": "https://github.com/Tribufu/TribufuJs", "author": "Tribufu ", diff --git a/src/api/generated.ts b/src/api/generated.ts index 23ff7ca..dd82711 100644 --- a/src/api/generated.ts +++ b/src/api/generated.ts @@ -447,7 +447,7 @@ export class TribufuApiGenerated extends TribufuApiBase { * Get a list of games. * @return OK */ - getGames(): Promise { + getGames(): Promise { let url_ = this.baseUrl + "/v1/games"; url_ = url_.replace(/[?&]$/, ""); @@ -465,13 +465,13 @@ export class TribufuApiGenerated extends TribufuApiBase { }); } - protected processGetGames(response: Response): Promise { + protected processGetGames(response: Response): Promise { const status = response.status; let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); }; if (status === 200) { return response.text().then((_responseText) => { let result200: any = null; - result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as Application[]; + result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as Game[]; return result200; }); } else if (status !== 200 && status !== 204) { @@ -479,14 +479,14 @@ export class TribufuApiGenerated extends TribufuApiBase { return throwException("An unexpected server error occurred.", status, _responseText, _headers); }); } - return Promise.resolve(null as any); + return Promise.resolve(null as any); } /** * Get a game by id. * @return OK */ - getGameById(id: string): Promise { + getGameById(id: string): Promise { let url_ = this.baseUrl + "/v1/games/{id}"; if (id === undefined || id === null) throw new Error("The parameter 'id' must be defined."); @@ -507,13 +507,13 @@ export class TribufuApiGenerated extends TribufuApiBase { }); } - protected processGetGameById(response: Response): Promise { + protected processGetGameById(response: Response): Promise { const status = response.status; let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); }; if (status === 200) { return response.text().then((_responseText) => { let result200: any = null; - result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as Application; + result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as Game; return result200; }); } else if (status !== 200 && status !== 204) { @@ -521,7 +521,7 @@ export class TribufuApiGenerated extends TribufuApiBase { return throwException("An unexpected server error occurred.", status, _responseText, _headers); }); } - return Promise.resolve(null as any); + return Promise.resolve(null as any); } /** @@ -2713,7 +2713,28 @@ export interface Account { updated: string | null; } -export interface Application { +export enum ApplicationType { + Application = "application", + Game = "game", +} + +export interface CryptoViewModel { + encoded: string | null; + decoded: string | null; +} + +export interface Game { + game_port: number | null; + query_port: number | null; + rcon_port: number | null; + server_count: number; + steam_app_id: number | null; + steam_server_app_id: number | null; + enable_servers: boolean; + rust_gamedig_id: string | null; + node_gamedig_id: string | null; + server_connect_url: string | null; + server_tags: string | null; id: string; name: string | null; description: string | null; @@ -2736,16 +2757,6 @@ export interface Application { updated: string | null; } -export enum ApplicationType { - Application = "application", - Game = "game", -} - -export interface CryptoViewModel { - encoded: string | null; - decoded: string | null; -} - export interface GameServer { id: string; name: string | null;