@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.
@@ -15,6 +15,7 @@ Name | Type | Description | Notes
15
15
  **lastSeen** | **string** | | [optional] [default to undefined]
16
16
  **percentPositive** | **number** | | [default to undefined]
17
17
  **numberOfChecks** | **number** | | [default to undefined]
18
+ **results** | [**Array<AdminConnectionCheckResult>**](AdminConnectionCheckResult.md) | Results from each VPN detection service for this IP address | [optional] [default to undefined]
18
19
 
19
20
  ## Example
20
21
 
@@ -32,6 +33,7 @@ const instance: AdminDashboardConnectionResponse = {
32
33
  lastSeen,
33
34
  percentPositive,
34
35
  numberOfChecks,
36
+ results,
35
37
  };
36
38
  ```
37
39
 
@@ -57,7 +57,7 @@ const { status, data } = await apiInstance.getPlayer(
57
57
  |**200** | Player detail retrieved successfully | - |
58
58
  |**404** | Player not found | - |
59
59
  |**401** | Unauthorized | - |
60
- |**403** | Forbidden - Administrator role required | - |
60
+ |**403** | Forbidden - Moderator role required | - |
61
61
 
62
62
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
63
63
 
@@ -116,7 +116,7 @@ const { status, data } = await apiInstance.listPlayers(
116
116
  |-------------|-------------|------------------|
117
117
  |**200** | Player list retrieved successfully | - |
118
118
  |**401** | Unauthorized | - |
119
- |**403** | Forbidden - Administrator role required | - |
119
+ |**403** | Forbidden - Moderator role required | - |
120
120
 
121
121
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
122
122
 
@@ -12,7 +12,7 @@ All URIs are relative to *https://api.smsh.sh*
12
12
  # **applyPunishment**
13
13
  > AdminApplyPunishmentResponse applyPunishment(adminApplyPunishmentRequest)
14
14
 
15
- 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.
15
+ Apply a punishment to one or more targets. The authenticated user is recorded as the issuer.
16
16
 
17
17
  ### Example
18
18
 
@@ -60,14 +60,14 @@ const { status, data } = await apiInstance.applyPunishment(
60
60
  |**200** | Punishments applied successfully | - |
61
61
  |**400** | Invalid request | - |
62
62
  |**401** | Unauthorized | - |
63
- |**403** | Forbidden - Administrator role required | - |
63
+ |**403** | Forbidden - Moderator role required | - |
64
64
 
65
65
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
66
66
 
67
67
  # **createDraft**
68
68
  > AdminPunishmentDraftResponse createDraft(adminCreatePunishmentDraftRequest)
69
69
 
70
- 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.
70
+ Preview the impact of a punishment across one or more targets. No changes are made.
71
71
 
72
72
  ### Example
73
73
 
@@ -115,7 +115,7 @@ const { status, data } = await apiInstance.createDraft(
115
115
  |**200** | Evaluation results | - |
116
116
  |**400** | Invalid request | - |
117
117
  |**401** | Unauthorized | - |
118
- |**403** | Forbidden - Administrator role required | - |
118
+ |**403** | Forbidden - Moderator role required | - |
119
119
 
120
120
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
121
121
 
@@ -189,14 +189,14 @@ const { status, data } = await apiInstance.getPunishments(
189
189
  |-------------|-------------|------------------|
190
190
  |**200** | Punishment list retrieved successfully | - |
191
191
  |**401** | Unauthorized | - |
192
- |**403** | Forbidden - Administrator role required | - |
192
+ |**403** | Forbidden - Moderator role required | - |
193
193
 
194
194
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
195
195
 
196
196
  # **searchTargets**
197
197
  > AdminPunishmentSearchResponse searchTargets()
198
198
 
199
- 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.
199
+ Search for players by UUID or username, or look up all players associated with an IP address.
200
200
 
201
201
  ### Example
202
202
 
@@ -242,7 +242,7 @@ const { status, data } = await apiInstance.searchTargets(
242
242
  |-------------|-------------|------------------|
243
243
  |**200** | Search results | - |
244
244
  |**401** | Unauthorized | - |
245
- |**403** | Forbidden - Administrator role required | - |
245
+ |**403** | Forbidden - Moderator role required | - |
246
246
 
247
247
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
248
248
 
@@ -6,6 +6,7 @@ All URIs are relative to *https://api.smsh.sh*
6
6
  |------------- | ------------- | -------------|
7
7
  |[**callback**](#callback) | **GET** /auth/discord/callback | Discord - OAuth2 callback|
8
8
  |[**initiateLogin**](#initiatelogin) | **GET** /auth/discord | Discord - Initiate login|
9
+ |[**me**](#me) | **GET** /auth/me | Get current user profile|
9
10
  |[**token**](#token) | **POST** /oauth/token | Service - Exchange client credentials for token|
10
11
 
11
12
  # **callback**
@@ -106,6 +107,51 @@ void (empty response body)
106
107
 
107
108
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
108
109
 
110
+ # **me**
111
+ > UserProfileResponse me()
112
+
113
+ Returns the authenticated user\'s profile from their JWT claims. The session is already validated by the security rule before this endpoint is reached.
114
+
115
+ ### Example
116
+
117
+ ```typescript
118
+ import {
119
+ AuthenticationApi,
120
+ Configuration
121
+ } from '@rebornteam/reborn-api';
122
+
123
+ const configuration = new Configuration();
124
+ const apiInstance = new AuthenticationApi(configuration);
125
+
126
+ const { status, data } = await apiInstance.me();
127
+ ```
128
+
129
+ ### Parameters
130
+ This endpoint does not have any parameters.
131
+
132
+
133
+ ### Return type
134
+
135
+ **UserProfileResponse**
136
+
137
+ ### Authorization
138
+
139
+ [DiscordAuth](../README.md#DiscordAuth)
140
+
141
+ ### HTTP request headers
142
+
143
+ - **Content-Type**: Not defined
144
+ - **Accept**: application/json
145
+
146
+
147
+ ### HTTP response details
148
+ | Status code | Description | Response headers |
149
+ |-------------|-------------|------------------|
150
+ |**200** | Current user profile | - |
151
+ |**401** | Not authenticated or session invalidated | - |
152
+
153
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
154
+
109
155
  # **token**
110
156
  > object token()
111
157
 
@@ -7,12 +7,13 @@ Comprehensive connection analysis response including VPN detection, geolocation,
7
7
  Name | Type | Description | Notes
8
8
  ------------ | ------------- | ------------- | -------------
9
9
  **ipAddress** | **string** | The analyzed IPv4 address | [optional] [default to undefined]
10
- **approximateLocation** | **string** | Approximate geographic location of the IP address, typically in \'City, Country\' format. Returns \'Local, N/A\' for localhost or private IPs. | [optional] [default to undefined]
11
- **percentPositive** | **number** | 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. | [optional] [default to undefined]
12
- **numberOfChecks** | **number** | Total number of VPN detection services successfully queried during the last check. Higher numbers indicate more comprehensive analysis. | [optional] [default to undefined]
13
- **bypassed** | **boolean** | | [optional] [default to undefined]
14
- **bypassedUntil** | **string** | 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. | [optional] [default to undefined]
15
- **playerInformation** | [**PlayerGetPlayerInformation**](PlayerGetPlayerInformation.md) | Player information associated with this connection. Only populated when \'associate_uuid\' query parameter is provided. Contains first join status and login history. | [optional] [default to undefined]
10
+ **approximateLocation** | **string** | Approximate geographic location of the IP address. Returns \'Local, N/A\' for localhost or private IPs. | [optional] [default to undefined]
11
+ **percentPositive** | **number** | 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). | [optional] [default to undefined]
12
+ **numberOfChecks** | **number** | Total number of VPN detection services successfully queried during the last check. | [optional] [default to undefined]
13
+ **isBypassed** | **boolean** | Indicates if this IP address has been administratively bypassed. | [optional] [default to undefined]
14
+ **bypassedUntil** | **string** | Expiration timestamp for the bypass (ISO-8601 format). Null if not bypassed or bypass is permanent. | [optional] [default to undefined]
15
+ **results** | [**Array<AdminConnectionCheckResult>**](AdminConnectionCheckResult.md) | Results from each VPN detection service that checked this IP address | [optional] [default to undefined]
16
+ **playerInformation** | [**PlayerGetPlayerInformation**](PlayerGetPlayerInformation.md) | Player information associated with this connection. Only populated when \'associate_uuid\' query parameter is provided. | [optional] [default to undefined]
16
17
  **punishments** | [**Array<PunishmentGetPunishmentResponse>**](PunishmentGetPunishmentResponse.md) | Combined list of active punishments for both the IP address and player UUID (if provided). Only includes non-expired punishments. | [optional] [default to undefined]
17
18
 
18
19
  ## Example
@@ -25,8 +26,9 @@ const instance: ConnectionGetConnectionDetailsResponse = {
25
26
  approximateLocation,
26
27
  percentPositive,
27
28
  numberOfChecks,
28
- bypassed,
29
+ isBypassed,
29
30
  bypassedUntil,
31
+ results,
30
32
  playerInformation,
31
33
  punishments,
32
34
  };
package/docs/PlayerApi.md CHANGED
@@ -10,7 +10,7 @@ All URIs are relative to *https://api.smsh.sh*
10
10
  # **getPlayer1**
11
11
  > PlayerGetPlayerInformation getPlayer1()
12
12
 
13
- 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.
13
+ Retrieves player information by Minecraft UUID including first join status and login timestamp.
14
14
 
15
15
  ### Example
16
16
 
@@ -23,7 +23,7 @@ import {
23
23
  const configuration = new Configuration();
24
24
  const apiInstance = new PlayerApi(configuration);
25
25
 
26
- let uuid: string; //The Minecraft player UUID (with or without dashes) (default to undefined)
26
+ let uuid: string; // (default to undefined)
27
27
 
28
28
  const { status, data } = await apiInstance.getPlayer1(
29
29
  uuid
@@ -34,7 +34,7 @@ const { status, data } = await apiInstance.getPlayer1(
34
34
 
35
35
  |Name | Type | Description | Notes|
36
36
  |------------- | ------------- | ------------- | -------------|
37
- | **uuid** | [**string**] | The Minecraft player UUID (with or without dashes) | defaults to undefined|
37
+ | **uuid** | [**string**] | | defaults to undefined|
38
38
 
39
39
 
40
40
  ### Return type
@@ -55,8 +55,7 @@ const { status, data } = await apiInstance.getPlayer1(
55
55
  | Status code | Description | Response headers |
56
56
  |-------------|-------------|------------------|
57
57
  |**200** | Player information retrieved successfully | - |
58
- |**401** | Unauthorized — invalid or missing authentication token | - |
59
- |**400** | Bad request — invalid UUID format | - |
58
+ |**401** | Unauthorized | - |
60
59
  |**404** | Player not found | - |
61
60
 
62
61
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -64,7 +63,7 @@ const { status, data } = await apiInstance.getPlayer1(
64
63
  # **getUsernames**
65
64
  > getUsernames()
66
65
 
67
- 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.
66
+ 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.
68
67
 
69
68
  ### Example
70
69
 
@@ -77,7 +76,7 @@ import {
77
76
  const configuration = new Configuration();
78
77
  const apiInstance = new PlayerApi(configuration);
79
78
 
80
- let uuids: Array<string>; //List of player UUIDs to resolve (repeatable query param) (default to undefined)
79
+ let uuids: Array<string>; //List of player UUIDs to resolve (default to undefined)
81
80
 
82
81
  const { status, data } = await apiInstance.getUsernames(
83
82
  uuids
@@ -88,7 +87,7 @@ const { status, data } = await apiInstance.getUsernames(
88
87
 
89
88
  |Name | Type | Description | Notes|
90
89
  |------------- | ------------- | ------------- | -------------|
91
- | **uuids** | **Array&lt;string&gt;** | List of player UUIDs to resolve (repeatable query param) | defaults to undefined|
90
+ | **uuids** | **Array&lt;string&gt;** | List of player UUIDs to resolve | defaults to undefined|
92
91
 
93
92
 
94
93
  ### Return type
@@ -6,10 +6,10 @@ Player information including join history, tracking data, and punishment scoring
6
6
 
7
7
  Name | Type | Description | Notes
8
8
  ------------ | ------------- | ------------- | -------------
9
+ **firstJoin** | **boolean** | Indicates whether this is the player\&#39;s first time joining the server. | [optional] [default to undefined]
9
10
  **firstLogin** | **string** | Timestamp of when the player first connected to the server (ISO-8601 format). | [optional] [default to undefined]
10
- **firstJoin** | **boolean** | Indicates whether this is the player\&#39;s first time joining the server. Useful for triggering welcome messages, tutorials, or first-join rewards. | [optional] [default to undefined]
11
- **punishmentPointsRaw** | **number** | 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. | [optional] [default to undefined]
12
- **punishmentPointsPercent** | **number** | Punishment score as a percentage (0-100). When this score is &gt;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. | [optional] [default to undefined]
11
+ **punishmentPointsRaw** | **number** | Raw punishment score calculated as: SUM((base_weight × severity/10)). Used for tracking overall punishment severity. | [optional] [default to undefined]
12
+ **punishmentPointsPercent** | **number** | Punishment score as a percentage (0-100). When &gt;100% before applying a new punishment, the new punishment should be made permanent. | [optional] [default to undefined]
13
13
 
14
14
  ## Example
15
15
 
@@ -17,8 +17,8 @@ Name | Type | Description | Notes
17
17
  import { PlayerGetPlayerInformation } from '@rebornteam/reborn-api';
18
18
 
19
19
  const instance: PlayerGetPlayerInformation = {
20
- firstLogin,
21
20
  firstJoin,
21
+ firstLogin,
22
22
  punishmentPointsRaw,
23
23
  punishmentPointsPercent,
24
24
  };
package/docs/Rank.md ADDED
@@ -0,0 +1,12 @@
1
+ # Rank
2
+
3
+
4
+ ## Enum
5
+
6
+ * `Administrator` (value: `'ADMINISTRATOR'`)
7
+
8
+ * `Moderator` (value: `'MODERATOR'`)
9
+
10
+ * `Service` (value: `'SERVICE'`)
11
+
12
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,30 @@
1
+ # UserProfileResponse
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **id** | **string** | | [default to undefined]
9
+ **username** | **string** | | [default to undefined]
10
+ **avatarUrl** | **string** | | [default to undefined]
11
+ **rank** | [**Rank**](Rank.md) | | [default to undefined]
12
+ **roles** | **Array&lt;string&gt;** | | [default to undefined]
13
+ **discordRoles** | **Array&lt;string&gt;** | | [default to undefined]
14
+
15
+ ## Example
16
+
17
+ ```typescript
18
+ import { UserProfileResponse } from '@rebornteam/reborn-api';
19
+
20
+ const instance: UserProfileResponse = {
21
+ id,
22
+ username,
23
+ avatarUrl,
24
+ rank,
25
+ roles,
26
+ discordRoles,
27
+ };
28
+ ```
29
+
30
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
package/index.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Reborn API
5
5
  * The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
6
6
  *
7
- * The version of the OpenAPI document: 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rebornteam/reborn-api",
3
- "version": "2.8.0",
3
+ "version": "3.0.1",
4
4
  "description": "OpenAPI client for @rebornteam/reborn-api",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {