@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/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: 4.8.0
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).
@@ -2597,6 +2597,35 @@ const AdminPlayersApiAxiosParamCreator = function (configuration) {
2597
2597
  options: localVarRequestOptions,
2598
2598
  };
2599
2599
  }),
2600
+ /**
2601
+ * 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.
2602
+ * @summary Start a trust-factor recompute job
2603
+ * @param {*} [options] Override http request option.
2604
+ * @throws {RequiredError}
2605
+ */
2606
+ trustFactorRecompute: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
2607
+ const localVarPath = `/admin/player/trust-factor-recompute`;
2608
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2609
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2610
+ let baseOptions;
2611
+ if (configuration) {
2612
+ baseOptions = configuration.baseOptions;
2613
+ }
2614
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2615
+ const localVarHeaderParameter = {};
2616
+ const localVarQueryParameter = {};
2617
+ // authentication DiscordAuth required
2618
+ // http bearer authentication required
2619
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2620
+ localVarHeaderParameter['Accept'] = 'application/json';
2621
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2622
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2623
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2624
+ return {
2625
+ url: (0, common_1.toPathString)(localVarUrlObj),
2626
+ options: localVarRequestOptions,
2627
+ };
2628
+ }),
2600
2629
  };
2601
2630
  };
2602
2631
  exports.AdminPlayersApiAxiosParamCreator = AdminPlayersApiAxiosParamCreator;
@@ -2940,6 +2969,21 @@ const AdminPlayersApiFp = function (configuration) {
2940
2969
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2941
2970
  });
2942
2971
  },
2972
+ /**
2973
+ * 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.
2974
+ * @summary Start a trust-factor recompute job
2975
+ * @param {*} [options] Override http request option.
2976
+ * @throws {RequiredError}
2977
+ */
2978
+ trustFactorRecompute(options) {
2979
+ return __awaiter(this, void 0, void 0, function* () {
2980
+ var _a, _b, _c;
2981
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.trustFactorRecompute(options);
2982
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2983
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AdminPlayersApi.trustFactorRecompute']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2984
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2985
+ });
2986
+ },
2943
2987
  };
2944
2988
  };
2945
2989
  exports.AdminPlayersApiFp = AdminPlayersApiFp;
@@ -3163,6 +3207,15 @@ const AdminPlayersApiFactory = function (configuration, basePath, axios) {
3163
3207
  trustFactorHistory(uuid, days, options) {
3164
3208
  return localVarFp.trustFactorHistory(uuid, days, options).then((request) => request(axios, basePath));
3165
3209
  },
3210
+ /**
3211
+ * 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.
3212
+ * @summary Start a trust-factor recompute job
3213
+ * @param {*} [options] Override http request option.
3214
+ * @throws {RequiredError}
3215
+ */
3216
+ trustFactorRecompute(options) {
3217
+ return localVarFp.trustFactorRecompute(options).then((request) => request(axios, basePath));
3218
+ },
3166
3219
  };
3167
3220
  };
3168
3221
  exports.AdminPlayersApiFactory = AdminPlayersApiFactory;
@@ -3384,6 +3437,15 @@ class AdminPlayersApi extends base_1.BaseAPI {
3384
3437
  trustFactorHistory(uuid, days, options) {
3385
3438
  return (0, exports.AdminPlayersApiFp)(this.configuration).trustFactorHistory(uuid, days, options).then((request) => request(this.axios, this.basePath));
3386
3439
  }
3440
+ /**
3441
+ * 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.
3442
+ * @summary Start a trust-factor recompute job
3443
+ * @param {*} [options] Override http request option.
3444
+ * @throws {RequiredError}
3445
+ */
3446
+ trustFactorRecompute(options) {
3447
+ return (0, exports.AdminPlayersApiFp)(this.configuration).trustFactorRecompute(options).then((request) => request(this.axios, this.basePath));
3448
+ }
3387
3449
  }
3388
3450
  exports.AdminPlayersApi = AdminPlayersApi;
