3 Commits
1.1.2 ... main

Author SHA1 Message Date
596fb5e642 Release v1.2.0 2025-08-09 20:29:17 -03:00
1f73b2b509 Update package.json 2025-05-28 21:02:51 -03:00
f8e0710aca Update index.ts 2025-05-28 21:02:49 -03:00
56 changed files with 3697 additions and 1151 deletions

View File

@@ -6,3 +6,4 @@ git_push.sh
package.json
README.md
src/index.ts
tsconfig.json

View File

@@ -1,16 +1,21 @@
package.json
src/apis/TribufuGeneratedApi.ts
src/apis/index.ts
src/index.ts
src/models/Account.ts
src/models/Application.ts
src/models/ApplicationType.ts
src/models/AuthorizeRequest.ts
src/models/Client.ts
src/models/ClientInfo.ts
src/models/ClientType.ts
src/models/CodeChallengeMethod.ts
src/models/CodeResponse.ts
src/models/CreateUser.ts
src/models/CryptoViewModel.ts
src/models/Game.ts
src/models/GameServer.ts
src/models/GameServerCluster.ts
src/models/GameServerQuery.ts
src/models/GameServerStatus.ts
src/models/GrantType.ts
src/models/Group.ts
src/models/GroupGame.ts
@@ -18,25 +23,24 @@ src/models/GroupMember.ts
src/models/GroupRank.ts
src/models/HashViewModel.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/LoginRequest.ts
src/models/LoginResponse.ts
src/models/ModelFile.ts
src/models/Package.ts
src/models/PackageRelease.ts
src/models/Profile.ts
src/models/ProfileGame.ts
src/models/ProfileGroup.ts
src/models/RefreshRequest.ts
src/models/RegisterRequest.ts
src/models/ResponseType.ts
src/models/RevokeRequest.ts
src/models/SearchRequest.ts
src/models/Search.ts
src/models/SearchType.ts
src/models/ServerMetrics.ts
src/models/ServerStatus.ts
src/models/Subscription.ts
src/models/SubscriptionPrice.ts
src/models/TokenHintType.ts
src/models/TokenRequest.ts
src/models/TokenResponse.ts
@@ -46,4 +50,3 @@ src/models/UserInfo.ts
src/models/UserType.ts
src/models/index.ts
src/runtime.ts
tsconfig.json

View File

