@rebornteam/reborn-api 2.8.0 → 2.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +2 -0
- package/README.md +5 -2
- package/api.ts +86 -1
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +43 -1
- package/dist/api.js +69 -2
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/esm/api.d.ts +43 -1
- package/dist/esm/api.js +68 -1
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/AdminConnectionsApi.md +3 -3
- package/docs/AdminDashboardApi.md +1 -1
- package/docs/AdminPlayersApi.md +2 -2
- package/docs/AdminPunishmentsApi.md +4 -4
- package/docs/AuthenticationApi.md +46 -0
- package/docs/Rank.md +12 -0
- package/docs/UserProfileResponse.md +30 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -47,11 +47,13 @@ docs/PunishmentGetPunishmentResponse.md
|
|
|
47
47
|
docs/PunishmentSeveritiesResponse.md
|
|
48
48
|
docs/PunishmentSeveritiesResponsePunishmentTypeInfo.md
|
|
49
49
|
docs/PunishmentSeveritiesResponseSeverityInfo.md
|
|
50
|
+
docs/Rank.md
|
|
50
51
|
docs/ServerRegisterRequest.md
|
|
51
52
|
docs/ServerSessionDTO.md
|
|
52
53
|
docs/ServerSessionsApi.md
|
|
53
54
|
docs/TokenRequest.md
|
|
54
55
|
docs/UpdateClientRequest.md
|
|
56
|
+
docs/UserProfileResponse.md
|
|
55
57
|
git_push.sh
|
|
56
58
|
index.ts
|
|
57
59
|
package.json
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @rebornteam/reborn-api@2.
|
|
1
|
+
## @rebornteam/reborn-api@2.9.1
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @rebornteam/reborn-api@2.
|
|
39
|
+
npm install @rebornteam/reborn-api@2.9.1 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -70,6 +70,7 @@ Class | Method | HTTP request | Description
|
|
|
70
70
|
*AdminPunishmentsApi* | [**searchTargets**](docs/AdminPunishmentsApi.md#searchtargets) | **GET** /admin/punishment/search | Search punishment targets
|
|
71
71
|
*AuthenticationApi* | [**callback**](docs/AuthenticationApi.md#callback) | **GET** /auth/discord/callback | Discord - OAuth2 callback
|
|
72
72
|
*AuthenticationApi* | [**initiateLogin**](docs/AuthenticationApi.md#initiatelogin) | **GET** /auth/discord | Discord - Initiate login
|
|
73
|
+
*AuthenticationApi* | [**me**](docs/AuthenticationApi.md#me) | **GET** /auth/me | Get current user profile
|
|
73
74
|
*AuthenticationApi* | [**token**](docs/AuthenticationApi.md#token) | **POST** /oauth/token | Service - Exchange client credentials for token
|
|
74
75
|
*ChatApi* | [**history**](docs/ChatApi.md#history) | **GET** /v1/chat | Get chat history
|
|
75
76
|
*ChatApi* | [**ingest**](docs/ChatApi.md#ingest) | **POST** /v1/chat | Ingest a chat message
|
|
@@ -120,10 +121,12 @@ Class | Method | HTTP request | Description
|
|
|
120
121
|
- [PunishmentSeveritiesResponse](docs/PunishmentSeveritiesResponse.md)
|
|
121
122
|
- [PunishmentSeveritiesResponsePunishmentTypeInfo](docs/PunishmentSeveritiesResponsePunishmentTypeInfo.md)
|
|
122
123
|
- [PunishmentSeveritiesResponseSeverityInfo](docs/PunishmentSeveritiesResponseSeverityInfo.md)
|
|
124
|
+
- [Rank](docs/Rank.md)
|
|
123
125
|
- [ServerRegisterRequest](docs/ServerRegisterRequest.md)
|
|
124
126
|
- [ServerSessionDTO](docs/ServerSessionDTO.md)
|
|
125
127
|
- [TokenRequest](docs/TokenRequest.md)
|
|
126
128
|
- [UpdateClientRequest](docs/UpdateClientRequest.md)
|
|
129
|
+
- [UserProfileResponse](docs/UserProfileResponse.md)
|
|
127
130
|
|
|
128
131
|
|
|
129
132
|
<a id="documentation-for-authorization"></a>
|
package/api.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Reborn API
|
|
5
5
|
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 2.
|
|
7
|
+
* The version of the OpenAPI document: 2.9.1
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -689,6 +689,16 @@ export interface PunishmentSeveritiesResponseSeverityInfo {
|
|
|
689
689
|
*/
|
|
690
690
|
'durationSeconds'?: number;
|
|
691
691
|
}
|
|
692
|
+
|
|
693
|
+
export const Rank = {
|
|
694
|
+
Administrator: 'ADMINISTRATOR',
|
|
695
|
+
Moderator: 'MODERATOR',
|
|
696
|
+
Service: 'SERVICE'
|
|
697
|
+
} as const;
|
|
698
|
+
|
|
699
|
+
export type Rank = typeof Rank[keyof typeof Rank];
|
|
700
|
+
|
|
701
|
+
|
|
692
702
|
export interface ServerRegisterRequest {
|
|
693
703
|
'region': string;
|
|
694
704
|
'gameType': string;
|
|
@@ -723,6 +733,16 @@ export interface UpdateClientRequest {
|
|
|
723
733
|
*/
|
|
724
734
|
'description'?: string;
|
|
725
735
|
}
|
|
736
|
+
export interface UserProfileResponse {
|
|
737
|
+
'id': string;
|
|
738
|
+
'username': string;
|
|
739
|
+
'avatarUrl': string;
|
|
740
|
+
'rank': Rank;
|
|
741
|
+
'roles': Array<string>;
|
|
742
|
+
'discordRoles': Array<string>;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
|
|
726
746
|
|
|
727
747
|
/**
|
|
728
748
|
* AdminClientCredentialsApi - axios parameter creator
|
|
@@ -2347,6 +2367,40 @@ export const AuthenticationApiAxiosParamCreator = function (configuration?: Conf
|
|
|
2347
2367
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
2348
2368
|
|
|
2349
2369
|
|
|
2370
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2371
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2372
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
2373
|
+
|
|
2374
|
+
return {
|
|
2375
|
+
url: toPathString(localVarUrlObj),
|
|
2376
|
+
options: localVarRequestOptions,
|
|
2377
|
+
};
|
|
2378
|
+
},
|
|
2379
|
+
/**
|
|
2380
|
+
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
2381
|
+
* @summary Get current user profile
|
|
2382
|
+
* @param {*} [options] Override http request option.
|
|
2383
|
+
* @throws {RequiredError}
|
|
2384
|
+
*/
|
|
2385
|
+
me: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
2386
|
+
const localVarPath = `/auth/me`;
|
|
2387
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2388
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2389
|
+
let baseOptions;
|
|
2390
|
+
if (configuration) {
|
|
2391
|
+
baseOptions = configuration.baseOptions;
|
|
2392
|
+
}
|
|
2393
|
+
|
|
2394
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
2395
|
+
const localVarHeaderParameter = {} as any;
|
|
2396
|
+
const localVarQueryParameter = {} as any;
|
|
2397
|
+
|
|
2398
|
+
// authentication DiscordAuth required
|
|
2399
|
+
// http bearer authentication required
|
|
2400
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
2401
|
+
|
|
2402
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
2403
|
+
|
|
2350
2404
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2351
2405
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2352
2406
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -2443,6 +2497,18 @@ export const AuthenticationApiFp = function(configuration?: Configuration) {
|
|
|
2443
2497
|
const localVarOperationServerBasePath = operationServerMap['AuthenticationApi.initiateLogin']?.[localVarOperationServerIndex]?.url;
|
|
2444
2498
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2445
2499
|
},
|
|
2500
|
+
/**
|
|
2501
|
+
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
2502
|
+
* @summary Get current user profile
|
|
2503
|
+
* @param {*} [options] Override http request option.
|
|
2504
|
+
* @throws {RequiredError}
|
|
2505
|
+
*/
|
|
2506
|
+
async me(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserProfileResponse>> {
|
|
2507
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.me(options);
|
|
2508
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2509
|
+
const localVarOperationServerBasePath = operationServerMap['AuthenticationApi.me']?.[localVarOperationServerIndex]?.url;
|
|
2510
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2511
|
+
},
|
|
2446
2512
|
/**
|
|
2447
2513
|
* Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
|
|
2448
2514
|
* @summary Service - Exchange client credentials for token
|
|
@@ -2487,6 +2553,15 @@ export const AuthenticationApiFactory = function (configuration?: Configuration,
|
|
|
2487
2553
|
initiateLogin(options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
2488
2554
|
return localVarFp.initiateLogin(options).then((request) => request(axios, basePath));
|
|
2489
2555
|
},
|
|
2556
|
+
/**
|
|
2557
|
+
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
2558
|
+
* @summary Get current user profile
|
|
2559
|
+
* @param {*} [options] Override http request option.
|
|
2560
|
+
* @throws {RequiredError}
|
|
2561
|
+
*/
|
|
2562
|
+
me(options?: RawAxiosRequestConfig): AxiosPromise<UserProfileResponse> {
|
|
2563
|
+
return localVarFp.me(options).then((request) => request(axios, basePath));
|
|
2564
|
+
},
|
|
2490
2565
|
/**
|
|
2491
2566
|
* Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
|
|
2492
2567
|
* @summary Service - Exchange client credentials for token
|
|
@@ -2528,6 +2603,16 @@ export class AuthenticationApi extends BaseAPI {
|
|
|
2528
2603
|
return AuthenticationApiFp(this.configuration).initiateLogin(options).then((request) => request(this.axios, this.basePath));
|
|
2529
2604
|
}
|
|
2530
2605
|
|
|
2606
|
+
/**
|
|
2607
|
+
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
2608
|
+
* @summary Get current user profile
|
|
2609
|
+
* @param {*} [options] Override http request option.
|
|
2610
|
+
* @throws {RequiredError}
|
|
2611
|
+
*/
|
|
2612
|
+
public me(options?: RawAxiosRequestConfig) {
|
|
2613
|
+
return AuthenticationApiFp(this.configuration).me(options).then((request) => request(this.axios, this.basePath));
|
|
2614
|
+
}
|
|
2615
|
+
|
|
2531
2616
|
/**
|
|
2532
2617
|
* Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
|
|
2533
2618
|
* @summary Service - Exchange client credentials for token
|
package/base.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Reborn API
|
|
5
5
|
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 2.
|
|
7
|
+
* The version of the OpenAPI document: 2.9.1
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/common.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Reborn API
|
|
5
5
|
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 2.
|
|
7
|
+
* The version of the OpenAPI document: 2.9.1
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/configuration.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Reborn API
|
|
4
4
|
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
5
5
|
*
|
|
6
|
-
* The version of the OpenAPI document: 2.
|
|
6
|
+
* The version of the OpenAPI document: 2.9.1
|
|
7
7
|
*
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/api.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Reborn API
|
|
3
3
|
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 2.
|
|
5
|
+
* The version of the OpenAPI document: 2.9.1
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -670,6 +670,12 @@ export interface PunishmentSeveritiesResponseSeverityInfo {
|
|
|
670
670
|
*/
|
|
671
671
|
'durationSeconds'?: number;
|
|
672
672
|
}
|
|
673
|
+
export declare const Rank: {
|
|
674
|
+
readonly Administrator: "ADMINISTRATOR";
|
|
675
|
+
readonly Moderator: "MODERATOR";
|
|
676
|
+
readonly Service: "SERVICE";
|
|
677
|
+
};
|
|
678
|
+
export type Rank = typeof Rank[keyof typeof Rank];
|
|
673
679
|
export interface ServerRegisterRequest {
|
|
674
680
|
'region': string;
|
|
675
681
|
'gameType': string;
|
|
@@ -704,6 +710,14 @@ export interface UpdateClientRequest {
|
|
|
704
710
|
*/
|
|
705
711
|
'description'?: string;
|
|
706
712
|
}
|
|
713
|
+
export interface UserProfileResponse {
|
|
714
|
+
'id': string;
|
|
715
|
+
'username': string;
|
|
716
|
+
'avatarUrl': string;
|
|
717
|
+
'rank': Rank;
|
|
718
|
+
'roles': Array<string>;
|
|
719
|
+
'discordRoles': Array<string>;
|
|
720
|
+
}
|
|
707
721
|
/**
|
|
708
722
|
* AdminClientCredentialsApi - axios parameter creator
|
|
709
723
|
*/
|
|
@@ -1440,6 +1454,13 @@ export declare const AuthenticationApiAxiosParamCreator: (configuration?: Config
|
|
|
1440
1454
|
* @throws {RequiredError}
|
|
1441
1455
|
*/
|
|
1442
1456
|
initiateLogin: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
1457
|
+
/**
|
|
1458
|
+
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
1459
|
+
* @summary Get current user profile
|
|
1460
|
+
* @param {*} [options] Override http request option.
|
|
1461
|
+
* @throws {RequiredError}
|
|
1462
|
+
*/
|
|
1463
|
+
me: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
1443
1464
|
/**
|
|
1444
1465
|
* Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
|
|
1445
1466
|
* @summary Service - Exchange client credentials for token
|
|
@@ -1471,6 +1492,13 @@ export declare const AuthenticationApiFp: (configuration?: Configuration) => {
|
|
|
1471
1492
|
* @throws {RequiredError}
|
|
1472
1493
|
*/
|
|
1473
1494
|
initiateLogin(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
1495
|
+
/**
|
|
1496
|
+
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
1497
|
+
* @summary Get current user profile
|
|
1498
|
+
* @param {*} [options] Override http request option.
|
|
1499
|
+
* @throws {RequiredError}
|
|
1500
|
+
*/
|
|
1501
|
+
me(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserProfileResponse>>;
|
|
1474
1502
|
/**
|
|
1475
1503
|
* Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
|
|
1476
1504
|
* @summary Service - Exchange client credentials for token
|
|
@@ -1502,6 +1530,13 @@ export declare const AuthenticationApiFactory: (configuration?: Configuration, b
|
|
|
1502
1530
|
* @throws {RequiredError}
|
|
1503
1531
|
*/
|
|
1504
1532
|
initiateLogin(options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
1533
|
+
/**
|
|
1534
|
+
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
1535
|
+
* @summary Get current user profile
|
|
1536
|
+
* @param {*} [options] Override http request option.
|
|
1537
|
+
* @throws {RequiredError}
|
|
1538
|
+
*/
|
|
1539
|
+
me(options?: RawAxiosRequestConfig): AxiosPromise<UserProfileResponse>;
|
|
1505
1540
|
/**
|
|
1506
1541
|
* Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
|
|
1507
1542
|
* @summary Service - Exchange client credentials for token
|
|
@@ -1533,6 +1568,13 @@ export declare class AuthenticationApi extends BaseAPI {
|
|
|
1533
1568
|
* @throws {RequiredError}
|
|
1534
1569
|
*/
|
|
1535
1570
|
initiateLogin(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
1571
|
+
/**
|
|
1572
|
+
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
1573
|
+
* @summary Get current user profile
|
|
1574
|
+
* @param {*} [options] Override http request option.
|
|
1575
|
+
* @throws {RequiredError}
|
|
1576
|
+
*/
|
|
1577
|
+
me(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<UserProfileResponse, any, {}>>;
|
|
1536
1578
|
/**
|
|
1537
1579
|
* Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
|
|
1538
1580
|
* @summary Service - Exchange client credentials for token
|
package/dist/api.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Reborn API
|
|
6
6
|
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 2.
|
|
8
|
+
* The version of the OpenAPI document: 2.9.1
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.ServerSessionsApi = exports.ServerSessionsApiFactory = exports.ServerSessionsApiFp = exports.ServerSessionsApiAxiosParamCreator = exports.PunishmentApi = exports.PunishmentApiFactory = exports.PunishmentApiFp = exports.PunishmentApiAxiosParamCreator = exports.PlayerApi = exports.PlayerApiFactory = exports.PlayerApiFp = exports.PlayerApiAxiosParamCreator = exports.ConnectionApi = exports.ConnectionApiFactory = exports.ConnectionApiFp = exports.ConnectionApiAxiosParamCreator = exports.ChatApi = exports.ChatApiFactory = exports.ChatApiFp = exports.ChatApiAxiosParamCreator = exports.AuthenticationApi = exports.AuthenticationApiFactory = exports.AuthenticationApiFp = exports.AuthenticationApiAxiosParamCreator = exports.AdminPunishmentsApi = exports.AdminPunishmentsApiFactory = exports.AdminPunishmentsApiFp = exports.AdminPunishmentsApiAxiosParamCreator = exports.AdminPlayersApi = exports.AdminPlayersApiFactory = exports.AdminPlayersApiFp = exports.AdminPlayersApiAxiosParamCreator = exports.AdminDashboardApi = exports.AdminDashboardApiFactory = exports.AdminDashboardApiFp = exports.AdminDashboardApiAxiosParamCreator = exports.AdminConnectionsApi = exports.AdminConnectionsApiFactory = exports.AdminConnectionsApiFp = exports.AdminConnectionsApiAxiosParamCreator = exports.AdminClientCredentialsApi = exports.AdminClientCredentialsApiFactory = exports.AdminClientCredentialsApiFp = exports.AdminClientCredentialsApiAxiosParamCreator = exports.AdminPunishmentSearchResponseKindEnum = exports.AdminCreatePunishmentDraftRequestTypeEnum = exports.AdminApplyPunishmentRequestTypeEnum = void 0;
|
|
25
|
+
exports.ServerSessionsApi = exports.ServerSessionsApiFactory = exports.ServerSessionsApiFp = exports.ServerSessionsApiAxiosParamCreator = exports.PunishmentApi = exports.PunishmentApiFactory = exports.PunishmentApiFp = exports.PunishmentApiAxiosParamCreator = exports.PlayerApi = exports.PlayerApiFactory = exports.PlayerApiFp = exports.PlayerApiAxiosParamCreator = exports.ConnectionApi = exports.ConnectionApiFactory = exports.ConnectionApiFp = exports.ConnectionApiAxiosParamCreator = exports.ChatApi = exports.ChatApiFactory = exports.ChatApiFp = exports.ChatApiAxiosParamCreator = exports.AuthenticationApi = exports.AuthenticationApiFactory = exports.AuthenticationApiFp = exports.AuthenticationApiAxiosParamCreator = exports.AdminPunishmentsApi = exports.AdminPunishmentsApiFactory = exports.AdminPunishmentsApiFp = exports.AdminPunishmentsApiAxiosParamCreator = exports.AdminPlayersApi = exports.AdminPlayersApiFactory = exports.AdminPlayersApiFp = exports.AdminPlayersApiAxiosParamCreator = exports.AdminDashboardApi = exports.AdminDashboardApiFactory = exports.AdminDashboardApiFp = exports.AdminDashboardApiAxiosParamCreator = exports.AdminConnectionsApi = exports.AdminConnectionsApiFactory = exports.AdminConnectionsApiFp = exports.AdminConnectionsApiAxiosParamCreator = exports.AdminClientCredentialsApi = exports.AdminClientCredentialsApiFactory = exports.AdminClientCredentialsApiFp = exports.AdminClientCredentialsApiAxiosParamCreator = exports.Rank = exports.AdminPunishmentSearchResponseKindEnum = exports.AdminCreatePunishmentDraftRequestTypeEnum = exports.AdminApplyPunishmentRequestTypeEnum = void 0;
|
|
26
26
|
const axios_1 = require("axios");
|
|
27
27
|
// Some imports not used depending on template conditions
|
|
28
28
|
// @ts-ignore
|
|
@@ -43,6 +43,11 @@ exports.AdminPunishmentSearchResponseKindEnum = {
|
|
|
43
43
|
Player: 'player',
|
|
44
44
|
Ip: 'ip'
|
|
45
45
|
};
|
|
46
|
+
exports.Rank = {
|
|
47
|
+
Administrator: 'ADMINISTRATOR',
|
|
48
|
+
Moderator: 'MODERATOR',
|
|
49
|
+
Service: 'SERVICE'
|
|
50
|
+
};
|
|
46
51
|
/**
|
|
47
52
|
* AdminClientCredentialsApi - axios parameter creator
|
|
48
53
|
*/
|
|
@@ -1583,6 +1588,35 @@ const AuthenticationApiAxiosParamCreator = function (configuration) {
|
|
|
1583
1588
|
options: localVarRequestOptions,
|
|
1584
1589
|
};
|
|
1585
1590
|
}),
|
|
1591
|
+
/**
|
|
1592
|
+
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
1593
|
+
* @summary Get current user profile
|
|
1594
|
+
* @param {*} [options] Override http request option.
|
|
1595
|
+
* @throws {RequiredError}
|
|
1596
|
+
*/
|
|
1597
|
+
me: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
1598
|
+
const localVarPath = `/auth/me`;
|
|
1599
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1600
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1601
|
+
let baseOptions;
|
|
1602
|
+
if (configuration) {
|
|
1603
|
+
baseOptions = configuration.baseOptions;
|
|
1604
|
+
}
|
|
1605
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1606
|
+
const localVarHeaderParameter = {};
|
|
1607
|
+
const localVarQueryParameter = {};
|
|
1608
|
+
// authentication DiscordAuth required
|
|
1609
|
+
// http bearer authentication required
|
|
1610
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1611
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1612
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1613
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1614
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1615
|
+
return {
|
|
1616
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1617
|
+
options: localVarRequestOptions,
|
|
1618
|
+
};
|
|
1619
|
+
}),
|
|
1586
1620
|
/**
|
|
1587
1621
|
* Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
|
|
1588
1622
|
* @summary Service - Exchange client credentials for token
|
|
@@ -1668,6 +1702,21 @@ const AuthenticationApiFp = function (configuration) {
|
|
|
1668
1702
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1669
1703
|
});
|
|
1670
1704
|
},
|
|
1705
|
+
/**
|
|
1706
|
+
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
1707
|
+
* @summary Get current user profile
|
|
1708
|
+
* @param {*} [options] Override http request option.
|
|
1709
|
+
* @throws {RequiredError}
|
|
1710
|
+
*/
|
|
1711
|
+
me(options) {
|
|
1712
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1713
|
+
var _a, _b, _c;
|
|
1714
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.me(options);
|
|
1715
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1716
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AuthenticationApi.me']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1717
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1718
|
+
});
|
|
1719
|
+
},
|
|
1671
1720
|
/**
|
|
1672
1721
|
* Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
|
|
1673
1722
|
* @summary Service - Exchange client credentials for token
|
|
@@ -1715,6 +1764,15 @@ const AuthenticationApiFactory = function (configuration, basePath, axios) {
|
|
|
1715
1764
|
initiateLogin(options) {
|
|
1716
1765
|
return localVarFp.initiateLogin(options).then((request) => request(axios, basePath));
|
|
1717
1766
|
},
|
|
1767
|
+
/**
|
|
1768
|
+
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
1769
|
+
* @summary Get current user profile
|
|
1770
|
+
* @param {*} [options] Override http request option.
|
|
1771
|
+
* @throws {RequiredError}
|
|
1772
|
+
*/
|
|
1773
|
+
me(options) {
|
|
1774
|
+
return localVarFp.me(options).then((request) => request(axios, basePath));
|
|
1775
|
+
},
|
|
1718
1776
|
/**
|
|
1719
1777
|
* Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
|
|
1720
1778
|
* @summary Service - Exchange client credentials for token
|
|
@@ -1754,6 +1812,15 @@ class AuthenticationApi extends base_1.BaseAPI {
|
|
|
1754
1812
|
initiateLogin(options) {
|
|
1755
1813
|
return (0, exports.AuthenticationApiFp)(this.configuration).initiateLogin(options).then((request) => request(this.axios, this.basePath));
|
|
1756
1814
|
}
|
|
1815
|
+
/**
|
|
1816
|
+
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
1817
|
+
* @summary Get current user profile
|
|
1818
|
+
* @param {*} [options] Override http request option.
|
|
1819
|
+
* @throws {RequiredError}
|
|
1820
|
+
*/
|
|
1821
|
+
me(options) {
|
|
1822
|
+
return (0, exports.AuthenticationApiFp)(this.configuration).me(options).then((request) => request(this.axios, this.basePath));
|
|
1823
|
+
}
|
|
1757
1824
|
/**
|
|
1758
1825
|
* Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
|
|
1759
1826
|
* @summary Service - Exchange client credentials for token
|
package/dist/base.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Reborn API
|
|
3
3
|
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 2.
|
|
5
|
+
* The version of the OpenAPI document: 2.9.1
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/base.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Reborn API
|
|
6
6
|
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 2.
|
|
8
|
+
* The version of the OpenAPI document: 2.9.1
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/common.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Reborn API
|
|
3
3
|
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 2.
|
|
5
|
+
* The version of the OpenAPI document: 2.9.1
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/common.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Reborn API
|
|
6
6
|
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 2.
|
|
8
|
+
* The version of the OpenAPI document: 2.9.1
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/configuration.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Reborn API
|
|
3
3
|
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 2.
|
|
5
|
+
* The version of the OpenAPI document: 2.9.1
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/configuration.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Reborn API
|
|
5
5
|
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 2.
|
|
7
|
+
* The version of the OpenAPI document: 2.9.1
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/esm/api.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Reborn API
|
|
3
3
|
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 2.
|
|
5
|
+
* The version of the OpenAPI document: 2.9.1
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -670,6 +670,12 @@ export interface PunishmentSeveritiesResponseSeverityInfo {
|
|
|
670
670
|
*/
|
|
671
671
|
'durationSeconds'?: number;
|
|
672
672
|
}
|
|
673
|
+
export declare const Rank: {
|
|
674
|
+
readonly Administrator: "ADMINISTRATOR";
|
|
675
|
+
readonly Moderator: "MODERATOR";
|
|
676
|
+
readonly Service: "SERVICE";
|
|
677
|
+
};
|
|
678
|
+
export type Rank = typeof Rank[keyof typeof Rank];
|
|
673
679
|
export interface ServerRegisterRequest {
|
|
674
680
|
'region': string;
|
|
675
681
|
'gameType': string;
|
|
@@ -704,6 +710,14 @@ export interface UpdateClientRequest {
|
|
|
704
710
|
*/
|
|
705
711
|
'description'?: string;
|
|
706
712
|
}
|
|
713
|
+
export interface UserProfileResponse {
|
|
714
|
+
'id': string;
|
|
715
|
+
'username': string;
|
|
716
|
+
'avatarUrl': string;
|
|
717
|
+
'rank': Rank;
|
|
718
|
+
'roles': Array<string>;
|
|
719
|
+
'discordRoles': Array<string>;
|
|
720
|
+
}
|
|
707
721
|
/**
|
|
708
722
|
* AdminClientCredentialsApi - axios parameter creator
|
|
709
723
|
*/
|
|
@@ -1440,6 +1454,13 @@ export declare const AuthenticationApiAxiosParamCreator: (configuration?: Config
|
|
|
1440
1454
|
* @throws {RequiredError}
|
|
1441
1455
|
*/
|
|
1442
1456
|
initiateLogin: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
1457
|
+
/**
|
|
1458
|
+
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
1459
|
+
* @summary Get current user profile
|
|
1460
|
+
* @param {*} [options] Override http request option.
|
|
1461
|
+
* @throws {RequiredError}
|
|
1462
|
+
*/
|
|
1463
|
+
me: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
1443
1464
|
/**
|
|
1444
1465
|
* Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
|
|
1445
1466
|
* @summary Service - Exchange client credentials for token
|
|
@@ -1471,6 +1492,13 @@ export declare const AuthenticationApiFp: (configuration?: Configuration) => {
|
|
|
1471
1492
|
* @throws {RequiredError}
|
|
1472
1493
|
*/
|
|
1473
1494
|
initiateLogin(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
1495
|
+
/**
|
|
1496
|
+
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
1497
|
+
* @summary Get current user profile
|
|
1498
|
+
* @param {*} [options] Override http request option.
|
|
1499
|
+
* @throws {RequiredError}
|
|
1500
|
+
*/
|
|
1501
|
+
me(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserProfileResponse>>;
|
|
1474
1502
|
/**
|
|
1475
1503
|
* Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
|
|
1476
1504
|
* @summary Service - Exchange client credentials for token
|
|
@@ -1502,6 +1530,13 @@ export declare const AuthenticationApiFactory: (configuration?: Configuration, b
|
|
|
1502
1530
|
* @throws {RequiredError}
|
|
1503
1531
|
*/
|
|
1504
1532
|
initiateLogin(options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
1533
|
+
/**
|
|
1534
|
+
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
1535
|
+
* @summary Get current user profile
|
|
1536
|
+
* @param {*} [options] Override http request option.
|
|
1537
|
+
* @throws {RequiredError}
|
|
1538
|
+
*/
|
|
1539
|
+
me(options?: RawAxiosRequestConfig): AxiosPromise<UserProfileResponse>;
|
|
1505
1540
|
/**
|
|
1506
1541
|
* Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
|
|
1507
1542
|
* @summary Service - Exchange client credentials for token
|
|
@@ -1533,6 +1568,13 @@ export declare class AuthenticationApi extends BaseAPI {
|
|
|
1533
1568
|
* @throws {RequiredError}
|
|
1534
1569
|
*/
|
|
1535
1570
|
initiateLogin(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
1571
|
+
/**
|
|
1572
|
+
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
1573
|
+
* @summary Get current user profile
|
|
1574
|
+
* @param {*} [options] Override http request option.
|
|
1575
|
+
* @throws {RequiredError}
|
|
1576
|
+
*/
|
|
1577
|
+
me(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<UserProfileResponse, any, {}>>;
|
|
1536
1578
|
/**
|
|
1537
1579
|
* Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
|
|
1538
1580
|
* @summary Service - Exchange client credentials for token
|
package/dist/esm/api.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Reborn API
|
|
5
5
|
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 2.
|
|
7
|
+
* The version of the OpenAPI document: 2.9.1
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -40,6 +40,11 @@ export const AdminPunishmentSearchResponseKindEnum = {
|
|
|
40
40
|
Player: 'player',
|
|
41
41
|
Ip: 'ip'
|
|
42
42
|
};
|
|
43
|
+
export const Rank = {
|
|
44
|
+
Administrator: 'ADMINISTRATOR',
|
|
45
|
+
Moderator: 'MODERATOR',
|
|
46
|
+
Service: 'SERVICE'
|
|
47
|
+
};
|
|
43
48
|
/**
|
|
44
49
|
* AdminClientCredentialsApi - axios parameter creator
|
|
45
50
|
*/
|
|
@@ -1560,6 +1565,35 @@ export const AuthenticationApiAxiosParamCreator = function (configuration) {
|
|
|
1560
1565
|
options: localVarRequestOptions,
|
|
1561
1566
|
};
|
|
1562
1567
|
}),
|
|
1568
|
+
/**
|
|
1569
|
+
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
1570
|
+
* @summary Get current user profile
|
|
1571
|
+
* @param {*} [options] Override http request option.
|
|
1572
|
+
* @throws {RequiredError}
|
|
1573
|
+
*/
|
|
1574
|
+
me: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
1575
|
+
const localVarPath = `/auth/me`;
|
|
1576
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1577
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1578
|
+
let baseOptions;
|
|
1579
|
+
if (configuration) {
|
|
1580
|
+
baseOptions = configuration.baseOptions;
|
|
1581
|
+
}
|
|
1582
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1583
|
+
const localVarHeaderParameter = {};
|
|
1584
|
+
const localVarQueryParameter = {};
|
|
1585
|
+
// authentication DiscordAuth required
|
|
1586
|
+
// http bearer authentication required
|
|
1587
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1588
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1589
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1590
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1591
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1592
|
+
return {
|
|
1593
|
+
url: toPathString(localVarUrlObj),
|
|
1594
|
+
options: localVarRequestOptions,
|
|
1595
|
+
};
|
|
1596
|
+
}),
|
|
1563
1597
|
/**
|
|
1564
1598
|
* Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
|
|
1565
1599
|
* @summary Service - Exchange client credentials for token
|
|
@@ -1644,6 +1678,21 @@ export const AuthenticationApiFp = function (configuration) {
|
|
|
1644
1678
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1645
1679
|
});
|
|
1646
1680
|
},
|
|
1681
|
+
/**
|
|
1682
|
+
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
1683
|
+
* @summary Get current user profile
|
|
1684
|
+
* @param {*} [options] Override http request option.
|
|
1685
|
+
* @throws {RequiredError}
|
|
1686
|
+
*/
|
|
1687
|
+
me(options) {
|
|
1688
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1689
|
+
var _a, _b, _c;
|
|
1690
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.me(options);
|
|
1691
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1692
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AuthenticationApi.me']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1693
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1694
|
+
});
|
|
1695
|
+
},
|
|
1647
1696
|
/**
|
|
1648
1697
|
* Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
|
|
1649
1698
|
* @summary Service - Exchange client credentials for token
|
|
@@ -1690,6 +1739,15 @@ export const AuthenticationApiFactory = function (configuration, basePath, axios
|
|
|
1690
1739
|
initiateLogin(options) {
|
|
1691
1740
|
return localVarFp.initiateLogin(options).then((request) => request(axios, basePath));
|
|
1692
1741
|
},
|
|
1742
|
+
/**
|
|
1743
|
+
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
1744
|
+
* @summary Get current user profile
|
|
1745
|
+
* @param {*} [options] Override http request option.
|
|
1746
|
+
* @throws {RequiredError}
|
|
1747
|
+
*/
|
|
1748
|
+
me(options) {
|
|
1749
|
+
return localVarFp.me(options).then((request) => request(axios, basePath));
|
|
1750
|
+
},
|
|
1693
1751
|
/**
|
|
1694
1752
|
* Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
|
|
1695
1753
|
* @summary Service - Exchange client credentials for token
|
|
@@ -1728,6 +1786,15 @@ export class AuthenticationApi extends BaseAPI {
|
|
|
1728
1786
|
initiateLogin(options) {
|
|
1729
1787
|
return AuthenticationApiFp(this.configuration).initiateLogin(options).then((request) => request(this.axios, this.basePath));
|
|
1730
1788
|
}
|
|
1789
|
+
/**
|
|
1790
|
+
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
1791
|
+
* @summary Get current user profile
|
|
1792
|
+
* @param {*} [options] Override http request option.
|
|
1793
|
+
* @throws {RequiredError}
|
|
1794
|
+
*/
|
|
1795
|
+
me(options) {
|
|
1796
|
+
return AuthenticationApiFp(this.configuration).me(options).then((request) => request(this.axios, this.basePath));
|
|
1797
|
+
}
|
|
1731
1798
|
/**
|
|
1732
1799
|
* Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
|
|
1733
1800
|
* @summary Service - Exchange client credentials for token
|
package/dist/esm/base.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Reborn API
|
|
3
3
|
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 2.
|
|
5
|
+
* The version of the OpenAPI document: 2.9.1
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/esm/base.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Reborn API
|
|
5
5
|
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 2.
|
|
7
|
+
* The version of the OpenAPI document: 2.9.1
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/esm/common.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Reborn API
|
|
3
3
|
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 2.
|
|
5
|
+
* The version of the OpenAPI document: 2.9.1
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/esm/common.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Reborn API
|
|
5
5
|
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 2.
|
|
7
|
+
* The version of the OpenAPI document: 2.9.1
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Reborn API
|
|
3
3
|
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 2.
|
|
5
|
+
* The version of the OpenAPI document: 2.9.1
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Reborn API
|
|
4
4
|
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
5
5
|
*
|
|
6
|
-
* The version of the OpenAPI document: 2.
|
|
6
|
+
* The version of the OpenAPI document: 2.9.1
|
|
7
7
|
*
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Reborn API
|
|
3
3
|
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 2.
|
|
5
|
+
* The version of the OpenAPI document: 2.9.1
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/esm/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Reborn API
|
|
5
5
|
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 2.
|
|
7
|
+
* The version of the OpenAPI document: 2.9.1
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Reborn API
|
|
3
3
|
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 2.
|
|
5
|
+
* The version of the OpenAPI document: 2.9.1
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Reborn API
|
|
6
6
|
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 2.
|
|
8
|
+
* The version of the OpenAPI document: 2.9.1
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -59,7 +59,7 @@ const { status, data } = await apiInstance.createBypass(
|
|
|
59
59
|
|**200** | Connection bypass created successfully | - |
|
|
60
60
|
|**400** | Invalid request body | - |
|
|
61
61
|
|**401** | Unauthorized - Authentication required | - |
|
|
62
|
-
|**403** | Forbidden -
|
|
62
|
+
|**403** | Forbidden - Moderator role required | - |
|
|
63
63
|
|
|
64
64
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
65
65
|
|
|
@@ -124,7 +124,7 @@ const { status, data } = await apiInstance.listAllConnections(
|
|
|
124
124
|
|-------------|-------------|------------------|
|
|
125
125
|
|**200** | Paginated connection list retrieved successfully | - |
|
|
126
126
|
|**401** | Unauthorized - Authentication required | - |
|
|
127
|
-
|**403** | Forbidden -
|
|
127
|
+
|**403** | Forbidden - Moderator role required | - |
|
|
128
128
|
|
|
129
129
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
130
130
|
|
|
@@ -195,7 +195,7 @@ const { status, data } = await apiInstance.listConnections(
|
|
|
195
195
|
|-------------|-------------|------------------|
|
|
196
196
|
|**200** | Successfully retrieved connections list | - |
|
|
197
197
|
|**401** | Unauthorized - Authentication required | - |
|
|
198
|
-
|**403** | Forbidden -
|
|
198
|
+
|**403** | Forbidden - Moderator role required | - |
|
|
199
199
|
|
|
200
200
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
201
201
|
|
|
@@ -48,7 +48,7 @@ This endpoint does not have any parameters.
|
|
|
48
48
|
|-------------|-------------|------------------|
|
|
49
49
|
|**200** | Successfully retrieved dashboard statistics | - |
|
|
50
50
|
|**401** | Unauthorized - Authentication required | - |
|
|
51
|
-
|**403** | Forbidden -
|
|
51
|
+
|**403** | Forbidden - Moderator role required | - |
|
|
52
52
|
|
|
53
53
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
54
54
|
|
package/docs/AdminPlayersApi.md
CHANGED
|
@@ -57,7 +57,7 @@ const { status, data } = await apiInstance.getPlayer(
|
|
|
57
57
|
|**200** | Player detail retrieved successfully | - |
|
|
58
58
|
|**404** | Player not found | - |
|
|
59
59
|
|**401** | Unauthorized | - |
|
|
60
|
-
|**403** | Forbidden -
|
|
60
|
+
|**403** | Forbidden - Moderator role required | - |
|
|
61
61
|
|
|
62
62
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
63
63
|
|
|
@@ -116,7 +116,7 @@ const { status, data } = await apiInstance.listPlayers(
|
|
|
116
116
|
|-------------|-------------|------------------|
|
|
117
117
|
|**200** | Player list retrieved successfully | - |
|
|
118
118
|
|**401** | Unauthorized | - |
|
|
119
|
-
|**403** | Forbidden -
|
|
119
|
+
|**403** | Forbidden - Moderator role required | - |
|
|
120
120
|
|
|
121
121
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
122
122
|
|
|
@@ -60,7 +60,7 @@ const { status, data } = await apiInstance.applyPunishment(
|
|
|
60
60
|
|**200** | Punishments applied successfully | - |
|
|
61
61
|
|**400** | Invalid request | - |
|
|
62
62
|
|**401** | Unauthorized | - |
|
|
63
|
-
|**403** | Forbidden -
|
|
63
|
+
|**403** | Forbidden - Moderator role required | - |
|
|
64
64
|
|
|
65
65
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
66
66
|
|
|
@@ -115,7 +115,7 @@ const { status, data } = await apiInstance.createDraft(
|
|
|
115
115
|
|**200** | Evaluation results | - |
|
|
116
116
|
|**400** | Invalid request | - |
|
|
117
117
|
|**401** | Unauthorized | - |
|
|
118
|
-
|**403** | Forbidden -
|
|
118
|
+
|**403** | Forbidden - Moderator role required | - |
|
|
119
119
|
|
|
120
120
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
121
121
|
|
|
@@ -189,7 +189,7 @@ const { status, data } = await apiInstance.getPunishments(
|
|
|
189
189
|
|-------------|-------------|------------------|
|
|
190
190
|
|**200** | Punishment list retrieved successfully | - |
|
|
191
191
|
|**401** | Unauthorized | - |
|
|
192
|
-
|**403** | Forbidden -
|
|
192
|
+
|**403** | Forbidden - Moderator role required | - |
|
|
193
193
|
|
|
194
194
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
195
195
|
|
|
@@ -242,7 +242,7 @@ const { status, data } = await apiInstance.searchTargets(
|
|
|
242
242
|
|-------------|-------------|------------------|
|
|
243
243
|
|**200** | Search results | - |
|
|
244
244
|
|**401** | Unauthorized | - |
|
|
245
|
-
|**403** | Forbidden -
|
|
245
|
+
|**403** | Forbidden - Moderator role required | - |
|
|
246
246
|
|
|
247
247
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
248
248
|
|
|
@@ -6,6 +6,7 @@ All URIs are relative to *https://api.smsh.sh*
|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
|[**callback**](#callback) | **GET** /auth/discord/callback | Discord - OAuth2 callback|
|
|
8
8
|
|[**initiateLogin**](#initiatelogin) | **GET** /auth/discord | Discord - Initiate login|
|
|
9
|
+
|[**me**](#me) | **GET** /auth/me | Get current user profile|
|
|
9
10
|
|[**token**](#token) | **POST** /oauth/token | Service - Exchange client credentials for token|
|
|
10
11
|
|
|
11
12
|
# **callback**
|
|
@@ -106,6 +107,51 @@ void (empty response body)
|
|
|
106
107
|
|
|
107
108
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
108
109
|
|
|
110
|
+
# **me**
|
|
111
|
+
> UserProfileResponse me()
|
|
112
|
+
|
|
113
|
+
Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
114
|
+
|
|
115
|
+
### Example
|
|
116
|
+
|
|
117
|
+
```typescript
|
|
118
|
+
import {
|
|
119
|
+
AuthenticationApi,
|
|
120
|
+
Configuration
|
|
121
|
+
} from '@rebornteam/reborn-api';
|
|
122
|
+
|
|
123
|
+
const configuration = new Configuration();
|
|
124
|
+
const apiInstance = new AuthenticationApi(configuration);
|
|
125
|
+
|
|
126
|
+
const { status, data } = await apiInstance.me();
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Parameters
|
|
130
|
+
This endpoint does not have any parameters.
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
### Return type
|
|
134
|
+
|
|
135
|
+
**UserProfileResponse**
|
|
136
|
+
|
|
137
|
+
### Authorization
|
|
138
|
+
|
|
139
|
+
[DiscordAuth](../README.md#DiscordAuth)
|
|
140
|
+
|
|
141
|
+
### HTTP request headers
|
|
142
|
+
|
|
143
|
+
- **Content-Type**: Not defined
|
|
144
|
+
- **Accept**: application/json
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
### HTTP response details
|
|
148
|
+
| Status code | Description | Response headers |
|
|
149
|
+
|-------------|-------------|------------------|
|
|
150
|
+
|**200** | Current user profile | - |
|
|
151
|
+
|**401** | Not authenticated or session invalidated | - |
|
|
152
|
+
|
|
153
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
154
|
+
|
|
109
155
|
# **token**
|
|
110
156
|
> object token()
|
|
111
157
|
|
package/docs/Rank.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Rank
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Enum
|
|
5
|
+
|
|
6
|
+
* `Administrator` (value: `'ADMINISTRATOR'`)
|
|
7
|
+
|
|
8
|
+
* `Moderator` (value: `'MODERATOR'`)
|
|
9
|
+
|
|
10
|
+
* `Service` (value: `'SERVICE'`)
|
|
11
|
+
|
|
12
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# UserProfileResponse
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**id** | **string** | | [default to undefined]
|
|
9
|
+
**username** | **string** | | [default to undefined]
|
|
10
|
+
**avatarUrl** | **string** | | [default to undefined]
|
|
11
|
+
**rank** | [**Rank**](Rank.md) | | [default to undefined]
|
|
12
|
+
**roles** | **Array<string>** | | [default to undefined]
|
|
13
|
+
**discordRoles** | **Array<string>** | | [default to undefined]
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { UserProfileResponse } from '@rebornteam/reborn-api';
|
|
19
|
+
|
|
20
|
+
const instance: UserProfileResponse = {
|
|
21
|
+
id,
|
|
22
|
+
username,
|
|
23
|
+
avatarUrl,
|
|
24
|
+
rank,
|
|
25
|
+
roles,
|
|
26
|
+
discordRoles,
|
|
27
|
+
};
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/index.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Reborn API
|
|
5
5
|
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 2.
|
|
7
|
+
* The version of the OpenAPI document: 2.9.1
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|