diff --git a/.npmrc b/.npmrc deleted file mode 100644 index 7253a5c..0000000 --- a/.npmrc +++ /dev/null @@ -1 +0,0 @@ -min-release-age=7 diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index fcd3c12..4246903 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,5 +1,6 @@ src/apis/TribufuGeneratedApi.ts src/apis/index.ts +src/models/Account.ts src/models/Application.ts src/models/ApplicationType.ts src/models/AuthorizeRequest.ts @@ -10,7 +11,6 @@ src/models/CodeChallengeMethod.ts src/models/CodeResponse.ts src/models/CreateUser.ts src/models/CryptoViewModel.ts -src/models/ExternalAccount.ts src/models/Game.ts src/models/GameServer.ts src/models/GameServerCluster.ts @@ -18,21 +18,19 @@ src/models/GameServerQuery.ts src/models/GameServerStatus.ts src/models/GrantType.ts src/models/Group.ts -src/models/GroupApplication.ts +src/models/GroupGame.ts src/models/GroupMember.ts src/models/GroupRank.ts src/models/HashViewModel.ts -src/models/IdentityProviderType.ts src/models/IntrospectRequest.ts src/models/IntrospectResponse.ts src/models/IpAddress.ts src/models/LeaderboardItem.ts src/models/LeaderboardOrder.ts +src/models/LoginProvider.ts +src/models/ModelFile.ts src/models/Package.ts src/models/PackageRelease.ts -src/models/Product.ts -src/models/ProductPrice.ts -src/models/ProductType.ts src/models/Profile.ts src/models/ProfileGame.ts src/models/ProfileGroup.ts @@ -41,7 +39,8 @@ src/models/RevokeRequest.ts src/models/Search.ts src/models/SearchType.ts src/models/ServerMetrics.ts -src/models/StorageFile.ts +src/models/Subscription.ts +src/models/SubscriptionPrice.ts src/models/TokenHintType.ts src/models/TokenRequest.ts src/models/TokenResponse.ts diff --git a/examples/anonymous.js b/examples/anonymous.js deleted file mode 100644 index 0f59621..0000000 --- a/examples/anonymous.js +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) Tribufu. All Rights Reserved. -// SPDX-License-Identifier: MIT AND Apache-2.0 - -import dotenv from "dotenv"; -import { TribufuApi } from "../build/index.mjs"; - -dotenv.config(); - -async function main() { - const tribufu = TribufuApi.default(); - console.log(await tribufu.getCurrentIpAddress()); -} - -main(); diff --git a/package.json b/package.json index 7a2da5c..c511f50 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tribufu", - "version": "1.4.3", + "version": "1.2.0", "description": "Tribufu JS SDK", "repository": "https://github.com/tribufu/tribufu-js", "author": "Tribufu ", diff --git a/scripts/generate.ps1 b/scripts/generate.ps1 index 900ec0d..41628a4 100644 --- a/scripts/generate.ps1 +++ b/scripts/generate.ps1 @@ -1,7 +1,7 @@ #!/usr/bin/env pwsh java -jar ./vendor/openapi-generator/openapi-generator-cli.jar generate ` - -i https://api.tribufu.com/openapi.json ` + -i http://localhost:5000/openapi.json ` -g typescript-fetch ` -o . ` --global-property apis,models,supportingFiles,apiDocs=false,modelDocs=false,apiTests=false,modelTests=false ` diff --git a/src/apis/TribufuGeneratedApi.ts b/src/apis/TribufuGeneratedApi.ts index 4779df3..b3eda9d 100644 --- a/src/apis/TribufuGeneratedApi.ts +++ b/src/apis/TribufuGeneratedApi.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -15,19 +15,19 @@ import * as runtime from '../runtime'; import type { + Account, AuthorizeRequest, Client, ClientInfo, CodeResponse, CreateUser, CryptoViewModel, - ExternalAccount, Game, GameServer, GameServerCluster, GameServerQuery, Group, - GroupApplication, + GroupGame, GroupMember, HashViewModel, IntrospectRequest, @@ -36,19 +36,21 @@ import type { LeaderboardItem, LeaderboardOrder, Package, - Product, Profile, ProfileGame, ProfileGroup, RevokeRequest, Search, ServerMetrics, + Subscription, TokenRequest, TokenResponse, UpdateProfile, UserInfo, } from '../models/index'; import { + AccountFromJSON, + AccountToJSON, AuthorizeRequestFromJSON, AuthorizeRequestToJSON, ClientFromJSON, @@ -61,8 +63,6 @@ import { CreateUserToJSON, CryptoViewModelFromJSON, CryptoViewModelToJSON, - ExternalAccountFromJSON, - ExternalAccountToJSON, GameFromJSON, GameToJSON, GameServerFromJSON, @@ -73,8 +73,8 @@ import { GameServerQueryToJSON, GroupFromJSON, GroupToJSON, - GroupApplicationFromJSON, - GroupApplicationToJSON, + GroupGameFromJSON, + GroupGameToJSON, GroupMemberFromJSON, GroupMemberToJSON, HashViewModelFromJSON, @@ -91,8 +91,6 @@ import { LeaderboardOrderToJSON, PackageFromJSON, PackageToJSON, - ProductFromJSON, - ProductToJSON, ProfileFromJSON, ProfileToJSON, ProfileGameFromJSON, @@ -105,6 +103,8 @@ import { SearchToJSON, ServerMetricsFromJSON, ServerMetricsToJSON, + SubscriptionFromJSON, + SubscriptionToJSON, TokenRequestFromJSON, TokenRequestToJSON, TokenResponseFromJSON, @@ -167,6 +167,14 @@ export interface CreateGroupRequest { body?: any | null; } +export interface CreatePackageRequest { + name: string; + image: Blob; + files: Array; + version: string; + description?: string; +} + export interface CreateTokenRequest { tokenRequest?: TokenRequest; } @@ -208,7 +216,7 @@ export interface GenerateFlakeIdRequest { } export interface GenerateFlakeIdFromTimestampRequest { - timestamp: number; + timestamp: string; amount?: number; } @@ -379,11 +387,11 @@ export interface GetPackagesRequest { limit?: number; } -export interface GetProductByIdRequest { +export interface GetSubscriptionByIdRequest { id: string; } -export interface GetProductsRequest { +export interface GetSubscriptionsRequest { page?: number; limit?: number; } @@ -450,11 +458,11 @@ export interface GetUserProfilesV1Request { limit?: number; } -export interface GetUserSanctionsRequest { +export interface GetUserPunishmentsRequest { id: string; } -export interface GetUserSanctionsV1Request { +export interface GetUserPunishmentsV1Request { id: string; } @@ -559,6 +567,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/oauth2/authorize`, method: 'POST', @@ -597,6 +609,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json-patch+json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/users/{id}/email`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -634,6 +650,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json-patch+json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/users/{id}/password`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -654,7 +674,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * This endpoint is not available with an api key, only with a bearer token.

🔒 Required permissions: tribufu.game.server.claim + * This endpoint is not available with an api key, only with a bearer token.

