@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/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: 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).
|
|
@@ -2573,6 +2573,35 @@ export const AdminPlayersApiAxiosParamCreator = function (configuration) {
|
|
|
2573
2573
|
options: localVarRequestOptions,
|
|
2574
2574
|
};
|
|
2575
2575
|
}),
|
|
2576
|
+
/**
|
|
2577
|
+
* 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.
|
|
2578
|
+
* @summary Start a trust-factor recompute job
|
|
2579
|
+
* @param {*} [options] Override http request option.
|
|
2580
|
+
* @throws {RequiredError}
|
|
2581
|
+
*/
|
|
2582
|
+
trustFactorRecompute: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
2583
|
+
const localVarPath = `/admin/player/trust-factor-recompute`;
|
|
2584
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2585
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2586
|
+
let baseOptions;
|
|
2587
|
+
if (configuration) {
|
|
2588
|
+
baseOptions = configuration.baseOptions;
|
|
2589
|
+
}
|
|
2590
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
2591
|
+
const localVarHeaderParameter = {};
|
|
2592
|
+
const localVarQueryParameter = {};
|
|
2593
|
+
// authentication DiscordAuth required
|
|
2594
|
+
// http bearer authentication required
|
|
2595
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
2596
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
2597
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2598
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2599
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2600
|
+
return {
|
|
2601
|
+
url: toPathString(localVarUrlObj),
|
|
2602
|
+
options: localVarRequestOptions,
|
|
2603
|
+
};
|
|
2604
|
+
}),
|
|
2576
2605
|
};
|
|
2577
2606
|
};
|
|
2578
2607
|
/**
|
|
@@ -2915,6 +2944,21 @@ export const AdminPlayersApiFp = function (configuration) {
|
|
|
2915
2944
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2916
2945
|
});
|
|
2917
2946
|
},
|
|
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) {
|
|
2954
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2955
|
+
var _a, _b, _c;
|
|
2956
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.trustFactorRecompute(options);
|
|
2957
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2958
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminPlayersApi.trustFactorRecompute']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2959
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2960
|
+
});
|
|
2961
|
+
},
|
|
2918
2962
|
};
|
|
2919
2963
|
};
|
|
2920
2964
|
/**
|
|
@@ -3137,6 +3181,15 @@ export const AdminPlayersApiFactory = function (configuration, basePath, axios)
|
|
|
3137
3181
|
trustFactorHistory(uuid, days, options) {
|
|
3138
3182
|
return localVarFp.trustFactorHistory(uuid, days, options).then((request) => request(axios, basePath));
|
|
3139
3183
|
},
|
|
3184
|
+
/**
|
|
3185
|
+
* 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.
|
|
3186
|
+
* @summary Start a trust-factor recompute job
|
|
3187
|
+
* @param {*} [options] Override http request option.
|
|
3188
|
+
* @throws {RequiredError}
|
|
3189
|
+
*/
|
|
3190
|
+
trustFactorRecompute(options) {
|
|
3191
|
+
return localVarFp.trustFactorRecompute(options).then((request) => request(axios, basePath));
|
|
3192
|
+
},
|
|
3140
3193
|
};
|
|
3141
3194
|
};
|
|
3142
3195
|
/**
|
|
@@ -3357,6 +3410,15 @@ export class AdminPlayersApi extends BaseAPI {
|
|
|
3357
3410
|
trustFactorHistory(uuid, days, options) {
|
|
3358
3411
|
return AdminPlayersApiFp(this.configuration).trustFactorHistory(uuid, days, options).then((request) => request(this.axios, this.basePath));
|
|
3359
3412
|
}
|
|
3413
|
+
/**
|
|
3414
|
+
* 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.
|
|
3415
|
+
* @summary Start a trust-factor recompute job
|
|
3416
|
+
* @param {*} [options] Override http request option.
|
|
3417
|
+
* @throws {RequiredError}
|
|
3418
|
+
*/
|
|
3419
|
+
trustFactorRecompute(options) {
|
|
3420
|
+
return AdminPlayersApiFp(this.configuration).trustFactorRecompute(options).then((request) => request(this.axios, this.basePath));
|
|
3421
|
+
}
|
|
3360
3422
|
}
|
|
3361
3423
|
/**
|
|
3362
3424
|
* AdminPunishmentsApi - axios parameter creator
|
|
@@ -4116,10 +4178,11 @@ export const AuthenticationApiAxiosParamCreator = function (configuration) {
|
|
|
4116
4178
|
* @summary Discord - OAuth2 callback
|
|
4117
4179
|
* @param {string | null} [code] Authorization code provided by Discord on successful approval
|
|
4118
4180
|
* @param {string | null} [error] Error code provided by Discord if the user denied access
|
|
4181
|
+
* @param {string | null} [state] Opaque value echoed back by Discord — carries the client\'s chosen redirect target
|
|
4119
4182
|
* @param {*} [options] Override http request option.
|
|
4120
4183
|
* @throws {RequiredError}
|
|
4121
4184
|
*/
|
|
4122
|
-
callback: (code_1, error_1, ...args_1) => __awaiter(this, [code_1, error_1, ...args_1], void 0, function* (code, error, options = {}) {
|
|
4185
|
+
callback: (code_1, error_1, state_1, ...args_1) => __awaiter(this, [code_1, error_1, state_1, ...args_1], void 0, function* (code, error, state, options = {}) {
|
|
4123
4186
|
const localVarPath = `/auth/discord/callback`;
|
|
4124
4187
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4125
4188
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -4139,6 +4202,9 @@ export const AuthenticationApiAxiosParamCreator = function (configuration) {
|
|
|
4139
4202
|
if (error !== undefined) {
|
|
4140
4203
|
localVarQueryParameter['error'] = error;
|
|
4141
4204
|
}
|
|
4205
|
+
if (state !== undefined) {
|
|
4206
|
+
localVarQueryParameter['state'] = state;
|
|
4207
|
+
}
|
|
4142
4208
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4143
4209
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4144
4210
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -4148,12 +4214,13 @@ export const AuthenticationApiAxiosParamCreator = function (configuration) {
|
|
|
4148
4214
|
};
|
|
4149
4215
|
}),
|
|
4150
4216
|
/**
|
|
4151
|
-
* Redirects the browser to Discord\'s OAuth2 authorization page.
|
|
4217
|
+
* 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.
|
|
4152
4218
|
* @summary Discord - Initiate login
|
|
4219
|
+
* @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.
|
|
4153
4220
|
* @param {*} [options] Override http request option.
|
|
4154
4221
|
* @throws {RequiredError}
|
|
4155
4222
|
*/
|
|
4156
|
-
initiateLogin: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
4223
|
+
initiateLogin: (redirect_1, ...args_1) => __awaiter(this, [redirect_1, ...args_1], void 0, function* (redirect, options = {}) {
|
|
4157
4224
|
const localVarPath = `/auth/discord`;
|
|
4158
4225
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4159
4226
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -4167,6 +4234,9 @@ export const AuthenticationApiAxiosParamCreator = function (configuration) {
|
|
|
4167
4234
|
// authentication DiscordAuth required
|
|
4168
4235
|
// http bearer authentication required
|
|
4169
4236
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
4237
|
+
if (redirect !== undefined) {
|
|
4238
|
+
localVarQueryParameter['redirect'] = redirect;
|
|
4239
|
+
}
|
|
4170
4240
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4171
4241
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4172
4242
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -4261,28 +4331,30 @@ export const AuthenticationApiFp = function (configuration) {
|
|
|
4261
4331
|
* @summary Discord - OAuth2 callback
|
|
4262
4332
|
* @param {string | null} [code] Authorization code provided by Discord on successful approval
|
|
4263
4333
|
* @param {string | null} [error] Error code provided by Discord if the user denied access
|
|
4334
|
+
* @param {string | null} [state] Opaque value echoed back by Discord — carries the client\'s chosen redirect target
|
|
4264
4335
|
* @param {*} [options] Override http request option.
|
|
4265
4336
|
* @throws {RequiredError}
|
|
4266
4337
|
*/
|
|
4267
|
-
callback(code, error, options) {
|
|
4338
|
+
callback(code, error, state, options) {
|
|
4268
4339
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4269
4340
|
var _a, _b, _c;
|
|
4270
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.callback(code, error, options);
|
|
4341
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.callback(code, error, state, options);
|
|
4271
4342
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4272
4343
|
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AuthenticationApi.callback']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
4273
4344
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4274
4345
|
});
|
|
4275
4346
|
},
|
|
4276
4347
|
/**
|
|
4277
|
-
* Redirects the browser to Discord\'s OAuth2 authorization page.
|
|
4348
|
+
* 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.
|
|
4278
4349
|
* @summary Discord - Initiate login
|
|
4350
|
+
* @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.
|
|
4279
4351
|
* @param {*} [options] Override http request option.
|
|
4280
4352
|
* @throws {RequiredError}
|
|
4281
4353
|
*/
|
|
4282
|
-
initiateLogin(options) {
|
|
4354
|
+
initiateLogin(redirect, options) {
|
|
4283
4355
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4284
4356
|
var _a, _b, _c;
|
|
4285
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.initiateLogin(options);
|
|
4357
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.initiateLogin(redirect, options);
|
|
4286
4358
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4287
4359
|
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AuthenticationApi.initiateLogin']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
4288
4360
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -4334,20 +4406,22 @@ export const AuthenticationApiFactory = function (configuration, basePath, axios
|
|
|
4334
4406
|
* @summary Discord - OAuth2 callback
|
|
4335
4407
|
* @param {string | null} [code] Authorization code provided by Discord on successful approval
|
|
4336
4408
|
* @param {string | null} [error] Error code provided by Discord if the user denied access
|
|
4409
|
+
* @param {string | null} [state] Opaque value echoed back by Discord — carries the client\'s chosen redirect target
|
|
4337
4410
|
* @param {*} [options] Override http request option.
|
|
4338
4411
|
* @throws {RequiredError}
|
|
4339
4412
|
*/
|
|
4340
|
-
callback(code, error, options) {
|
|
4341
|
-
return localVarFp.callback(code, error, options).then((request) => request(axios, basePath));
|
|
4413
|
+
callback(code, error, state, options) {
|
|
4414
|
+
return localVarFp.callback(code, error, state, options).then((request) => request(axios, basePath));
|
|
4342
4415
|
},
|
|
4343
4416
|
/**
|
|
4344
|
-
* Redirects the browser to Discord\'s OAuth2 authorization page.
|
|
4417
|
+
* 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.
|
|
4345
4418
|
* @summary Discord - Initiate login
|
|
4419
|
+
* @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.
|
|
4346
4420
|
* @param {*} [options] Override http request option.
|
|
4347
4421
|
* @throws {RequiredError}
|
|
4348
4422
|
*/
|
|
4349
|
-
initiateLogin(options) {
|
|
4350
|
-
return localVarFp.initiateLogin(options).then((request) => request(axios, basePath));
|
|
4423
|
+
initiateLogin(redirect, options) {
|
|
4424
|
+
return localVarFp.initiateLogin(redirect, options).then((request) => request(axios, basePath));
|
|
4351
4425
|
},
|
|
4352
4426
|
/**
|
|
4353
4427
|
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
|
@@ -4381,20 +4455,22 @@ export class AuthenticationApi extends BaseAPI {
|
|
|
4381
4455
|
* @summary Discord - OAuth2 callback
|
|
4382
4456
|
* @param {string | null} [code] Authorization code provided by Discord on successful approval
|
|
4383
4457
|
* @param {string | null} [error] Error code provided by Discord if the user denied access
|
|
4458
|
+
* @param {string | null} [state] Opaque value echoed back by Discord — carries the client\'s chosen redirect target
|
|
4384
4459
|
* @param {*} [options] Override http request option.
|
|
4385
4460
|
* @throws {RequiredError}
|
|
4386
4461
|
*/
|
|
4387
|
-
callback(code, error, options) {
|
|
4388
|
-
return AuthenticationApiFp(this.configuration).callback(code, error, options).then((request) => request(this.axios, this.basePath));
|
|
4462
|
+
callback(code, error, state, options) {
|
|
4463
|
+
return AuthenticationApiFp(this.configuration).callback(code, error, state, options).then((request) => request(this.axios, this.basePath));
|
|
4389
4464
|
}
|
|
4390
4465
|
/**
|
|
4391
|
-
* Redirects the browser to Discord\'s OAuth2 authorization page.
|
|
4466
|
+
* 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.
|
|
4392
4467
|
* @summary Discord - Initiate login
|
|
4468
|
+
* @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.
|
|
4393
4469
|
* @param {*} [options] Override http request option.
|
|
4394
4470
|
* @throws {RequiredError}
|
|
4395
4471
|
*/
|
|
4396
|
-
initiateLogin(options) {
|
|
4397
|
-
return AuthenticationApiFp(this.configuration).initiateLogin(options).then((request) => request(this.axios, this.basePath));
|
|
4472
|
+
initiateLogin(redirect, options) {
|
|
4473
|
+
return AuthenticationApiFp(this.configuration).initiateLogin(redirect, options).then((request) => request(this.axios, this.basePath));
|
|
4398
4474
|
}
|
|
4399
4475
|
/**
|
|
4400
4476
|
* Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
|
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: 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).
|
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: 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/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: 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).
|
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: 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).
|
|
@@ -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).
|
|
@@ -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/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: 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).
|
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: 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/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: 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).
|
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: 4.
|
|
8
|
+
* The version of the OpenAPI document: 4.9.1
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/docs/AdminPlayersApi.md
CHANGED
|
@@ -24,6 +24,7 @@ All URIs are relative to *https://api.smsh.sh*
|
|
|
24
24
|
|[**setAggressiveModeImmunity**](#setaggressivemodeimmunity) | **PATCH** /admin/player/{uuid}/aggressive-mode-immunity | Toggle aggressive-mode immunity|
|
|
25
25
|
|[**trustFactorBreakdown**](#trustfactorbreakdown) | **GET** /admin/player/{uuid}/trust-factor-breakdown | Trust factor breakdown for a player|
|
|
26
26
|
|[**trustFactorHistory**](#trustfactorhistory) | **GET** /admin/player/{uuid}/trust-factor-history | Trust factor history for a player|
|
|
27
|
+
|[**trustFactorRecompute**](#trustfactorrecompute) | **POST** /admin/player/trust-factor-recompute | Start a trust-factor recompute job|
|
|
27
28
|
|
|
28
29
|
# **addAltExemption**
|
|
29
30
|
> addAltExemption(adminCreateAltExemptionRequest)
|
|
@@ -1144,3 +1145,49 @@ const { status, data } = await apiInstance.trustFactorHistory(
|
|
|
1144
1145
|
|
|
1145
1146
|
[[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)
|
|
1146
1147
|
|
|
1148
|
+
# **trustFactorRecompute**
|
|
1149
|
+
> AdminAsyncJobStartResponse trustFactorRecompute()
|
|
1150
|
+
|
|
1151
|
+
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.
|
|
1152
|
+
|
|
1153
|
+
### Example
|
|
1154
|
+
|
|
1155
|
+
```typescript
|
|
1156
|
+
import {
|
|
1157
|
+
AdminPlayersApi,
|
|
1158
|
+
Configuration
|
|
1159
|
+
} from '@rebornteam/reborn-api';
|
|
1160
|
+
|
|
1161
|
+
const configuration = new Configuration();
|
|
1162
|
+
const apiInstance = new AdminPlayersApi(configuration);
|
|
1163
|
+
|
|
1164
|
+
const { status, data } = await apiInstance.trustFactorRecompute();
|
|
1165
|
+
```
|
|
1166
|
+
|
|
1167
|
+
### Parameters
|
|
1168
|
+
This endpoint does not have any parameters.
|
|
1169
|
+
|
|
1170
|
+
|
|
1171
|
+
### Return type
|
|
1172
|
+
|
|
1173
|
+
**AdminAsyncJobStartResponse**
|
|
1174
|
+
|
|
1175
|
+
### Authorization
|
|
1176
|
+
|
|
1177
|
+
[DiscordAuth](../README.md#DiscordAuth)
|
|
1178
|
+
|
|
1179
|
+
### HTTP request headers
|
|
1180
|
+
|
|
1181
|
+
- **Content-Type**: Not defined
|
|
1182
|
+
- **Accept**: application/json
|
|
1183
|
+
|
|
1184
|
+
|
|
1185
|
+
### HTTP response details
|
|
1186
|
+
| Status code | Description | Response headers |
|
|
1187
|
+
|-------------|-------------|------------------|
|
|
1188
|
+
|**202** | Job accepted; poll /admin/job/{id} for progress | - |
|
|
1189
|
+
|**401** | Unauthorized | - |
|
|
1190
|
+
|**403** | Forbidden - Moderator role required | - |
|
|
1191
|
+
|
|
1192
|
+
[[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)
|
|
1193
|
+
|
|
@@ -27,10 +27,12 @@ const apiInstance = new AuthenticationApi(configuration);
|
|
|
27
27
|
|
|
28
28
|
let code: string; //Authorization code provided by Discord on successful approval (optional) (default to undefined)
|
|
29
29
|
let error: string; //Error code provided by Discord if the user denied access (optional) (default to undefined)
|
|
30
|
+
let state: string; //Opaque value echoed back by Discord — carries the client\'s chosen redirect target (optional) (default to undefined)
|
|
30
31
|
|
|
31
32
|
const { status, data } = await apiInstance.callback(
|
|
32
33
|
code,
|
|
33
|
-
error
|
|
34
|
+
error,
|
|
35
|
+
state
|
|
34
36
|
);
|
|
35
37
|
```
|
|
36
38
|
|
|
@@ -40,6 +42,7 @@ const { status, data } = await apiInstance.callback(
|
|
|
40
42
|
|------------- | ------------- | ------------- | -------------|
|
|
41
43
|
| **code** | [**string**] | Authorization code provided by Discord on successful approval | (optional) defaults to undefined|
|
|
42
44
|
| **error** | [**string**] | Error code provided by Discord if the user denied access | (optional) defaults to undefined|
|
|
45
|
+
| **state** | [**string**] | Opaque value echoed back by Discord — carries the client\'s chosen redirect target | (optional) defaults to undefined|
|
|
43
46
|
|
|
44
47
|
|
|
45
48
|
### Return type
|
|
@@ -66,7 +69,7 @@ void (empty response body)
|
|
|
66
69
|
# **initiateLogin**
|
|
67
70
|
> initiateLogin()
|
|
68
71
|
|
|
69
|
-
Redirects the browser to Discord\'s OAuth2 authorization page.
|
|
72
|
+
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.
|
|
70
73
|
|
|
71
74
|
### Example
|
|
72
75
|
|
|
@@ -79,11 +82,18 @@ import {
|
|
|
79
82
|
const configuration = new Configuration();
|
|
80
83
|
const apiInstance = new AuthenticationApi(configuration);
|
|
81
84
|
|
|
82
|
-
|
|
85
|
+
let redirect: string; //Final redirect target for the JWT (web URL or native deep link). Must be allowlisted. Defaults to the web admin frontend. (optional) (default to undefined)
|
|
86
|
+
|
|
87
|
+
const { status, data } = await apiInstance.initiateLogin(
|
|
88
|
+
redirect
|
|
89
|
+
);
|
|
83
90
|
```
|
|
84
91
|
|
|
85
92
|
### Parameters
|
|
86
|
-
|
|
93
|
+
|
|
94
|
+
|Name | Type | Description | Notes|
|
|
95
|
+
|------------- | ------------- | ------------- | -------------|
|
|
96
|
+
| **redirect** | [**string**] | Final redirect target for the JWT (web URL or native deep link). Must be allowlisted. Defaults to the web admin frontend. | (optional) defaults to undefined|
|
|
87
97
|
|
|
88
98
|
|
|
89
99
|
### Return type
|
|
@@ -104,6 +114,7 @@ void (empty response body)
|
|
|
104
114
|
| Status code | Description | Response headers |
|
|
105
115
|
|-------------|-------------|------------------|
|
|
106
116
|
|**302** | Redirect to Discord authorization URL | - |
|
|
117
|
+
|**400** | The requested `redirect` is not allowlisted | - |
|
|
107
118
|
|
|
108
119
|
[[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)
|
|
109
120
|
|
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: 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).
|