@rebornteam/reborn-api 4.8.0 → 4.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/README.md +3 -2
- package/api.ts +100 -19
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +49 -13
- package/dist/api.js +95 -19
- 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 +49 -13
- package/dist/esm/api.js +95 -19
- 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/AdminPlayersApi.md +47 -0
- package/docs/AuthenticationApi.md +15 -4
- package/index.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @rebornteam/reborn-api@4.
|
|
1
|
+
## @rebornteam/reborn-api@4.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@4.
|
|
39
|
+
npm install @rebornteam/reborn-api@4.9.1 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -92,6 +92,7 @@ Class | Method | HTTP request | Description
|
|
|
92
92
|
*AdminPlayersApi* | [**setAggressiveModeImmunity**](docs/AdminPlayersApi.md#setaggressivemodeimmunity) | **PATCH** /admin/player/{uuid}/aggressive-mode-immunity | Toggle aggressive-mode immunity
|
|
93
93
|
*AdminPlayersApi* | [**trustFactorBreakdown**](docs/AdminPlayersApi.md#trustfactorbreakdown) | **GET** /admin/player/{uuid}/trust-factor-breakdown | Trust factor breakdown for a player
|
|
94
94
|
*AdminPlayersApi* | [**trustFactorHistory**](docs/AdminPlayersApi.md#trustfactorhistory) | **GET** /admin/player/{uuid}/trust-factor-history | Trust factor history for a player
|
|
95
|
+
*AdminPlayersApi* | [**trustFactorRecompute**](docs/AdminPlayersApi.md#trustfactorrecompute) | **POST** /admin/player/trust-factor-recompute | Start a trust-factor recompute job
|
|
95
96
|
*AdminPunishmentsApi* | [**applyPunishment**](docs/AdminPunishmentsApi.md#applypunishment) | **POST** /admin/punishment/apply | Apply punishment
|
|
96
97
|
*AdminPunishmentsApi* | [**createDraft**](docs/AdminPunishmentsApi.md#createdraft) | **POST** /admin/punishment/draft | Evaluate punishment impact
|
|
97
98
|
*AdminPunishmentsApi* | [**editPunishment**](docs/AdminPunishmentsApi.md#editpunishment) | **PATCH** /admin/punishment/{id} | Edit a punishment
|
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: 4.
|
|
7
|
+
* The version of the OpenAPI document: 4.9.1
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -4701,6 +4701,40 @@ export const AdminPlayersApiAxiosParamCreator = function (configuration?: Config
|
|
|
4701
4701
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4702
4702
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
4703
4703
|
|
|
4704
|
+
return {
|
|
4705
|
+
url: toPathString(localVarUrlObj),
|
|
4706
|
+
options: localVarRequestOptions,
|
|
4707
|
+
};
|
|
4708
|
+
},
|
|
4709
|
+
/**
|
|
4710
|
+
* Submits an async job that recomputes every player\'s trust factor, refreshes the cached player.trust_factor column, and appends today\'s player_trust_factor_history snapshot — the same work the nightly job does, runnable on demand (e.g. to populate the cache immediately after deploy instead of waiting for 03:00 UTC, or after a trust-factor formula change). Returns immediately with a job id — poll GET /admin/job/{id} for progress and DELETE /admin/job/{id} to cancel. Idempotent.
|
|
4711
|
+
* @summary Start a trust-factor recompute job
|
|
4712
|
+
* @param {*} [options] Override http request option.
|
|
4713
|
+
* @throws {RequiredError}
|
|
4714
|
+
*/
|
|
4715
|
+
trustFactorRecompute: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
4716
|
+
const localVarPath = `/admin/player/trust-factor-recompute`;
|
|
4717
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4718
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4719
|
+
let baseOptions;
|
|
4720
|
+
if (configuration) {
|
|
4721
|
+
baseOptions = configuration.baseOptions;
|
|
4722
|
+
}
|
|
4723
|
+
|
|
4724
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
4725
|
+
const localVarHeaderParameter = {} as any;
|
|
4726
|
+
const localVarQueryParameter = {} as any;
|
|
4727
|
+
|
|
4728
|
+
// authentication DiscordAuth required
|
|
4729
|
+
// http bearer authentication required
|
|
4730
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
4731
|
+
|
|
4732
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
4733
|
+
|
|
4734
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4735
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4736
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
4737
|
+
|
|
4704
4738
|
return {
|
|
4705
4739
|
url: toPathString(localVarUrlObj),
|
|
4706
4740
|
options: localVarRequestOptions,
|
|
@@ -4989,6 +5023,18 @@ export const AdminPlayersApiFp = function(configuration?: Configuration) {
|
|
|
4989
5023
|
const localVarOperationServerBasePath = operationServerMap['AdminPlayersApi.trustFactorHistory']?.[localVarOperationServerIndex]?.url;
|
|
4990
5024
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4991
5025
|
},
|
|
5026
|
+
/**
|
|
5027
|
+
* Submits an async job that recomputes every player\'s trust factor, refreshes the cached player.trust_factor column, and appends today\'s player_trust_factor_history snapshot — the same work the nightly job does, runnable on demand (e.g. to populate the cache immediately after deploy instead of waiting for 03:00 UTC, or after a trust-factor formula change). Returns immediately with a job id — poll GET /admin/job/{id} for progress and DELETE /admin/job/{id} to cancel. Idempotent.
|
|
5028
|
+
* @summary Start a trust-factor recompute job
|
|
5029
|
+
* @param {*} [options] Override http request option.
|
|
5030
|
+
* @throws {RequiredError}
|
|
5031
|
+
*/
|
|
5032
|
+
async trustFactorRecompute(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminAsyncJobStartResponse>> {
|
|
5033
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.trustFactorRecompute(options);
|
|
5034
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
5035
|
+
const localVarOperationServerBasePath = operationServerMap['AdminPlayersApi.trustFactorRecompute']?.[localVarOperationServerIndex]?.url;
|
|
5036
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
5037
|
+
},
|
|
4992
5038
|
}
|
|
4993
5039
|
};
|
|
4994
5040
|
|
|
@@ -5212,6 +5258,15 @@ export const AdminPlayersApiFactory = function (configuration?: Configuration, b
|
|
|
5212
5258
|
trustFactorHistory(uuid: string, days?: number, options?: RawAxiosRequestConfig): AxiosPromise<AdminTrustFactorHistoryEntry> {
|
|
5213
5259
|
return localVarFp.trustFactorHistory(uuid, days, options).then((request) => request(axios, basePath));
|
|
5214
5260
|
},
|
|
5261
|
+
/**
|
|
5262
|
+
* Submits an async job that recomputes every player\'s trust factor, refreshes the cached player.trust_factor column, and appends today\'s player_trust_factor_history snapshot — the same work the nightly job does, runnable on demand (e.g. to populate the cache immediately after deploy instead of waiting for 03:00 UTC, or after a trust-factor formula change). Returns immediately with a job id — poll GET /admin/job/{id} for progress and DELETE /admin/job/{id} to cancel. Idempotent.
|
|
5263
|
+
* @summary Start a trust-factor recompute job
|
|
5264
|
+
* @param {*} [options] Override http request option.
|
|
5265
|
+
* @throws {RequiredError}
|
|
5266
|
+
*/
|
|
5267
|
+
trustFactorRecompute(options?: RawAxiosRequestConfig): AxiosPromise<AdminAsyncJobStartResponse> {
|
|
5268
|
+
return localVarFp.trustFactorRecompute(options).then((request) => request(axios, basePath));
|
|
5269
|
+
},
|
|
5215
5270
|
};
|
|
5216
5271
|
};
|
|
5217
5272
|
|
|
@@ -5452,6 +5507,16 @@ export class AdminPlayersApi extends BaseAPI {
|
|
|
5452
5507
|
public trustFactorHistory(uuid: string, days?: number, options?: RawAxiosRequestConfig) {
|
|
5453
5508
|
return AdminPlayersApiFp(this.configuration).trustFactorHistory(uuid, days, options).then((request) => request(this.axios, this.basePath));
|
|
5454
5509
|
}
|
|
5510
|
+
|
|
5511
|
+
/**
|
|
5512
|
+
* Submits an async job that recomputes every player\'s trust factor, refreshes the cached player.trust_factor column, and appends today\'s player_trust_factor_history snapshot — the same work the nightly job does, runnable on demand (e.g. to populate the cache immediately after deploy instead of waiting for 03:00 UTC, or after a trust-factor formula change). Returns immediately with a job id — poll GET /admin/job/{id} for progress and DELETE /admin/job/{id} to cancel. Idempotent.
|
|
5513
|
+
* @summary Start a trust-factor recompute job
|
|
5514
|
+
* @param {*} [options] Override http request option.
|
|
5515
|
+
* @throws {RequiredError}
|
|
5516
|
+
*/
|
|
5517
|
+
public trustFactorRecompute(options?: RawAxiosRequestConfig) {
|
|
5518
|
+
return AdminPlayersApiFp(this.configuration).trustFactorRecompute(options).then((request) => request(this.axios, this.basePath));
|
|
5519
|
+
}
|
|
5455
5520
|
}
|
|
5456
5521
|
|
|
5457
5522
|
|
|
@@ -6262,10 +6327,11 @@ export const AuthenticationApiAxiosParamCreator = function (configuration?: Conf
|
|
|
6262
6327
|
* @summary Discord - OAuth2 callback
|
|
6263
6328
|
* @param {string | null} [code] Authorization code provided by Discord on successful approval
|
|
6264
6329
|
* @param {string | null} [error] Error code provided by Discord if the user denied access
|
|
6330
|
+
* @param {string | null} [state] Opaque value echoed back by Discord — carries the client\'s chosen redirect target
|
|
6265
6331
|
* @param {*} [options] Override http request option.
|
|
6266
6332
|
* @throws {RequiredError}
|
|
6267
6333
|
*/
|
|
6268
|
-
callback: async (code?: string | null, error?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
6334
|
+
callback: async (code?: string | null, error?: string | null, state?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
6269
6335
|
const localVarPath = `/auth/discord/callback`;
|
|
6270
6336
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
6271
6337
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -6290,6 +6356,10 @@ export const AuthenticationApiAxiosParamCreator = function (configuration?: Conf
|
|
|
6290
6356
|
localVarQueryParameter['error'] = error;
|
|
6291
6357
|
}
|
|
6292
6358
|
|
|
6359
|
+
if (state !== undefined) {
|
|
6360
|
+
localVarQueryParameter['state'] = state;
|
|
6361
|
+
}
|
|
6362
|
+
|
|
6293
6363
|
|
|
6294
6364
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
6295
6365
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -6301,12 +6371,13 @@ export const AuthenticationApiAxiosParamCreator = function (configuration?: Conf
|
|
|
6301
6371
|
};
|
|
6302
6372
|
},
|
|
6303
6373
|
/**
|
|
6304
|
-
* Redirects the browser to Discord\'s OAuth2 authorization page.
|
|
6374
|
+
* Redirects the browser (or native in-app browser session) to Discord\'s OAuth2 authorization page. The optional `redirect` parameter names the final destination the signed JWT should be sent to once auth completes — the web app URL (default) or a native deep-link scheme such as `reborn://auth/callback`. It must be allowlisted (DISCORD_ADMIN_FRONTEND_URL or one of DISCORD_ADMIN_ALLOWED_REDIRECTS); the value is carried through Discord via the OAuth `state` parameter and re-validated on the callback.
|
|
6305
6375
|
* @summary Discord - Initiate login
|
|
6376
|
+
* @param {string | null} [redirect] Final redirect target for the JWT (web URL or native deep link). Must be allowlisted. Defaults to the web admin frontend.
|
|
6306
6377
|
* @param {*} [options] Override http request option.
|
|
6307
6378
|
* @throws {RequiredError}
|
|
6308
6379
|
*/
|
|
6309
|
-
initiateLogin: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
6380
|
+
initiateLogin: async (redirect?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
6310
6381
|
const localVarPath = `/auth/discord`;
|
|
6311
6382
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
6312
6383
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -6323,6 +6394,10 @@ export const AuthenticationApiAxiosParamCreator = function (configuration?: Conf
|
|
|
6323
6394
|
// http bearer authentication required
|
|
6324
6395
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
6325
6396
|
|
|
6397
|
+
if (redirect !== undefined) {
|
|
6398
|
+
localVarQueryParameter['redirect'] = redirect;
|
|
6399
|
+
}
|
|
6400
|
+
|
|
6326
6401
|
|
|
6327
6402
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
6328
6403
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -6433,23 +6508,25 @@ export const AuthenticationApiFp = function(configuration?: Configuration) {
|
|
|
6433
6508
|
* @summary Discord - OAuth2 callback
|
|
6434
6509
|
* @param {string | null} [code] Authorization code provided by Discord on successful approval
|
|
6435
6510
|
* @param {string | null} [error] Error code provided by Discord if the user denied access
|
|
6511
|
+
* @param {string | null} [state] Opaque value echoed back by Discord — carries the client\'s chosen redirect target
|
|
6436
6512
|
* @param {*} [options] Override http request option.
|
|
6437
6513
|
* @throws {RequiredError}
|
|
6438
6514
|
*/
|
|
6439
|
-
async callback(code?: string | null, error?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
6440
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.callback(code, error, options);
|
|
6515
|
+
async callback(code?: string | null, error?: string | null, state?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
6516
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.callback(code, error, state, options);
|
|
6441
6517
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
6442
6518
|
const localVarOperationServerBasePath = operationServerMap['AuthenticationApi.callback']?.[localVarOperationServerIndex]?.url;
|
|
6443
6519
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
6444
6520
|
},
|
|
6445
6521
|
/**
|
|
6446
|
-
* Redirects the browser to Discord\'s OAuth2 authorization page.
|
|
6522
|
+
* Redirects the browser (or native in-app browser session) to Discord\'s OAuth2 authorization page. The optional `redirect` parameter names the final destination the signed JWT should be sent to once auth completes — the web app URL (default) or a native deep-link scheme such as `reborn://auth/callback`. It must be allowlisted (DISCORD_ADMIN_FRONTEND_URL or one of DISCORD_ADMIN_ALLOWED_REDIRECTS); the value is carried through Discord via the OAuth `state` parameter and re-validated on the callback.
|
|
6447
6523
|
* @summary Discord - Initiate login
|
|
6524
|
+
* @param {string | null} [redirect] Final redirect target for the JWT (web URL or native deep link). Must be allowlisted. Defaults to the web admin frontend.
|
|
6448
6525
|
* @param {*} [options] Override http request option.
|
|
6449
6526
|
* @throws {RequiredError}
|
|
6450
6527
|
*/
|
|
6451
|
-
async initiateLogin(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
6452
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.initiateLogin(options);
|
|
6528
|
+
async initiateLogin(redirect?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
6529
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.initiateLogin(redirect, options);
|
|
6453
6530
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
6454
6531
|
const localVarOperationServerBasePath = operationServerMap['AuthenticationApi.initiateLogin']?.[localVarOperationServerIndex]?.url;
|
|
6455
6532
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -6495,20 +6572,22 @@ export const AuthenticationApiFactory = function (configuration?: Configuration,
|
|
|
6495
6572
|
* @summary Discord - OAuth2 callback
|
|
6496
6573
|
* @param {string | null} [code] Authorization code provided by Discord on successful approval
|
|
6497
6574
|
* @param {string | null} [error] Error code provided by Discord if the user denied access
|
|
6575
|
+
* @param {string | null} [state] Opaque value echoed back by Discord — carries the client\'s chosen redirect target
|
|
6498
6576
|
* @param {*} [options] Override http request option.
|
|
6499
6577
|
* @throws {RequiredError}
|
|
6500
6578
|
*/
|
|
6501
|
-
callback(code?: string | null, error?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
6502
|
-
return localVarFp.callback(code, error, options).then((request) => request(axios, basePath));
|
|
6579
|
+
callback(code?: string | null, error?: string | null, state?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
6580
|
+
return localVarFp.callback(code, error, state, options).then((request) => request(axios, basePath));
|
|
6503
6581
|
},
|
|
6504
6582
|
/**
|
|
6505
|
-
* Redirects the browser to Discord\'s OAuth2 authorization page.
|
|
6583
|
+
* Redirects the browser (or native in-app browser session) to Discord\'s OAuth2 authorization page. The optional `redirect` parameter names the final destination the signed JWT should be sent to once auth completes — the web app URL (default) or a native deep-link scheme such as `reborn://auth/callback`. It must be allowlisted (DISCORD_ADMIN_FRONTEND_URL or one of DISCORD_ADMIN_ALLOWED_REDIRECTS); the value is carried through Discord via the OAuth `state` parameter and re-validated on the callback.
|
|
6506
6584
|
* @summary Discord - Initiate login
|
|
6585
|
+
* @param {string | null} [redirect] Final redirect target for the JWT (web URL or native deep link). Must be allowlisted. Defaults to the web admin frontend.
|
|
6507
6586
|
* @param {*} [options] Override http request option.
|
|
6508
6587
|
* @throws {RequiredError}
|
|
6509
6588
|
*/
|
|
6510
|
-
initiateLogin(options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
6511
|
-
return localVarFp.initiateLogin(options).then((request) => request(axios, basePath));
|
|
6589
|
+
initiateLogin(redirect?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
6590
|
+
return localVarFp.initiateLogin(redirect, options).then((request) => request(axios, basePath));
|
|
6512
6591
|
},
|
|
6513
6592
|
/**
|
|
6514
6593
|
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
@@ -6543,21 +6622,23 @@ export class AuthenticationApi extends BaseAPI {
|
|
|
6543
6622
|
* @summary Discord - OAuth2 callback
|
|
6544
6623
|
* @param {string | null} [code] Authorization code provided by Discord on successful approval
|
|
6545
6624
|
* @param {string | null} [error] Error code provided by Discord if the user denied access
|
|
6625
|
+
* @param {string | null} [state] Opaque value echoed back by Discord — carries the client\'s chosen redirect target
|
|
6546
6626
|
* @param {*} [options] Override http request option.
|
|
6547
6627
|
* @throws {RequiredError}
|
|
6548
6628
|
*/
|
|
6549
|
-
public callback(code?: string | null, error?: string | null, options?: RawAxiosRequestConfig) {
|
|
6550
|
-
return AuthenticationApiFp(this.configuration).callback(code, error, options).then((request) => request(this.axios, this.basePath));
|
|
6629
|
+
public callback(code?: string | null, error?: string | null, state?: string | null, options?: RawAxiosRequestConfig) {
|
|
6630
|
+
return AuthenticationApiFp(this.configuration).callback(code, error, state, options).then((request) => request(this.axios, this.basePath));
|
|
6551
6631
|
}
|
|
6552
6632
|
|
|
6553
6633
|
/**
|
|
6554
|
-
* Redirects the browser to Discord\'s OAuth2 authorization page.
|
|
6634
|
+
* Redirects the browser (or native in-app browser session) to Discord\'s OAuth2 authorization page. The optional `redirect` parameter names the final destination the signed JWT should be sent to once auth completes — the web app URL (default) or a native deep-link scheme such as `reborn://auth/callback`. It must be allowlisted (DISCORD_ADMIN_FRONTEND_URL or one of DISCORD_ADMIN_ALLOWED_REDIRECTS); the value is carried through Discord via the OAuth `state` parameter and re-validated on the callback.
|
|
6555
6635
|
* @summary Discord - Initiate login
|
|
6636
|
+
* @param {string | null} [redirect] Final redirect target for the JWT (web URL or native deep link). Must be allowlisted. Defaults to the web admin frontend.
|
|
6556
6637
|
* @param {*} [options] Override http request option.
|
|
6557
6638
|
* @throws {RequiredError}
|
|
6558
6639
|
*/
|
|
6559
|
-
public initiateLogin(options?: RawAxiosRequestConfig) {
|
|
6560
|
-
return AuthenticationApiFp(this.configuration).initiateLogin(options).then((request) => request(this.axios, this.basePath));
|
|
6640
|
+
public initiateLogin(redirect?: string | null, options?: RawAxiosRequestConfig) {
|
|
6641
|
+
return AuthenticationApiFp(this.configuration).initiateLogin(redirect, options).then((request) => request(this.axios, this.basePath));
|
|
6561
6642
|
}
|
|
6562
6643
|
|
|
6563
6644
|
/**
|
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: 4.
|
|
7
|
+
* The version of the OpenAPI document: 4.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: 4.
|
|
7
|
+
* The version of the OpenAPI document: 4.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: 4.
|
|
6
|
+
* The version of the OpenAPI document: 4.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: 4.
|
|
5
|
+
* The version of the OpenAPI document: 4.9.1
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2944,6 +2944,13 @@ export declare const AdminPlayersApiAxiosParamCreator: (configuration?: Configur
|
|
|
2944
2944
|
* @throws {RequiredError}
|
|
2945
2945
|
*/
|
|
2946
2946
|
trustFactorHistory: (uuid: string, days?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2947
|
+
/**
|
|
2948
|
+
* Submits an async job that recomputes every player\'s trust factor, refreshes the cached player.trust_factor column, and appends today\'s player_trust_factor_history snapshot — the same work the nightly job does, runnable on demand (e.g. to populate the cache immediately after deploy instead of waiting for 03:00 UTC, or after a trust-factor formula change). Returns immediately with a job id — poll GET /admin/job/{id} for progress and DELETE /admin/job/{id} to cancel. Idempotent.
|
|
2949
|
+
* @summary Start a trust-factor recompute job
|
|
2950
|
+
* @param {*} [options] Override http request option.
|
|
2951
|
+
* @throws {RequiredError}
|
|
2952
|
+
*/
|
|
2953
|
+
trustFactorRecompute: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2947
2954
|
};
|
|
2948
2955
|
/**
|
|
2949
2956
|
* AdminPlayersApi - functional programming interface
|
|
@@ -3123,6 +3130,13 @@ export declare const AdminPlayersApiFp: (configuration?: Configuration) => {
|
|
|
3123
3130
|
* @throws {RequiredError}
|
|
3124
3131
|
*/
|
|
3125
3132
|
trustFactorHistory(uuid: string, days?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminTrustFactorHistoryEntry>>;
|
|
3133
|
+
/**
|
|
3134
|
+
* Submits an async job that recomputes every player\'s trust factor, refreshes the cached player.trust_factor column, and appends today\'s player_trust_factor_history snapshot — the same work the nightly job does, runnable on demand (e.g. to populate the cache immediately after deploy instead of waiting for 03:00 UTC, or after a trust-factor formula change). Returns immediately with a job id — poll GET /admin/job/{id} for progress and DELETE /admin/job/{id} to cancel. Idempotent.
|
|
3135
|
+
* @summary Start a trust-factor recompute job
|
|
3136
|
+
* @param {*} [options] Override http request option.
|
|
3137
|
+
* @throws {RequiredError}
|
|
3138
|
+
*/
|
|
3139
|
+
trustFactorRecompute(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminAsyncJobStartResponse>>;
|
|
3126
3140
|
};
|
|
3127
3141
|
/**
|
|
3128
3142
|
* AdminPlayersApi - factory interface
|
|
@@ -3302,6 +3316,13 @@ export declare const AdminPlayersApiFactory: (configuration?: Configuration, bas
|
|
|
3302
3316
|
* @throws {RequiredError}
|
|
3303
3317
|
*/
|
|
3304
3318
|
trustFactorHistory(uuid: string, days?: number, options?: RawAxiosRequestConfig): AxiosPromise<AdminTrustFactorHistoryEntry>;
|
|
3319
|
+
/**
|
|
3320
|
+
* Submits an async job that recomputes every player\'s trust factor, refreshes the cached player.trust_factor column, and appends today\'s player_trust_factor_history snapshot — the same work the nightly job does, runnable on demand (e.g. to populate the cache immediately after deploy instead of waiting for 03:00 UTC, or after a trust-factor formula change). Returns immediately with a job id — poll GET /admin/job/{id} for progress and DELETE /admin/job/{id} to cancel. Idempotent.
|
|
3321
|
+
* @summary Start a trust-factor recompute job
|
|
3322
|
+
* @param {*} [options] Override http request option.
|
|
3323
|
+
* @throws {RequiredError}
|
|
3324
|
+
*/
|
|
3325
|
+
trustFactorRecompute(options?: RawAxiosRequestConfig): AxiosPromise<AdminAsyncJobStartResponse>;
|
|
3305
3326
|
};
|
|
3306
3327
|
/**
|
|
3307
3328
|
* AdminPlayersApi - object-oriented interface
|
|
@@ -3481,6 +3502,13 @@ export declare class AdminPlayersApi extends BaseAPI {
|
|
|
3481
3502
|
* @throws {RequiredError}
|
|
3482
3503
|
*/
|
|
3483
3504
|
trustFactorHistory(uuid: string, days?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AdminTrustFactorHistoryEntry, any, {}>>;
|
|
3505
|
+
/**
|
|
3506
|
+
* Submits an async job that recomputes every player\'s trust factor, refreshes the cached player.trust_factor column, and appends today\'s player_trust_factor_history snapshot — the same work the nightly job does, runnable on demand (e.g. to populate the cache immediately after deploy instead of waiting for 03:00 UTC, or after a trust-factor formula change). Returns immediately with a job id — poll GET /admin/job/{id} for progress and DELETE /admin/job/{id} to cancel. Idempotent.
|
|
3507
|
+
* @summary Start a trust-factor recompute job
|
|
3508
|
+
* @param {*} [options] Override http request option.
|
|
3509
|
+
* @throws {RequiredError}
|
|
3510
|
+
*/
|
|
3511
|
+
trustFactorRecompute(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AdminAsyncJobStartResponse, any, {}>>;
|
|
3484
3512
|
}
|
|
3485
3513
|
/**
|
|
3486
3514
|
* AdminPunishmentsApi - axios parameter creator
|
|
@@ -3855,17 +3883,19 @@ export declare const AuthenticationApiAxiosParamCreator: (configuration?: Config
|
|
|
3855
3883
|
* @summary Discord - OAuth2 callback
|
|
3856
3884
|
* @param {string | null} [code] Authorization code provided by Discord on successful approval
|
|
3857
3885
|
* @param {string | null} [error] Error code provided by Discord if the user denied access
|
|
3886
|
+
* @param {string | null} [state] Opaque value echoed back by Discord — carries the client\'s chosen redirect target
|
|
3858
3887
|
* @param {*} [options] Override http request option.
|
|
3859
3888
|
* @throws {RequiredError}
|
|
3860
3889
|
*/
|
|
3861
|
-
callback: (code?: string | null, error?: string | null, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
3890
|
+
callback: (code?: string | null, error?: string | null, state?: string | null, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
3862
3891
|
/**
|
|
3863
|
-
* Redirects the browser to Discord\'s OAuth2 authorization page.
|
|
3892
|
+
* Redirects the browser (or native in-app browser session) to Discord\'s OAuth2 authorization page. The optional `redirect` parameter names the final destination the signed JWT should be sent to once auth completes — the web app URL (default) or a native deep-link scheme such as `reborn://auth/callback`. It must be allowlisted (DISCORD_ADMIN_FRONTEND_URL or one of DISCORD_ADMIN_ALLOWED_REDIRECTS); the value is carried through Discord via the OAuth `state` parameter and re-validated on the callback.
|
|
3864
3893
|
* @summary Discord - Initiate login
|
|
3894
|
+
* @param {string | null} [redirect] Final redirect target for the JWT (web URL or native deep link). Must be allowlisted. Defaults to the web admin frontend.
|
|
3865
3895
|
* @param {*} [options] Override http request option.
|
|
3866
3896
|
* @throws {RequiredError}
|
|
3867
3897
|
*/
|
|
3868
|
-
initiateLogin: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
3898
|
+
initiateLogin: (redirect?: string | null, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
3869
3899
|
/**
|
|
3870
3900
|
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
3871
3901
|
* @summary Get current user profile
|
|
@@ -3893,17 +3923,19 @@ export declare const AuthenticationApiFp: (configuration?: Configuration) => {
|
|
|
3893
3923
|
* @summary Discord - OAuth2 callback
|
|
3894
3924
|
* @param {string | null} [code] Authorization code provided by Discord on successful approval
|
|
3895
3925
|
* @param {string | null} [error] Error code provided by Discord if the user denied access
|
|
3926
|
+
* @param {string | null} [state] Opaque value echoed back by Discord — carries the client\'s chosen redirect target
|
|
3896
3927
|
* @param {*} [options] Override http request option.
|
|
3897
3928
|
* @throws {RequiredError}
|
|
3898
3929
|
*/
|
|
3899
|
-
callback(code?: string | null, error?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
3930
|
+
callback(code?: string | null, error?: string | null, state?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
3900
3931
|
/**
|
|
3901
|
-
* Redirects the browser to Discord\'s OAuth2 authorization page.
|
|
3932
|
+
* Redirects the browser (or native in-app browser session) to Discord\'s OAuth2 authorization page. The optional `redirect` parameter names the final destination the signed JWT should be sent to once auth completes — the web app URL (default) or a native deep-link scheme such as `reborn://auth/callback`. It must be allowlisted (DISCORD_ADMIN_FRONTEND_URL or one of DISCORD_ADMIN_ALLOWED_REDIRECTS); the value is carried through Discord via the OAuth `state` parameter and re-validated on the callback.
|
|
3902
3933
|
* @summary Discord - Initiate login
|
|
3934
|
+
* @param {string | null} [redirect] Final redirect target for the JWT (web URL or native deep link). Must be allowlisted. Defaults to the web admin frontend.
|
|
3903
3935
|
* @param {*} [options] Override http request option.
|
|
3904
3936
|
* @throws {RequiredError}
|
|
3905
3937
|
*/
|
|
3906
|
-
initiateLogin(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
3938
|
+
initiateLogin(redirect?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
3907
3939
|
/**
|
|
3908
3940
|
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
3909
3941
|
* @summary Get current user profile
|
|
@@ -3931,17 +3963,19 @@ export declare const AuthenticationApiFactory: (configuration?: Configuration, b
|
|
|
3931
3963
|
* @summary Discord - OAuth2 callback
|
|
3932
3964
|
* @param {string | null} [code] Authorization code provided by Discord on successful approval
|
|
3933
3965
|
* @param {string | null} [error] Error code provided by Discord if the user denied access
|
|
3966
|
+
* @param {string | null} [state] Opaque value echoed back by Discord — carries the client\'s chosen redirect target
|
|
3934
3967
|
* @param {*} [options] Override http request option.
|
|
3935
3968
|
* @throws {RequiredError}
|
|
3936
3969
|
*/
|
|
3937
|
-
callback(code?: string | null, error?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
3970
|
+
callback(code?: string | null, error?: string | null, state?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
3938
3971
|
/**
|
|
3939
|
-
* Redirects the browser to Discord\'s OAuth2 authorization page.
|
|
3972
|
+
* Redirects the browser (or native in-app browser session) to Discord\'s OAuth2 authorization page. The optional `redirect` parameter names the final destination the signed JWT should be sent to once auth completes — the web app URL (default) or a native deep-link scheme such as `reborn://auth/callback`. It must be allowlisted (DISCORD_ADMIN_FRONTEND_URL or one of DISCORD_ADMIN_ALLOWED_REDIRECTS); the value is carried through Discord via the OAuth `state` parameter and re-validated on the callback.
|
|
3940
3973
|
* @summary Discord - Initiate login
|
|
3974
|
+
* @param {string | null} [redirect] Final redirect target for the JWT (web URL or native deep link). Must be allowlisted. Defaults to the web admin frontend.
|
|
3941
3975
|
* @param {*} [options] Override http request option.
|
|
3942
3976
|
* @throws {RequiredError}
|
|
3943
3977
|
*/
|
|
3944
|
-
initiateLogin(options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
3978
|
+
initiateLogin(redirect?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
3945
3979
|
/**
|
|
3946
3980
|
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
3947
3981
|
* @summary Get current user profile
|
|
@@ -3969,17 +4003,19 @@ export declare class AuthenticationApi extends BaseAPI {
|
|
|
3969
4003
|
* @summary Discord - OAuth2 callback
|
|
3970
4004
|
* @param {string | null} [code] Authorization code provided by Discord on successful approval
|
|
3971
4005
|
* @param {string | null} [error] Error code provided by Discord if the user denied access
|
|
4006
|
+
* @param {string | null} [state] Opaque value echoed back by Discord — carries the client\'s chosen redirect target
|
|
3972
4007
|
* @param {*} [options] Override http request option.
|
|
3973
4008
|
* @throws {RequiredError}
|
|
3974
4009
|
*/
|
|
3975
|
-
callback(code?: string | null, error?: string | null, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
4010
|
+
callback(code?: string | null, error?: string | null, state?: string | null, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
3976
4011
|
/**
|
|
3977
|
-
* Redirects the browser to Discord\'s OAuth2 authorization page.
|
|
4012
|
+
* Redirects the browser (or native in-app browser session) to Discord\'s OAuth2 authorization page. The optional `redirect` parameter names the final destination the signed JWT should be sent to once auth completes — the web app URL (default) or a native deep-link scheme such as `reborn://auth/callback`. It must be allowlisted (DISCORD_ADMIN_FRONTEND_URL or one of DISCORD_ADMIN_ALLOWED_REDIRECTS); the value is carried through Discord via the OAuth `state` parameter and re-validated on the callback.
|
|
3978
4013
|
* @summary Discord - Initiate login
|
|
4014
|
+
* @param {string | null} [redirect] Final redirect target for the JWT (web URL or native deep link). Must be allowlisted. Defaults to the web admin frontend.
|
|
3979
4015
|
* @param {*} [options] Override http request option.
|
|
3980
4016
|
* @throws {RequiredError}
|
|
3981
4017
|
*/
|
|
3982
|
-
initiateLogin(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
4018
|
+
initiateLogin(redirect?: string | null, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
3983
4019
|
/**
|
|
3984
4020
|
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
3985
4021
|
* @summary Get current user profile
|