3389
3451
  /**
@@ -4152,10 +4214,11 @@ const AuthenticationApiAxiosParamCreator = function (configuration) {
4152
4214
  * @summary Discord - OAuth2 callback
4153
4215
  * @param {string | null} [code] Authorization code provided by Discord on successful approval
4154
4216
  * @param {string | null} [error] Error code provided by Discord if the user denied access
4217
+ * @param {string | null} [state] Opaque value echoed back by Discord — carries the client\'s chosen redirect target
4155
4218
  * @param {*} [options] Override http request option.
4156
4219
  * @throws {RequiredError}
4157
4220
  */
4158
- callback: (code_1, error_1, ...args_1) => __awaiter(this, [code_1, error_1, ...args_1], void 0, function* (code, error, options = {}) {
4221
+ 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 = {}) {
4159
4222
  const localVarPath = `/auth/discord/callback`;
4160
4223
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
4161
4224
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -4175,6 +4238,9 @@ const AuthenticationApiAxiosParamCreator = function (configuration) {
4175
4238
  if (error !== undefined) {
4176
4239
  localVarQueryParameter['error'] = error;
4177
4240
  }
4241
+ if (state !== undefined) {
4242
+ localVarQueryParameter['state'] = state;
4243
+ }
4178
4244
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
4179
4245
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4180
4246
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -4184,12 +4250,13 @@ const AuthenticationApiAxiosParamCreator = function (configuration) {
4184
4250
  };
4185
4251
  }),
4186
4252
  /**
4187
- * Redirects the browser to Discord\'s OAuth2 authorization page. Not called directly the admin frontend navigates to this URL to begin the login flow.
4253
+ * 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.
4188
4254
  * @summary Discord - Initiate login
4255
+ * @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.
4189
4256
  * @param {*} [options] Override http request option.
4190
4257
  * @throws {RequiredError}
4191
4258
  */
4192
- initiateLogin: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
4259
+ initiateLogin: (redirect_1, ...args_1) => __awaiter(this, [redirect_1, ...args_1], void 0, function* (redirect, options = {}) {
4193
4260
  const localVarPath = `/auth/discord`;
4194
4261
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
4195
4262
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -4203,6 +4270,9 @@ const AuthenticationApiAxiosParamCreator = function (configuration) {
4203
4270
  // authentication DiscordAuth required
4204
4271
  // http bearer authentication required
4205
4272
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
4273
+ if (redirect !== undefined) {
4274
+ localVarQueryParameter['redirect'] = redirect;
4275
+ }
4206
4276
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
4207
4277
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4208
4278
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -4298,28 +4368,30 @@ const AuthenticationApiFp = function (configuration) {
4298
4368
  * @summary Discord - OAuth2 callback
4299
4369
  * @param {string | null} [code] Authorization code provided by Discord on successful approval
4300
4370
  * @param {string | null} [error] Error code provided by Discord if the user denied access
4371
+ * @param {string | null} [state] Opaque value echoed back by Discord — carries the client\'s chosen redirect target
4301
4372
  * @param {*} [options] Override http request option.
4302
4373
  * @throws {RequiredError}
4303
4374
  */
4304
- callback(code, error, options) {
4375
+ callback(code, error, state, options) {
4305
4376
  return __awaiter(this, void 0, void 0, function* () {
4306
4377
  var _a, _b, _c;
4307
- const localVarAxiosArgs = yield localVarAxiosParamCreator.callback(code, error, options);
4378
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.callback(code, error, state, options);
4308
4379
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
4309
4380
  const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AuthenticationApi.callback']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
4310
4381
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4311
4382
  });
4312
4383
  },
4313
4384
  /**
4314
- * Redirects the browser to Discord\'s OAuth2 authorization page. Not called directly the admin frontend navigates to this URL to begin the login flow.
4385
+ * 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.
4315
4386
  * @summary Discord - Initiate login
4387
+ * @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.
4316
4388
  * @param {*} [options] Override http request option.
4317
4389
  * @throws {RequiredError}
4318
4390
  */
4319
- initiateLogin(options) {
4391
+ initiateLogin(redirect, options) {
4320
4392
  return __awaiter(this, void 0, void 0, function* () {
4321
4393
  var _a, _b, _c;
4322
- const localVarAxiosArgs = yield localVarAxiosParamCreator.initiateLogin(options);
4394
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.initiateLogin(redirect, options);
4323
4395
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
4324
4396
  const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AuthenticationApi.initiateLogin']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
4325
4397
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -4372,20 +4444,22 @@ const AuthenticationApiFactory = function (configuration, basePath, axios) {
4372
4444
  * @summary Discord - OAuth2 callback
4373
4445
  * @param {string | null} [code] Authorization code provided by Discord on successful approval
4374
4446
  * @param {string | null} [error] Error code provided by Discord if the user denied access
4447
+ * @param {string | null} [state] Opaque value echoed back by Discord — carries the client\'s chosen redirect target
4375
4448
  * @param {*} [options] Override http request option.
4376
4449
  * @throws {RequiredError}
4377
4450
  */
4378
- callback(code, error, options) {
4379
- return localVarFp.callback(code, error, options).then((request) => request(axios, basePath));
4451
+ callback(code, error, state, options) {
4452
+ return localVarFp.callback(code, error, state, options).then((request) => request(axios, basePath));
4380
4453
  },
4381
4454
  /**
4382
- * Redirects the browser to Discord\'s OAuth2 authorization page. Not called directly the admin frontend navigates to this URL to begin the login flow.
4455
+ * 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.
4383
4456
  * @summary Discord - Initiate login
4457
+ * @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.
4384
4458
  * @param {*} [options] Override http request option.
4385
4459
  * @throws {RequiredError}
4386
4460
  */
4387
- initiateLogin(options) {
4388
- return localVarFp.initiateLogin(options).then((request) => request(axios, basePath));
4461
+ initiateLogin(redirect, options) {
4462
+ return localVarFp.initiateLogin(redirect, options).then((request) => request(axios, basePath));
4389
4463
  },
4390
4464
  /**
4391
4465
  * Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
@@ -4420,20 +4494,22 @@ class AuthenticationApi extends base_1.BaseAPI {
4420
4494
  * @summary Discord - OAuth2 callback
4421
4495
  * @param {string | null} [code] Authorization code provided by Discord on successful approval
4422
4496
  * @param {string | null} [error] Error code provided by Discord if the user denied access
4497
+ * @param {string | null} [state] Opaque value echoed back by Discord — carries the client\'s chosen redirect target
4423
4498
  * @param {*} [options] Override http request option.
4424
4499
  * @throws {RequiredError}
4425
4500
  */
4426
- callback(code, error, options) {
4427
- return (0, exports.AuthenticationApiFp)(this.configuration).callback(code, error, options).then((request) => request(this.axios, this.basePath));
4501
+ callback(code, error, state, options) {
4502
+ return (0, exports.AuthenticationApiFp)(this.configuration).callback(code, error, state, options).then((request) => request(this.axios, this.basePath));
4428
4503
  }
4429
4504
  /**
4430
- * Redirects the browser to Discord\'s OAuth2 authorization page. Not called directly the admin frontend navigates to this URL to begin the login flow.
4505
+ * 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.
4431
4506
  * @summary Discord - Initiate login
4507
+ * @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.
4432
4508
  * @param {*} [options] Override http request option.
4433
4509
  * @throws {RequiredError}
4434
4510
  */
4435
- initiateLogin(options) {
4436
- return (0, exports.AuthenticationApiFp)(this.configuration).initiateLogin(options).then((request) => request(this.axios, this.basePath));
4511
+ initiateLogin(redirect, options) {
4512
+ return (0, exports.AuthenticationApiFp)(this.configuration).initiateLogin(redirect, options).then((request) => request(this.axios, this.basePath));
4437
4513
  }
4438
4514
  /**
4439
4515
  * 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/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.8.0
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/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: 4.8.0
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/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: 4.8.0
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/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: 4.8.0
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).
@@ -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.8.0
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).
@@ -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.8.0
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/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.8.0
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\&#39;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. Not called directly the admin frontend navigates to this URL to begin the login flow.
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\&#39;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. Not called directly the admin frontend navigates to this URL to begin the login flow.
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\&#39;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. Not called directly the admin frontend navigates to this URL to begin the login flow.
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\&#39;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. Not called directly the admin frontend navigates to this URL to begin the login flow.
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