🔒 Required permissions: tribufu.community.game.server.claim * Claim a game server. */ async claimGameServerRaw(requestParameters: ClaimGameServerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -671,6 +691,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/games/servers/{id}/claim`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -683,7 +707,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * This endpoint is not available with an api key, only with a bearer token.

🔒 Required permissions: tribufu.game.server.claim + * This endpoint is not available with an api key, only with a bearer token.

🔒 Required permissions: tribufu.community.game.server.claim * Claim a game server. */ async claimGameServer(id: string, body?: any | null, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { @@ -691,7 +715,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * This endpoint is not available with an api key, only with a bearer token.

🔒 Required permissions: tribufu.game.server.claim + * This endpoint is not available with an api key, only with a bearer token.

🔒 Required permissions: tribufu.community.game.server.claim * Claim a game server. * @deprecated */ @@ -709,6 +733,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/servers/{id}/claim`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -721,7 +749,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * This endpoint is not available with an api key, only with a bearer token.

🔒 Required permissions: tribufu.game.server.claim + * This endpoint is not available with an api key, only with a bearer token.

🔒 Required permissions: tribufu.community.game.server.claim * Claim a game server. * @deprecated */ @@ -740,6 +768,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/utils/base64`, method: 'POST', @@ -771,6 +803,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/oauth2/clients`, method: 'POST', @@ -791,7 +827,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.create + * 🔒 Required permissions: tribufu.community.game.server.create * Create a new game server. */ async createGameServerRaw(requestParameters: CreateGameServerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -801,6 +837,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/games/servers`, method: 'POST', @@ -813,7 +853,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.create + * 🔒 Required permissions: tribufu.community.game.server.create * Create a new game server. */ async createGameServer(body?: any | null, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { @@ -821,7 +861,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.cluster.create + * 🔒 Required permissions: tribufu.community.game.server.cluster.create * Create a new game server cluster. */ async createGameServerClusterRaw(requestParameters: CreateGameServerClusterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -831,6 +871,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/games/servers/clusters`, method: 'POST', @@ -843,7 +887,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.cluster.create + * 🔒 Required permissions: tribufu.community.game.server.cluster.create * Create a new game server cluster. */ async createGameServerCluster(body?: any | null, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { @@ -851,7 +895,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.cluster.create + * 🔒 Required permissions: tribufu.community.game.server.cluster.create * Create a new game server cluster. * @deprecated */ @@ -862,6 +906,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/clusters`, method: 'POST', @@ -874,7 +922,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.cluster.create + * 🔒 Required permissions: tribufu.community.game.server.cluster.create * Create a new game server cluster. * @deprecated */ @@ -883,7 +931,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.create + * 🔒 Required permissions: tribufu.community.game.server.create * Create a new game server. * @deprecated */ @@ -894,6 +942,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/servers`, method: 'POST', @@ -906,7 +958,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.create + * 🔒 Required permissions: tribufu.community.game.server.create * Create a new game server. * @deprecated */ @@ -925,6 +977,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/groups`, method: 'POST', @@ -944,6 +1000,107 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { await this.createGroupRaw({ body: body }, initOverrides); } + /** + * 🔒 Required permissions: tribufu.community.package.create + * Create a new package. + */ + async createPackageRaw(requestParameters: CreatePackageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling createPackage().' + ); + } + + if (requestParameters['image'] == null) { + throw new runtime.RequiredError( + 'image', + 'Required parameter "image" was null or undefined when calling createPackage().' + ); + } + + if (requestParameters['files'] == null) { + throw new runtime.RequiredError( + 'files', + 'Required parameter "files" was null or undefined when calling createPackage().' + ); + } + + if (requestParameters['version'] == null) { + throw new runtime.RequiredError( + 'version', + 'Required parameter "version" was null or undefined when calling createPackage().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + + const consumes: runtime.Consume[] = [ + { contentType: 'multipart/form-data' }, + ]; + // @ts-ignore: canConsumeForm may be unused + const canConsumeForm = runtime.canConsumeForm(consumes); + + let formParams: { append(param: string, value: any): any }; + let useForm = false; + // use FormData to transmit files using content-type "multipart/form-data" + useForm = canConsumeForm; + // use FormData to transmit files using content-type "multipart/form-data" + useForm = canConsumeForm; + if (useForm) { + formParams = new FormData(); + } else { + formParams = new URLSearchParams(); + } + + if (requestParameters['name'] != null) { + formParams.append('name', requestParameters['name'] as any); + } + + if (requestParameters['description'] != null) { + formParams.append('description', requestParameters['description'] as any); + } + + if (requestParameters['image'] != null) { + formParams.append('image', requestParameters['image'] as any); + } + + if (requestParameters['files'] != null) { + requestParameters['files'].forEach((element) => { + formParams.append('files', element as any); + }) + } + + if (requestParameters['version'] != null) { + formParams.append('version', requestParameters['version'] as any); + } + + const response = await this.request({ + path: `/v1/packages`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: formParams, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PackageFromJSON(jsonValue)); + } + + /** + * 🔒 Required permissions: tribufu.community.package.create + * Create a new package. + */ + async createPackage(name: string, image: Blob, files: Array, version: string, description?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createPackageRaw({ name: name, image: image, files: files, version: version, description: description }, initOverrides); + return await response.value(); + } + /** * Create a new token with grant type. */ @@ -954,6 +1111,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/oauth2/token`, method: 'POST', @@ -984,6 +1145,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/users`, method: 'POST', @@ -1019,6 +1184,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/oauth2/clients/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -1038,7 +1207,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.delete + * 🔒 Required permissions: tribufu.community.game.server.delete * Delete a game server. */ async deleteGameServerRaw(requestParameters: DeleteGameServerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -1053,6 +1222,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/games/servers/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -1064,7 +1237,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.delete + * 🔒 Required permissions: tribufu.community.game.server.delete * Delete a game server. */ async deleteGameServer(id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { @@ -1072,7 +1245,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.cluster.delete + * 🔒 Required permissions: tribufu.community.game.server.cluster.delete * Delete a game server cluster. */ async deleteGameServerClusterRaw(requestParameters: DeleteGameServerClusterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -1087,6 +1260,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/games/servers/clusters/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -1098,7 +1275,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.cluster.delete + * 🔒 Required permissions: tribufu.community.game.server.cluster.delete * Delete a game server cluster. */ async deleteGameServerCluster(id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { @@ -1106,7 +1283,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.cluster.delete + * 🔒 Required permissions: tribufu.community.game.server.cluster.delete * Delete a game server cluster. * @deprecated */ @@ -1122,6 +1299,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/clusters/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -1133,7 +1314,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.cluster.delete + * 🔒 Required permissions: tribufu.community.game.server.cluster.delete * Delete a game server cluster. * @deprecated */ @@ -1142,7 +1323,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.delete + * 🔒 Required permissions: tribufu.community.game.server.delete * Delete a game server. * @deprecated */ @@ -1158,6 +1339,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/servers/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -1169,7 +1354,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.delete + * 🔒 Required permissions: tribufu.community.game.server.delete * Delete a game server. * @deprecated */ @@ -1193,6 +1378,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/groups/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -1227,6 +1416,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/packages/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'DELETE', @@ -1249,7 +1442,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { * 🔒 Required permissions: tribufu.utils.generate.flake * Generate one or more flake ids. */ - async generateFlakeIdRaw(requestParameters: GenerateFlakeIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + async generateFlakeIdRaw(requestParameters: GenerateFlakeIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { const queryParameters: any = {}; if (requestParameters['amount'] != null) { @@ -1258,6 +1451,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/utils/flake`, method: 'GET', @@ -1272,7 +1469,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { * 🔒 Required permissions: tribufu.utils.generate.flake * Generate one or more flake ids. */ - async generateFlakeId(amount?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async generateFlakeId(amount?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const response = await this.generateFlakeIdRaw({ amount: amount }, initOverrides); return await response.value(); } @@ -1281,7 +1478,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { * 🔒 Required permissions: tribufu.utils.generate.flake.timestamp * Generate one or more flake ids from a timestamp. */ - async generateFlakeIdFromTimestampRaw(requestParameters: GenerateFlakeIdFromTimestampRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + async generateFlakeIdFromTimestampRaw(requestParameters: GenerateFlakeIdFromTimestampRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { if (requestParameters['timestamp'] == null) { throw new runtime.RequiredError( 'timestamp', @@ -1297,6 +1494,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/utils/flake/{timestamp}`.replace(`{${"timestamp"}}`, encodeURIComponent(String(requestParameters['timestamp']))), method: 'GET', @@ -1311,7 +1512,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { * 🔒 Required permissions: tribufu.utils.generate.flake.timestamp * Generate one or more flake ids from a timestamp. */ - async generateFlakeIdFromTimestamp(timestamp: number, amount?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async generateFlakeIdFromTimestamp(timestamp: string, amount?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const response = await this.generateFlakeIdFromTimestampRaw({ timestamp: timestamp, amount: amount }, initOverrides); return await response.value(); } @@ -1333,6 +1534,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/utils/password`, method: 'GET', @@ -1369,6 +1574,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/utils/uuid`, method: 'GET', @@ -1390,7 +1599,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { /** * 🔒 Required permissions: tribufu.identity.oauth2.client.get - * Get a oauth2 client by id. + * Get an oauth2 client by id. */ async getClientByIdRaw(requestParameters: GetClientByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters['id'] == null) { @@ -1404,6 +1613,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/oauth2/clients/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -1416,7 +1629,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { /** * 🔒 Required permissions: tribufu.identity.oauth2.client.get - * Get a oauth2 client by id. + * Get an oauth2 client by id. */ async getClientById(id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getClientByIdRaw({ id: id }, initOverrides); @@ -1431,6 +1644,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/oauth2/clientinfo`, method: 'GET', @@ -1470,6 +1687,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/oauth2/clients`, method: 'GET', @@ -1490,6 +1711,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** + * 🔒 Required permissions: tribufu.geoip.current * Get current ip address location. */ async getCurrentIpAddressRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { @@ -1497,6 +1719,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/geoip`, method: 'GET', @@ -1508,6 +1734,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** + * 🔒 Required permissions: tribufu.geoip.current * Get current ip address location. */ async getCurrentIpAddress(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -1516,7 +1743,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.get + * 🔒 Required permissions: tribufu.community.game.get * Get a game by id. */ async getGameByIdRaw(requestParameters: GetGameByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -1531,6 +1758,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/games/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -1542,7 +1773,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.get + * 🔒 Required permissions: tribufu.community.game.get * Get a game by id. */ async getGameById(id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { @@ -1551,7 +1782,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.get.address + * 🔒 Required permissions: tribufu.community.game.server.get.address * Get a game server by address and query port. */ async getGameServerByAddressAndQueryPortRaw(requestParameters: GetGameServerByAddressAndQueryPortRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -1573,6 +1804,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/games/servers/address/{address}:{port}`.replace(`{${"address"}}`, encodeURIComponent(String(requestParameters['address']))).replace(`{${"port"}}`, encodeURIComponent(String(requestParameters['port']))), method: 'GET', @@ -1584,7 +1819,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.get.address + * 🔒 Required permissions: tribufu.community.game.server.get.address * Get a game server by address and query port. */ async getGameServerByAddressAndQueryPort(address: string, port: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { @@ -1593,7 +1828,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.get.address + * 🔒 Required permissions: tribufu.community.game.server.get.address * Get a game server by address and query port. * @deprecated */ @@ -1616,6 +1851,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/servers/address/{address}:{port}`.replace(`{${"address"}}`, encodeURIComponent(String(requestParameters['address']))).replace(`{${"port"}}`, encodeURIComponent(String(requestParameters['port']))), method: 'GET', @@ -1627,7 +1866,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.get.address + * 🔒 Required permissions: tribufu.community.game.server.get.address * Get a game server by address and query port. * @deprecated */ @@ -1637,7 +1876,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.get + * 🔒 Required permissions: tribufu.community.game.server.get * Get a game server by id. */ async getGameServerByIdRaw(requestParameters: GetGameServerByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -1652,6 +1891,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/games/servers/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -1663,7 +1906,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.get + * 🔒 Required permissions: tribufu.community.game.server.get * Get a game server by id. */ async getGameServerById(id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { @@ -1672,7 +1915,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.get + * 🔒 Required permissions: tribufu.community.game.server.get * Get a game server by id. * @deprecated */ @@ -1688,6 +1931,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/servers/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -1699,7 +1946,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.get + * 🔒 Required permissions: tribufu.community.game.server.get * Get a game server by id. * @deprecated */ @@ -1709,7 +1956,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.cluster.get + * 🔒 Required permissions: tribufu.community.game.server.cluster.get * Get a game server cluster by id. */ async getGameServerClusterByIdRaw(requestParameters: GetGameServerClusterByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -1724,6 +1971,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/games/servers/clusters/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -1735,7 +1986,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.cluster.get + * 🔒 Required permissions: tribufu.community.game.server.cluster.get * Get a game server cluster by id. */ async getGameServerClusterById(id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { @@ -1744,7 +1995,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.cluster.get + * 🔒 Required permissions: tribufu.community.game.server.cluster.get * Get a game server cluster by id. * @deprecated */ @@ -1760,6 +2011,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/clusters/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -1771,7 +2026,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.cluster.get + * 🔒 Required permissions: tribufu.community.game.server.cluster.get * Get a game server cluster by id. * @deprecated */ @@ -1781,7 +2036,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.cluster.server.list + * 🔒 Required permissions: tribufu.community.game.server.cluster.server.list * Get a list of game server cluster servers. */ async getGameServerClusterServersRaw(requestParameters: GetGameServerClusterServersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { @@ -1804,6 +2059,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/games/servers/clusters/{id}/servers`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -1815,7 +2074,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.cluster.server.list + * 🔒 Required permissions: tribufu.community.game.server.cluster.server.list * Get a list of game server cluster servers. */ async getGameServerClusterServers(id: string, page?: number, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -1824,7 +2083,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.cluster.server.list + * 🔒 Required permissions: tribufu.community.game.server.cluster.server.list * Get a list of game server cluster servers. * @deprecated */ @@ -1848,6 +2107,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/clusters/{id}/servers`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -1859,7 +2122,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.cluster.server.list + * 🔒 Required permissions: tribufu.community.game.server.cluster.server.list * Get a list of game server cluster servers. * @deprecated */ @@ -1869,7 +2132,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.cluster.list + * 🔒 Required permissions: tribufu.community.game.server.cluster.list * Get a list of game server clusters. */ async getGameServerClustersRaw(requestParameters: GetGameServerClustersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { @@ -1885,6 +2148,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/games/servers/clusters`, method: 'GET', @@ -1896,7 +2163,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.cluster.list + * 🔒 Required permissions: tribufu.community.game.server.cluster.list * Get a list of game server clusters. */ async getGameServerClusters(page?: number, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -1905,7 +2172,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.cluster.list + * 🔒 Required permissions: tribufu.community.game.server.cluster.list * Get a list of game server clusters. * @deprecated */ @@ -1922,6 +2189,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/clusters`, method: 'GET', @@ -1933,7 +2204,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.cluster.list + * 🔒 Required permissions: tribufu.community.game.server.cluster.list * Get a list of game server clusters. * @deprecated */ @@ -1943,7 +2214,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.queries + * 🔒 Required permissions: tribufu.community.game.server.queries * Get a game server query history. */ async getGameServerQueriesRaw(requestParameters: GetGameServerQueriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { @@ -1966,6 +2237,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/games/servers/{id}/queries`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -1977,7 +2252,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.queries + * 🔒 Required permissions: tribufu.community.game.server.queries * Get a game server query history. */ async getGameServerQueries(id: string, page?: number, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -1986,7 +2261,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.queries + * 🔒 Required permissions: tribufu.community.game.server.queries * Get a game server query history. * @deprecated */ @@ -2010,6 +2285,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/servers/{id}/queries`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -2021,7 +2300,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.queries + * 🔒 Required permissions: tribufu.community.game.server.queries * Get a game server query history. * @deprecated */ @@ -2031,7 +2310,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.list + * 🔒 Required permissions: tribufu.community.game.server.list * Get a list of game servers. */ async getGameServersRaw(requestParameters: GetGameServersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { @@ -2063,6 +2342,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/games/servers`, method: 'GET', @@ -2074,7 +2357,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.list + * 🔒 Required permissions: tribufu.community.game.server.list * Get a list of game servers. */ async getGameServers(address?: string, queryPort?: number, country?: string, gameId?: string, page?: number, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -2083,7 +2366,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.list.country + * 🔒 Required permissions: tribufu.community.game.server.list.country * Get a list of game servers from a country. */ async getGameServersByCountryRaw(requestParameters: GetGameServersByCountryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { @@ -2106,6 +2389,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/games/servers/country/{country}`.replace(`{${"country"}}`, encodeURIComponent(String(requestParameters['country']))), method: 'GET', @@ -2117,7 +2404,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.list.country + * 🔒 Required permissions: tribufu.community.game.server.list.country * Get a list of game servers from a country. */ async getGameServersByCountry(country: string, page?: number, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -2126,7 +2413,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.list.country + * 🔒 Required permissions: tribufu.community.game.server.list.country * Get a list of game servers from a country. * @deprecated */ @@ -2150,6 +2437,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/servers/country/{country}`.replace(`{${"country"}}`, encodeURIComponent(String(requestParameters['country']))), method: 'GET', @@ -2161,7 +2452,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.list.country + * 🔒 Required permissions: tribufu.community.game.server.list.country * Get a list of game servers from a country. * @deprecated */ @@ -2171,7 +2462,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.country.list + * 🔒 Required permissions: tribufu.community.game.server.country.list * Get a list of countries with the number of game servers. */ async getGameServersCountriesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -2179,6 +2470,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/games/servers/countries`, method: 'GET', @@ -2190,7 +2485,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.country.list + * 🔒 Required permissions: tribufu.community.game.server.country.list * Get a list of countries with the number of game servers. */ async getGameServersCountries(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: number; }> { @@ -2199,7 +2494,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.country.list + * 🔒 Required permissions: tribufu.community.game.server.country.list * Get a list of countries with the number of game servers. * @deprecated */ @@ -2208,6 +2503,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/servers/countries`, method: 'GET', @@ -2219,7 +2518,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.country.list + * 🔒 Required permissions: tribufu.community.game.server.country.list * Get a list of countries with the number of game servers. * @deprecated */ @@ -2229,7 +2528,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.metric.get + * 🔒 Required permissions: tribufu.community.game.server.metric.get * Get metrics about the tracked game servers. */ async getGameServersMetricsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -2237,6 +2536,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/games/servers/metrics`, method: 'GET', @@ -2248,7 +2551,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.metric.get + * 🔒 Required permissions: tribufu.community.game.server.metric.get * Get metrics about the tracked game servers. */ async getGameServersMetrics(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { @@ -2257,7 +2560,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.metric.get + * 🔒 Required permissions: tribufu.community.game.server.metric.get * Get metrics about the tracked game servers. * @deprecated */ @@ -2266,6 +2569,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/servers/metrics`, method: 'GET', @@ -2277,7 +2584,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.metric.get + * 🔒 Required permissions: tribufu.community.game.server.metric.get * Get metrics about the tracked game servers. * @deprecated */ @@ -2287,7 +2594,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.list + * 🔒 Required permissions: tribufu.community.game.server.list * Get a list of game servers. * @deprecated */ @@ -2320,6 +2627,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/servers`, method: 'GET', @@ -2331,7 +2642,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.list + * 🔒 Required permissions: tribufu.community.game.server.list * Get a list of game servers. * @deprecated */ @@ -2341,7 +2652,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.list + * 🔒 Required permissions: tribufu.community.game.list * Get a list of games. */ async getGamesRaw(requestParameters: GetGamesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { @@ -2357,6 +2668,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/games`, method: 'GET', @@ -2368,7 +2683,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.list + * 🔒 Required permissions: tribufu.community.game.list * Get a list of games. */ async getGames(page?: number, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -2392,6 +2707,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/groups/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -2427,6 +2746,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/groups/tag/{tag}`.replace(`{${"tag"}}`, encodeURIComponent(String(requestParameters['tag']))), method: 'GET', @@ -2462,6 +2785,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/groups/uuid/{uuid}`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))), method: 'GET', @@ -2485,7 +2812,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { * 🔒 Required permissions: tribufu.community.group.game.list * Get a list of games of a group. */ - async getGroupGamesRaw(requestParameters: GetGroupGamesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + async getGroupGamesRaw(requestParameters: GetGroupGamesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { if (requestParameters['id'] == null) { throw new runtime.RequiredError( 'id', @@ -2497,6 +2824,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/groups/{id}/games`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -2504,14 +2835,14 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(GroupApplicationFromJSON)); + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(GroupGameFromJSON)); } /** * 🔒 Required permissions: tribufu.community.group.game.list * Get a list of games of a group. */ - async getGroupGames(id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getGroupGames(id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const response = await this.getGroupGamesRaw({ id: id }, initOverrides); return await response.value(); } @@ -2532,6 +2863,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/groups/{id}/members`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -2568,6 +2903,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/groups`, method: 'GET', @@ -2588,6 +2927,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** + * 🔒 Required permissions: tribufu.geoip.address.get * Get a ip address location. */ async getIpAddressRaw(requestParameters: GetIpAddressRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -2602,6 +2942,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/geoip/addresses/{address}`.replace(`{${"address"}}`, encodeURIComponent(String(requestParameters['address']))), method: 'GET', @@ -2613,6 +2957,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** + * 🔒 Required permissions: tribufu.geoip.address.get * Get a ip address location. */ async getIpAddress(address: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { @@ -2641,6 +2986,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/geoip/addresses`, method: 'GET', @@ -2673,6 +3022,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/leaderboard`, method: 'GET', @@ -2708,6 +3061,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/packages/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -2744,6 +3101,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/packages`, method: 'GET', @@ -2763,77 +3124,6 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { return await response.value(); } - /** - * 🔒 Required permissions: tribufu.store.product.get - * Get a product by id. - */ - async getProductByIdRaw(requestParameters: GetProductByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling getProductById().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/v1/products/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ProductFromJSON(jsonValue)); - } - - /** - * 🔒 Required permissions: tribufu.store.product.get - * Get a product by id. - */ - async getProductById(id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getProductByIdRaw({ id: id }, initOverrides); - return await response.value(); - } - - /** - * 🔒 Required permissions: tribufu.store.product.list - * Get a list of products. - */ - async getProductsRaw(requestParameters: GetProductsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['page'] != null) { - queryParameters['page'] = requestParameters['page']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/v1/products`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ProductFromJSON)); - } - - /** - * 🔒 Required permissions: tribufu.store.product.list - * Get a list of products. - */ - async getProducts(page?: number, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getProductsRaw({ page: page, limit: limit }, initOverrides); - return await response.value(); - } - /** * Get the public keys for the client. */ @@ -2842,6 +3132,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/oauth2/jwks`, method: 'GET', @@ -2859,11 +3153,90 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { await this.getPublicKeysRaw(initOverrides); } + /** + * 🔒 Required permissions: tribufu.store.subscription.get + * Get a subscription by id. + */ + async getSubscriptionByIdRaw(requestParameters: GetSubscriptionByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getSubscriptionById().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + + const response = await this.request({ + path: `/v1/subscriptions/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SubscriptionFromJSON(jsonValue)); + } + + /** + * 🔒 Required permissions: tribufu.store.subscription.get + * Get a subscription by id. + */ + async getSubscriptionById(id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSubscriptionByIdRaw({ id: id }, initOverrides); + return await response.value(); + } + + /** + * 🔒 Required permissions: tribufu.store.subscription.list + * Get a list of subscriptions. + */ + async getSubscriptionsRaw(requestParameters: GetSubscriptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + + const response = await this.request({ + path: `/v1/subscriptions`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SubscriptionFromJSON)); + } + + /** + * 🔒 Required permissions: tribufu.store.subscription.list + * Get a list of subscriptions. + */ + async getSubscriptions(page?: number, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getSubscriptionsRaw({ page: page, limit: limit }, initOverrides); + return await response.value(); + } + /** * 🔒 Required permissions: tribufu.identity.user.account.list * Get a list of connected accounts of the user. */ - async getUserAccountsRaw(requestParameters: GetUserAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + async getUserAccountsRaw(requestParameters: GetUserAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { if (requestParameters['id'] == null) { throw new runtime.RequiredError( 'id', @@ -2875,6 +3248,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/users/{id}/accounts`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -2882,14 +3259,14 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ExternalAccountFromJSON)); + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AccountFromJSON)); } /** * 🔒 Required permissions: tribufu.identity.user.account.list * Get a list of connected accounts of the user. */ - async getUserAccounts(id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getUserAccounts(id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const response = await this.getUserAccountsRaw({ id: id }, initOverrides); return await response.value(); } @@ -2910,6 +3287,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/profiles/{id}/friends`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -2946,6 +3327,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/users/{id}/friends`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -2982,6 +3367,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/profiles/{id}/games`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -3018,6 +3407,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/users/{id}/games`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -3054,6 +3447,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/profiles/{id}/groups`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -3090,6 +3487,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/users/{id}/groups`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -3119,6 +3520,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/oauth2/userinfo`, method: 'GET', @@ -3154,6 +3559,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/profiles/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -3190,6 +3599,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/users/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -3226,6 +3639,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/profiles/name/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), method: 'GET', @@ -3262,6 +3679,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/users/name/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), method: 'GET', @@ -3298,6 +3719,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/profiles/uuid/{uuid}`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))), method: 'GET', @@ -3334,6 +3759,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/users/uuid/{uuid}`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))), method: 'GET', @@ -3371,6 +3800,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/profiles`, method: 'GET', @@ -3408,6 +3841,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/users`, method: 'GET', @@ -3429,14 +3866,14 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.community.profile.sanction.list - * Get a list of sanctions the user has received. + * 🔒 Required permissions: tribufu.community.profile.punishment.list + * Get a list of punishments the user has received. */ - async getUserSanctionsRaw(requestParameters: GetUserSanctionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + async getUserPunishmentsRaw(requestParameters: GetUserPunishmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { if (requestParameters['id'] == null) { throw new runtime.RequiredError( 'id', - 'Required parameter "id" was null or undefined when calling getUserSanctions().' + 'Required parameter "id" was null or undefined when calling getUserPunishments().' ); } @@ -3444,8 +3881,12 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ - path: `/v1/profiles/{id}/sanctions`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + path: `/v1/profiles/{id}/punishments`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -3455,24 +3896,24 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.community.profile.sanction.list - * Get a list of sanctions the user has received. + * 🔒 Required permissions: tribufu.community.profile.punishment.list + * Get a list of punishments the user has received. */ - async getUserSanctions(id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getUserSanctionsRaw({ id: id }, initOverrides); + async getUserPunishments(id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getUserPunishmentsRaw({ id: id }, initOverrides); return await response.value(); } /** - * 🔒 Required permissions: tribufu.community.profile.sanction.list - * Get a list of sanctions the user has received. + * 🔒 Required permissions: tribufu.community.profile.punishment.list + * Get a list of punishments the user has received. * @deprecated */ - async getUserSanctionsV1Raw(requestParameters: GetUserSanctionsV1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + async getUserPunishmentsV1Raw(requestParameters: GetUserPunishmentsV1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { if (requestParameters['id'] == null) { throw new runtime.RequiredError( 'id', - 'Required parameter "id" was null or undefined when calling getUserSanctionsV1().' + 'Required parameter "id" was null or undefined when calling getUserPunishmentsV1().' ); } @@ -3480,8 +3921,12 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ - path: `/v1/users/{id}/sanctions`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + path: `/v1/users/{id}/punishments`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -3491,12 +3936,12 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.community.profile.sanction.list - * Get a list of sanctions the user has received. + * 🔒 Required permissions: tribufu.community.profile.punishment.list + * Get a list of punishments the user has received. * @deprecated */ - async getUserSanctionsV1(id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getUserSanctionsV1Raw({ id: id }, initOverrides); + async getUserPunishmentsV1(id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getUserPunishmentsV1Raw({ id: id }, initOverrides); return await response.value(); } @@ -3524,6 +3969,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/profiles/{id}/servers`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -3568,6 +4017,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/users/{id}/servers`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'GET', @@ -3599,6 +4052,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/utils/argon2`, method: 'POST', @@ -3630,6 +4087,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/utils/bcrypt`, method: 'POST', @@ -3661,6 +4122,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/utils/md5`, method: 'POST', @@ -3692,6 +4157,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/utils/sha256`, method: 'POST', @@ -3722,6 +4191,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/oauth2/introspect`, method: 'POST', @@ -3751,6 +4224,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/oauth2/revoke`, method: 'POST', @@ -3780,6 +4257,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/search`, method: 'POST', @@ -3818,6 +4299,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/oauth2/clients/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -3838,7 +4323,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.update + * 🔒 Required permissions: tribufu.community.game.server.update * Update a game server. */ async updateGameServerRaw(requestParameters: UpdateGameServerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -3855,6 +4340,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/games/servers/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -3867,7 +4356,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.update + * 🔒 Required permissions: tribufu.community.game.server.update * Update a game server. */ async updateGameServer(id: string, body?: any | null, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { @@ -3875,7 +4364,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.cluster.update + * 🔒 Required permissions: tribufu.community.game.server.cluster.update * Update a game server cluster. */ async updateGameServerClusterRaw(requestParameters: UpdateGameServerClusterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -3892,6 +4381,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/games/servers/clusters/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -3904,7 +4397,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.cluster.update + * 🔒 Required permissions: tribufu.community.game.server.cluster.update * Update a game server cluster. */ async updateGameServerCluster(id: string, body?: any | null, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { @@ -3912,7 +4405,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.cluster.update + * 🔒 Required permissions: tribufu.community.game.server.cluster.update * Update a game server cluster. * @deprecated */ @@ -3930,6 +4423,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/clusters/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -3942,7 +4439,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.cluster.update + * 🔒 Required permissions: tribufu.community.game.server.cluster.update * Update a game server cluster. * @deprecated */ @@ -3951,7 +4448,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.update + * 🔒 Required permissions: tribufu.community.game.server.update * Update a game server. * @deprecated */ @@ -3969,6 +4466,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/servers/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -3981,7 +4482,7 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { } /** - * 🔒 Required permissions: tribufu.game.server.update + * 🔒 Required permissions: tribufu.community.game.server.update * Update a game server. * @deprecated */ @@ -4007,6 +4508,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/groups/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -4044,6 +4549,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/packages/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -4081,6 +4590,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/profiles/{id}/profile`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', @@ -4120,6 +4633,10 @@ export class TribufuGeneratedApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKey authentication + } + const response = await this.request({ path: `/v1/users/{id}/profile`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), method: 'PUT', diff --git a/src/models/Account.ts b/src/models/Account.ts new file mode 100644 index 0000000..4171347 --- /dev/null +++ b/src/models/Account.ts @@ -0,0 +1,133 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Tribufu API + * API to access Tribufu services. + * + * The version of the OpenAPI document: 1.2.0 + * Contact: contact@tribufu.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { LoginProvider } from './LoginProvider'; +import { + LoginProviderFromJSON, + LoginProviderFromJSONTyped, + LoginProviderToJSON, + LoginProviderToJSONTyped, +} from './LoginProvider'; + +/** + * + * @export + * @interface Account + */ +export interface Account { + /** + * + * @type {string} + * @memberof Account + */ + id: string | null; + /** + * + * @type {string} + * @memberof Account + */ + name?: string | null; + /** + * + * @type {LoginProvider} + * @memberof Account + */ + provider: LoginProvider; + /** + * + * @type {string} + * @memberof Account + */ + userId?: string; + /** + * + * @type {boolean} + * @memberof Account + */ + authorized?: boolean; + /** + * + * @type {any} + * @memberof Account + */ + fields?: any | null; + /** + * + * @type {Date} + * @memberof Account + */ + created?: Date; + /** + * + * @type {Date} + * @memberof Account + */ + updated?: Date | null; +} + + + +/** + * Check if a given object implements the Account interface. + */ +export function instanceOfAccount(value: object): value is Account { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('provider' in value) || value['provider'] === undefined) return false; + return true; +} + +export function AccountFromJSON(json: any): Account { + return AccountFromJSONTyped(json, false); +} + +export function AccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): Account { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'name': json['name'] == null ? undefined : json['name'], + 'provider': LoginProviderFromJSON(json['provider']), + 'userId': json['user_id'] == null ? undefined : json['user_id'], + 'authorized': json['authorized'] == null ? undefined : json['authorized'], + 'fields': json['fields'] == null ? undefined : json['fields'], + 'created': json['created'] == null ? undefined : (new Date(json['created'])), + 'updated': json['updated'] == null ? undefined : (new Date(json['updated'])), + }; +} + +export function AccountToJSON(json: any): Account { + return AccountToJSONTyped(json, false); +} + +export function AccountToJSONTyped(value?: Account | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + 'provider': LoginProviderToJSON(value['provider']), + 'user_id': value['userId'], + 'authorized': value['authorized'], + 'fields': value['fields'], + 'created': value['created'] == null ? undefined : ((value['created']).toISOString()), + 'updated': value['updated'] == null ? undefined : ((value['updated'] as any).toISOString()), + }; +} + diff --git a/src/models/Application.ts b/src/models/Application.ts index 6c15f88..8cfd3e0 100644 --- a/src/models/Application.ts +++ b/src/models/Application.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -92,19 +92,13 @@ export interface Application { * @type {Date} * @memberof Application */ - createdAt?: Date; + created?: Date; /** * * @type {Date} * @memberof Application */ - updatedAt?: Date | null; - /** - * - * @type {Date} - * @memberof Application - */ - deletedAt?: Date | null; + updated?: Date | null; } @@ -137,9 +131,8 @@ export function ApplicationFromJSONTyped(json: any, ignoreDiscriminator: boolean 'capsuleImageUrl': json['capsule_image_url'] == null ? undefined : json['capsule_image_url'], 'libraryImageUrl': json['library_image_url'] == null ? undefined : json['library_image_url'], 'slug': json['slug'] == null ? undefined : json['slug'], - 'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'deletedAt': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), + 'created': json['created'] == null ? undefined : (new Date(json['created'])), + 'updated': json['updated'] == null ? undefined : (new Date(json['updated'])), }; } @@ -164,9 +157,8 @@ export function ApplicationToJSONTyped(value?: Application | null, ignoreDiscrim 'capsule_image_url': value['capsuleImageUrl'], 'library_image_url': value['libraryImageUrl'], 'slug': value['slug'], - 'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()), - 'updated_at': value['updatedAt'] == null ? undefined : ((value['updatedAt'] as any).toISOString()), - 'deleted_at': value['deletedAt'] == null ? undefined : ((value['deletedAt'] as any).toISOString()), + 'created': value['created'] == null ? undefined : ((value['created']).toISOString()), + 'updated': value['updated'] == null ? undefined : ((value['updated'] as any).toISOString()), }; } diff --git a/src/models/ApplicationType.ts b/src/models/ApplicationType.ts index 60778d0..acb92d4 100644 --- a/src/models/ApplicationType.ts +++ b/src/models/ApplicationType.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,7 +18,7 @@ * @export */ export const ApplicationType = { - Software: 'software', + Application: 'application', Game: 'game' } as const; export type ApplicationType = typeof ApplicationType[keyof typeof ApplicationType]; diff --git a/src/models/AuthorizeRequest.ts b/src/models/AuthorizeRequest.ts index 95b7f39..e80ed5f 100644 --- a/src/models/AuthorizeRequest.ts +++ b/src/models/AuthorizeRequest.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/models/Client.ts b/src/models/Client.ts index ed5f0ca..51ddcba 100644 --- a/src/models/Client.ts +++ b/src/models/Client.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -57,6 +57,12 @@ export interface Client { * @memberof Client */ trusted?: boolean; + /** + * + * @type {string} + * @memberof Client + */ + packageId?: string | null; /** * * @type {string} @@ -75,6 +81,12 @@ export interface Client { * @memberof Client */ backgroundUrl?: string | null; + /** + * + * @type {string} + * @memberof Client + */ + customSchema?: string | null; /** * * @type {string} @@ -98,19 +110,13 @@ export interface Client { * @type {Date} * @memberof Client */ - createdAt?: Date; + created?: Date; /** * * @type {Date} * @memberof Client */ - updatedAt?: Date | null; - /** - * - * @type {Date} - * @memberof Client - */ - deletedAt?: Date | null; + updated?: Date | null; } @@ -138,15 +144,16 @@ export function ClientFromJSONTyped(json: any, ignoreDiscriminator: boolean): Cl 'type': json['type'] == null ? undefined : ClientTypeFromJSON(json['type']), 'organizationId': json['organization_id'] == null ? undefined : json['organization_id'], 'trusted': json['trusted'] == null ? undefined : json['trusted'], + 'packageId': json['package_id'] == null ? undefined : json['package_id'], 'websiteUrl': json['website_url'] == null ? undefined : json['website_url'], 'photoUrl': json['photo_url'] == null ? undefined : json['photo_url'], 'backgroundUrl': json['background_url'] == null ? undefined : json['background_url'], + 'customSchema': json['custom_schema'] == null ? undefined : json['custom_schema'], 'redirects': json['redirects'] == null ? undefined : json['redirects'], 'scopes': json['scopes'] == null ? undefined : json['scopes'], 'permissions': json['permissions'] == null ? undefined : json['permissions'], - 'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'deletedAt': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), + 'created': json['created'] == null ? undefined : (new Date(json['created'])), + 'updated': json['updated'] == null ? undefined : (new Date(json['updated'])), }; } @@ -166,14 +173,15 @@ export function ClientToJSONTyped(value?: Omit | null, ig 'type': ClientTypeToJSON(value['type']), 'organization_id': value['organizationId'], 'trusted': value['trusted'], + 'package_id': value['packageId'], 'website_url': value['websiteUrl'], 'photo_url': value['photoUrl'], 'background_url': value['backgroundUrl'], + 'custom_schema': value['customSchema'], 'redirects': value['redirects'], 'scopes': value['scopes'], - 'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()), - 'updated_at': value['updatedAt'] == null ? undefined : ((value['updatedAt'] as any).toISOString()), - 'deleted_at': value['deletedAt'] == null ? undefined : ((value['deletedAt'] as any).toISOString()), + 'created': value['created'] == null ? undefined : ((value['created']).toISOString()), + 'updated': value['updated'] == null ? undefined : ((value['updated'] as any).toISOString()), }; } diff --git a/src/models/ClientInfo.ts b/src/models/ClientInfo.ts index e8920b0..7e8de03 100644 --- a/src/models/ClientInfo.ts +++ b/src/models/ClientInfo.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/models/ClientType.ts b/src/models/ClientType.ts index 8fe029d..5d9c74a 100644 --- a/src/models/ClientType.ts +++ b/src/models/ClientType.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/models/CodeChallengeMethod.ts b/src/models/CodeChallengeMethod.ts index 02d92b6..424bb38 100644 --- a/src/models/CodeChallengeMethod.ts +++ b/src/models/CodeChallengeMethod.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/models/CodeResponse.ts b/src/models/CodeResponse.ts index c8420db..ee4bee0 100644 --- a/src/models/CodeResponse.ts +++ b/src/models/CodeResponse.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/models/CreateUser.ts b/src/models/CreateUser.ts index 3385b9d..de0fd92 100644 --- a/src/models/CreateUser.ts +++ b/src/models/CreateUser.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -24,7 +24,7 @@ export interface CreateUser { * @type {string} * @memberof CreateUser */ - uuid?: string; + uuid?: string | null; /** * * @type {string} diff --git a/src/models/CryptoViewModel.ts b/src/models/CryptoViewModel.ts index a6c33f5..672d271 100644 --- a/src/models/CryptoViewModel.ts +++ b/src/models/CryptoViewModel.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/models/ExternalAccount.ts b/src/models/ExternalAccount.ts deleted file mode 100644 index 5254fc0..0000000 --- a/src/models/ExternalAccount.ts +++ /dev/null @@ -1,141 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tribufu API - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { IdentityProviderType } from './IdentityProviderType'; -import { - IdentityProviderTypeFromJSON, - IdentityProviderTypeFromJSONTyped, - IdentityProviderTypeToJSON, - IdentityProviderTypeToJSONTyped, -} from './IdentityProviderType'; - -/** - * - * @export - * @interface ExternalAccount - */ -export interface ExternalAccount { - /** - * - * @type {string} - * @memberof ExternalAccount - */ - userId?: string; - /** - * - * @type {IdentityProviderType} - * @memberof ExternalAccount - */ - provider: IdentityProviderType; - /** - * - * @type {string} - * @memberof ExternalAccount - */ - externalId: string | null; - /** - * - * @type {string} - * @memberof ExternalAccount - */ - name?: string | null; - /** - * - * @type {boolean} - * @memberof ExternalAccount - */ - authorized?: boolean; - /** - * - * @type {{ [key: string]: any | null; }} - * @memberof ExternalAccount - */ - fields?: { [key: string]: any | null; } | null; - /** - * - * @type {Date} - * @memberof ExternalAccount - */ - createdAt?: Date; - /** - * - * @type {Date} - * @memberof ExternalAccount - */ - updatedAt?: Date | null; - /** - * - * @type {Date} - * @memberof ExternalAccount - */ - deletedAt?: Date | null; -} - - - -/** - * Check if a given object implements the ExternalAccount interface. - */ -export function instanceOfExternalAccount(value: object): value is ExternalAccount { - if (!('provider' in value) || value['provider'] === undefined) return false; - if (!('externalId' in value) || value['externalId'] === undefined) return false; - return true; -} - -export function ExternalAccountFromJSON(json: any): ExternalAccount { - return ExternalAccountFromJSONTyped(json, false); -} - -export function ExternalAccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExternalAccount { - if (json == null) { - return json; - } - return { - - 'userId': json['user_id'] == null ? undefined : json['user_id'], - 'provider': IdentityProviderTypeFromJSON(json['provider']), - 'externalId': json['external_id'], - 'name': json['name'] == null ? undefined : json['name'], - 'authorized': json['authorized'] == null ? undefined : json['authorized'], - 'fields': json['fields'] == null ? undefined : json['fields'], - 'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'deletedAt': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), - }; -} - -export function ExternalAccountToJSON(json: any): ExternalAccount { - return ExternalAccountToJSONTyped(json, false); -} - -export function ExternalAccountToJSONTyped(value?: ExternalAccount | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'user_id': value['userId'], - 'provider': IdentityProviderTypeToJSON(value['provider']), - 'external_id': value['externalId'], - 'name': value['name'], - 'authorized': value['authorized'], - 'fields': value['fields'], - 'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()), - 'updated_at': value['updatedAt'] == null ? undefined : ((value['updatedAt'] as any).toISOString()), - 'deleted_at': value['deletedAt'] == null ? undefined : ((value['deletedAt'] as any).toISOString()), - }; -} - diff --git a/src/models/Game.ts b/src/models/Game.ts index afa4873..28f341d 100644 --- a/src/models/Game.ts +++ b/src/models/Game.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -92,19 +92,13 @@ export interface Game { * @type {Date} * @memberof Game */ - createdAt?: Date; + created?: Date; /** * * @type {Date} * @memberof Game */ - updatedAt?: Date | null; - /** - * - * @type {Date} - * @memberof Game - */ - deletedAt?: Date | null; + updated?: Date | null; /** * * @type {boolean} @@ -179,9 +173,8 @@ export function GameFromJSONTyped(json: any, ignoreDiscriminator: boolean): Game 'capsuleImageUrl': json['capsule_image_url'] == null ? undefined : json['capsule_image_url'], 'libraryImageUrl': json['library_image_url'] == null ? undefined : json['library_image_url'], 'slug': json['slug'] == null ? undefined : json['slug'], - 'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'deletedAt': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), + 'created': json['created'] == null ? undefined : (new Date(json['created'])), + 'updated': json['updated'] == null ? undefined : (new Date(json['updated'])), 'enableServers': json['enable_servers'] == null ? undefined : json['enable_servers'], 'gamePort': json['game_port'] == null ? undefined : json['game_port'], 'queryPort': json['query_port'] == null ? undefined : json['query_port'], @@ -213,9 +206,8 @@ export function GameToJSONTyped(value?: Game | null, ignoreDiscriminator: boolea 'capsule_image_url': value['capsuleImageUrl'], 'library_image_url': value['libraryImageUrl'], 'slug': value['slug'], - 'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()), - 'updated_at': value['updatedAt'] == null ? undefined : ((value['updatedAt'] as any).toISOString()), - 'deleted_at': value['deletedAt'] == null ? undefined : ((value['deletedAt'] as any).toISOString()), + 'created': value['created'] == null ? undefined : ((value['created']).toISOString()), + 'updated': value['updated'] == null ? undefined : ((value['updated'] as any).toISOString()), 'enable_servers': value['enableServers'], 'game_port': value['gamePort'], 'query_port': value['queryPort'], diff --git a/src/models/GameServer.ts b/src/models/GameServer.ts index 9114040..7628802 100644 --- a/src/models/GameServer.ts +++ b/src/models/GameServer.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -42,7 +42,7 @@ export interface GameServer { * @type {string} * @memberof GameServer */ - ownerId?: string; + ownerId?: string | null; /** * * @type {string} @@ -90,7 +90,7 @@ export interface GameServer { * @type {string} * @memberof GameServer */ - clusterId?: string; + clusterId?: string | null; /** * * @type {string} @@ -123,10 +123,10 @@ export interface GameServer { steam?: boolean; /** * - * @type {number} + * @type {string} * @memberof GameServer */ - discordServerId?: number | null; + discordServerId?: string | null; /** * * @type {string} @@ -138,19 +138,13 @@ export interface GameServer { * @type {Date} * @memberof GameServer */ - createdAt?: Date; + created?: Date; /** * * @type {Date} * @memberof GameServer */ - updatedAt?: Date | null; - /** - * - * @type {Date} - * @memberof GameServer - */ - deletedAt?: Date | null; + updated?: Date | null; } /** @@ -192,9 +186,8 @@ export function GameServerFromJSONTyped(json: any, ignoreDiscriminator: boolean) 'steam': json['steam'] == null ? undefined : json['steam'], 'discordServerId': json['discord_server_id'] == null ? undefined : json['discord_server_id'], 'youtubeVideoUrl': json['youtube_video_url'] == null ? undefined : json['youtube_video_url'], - 'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'deletedAt': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), + 'created': json['created'] == null ? undefined : (new Date(json['created'])), + 'updated': json['updated'] == null ? undefined : (new Date(json['updated'])), }; } @@ -228,9 +221,8 @@ export function GameServerToJSONTyped(value?: GameServer | null, ignoreDiscrimin 'steam': value['steam'], 'discord_server_id': value['discordServerId'], 'youtube_video_url': value['youtubeVideoUrl'], - 'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()), - 'updated_at': value['updatedAt'] == null ? undefined : ((value['updatedAt'] as any).toISOString()), - 'deleted_at': value['deletedAt'] == null ? undefined : ((value['deletedAt'] as any).toISOString()), + 'created': value['created'] == null ? undefined : ((value['created']).toISOString()), + 'updated': value['updated'] == null ? undefined : ((value['updated'] as any).toISOString()), }; } diff --git a/src/models/GameServerCluster.ts b/src/models/GameServerCluster.ts index c71e18f..f81ebc5 100644 --- a/src/models/GameServerCluster.ts +++ b/src/models/GameServerCluster.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -63,10 +63,10 @@ export interface GameServerCluster { ownerId?: string; /** * - * @type {number} + * @type {string} * @memberof GameServerCluster */ - discordServerId?: number | null; + discordServerId?: string | null; /** * * @type {string} @@ -96,19 +96,13 @@ export interface GameServerCluster { * @type {Date} * @memberof GameServerCluster */ - createdAt?: Date; + created?: Date; /** * * @type {Date} * @memberof GameServerCluster */ - updatedAt?: Date | null; - /** - * - * @type {Date} - * @memberof GameServerCluster - */ - deletedAt?: Date | null; + updated?: Date | null; } /** @@ -141,9 +135,8 @@ export function GameServerClusterFromJSONTyped(json: any, ignoreDiscriminator: b 'tags': json['tags'] == null ? undefined : json['tags'], 'commentCount': json['comment_count'] == null ? undefined : json['comment_count'], 'serverCount': json['server_count'] == null ? undefined : json['server_count'], - 'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'deletedAt': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), + 'created': json['created'] == null ? undefined : (new Date(json['created'])), + 'updated': json['updated'] == null ? undefined : (new Date(json['updated'])), }; } @@ -170,9 +163,8 @@ export function GameServerClusterToJSONTyped(value?: GameServerCluster | null, i 'tags': value['tags'], 'comment_count': value['commentCount'], 'server_count': value['serverCount'], - 'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()), - 'updated_at': value['updatedAt'] == null ? undefined : ((value['updatedAt'] as any).toISOString()), - 'deleted_at': value['deletedAt'] == null ? undefined : ((value['deletedAt'] as any).toISOString()), + 'created': value['created'] == null ? undefined : ((value['created']).toISOString()), + 'updated': value['updated'] == null ? undefined : ((value['updated'] as any).toISOString()), }; } diff --git a/src/models/GameServerQuery.ts b/src/models/GameServerQuery.ts index ccc7364..1e4573a 100644 --- a/src/models/GameServerQuery.ts +++ b/src/models/GameServerQuery.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -74,7 +74,7 @@ export interface GameServerQuery { * @type {Date} * @memberof GameServerQuery */ - createdAt?: Date; + created?: Date; } @@ -103,7 +103,7 @@ export function GameServerQueryFromJSONTyped(json: any, ignoreDiscriminator: boo 'currentPlayers': json['current_players'] == null ? undefined : json['current_players'], 'maxPlayers': json['max_players'] == null ? undefined : json['max_players'], 'motd': json['motd'] == null ? undefined : json['motd'], - 'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])), + 'created': json['created'] == null ? undefined : (new Date(json['created'])), }; } @@ -125,7 +125,7 @@ export function GameServerQueryToJSONTyped(value?: GameServerQuery | null, ignor 'current_players': value['currentPlayers'], 'max_players': value['maxPlayers'], 'motd': value['motd'], - 'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()), + 'created': value['created'] == null ? undefined : ((value['created']).toISOString()), }; } diff --git a/src/models/GameServerStatus.ts b/src/models/GameServerStatus.ts index 2ab69b5..2e95cb0 100644 --- a/src/models/GameServerStatus.ts +++ b/src/models/GameServerStatus.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/models/GrantType.ts b/src/models/GrantType.ts index b8e6d83..7cdc36f 100644 --- a/src/models/GrantType.ts +++ b/src/models/GrantType.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/models/Group.ts b/src/models/Group.ts index 23831ed..26fa819 100644 --- a/src/models/Group.ts +++ b/src/models/Group.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -42,7 +42,7 @@ export interface Group { * @type {string} * @memberof Group */ - tag?: string | null; + tag: string | null; /** * * @type {string} @@ -108,19 +108,13 @@ export interface Group { * @type {Date} * @memberof Group */ - createdAt?: Date; + created?: Date; /** * * @type {Date} * @memberof Group */ - updatedAt?: Date | null; - /** - * - * @type {Date} - * @memberof Group - */ - deletedAt?: Date | null; + updated?: Date | null; } /** @@ -128,6 +122,7 @@ export interface Group { */ export function instanceOfGroup(value: object): value is Group { if (!('name' in value) || value['name'] === undefined) return false; + if (!('tag' in value) || value['tag'] === undefined) return false; return true; } @@ -144,7 +139,7 @@ export function GroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): Gro 'id': json['id'] == null ? undefined : json['id'], 'uuid': json['uuid'] == null ? undefined : json['uuid'], 'name': json['name'], - 'tag': json['tag'] == null ? undefined : json['tag'], + 'tag': json['tag'], 'description': json['description'] == null ? undefined : json['description'], 'type': json['type'] == null ? undefined : json['type'], 'privacy': json['privacy'] == null ? undefined : json['privacy'], @@ -155,9 +150,8 @@ export function GroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): Gro 'memberCount': json['member_count'] == null ? undefined : json['member_count'], 'followerCount': json['follower_count'] == null ? undefined : json['follower_count'], 'viewCount': json['view_count'] == null ? undefined : json['view_count'], - 'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'deletedAt': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), + 'created': json['created'] == null ? undefined : (new Date(json['created'])), + 'updated': json['updated'] == null ? undefined : (new Date(json['updated'])), }; } @@ -186,9 +180,8 @@ export function GroupToJSONTyped(value?: Group | null, ignoreDiscriminator: bool 'member_count': value['memberCount'], 'follower_count': value['followerCount'], 'view_count': value['viewCount'], - 'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()), - 'updated_at': value['updatedAt'] == null ? undefined : ((value['updatedAt'] as any).toISOString()), - 'deleted_at': value['deletedAt'] == null ? undefined : ((value['deletedAt'] as any).toISOString()), + 'created': value['created'] == null ? undefined : ((value['created']).toISOString()), + 'updated': value['updated'] == null ? undefined : ((value['updated'] as any).toISOString()), }; } diff --git a/src/models/GroupApplication.ts b/src/models/GroupGame.ts similarity index 71% rename from src/models/GroupApplication.ts rename to src/models/GroupGame.ts index 307e66c..158fbcb 100644 --- a/src/models/GroupApplication.ts +++ b/src/models/GroupGame.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -31,66 +31,66 @@ import { /** * * @export - * @interface GroupApplication + * @interface GroupGame */ -export interface GroupApplication { +export interface GroupGame { /** * * @type {string} - * @memberof GroupApplication + * @memberof GroupGame */ groupId: string; /** * * @type {Group} - * @memberof GroupApplication + * @memberof GroupGame */ group?: Group; /** * * @type {string} - * @memberof GroupApplication + * @memberof GroupGame */ applicationId?: string; /** * * @type {Application} - * @memberof GroupApplication + * @memberof GroupGame */ application?: Application; /** * * @type {any} - * @memberof GroupApplication + * @memberof GroupGame */ stats?: any | null; /** * * @type {Date} - * @memberof GroupApplication + * @memberof GroupGame */ acquired?: Date; /** * * @type {Date} - * @memberof GroupApplication + * @memberof GroupGame */ lastUsed?: Date | null; } /** - * Check if a given object implements the GroupApplication interface. + * Check if a given object implements the GroupGame interface. */ -export function instanceOfGroupApplication(value: object): value is GroupApplication { +export function instanceOfGroupGame(value: object): value is GroupGame { if (!('groupId' in value) || value['groupId'] === undefined) return false; return true; } -export function GroupApplicationFromJSON(json: any): GroupApplication { - return GroupApplicationFromJSONTyped(json, false); +export function GroupGameFromJSON(json: any): GroupGame { + return GroupGameFromJSONTyped(json, false); } -export function GroupApplicationFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupApplication { +export function GroupGameFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupGame { if (json == null) { return json; } @@ -106,11 +106,11 @@ export function GroupApplicationFromJSONTyped(json: any, ignoreDiscriminator: bo }; } -export function GroupApplicationToJSON(json: any): GroupApplication { - return GroupApplicationToJSONTyped(json, false); +export function GroupGameToJSON(json: any): GroupGame { + return GroupGameToJSONTyped(json, false); } -export function GroupApplicationToJSONTyped(value?: GroupApplication | null, ignoreDiscriminator: boolean = false): any { +export function GroupGameToJSONTyped(value?: GroupGame | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } diff --git a/src/models/GroupMember.ts b/src/models/GroupMember.ts index 0da09c7..3429c8f 100644 --- a/src/models/GroupMember.ts +++ b/src/models/GroupMember.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -33,6 +33,12 @@ export interface GroupMember { * @memberof GroupMember */ id?: string; + /** + * + * @type {string} + * @memberof GroupMember + */ + uuid?: string; /** * * @type {string} @@ -45,12 +51,24 @@ export interface GroupMember { * @memberof GroupMember */ displayName?: string | null; + /** + * + * @type {boolean} + * @memberof GroupMember + */ + verified?: boolean; /** * * @type {string} * @memberof GroupMember */ photoUrl?: string | null; + /** + * + * @type {Date} + * @memberof GroupMember + */ + lastOnline?: Date | null; /** * * @type {GroupRank} @@ -85,9 +103,12 @@ export function GroupMemberFromJSONTyped(json: any, ignoreDiscriminator: boolean return { 'id': json['id'] == null ? undefined : json['id'], + 'uuid': json['uuid'] == null ? undefined : json['uuid'], 'name': json['name'] == null ? undefined : json['name'], 'displayName': json['display_name'] == null ? undefined : json['display_name'], + 'verified': json['verified'] == null ? undefined : json['verified'], 'photoUrl': json['photo_url'] == null ? undefined : json['photo_url'], + 'lastOnline': json['last_online'] == null ? undefined : (new Date(json['last_online'])), 'rank': json['rank'] == null ? undefined : GroupRankFromJSON(json['rank']), 'since': json['since'] == null ? undefined : (new Date(json['since'])), }; @@ -105,9 +126,12 @@ export function GroupMemberToJSONTyped(value?: GroupMember | null, ignoreDiscrim return { 'id': value['id'], + 'uuid': value['uuid'], 'name': value['name'], 'display_name': value['displayName'], + 'verified': value['verified'], 'photo_url': value['photoUrl'], + 'last_online': value['lastOnline'] == null ? undefined : ((value['lastOnline'] as any).toISOString()), 'rank': GroupRankToJSON(value['rank']), 'since': value['since'] == null ? undefined : ((value['since']).toISOString()), }; diff --git a/src/models/GroupRank.ts b/src/models/GroupRank.ts index 600e50a..4aa4ce1 100644 --- a/src/models/GroupRank.ts +++ b/src/models/GroupRank.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/models/HashViewModel.ts b/src/models/HashViewModel.ts index 6c031ab..aa17a02 100644 --- a/src/models/HashViewModel.ts +++ b/src/models/HashViewModel.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/models/IdentityProviderType.ts b/src/models/IdentityProviderType.ts deleted file mode 100644 index 3041994..0000000 --- a/src/models/IdentityProviderType.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tribufu API - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** - * - * @export - */ -export const IdentityProviderType = { - Steam: 'steam', - Epic: 'epic', - Discord: 'discord', - Microsoft: 'microsoft', - Playstation: 'playstation', - Google: 'google', - Apple: 'apple' -} as const; -export type IdentityProviderType = typeof IdentityProviderType[keyof typeof IdentityProviderType]; - - -export function instanceOfIdentityProviderType(value: any): boolean { - for (const key in IdentityProviderType) { - if (Object.prototype.hasOwnProperty.call(IdentityProviderType, key)) { - if (IdentityProviderType[key as keyof typeof IdentityProviderType] === value) { - return true; - } - } - } - return false; -} - -export function IdentityProviderTypeFromJSON(json: any): IdentityProviderType { - return IdentityProviderTypeFromJSONTyped(json, false); -} - -export function IdentityProviderTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): IdentityProviderType { - return json as IdentityProviderType; -} - -export function IdentityProviderTypeToJSON(value?: IdentityProviderType | null): any { - return value as any; -} - -export function IdentityProviderTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): IdentityProviderType { - return value as IdentityProviderType; -} - diff --git a/src/models/IntrospectRequest.ts b/src/models/IntrospectRequest.ts index 9bba12c..6f196aa 100644 --- a/src/models/IntrospectRequest.ts +++ b/src/models/IntrospectRequest.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/models/IntrospectResponse.ts b/src/models/IntrospectResponse.ts index fb1e057..ac18095 100644 --- a/src/models/IntrospectResponse.ts +++ b/src/models/IntrospectResponse.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/models/IpAddress.ts b/src/models/IpAddress.ts index 7986a43..b6d0f50 100644 --- a/src/models/IpAddress.ts +++ b/src/models/IpAddress.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -43,12 +43,6 @@ export interface IpAddress { * @memberof IpAddress */ reserved?: boolean; - /** - * - * @type {boolean} - * @memberof IpAddress - */ - banned?: boolean; /** * * @type {string} @@ -78,7 +72,7 @@ export interface IpAddress { * @type {string} * @memberof IpAddress */ - province?: string | null; + region?: string | null; /** * * @type {string} @@ -156,12 +150,11 @@ export function IpAddressFromJSONTyped(json: any, ignoreDiscriminator: boolean): 'version': json['version'] == null ? undefined : json['version'], 'network': json['network'] == null ? undefined : json['network'], 'reserved': json['reserved'] == null ? undefined : json['reserved'], - 'banned': json['banned'] == null ? undefined : json['banned'], 'asn': json['asn'] == null ? undefined : json['asn'], 'isp': json['isp'] == null ? undefined : json['isp'], 'continent': json['continent'] == null ? undefined : json['continent'], 'country': json['country'] == null ? undefined : json['country'], - 'province': json['province'] == null ? undefined : json['province'], + 'region': json['region'] == null ? undefined : json['region'], 'city': json['city'] == null ? undefined : json['city'], 'postalCode': json['postal_code'] == null ? undefined : json['postal_code'], 'callingCode': json['calling_code'] == null ? undefined : json['calling_code'], @@ -189,12 +182,11 @@ export function IpAddressToJSONTyped(value?: IpAddress | null, ignoreDiscriminat 'version': value['version'], 'network': value['network'], 'reserved': value['reserved'], - 'banned': value['banned'], 'asn': value['asn'], 'isp': value['isp'], 'continent': value['continent'], 'country': value['country'], - 'province': value['province'], + 'region': value['region'], 'city': value['city'], 'postal_code': value['postalCode'], 'calling_code': value['callingCode'], diff --git a/src/models/LeaderboardItem.ts b/src/models/LeaderboardItem.ts index 87dd307..f76ada5 100644 --- a/src/models/LeaderboardItem.ts +++ b/src/models/LeaderboardItem.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/models/LeaderboardOrder.ts b/src/models/LeaderboardOrder.ts index 3d07b2c..e81514d 100644 --- a/src/models/LeaderboardOrder.ts +++ b/src/models/LeaderboardOrder.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/models/LoginProvider.ts b/src/models/LoginProvider.ts new file mode 100644 index 0000000..e0155e4 --- /dev/null +++ b/src/models/LoginProvider.ts @@ -0,0 +1,58 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Tribufu API + * API to access Tribufu services. + * + * The version of the OpenAPI document: 1.2.0 + * Contact: contact@tribufu.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const LoginProvider = { + Steam: 'steam', + Epic: 'epic', + Discord: 'discord', + Microsoft: 'microsoft', + Playstation: 'playstation', + Google: 'google', + Apple: 'apple' +} as const; +export type LoginProvider = typeof LoginProvider[keyof typeof LoginProvider]; + + +export function instanceOfLoginProvider(value: any): boolean { + for (const key in LoginProvider) { + if (Object.prototype.hasOwnProperty.call(LoginProvider, key)) { + if (LoginProvider[key as keyof typeof LoginProvider] === value) { + return true; + } + } + } + return false; +} + +export function LoginProviderFromJSON(json: any): LoginProvider { + return LoginProviderFromJSONTyped(json, false); +} + +export function LoginProviderFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoginProvider { + return json as LoginProvider; +} + +export function LoginProviderToJSON(value?: LoginProvider | null): any { + return value as any; +} + +export function LoginProviderToJSONTyped(value: any, ignoreDiscriminator: boolean): LoginProvider { + return value as LoginProvider; +} + diff --git a/src/models/LoginRequest.ts b/src/models/LoginRequest.ts new file mode 100644 index 0000000..f31d6fb --- /dev/null +++ b/src/models/LoginRequest.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Tribufu API + * REST API to access Tribufu services. + * + * The version of the OpenAPI document: 1.1.0 + * Contact: contact@tribufu.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface LoginRequest + */ +export interface LoginRequest { + /** + * + * @type {string} + * @memberof LoginRequest + */ + login?: string | null; + /** + * + * @type {string} + * @memberof LoginRequest + */ + password?: string | null; +} + +/** + * Check if a given object implements the LoginRequest interface. + */ +export function instanceOfLoginRequest(value: object): value is LoginRequest { + return true; +} + +export function LoginRequestFromJSON(json: any): LoginRequest { + return LoginRequestFromJSONTyped(json, false); +} + +export function LoginRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoginRequest { + if (json == null) { + return json; + } + return { + + 'login': json['login'] == null ? undefined : json['login'], + 'password': json['password'] == null ? undefined : json['password'], + }; +} + +export function LoginRequestToJSON(json: any): LoginRequest { + return LoginRequestToJSONTyped(json, false); +} + +export function LoginRequestToJSONTyped(value?: LoginRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'login': value['login'], + 'password': value['password'], + }; +} + diff --git a/src/models/LoginResponse.ts b/src/models/LoginResponse.ts new file mode 100644 index 0000000..8df74b8 --- /dev/null +++ b/src/models/LoginResponse.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Tribufu API + * REST API to access Tribufu services. + * + * The version of the OpenAPI document: 1.1.0 + * Contact: contact@tribufu.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { UserInfo } from './UserInfo'; +import { + UserInfoFromJSON, + UserInfoFromJSONTyped, + UserInfoToJSON, + UserInfoToJSONTyped, +} from './UserInfo'; + +/** + * + * @export + * @interface LoginResponse + */ +export interface LoginResponse { + /** + * + * @type {UserInfo} + * @memberof LoginResponse + */ + user?: UserInfo; + /** + * + * @type {string} + * @memberof LoginResponse + */ + accessToken?: string | null; + /** + * + * @type {string} + * @memberof LoginResponse + */ + refreshToken?: string | null; + /** + * + * @type {number} + * @memberof LoginResponse + */ + expiresIn?: number; +} + +/** + * Check if a given object implements the LoginResponse interface. + */ +export function instanceOfLoginResponse(value: object): value is LoginResponse { + return true; +} + +export function LoginResponseFromJSON(json: any): LoginResponse { + return LoginResponseFromJSONTyped(json, false); +} + +export function LoginResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoginResponse { + if (json == null) { + return json; + } + return { + + 'user': json['user'] == null ? undefined : UserInfoFromJSON(json['user']), + 'accessToken': json['access_token'] == null ? undefined : json['access_token'], + 'refreshToken': json['refresh_token'] == null ? undefined : json['refresh_token'], + 'expiresIn': json['expires_in'] == null ? undefined : json['expires_in'], + }; +} + +export function LoginResponseToJSON(json: any): LoginResponse { + return LoginResponseToJSONTyped(json, false); +} + +export function LoginResponseToJSONTyped(value?: LoginResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': UserInfoToJSON(value['user']), + 'access_token': value['accessToken'], + 'refresh_token': value['refreshToken'], + 'expires_in': value['expiresIn'], + }; +} + diff --git a/src/models/StorageFile.ts b/src/models/ModelFile.ts similarity index 53% rename from src/models/StorageFile.ts rename to src/models/ModelFile.ts index 135d113..55d9efc 100644 --- a/src/models/StorageFile.ts +++ b/src/models/ModelFile.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,86 +16,80 @@ import { mapValues } from '../runtime'; /** * * @export - * @interface StorageFile + * @interface ModelFile */ -export interface StorageFile { +export interface ModelFile { /** * * @type {string} - * @memberof StorageFile + * @memberof ModelFile */ id?: string; /** * * @type {string} - * @memberof StorageFile + * @memberof ModelFile */ name: string | null; /** * * @type {string} - * @memberof StorageFile + * @memberof ModelFile */ contentType: string | null; /** * * @type {string} - * @memberof StorageFile + * @memberof ModelFile */ url: string | null; - /** - * - * @type {number} - * @memberof StorageFile - */ - size?: number; /** * * @type {string} - * @memberof StorageFile + * @memberof ModelFile */ hash?: string | null; /** * * @type {string} - * @memberof StorageFile + * @memberof ModelFile */ etag?: string | null; /** * - * @type {Date} - * @memberof StorageFile + * @type {number} + * @memberof ModelFile */ - createdAt?: Date; + size?: number; /** * * @type {Date} - * @memberof StorageFile + * @memberof ModelFile */ - updatedAt?: Date | null; + created?: Date; /** * * @type {Date} - * @memberof StorageFile + * @memberof ModelFile */ - deletedAt?: Date | null; + updated?: Date | null; } /** - * Check if a given object implements the StorageFile interface. + * Check if a given object implements the ModelFile interface. */ -export function instanceOfStorageFile(value: object): value is StorageFile { +export function instanceOfModelFile(value: object): value is ModelFile { if (!('name' in value) || value['name'] === undefined) return false; if (!('contentType' in value) || value['contentType'] === undefined) return false; if (!('url' in value) || value['url'] === undefined) return false; return true; } -export function StorageFileFromJSON(json: any): StorageFile { - return StorageFileFromJSONTyped(json, false); +export function ModelFileFromJSON(json: any): ModelFile { + return ModelFileFromJSONTyped(json, false); } -export function StorageFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): StorageFile { +export function ModelFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelFile { if (json == null) { return json; } @@ -105,20 +99,19 @@ export function StorageFileFromJSONTyped(json: any, ignoreDiscriminator: boolean 'name': json['name'], 'contentType': json['content_type'], 'url': json['url'], - 'size': json['size'] == null ? undefined : json['size'], 'hash': json['hash'] == null ? undefined : json['hash'], 'etag': json['etag'] == null ? undefined : json['etag'], - 'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'deletedAt': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), + 'size': json['size'] == null ? undefined : json['size'], + 'created': json['created'] == null ? undefined : (new Date(json['created'])), + 'updated': json['updated'] == null ? undefined : (new Date(json['updated'])), }; } -export function StorageFileToJSON(json: any): StorageFile { - return StorageFileToJSONTyped(json, false); +export function ModelFileToJSON(json: any): ModelFile { + return ModelFileToJSONTyped(json, false); } -export function StorageFileToJSONTyped(value?: StorageFile | null, ignoreDiscriminator: boolean = false): any { +export function ModelFileToJSONTyped(value?: ModelFile | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } @@ -129,12 +122,11 @@ export function StorageFileToJSONTyped(value?: StorageFile | null, ignoreDiscrim 'name': value['name'], 'content_type': value['contentType'], 'url': value['url'], - 'size': value['size'], 'hash': value['hash'], 'etag': value['etag'], - 'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()), - 'updated_at': value['updatedAt'] == null ? undefined : ((value['updatedAt'] as any).toISOString()), - 'deleted_at': value['deletedAt'] == null ? undefined : ((value['deletedAt'] as any).toISOString()), + 'size': value['size'], + 'created': value['created'] == null ? undefined : ((value['created']).toISOString()), + 'updated': value['updated'] == null ? undefined : ((value['updated'] as any).toISOString()), }; } diff --git a/src/models/Package.ts b/src/models/Package.ts index 4d41353..33c9894 100644 --- a/src/models/Package.ts +++ b/src/models/Package.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -62,13 +62,7 @@ export interface Package { * @type {string} * @memberof Package */ - applicationId?: string; - /** - * - * @type {string} - * @memberof Package - */ - categoryId?: string; + applicationId?: string | null; /** * * @type {number} @@ -92,19 +86,13 @@ export interface Package { * @type {Date} * @memberof Package */ - createdAt?: Date; + created?: Date; /** * * @type {Date} * @memberof Package */ - updatedAt?: Date | null; - /** - * - * @type {Date} - * @memberof Package - */ - deletedAt?: Date | null; + updated?: Date | null; } /** @@ -132,13 +120,11 @@ export function PackageFromJSONTyped(json: any, ignoreDiscriminator: boolean): P 'authorId': json['author_id'] == null ? undefined : json['author_id'], 'imageUrl': json['image_url'], 'applicationId': json['application_id'] == null ? undefined : json['application_id'], - 'categoryId': json['category_id'] == null ? undefined : json['category_id'], 'downloadCount': json['download_count'] == null ? undefined : json['download_count'], 'lastDownload': json['last_download'] == null ? undefined : (new Date(json['last_download'])), 'releases': json['releases'] == null ? undefined : ((json['releases'] as Array).map(PackageReleaseFromJSON)), - 'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'deletedAt': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), + 'created': json['created'] == null ? undefined : (new Date(json['created'])), + 'updated': json['updated'] == null ? undefined : (new Date(json['updated'])), }; } @@ -159,13 +145,11 @@ export function PackageToJSONTyped(value?: Package | null, ignoreDiscriminator: 'author_id': value['authorId'], 'image_url': value['imageUrl'], 'application_id': value['applicationId'], - 'category_id': value['categoryId'], 'download_count': value['downloadCount'], 'last_download': value['lastDownload'] == null ? undefined : ((value['lastDownload'] as any).toISOString()), 'releases': value['releases'] == null ? undefined : ((value['releases'] as Array).map(PackageReleaseToJSON)), - 'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()), - 'updated_at': value['updatedAt'] == null ? undefined : ((value['updatedAt'] as any).toISOString()), - 'deleted_at': value['deletedAt'] == null ? undefined : ((value['deletedAt'] as any).toISOString()), + 'created': value['created'] == null ? undefined : ((value['created']).toISOString()), + 'updated': value['updated'] == null ? undefined : ((value['updated'] as any).toISOString()), }; } diff --git a/src/models/PackageRelease.ts b/src/models/PackageRelease.ts index a1cb97a..acf3c1d 100644 --- a/src/models/PackageRelease.ts +++ b/src/models/PackageRelease.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,14 +13,6 @@ */ import { mapValues } from '../runtime'; -import type { StorageFile } from './StorageFile'; -import { - StorageFileFromJSON, - StorageFileFromJSONTyped, - StorageFileToJSON, - StorageFileToJSONTyped, -} from './StorageFile'; - /** * * @export @@ -53,28 +45,22 @@ export interface PackageRelease { notes?: string | null; /** * - * @type {Array} + * @type {Array} * @memberof PackageRelease */ - readonly files?: Array | null; + readonly files?: Array | null; /** * * @type {Date} * @memberof PackageRelease */ - createdAt?: Date; + created?: Date; /** * * @type {Date} * @memberof PackageRelease */ - updatedAt?: Date | null; - /** - * - * @type {Date} - * @memberof PackageRelease - */ - deletedAt?: Date | null; + updated?: Date | null; } /** @@ -99,10 +85,9 @@ export function PackageReleaseFromJSONTyped(json: any, ignoreDiscriminator: bool 'version': json['version'], 'packageId': json['package_id'] == null ? undefined : json['package_id'], 'notes': json['notes'] == null ? undefined : json['notes'], - 'files': json['files'] == null ? undefined : ((json['files'] as Array).map(StorageFileFromJSON)), - 'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'deletedAt': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), + 'files': json['files'] == null ? undefined : json['files'], + 'created': json['created'] == null ? undefined : (new Date(json['created'])), + 'updated': json['updated'] == null ? undefined : (new Date(json['updated'])), }; } @@ -121,9 +106,8 @@ export function PackageReleaseToJSONTyped(value?: Omit 'version': value['version'], 'package_id': value['packageId'], 'notes': value['notes'], - 'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()), - 'updated_at': value['updatedAt'] == null ? undefined : ((value['updatedAt'] as any).toISOString()), - 'deleted_at': value['deletedAt'] == null ? undefined : ((value['deletedAt'] as any).toISOString()), + 'created': value['created'] == null ? undefined : ((value['created']).toISOString()), + 'updated': value['updated'] == null ? undefined : ((value['updated'] as any).toISOString()), }; } diff --git a/src/models/Product.ts b/src/models/Product.ts deleted file mode 100644 index 53f7350..0000000 --- a/src/models/Product.ts +++ /dev/null @@ -1,163 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tribufu API - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { ProductType } from './ProductType'; -import { - ProductTypeFromJSON, - ProductTypeFromJSONTyped, - ProductTypeToJSON, - ProductTypeToJSONTyped, -} from './ProductType'; -import type { ProductPrice } from './ProductPrice'; -import { - ProductPriceFromJSON, - ProductPriceFromJSONTyped, - ProductPriceToJSON, - ProductPriceToJSONTyped, -} from './ProductPrice'; - -/** - * - * @export - * @interface Product - */ -export interface Product { - /** - * - * @type {string} - * @memberof Product - */ - id?: string; - /** - * - * @type {string} - * @memberof Product - */ - name: string | null; - /** - * - * @type {string} - * @memberof Product - */ - sku?: string | null; - /** - * - * @type {string} - * @memberof Product - */ - description?: string | null; - /** - * - * @type {ProductType} - * @memberof Product - */ - type?: ProductType; - /** - * - * @type {string} - * @memberof Product - */ - slug?: string | null; - /** - * - * @type {string} - * @memberof Product - */ - imageUrl?: string | null; - /** - * - * @type {Array} - * @memberof Product - */ - prices?: Array | null; - /** - * - * @type {Date} - * @memberof Product - */ - createdAt?: Date; - /** - * - * @type {Date} - * @memberof Product - */ - updatedAt?: Date | null; - /** - * - * @type {Date} - * @memberof Product - */ - deletedAt?: Date | null; -} - - - -/** - * Check if a given object implements the Product interface. - */ -export function instanceOfProduct(value: object): value is Product { - if (!('name' in value) || value['name'] === undefined) return false; - return true; -} - -export function ProductFromJSON(json: any): Product { - return ProductFromJSONTyped(json, false); -} - -export function ProductFromJSONTyped(json: any, ignoreDiscriminator: boolean): Product { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'name': json['name'], - 'sku': json['sku'] == null ? undefined : json['sku'], - 'description': json['description'] == null ? undefined : json['description'], - 'type': json['type'] == null ? undefined : ProductTypeFromJSON(json['type']), - 'slug': json['slug'] == null ? undefined : json['slug'], - 'imageUrl': json['image_url'] == null ? undefined : json['image_url'], - 'prices': json['prices'] == null ? undefined : ((json['prices'] as Array).map(ProductPriceFromJSON)), - 'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'deletedAt': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), - }; -} - -export function ProductToJSON(json: any): Product { - return ProductToJSONTyped(json, false); -} - -export function ProductToJSONTyped(value?: Product | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'id': value['id'], - 'name': value['name'], - 'sku': value['sku'], - 'description': value['description'], - 'type': ProductTypeToJSON(value['type']), - 'slug': value['slug'], - 'image_url': value['imageUrl'], - 'prices': value['prices'] == null ? undefined : ((value['prices'] as Array).map(ProductPriceToJSON)), - 'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()), - 'updated_at': value['updatedAt'] == null ? undefined : ((value['updatedAt'] as any).toISOString()), - 'deleted_at': value['deletedAt'] == null ? undefined : ((value['deletedAt'] as any).toISOString()), - }; -} - diff --git a/src/models/ProductType.ts b/src/models/ProductType.ts deleted file mode 100644 index cbeff65..0000000 --- a/src/models/ProductType.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tribufu API - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** - * - * @export - */ -export const ProductType = { - Product: 'product', - Subscription: 'subscription' -} as const; -export type ProductType = typeof ProductType[keyof typeof ProductType]; - - -export function instanceOfProductType(value: any): boolean { - for (const key in ProductType) { - if (Object.prototype.hasOwnProperty.call(ProductType, key)) { - if (ProductType[key as keyof typeof ProductType] === value) { - return true; - } - } - } - return false; -} - -export function ProductTypeFromJSON(json: any): ProductType { - return ProductTypeFromJSONTyped(json, false); -} - -export function ProductTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductType { - return json as ProductType; -} - -export function ProductTypeToJSON(value?: ProductType | null): any { - return value as any; -} - -export function ProductTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): ProductType { - return value as ProductType; -} - diff --git a/src/models/Profile.ts b/src/models/Profile.ts index 9bb9051..bff6a41 100644 --- a/src/models/Profile.ts +++ b/src/models/Profile.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -24,79 +24,109 @@ export interface Profile { * @type {string} * @memberof Profile */ - readonly id?: string; + id?: string; /** * * @type {string} * @memberof Profile */ - readonly name?: string | null; + uuid?: string; /** * * @type {string} * @memberof Profile */ - readonly displayName?: string | null; + name?: string | null; + /** + * + * @type {string} + * @memberof Profile + */ + displayName?: string | null; + /** + * + * @type {boolean} + * @memberof Profile + */ + verified?: boolean; /** * * @type {number} * @memberof Profile */ - readonly level?: number; + level?: number; /** * * @type {number} * @memberof Profile */ - readonly experience?: number; + experience?: number; + /** + * + * @type {boolean} + * @memberof Profile + */ + publicBirthday?: boolean; /** * * @type {Date} * @memberof Profile */ - readonly birthday?: Date | null; + birthday?: Date | null; /** * * @type {number} * @memberof Profile */ - readonly points?: number; + points?: number; /** * * @type {string} * @memberof Profile */ - readonly photoUrl?: string | null; + location?: string | null; /** * * @type {string} * @memberof Profile */ - readonly bannerUrl?: string | null; - /** - * - * @type {Date} - * @memberof Profile - */ - readonly lastOnline?: Date | null; + photoUrl?: string | null; /** * * @type {string} * @memberof Profile */ - readonly biography?: string | null; + bannerUrl?: string | null; /** * * @type {Date} * @memberof Profile */ - readonly createdAt?: Date; + lastOnline?: Date | null; + /** + * + * @type {string} + * @memberof Profile + */ + biography?: string | null; + /** + * + * @type {number} + * @memberof Profile + */ + viewCount?: number; /** * * @type {Date} * @memberof Profile */ - readonly updatedAt?: Date | null; + created?: Date; + /** + * + * @type {Date} + * @memberof Profile + */ + updated?: Date | null; } /** @@ -117,18 +147,23 @@ export function ProfileFromJSONTyped(json: any, ignoreDiscriminator: boolean): P return { 'id': json['id'] == null ? undefined : json['id'], + 'uuid': json['uuid'] == null ? undefined : json['uuid'], 'name': json['name'] == null ? undefined : json['name'], 'displayName': json['display_name'] == null ? undefined : json['display_name'], + 'verified': json['verified'] == null ? undefined : json['verified'], 'level': json['level'] == null ? undefined : json['level'], 'experience': json['experience'] == null ? undefined : json['experience'], + 'publicBirthday': json['public_birthday'] == null ? undefined : json['public_birthday'], 'birthday': json['birthday'] == null ? undefined : (new Date(json['birthday'])), 'points': json['points'] == null ? undefined : json['points'], + 'location': json['location'] == null ? undefined : json['location'], 'photoUrl': json['photo_url'] == null ? undefined : json['photo_url'], 'bannerUrl': json['banner_url'] == null ? undefined : json['banner_url'], 'lastOnline': json['last_online'] == null ? undefined : (new Date(json['last_online'])), 'biography': json['biography'] == null ? undefined : json['biography'], - 'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), + 'viewCount': json['view_count'] == null ? undefined : json['view_count'], + 'created': json['created'] == null ? undefined : (new Date(json['created'])), + 'updated': json['updated'] == null ? undefined : (new Date(json['updated'])), }; } @@ -136,13 +171,31 @@ export function ProfileToJSON(json: any): Profile { return ProfileToJSONTyped(json, false); } -export function ProfileToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { +export function ProfileToJSONTyped(value?: Profile | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { + 'id': value['id'], + 'uuid': value['uuid'], + 'name': value['name'], + 'display_name': value['displayName'], + 'verified': value['verified'], + 'level': value['level'], + 'experience': value['experience'], + 'public_birthday': value['publicBirthday'], + 'birthday': value['birthday'] == null ? undefined : ((value['birthday'] as any).toISOString().substring(0,10)), + 'points': value['points'], + 'location': value['location'], + 'photo_url': value['photoUrl'], + 'banner_url': value['bannerUrl'], + 'last_online': value['lastOnline'] == null ? undefined : ((value['lastOnline'] as any).toISOString()), + 'biography': value['biography'], + 'view_count': value['viewCount'], + 'created': value['created'] == null ? undefined : ((value['created']).toISOString()), + 'updated': value['updated'] == null ? undefined : ((value['updated'] as any).toISOString()), }; } diff --git a/src/models/ProfileGame.ts b/src/models/ProfileGame.ts index 0779557..f1e1314 100644 --- a/src/models/ProfileGame.ts +++ b/src/models/ProfileGame.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/models/ProfileGroup.ts b/src/models/ProfileGroup.ts index 8d1a9e5..6aecfca 100644 --- a/src/models/ProfileGroup.ts +++ b/src/models/ProfileGroup.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/models/RefreshRequest.ts b/src/models/RefreshRequest.ts new file mode 100644 index 0000000..b9bf712 --- /dev/null +++ b/src/models/RefreshRequest.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Tribufu API + * REST API to access Tribufu services. + * + * The version of the OpenAPI document: 1.1.0 + * Contact: contact@tribufu.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface RefreshRequest + */ +export interface RefreshRequest { + /** + * + * @type {string} + * @memberof RefreshRequest + */ + refreshToken?: string | null; +} + +/** + * Check if a given object implements the RefreshRequest interface. + */ +export function instanceOfRefreshRequest(value: object): value is RefreshRequest { + return true; +} + +export function RefreshRequestFromJSON(json: any): RefreshRequest { + return RefreshRequestFromJSONTyped(json, false); +} + +export function RefreshRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RefreshRequest { + if (json == null) { + return json; + } + return { + + 'refreshToken': json['refresh_token'] == null ? undefined : json['refresh_token'], + }; +} + +export function RefreshRequestToJSON(json: any): RefreshRequest { + return RefreshRequestToJSONTyped(json, false); +} + +export function RefreshRequestToJSONTyped(value?: RefreshRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'refresh_token': value['refreshToken'], + }; +} + diff --git a/src/models/RegisterRequest.ts b/src/models/RegisterRequest.ts new file mode 100644 index 0000000..d279186 --- /dev/null +++ b/src/models/RegisterRequest.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Tribufu API + * REST API to access Tribufu services. + * + * The version of the OpenAPI document: 1.1.0 + * Contact: contact@tribufu.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface RegisterRequest + */ +export interface RegisterRequest { + /** + * + * @type {string} + * @memberof RegisterRequest + */ + uuid?: string | null; + /** + * + * @type {string} + * @memberof RegisterRequest + */ + name: string; + /** + * + * @type {string} + * @memberof RegisterRequest + */ + email?: string | null; + /** + * + * @type {string} + * @memberof RegisterRequest + */ + password: string; +} + +/** + * Check if a given object implements the RegisterRequest interface. + */ +export function instanceOfRegisterRequest(value: object): value is RegisterRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('password' in value) || value['password'] === undefined) return false; + return true; +} + +export function RegisterRequestFromJSON(json: any): RegisterRequest { + return RegisterRequestFromJSONTyped(json, false); +} + +export function RegisterRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RegisterRequest { + if (json == null) { + return json; + } + return { + + 'uuid': json['uuid'] == null ? undefined : json['uuid'], + 'name': json['name'], + 'email': json['email'] == null ? undefined : json['email'], + 'password': json['password'], + }; +} + +export function RegisterRequestToJSON(json: any): RegisterRequest { + return RegisterRequestToJSONTyped(json, false); +} + +export function RegisterRequestToJSONTyped(value?: RegisterRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'uuid': value['uuid'], + 'name': value['name'], + 'email': value['email'], + 'password': value['password'], + }; +} + diff --git a/src/models/ResponseType.ts b/src/models/ResponseType.ts index e57d21d..cb01bc4 100644 --- a/src/models/ResponseType.ts +++ b/src/models/ResponseType.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/models/RevokeRequest.ts b/src/models/RevokeRequest.ts index 7c37a5b..fc5b0f9 100644 --- a/src/models/RevokeRequest.ts +++ b/src/models/RevokeRequest.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/models/Search.ts b/src/models/Search.ts index a41c45d..48050e6 100644 --- a/src/models/Search.ts +++ b/src/models/Search.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -50,7 +50,7 @@ export interface Search { * @type {string} * @memberof Search */ - gameId?: string; + gameId?: string | null; } diff --git a/src/models/SearchRequest.ts b/src/models/SearchRequest.ts new file mode 100644 index 0000000..6722f75 --- /dev/null +++ b/src/models/SearchRequest.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Tribufu API + * REST API to access Tribufu services. + * + * The version of the OpenAPI document: 1.1.0 + * Contact: contact@tribufu.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SearchType } from './SearchType'; +import { + SearchTypeFromJSON, + SearchTypeFromJSONTyped, + SearchTypeToJSON, + SearchTypeToJSONTyped, +} from './SearchType'; + +/** + * + * @export + * @interface SearchRequest + */ +export interface SearchRequest { + /** + * + * @type {SearchType} + * @memberof SearchRequest + */ + type?: SearchType; + /** + * + * @type {string} + * @memberof SearchRequest + */ + query?: string | null; + /** + * + * @type {number} + * @memberof SearchRequest + */ + page?: number | null; + /** + * + * @type {string} + * @memberof SearchRequest + */ + gameId?: string | null; +} + + + +/** + * Check if a given object implements the SearchRequest interface. + */ +export function instanceOfSearchRequest(value: object): value is SearchRequest { + return true; +} + +export function SearchRequestFromJSON(json: any): SearchRequest { + return SearchRequestFromJSONTyped(json, false); +} + +export function SearchRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchRequest { + if (json == null) { + return json; + } + return { + + 'type': json['type'] == null ? undefined : SearchTypeFromJSON(json['type']), + 'query': json['query'] == null ? undefined : json['query'], + 'page': json['page'] == null ? undefined : json['page'], + 'gameId': json['game_id'] == null ? undefined : json['game_id'], + }; +} + +export function SearchRequestToJSON(json: any): SearchRequest { + return SearchRequestToJSONTyped(json, false); +} + +export function SearchRequestToJSONTyped(value?: SearchRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'type': SearchTypeToJSON(value['type']), + 'query': value['query'], + 'page': value['page'], + 'game_id': value['gameId'], + }; +} + diff --git a/src/models/SearchType.ts b/src/models/SearchType.ts index 4be932b..fafb722 100644 --- a/src/models/SearchType.ts +++ b/src/models/SearchType.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/models/ServerMetrics.ts b/src/models/ServerMetrics.ts index b3504b1..5c15962 100644 --- a/src/models/ServerMetrics.ts +++ b/src/models/ServerMetrics.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/models/ServerStatus.ts b/src/models/ServerStatus.ts new file mode 100644 index 0000000..2723f95 --- /dev/null +++ b/src/models/ServerStatus.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Tribufu API + * REST API to access Tribufu services. + * + * The version of the OpenAPI document: 1.1.0 + * Contact: contact@tribufu.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const ServerStatus = { + Unknown: 'unknown', + Offline: 'offline', + Online: 'online' +} as const; +export type ServerStatus = typeof ServerStatus[keyof typeof ServerStatus]; + + +export function instanceOfServerStatus(value: any): boolean { + for (const key in ServerStatus) { + if (Object.prototype.hasOwnProperty.call(ServerStatus, key)) { + if (ServerStatus[key as keyof typeof ServerStatus] === value) { + return true; + } + } + } + return false; +} + +export function ServerStatusFromJSON(json: any): ServerStatus { + return ServerStatusFromJSONTyped(json, false); +} + +export function ServerStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServerStatus { + return json as ServerStatus; +} + +export function ServerStatusToJSON(value?: ServerStatus | null): any { + return value as any; +} + +export function ServerStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): ServerStatus { + return value as ServerStatus; +} + diff --git a/src/models/Subscription.ts b/src/models/Subscription.ts new file mode 100644 index 0000000..f106a54 --- /dev/null +++ b/src/models/Subscription.ts @@ -0,0 +1,122 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Tribufu API + * API to access Tribufu services. + * + * The version of the OpenAPI document: 1.2.0 + * Contact: contact@tribufu.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SubscriptionPrice } from './SubscriptionPrice'; +import { + SubscriptionPriceFromJSON, + SubscriptionPriceFromJSONTyped, + SubscriptionPriceToJSON, + SubscriptionPriceToJSONTyped, +} from './SubscriptionPrice'; + +/** + * + * @export + * @interface Subscription + */ +export interface Subscription { + /** + * + * @type {string} + * @memberof Subscription + */ + id?: string; + /** + * + * @type {string} + * @memberof Subscription + */ + name: string | null; + /** + * + * @type {string} + * @memberof Subscription + */ + description?: string | null; + /** + * + * @type {string} + * @memberof Subscription + */ + imageUrl?: string | null; + /** + * + * @type {Array} + * @memberof Subscription + */ + prices?: Array | null; + /** + * + * @type {Date} + * @memberof Subscription + */ + created?: Date; + /** + * + * @type {Date} + * @memberof Subscription + */ + updated?: Date | null; +} + +/** + * Check if a given object implements the Subscription interface. + */ +export function instanceOfSubscription(value: object): value is Subscription { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function SubscriptionFromJSON(json: any): Subscription { + return SubscriptionFromJSONTyped(json, false); +} + +export function SubscriptionFromJSONTyped(json: any, ignoreDiscriminator: boolean): Subscription { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'name': json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'imageUrl': json['image_url'] == null ? undefined : json['image_url'], + 'prices': json['prices'] == null ? undefined : ((json['prices'] as Array).map(SubscriptionPriceFromJSON)), + 'created': json['created'] == null ? undefined : (new Date(json['created'])), + 'updated': json['updated'] == null ? undefined : (new Date(json['updated'])), + }; +} + +export function SubscriptionToJSON(json: any): Subscription { + return SubscriptionToJSONTyped(json, false); +} + +export function SubscriptionToJSONTyped(value?: Subscription | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + 'description': value['description'], + 'image_url': value['imageUrl'], + 'prices': value['prices'] == null ? undefined : ((value['prices'] as Array).map(SubscriptionPriceToJSON)), + 'created': value['created'] == null ? undefined : ((value['created']).toISOString()), + 'updated': value['updated'] == null ? undefined : ((value['updated'] as any).toISOString()), + }; +} + diff --git a/src/models/ProductPrice.ts b/src/models/SubscriptionPrice.ts similarity index 50% rename from src/models/ProductPrice.ts rename to src/models/SubscriptionPrice.ts index d8f01a0..9adff8c 100644 --- a/src/models/ProductPrice.ts +++ b/src/models/SubscriptionPrice.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,58 +16,59 @@ import { mapValues } from '../runtime'; /** * * @export - * @interface ProductPrice + * @interface SubscriptionPrice */ -export interface ProductPrice { +export interface SubscriptionPrice { /** * * @type {string} - * @memberof ProductPrice + * @memberof SubscriptionPrice */ currency: string | null; /** * * @type {number} - * @memberof ProductPrice + * @memberof SubscriptionPrice */ - price?: number; + amount: number; /** * * @type {number} - * @memberof ProductPrice + * @memberof SubscriptionPrice */ renewal?: number | null; } /** - * Check if a given object implements the ProductPrice interface. + * Check if a given object implements the SubscriptionPrice interface. */ -export function instanceOfProductPrice(value: object): value is ProductPrice { +export function instanceOfSubscriptionPrice(value: object): value is SubscriptionPrice { if (!('currency' in value) || value['currency'] === undefined) return false; + if (!('amount' in value) || value['amount'] === undefined) return false; return true; } -export function ProductPriceFromJSON(json: any): ProductPrice { - return ProductPriceFromJSONTyped(json, false); +export function SubscriptionPriceFromJSON(json: any): SubscriptionPrice { + return SubscriptionPriceFromJSONTyped(json, false); } -export function ProductPriceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductPrice { +export function SubscriptionPriceFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionPrice { if (json == null) { return json; } return { 'currency': json['currency'], - 'price': json['price'] == null ? undefined : json['price'], + 'amount': json['amount'], 'renewal': json['renewal'] == null ? undefined : json['renewal'], }; } -export function ProductPriceToJSON(json: any): ProductPrice { - return ProductPriceToJSONTyped(json, false); +export function SubscriptionPriceToJSON(json: any): SubscriptionPrice { + return SubscriptionPriceToJSONTyped(json, false); } -export function ProductPriceToJSONTyped(value?: ProductPrice | null, ignoreDiscriminator: boolean = false): any { +export function SubscriptionPriceToJSONTyped(value?: SubscriptionPrice | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } @@ -75,7 +76,7 @@ export function ProductPriceToJSONTyped(value?: ProductPrice | null, ignoreDiscr return { 'currency': value['currency'], - 'price': value['price'], + 'amount': value['amount'], 'renewal': value['renewal'], }; } diff --git a/src/models/TokenHintType.ts b/src/models/TokenHintType.ts index 8136152..21d88a3 100644 --- a/src/models/TokenHintType.ts +++ b/src/models/TokenHintType.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/models/TokenRequest.ts b/src/models/TokenRequest.ts index 6d10d12..cbbd78c 100644 --- a/src/models/TokenRequest.ts +++ b/src/models/TokenRequest.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/models/TokenResponse.ts b/src/models/TokenResponse.ts index c2b0035..73658e8 100644 --- a/src/models/TokenResponse.ts +++ b/src/models/TokenResponse.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/models/TokenType.ts b/src/models/TokenType.ts index 261d235..bc47115 100644 --- a/src/models/TokenType.ts +++ b/src/models/TokenType.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/models/UpdateProfile.ts b/src/models/UpdateProfile.ts index e0ec4b5..e26b495 100644 --- a/src/models/UpdateProfile.ts +++ b/src/models/UpdateProfile.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/models/UserInfo.ts b/src/models/UserInfo.ts index d69933d..af1fcf2 100644 --- a/src/models/UserInfo.ts +++ b/src/models/UserInfo.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -33,6 +33,12 @@ export interface UserInfo { * @memberof UserInfo */ id?: string; + /** + * + * @type {string} + * @memberof UserInfo + */ + uuid?: string; /** * * @type {string} @@ -50,7 +56,7 @@ export interface UserInfo { * @type {string} * @memberof UserInfo */ - emailAddress?: string | null; + email?: string | null; /** * * @type {boolean} @@ -98,13 +104,13 @@ export interface UserInfo { * @type {Date} * @memberof UserInfo */ - createdAt?: Date; + created?: Date; /** * * @type {Date} * @memberof UserInfo */ - updatedAt?: Date | null; + updated?: Date | null; } @@ -128,9 +134,10 @@ export function UserInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): return { 'id': json['id'] == null ? undefined : json['id'], + 'uuid': json['uuid'] == null ? undefined : json['uuid'], 'name': json['name'], 'displayName': json['display_name'] == null ? undefined : json['display_name'], - 'emailAddress': json['email_address'] == null ? undefined : json['email_address'], + 'email': json['email'] == null ? undefined : json['email'], 'emailVerified': json['email_verified'] == null ? undefined : json['email_verified'], 'type': json['type'] == null ? undefined : UserTypeFromJSON(json['type']), 'language': json['language'] == null ? undefined : json['language'], @@ -138,8 +145,8 @@ export function UserInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): 'currency': json['currency'] == null ? undefined : json['currency'], 'photoUrl': json['photo_url'] == null ? undefined : json['photo_url'], 'permissions': json['permissions'] == null ? undefined : json['permissions'], - 'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), + 'created': json['created'] == null ? undefined : (new Date(json['created'])), + 'updated': json['updated'] == null ? undefined : (new Date(json['updated'])), }; } @@ -155,9 +162,10 @@ export function UserInfoToJSONTyped(value?: UserInfo | null, ignoreDiscriminator return { 'id': value['id'], + 'uuid': value['uuid'], 'name': value['name'], 'display_name': value['displayName'], - 'email_address': value['emailAddress'], + 'email': value['email'], 'email_verified': value['emailVerified'], 'type': UserTypeToJSON(value['type']), 'language': value['language'], @@ -165,8 +173,8 @@ export function UserInfoToJSONTyped(value?: UserInfo | null, ignoreDiscriminator 'currency': value['currency'], 'photo_url': value['photoUrl'], 'permissions': value['permissions'], - 'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()), - 'updated_at': value['updatedAt'] == null ? undefined : ((value['updatedAt'] as any).toISOString()), + 'created': value['created'] == null ? undefined : ((value['created']).toISOString()), + 'updated': value['updated'] == null ? undefined : ((value['updated'] as any).toISOString()), }; } diff --git a/src/models/UserType.ts b/src/models/UserType.ts index 094d362..1b08914 100644 --- a/src/models/UserType.ts +++ b/src/models/UserType.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/models/index.ts b/src/models/index.ts index f59d54f..52211de 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -1,5 +1,6 @@ /* tslint:disable */ /* eslint-disable */ +export * from './Account'; export * from './Application'; export * from './ApplicationType'; export * from './AuthorizeRequest'; @@ -10,7 +11,6 @@ export * from './CodeChallengeMethod'; export * from './CodeResponse'; export * from './CreateUser'; export * from './CryptoViewModel'; -export * from './ExternalAccount'; export * from './Game'; export * from './GameServer'; export * from './GameServerCluster'; @@ -18,21 +18,19 @@ export * from './GameServerQuery'; export * from './GameServerStatus'; export * from './GrantType'; export * from './Group'; -export * from './GroupApplication'; +export * from './GroupGame'; export * from './GroupMember'; export * from './GroupRank'; export * from './HashViewModel'; -export * from './IdentityProviderType'; export * from './IntrospectRequest'; export * from './IntrospectResponse'; export * from './IpAddress'; export * from './LeaderboardItem'; export * from './LeaderboardOrder'; +export * from './LoginProvider'; +export * from './ModelFile'; export * from './Package'; export * from './PackageRelease'; -export * from './Product'; -export * from './ProductPrice'; -export * from './ProductType'; export * from './Profile'; export * from './ProfileGame'; export * from './ProfileGroup'; @@ -41,7 +39,8 @@ export * from './RevokeRequest'; export * from './Search'; export * from './SearchType'; export * from './ServerMetrics'; -export * from './StorageFile'; +export * from './Subscription'; +export * from './SubscriptionPrice'; export * from './TokenHintType'; export * from './TokenRequest'; export * from './TokenResponse'; diff --git a/src/runtime.ts b/src/runtime.ts index d8fbde9..6c636af 100644 --- a/src/runtime.ts +++ b/src/runtime.ts @@ -4,7 +4,7 @@ * Tribufu API * API to access Tribufu services. * - * The version of the OpenAPI document: 1.4.3 + * The version of the OpenAPI document: 1.2.0 * Contact: contact@tribufu.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).