@rebornteam/reborn-api 4.9.2 → 4.9.4

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/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.9.2
5
+ * The version of the OpenAPI document: 4.9.4
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -13,6 +13,43 @@ import type { Configuration } from './configuration';
13
13
  import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
14
  import type { RequestArgs } from './base';
15
15
  import { BaseAPI } from './base';
16
+ /**
17
+ * Source AdvancedBan MySQL connection details for a punishment import.
18
+ */
19
+ export interface AdminAdvancedBanImportRequest {
20
+ /**
21
+ * MySQL host
22
+ */
23
+ 'host': string;
24
+ /**
25
+ * MySQL port (default 3306)
26
+ */
27
+ 'port'?: number | null;
28
+ /**
29
+ * Database / schema name
30
+ */
31
+ 'database': string;
32
+ /**
33
+ * MySQL username
34
+ */
35
+ 'username': string;
36
+ /**
37
+ * MySQL password
38
+ */
39
+ 'password'?: string | null;
40
+ /**
41
+ * Active punishments table (default \'Punishments\')
42
+ */
43
+ 'activeTable'?: string | null;
44
+ /**
45
+ * History table (default \'PunishmentHistory\')
46
+ */
47
+ 'historyTable'?: string | null;
48
+ /**
49
+ * Use TLS for the MySQL connection (default false)
50
+ */
51
+ 'useSsl'?: boolean | null;
52
+ }
16
53
  /**
17
54
  * Another player who has been seen on at least one of this player\'s historical connections — i.e. an alt account candidate.
18
55
  */
@@ -724,6 +761,68 @@ export interface AdminIpSearchResult {
724
761
  */
725
762
  'players': Array<AdminPlayerSearchResult>;
726
763
  }
764
+ /**
765
+ * Configuration metadata for a runnable job (fields + submit path).
766
+ */
767
+ export interface AdminJobConfig {
768
+ /**
769
+ * JobType name
770
+ */
771
+ 'jobType'?: string;
772
+ /**
773
+ * Display title
774
+ */
775
+ 'title'?: string;
776
+ /**
777
+ * Display description
778
+ */
779
+ 'description'?: string;
780
+ /**
781
+ * Path the filled-in {key:value} body is POSTed to
782
+ */
783
+ 'submitPath'?: string;
784
+ /**
785
+ * Whether running this job requires Administrator rank
786
+ */
787
+ 'requiresAdmin'?: boolean;
788
+ /**
789
+ * Fields to render, in order
790
+ */
791
+ 'fields'?: Array<AdminJobField>;
792
+ }
793
+ /**
794
+ * One configurable field of a runnable job.
795
+ */
796
+ export interface AdminJobField {
797
+ /**
798
+ * Field key; also the JSON property name submitted to the job\'s endpoint
799
+ */
800
+ 'key'?: string;
801
+ /**
802
+ * Human label for the input
803
+ */
804
+ 'label'?: string;
805
+ /**
806
+ * Input type
807
+ */
808
+ 'type'?: JobFieldType;
809
+ /**
810
+ * Whether the field must be provided
811
+ */
812
+ 'required'?: boolean;
813
+ /**
814
+ * Default value, string form (booleans use \"true\"/\"false\")
815
+ */
816
+ 'defaultValue'?: string | null;
817
+ /**
818
+ * Placeholder text
819
+ */
820
+ 'placeholder'?: string | null;
821
+ /**
822
+ * Optional helper text shown under the input
823
+ */
824
+ 'helpText'?: string | null;
825
+ }
727
826
  /**
728
827
  * Full player detail including punishment history and all known usernames
729
828
  */
@@ -1481,12 +1580,31 @@ export interface CursoredPageable {
1481
1580
  'sort': Sort;
1482
1581
  'backward': boolean;
1483
1582
  }
1583
+ /**
1584
+ * The Discord OAuth2 authorize URL, returned as JSON so a native client can open it directly (system browser → Discord-app universal-link hand-off) rather than following the backend\'s 302. Keeps client_id/scope server-side.
1585
+ */
1586
+ export interface DiscordAuthUrlResponse {
1587
+ /**
1588
+ * Discord OAuth2 authorize URL to open on the client.
1589
+ */
1590
+ 'authorizeUrl': string;
1591
+ }
1484
1592
  export declare const GameType: {
1485
1593
  readonly Rotj: "ROTJ";
1486
1594
  readonly Legacy: "LEGACY";
1487
1595
  readonly Classic: "CLASSIC";
1488
1596
  };
1489
1597
  export type GameType = typeof GameType[keyof typeof GameType];
