@rebornteam/reborn-api 2.8.0 → 3.0.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.
@@ -12,6 +12,7 @@ docs/AdminApplyPunishmentResult.md
12
12
  docs/AdminClientCredentialResponse.md
13
13
  docs/AdminClientCredentialsApi.md
14
14
  docs/AdminConnectionBypassResponse.md
15
+ docs/AdminConnectionCheckResult.md
15
16
  docs/AdminConnectionsApi.md
16
17
  docs/AdminCreatePunishmentDraftRequest.md
17
18
  docs/AdminDashboardApi.md
@@ -47,11 +48,13 @@ docs/PunishmentGetPunishmentResponse.md
47
48
  docs/PunishmentSeveritiesResponse.md
48
49
  docs/PunishmentSeveritiesResponsePunishmentTypeInfo.md
49
50
  docs/PunishmentSeveritiesResponseSeverityInfo.md
51
+ docs/Rank.md
50
52
  docs/ServerRegisterRequest.md
51
53
  docs/ServerSessionDTO.md
52
54
  docs/ServerSessionsApi.md
53
55
  docs/TokenRequest.md
54
56
  docs/UpdateClientRequest.md
57
+ docs/UserProfileResponse.md
55
58
  git_push.sh
56
59
  index.ts
57
60
  package.json
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @rebornteam/reborn-api@2.8.0
1
+ ## @rebornteam/reborn-api@3.0.1
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @rebornteam/reborn-api@2.8.0 --save
39
+ npm install @rebornteam/reborn-api@3.0.1 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -61,6 +61,7 @@ Class | Method | HTTP request | Description
61
61
  *AdminConnectionsApi* | [**createBypass**](docs/AdminConnectionsApi.md#createbypass) | **POST** /admin/connection/bypass | Create connection bypass
62
62
  *AdminConnectionsApi* | [**listAllConnections**](docs/AdminConnectionsApi.md#listallconnections) | **GET** /admin/connection | List all connections (paginated)
63
63
  *AdminConnectionsApi* | [**listConnections**](docs/AdminConnectionsApi.md#listconnections) | **GET** /admin/connection/recent | List recent connections
64
+ *AdminConnectionsApi* | [**recheckService**](docs/AdminConnectionsApi.md#recheckservice) | **POST** /admin/connection/{connectionId}/recheck/{service} | Refresh a single VPN check
64
65
  *AdminDashboardApi* | [**dashboardStats**](docs/AdminDashboardApi.md#dashboardstats) | **GET** /admin/dashboard | Get dashboard statistics
65
66
  *AdminPlayersApi* | [**getPlayer**](docs/AdminPlayersApi.md#getplayer) | **GET** /admin/player/{uuid} | Get player detail
66
67
  *AdminPlayersApi* | [**listPlayers**](docs/AdminPlayersApi.md#listplayers) | **GET** /admin/player | List players
@@ -70,6 +71,7 @@ Class | Method | HTTP request | Description
70
71
  *AdminPunishmentsApi* | [**searchTargets**](docs/AdminPunishmentsApi.md#searchtargets) | **GET** /admin/punishment/search | Search punishment targets
71
72
  *AuthenticationApi* | [**callback**](docs/AuthenticationApi.md#callback) | **GET** /auth/discord/callback | Discord - OAuth2 callback
72
73
  *AuthenticationApi* | [**initiateLogin**](docs/AuthenticationApi.md#initiatelogin) | **GET** /auth/discord | Discord - Initiate login
74
+ *AuthenticationApi* | [**me**](docs/AuthenticationApi.md#me) | **GET** /auth/me | Get current user profile
73
75
  *AuthenticationApi* | [**token**](docs/AuthenticationApi.md#token) | **POST** /oauth/token | Service - Exchange client credentials for token
74
76
  *ChatApi* | [**history**](docs/ChatApi.md#history) | **GET** /v1/chat | Get chat history
75
77
  *ChatApi* | [**ingest**](docs/ChatApi.md#ingest) | **POST** /v1/chat | Ingest a chat message
@@ -94,6 +96,7 @@ Class | Method | HTTP request | Description
94
96
  - [AdminApplyPunishmentResult](docs/AdminApplyPunishmentResult.md)
95
97
  - [AdminClientCredentialResponse](docs/AdminClientCredentialResponse.md)
96
98
  - [AdminConnectionBypassResponse](docs/AdminConnectionBypassResponse.md)
99
+ - [AdminConnectionCheckResult](docs/AdminConnectionCheckResult.md)
97
100
  - [AdminCreatePunishmentDraftRequest](docs/AdminCreatePunishmentDraftRequest.md)
98
101
  - [AdminDashboardConnectionResponse](docs/AdminDashboardConnectionResponse.md)
99
102
  - [AdminGetDashboardStats](docs/AdminGetDashboardStats.md)
@@ -120,10 +123,12 @@ Class | Method | HTTP request | Description
120
123
  - [PunishmentSeveritiesResponse](docs/PunishmentSeveritiesResponse.md)
121
124
  - [PunishmentSeveritiesResponsePunishmentTypeInfo](docs/PunishmentSeveritiesResponsePunishmentTypeInfo.md)
122
125
  - [PunishmentSeveritiesResponseSeverityInfo](docs/PunishmentSeveritiesResponseSeverityInfo.md)
126
+ - [Rank](docs/Rank.md)
123
127
  - [ServerRegisterRequest](docs/ServerRegisterRequest.md)
124
128
  - [ServerSessionDTO](docs/ServerSessionDTO.md)
125
129
  - [TokenRequest](docs/TokenRequest.md)
126
130
  - [UpdateClientRequest](docs/UpdateClientRequest.md)
131
+ - [UserProfileResponse](docs/UserProfileResponse.md)
127
132
 
128
133
 
129
134
  <a id="documentation-for-authorization"></a>
package/api.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Reborn API
5
5
  * The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
6
6
  *
7
- * The version of the OpenAPI document: 2.8.0
7
+ * The version of the OpenAPI document: 3.0.1
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -165,6 +165,23 @@ export interface AdminConnectionBypassResponse {
165
165
  */
166
166
  'createdAt'?: string;
167
167
  }
168
+ /**
169
+ * Result from a single VPN detection service for a given IP address
170
+ */
171
+ export interface AdminConnectionCheckResult {
172
+ /**
173
+ * Service identifier
174
+ */
175
+ 'service'?: string;
176
+ /**
177
+ * Whether this service flagged the IP as a VPN, proxy, or Tor exit node
178
+ */
179
+ 'result'?: boolean;
180
+ /**
181
+ * When this check was last performed
182
+ */
183
+ 'checkedAt'?: string;
184
+ }
168
185
  /**
169
186
  * Request to evaluate the impact of a punishment across one or more targets before applying
170
187
  */
@@ -214,6 +231,10 @@ export interface AdminDashboardConnectionResponse {
214
231
  'lastSeen'?: string | null;
215
232
  'percentPositive': number;
216
233
  'numberOfChecks': number;
234
+ /**
235
+ * Results from each VPN detection service for this IP address
236
+ */
237
+ 'results'?: Array<AdminConnectionCheckResult>;
217
238
  }
218
239
  export interface AdminGetDashboardStats {
219
240
  'totalPlayers': number;
@@ -558,24 +579,31 @@ export interface ConnectionGetConnectionDetailsResponse {
558
579
  */
559
580
  'ipAddress'?: string;
560
581
  /**
561
- * Approximate geographic location of the IP address, typically in \'City, Country\' format. Returns \'Local, N/A\' for localhost or private IPs.
582
+ * Approximate geographic location of the IP address. Returns \'Local, N/A\' for localhost or private IPs.
562
583
  */
563
584
  'approximateLocation'?: string;
564
585
  /**
565
- * Confidence score representing the percentage of VPN detection services that flagged this IP as suspicious. Range: 0.0 (clean) to 100.0 (definitely VPN/proxy). Values above 50.0 suggest high probability of VPN usage.
586
+ * Confidence score representing the percentage of VPN detection services that flagged this IP as suspicious. Range: 0.0 (clean) to 100.0 (definitely VPN/proxy).
566
587
  */
567
588
  'percentPositive'?: number;
568
589
  /**
569
- * Total number of VPN detection services successfully queried during the last check. Higher numbers indicate more comprehensive analysis.
590
+ * Total number of VPN detection services successfully queried during the last check.
570
591
  */
571
592
  'numberOfChecks'?: number;
572
- 'bypassed'?: boolean;
573
593
  /**
574
- * Expiration timestamp for the bypass (ISO-8601 format). After this time, normal VPN detection rules will apply again. Null if not bypassed or bypass is permanent.
594
+ * Indicates if this IP address has been administratively bypassed.
595
+ */
596
+ 'isBypassed'?: boolean;
597
+ /**
598
+ * Expiration timestamp for the bypass (ISO-8601 format). Null if not bypassed or bypass is permanent.
575
599
  */
576
600
  'bypassedUntil'?: string | null;
577
601
  /**
578
- * Player information associated with this connection. Only populated when \'associate_uuid\' query parameter is provided. Contains first join status and login history.
602
+ * Results from each VPN detection service that checked this IP address
603
+ */
604
+ 'results'?: Array<AdminConnectionCheckResult>;
605
+ /**
606
+ * Player information associated with this connection. Only populated when \'associate_uuid\' query parameter is provided.
579
607
  */
580
608
  'playerInformation'?: PlayerGetPlayerInformation | null;
581
609
  /**
@@ -601,19 +629,19 @@ export interface CreateBypassRequest {
601
629
  */
602
630
  export interface PlayerGetPlayerInformation {
603
631
  /**
604
- * Timestamp of when the player first connected to the server (ISO-8601 format).
632
+ * Indicates whether this is the player\'s first time joining the server.
605
633
  */
606
- 'firstLogin'?: string;
634
+ 'firstJoin'?: boolean;
607
635
  /**
608
- * Indicates whether this is the player\'s first time joining the server. Useful for triggering welcome messages, tutorials, or first-join rewards.
636
+ * Timestamp of when the player first connected to the server (ISO-8601 format).
609
637
  */
610
- 'firstJoin'?: boolean;
638
+ 'firstLogin'?: string;
611
639
  /**
612
- * Raw punishment score calculated as: SUM((base_weight × severity/10)) where base_weight is 0.10 for WARNING, 0.30 for MUTE, 0.50 for BAN. Severity ranges 1-10. Used for tracking overall punishment severity.
640
+ * Raw punishment score calculated as: SUM((base_weight × severity/10)). Used for tracking overall punishment severity.
613
641
  */
614
642
  'punishmentPointsRaw'?: number;
615
643
  /**
616
- * Punishment score as a percentage (0-100). When this score is >100% BEFORE applying a new punishment, the new punishment should be made permanent. Check this value BEFORE issuing punishment, not after. Calculated as raw_score × 100.
644
+ * Punishment score as a percentage (0-100). When >100% before applying a new punishment, the new punishment should be made permanent.
617
645
  */
618
646
  'punishmentPointsPercent'?: number;
619
647
  }
@@ -689,6 +717,16 @@ export interface PunishmentSeveritiesResponseSeverityInfo {
689
717
  */
690
718
  'durationSeconds'?: number;
691
719
  }
720
+
721
+ export const Rank = {
722
+ Administrator: 'ADMINISTRATOR',
723
+ Moderator: 'MODERATOR',
724
+ Service: 'SERVICE'
725
+ } as const;
726
+
727
+ export type Rank = typeof Rank[keyof typeof Rank];
728
+
729
+
692
730
  export interface ServerRegisterRequest {
693
731
  'region': string;
694
732
  'gameType': string;
@@ -723,6 +761,16 @@ export interface UpdateClientRequest {
723
761
  */
724
762
  'description'?: string;
725
763
  }
764
+ export interface UserProfileResponse {
765
+ 'id': string;
766
+ 'username': string;
767
+ 'avatarUrl': string;
768
+ 'rank': Rank;
769
+ 'roles': Array<string>;
770
+ 'discordRoles': Array<string>;
771
+ }
772
+
773
+
726
774
 
727
775
  /**
728
776
  * AdminClientCredentialsApi - axios parameter creator
@@ -1427,6 +1475,48 @@ export const AdminConnectionsApiAxiosParamCreator = function (configuration?: Co
1427
1475
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1428
1476
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1429
1477
 
1478
+ return {
1479
+ url: toPathString(localVarUrlObj),
1480
+ options: localVarRequestOptions,
1481
+ };
1482
+ },
1483
+ /**
1484
+ * Re-runs one named VPN detection service for a specific connection, persists the updated result, and recalculates the connection\'s overall `percentPositive` and `numberOfChecks` from all stored checks. Returns the refreshed check result including its new `checkedAt` timestamp.
1485
+ * @summary Refresh a single VPN check
1486
+ * @param {number} connectionId
1487
+ * @param {string} service
1488
+ * @param {*} [options] Override http request option.
1489
+ * @throws {RequiredError}
1490
+ */
1491
+ recheckService: async (connectionId: number, service: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1492
+ // verify required parameter 'connectionId' is not null or undefined
1493
+ assertParamExists('recheckService', 'connectionId', connectionId)
1494
+ // verify required parameter 'service' is not null or undefined
1495
+ assertParamExists('recheckService', 'service', service)
1496
+ const localVarPath = `/admin/connection/{connectionId}/recheck/{service}`
1497
+ .replace(`{${"connectionId"}}`, encodeURIComponent(String(connectionId)))
1498
+ .replace(`{${"service"}}`, encodeURIComponent(String(service)));
1499
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1500
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1501
+ let baseOptions;
1502
+ if (configuration) {
1503
+ baseOptions = configuration.baseOptions;
1504
+ }
1505
+
1506
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
1507
+ const localVarHeaderParameter = {} as any;
1508
+ const localVarQueryParameter = {} as any;
1509
+
1510
+ // authentication DiscordAuth required
1511
+ // http bearer authentication required
1512
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
1513
+
1514
+ localVarHeaderParameter['Accept'] = 'application/json';
1515
+
1516
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1517
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1518
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1519
+
1430
1520
  return {
1431
1521
  url: toPathString(localVarUrlObj),
1432
1522
  options: localVarRequestOptions,
@@ -1490,6 +1580,20 @@ export const AdminConnectionsApiFp = function(configuration?: Configuration) {
1490
1580
  const localVarOperationServerBasePath = operationServerMap['AdminConnectionsApi.listConnections']?.[localVarOperationServerIndex]?.url;
1491
1581
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1492
1582
  },
1583
+ /**
1584
+ * Re-runs one named VPN detection service for a specific connection, persists the updated result, and recalculates the connection\'s overall `percentPositive` and `numberOfChecks` from all stored checks. Returns the refreshed check result including its new `checkedAt` timestamp.
1585
+ * @summary Refresh a single VPN check
1586
+ * @param {number} connectionId
1587
+ * @param {string} service
1588
+ * @param {*} [options] Override http request option.
1589
+ * @throws {RequiredError}
1590
+ */
1591
+ async recheckService(connectionId: number, service: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminConnectionCheckResult>> {
1592
+ const localVarAxiosArgs = await localVarAxiosParamCreator.recheckService(connectionId, service, options);
1593
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1594
+ const localVarOperationServerBasePath = operationServerMap['AdminConnectionsApi.recheckService']?.[localVarOperationServerIndex]?.url;
1595
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1596
+ },
1493
1597
  }
1494
1598
  };
1495
1599
 
@@ -1539,6 +1643,17 @@ export const AdminConnectionsApiFactory = function (configuration?: Configuratio
1539
1643
  listConnections(createdAfter?: number | null, createdBefore?: number | null, ipAddress?: string | null, uuid?: string | null, isVpn?: boolean | null, page?: number | null, limit?: number | null, options?: RawAxiosRequestConfig): AxiosPromise<Array<AdminDashboardConnectionResponse>> {
1540
1644
  return localVarFp.listConnections(createdAfter, createdBefore, ipAddress, uuid, isVpn, page, limit, options).then((request) => request(axios, basePath));
1541
1645
  },
1646
+ /**
1647
+ * Re-runs one named VPN detection service for a specific connection, persists the updated result, and recalculates the connection\'s overall `percentPositive` and `numberOfChecks` from all stored checks. Returns the refreshed check result including its new `checkedAt` timestamp.
1648
+ * @summary Refresh a single VPN check
1649
+ * @param {number} connectionId
1650
+ * @param {string} service
1651
+ * @param {*} [options] Override http request option.
1652
+ * @throws {RequiredError}
1653
+ */
1654
+ recheckService(connectionId: number, service: string, options?: RawAxiosRequestConfig): AxiosPromise<AdminConnectionCheckResult> {
1655
+ return localVarFp.recheckService(connectionId, service, options).then((request) => request(axios, basePath));
1656
+ },
1542
1657
  };
1543
1658
  };
1544
1659
 
@@ -1588,6 +1703,18 @@ export class AdminConnectionsApi extends BaseAPI {
1588
1703
  public listConnections(createdAfter?: number | null, createdBefore?: number | null, ipAddress?: string | null, uuid?: string | null, isVpn?: boolean | null, page?: number | null, limit?: number | null, options?: RawAxiosRequestConfig) {
1589
1704
  return AdminConnectionsApiFp(this.configuration).listConnections(createdAfter, createdBefore, ipAddress, uuid, isVpn, page, limit, options).then((request) => request(this.axios, this.basePath));
1590
1705
  }
1706
+
1707
+ /**
1708
+ * Re-runs one named VPN detection service for a specific connection, persists the updated result, and recalculates the connection\'s overall `percentPositive` and `numberOfChecks` from all stored checks. Returns the refreshed check result including its new `checkedAt` timestamp.
1709
+ * @summary Refresh a single VPN check
1710
+ * @param {number} connectionId
1711
+ * @param {string} service
1712
+ * @param {*} [options] Override http request option.
1713
+ * @throws {RequiredError}
1714
+ */
1715
+ public recheckService(connectionId: number, service: string, options?: RawAxiosRequestConfig) {
1716
+ return AdminConnectionsApiFp(this.configuration).recheckService(connectionId, service, options).then((request) => request(this.axios, this.basePath));
1717
+ }
1591
1718
  }
1592
1719
 
1593
1720
 
@@ -1894,7 +2021,7 @@ export class AdminPlayersApi extends BaseAPI {
1894
2021
  export const AdminPunishmentsApiAxiosParamCreator = function (configuration?: Configuration) {
1895
2022
  return {
1896
2023
  /**
1897
- * Apply a punishment to one or more targets. Player targets are linked via player_punishment; IP targets are linked via connection_punishment. The authenticated user is recorded as the issuer.
2024
+ * Apply a punishment to one or more targets. The authenticated user is recorded as the issuer.
1898
2025
  * @summary Apply punishment
1899
2026
  * @param {AdminApplyPunishmentRequest} adminApplyPunishmentRequest
1900
2027
  * @param {*} [options] Override http request option.
@@ -1933,7 +2060,7 @@ export const AdminPunishmentsApiAxiosParamCreator = function (configuration?: Co
1933
2060
  };
1934
2061
  },
1935
2062
  /**
1936
- * Preview the impact of a punishment across one or more targets. Returns current score, points to add, projected new score, and affected players per target. No changes are made.
2063
+ * Preview the impact of a punishment across one or more targets. No changes are made.
1937
2064
  * @summary Evaluate punishment impact
1938
2065
  * @param {AdminCreatePunishmentDraftRequest} adminCreatePunishmentDraftRequest
1939
2066
  * @param {*} [options] Override http request option.
@@ -2050,7 +2177,7 @@ export const AdminPunishmentsApiAxiosParamCreator = function (configuration?: Co
2050
2177
  };
2051
2178
  },
2052
2179
  /**
2053
- * Search for players by UUID or username, or look up all players associated with an IP address. Used to populate the target table before issuing a punishment.
2180
+ * Search for players by UUID or username, or look up all players associated with an IP address.
2054
2181
  * @summary Search punishment targets
2055
2182
  * @param {string} q UUID, username, or partial/full IP address to search for
2056
2183
  * @param {*} [options] Override http request option.
@@ -2100,7 +2227,7 @@ export const AdminPunishmentsApiFp = function(configuration?: Configuration) {
2100
2227
  const localVarAxiosParamCreator = AdminPunishmentsApiAxiosParamCreator(configuration)
2101
2228
  return {
2102
2229
  /**
2103
- * Apply a punishment to one or more targets. Player targets are linked via player_punishment; IP targets are linked via connection_punishment. The authenticated user is recorded as the issuer.
2230
+ * Apply a punishment to one or more targets. The authenticated user is recorded as the issuer.
2104
2231
  * @summary Apply punishment
2105
2232
  * @param {AdminApplyPunishmentRequest} adminApplyPunishmentRequest
2106
2233
  * @param {*} [options] Override http request option.
@@ -2113,7 +2240,7 @@ export const AdminPunishmentsApiFp = function(configuration?: Configuration) {
2113
2240
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2114
2241
  },
2115
2242
  /**
2116
- * Preview the impact of a punishment across one or more targets. Returns current score, points to add, projected new score, and affected players per target. No changes are made.
2243
+ * Preview the impact of a punishment across one or more targets. No changes are made.
2117
2244
  * @summary Evaluate punishment impact
2118
2245
  * @param {AdminCreatePunishmentDraftRequest} adminCreatePunishmentDraftRequest
2119
2246
  * @param {*} [options] Override http request option.
@@ -2146,7 +2273,7 @@ export const AdminPunishmentsApiFp = function(configuration?: Configuration) {
2146
2273
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2147
2274
  },
2148
2275
  /**
2149
- * Search for players by UUID or username, or look up all players associated with an IP address. Used to populate the target table before issuing a punishment.
2276
+ * Search for players by UUID or username, or look up all players associated with an IP address.
2150
2277
  * @summary Search punishment targets
2151
2278
  * @param {string} q UUID, username, or partial/full IP address to search for
2152
2279
  * @param {*} [options] Override http request option.
@@ -2168,7 +2295,7 @@ export const AdminPunishmentsApiFactory = function (configuration?: Configuratio
2168
2295
  const localVarFp = AdminPunishmentsApiFp(configuration)
2169
2296
  return {
2170
2297
  /**
2171
- * Apply a punishment to one or more targets. Player targets are linked via player_punishment; IP targets are linked via connection_punishment. The authenticated user is recorded as the issuer.
2298
+ * Apply a punishment to one or more targets. The authenticated user is recorded as the issuer.
2172
2299
  * @summary Apply punishment
2173
2300
  * @param {AdminApplyPunishmentRequest} adminApplyPunishmentRequest
2174
2301
  * @param {*} [options] Override http request option.
@@ -2178,7 +2305,7 @@ export const AdminPunishmentsApiFactory = function (configuration?: Configuratio
2178
2305
  return localVarFp.applyPunishment(adminApplyPunishmentRequest, options).then((request) => request(axios, basePath));
2179
2306
  },
2180
2307
  /**
2181
- * Preview the impact of a punishment across one or more targets. Returns current score, points to add, projected new score, and affected players per target. No changes are made.
2308
+ * Preview the impact of a punishment across one or more targets. No changes are made.
2182
2309
  * @summary Evaluate punishment impact
2183
2310
  * @param {AdminCreatePunishmentDraftRequest} adminCreatePunishmentDraftRequest
2184
2311
  * @param {*} [options] Override http request option.
@@ -2205,7 +2332,7 @@ export const AdminPunishmentsApiFactory = function (configuration?: Configuratio
2205
2332
  return localVarFp.getPunishments(page, limit, uuid, username, ipAddress, type, issuedAfter, issuedBefore, options).then((request) => request(axios, basePath));
2206
2333
  },
2207
2334
  /**
2208
- * Search for players by UUID or username, or look up all players associated with an IP address. Used to populate the target table before issuing a punishment.
2335
+ * Search for players by UUID or username, or look up all players associated with an IP address.
2209
2336
  * @summary Search punishment targets
2210
2337
  * @param {string} q UUID, username, or partial/full IP address to search for
2211
2338
  * @param {*} [options] Override http request option.
@@ -2222,7 +2349,7 @@ export const AdminPunishmentsApiFactory = function (configuration?: Configuratio
2222
2349
  */
2223
2350
  export class AdminPunishmentsApi extends BaseAPI {
2224
2351
  /**
2225
- * Apply a punishment to one or more targets. Player targets are linked via player_punishment; IP targets are linked via connection_punishment. The authenticated user is recorded as the issuer.
2352
+ * Apply a punishment to one or more targets. The authenticated user is recorded as the issuer.
2226
2353
  * @summary Apply punishment
2227
2354
  * @param {AdminApplyPunishmentRequest} adminApplyPunishmentRequest
2228
2355
  * @param {*} [options] Override http request option.
@@ -2233,7 +2360,7 @@ export class AdminPunishmentsApi extends BaseAPI {
2233
2360
  }
2234
2361
 
2235
2362
  /**
2236
- * Preview the impact of a punishment across one or more targets. Returns current score, points to add, projected new score, and affected players per target. No changes are made.
2363
+ * Preview the impact of a punishment across one or more targets. No changes are made.
2237
2364
  * @summary Evaluate punishment impact
2238
2365
  * @param {AdminCreatePunishmentDraftRequest} adminCreatePunishmentDraftRequest
2239
2366
  * @param {*} [options] Override http request option.
@@ -2262,7 +2389,7 @@ export class AdminPunishmentsApi extends BaseAPI {
2262
2389
  }
2263
2390
 
2264
2391
  /**
2265
- * Search for players by UUID or username, or look up all players associated with an IP address. Used to populate the target table before issuing a punishment.
2392
+ * Search for players by UUID or username, or look up all players associated with an IP address.
2266
2393
  * @summary Search punishment targets
2267
2394
  * @param {string} q UUID, username, or partial/full IP address to search for
2268
2395
  * @param {*} [options] Override http request option.
@@ -2347,6 +2474,40 @@ export const AuthenticationApiAxiosParamCreator = function (configuration?: Conf
2347
2474
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
2348
2475
 
2349
2476
 
2477
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2478
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2479
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2480
+
2481
+ return {
2482
+ url: toPathString(localVarUrlObj),
2483
+ options: localVarRequestOptions,
2484
+ };
2485
+ },
2486
+ /**
2487
+ * Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
2488
+ * @summary Get current user profile
2489
+ * @param {*} [options] Override http request option.
2490
+ * @throws {RequiredError}
2491
+ */
2492
+ me: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2493
+ const localVarPath = `/auth/me`;
2494
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2495
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2496
+ let baseOptions;
2497
+ if (configuration) {
2498
+ baseOptions = configuration.baseOptions;
2499
+ }
2500
+
2501
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2502
+ const localVarHeaderParameter = {} as any;
2503
+ const localVarQueryParameter = {} as any;
2504
+
2505
+ // authentication DiscordAuth required
2506
+ // http bearer authentication required
2507
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
2508
+
2509
+ localVarHeaderParameter['Accept'] = 'application/json';
2510
+
2350
2511
  setSearchParams(localVarUrlObj, localVarQueryParameter);
2351
2512
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2352
2513
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -2443,6 +2604,18 @@ export const AuthenticationApiFp = function(configuration?: Configuration) {
2443
2604
  const localVarOperationServerBasePath = operationServerMap['AuthenticationApi.initiateLogin']?.[localVarOperationServerIndex]?.url;
2444
2605
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2445
2606
  },
2607
+ /**
2608
+ * Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
2609
+ * @summary Get current user profile
2610
+ * @param {*} [options] Override http request option.
2611
+ * @throws {RequiredError}
2612
+ */
2613
+ async me(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserProfileResponse>> {
2614
+ const localVarAxiosArgs = await localVarAxiosParamCreator.me(options);
2615
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2616
+ const localVarOperationServerBasePath = operationServerMap['AuthenticationApi.me']?.[localVarOperationServerIndex]?.url;
2617
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2618
+ },
2446
2619
  /**
2447
2620
  * Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
2448
2621
  * @summary Service - Exchange client credentials for token
@@ -2487,6 +2660,15 @@ export const AuthenticationApiFactory = function (configuration?: Configuration,
2487
2660
  initiateLogin(options?: RawAxiosRequestConfig): AxiosPromise<void> {
2488
2661
  return localVarFp.initiateLogin(options).then((request) => request(axios, basePath));
2489
2662
  },
2663
+ /**
2664
+ * Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
2665
+ * @summary Get current user profile
2666
+ * @param {*} [options] Override http request option.
2667
+ * @throws {RequiredError}
2668
+ */
2669
+ me(options?: RawAxiosRequestConfig): AxiosPromise<UserProfileResponse> {
2670
+ return localVarFp.me(options).then((request) => request(axios, basePath));
2671
+ },
2490
2672
  /**
2491
2673
  * Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
2492
2674
  * @summary Service - Exchange client credentials for token
@@ -2528,6 +2710,16 @@ export class AuthenticationApi extends BaseAPI {
2528
2710
  return AuthenticationApiFp(this.configuration).initiateLogin(options).then((request) => request(this.axios, this.basePath));
2529
2711
  }
2530
2712
 
2713
+ /**
2714
+ * Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
2715
+ * @summary Get current user profile
2716
+ * @param {*} [options] Override http request option.
2717
+ * @throws {RequiredError}
2718
+ */
2719
+ public me(options?: RawAxiosRequestConfig) {
2720
+ return AuthenticationApiFp(this.configuration).me(options).then((request) => request(this.axios, this.basePath));
2721
+ }
2722
+
2531
2723
  /**
2532
2724
  * Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
2533
2725
  * @summary Service - Exchange client credentials for token
@@ -2870,9 +3062,9 @@ export class ConnectionApi extends BaseAPI {
2870
3062
  export const PlayerApiAxiosParamCreator = function (configuration?: Configuration) {
2871
3063
  return {
2872
3064
  /**
2873
- * Retrieves player information by their Minecraft UUID. Returns whether this is the player\'s first join and their first login timestamp. This endpoint is useful for tracking player join history and implementing first-join rewards or tutorials.
3065
+ * Retrieves player information by Minecraft UUID including first join status and login timestamp.
2874
3066
  * @summary Get player information
2875
- * @param {string} uuid The Minecraft player UUID (with or without dashes)
3067
+ * @param {string} uuid
2876
3068
  * @param {*} [options] Override http request option.
2877
3069
  * @throws {RequiredError}
2878
3070
  */
@@ -2908,9 +3100,9 @@ export const PlayerApiAxiosParamCreator = function (configuration?: Configuratio
2908
3100
  };
2909
3101
  },
2910
3102
  /**
2911
- * Accepts a list of player UUIDs and returns a map of `uuid → username` for those that have a recorded username. UUIDs with no username record (e.g. players who have never joined) are omitted from the response. Used by the web UI to display player names in the chat log.
3103
+ * Accepts a list of player UUIDs and returns a map of `uuid → username` for those that have a recorded username. UUIDs with no username record are omitted from the response.
2912
3104
  * @summary Batch resolve UUIDs to usernames
2913
- * @param {Array<string>} uuids List of player UUIDs to resolve (repeatable query param)
3105
+ * @param {Array<string>} uuids List of player UUIDs to resolve
2914
3106
  * @param {*} [options] Override http request option.
2915
3107
  * @throws {RequiredError}
2916
3108
  */
@@ -2958,9 +3150,9 @@ export const PlayerApiFp = function(configuration?: Configuration) {
2958
3150
  const localVarAxiosParamCreator = PlayerApiAxiosParamCreator(configuration)
2959
3151
  return {
2960
3152
  /**
2961
- * Retrieves player information by their Minecraft UUID. Returns whether this is the player\'s first join and their first login timestamp. This endpoint is useful for tracking player join history and implementing first-join rewards or tutorials.
3153
+ * Retrieves player information by Minecraft UUID including first join status and login timestamp.
2962
3154
  * @summary Get player information
2963
- * @param {string} uuid The Minecraft player UUID (with or without dashes)
3155
+ * @param {string} uuid
2964
3156
  * @param {*} [options] Override http request option.
2965
3157
  * @throws {RequiredError}
2966
3158
  */
@@ -2971,9 +3163,9 @@ export const PlayerApiFp = function(configuration?: Configuration) {
2971
3163
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2972
3164
  },
2973
3165
  /**
2974
- * Accepts a list of player UUIDs and returns a map of `uuid → username` for those that have a recorded username. UUIDs with no username record (e.g. players who have never joined) are omitted from the response. Used by the web UI to display player names in the chat log.
3166
+ * Accepts a list of player UUIDs and returns a map of `uuid → username` for those that have a recorded username. UUIDs with no username record are omitted from the response.
2975
3167
  * @summary Batch resolve UUIDs to usernames
2976
- * @param {Array<string>} uuids List of player UUIDs to resolve (repeatable query param)
3168
+ * @param {Array<string>} uuids List of player UUIDs to resolve
2977
3169
  * @param {*} [options] Override http request option.
2978
3170
  * @throws {RequiredError}
2979
3171
  */
@@ -2993,9 +3185,9 @@ export const PlayerApiFactory = function (configuration?: Configuration, basePat
2993
3185
  const localVarFp = PlayerApiFp(configuration)
2994
3186
  return {
2995
3187
  /**
2996
- * Retrieves player information by their Minecraft UUID. Returns whether this is the player\'s first join and their first login timestamp. This endpoint is useful for tracking player join history and implementing first-join rewards or tutorials.
3188
+ * Retrieves player information by Minecraft UUID including first join status and login timestamp.
2997
3189
  * @summary Get player information
2998
- * @param {string} uuid The Minecraft player UUID (with or without dashes)
3190
+ * @param {string} uuid
2999
3191
  * @param {*} [options] Override http request option.
3000
3192
  * @throws {RequiredError}
3001
3193
  */
@@ -3003,9 +3195,9 @@ export const PlayerApiFactory = function (configuration?: Configuration, basePat
3003
3195
  return localVarFp.getPlayer1(uuid, options).then((request) => request(axios, basePath));
3004
3196
  },
3005
3197
  /**
3006
- * Accepts a list of player UUIDs and returns a map of `uuid → username` for those that have a recorded username. UUIDs with no username record (e.g. players who have never joined) are omitted from the response. Used by the web UI to display player names in the chat log.
3198
+ * Accepts a list of player UUIDs and returns a map of `uuid → username` for those that have a recorded username. UUIDs with no username record are omitted from the response.
3007
3199
  * @summary Batch resolve UUIDs to usernames
3008
- * @param {Array<string>} uuids List of player UUIDs to resolve (repeatable query param)
3200
+ * @param {Array<string>} uuids List of player UUIDs to resolve
3009
3201
  * @param {*} [options] Override http request option.
3010
3202
  * @throws {RequiredError}
3011
3203
  */
@@ -3020,9 +3212,9 @@ export const PlayerApiFactory = function (configuration?: Configuration, basePat
3020
3212
  */
3021
3213
  export class PlayerApi extends BaseAPI {
3022
3214
  /**
3023
- * Retrieves player information by their Minecraft UUID. Returns whether this is the player\'s first join and their first login timestamp. This endpoint is useful for tracking player join history and implementing first-join rewards or tutorials.
3215
+ * Retrieves player information by Minecraft UUID including first join status and login timestamp.
3024
3216
  * @summary Get player information
3025
- * @param {string} uuid The Minecraft player UUID (with or without dashes)
3217
+ * @param {string} uuid
3026
3218
  * @param {*} [options] Override http request option.
3027
3219
  * @throws {RequiredError}
3028
3220
  */
@@ -3031,9 +3223,9 @@ export class PlayerApi extends BaseAPI {
3031
3223
  }
3032
3224
 
3033
3225
  /**
3034
- * Accepts a list of player UUIDs and returns a map of `uuid → username` for those that have a recorded username. UUIDs with no username record (e.g. players who have never joined) are omitted from the response. Used by the web UI to display player names in the chat log.
3226
+ * Accepts a list of player UUIDs and returns a map of `uuid → username` for those that have a recorded username. UUIDs with no username record are omitted from the response.
3035
3227
  * @summary Batch resolve UUIDs to usernames
3036
- * @param {Array<string>} uuids List of player UUIDs to resolve (repeatable query param)
3228
+ * @param {Array<string>} uuids List of player UUIDs to resolve
3037
3229
  * @param {*} [options] Override http request option.
3038
3230
  * @throws {RequiredError}
3039
3231
  */
package/base.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Reborn API
5
5
  * The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
6
6
  *
7
- * The version of the OpenAPI document: 2.8.0
7
+ * The version of the OpenAPI document: 3.0.1
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/common.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Reborn API
5
5
  * The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
6
6
  *
7
- * The version of the OpenAPI document: 2.8.0
7
+ * The version of the OpenAPI document: 3.0.1
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/configuration.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * Reborn API
4
4
  * The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
5
5
  *
6
- * The version of the OpenAPI document: 2.8.0
6
+ * The version of the OpenAPI document: 3.0.1
7
7
  *
8
8
  *
9
9
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).