@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/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