@@ -1,6 +1,6 @@
{
"name": "tribufu",
"version": "1.1.2",
"version": "1.2.0",
"description": "Tribufu JS SDK",
"repository": "https://github.com/tribufu/tribufu-js",
"author": "Tribufu <contact@Tribufu.com>",
@@ -8,9 +8,9 @@
"type": "module",
"types": "./build/index.d.ts",
"exports": {
"import": "./build/index.mjs",
"types": "./build/index.d.ts",
"require": "./build/index.cjs",
"types": "./build/index.d.ts"
"import": "./build/index.mjs"
},
"typesVersions": {
"*": {

View File

@@ -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 `

File diff suppressed because it is too large Load Diff

View File

@@ -2,11 +2,15 @@
// SPDX-License-Identifier: MIT
import { Configuration } from "./runtime";
import { JavaScriptRuntime } from "./node";
import { TRIBUFU_API_URL, TRIBUFU_VERSION } from "./constants";
import { TribufuGeneratedApi } from "./apis/TribufuGeneratedApi";
import { JavaScriptRuntime } from "./node";
export * from "./apis";
export * from "./constants";
export * from "./models";
export * from "./node";
export * from "./runtime";
export * from "./singletion";
/**

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).
@@ -32,7 +32,7 @@ export interface Account {
* @type {string}
* @memberof Account
*/
id?: string | null;
id: string | null;
/**
*
* @type {string}
@@ -44,7 +44,7 @@ export interface Account {
* @type {LoginProvider}
* @memberof Account
*/
provider?: LoginProvider;
provider: LoginProvider;
/**
*
* @type {string}
@@ -83,6 +83,8 @@ export interface Account {
* 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;
}
@@ -96,9 +98,9 @@ export function AccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): A
}
return {
'id': json['id'] == null ? undefined : json['id'],
'id': json['id'],
'name': json['name'] == null ? undefined : json['name'],
'provider': json['provider'] == null ? undefined : LoginProviderFromJSON(json['provider']),
'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'],

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).
@@ -38,7 +38,7 @@ export interface Application {
* @type {string}
* @memberof Application
*/
name?: string | null;
name: string | null;
/**
*
* @type {string}
@@ -56,7 +56,7 @@ export interface Application {
* @type {string}
* @memberof Application
*/
organizationId?: string | null;
organizationId?: string;
/**
*
* @type {string}
@@ -81,60 +81,12 @@ export interface Application {
* @memberof Application
*/
libraryImageUrl?: string | null;
/**
*
* @type {string}
* @memberof Application
*/
parentId?: string | null;
/**
*
* @type {string}
* @memberof Application
*/
slug?: string | null;
/**
*
* @type {number}
* @memberof Application
*/
visibility?: number;
/**
*
* @type {string}
* @memberof Application
*/
password?: string | null;
/**
*
* @type {number}
* @memberof Application
*/
primary?: number;
/**
*
* @type {number}
* @memberof Application
*/
userCount?: number;
/**
*
* @type {number}
* @memberof Application
*/
achievementCount?: number;
/**
*
* @type {number}
* @memberof Application
*/
badgeCount?: number | null;
/**
*
* @type {number}
* @memberof Application
*/
downloadCount?: number;
/**
*
* @type {Date}
@@ -155,6 +107,7 @@ export interface Application {
* Check if a given object implements the Application interface.
*/
export function instanceOfApplication(value: object): value is Application {
if (!('name' in value) || value['name'] === undefined) return false;
return true;
}
@@ -169,7 +122,7 @@ export function ApplicationFromJSONTyped(json: any, ignoreDiscriminator: boolean
return {
'id': json['id'] == null ? undefined : json['id'],
'name': json['name'] == null ? undefined : json['name'],
'name': json['name'],
'description': json['description'] == null ? undefined : json['description'],
'type': json['type'] == null ? undefined : ApplicationTypeFromJSON(json['type']),
'organizationId': json['organization_id'] == null ? undefined : json['organization_id'],
@@ -177,15 +130,7 @@ export function ApplicationFromJSONTyped(json: any, ignoreDiscriminator: boolean
'bannerUrl': json['banner_url'] == null ? undefined : json['banner_url'],
'capsuleImageUrl': json['capsule_image_url'] == null ? undefined : json['capsule_image_url'],
'libraryImageUrl': json['library_image_url'] == null ? undefined : json['library_image_url'],
'parentId': json['parent_id'] == null ? undefined : json['parent_id'],
'slug': json['slug'] == null ? undefined : json['slug'],
'visibility': json['visibility'] == null ? undefined : json['visibility'],
'password': json['password'] == null ? undefined : json['password'],
'primary': json['primary'] == null ? undefined : json['primary'],
'userCount': json['user_count'] == null ? undefined : json['user_count'],
'achievementCount': json['achievement_count'] == null ? undefined : json['achievement_count'],
'badgeCount': json['badge_count'] == null ? undefined : json['badge_count'],
'downloadCount': json['download_count'] == null ? undefined : json['download_count'],
'created': json['created'] == null ? undefined : (new Date(json['created'])),
'updated': json['updated'] == null ? undefined : (new Date(json['updated'])),
};
@@ -211,15 +156,7 @@ export function ApplicationToJSONTyped(value?: Application | null, ignoreDiscrim
'banner_url': value['bannerUrl'],
'capsule_image_url': value['capsuleImageUrl'],
'library_image_url': value['libraryImageUrl'],
'parent_id': value['parentId'],
'slug': value['slug'],
'visibility': value['visibility'],
'password': value['password'],
'primary': value['primary'],
'user_count': value['userCount'],
'achievement_count': value['achievementCount'],
'badge_count': value['badgeCount'],
'download_count': value['downloadCount'],
'created': value['created'] == null ? undefined : ((value['created']).toISOString()),
'updated': value['updated'] == null ? undefined : ((value['updated'] as any).toISOString()),
};

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).
@@ -45,7 +45,7 @@ export interface AuthorizeRequest {
* @type {string}
* @memberof AuthorizeRequest
*/
clientId?: string | null;
clientId: string;
/**
*
* @type {string}
@@ -63,7 +63,7 @@ export interface AuthorizeRequest {
* @type {string}
* @memberof AuthorizeRequest
*/
redirectUri?: string | null;
redirectUri: string | null;
/**
*
* @type {string}
@@ -84,6 +84,8 @@ export interface AuthorizeRequest {
* Check if a given object implements the AuthorizeRequest interface.
*/
export function instanceOfAuthorizeRequest(value: object): value is AuthorizeRequest {
if (!('clientId' in value) || value['clientId'] === undefined) return false;
if (!('redirectUri' in value) || value['redirectUri'] === undefined) return false;
return true;
}
@@ -98,10 +100,10 @@ export function AuthorizeRequestFromJSONTyped(json: any, ignoreDiscriminator: bo
return {
'responseType': json['response_type'] == null ? undefined : ResponseTypeFromJSON(json['response_type']),
'clientId': json['client_id'] == null ? undefined : json['client_id'],
'clientId': json['client_id'],
'codeChallenge': json['code_challenge'] == null ? undefined : json['code_challenge'],
'codeChallengeMethod': json['code_challenge_method'] == null ? undefined : CodeChallengeMethodFromJSON(json['code_challenge_method']),
'redirectUri': json['redirect_uri'] == null ? undefined : json['redirect_uri'],
'redirectUri': json['redirect_uri'],
'scope': json['scope'] == null ? undefined : json['scope'],
'state': json['state'] == null ? undefined : json['state'],
};

187
src/models/Client.ts Normal file
View File

@@ -0,0 +1,187 @@
/* 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 { ClientType } from './ClientType';
import {
ClientTypeFromJSON,
ClientTypeFromJSONTyped,
ClientTypeToJSON,
ClientTypeToJSONTyped,
} from './ClientType';
/**
*
* @export
* @interface Client
*/
export interface Client {
/**
*
* @type {string}
* @memberof Client
*/
id?: string;
/**
*
* @type {string}
* @memberof Client
*/
name: string | null;
/**
*
* @type {ClientType}
* @memberof Client
*/
type?: ClientType;
/**
*
* @type {string}
* @memberof Client
*/
organizationId?: string;
/**
*
* @type {boolean}
* @memberof Client
*/
trusted?: boolean;
/**
*
* @type {string}
* @memberof Client
*/
packageId?: string | null;
/**
*
* @type {string}
* @memberof Client
*/
websiteUrl?: string | null;
/**
*
* @type {string}
* @memberof Client
*/
photoUrl?: string | null;
/**
*
* @type {string}
* @memberof Client
*/
backgroundUrl?: string | null;
/**
*
* @type {string}
* @memberof Client
*/
customSchema?: string | null;
/**
*
* @type {string}
* @memberof Client
*/
redirects?: string | null;
/**
*
* @type {string}
* @memberof Client
*/
scopes?: string | null;
/**
*
* @type {Array<string>}
* @memberof Client
*/
readonly permissions?: Array<string> | null;
/**
*
* @type {Date}
* @memberof Client
*/
created?: Date;
/**
*
* @type {Date}
* @memberof Client
*/
updated?: Date | null;
}
/**
* Check if a given object implements the Client interface.
*/
export function instanceOfClient(value: object): value is Client {
if (!('name' in value) || value['name'] === undefined) return false;
return true;
}
export function ClientFromJSON(json: any): Client {
return ClientFromJSONTyped(json, false);
}
export function ClientFromJSONTyped(json: any, ignoreDiscriminator: boolean): Client {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'name': json['name'],
'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'],
'created': json['created'] == null ? undefined : (new Date(json['created'])),
'updated': json['updated'] == null ? undefined : (new Date(json['updated'])),
};
}
export function ClientToJSON(json: any): Client {
return ClientToJSONTyped(json, false);
}
export function ClientToJSONTyped(value?: Omit<Client, 'permissions'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'name': value['name'],
'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': value['created'] == null ? undefined : ((value['created']).toISOString()),
'updated': value['updated'] == null ? undefined : ((value['updated'] as any).toISOString()),
};
}

108
src/models/ClientInfo.ts Normal file
View File

@@ -0,0 +1,108 @@
/* 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 { ClientType } from './ClientType';
import {
ClientTypeFromJSON,
ClientTypeFromJSONTyped,
ClientTypeToJSON,
ClientTypeToJSONTyped,
} from './ClientType';
/**
*
* @export
* @interface ClientInfo
*/
export interface ClientInfo {
/**
*
* @type {string}
* @memberof ClientInfo
*/
id?: string;
/**
*
* @type {string}
* @memberof ClientInfo
*/
name: string | null;
/**
*
* @type {ClientType}
* @memberof ClientInfo
*/
type?: ClientType;
/**
*
* @type {string}
* @memberof ClientInfo
*/
photoUrl?: string | null;
/**
*
* @type {Array<string>}
* @memberof ClientInfo
*/
permissions?: Array<string> | null;
}
/**
* Check if a given object implements the ClientInfo interface.
*/
export function instanceOfClientInfo(value: object): value is ClientInfo {
if (!('name' in value) || value['name'] === undefined) return false;
return true;
}
export function ClientInfoFromJSON(json: any): ClientInfo {
return ClientInfoFromJSONTyped(json, false);
}
export function ClientInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClientInfo {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'name': json['name'],
'type': json['type'] == null ? undefined : ClientTypeFromJSON(json['type']),
'photoUrl': json['photo_url'] == null ? undefined : json['photo_url'],
'permissions': json['permissions'] == null ? undefined : json['permissions'],
};
}
export function ClientInfoToJSON(json: any): ClientInfo {
return ClientInfoToJSONTyped(json, false);
}
export function ClientInfoToJSONTyped(value?: ClientInfo | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'name': value['name'],
'type': ClientTypeToJSON(value['type']),
'photo_url': value['photoUrl'],
'permissions': value['permissions'],
};
}

54
src/models/ClientType.ts Normal file
View File

@@ -0,0 +1,54 @@
/* 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 ClientType = {
Web: 'web',
Desktop: 'desktop',
Mobile: 'mobile'
} as const;
export type ClientType = typeof ClientType[keyof typeof ClientType];
export function instanceOfClientType(value: any): boolean {
for (const key in ClientType) {
if (Object.prototype.hasOwnProperty.call(ClientType, key)) {
if (ClientType[key as keyof typeof ClientType] === value) {
return true;
}
}
}
return false;
}
export function ClientTypeFromJSON(json: any): ClientType {
return ClientTypeFromJSONTyped(json, false);
}
export function ClientTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClientType {
return json as ClientType;
}
export function ClientTypeToJSON(value?: ClientType | null): any {
return value as any;
}
export function ClientTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): ClientType {
return value as ClientType;
}

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).

View File

@@ -0,0 +1,74 @@
/* 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';
/**
*
* @export
* @interface CodeResponse
*/
export interface CodeResponse {
/**
*
* @type {string}
* @memberof CodeResponse
*/
code: string | null;
/**
*
* @type {string}
* @memberof CodeResponse
*/
state?: string | null;
}
/**
* Check if a given object implements the CodeResponse interface.
*/
export function instanceOfCodeResponse(value: object): value is CodeResponse {
if (!('code' in value) || value['code'] === undefined) return false;
return true;
}
export function CodeResponseFromJSON(json: any): CodeResponse {
return CodeResponseFromJSONTyped(json, false);
}
export function CodeResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CodeResponse {
if (json == null) {
return json;
}
return {
'code': json['code'],
'state': json['state'] == null ? undefined : json['state'],
};
}
export function CodeResponseToJSON(json: any): CodeResponse {
return CodeResponseToJSONTyped(json, false);
}
export function CodeResponseToJSONTyped(value?: CodeResponse | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'code': value['code'],
'state': value['state'],
};
}

130
src/models/CreateUser.ts Normal file
View File

@@ -0,0 +1,130 @@
/* 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';
/**
*
* @export
* @interface CreateUser
*/
export interface CreateUser {
/**
*
* @type {string}
* @memberof CreateUser
*/
uuid?: string | null;
/**
*
* @type {string}
* @memberof CreateUser
*/
name: string;
/**
*
* @type {string}
* @memberof CreateUser
*/
displayName?: string | null;
/**
*
* @type {string}
* @memberof CreateUser
*/
email?: string | null;
/**
*
* @type {string}
* @memberof CreateUser
*/
password?: string | null;
/**
*
* @type {string}
* @memberof CreateUser
*/
language?: string | null;
/**
*
* @type {string}
* @memberof CreateUser
*/
timezone?: string | null;
/**
*
* @type {string}
* @memberof CreateUser
*/
currency?: string | null;
/**
*
* @type {string}
* @memberof CreateUser
*/
ipAddress?: string | null;
}
/**
* Check if a given object implements the CreateUser interface.
*/
export function instanceOfCreateUser(value: object): value is CreateUser {
if (!('name' in value) || value['name'] === undefined) return false;
return true;
}
export function CreateUserFromJSON(json: any): CreateUser {
return CreateUserFromJSONTyped(json, false);
}
export function CreateUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateUser {
if (json == null) {
return json;
}
return {
'uuid': json['uuid'] == null ? undefined : json['uuid'],
'name': json['name'],
'displayName': json['display_name'] == null ? undefined : json['display_name'],
'email': json['email'] == null ? undefined : json['email'],
'password': json['password'] == null ? undefined : json['password'],
'language': json['language'] == null ? undefined : json['language'],
'timezone': json['timezone'] == null ? undefined : json['timezone'],
'currency': json['currency'] == null ? undefined : json['currency'],
'ipAddress': json['ip_address'] == null ? undefined : json['ip_address'],
};
}
export function CreateUserToJSON(json: any): CreateUser {
return CreateUserToJSONTyped(json, false);
}
export function CreateUserToJSONTyped(value?: CreateUser | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'uuid': value['uuid'],
'name': value['name'],
'display_name': value['displayName'],
'email': value['email'],
'password': value['password'],
'language': value['language'],
'timezone': value['timezone'],
'currency': value['currency'],
'ip_address': value['ipAddress'],
};
}

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).
@@ -27,72 +27,6 @@ import {
* @interface Game
*/
export interface Game {
/**
*
* @type {number}
* @memberof Game
*/
gamePort?: number | null;
/**
*
* @type {number}
* @memberof Game
*/
queryPort?: number | null;
/**
*
* @type {number}
* @memberof Game
*/
rconPort?: number | null;
/**
*
* @type {number}
* @memberof Game
*/
serverCount?: number;
/**
*
* @type {number}
* @memberof Game
*/
steamAppId?: number | null;
/**
*
* @type {number}
* @memberof Game
*/
steamServerAppId?: number | null;
/**
*
* @type {boolean}
* @memberof Game
*/
enableServers?: boolean;
/**
*
* @type {string}
* @memberof Game
*/
rustGamedigId?: string | null;
/**
*
* @type {string}
* @memberof Game
*/
nodeGamedigId?: string | null;
/**
*
* @type {string}
* @memberof Game
*/
serverConnectUrl?: string | null;
/**
*
* @type {string}
* @memberof Game
*/
serverTags?: string | null;
/**
*
* @type {string}
@@ -104,7 +38,7 @@ export interface Game {
* @type {string}
* @memberof Game
*/
name?: string | null;
name: string | null;
/**
*
* @type {string}
@@ -122,7 +56,7 @@ export interface Game {
* @type {string}
* @memberof Game
*/
organizationId?: string | null;
organizationId?: string;
/**
*
* @type {string}
@@ -147,60 +81,12 @@ export interface Game {
* @memberof Game
*/
libraryImageUrl?: string | null;
/**
*
* @type {string}
* @memberof Game
*/
parentId?: string | null;
/**
*
* @type {string}
* @memberof Game
*/
slug?: string | null;
/**
*
* @type {number}
* @memberof Game
*/
visibility?: number;
/**
*
* @type {string}
* @memberof Game
*/
password?: string | null;
/**
*
* @type {number}
* @memberof Game
*/
primary?: number;
/**
*
* @type {number}
* @memberof Game
*/
userCount?: number;
/**
*
* @type {number}
* @memberof Game
*/
achievementCount?: number;
/**
*
* @type {number}
* @memberof Game
*/
badgeCount?: number | null;
/**
*
* @type {number}
* @memberof Game
*/
downloadCount?: number;
/**
*
* @type {Date}
@@ -213,6 +99,48 @@ export interface Game {
* @memberof Game
*/
updated?: Date | null;
/**
*
* @type {boolean}
* @memberof Game
*/
enableServers?: boolean;
/**
*
* @type {number}
* @memberof Game
*/
gamePort?: number | null;
/**
*
* @type {number}
* @memberof Game
*/
queryPort?: number | null;
/**
*
* @type {number}
* @memberof Game
*/
rconPort?: number | null;
/**
*
* @type {string}
* @memberof Game
*/
gamedigId?: string | null;
/**
*
* @type {number}
* @memberof Game
*/
steamAppId?: number | null;
/**
*
* @type {number}
* @memberof Game
*/
steamServerAppId?: number | null;
}
@@ -221,6 +149,7 @@ export interface Game {
* Check if a given object implements the Game interface.
*/
export function instanceOfGame(value: object): value is Game {
if (!('name' in value) || value['name'] === undefined) return false;
return true;
}
@@ -234,19 +163,8 @@ export function GameFromJSONTyped(json: any, ignoreDiscriminator: boolean): Game
}
return {
'gamePort': json['game_port'] == null ? undefined : json['game_port'],
'queryPort': json['query_port'] == null ? undefined : json['query_port'],
'rconPort': json['rcon_port'] == null ? undefined : json['rcon_port'],
'serverCount': json['server_count'] == null ? undefined : json['server_count'],
'steamAppId': json['steam_app_id'] == null ? undefined : json['steam_app_id'],
'steamServerAppId': json['steam_server_app_id'] == null ? undefined : json['steam_server_app_id'],
'enableServers': json['enable_servers'] == null ? undefined : json['enable_servers'],
'rustGamedigId': json['rust_gamedig_id'] == null ? undefined : json['rust_gamedig_id'],
'nodeGamedigId': json['node_gamedig_id'] == null ? undefined : json['node_gamedig_id'],
'serverConnectUrl': json['server_connect_url'] == null ? undefined : json['server_connect_url'],
'serverTags': json['server_tags'] == null ? undefined : json['server_tags'],
'id': json['id'] == null ? undefined : json['id'],
'name': json['name'] == null ? undefined : json['name'],
'name': json['name'],
'description': json['description'] == null ? undefined : json['description'],
'type': json['type'] == null ? undefined : ApplicationTypeFromJSON(json['type']),
'organizationId': json['organization_id'] == null ? undefined : json['organization_id'],
@@ -254,17 +172,16 @@ export function GameFromJSONTyped(json: any, ignoreDiscriminator: boolean): Game
'bannerUrl': json['banner_url'] == null ? undefined : json['banner_url'],
'capsuleImageUrl': json['capsule_image_url'] == null ? undefined : json['capsule_image_url'],
'libraryImageUrl': json['library_image_url'] == null ? undefined : json['library_image_url'],
'parentId': json['parent_id'] == null ? undefined : json['parent_id'],
'slug': json['slug'] == null ? undefined : json['slug'],
'visibility': json['visibility'] == null ? undefined : json['visibility'],
'password': json['password'] == null ? undefined : json['password'],
'primary': json['primary'] == null ? undefined : json['primary'],
'userCount': json['user_count'] == null ? undefined : json['user_count'],
'achievementCount': json['achievement_count'] == null ? undefined : json['achievement_count'],
'badgeCount': json['badge_count'] == null ? undefined : json['badge_count'],
'downloadCount': json['download_count'] == null ? undefined : json['download_count'],
'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'],
'rconPort': json['rcon_port'] == null ? undefined : json['rcon_port'],
'gamedigId': json['gamedig_id'] == null ? undefined : json['gamedig_id'],
'steamAppId': json['steam_app_id'] == null ? undefined : json['steam_app_id'],
'steamServerAppId': json['steam_server_app_id'] == null ? undefined : json['steam_server_app_id'],
};
}
@@ -279,17 +196,6 @@ export function GameToJSONTyped(value?: Game | null, ignoreDiscriminator: boolea
return {
'game_port': value['gamePort'],
'query_port': value['queryPort'],
'rcon_port': value['rconPort'],
'server_count': value['serverCount'],
'steam_app_id': value['steamAppId'],
'steam_server_app_id': value['steamServerAppId'],
'enable_servers': value['enableServers'],
'rust_gamedig_id': value['rustGamedigId'],
'node_gamedig_id': value['nodeGamedigId'],
'server_connect_url': value['serverConnectUrl'],
'server_tags': value['serverTags'],
'id': value['id'],
'name': value['name'],
'description': value['description'],
@@ -299,17 +205,16 @@ export function GameToJSONTyped(value?: Game | null, ignoreDiscriminator: boolea
'banner_url': value['bannerUrl'],
'capsule_image_url': value['capsuleImageUrl'],
'library_image_url': value['libraryImageUrl'],
'parent_id': value['parentId'],
'slug': value['slug'],
'visibility': value['visibility'],
'password': value['password'],
'primary': value['primary'],
'user_count': value['userCount'],
'achievement_count': value['achievementCount'],
'badge_count': value['badgeCount'],
'download_count': value['downloadCount'],
'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'],
'rcon_port': value['rconPort'],
'gamedig_id': value['gamedigId'],
'steam_app_id': value['steamAppId'],
'steam_server_app_id': value['steamServerAppId'],
};
}

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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 { ServerStatus } from './ServerStatus';
import {
ServerStatusFromJSON,
ServerStatusFromJSONTyped,
ServerStatusToJSON,
ServerStatusToJSONTyped,
} from './ServerStatus';
/**
*
* @export
@@ -38,7 +30,7 @@ export interface GameServer {
* @type {string}
* @memberof GameServer
*/
name?: string | null;
name: string | null;
/**
*
* @type {string}
@@ -50,7 +42,19 @@ export interface GameServer {
* @type {string}
* @memberof GameServer
*/
address?: string | null;
ownerId?: string | null;
/**
*
* @type {string}
* @memberof GameServer
*/
address: string | null;
/**
*
* @type {number}
* @memberof GameServer
*/
queryPort: number;
/**
*
* @type {number}
@@ -59,10 +63,16 @@ export interface GameServer {
gamePort?: number | null;
/**
*
* @type {number}
* @type {string}
* @memberof GameServer
*/
queryPort?: number;
map?: string | null;
/**
*
* @type {string}
* @memberof GameServer
*/
version?: string | null;
/**
*
* @type {string}
@@ -75,18 +85,6 @@ export interface GameServer {
* @memberof GameServer
*/
gameIconUrl?: string | null;
/**
*
* @type {string}
* @memberof GameServer
*/
version?: string | null;
/**
*
* @type {boolean}
* @memberof GameServer
*/
featured?: boolean;
/**
*
* @type {string}
@@ -105,66 +103,12 @@ export interface GameServer {
* @memberof GameServer
*/
bannerUrl?: string | null;
/**
*
* @type {string}
* @memberof GameServer
*/
ownerId?: string | null;
/**
*
* @type {number}
* @memberof GameServer
*/
uptime?: number;
/**
*
* @type {ServerStatus}
* @memberof GameServer
*/
status?: ServerStatus;
/**
*
* @type {number}
* @memberof GameServer
*/
ping?: number | null;
/**
*
* @type {string}
* @memberof GameServer
*/
map?: string | null;
/**
*
* @type {number}
* @memberof GameServer
*/
usedSlots?: number | null;
/**
*
* @type {number}
* @memberof GameServer
*/
maxSlots?: number | null;
/**
*
* @type {string}
* @memberof GameServer
*/
motd?: string | null;
/**
*
* @type {string}
* @memberof GameServer
*/
players?: string | null;
/**
*
* @type {Date}
* @memberof GameServer
*/
lastOnline?: Date | null;
/**
*
* @type {string}
@@ -189,18 +133,6 @@ export interface GameServer {
* @memberof GameServer
*/
youtubeVideoUrl?: string | null;
/**
*
* @type {string}
* @memberof GameServer
*/
tags?: string | null;
/**
*
* @type {number}
* @memberof GameServer
*/
commentCount?: number;
/**
*
* @type {Date}
@@ -215,12 +147,13 @@ export interface GameServer {
updated?: Date | null;
}
/**
* Check if a given object implements the GameServer interface.
*/
export function instanceOfGameServer(value: object): value is GameServer {
if (!('name' in value) || value['name'] === undefined) return false;
if (!('address' in value) || value['address'] === undefined) return false;
if (!('queryPort' in value) || value['queryPort'] === undefined) return false;
return true;
}
@@ -235,34 +168,24 @@ export function GameServerFromJSONTyped(json: any, ignoreDiscriminator: boolean)
return {
'id': json['id'] == null ? undefined : json['id'],
'name': json['name'] == null ? undefined : json['name'],
'name': json['name'],
'description': json['description'] == null ? undefined : json['description'],
'address': json['address'] == null ? undefined : json['address'],
'ownerId': json['owner_id'] == null ? undefined : json['owner_id'],
'address': json['address'],
'queryPort': json['query_port'],
'gamePort': json['game_port'] == null ? undefined : json['game_port'],
'queryPort': json['query_port'] == null ? undefined : json['query_port'],
'map': json['map'] == null ? undefined : json['map'],
'version': json['version'] == null ? undefined : json['version'],
'gameId': json['game_id'] == null ? undefined : json['game_id'],
'gameIconUrl': json['game_icon_url'] == null ? undefined : json['game_icon_url'],
'version': json['version'] == null ? undefined : json['version'],
'featured': json['featured'] == null ? undefined : json['featured'],
'clusterId': json['cluster_id'] == null ? undefined : json['cluster_id'],
'websiteUrl': json['website_url'] == null ? undefined : json['website_url'],
'bannerUrl': json['banner_url'] == null ? undefined : json['banner_url'],
'ownerId': json['owner_id'] == null ? undefined : json['owner_id'],
'uptime': json['uptime'] == null ? undefined : json['uptime'],
'status': json['status'] == null ? undefined : ServerStatusFromJSON(json['status']),
'ping': json['ping'] == null ? undefined : json['ping'],
'map': json['map'] == null ? undefined : json['map'],
'usedSlots': json['used_slots'] == null ? undefined : json['used_slots'],
'maxSlots': json['max_slots'] == null ? undefined : json['max_slots'],
'motd': json['motd'] == null ? undefined : json['motd'],
'players': json['players'] == null ? undefined : json['players'],
'lastOnline': json['last_online'] == null ? undefined : (new Date(json['last_online'])),
'country': json['country'] == null ? undefined : json['country'],
'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'],
'tags': json['tags'] == null ? undefined : json['tags'],
'commentCount': json['comment_count'] == null ? undefined : json['comment_count'],
'created': json['created'] == null ? undefined : (new Date(json['created'])),
'updated': json['updated'] == null ? undefined : (new Date(json['updated'])),
};
@@ -282,32 +205,22 @@ export function GameServerToJSONTyped(value?: GameServer | null, ignoreDiscrimin
'id': value['id'],
'name': value['name'],
'description': value['description'],
'owner_id': value['ownerId'],
'address': value['address'],
'game_port': value['gamePort'],
'query_port': value['queryPort'],
'game_port': value['gamePort'],
'map': value['map'],
'version': value['version'],
'game_id': value['gameId'],
'game_icon_url': value['gameIconUrl'],
'version': value['version'],
'featured': value['featured'],
'cluster_id': value['clusterId'],
'website_url': value['websiteUrl'],
'banner_url': value['bannerUrl'],
'owner_id': value['ownerId'],
'uptime': value['uptime'],
'status': ServerStatusToJSON(value['status']),
'ping': value['ping'],
'map': value['map'],
'used_slots': value['usedSlots'],
'max_slots': value['maxSlots'],
'motd': value['motd'],
'players': value['players'],
'last_online': value['lastOnline'] == null ? undefined : ((value['lastOnline'] as any).toISOString()),
'country': value['country'],
'steam': value['steam'],
'discord_server_id': value['discordServerId'],
'youtube_video_url': value['youtubeVideoUrl'],
'tags': value['tags'],
'comment_count': value['commentCount'],
'created': value['created'] == null ? undefined : ((value['created']).toISOString()),
'updated': value['updated'] == null ? undefined : ((value['updated'] as any).toISOString()),
};

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).
@@ -30,7 +30,7 @@ export interface GameServerCluster {
* @type {string}
* @memberof GameServerCluster
*/
name?: string | null;
name: string | null;
/**
*
* @type {string}
@@ -109,6 +109,7 @@ export interface GameServerCluster {
* Check if a given object implements the GameServerCluster interface.
*/
export function instanceOfGameServerCluster(value: object): value is GameServerCluster {
if (!('name' in value) || value['name'] === undefined) return false;
return true;
}
@@ -123,7 +124,7 @@ export function GameServerClusterFromJSONTyped(json: any, ignoreDiscriminator: b
return {
'id': json['id'] == null ? undefined : json['id'],
'name': json['name'] == null ? undefined : json['name'],
'name': json['name'],
'description': json['description'] == null ? undefined : json['description'],
'gameId': json['game_id'] == null ? undefined : json['game_id'],
'websiteUrl': json['website_url'] == null ? undefined : json['website_url'],

View File

@@ -0,0 +1,131 @@
/* 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 { GameServerStatus } from './GameServerStatus';
import {
GameServerStatusFromJSON,
GameServerStatusFromJSONTyped,
GameServerStatusToJSON,
GameServerStatusToJSONTyped,
} from './GameServerStatus';
/**
*
* @export
* @interface GameServerQuery
*/
export interface GameServerQuery {
/**
*
* @type {string}
* @memberof GameServerQuery
*/
id?: string;
/**
*
* @type {string}
* @memberof GameServerQuery
*/
serverId?: string;
/**
*
* @type {GameServerStatus}
* @memberof GameServerQuery
*/
status?: GameServerStatus;
/**
*
* @type {number}
* @memberof GameServerQuery
*/
ping?: number;
/**
*
* @type {number}
* @memberof GameServerQuery
*/
currentPlayers?: number;
/**
*
* @type {number}
* @memberof GameServerQuery
*/
maxPlayers?: number;
/**
*
* @type {string}
* @memberof GameServerQuery
*/
motd?: string | null;
/**
*
* @type {Date}
* @memberof GameServerQuery
*/
created?: Date;
}
/**
* Check if a given object implements the GameServerQuery interface.
*/
export function instanceOfGameServerQuery(value: object): value is GameServerQuery {
return true;
}
export function GameServerQueryFromJSON(json: any): GameServerQuery {
return GameServerQueryFromJSONTyped(json, false);
}
export function GameServerQueryFromJSONTyped(json: any, ignoreDiscriminator: boolean): GameServerQuery {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'serverId': json['server_id'] == null ? undefined : json['server_id'],
'status': json['status'] == null ? undefined : GameServerStatusFromJSON(json['status']),
'ping': json['ping'] == null ? undefined : json['ping'],
'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'],
'created': json['created'] == null ? undefined : (new Date(json['created'])),
};
}
export function GameServerQueryToJSON(json: any): GameServerQuery {
return GameServerQueryToJSONTyped(json, false);
}
export function GameServerQueryToJSONTyped(value?: GameServerQuery | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'server_id': value['serverId'],
'status': GameServerStatusToJSON(value['status']),
'ping': value['ping'],
'current_players': value['currentPlayers'],
'max_players': value['maxPlayers'],
'motd': value['motd'],
'created': value['created'] == null ? undefined : ((value['created']).toISOString()),
};
}

View File

@@ -0,0 +1,54 @@
/* 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 GameServerStatus = {
Unknown: 'unknown',
Offline: 'offline',
Online: 'online'
} as const;
export type GameServerStatus = typeof GameServerStatus[keyof typeof GameServerStatus];
export function instanceOfGameServerStatus(value: any): boolean {
for (const key in GameServerStatus) {
if (Object.prototype.hasOwnProperty.call(GameServerStatus, key)) {
if (GameServerStatus[key as keyof typeof GameServerStatus] === value) {
return true;
}
}
}
return false;
}
export function GameServerStatusFromJSON(json: any): GameServerStatus {
return GameServerStatusFromJSONTyped(json, false);
}
export function GameServerStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): GameServerStatus {
return json as GameServerStatus;
}
export function GameServerStatusToJSON(value?: GameServerStatus | null): any {
return value as any;
}
export function GameServerStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): GameServerStatus {
return value as GameServerStatus;
}

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).
@@ -36,13 +36,13 @@ export interface Group {
* @type {string}
* @memberof Group
*/
name?: string | null;
name: string | null;
/**
*
* @type {string}
* @memberof Group
*/
tag?: string | null;
tag: string | null;
/**
*
* @type {string}
@@ -121,6 +121,8 @@ export interface Group {
* Check if a given object implements the Group interface.
*/
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;
}
@@ -136,8 +138,8 @@ 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'] == null ? undefined : json['name'],
'tag': json['tag'] == null ? undefined : json['tag'],
'name': json['name'],
'tag': json['tag'],
'description': json['description'] == null ? undefined : json['description'],
'type': json['type'] == null ? undefined : json['type'],
'privacy': json['privacy'] == null ? undefined : json['privacy'],

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).
@@ -39,7 +39,7 @@ export interface GroupGame {
* @type {string}
* @memberof GroupGame
*/
groupId?: string;
groupId: string;
/**
*
* @type {Group}
@@ -82,6 +82,7 @@ export interface GroupGame {
* Check if a given object implements the GroupGame interface.
*/
export function instanceOfGroupGame(value: object): value is GroupGame {
if (!('groupId' in value) || value['groupId'] === undefined) return false;
return true;
}
@@ -95,7 +96,7 @@ export function GroupGameFromJSONTyped(json: any, ignoreDiscriminator: boolean):
}
return {
'groupId': json['group_id'] == null ? undefined : json['group_id'],
'groupId': json['group_id'],
'group': json['group'] == null ? undefined : GroupFromJSON(json['group']),
'applicationId': json['application_id'] == null ? undefined : json['application_id'],
'application': json['application'] == null ? undefined : ApplicationFromJSON(json['application']),

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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,13 +24,14 @@ export interface HashViewModel {
* @type {string}
* @memberof HashViewModel
*/
value?: string | null;
value: string | null;
}
/**
* Check if a given object implements the HashViewModel interface.
*/
export function instanceOfHashViewModel(value: object): value is HashViewModel {
if (!('value' in value) || value['value'] === undefined) return false;
return true;
}
@@ -44,7 +45,7 @@ export function HashViewModelFromJSONTyped(json: any, ignoreDiscriminator: boole
}
return {
'value': json['value'] == null ? undefined : json['value'],
'value': json['value'],
};
}

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).
@@ -32,13 +32,13 @@ export interface IntrospectRequest {
* @type {string}
* @memberof IntrospectRequest
*/
token?: string | null;
token: string | null;
/**
*
* @type {TokenHintType}
* @memberof IntrospectRequest
*/
tokenTypeHint?: TokenHintType;
tokenTypeHint: TokenHintType;
}
@@ -47,6 +47,8 @@ export interface IntrospectRequest {
* Check if a given object implements the IntrospectRequest interface.
*/
export function instanceOfIntrospectRequest(value: object): value is IntrospectRequest {
if (!('token' in value) || value['token'] === undefined) return false;
if (!('tokenTypeHint' in value) || value['tokenTypeHint'] === undefined) return false;
return true;
}
@@ -60,8 +62,8 @@ export function IntrospectRequestFromJSONTyped(json: any, ignoreDiscriminator: b
}
return {
'token': json['token'] == null ? undefined : json['token'],
'tokenTypeHint': json['token_type_hint'] == null ? undefined : TokenHintTypeFromJSON(json['token_type_hint']),
'token': json['token'],
'tokenTypeHint': TokenHintTypeFromJSON(json['token_type_hint']),
};
}

View File

@@ -0,0 +1,153 @@
/* 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';
/**
*
* @export
* @interface IntrospectResponse
*/
export interface IntrospectResponse {
/**
*
* @type {string}
* @memberof IntrospectResponse
*/
jti?: string | null;
/**
*
* @type {boolean}
* @memberof IntrospectResponse
*/
active?: boolean;
/**
*
* @type {string}
* @memberof IntrospectResponse
*/
tokenType?: string | null;
/**
*
* @type {string}
* @memberof IntrospectResponse
*/
clientId?: string | null;
/**
*
* @type {string}
* @memberof IntrospectResponse
*/
sub?: string | null;
/**
*
* @type {string}
* @memberof IntrospectResponse
*/
username?: string | null;
/**
*
* @type {string}
* @memberof IntrospectResponse
*/
scope?: string | null;
/**
*
* @type {string}
* @memberof IntrospectResponse
*/
iss?: string | null;
/**
*
* @type {string}
* @memberof IntrospectResponse
*/
aud?: string | null;
/**
*
* @type {number}
* @memberof IntrospectResponse
*/
iat?: number | null;
/**
*
* @type {number}
* @memberof IntrospectResponse
*/
exp?: number | null;
/**
*
* @type {number}
* @memberof IntrospectResponse
*/
nbf?: number | null;
}
/**
* Check if a given object implements the IntrospectResponse interface.
*/
export function instanceOfIntrospectResponse(value: object): value is IntrospectResponse {
return true;
}
export function IntrospectResponseFromJSON(json: any): IntrospectResponse {
return IntrospectResponseFromJSONTyped(json, false);
}
export function IntrospectResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): IntrospectResponse {
if (json == null) {
return json;
}
return {
'jti': json['jti'] == null ? undefined : json['jti'],
'active': json['active'] == null ? undefined : json['active'],
'tokenType': json['token_type'] == null ? undefined : json['token_type'],
'clientId': json['client_id'] == null ? undefined : json['client_id'],
'sub': json['sub'] == null ? undefined : json['sub'],
'username': json['username'] == null ? undefined : json['username'],
'scope': json['scope'] == null ? undefined : json['scope'],
'iss': json['iss'] == null ? undefined : json['iss'],
'aud': json['aud'] == null ? undefined : json['aud'],
'iat': json['iat'] == null ? undefined : json['iat'],
'exp': json['exp'] == null ? undefined : json['exp'],
'nbf': json['nbf'] == null ? undefined : json['nbf'],
};
}
export function IntrospectResponseToJSON(json: any): IntrospectResponse {
return IntrospectResponseToJSONTyped(json, false);
}
export function IntrospectResponseToJSONTyped(value?: IntrospectResponse | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'jti': value['jti'],
'active': value['active'],
'token_type': value['tokenType'],
'client_id': value['clientId'],
'sub': value['sub'],
'username': value['username'],
'scope': value['scope'],
'iss': value['iss'],
'aud': value['aud'],
'iat': value['iat'],
'exp': value['exp'],
'nbf': value['nbf'],
};
}

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).

132
src/models/ModelFile.ts Normal file
View File

@@ -0,0 +1,132 @@
/* 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';
/**
*
* @export
* @interface ModelFile
*/
export interface ModelFile {
/**
*
* @type {string}
* @memberof ModelFile
*/
id?: string;
/**
*
* @type {string}
* @memberof ModelFile
*/
name: string | null;
/**
*
* @type {string}
* @memberof ModelFile
*/
contentType: string | null;
/**
*
* @type {string}
* @memberof ModelFile
*/
url: string | null;
/**
*
* @type {string}
* @memberof ModelFile
*/
hash?: string | null;
/**
*
* @type {string}
* @memberof ModelFile
*/
etag?: string | null;
/**
*
* @type {number}
* @memberof ModelFile
*/
size?: number;
/**
*
* @type {Date}
* @memberof ModelFile
*/
created?: Date;
/**
*
* @type {Date}
* @memberof ModelFile
*/
updated?: Date | null;
}
/**
* Check if a given object implements the ModelFile interface.
*/
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 ModelFileFromJSON(json: any): ModelFile {
return ModelFileFromJSONTyped(json, false);
}
export function ModelFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelFile {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'name': json['name'],
'contentType': json['content_type'],
'url': json['url'],
'hash': json['hash'] == null ? undefined : json['hash'],
'etag': json['etag'] == null ? undefined : json['etag'],
'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 ModelFileToJSON(json: any): ModelFile {
return ModelFileToJSONTyped(json, false);
}
export function ModelFileToJSONTyped(value?: ModelFile | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'name': value['name'],
'content_type': value['contentType'],
'url': value['url'],
'hash': value['hash'],
'etag': value['etag'],
'size': value['size'],
'created': value['created'] == null ? undefined : ((value['created']).toISOString()),
'updated': value['updated'] == null ? undefined : ((value['updated'] as any).toISOString()),
};
}

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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,6 +13,14 @@
*/
import { mapValues } from '../runtime';
import type { PackageRelease } from './PackageRelease';
import {
PackageReleaseFromJSON,
PackageReleaseFromJSONTyped,
PackageReleaseToJSON,
PackageReleaseToJSONTyped,
} from './PackageRelease';
/**
*
* @export
@@ -30,19 +38,13 @@ export interface Package {
* @type {string}
* @memberof Package
*/
name?: string | null;
name: string | null;
/**
*
* @type {string}
* @memberof Package
*/
description?: string | null;
/**
*
* @type {string}
* @memberof Package
*/
imageUrl?: string | null;
/**
*
* @type {string}
@@ -54,19 +56,13 @@ export interface Package {
* @type {string}
* @memberof Package
*/
version?: string | null;
imageUrl: string | null;
/**
*
* @type {string}
* @memberof Package
*/
fileUrl?: string | null;
/**
*
* @type {number}
* @memberof Package
*/
rawSize?: number;
applicationId?: string | null;
/**
*
* @type {number}
@@ -79,6 +75,12 @@ export interface Package {
* @memberof Package
*/
lastDownload?: Date | null;
/**
*
* @type {Array<PackageRelease>}
* @memberof Package
*/
releases?: Array<PackageRelease> | null;
/**
*
* @type {Date}
@@ -97,6 +99,8 @@ export interface Package {
* Check if a given object implements the Package interface.
*/
export function instanceOfPackage(value: object): value is Package {
if (!('name' in value) || value['name'] === undefined) return false;
if (!('imageUrl' in value) || value['imageUrl'] === undefined) return false;
return true;
}
@@ -111,15 +115,14 @@ export function PackageFromJSONTyped(json: any, ignoreDiscriminator: boolean): P
return {
'id': json['id'] == null ? undefined : json['id'],
'name': json['name'] == null ? undefined : json['name'],
'name': json['name'],
'description': json['description'] == null ? undefined : json['description'],
'imageUrl': json['image_url'] == null ? undefined : json['image_url'],
'authorId': json['author_id'] == null ? undefined : json['author_id'],
'version': json['version'] == null ? undefined : json['version'],
'fileUrl': json['file_url'] == null ? undefined : json['file_url'],
'rawSize': json['raw_size'] == null ? undefined : json['raw_size'],
'imageUrl': json['image_url'],
'applicationId': json['application_id'] == null ? undefined : json['application_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<any>).map(PackageReleaseFromJSON)),
'created': json['created'] == null ? undefined : (new Date(json['created'])),
'updated': json['updated'] == null ? undefined : (new Date(json['updated'])),
};
@@ -139,13 +142,12 @@ export function PackageToJSONTyped(value?: Package | null, ignoreDiscriminator:
'id': value['id'],
'name': value['name'],
'description': value['description'],
'image_url': value['imageUrl'],
'author_id': value['authorId'],
'version': value['version'],
'file_url': value['fileUrl'],
'raw_size': value['rawSize'],
'image_url': value['imageUrl'],
'application_id': value['applicationId'],
'download_count': value['downloadCount'],
'last_download': value['lastDownload'] == null ? undefined : ((value['lastDownload'] as any).toISOString()),
'releases': value['releases'] == null ? undefined : ((value['releases'] as Array<any>).map(PackageReleaseToJSON)),
'created': value['created'] == null ? undefined : ((value['created']).toISOString()),
'updated': value['updated'] == null ? undefined : ((value['updated'] as any).toISOString()),
};

View File

@@ -0,0 +1,113 @@
/* 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';
/**
*
* @export
* @interface PackageRelease
*/
export interface PackageRelease {
/**
*
* @type {string}
* @memberof PackageRelease
*/
id?: string;
/**
*
* @type {string}
* @memberof PackageRelease
*/
version: string | null;
/**
*
* @type {string}
* @memberof PackageRelease
*/
packageId?: string;
/**
*
* @type {string}
* @memberof PackageRelease
*/
notes?: string | null;
/**
*
* @type {Array<any>}
* @memberof PackageRelease
*/
readonly files?: Array<any> | null;
/**
*
* @type {Date}
* @memberof PackageRelease
*/
created?: Date;
/**
*
* @type {Date}
* @memberof PackageRelease
*/
updated?: Date | null;
}
/**
* Check if a given object implements the PackageRelease interface.
*/
export function instanceOfPackageRelease(value: object): value is PackageRelease {
if (!('version' in value) || value['version'] === undefined) return false;
return true;
}
export function PackageReleaseFromJSON(json: any): PackageRelease {
return PackageReleaseFromJSONTyped(json, false);
}
export function PackageReleaseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PackageRelease {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'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'],
'created': json['created'] == null ? undefined : (new Date(json['created'])),
'updated': json['updated'] == null ? undefined : (new Date(json['updated'])),
};
}
export function PackageReleaseToJSON(json: any): PackageRelease {
return PackageReleaseToJSONTyped(json, false);
}
export function PackageReleaseToJSONTyped(value?: Omit<PackageRelease, 'files'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'version': value['version'],
'package_id': value['packageId'],
'notes': value['notes'],
'created': value['created'] == null ? undefined : ((value['created']).toISOString()),
'updated': value['updated'] == null ? undefined : ((value['updated'] as any).toISOString()),
};
}

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).
@@ -32,13 +32,13 @@ export interface RevokeRequest {
* @type {string}
* @memberof RevokeRequest
*/
token?: string | null;
token: string | null;
/**
*
* @type {TokenHintType}
* @memberof RevokeRequest
*/
tokenTypeHint?: TokenHintType;
tokenTypeHint: TokenHintType;
}
@@ -47,6 +47,8 @@ export interface RevokeRequest {
* Check if a given object implements the RevokeRequest interface.
*/
export function instanceOfRevokeRequest(value: object): value is RevokeRequest {
if (!('token' in value) || value['token'] === undefined) return false;
if (!('tokenTypeHint' in value) || value['tokenTypeHint'] === undefined) return false;
return true;
}
@@ -60,8 +62,8 @@ export function RevokeRequestFromJSONTyped(json: any, ignoreDiscriminator: boole
}
return {
'token': json['token'] == null ? undefined : json['token'],
'tokenTypeHint': json['token_type_hint'] == null ? undefined : TokenHintTypeFromJSON(json['token_type_hint']),
'token': json['token'],
'tokenTypeHint': TokenHintTypeFromJSON(json['token_type_hint']),
};
}

101
src/models/Search.ts Normal file
View File

@@ -0,0 +1,101 @@
/* 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 { SearchType } from './SearchType';
import {
SearchTypeFromJSON,
SearchTypeFromJSONTyped,
SearchTypeToJSON,
SearchTypeToJSONTyped,
} from './SearchType';
/**
*
* @export
* @interface Search
*/
export interface Search {
/**
*
* @type {SearchType}
* @memberof Search
*/
type: SearchType;
/**
*
* @type {string}
* @memberof Search
*/
query: string | null;
/**
*
* @type {number}
* @memberof Search
*/
page?: number | null;
/**
*
* @type {string}
* @memberof Search
*/
gameId?: string | null;
}
/**
* Check if a given object implements the Search interface.
*/
export function instanceOfSearch(value: object): value is Search {
if (!('type' in value) || value['type'] === undefined) return false;
if (!('query' in value) || value['query'] === undefined) return false;
return true;
}
export function SearchFromJSON(json: any): Search {
return SearchFromJSONTyped(json, false);
}
export function SearchFromJSONTyped(json: any, ignoreDiscriminator: boolean): Search {
if (json == null) {
return json;
}
return {
'type': SearchTypeFromJSON(json['type']),
'query': json['query'],
'page': json['page'] == null ? undefined : json['page'],
'gameId': json['game_id'] == null ? undefined : json['game_id'],
};
}
export function SearchToJSON(json: any): Search {
return SearchToJSONTyped(json, false);
}
export function SearchToJSONTyped(value?: Search | 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'],
};
}

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).
@@ -20,8 +20,8 @@
export const SearchType = {
User: 'user',
Group: 'group',
Server: 'server',
Cluster: 'cluster'
GameServer: 'game_server',
GameServerCluster: 'game_server_cluster'
} as const;
export type SearchType = typeof SearchType[keyof typeof SearchType];

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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,6 +13,14 @@
*/
import { mapValues } from '../runtime';
import type { SubscriptionPrice } from './SubscriptionPrice';
import {
SubscriptionPriceFromJSON,
SubscriptionPriceFromJSONTyped,
SubscriptionPriceToJSON,
SubscriptionPriceToJSONTyped,
} from './SubscriptionPrice';
/**
*
* @export
@@ -30,7 +38,7 @@ export interface Subscription {
* @type {string}
* @memberof Subscription
*/
name?: string | null;
name: string | null;
/**
*
* @type {string}
@@ -45,10 +53,10 @@ export interface Subscription {
imageUrl?: string | null;
/**
*
* @type {{ [key: string]: number; }}
* @type {Array<SubscriptionPrice>}
* @memberof Subscription
*/
readonly prices?: { [key: string]: number; } | null;
prices?: Array<SubscriptionPrice> | null;
/**
*
* @type {Date}
@@ -67,6 +75,7 @@ export interface Subscription {
* 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;
}
@@ -81,10 +90,10 @@ export function SubscriptionFromJSONTyped(json: any, ignoreDiscriminator: boolea
return {
'id': json['id'] == null ? undefined : json['id'],
'name': json['name'] == null ? undefined : json['name'],
'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'],
'prices': json['prices'] == null ? undefined : ((json['prices'] as Array<any>).map(SubscriptionPriceFromJSON)),
'created': json['created'] == null ? undefined : (new Date(json['created'])),
'updated': json['updated'] == null ? undefined : (new Date(json['updated'])),
};
@@ -94,7 +103,7 @@ export function SubscriptionToJSON(json: any): Subscription {
return SubscriptionToJSONTyped(json, false);
}
export function SubscriptionToJSONTyped(value?: Omit<Subscription, 'prices'> | null, ignoreDiscriminator: boolean = false): any {
export function SubscriptionToJSONTyped(value?: Subscription | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
@@ -105,6 +114,7 @@ export function SubscriptionToJSONTyped(value?: Omit<Subscription, 'prices'> | n
'name': value['name'],
'description': value['description'],
'image_url': value['imageUrl'],
'prices': value['prices'] == null ? undefined : ((value['prices'] as Array<any>).map(SubscriptionPriceToJSON)),
'created': value['created'] == null ? undefined : ((value['created']).toISOString()),
'updated': value['updated'] == null ? undefined : ((value['updated'] as any).toISOString()),
};

View File

@@ -0,0 +1,83 @@
/* 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';
/**
*
* @export
* @interface SubscriptionPrice
*/
export interface SubscriptionPrice {
/**
*
* @type {string}
* @memberof SubscriptionPrice
*/
currency: string | null;
/**
*
* @type {number}
* @memberof SubscriptionPrice
*/
amount: number;
/**
*
* @type {number}
* @memberof SubscriptionPrice
*/
renewal?: number | null;
}
/**
* Check if a given object implements the SubscriptionPrice interface.
*/
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 SubscriptionPriceFromJSON(json: any): SubscriptionPrice {
return SubscriptionPriceFromJSONTyped(json, false);
}
export function SubscriptionPriceFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionPrice {
if (json == null) {
return json;
}
return {
'currency': json['currency'],
'amount': json['amount'],
'renewal': json['renewal'] == null ? undefined : json['renewal'],
};
}
export function SubscriptionPriceToJSON(json: any): SubscriptionPrice {
return SubscriptionPriceToJSONTyped(json, false);
}
export function SubscriptionPriceToJSONTyped(value?: SubscriptionPrice | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'currency': value['currency'],
'amount': value['amount'],
'renewal': value['renewal'],
};
}

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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,12 +57,6 @@ export interface TokenRequest {
* @memberof TokenRequest
*/
refreshToken?: string | null;
/**
*
* @type {string}
* @memberof TokenRequest
*/
clientId?: string | null;
/**
*
* @type {string}
@@ -101,7 +95,6 @@ export function TokenRequestFromJSONTyped(json: any, ignoreDiscriminator: boolea
'username': json['username'] == null ? undefined : json['username'],
'password': json['password'] == null ? undefined : json['password'],
'refreshToken': json['refresh_token'] == null ? undefined : json['refresh_token'],
'clientId': json['client_id'] == null ? undefined : json['client_id'],
'redirectUri': json['redirect_uri'] == null ? undefined : json['redirect_uri'],
'codeVerifier': json['code_verifier'] == null ? undefined : json['code_verifier'],
};
@@ -123,7 +116,6 @@ export function TokenRequestToJSONTyped(value?: TokenRequest | null, ignoreDiscr
'username': value['username'],
'password': value['password'],
'refresh_token': value['refreshToken'],
'client_id': value['clientId'],
'redirect_uri': value['redirectUri'],
'code_verifier': value['codeVerifier'],
};

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).
@@ -32,13 +32,13 @@ export interface TokenResponse {
* @type {TokenType}
* @memberof TokenResponse
*/
tokenType?: TokenType;
tokenType: TokenType;
/**
*
* @type {string}
* @memberof TokenResponse
*/
accessToken?: string | null;
accessToken: string | null;
/**
*
* @type {string}
@@ -71,6 +71,8 @@ export interface TokenResponse {
* Check if a given object implements the TokenResponse interface.
*/
export function instanceOfTokenResponse(value: object): value is TokenResponse {
if (!('tokenType' in value) || value['tokenType'] === undefined) return false;
if (!('accessToken' in value) || value['accessToken'] === undefined) return false;
return true;
}
@@ -84,8 +86,8 @@ export function TokenResponseFromJSONTyped(json: any, ignoreDiscriminator: boole
}
return {
'tokenType': json['token_type'] == null ? undefined : TokenTypeFromJSON(json['token_type']),
'accessToken': json['access_token'] == null ? undefined : json['access_token'],
'tokenType': TokenTypeFromJSON(json['token_type']),
'accessToken': json['access_token'],
'refreshToken': json['refresh_token'] == null ? undefined : json['refresh_token'],
'scope': json['scope'] == null ? undefined : json['scope'],
'state': json['state'] == null ? undefined : json['state'],

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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 UpdateProfile {
* @type {string}
* @memberof UpdateProfile
*/
displayName?: string | null;
displayName: string | null;
/**
*
* @type {string}
@@ -37,6 +37,7 @@ export interface UpdateProfile {
* Check if a given object implements the UpdateProfile interface.
*/
export function instanceOfUpdateProfile(value: object): value is UpdateProfile {
if (!('displayName' in value) || value['displayName'] === undefined) return false;
return true;
}
@@ -50,7 +51,7 @@ export function UpdateProfileFromJSONTyped(json: any, ignoreDiscriminator: boole
}
return {
'displayName': json['display_name'] == null ? undefined : json['display_name'],
'displayName': json['display_name'],
'biography': json['biography'] == null ? undefined : json['biography'],
};
}

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).
@@ -44,7 +44,7 @@ export interface UserInfo {
* @type {string}
* @memberof UserInfo
*/
name?: string | null;
name: string | null;
/**
*
* @type {string}
@@ -57,66 +57,18 @@ export interface UserInfo {
* @memberof UserInfo
*/
email?: string | null;
/**
*
* @type {boolean}
* @memberof UserInfo
*/
emailVerified?: boolean;
/**
*
* @type {UserType}
* @memberof UserInfo
*/
type?: UserType;
/**
*
* @type {string}
* @memberof UserInfo
*/
flags?: string;
/**
*
* @type {string}
* @memberof UserInfo
*/
permissions?: string;
/**
*
* @type {boolean}
* @memberof UserInfo
*/
verified?: boolean;
/**
*
* @type {number}
* @memberof UserInfo
*/
level?: number;
/**
*
* @type {number}
* @memberof UserInfo
*/
experience?: number;
/**
*
* @type {boolean}
* @memberof UserInfo
*/
publicBirthday?: boolean;
/**
*
* @type {Date}
* @memberof UserInfo
*/
birthday?: Date | null;
/**
*
* @type {number}
* @memberof UserInfo
*/
points?: number;
/**
*
* @type {string}
* @memberof UserInfo
*/
location?: string | null;
/**
*
* @type {string}
@@ -143,28 +95,10 @@ export interface UserInfo {
photoUrl?: string | null;
/**
*
* @type {string}
* @type {Array<string>}
* @memberof UserInfo
*/
bannerUrl?: string | null;
/**
*
* @type {Date}
* @memberof UserInfo
*/
lastOnline?: Date | null;
/**
*
* @type {string}
* @memberof UserInfo
*/
biography?: string | null;
/**
*
* @type {number}
* @memberof UserInfo
*/
viewCount?: number;
permissions?: Array<string> | null;
/**
*
* @type {Date}
@@ -185,6 +119,7 @@ export interface UserInfo {
* Check if a given object implements the UserInfo interface.
*/
export function instanceOfUserInfo(value: object): value is UserInfo {
if (!('name' in value) || value['name'] === undefined) return false;
return true;
}
@@ -200,27 +135,16 @@ export function UserInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean):
'id': json['id'] == null ? undefined : json['id'],
'uuid': json['uuid'] == null ? undefined : json['uuid'],
'name': json['name'] == null ? undefined : json['name'],
'name': json['name'],
'displayName': json['display_name'] == null ? undefined : json['display_name'],
'email': json['email'] == null ? undefined : json['email'],
'emailVerified': json['email_verified'] == null ? undefined : json['email_verified'],
'type': json['type'] == null ? undefined : UserTypeFromJSON(json['type']),
'flags': json['flags'] == null ? undefined : json['flags'],
'permissions': json['permissions'] == null ? undefined : json['permissions'],
'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'],
'language': json['language'] == null ? undefined : json['language'],
'timezone': json['timezone'] == null ? undefined : json['timezone'],
'currency': json['currency'] == null ? undefined : json['currency'],
'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'],
'viewCount': json['view_count'] == null ? undefined : json['view_count'],
'permissions': json['permissions'] == null ? undefined : json['permissions'],
'created': json['created'] == null ? undefined : (new Date(json['created'])),
'updated': json['updated'] == null ? undefined : (new Date(json['updated'])),
};
@@ -242,24 +166,13 @@ export function UserInfoToJSONTyped(value?: UserInfo | null, ignoreDiscriminator
'name': value['name'],
'display_name': value['displayName'],
'email': value['email'],
'email_verified': value['emailVerified'],
'type': UserTypeToJSON(value['type']),
'flags': value['flags'],
'permissions': value['permissions'],
'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'],
'language': value['language'],
'timezone': value['timezone'],
'currency': value['currency'],
'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'],
'permissions': value['permissions'],
'created': value['created'] == null ? undefined : ((value['created']).toISOString()),
'updated': value['updated'] == null ? undefined : ((value['updated'] as any).toISOString()),
};

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).

View File

@@ -4,11 +4,18 @@ export * from './Account';
export * from './Application';
export * from './ApplicationType';
export * from './AuthorizeRequest';
export * from './Client';
export * from './ClientInfo';
export * from './ClientType';
export * from './CodeChallengeMethod';
export * from './CodeResponse';
export * from './CreateUser';
export * from './CryptoViewModel';
export * from './Game';
export * from './GameServer';
export * from './GameServerCluster';
export * from './GameServerQuery';
export * from './GameServerStatus';
export * from './GrantType';
export * from './Group';
export * from './GroupGame';
@@ -16,25 +23,24 @@ export * from './GroupMember';
export * from './GroupRank';
export * from './HashViewModel';
export * from './IntrospectRequest';
export * from './IntrospectResponse';
export * from './IpAddress';
export * from './LeaderboardItem';
export * from './LeaderboardOrder';
export * from './LoginProvider';
export * from './LoginRequest';
export * from './LoginResponse';
export * from './ModelFile';
export * from './Package';
export * from './PackageRelease';
export * from './Profile';
export * from './ProfileGame';
export * from './ProfileGroup';
export * from './RefreshRequest';
export * from './RegisterRequest';
export * from './ResponseType';
export * from './RevokeRequest';
export * from './SearchRequest';
export * from './Search';
export * from './SearchType';
export * from './ServerMetrics';
export * from './ServerStatus';
export * from './Subscription';
export * from './SubscriptionPrice';
export * from './TokenHintType';
export * from './TokenRequest';
export * from './TokenResponse';

View File

@@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Tribufu API
* REST API to access Tribufu services.
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.1.0
* 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).