1598
+ /**
1599
+ * Input type
1600
+ */
1601
+ export declare const JobFieldType: {
1602
+ readonly Text: "TEXT";
1603
+ readonly Number: "NUMBER";
1604
+ readonly Password: "PASSWORD";
1605
+ readonly Boolean: "BOOLEAN";
1606
+ };
1607
+ export type JobFieldType = typeof JobFieldType[keyof typeof JobFieldType];
1490
1608
  /**
1491
1609
  * Current lifecycle state.
1492
1610
  */
@@ -3088,6 +3206,58 @@ export declare class AdminDashboardApi extends BaseAPI {
3088
3206
  */
3089
3207
  trustDistribution(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AdminDashboardTrustBucket[], any, {}>>;
3090
3208
  }
3209
+ /**
3210
+ * AdminImportApi - axios parameter creator
3211
+ */
3212
+ export declare const AdminImportApiAxiosParamCreator: (configuration?: Configuration) => {
3213
+ /**
3214
+ * Connects to the supplied AdvancedBan MySQL database, reads its active and history punishment tables, and imports each as a Reborn punishment. Idempotent: rows already imported (matched on import_source + the AdvancedBan row id) are skipped, so existing punishments are never overridden. Runs as an async job — poll /admin/job/{id} for progress and the result payload.
3215
+ * @summary Import punishments from an AdvancedBan MySQL database
3216
+ * @param {AdminAdvancedBanImportRequest} adminAdvancedBanImportRequest
3217
+ * @param {*} [options] Override http request option.
3218
+ * @throws {RequiredError}
3219
+ */
3220
+ importAdvancedBan: (adminAdvancedBanImportRequest: AdminAdvancedBanImportRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
3221
+ };
3222
+ /**
3223
+ * AdminImportApi - functional programming interface
3224
+ */
3225
+ export declare const AdminImportApiFp: (configuration?: Configuration) => {
3226
+ /**
3227
+ * Connects to the supplied AdvancedBan MySQL database, reads its active and history punishment tables, and imports each as a Reborn punishment. Idempotent: rows already imported (matched on import_source + the AdvancedBan row id) are skipped, so existing punishments are never overridden. Runs as an async job — poll /admin/job/{id} for progress and the result payload.
3228
+ * @summary Import punishments from an AdvancedBan MySQL database
3229
+ * @param {AdminAdvancedBanImportRequest} adminAdvancedBanImportRequest
3230
+ * @param {*} [options] Override http request option.
3231
+ * @throws {RequiredError}
3232
+ */
3233
+ importAdvancedBan(adminAdvancedBanImportRequest: AdminAdvancedBanImportRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminAsyncJobStartResponse>>;
3234
+ };
3235
+ /**
3236
+ * AdminImportApi - factory interface
3237
+ */
3238
+ export declare const AdminImportApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
3239
+ /**
3240
+ * Connects to the supplied AdvancedBan MySQL database, reads its active and history punishment tables, and imports each as a Reborn punishment. Idempotent: rows already imported (matched on import_source + the AdvancedBan row id) are skipped, so existing punishments are never overridden. Runs as an async job — poll /admin/job/{id} for progress and the result payload.
3241
+ * @summary Import punishments from an AdvancedBan MySQL database
3242
+ * @param {AdminAdvancedBanImportRequest} adminAdvancedBanImportRequest
3243
+ * @param {*} [options] Override http request option.
3244
+ * @throws {RequiredError}
3245
+ */
3246
+ importAdvancedBan(adminAdvancedBanImportRequest: AdminAdvancedBanImportRequest, options?: RawAxiosRequestConfig): AxiosPromise<AdminAsyncJobStartResponse>;
3247
+ };
3248
+ /**
3249
+ * AdminImportApi - object-oriented interface
3250
+ */
3251
+ export declare class AdminImportApi extends BaseAPI {
3252
+ /**
3253
+ * Connects to the supplied AdvancedBan MySQL database, reads its active and history punishment tables, and imports each as a Reborn punishment. Idempotent: rows already imported (matched on import_source + the AdvancedBan row id) are skipped, so existing punishments are never overridden. Runs as an async job — poll /admin/job/{id} for progress and the result payload.
3254
+ * @summary Import punishments from an AdvancedBan MySQL database
3255
+ * @param {AdminAdvancedBanImportRequest} adminAdvancedBanImportRequest
3256
+ * @param {*} [options] Override http request option.
3257
+ * @throws {RequiredError}
3258
+ */
3259
+ importAdvancedBan(adminAdvancedBanImportRequest: AdminAdvancedBanImportRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AdminAsyncJobStartResponse, any, {}>>;
3260
+ }
3091
3261
  /**
3092
3262
  * AdminJobsApi - axios parameter creator
3093
3263
  */
@@ -3100,6 +3270,13 @@ export declare const AdminJobsApiAxiosParamCreator: (configuration?: Configurati
3100
3270
  * @throws {RequiredError}
3101
3271
  */
3102
3272
  cancel: (id: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
3273
+ /**
3274
+ * Metadata for jobs that take configuration: the fields the configure dialog should render and the path to POST the filled values to. Field keys match the target endpoint\'s request body. Paramless jobs are not listed here.
3275
+ * @summary List configurable jobs
3276
+ * @param {*} [options] Override http request option.
3277
+ * @throws {RequiredError}
3278
+ */
3279
+ config: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
3103
3280
  /**
3104
3281
  * Returns the CSV emitted by the job — typically one row per record the job touched. The first line is a header; subsequent lines are RFC-4180 escaped data rows. 404 when the job has no artifact (either it didn\'t emit one, or it hasn\'t finished yet).
3105
3282
  * @summary Download a job\'s CSV artifact
@@ -3138,6 +3315,13 @@ export declare const AdminJobsApiFp: (configuration?: Configuration) => {
3138
3315
  * @throws {RequiredError}
3139
3316
  */
3140
3317
  cancel(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
3318
+ /**
3319
+ * Metadata for jobs that take configuration: the fields the configure dialog should render and the path to POST the filled values to. Field keys match the target endpoint\'s request body. Paramless jobs are not listed here.
3320
+ * @summary List configurable jobs
3321
+ * @param {*} [options] Override http request option.
3322
+ * @throws {RequiredError}
3323
+ */
3324
+ config(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AdminJobConfig>>>;
3141
3325
  /**
3142
3326
  * Returns the CSV emitted by the job — typically one row per record the job touched. The first line is a header; subsequent lines are RFC-4180 escaped data rows. 404 when the job has no artifact (either it didn\'t emit one, or it hasn\'t finished yet).
3143
3327
  * @summary Download a job\'s CSV artifact
@@ -3176,6 +3360,13 @@ export declare const AdminJobsApiFactory: (configuration?: Configuration, basePa
3176
3360
  * @throws {RequiredError}
3177
3361
  */
3178
3362
  cancel(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
3363
+ /**
3364
+ * Metadata for jobs that take configuration: the fields the configure dialog should render and the path to POST the filled values to. Field keys match the target endpoint\'s request body. Paramless jobs are not listed here.
3365
+ * @summary List configurable jobs
3366
+ * @param {*} [options] Override http request option.
3367
+ * @throws {RequiredError}
3368
+ */
3369
+ config(options?: RawAxiosRequestConfig): AxiosPromise<Array<AdminJobConfig>>;
3179
3370
  /**
3180
3371
  * Returns the CSV emitted by the job — typically one row per record the job touched. The first line is a header; subsequent lines are RFC-4180 escaped data rows. 404 when the job has no artifact (either it didn\'t emit one, or it hasn\'t finished yet).
3181
3372
  * @summary Download a job\'s CSV artifact
@@ -3214,6 +3405,13 @@ export declare class AdminJobsApi extends BaseAPI {
3214
3405
  * @throws {RequiredError}
3215
3406
  */
3216
3407
  cancel(id: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
3408
+ /**
3409
+ * Metadata for jobs that take configuration: the fields the configure dialog should render and the path to POST the filled values to. Field keys match the target endpoint\'s request body. Paramless jobs are not listed here.
3410
+ * @summary List configurable jobs
3411
+ * @param {*} [options] Override http request option.
3412
+ * @throws {RequiredError}
3413
+ */
3414
+ config(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AdminJobConfig[], any, {}>>;
3217
3415
  /**
3218
3416
  * Returns the CSV emitted by the job — typically one row per record the job touched. The first line is a header; subsequent lines are RFC-4180 escaped data rows. 404 when the job has no artifact (either it didn\'t emit one, or it hasn\'t finished yet).
3219
3417
  * @summary Download a job\'s CSV artifact
@@ -4352,6 +4550,14 @@ export declare class AdminReportsApi extends BaseAPI {
4352
4550
  * AuthenticationApi - axios parameter creator
4353
4551
  */
4354
4552
  export declare const AuthenticationApiAxiosParamCreator: (configuration?: Configuration) => {
4553
+ /**
4554
+ * Returns the Discord OAuth2 authorize URL as JSON so a native app can open it directly (system browser → Discord-app universal-link hand-off) instead of following the 302. The `redirect` is validated against the allowlist and carried through Discord via `state`, exactly like the browser flow; the callback still bounces the JWT to that target.
4555
+ * @summary Discord - Authorize URL (native clients)
4556
+ * @param {string | null} [redirect] Final redirect target for the JWT (native deep link). Must be allowlisted.
4557
+ * @param {*} [options] Override http request option.
4558
+ * @throws {RequiredError}
4559
+ */
4560
+ authorizeUrl: (redirect?: string | null, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
4355
4561
  /**
4356
4562
  * Receives the authorization code from Discord after the user approves the OAuth2 prompt. Exchanges the code for an access token, verifies the user holds an admin guild role, then redirects back to the admin frontend with a signed JWT in the query string (`?token=...`). On failure, redirects with `?error=<reason>` instead.
4357
4563
  * @summary Discord - OAuth2 callback
@@ -4392,6 +4598,14 @@ export declare const AuthenticationApiAxiosParamCreator: (configuration?: Config
4392
4598
  * AuthenticationApi - functional programming interface
4393
4599
  */
4394
4600
  export declare const AuthenticationApiFp: (configuration?: Configuration) => {
4601
+ /**
4602
+ * Returns the Discord OAuth2 authorize URL as JSON so a native app can open it directly (system browser → Discord-app universal-link hand-off) instead of following the 302. The `redirect` is validated against the allowlist and carried through Discord via `state`, exactly like the browser flow; the callback still bounces the JWT to that target.
4603
+ * @summary Discord - Authorize URL (native clients)
4604
+ * @param {string | null} [redirect] Final redirect target for the JWT (native deep link). Must be allowlisted.
4605
+ * @param {*} [options] Override http request option.
4606
+ * @throws {RequiredError}
4607
+ */
4608
+ authorizeUrl(redirect?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DiscordAuthUrlResponse>>;
4395
4609
  /**
4396
4610
  * Receives the authorization code from Discord after the user approves the OAuth2 prompt. Exchanges the code for an access token, verifies the user holds an admin guild role, then redirects back to the admin frontend with a signed JWT in the query string (`?token=...`). On failure, redirects with `?error=<reason>` instead.
4397
4611
  * @summary Discord - OAuth2 callback
@@ -4432,6 +4646,14 @@ export declare const AuthenticationApiFp: (configuration?: Configuration) => {
4432
4646
  * AuthenticationApi - factory interface
4433
4647
  */
4434
4648
  export declare const AuthenticationApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
4649
+ /**
4650
+ * Returns the Discord OAuth2 authorize URL as JSON so a native app can open it directly (system browser → Discord-app universal-link hand-off) instead of following the 302. The `redirect` is validated against the allowlist and carried through Discord via `state`, exactly like the browser flow; the callback still bounces the JWT to that target.
4651
+ * @summary Discord - Authorize URL (native clients)
4652
+ * @param {string | null} [redirect] Final redirect target for the JWT (native deep link). Must be allowlisted.
4653
+ * @param {*} [options] Override http request option.
4654
+ * @throws {RequiredError}
4655
+ */
4656
+ authorizeUrl(redirect?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<DiscordAuthUrlResponse>;
4435
4657
  /**
4436
4658
  * Receives the authorization code from Discord after the user approves the OAuth2 prompt. Exchanges the code for an access token, verifies the user holds an admin guild role, then redirects back to the admin frontend with a signed JWT in the query string (`?token=...`). On failure, redirects with `?error=<reason>` instead.
4437
4659
  * @summary Discord - OAuth2 callback
@@ -4472,6 +4694,14 @@ export declare const AuthenticationApiFactory: (configuration?: Configuration, b
4472
4694
  * AuthenticationApi - object-oriented interface
4473
4695
  */
4474
4696
  export declare class AuthenticationApi extends BaseAPI {
4697
+ /**
4698
+ * Returns the Discord OAuth2 authorize URL as JSON so a native app can open it directly (system browser → Discord-app universal-link hand-off) instead of following the 302. The `redirect` is validated against the allowlist and carried through Discord via `state`, exactly like the browser flow; the callback still bounces the JWT to that target.
4699
+ * @summary Discord - Authorize URL (native clients)
4700
+ * @param {string | null} [redirect] Final redirect target for the JWT (native deep link). Must be allowlisted.
4701
+ * @param {*} [options] Override http request option.
4702
+ * @throws {RequiredError}
4703
+ */
4704
+ authorizeUrl(redirect?: string | null, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DiscordAuthUrlResponse, any, {}>>;
4475
4705
  /**
4476
4706
  * Receives the authorization code from Discord after the user approves the OAuth2 prompt. Exchanges the code for an access token, verifies the user holds an admin guild role, then redirects back to the admin frontend with a signed JWT in the query string (`?token=...`). On failure, redirects with `?error=<reason>` instead.
4477
4707
  * @summary Discord - OAuth2 callback
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.9.2
7
+ * The version of the OpenAPI document: 4.9.4
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -40,6 +40,15 @@ export const GameType = {
40
40
  Legacy: 'LEGACY',
41
41
  Classic: 'CLASSIC'
42
42
  };
43
+ /**
44
+ * Input type
45
+ */
46
+ export const JobFieldType = {
47
+ Text: 'TEXT',
48
+ Number: 'NUMBER',
49
+ Password: 'PASSWORD',
50
+ Boolean: 'BOOLEAN'
51
+ };
43
52
  /**
44
53
  * Current lifecycle state.
45
54
  */
@@ -2140,6 +2149,104 @@ export class AdminDashboardApi extends BaseAPI {
2140
2149
  return AdminDashboardApiFp(this.configuration).trustDistribution(options).then((request) => request(this.axios, this.basePath));
2141
2150
  }
2142
2151
  }
2152
+ /**
2153
+ * AdminImportApi - axios parameter creator
2154
+ */
2155
+ export const AdminImportApiAxiosParamCreator = function (configuration) {
2156
+ return {
2157
+ /**
2158
+ * Connects to the supplied AdvancedBan MySQL database, reads its active and history punishment tables, and imports each as a Reborn punishment. Idempotent: rows already imported (matched on import_source + the AdvancedBan row id) are skipped, so existing punishments are never overridden. Runs as an async job — poll /admin/job/{id} for progress and the result payload.
2159
+ * @summary Import punishments from an AdvancedBan MySQL database
2160
+ * @param {AdminAdvancedBanImportRequest} adminAdvancedBanImportRequest
2161
+ * @param {*} [options] Override http request option.
2162
+ * @throws {RequiredError}
2163
+ */
2164
+ importAdvancedBan: (adminAdvancedBanImportRequest_1, ...args_1) => __awaiter(this, [adminAdvancedBanImportRequest_1, ...args_1], void 0, function* (adminAdvancedBanImportRequest, options = {}) {
2165
+ // verify required parameter 'adminAdvancedBanImportRequest' is not null or undefined
2166
+ assertParamExists('importAdvancedBan', 'adminAdvancedBanImportRequest', adminAdvancedBanImportRequest);
2167
+ const localVarPath = `/admin/import/advancedban`;
2168
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2169
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2170
+ let baseOptions;
2171
+ if (configuration) {
2172
+ baseOptions = configuration.baseOptions;
2173
+ }
2174
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2175
+ const localVarHeaderParameter = {};
2176
+ const localVarQueryParameter = {};
2177
+ // authentication DiscordAuth required
2178
+ // http bearer authentication required
2179
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2180
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2181
+ localVarHeaderParameter['Accept'] = 'application/json';
2182
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2183
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2184
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2185
+ localVarRequestOptions.data = serializeDataIfNeeded(adminAdvancedBanImportRequest, localVarRequestOptions, configuration);
2186
+ return {
2187
+ url: toPathString(localVarUrlObj),
2188
+ options: localVarRequestOptions,
2189
+ };
2190
+ }),
2191
+ };
2192
+ };
2193
+ /**
2194
+ * AdminImportApi - functional programming interface
2195
+ */
2196
+ export const AdminImportApiFp = function (configuration) {
2197
+ const localVarAxiosParamCreator = AdminImportApiAxiosParamCreator(configuration);
2198
+ return {
2199
+ /**
2200
+ * Connects to the supplied AdvancedBan MySQL database, reads its active and history punishment tables, and imports each as a Reborn punishment. Idempotent: rows already imported (matched on import_source + the AdvancedBan row id) are skipped, so existing punishments are never overridden. Runs as an async job — poll /admin/job/{id} for progress and the result payload.
2201
+ * @summary Import punishments from an AdvancedBan MySQL database
2202
+ * @param {AdminAdvancedBanImportRequest} adminAdvancedBanImportRequest
2203
+ * @param {*} [options] Override http request option.
2204
+ * @throws {RequiredError}
2205
+ */
2206
+ importAdvancedBan(adminAdvancedBanImportRequest, options) {
2207
+ return __awaiter(this, void 0, void 0, function* () {
2208
+ var _a, _b, _c;
2209
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.importAdvancedBan(adminAdvancedBanImportRequest, options);
2210
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2211
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminImportApi.importAdvancedBan']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2212
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2213
+ });
2214
+ },
2215
+ };
2216
+ };
2217
+ /**
2218
+ * AdminImportApi - factory interface
2219
+ */
2220
+ export const AdminImportApiFactory = function (configuration, basePath, axios) {
2221
+ const localVarFp = AdminImportApiFp(configuration);
2222
+ return {
2223
+ /**
2224
+ * Connects to the supplied AdvancedBan MySQL database, reads its active and history punishment tables, and imports each as a Reborn punishment. Idempotent: rows already imported (matched on import_source + the AdvancedBan row id) are skipped, so existing punishments are never overridden. Runs as an async job — poll /admin/job/{id} for progress and the result payload.
2225
+ * @summary Import punishments from an AdvancedBan MySQL database
2226
+ * @param {AdminAdvancedBanImportRequest} adminAdvancedBanImportRequest
2227
+ * @param {*} [options] Override http request option.
2228
+ * @throws {RequiredError}
2229
+ */
2230
+ importAdvancedBan(adminAdvancedBanImportRequest, options) {
2231
+ return localVarFp.importAdvancedBan(adminAdvancedBanImportRequest, options).then((request) => request(axios, basePath));
2232
+ },
2233
+ };
2234
+ };
2235
+ /**
2236
+ * AdminImportApi - object-oriented interface
2237
+ */
2238
+ export class AdminImportApi extends BaseAPI {
2239
+ /**
2240
+ * Connects to the supplied AdvancedBan MySQL database, reads its active and history punishment tables, and imports each as a Reborn punishment. Idempotent: rows already imported (matched on import_source + the AdvancedBan row id) are skipped, so existing punishments are never overridden. Runs as an async job — poll /admin/job/{id} for progress and the result payload.
2241
+ * @summary Import punishments from an AdvancedBan MySQL database
2242
+ * @param {AdminAdvancedBanImportRequest} adminAdvancedBanImportRequest
2243
+ * @param {*} [options] Override http request option.
2244
+ * @throws {RequiredError}
2245
+ */
2246
+ importAdvancedBan(adminAdvancedBanImportRequest, options) {
2247
+ return AdminImportApiFp(this.configuration).importAdvancedBan(adminAdvancedBanImportRequest, options).then((request) => request(this.axios, this.basePath));
2248
+ }
2249
+ }
2143
2250
  /**
2144
2251
  * AdminJobsApi - axios parameter creator
2145
2252
  */
@@ -2177,6 +2284,35 @@ export const AdminJobsApiAxiosParamCreator = function (configuration) {
2177
2284
  options: localVarRequestOptions,
2178
2285
  };
2179
2286
  }),
2287
+ /**
2288
+ * Metadata for jobs that take configuration: the fields the configure dialog should render and the path to POST the filled values to. Field keys match the target endpoint\'s request body. Paramless jobs are not listed here.
2289
+ * @summary List configurable jobs
2290
+ * @param {*} [options] Override http request option.
2291
+ * @throws {RequiredError}
2292
+ */
2293
+ config: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
2294
+ const localVarPath = `/admin/job/config`;
2295
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2296
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2297
+ let baseOptions;
2298
+ if (configuration) {
2299
+ baseOptions = configuration.baseOptions;
2300
+ }
2301
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2302
+ const localVarHeaderParameter = {};
2303
+ const localVarQueryParameter = {};
2304
+ // authentication DiscordAuth required
2305
+ // http bearer authentication required
2306
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2307
+ localVarHeaderParameter['Accept'] = 'application/json';
2308
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2309
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2310
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2311
+ return {
2312
+ url: toPathString(localVarUrlObj),
2313
+ options: localVarRequestOptions,
2314
+ };
2315
+ }),
2180
2316
  /**
2181
2317
  * Returns the CSV emitted by the job — typically one row per record the job touched. The first line is a header; subsequent lines are RFC-4180 escaped data rows. 404 when the job has no artifact (either it didn\'t emit one, or it hasn\'t finished yet).
2182
2318
  * @summary Download a job\'s CSV artifact
@@ -2306,6 +2442,21 @@ export const AdminJobsApiFp = function (configuration) {
2306
2442
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2307
2443
  });
2308
2444
  },
2445
+ /**
2446
+ * Metadata for jobs that take configuration: the fields the configure dialog should render and the path to POST the filled values to. Field keys match the target endpoint\'s request body. Paramless jobs are not listed here.
2447
+ * @summary List configurable jobs
2448
+ * @param {*} [options] Override http request option.
2449
+ * @throws {RequiredError}
2450
+ */
2451
+ config(options) {
2452
+ return __awaiter(this, void 0, void 0, function* () {
2453
+ var _a, _b, _c;
2454
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.config(options);
2455
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2456
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminJobsApi.config']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2457
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2458
+ });
2459
+ },
2309
2460
  /**
2310
2461
  * Returns the CSV emitted by the job — typically one row per record the job touched. The first line is a header; subsequent lines are RFC-4180 escaped data rows. 404 when the job has no artifact (either it didn\'t emit one, or it hasn\'t finished yet).
2311
2462
  * @summary Download a job\'s CSV artifact
@@ -2373,6 +2524,15 @@ export const AdminJobsApiFactory = function (configuration, basePath, axios) {
2373
2524
  cancel(id, options) {
2374
2525
  return localVarFp.cancel(id, options).then((request) => request(axios, basePath));
2375
2526
  },
2527
+ /**
2528
+ * Metadata for jobs that take configuration: the fields the configure dialog should render and the path to POST the filled values to. Field keys match the target endpoint\'s request body. Paramless jobs are not listed here.
2529
+ * @summary List configurable jobs
2530
+ * @param {*} [options] Override http request option.
2531
+ * @throws {RequiredError}
2532
+ */
2533
+ config(options) {
2534
+ return localVarFp.config(options).then((request) => request(axios, basePath));
2535
+ },
2376
2536
  /**
2377
2537
  * Returns the CSV emitted by the job — typically one row per record the job touched. The first line is a header; subsequent lines are RFC-4180 escaped data rows. 404 when the job has no artifact (either it didn\'t emit one, or it hasn\'t finished yet).
2378
2538
  * @summary Download a job\'s CSV artifact
@@ -2420,6 +2580,15 @@ export class AdminJobsApi extends BaseAPI {
2420
2580
  cancel(id, options) {
2421
2581
  return AdminJobsApiFp(this.configuration).cancel(id, options).then((request) => request(this.axios, this.basePath));
2422
2582
  }
2583
+ /**
2584
+ * Metadata for jobs that take configuration: the fields the configure dialog should render and the path to POST the filled values to. Field keys match the target endpoint\'s request body. Paramless jobs are not listed here.
2585
+ * @summary List configurable jobs
2586
+ * @param {*} [options] Override http request option.
2587
+ * @throws {RequiredError}
2588
+ */
2589
+ config(options) {
2590
+ return AdminJobsApiFp(this.configuration).config(options).then((request) => request(this.axios, this.basePath));
2591
+ }
2423
2592
  /**
2424
2593
  * Returns the CSV emitted by the job — typically one row per record the job touched. The first line is a header; subsequent lines are RFC-4180 escaped data rows. 404 when the job has no artifact (either it didn\'t emit one, or it hasn\'t finished yet).
2425
2594
  * @summary Download a job\'s CSV artifact
@@ -4787,6 +4956,39 @@ export class AdminReportsApi extends BaseAPI {
4787
4956
  */
4788
4957
  export const AuthenticationApiAxiosParamCreator = function (configuration) {
4789
4958
  return {
4959
+ /**
4960
+ * Returns the Discord OAuth2 authorize URL as JSON so a native app can open it directly (system browser → Discord-app universal-link hand-off) instead of following the 302. The `redirect` is validated against the allowlist and carried through Discord via `state`, exactly like the browser flow; the callback still bounces the JWT to that target.
4961
+ * @summary Discord - Authorize URL (native clients)
4962
+ * @param {string | null} [redirect] Final redirect target for the JWT (native deep link). Must be allowlisted.
4963
+ * @param {*} [options] Override http request option.
4964
+ * @throws {RequiredError}
4965
+ */
4966
+ authorizeUrl: (redirect_1, ...args_1) => __awaiter(this, [redirect_1, ...args_1], void 0, function* (redirect, options = {}) {
4967
+ const localVarPath = `/auth/discord/url`;
4968
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4969
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4970
+ let baseOptions;
4971
+ if (configuration) {
4972
+ baseOptions = configuration.baseOptions;
4973
+ }
4974
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
4975
+ const localVarHeaderParameter = {};
4976
+ const localVarQueryParameter = {};
4977
+ // authentication DiscordAuth required
4978
+ // http bearer authentication required
4979
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
4980
+ if (redirect !== undefined) {
4981
+ localVarQueryParameter['redirect'] = redirect;
4982
+ }
4983
+ localVarHeaderParameter['Accept'] = 'application/json';
4984
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4985
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4986
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
4987
+ return {
4988
+ url: toPathString(localVarUrlObj),
4989
+ options: localVarRequestOptions,
4990
+ };
4991
+ }),
4790
4992
  /**
4791
4993
  * Receives the authorization code from Discord after the user approves the OAuth2 prompt. Exchanges the code for an access token, verifies the user holds an admin guild role, then redirects back to the admin frontend with a signed JWT in the query string (`?token=...`). On failure, redirects with `?error=<reason>` instead.
4792
4994
  * @summary Discord - OAuth2 callback
@@ -4940,6 +5142,22 @@ export const AuthenticationApiAxiosParamCreator = function (configuration) {
4940
5142
  export const AuthenticationApiFp = function (configuration) {
4941
5143
  const localVarAxiosParamCreator = AuthenticationApiAxiosParamCreator(configuration);
4942
5144
  return {
5145
+ /**
5146
+ * Returns the Discord OAuth2 authorize URL as JSON so a native app can open it directly (system browser → Discord-app universal-link hand-off) instead of following the 302. The `redirect` is validated against the allowlist and carried through Discord via `state`, exactly like the browser flow; the callback still bounces the JWT to that target.
5147
+ * @summary Discord - Authorize URL (native clients)
5148
+ * @param {string | null} [redirect] Final redirect target for the JWT (native deep link). Must be allowlisted.
5149
+ * @param {*} [options] Override http request option.
5150
+ * @throws {RequiredError}
5151
+ */
5152
+ authorizeUrl(redirect, options) {
5153
+ return __awaiter(this, void 0, void 0, function* () {
5154
+ var _a, _b, _c;
5155
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.authorizeUrl(redirect, options);
5156
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
5157
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AuthenticationApi.authorizeUrl']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
5158
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5159
+ });
5160
+ },
4943
5161
  /**
4944
5162
  * Receives the authorization code from Discord after the user approves the OAuth2 prompt. Exchanges the code for an access token, verifies the user holds an admin guild role, then redirects back to the admin frontend with a signed JWT in the query string (`?token=...`). On failure, redirects with `?error=<reason>` instead.
4945
5163
  * @summary Discord - OAuth2 callback
@@ -5015,6 +5233,16 @@ export const AuthenticationApiFp = function (configuration) {
5015
5233
  export const AuthenticationApiFactory = function (configuration, basePath, axios) {
5016
5234
  const localVarFp = AuthenticationApiFp(configuration);
5017
5235
  return {
5236
+ /**
5237
+ * Returns the Discord OAuth2 authorize URL as JSON so a native app can open it directly (system browser → Discord-app universal-link hand-off) instead of following the 302. The `redirect` is validated against the allowlist and carried through Discord via `state`, exactly like the browser flow; the callback still bounces the JWT to that target.
5238
+ * @summary Discord - Authorize URL (native clients)
5239
+ * @param {string | null} [redirect] Final redirect target for the JWT (native deep link). Must be allowlisted.
5240
+ * @param {*} [options] Override http request option.
5241
+ * @throws {RequiredError}
5242
+ */
5243
+ authorizeUrl(redirect, options) {
5244
+ return localVarFp.authorizeUrl(redirect, options).then((request) => request(axios, basePath));
5245
+ },
5018
5246
  /**
5019
5247
  * Receives the authorization code from Discord after the user approves the OAuth2 prompt. Exchanges the code for an access token, verifies the user holds an admin guild role, then redirects back to the admin frontend with a signed JWT in the query string (`?token=...`). On failure, redirects with `?error=<reason>` instead.
5020
5248
  * @summary Discord - OAuth2 callback
@@ -5064,6 +5292,16 @@ export const AuthenticationApiFactory = function (configuration, basePath, axios
5064
5292
  * AuthenticationApi - object-oriented interface
5065
5293
  */
5066
5294
  export class AuthenticationApi extends BaseAPI {
5295
+ /**
5296
+ * Returns the Discord OAuth2 authorize URL as JSON so a native app can open it directly (system browser → Discord-app universal-link hand-off) instead of following the 302. The `redirect` is validated against the allowlist and carried through Discord via `state`, exactly like the browser flow; the callback still bounces the JWT to that target.
5297
+ * @summary Discord - Authorize URL (native clients)
5298
+ * @param {string | null} [redirect] Final redirect target for the JWT (native deep link). Must be allowlisted.
5299
+ * @param {*} [options] Override http request option.
5300
+ * @throws {RequiredError}
5301
+ */
5302
+ authorizeUrl(redirect, options) {
5303
+ return AuthenticationApiFp(this.configuration).authorizeUrl(redirect, options).then((request) => request(this.axios, this.basePath));
5304
+ }
5067
5305
  /**
5068
5306
  * Receives the authorization code from Discord after the user approves the OAuth2 prompt. Exchanges the code for an access token, verifies the user holds an admin guild role, then redirects back to the admin frontend with a signed JWT in the query string (`?token=...`). On failure, redirects with `?error=<reason>` instead.
5069
5307
  * @summary Discord - OAuth2 callback
@@ -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.9.2
5
+ * The version of the OpenAPI document: 4.9.4
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.9.2
7
+ * The version of the OpenAPI document: 4.9.4
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).