@rebornteam/reborn-api 2.6.0 → 2.7.0

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.
Files changed (57) hide show
  1. package/.openapi-generator/FILES +19 -5
  2. package/README.md +33 -11
  3. package/api.ts +1572 -588
  4. package/base.ts +1 -1
  5. package/common.ts +1 -1
  6. package/configuration.ts +1 -1
  7. package/dist/api.d.ts +776 -248
  8. package/dist/api.js +1264 -467
  9. package/dist/base.d.ts +1 -1
  10. package/dist/base.js +1 -1
  11. package/dist/common.d.ts +1 -1
  12. package/dist/common.js +1 -1
  13. package/dist/configuration.d.ts +1 -1
  14. package/dist/configuration.js +1 -1
  15. package/dist/esm/api.d.ts +776 -248
  16. package/dist/esm/api.js +1243 -454
  17. package/dist/esm/base.d.ts +1 -1
  18. package/dist/esm/base.js +1 -1
  19. package/dist/esm/common.d.ts +1 -1
  20. package/dist/esm/common.js +1 -1
  21. package/dist/esm/configuration.d.ts +1 -1
  22. package/dist/esm/configuration.js +1 -1
  23. package/dist/esm/index.d.ts +1 -1
  24. package/dist/esm/index.js +1 -1
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.js +1 -1
  27. package/docs/AdminApplyPunishmentRequest.md +33 -0
  28. package/docs/AdminApplyPunishmentResponse.md +21 -0
  29. package/docs/AdminApplyPunishmentResult.md +33 -0
  30. package/docs/AdminCreatePunishmentDraftRequest.md +31 -0
  31. package/docs/AdminIpSearchResult.md +23 -0
  32. package/docs/AdminPagedPunishmentResponse.md +1 -1
  33. package/docs/AdminPlayerSearchResult.md +23 -0
  34. package/docs/AdminPunishmentDraftResponse.md +21 -0
  35. package/docs/AdminPunishmentEvaluation.md +39 -0
  36. package/docs/AdminPunishmentListItem.md +42 -0
  37. package/docs/AdminPunishmentSearchResponse.md +25 -0
  38. package/docs/AdminPunishmentTarget.md +23 -0
  39. package/docs/AdminPunishmentsApi.md +168 -2
  40. package/docs/AuthenticationApi.md +167 -0
  41. package/docs/ChatApi.md +121 -0
  42. package/docs/ChatMessageDTO.md +30 -0
  43. package/docs/ChatMessageRequest.md +26 -0
  44. package/docs/PlayerApi.md +56 -3
  45. package/docs/PunishmentApi.md +0 -106
  46. package/docs/PunishmentGetPunishmentResponse.md +5 -3
  47. package/docs/ServerRegisterRequest.md +24 -0
  48. package/docs/ServerSessionDTO.md +36 -0
  49. package/docs/ServerSessionsApi.md +261 -0
  50. package/docs/TokenRequest.md +24 -0
  51. package/index.ts +1 -1
  52. package/package.json +1 -1
  53. package/docs/ApplyPunishmentRequest.md +0 -31
  54. package/docs/ApplyPunishmentResponse.md +0 -33
  55. package/docs/CreatePunishmentDraftRequest.md +0 -29
  56. package/docs/DefaultApi.md +0 -105
  57. package/docs/PunishmentDraftResponse.md +0 -39
@@ -0,0 +1,261 @@
1
+ # ServerSessionsApi
2
+
3
+ All URIs are relative to *https://api.smsh.sh*
4
+
5
+ |Method | HTTP request | Description|
6
+ |------------- | ------------- | -------------|
7
+ |[**heartbeat**](#heartbeat) | **PUT** /v1/servers/{id}/heartbeat | Send a heartbeat|
8
+ |[**listAll**](#listall) | **GET** /v1/servers/history | List all server sessions|
9
+ |[**listOnline**](#listonline) | **GET** /v1/servers | List online server sessions|
10
+ |[**markOffline**](#markoffline) | **PUT** /v1/servers/{id}/offline | Mark a session offline|
11
+ |[**register**](#register) | **POST** /v1/servers | Register a server session|
12
+
13
+ # **heartbeat**
14
+ > heartbeat()
15
+
16
+ Updates the `last_heartbeat` timestamp for the given session, keeping it marked as online. Sessions that miss heartbeats for more than 2 minutes are automatically tombstoned by the scheduler. Call this every 30 seconds from the game server.
17
+
18
+ ### Example
19
+
20
+ ```typescript
21
+ import {
22
+ ServerSessionsApi,
23
+ Configuration
24
+ } from '@rebornteam/reborn-api';
25
+
26
+ const configuration = new Configuration();
27
+ const apiInstance = new ServerSessionsApi(configuration);
28
+
29
+ let id: string; //Session UUID returned from the registration call (default to undefined)
30
+
31
+ const { status, data } = await apiInstance.heartbeat(
32
+ id
33
+ );
34
+ ```
35
+
36
+ ### Parameters
37
+
38
+ |Name | Type | Description | Notes|
39
+ |------------- | ------------- | ------------- | -------------|
40
+ | **id** | [**string**] | Session UUID returned from the registration call | defaults to undefined|
41
+
42
+
43
+ ### Return type
44
+
45
+ void (empty response body)
46
+
47
+ ### Authorization
48
+
49
+ [DiscordAuth](../README.md#DiscordAuth)
50
+
51
+ ### HTTP request headers
52
+
53
+ - **Content-Type**: Not defined
54
+ - **Accept**: Not defined
55
+
56
+
57
+ ### HTTP response details
58
+ | Status code | Description | Response headers |
59
+ |-------------|-------------|------------------|
60
+ |**204** | Heartbeat recorded | - |
61
+ |**401** | Unauthorized | - |
62
+ |**404** | Session not found or already offline | - |
63
+
64
+ [[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)
65
+
66
+ # **listAll**
67
+ > Array<ServerSessionDTO> listAll()
68
+
69
+ Returns all server sessions — both online and historical — ordered by start time descending. Used by the web UI to populate the session filter dropdown.
70
+
71
+ ### Example
72
+
73
+ ```typescript
74
+ import {
75
+ ServerSessionsApi,
76
+ Configuration
77
+ } from '@rebornteam/reborn-api';
78
+
79
+ const configuration = new Configuration();
80
+ const apiInstance = new ServerSessionsApi(configuration);
81
+
82
+ const { status, data } = await apiInstance.listAll();
83
+ ```
84
+
85
+ ### Parameters
86
+ This endpoint does not have any parameters.
87
+
88
+
89
+ ### Return type
90
+
91
+ **Array<ServerSessionDTO>**
92
+
93
+ ### Authorization
94
+
95
+ [DiscordAuth](../README.md#DiscordAuth)
96
+
97
+ ### HTTP request headers
98
+
99
+ - **Content-Type**: Not defined
100
+ - **Accept**: application/json
101
+
102
+
103
+ ### HTTP response details
104
+ | Status code | Description | Response headers |
105
+ |-------------|-------------|------------------|
106
+ |**200** | List of all sessions | - |
107
+ |**401** | Unauthorized | - |
108
+
109
+ [[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)
110
+
111
+ # **listOnline**
112
+ > Array<ServerSessionDTO> listOnline()
113
+
114
+ Returns all currently online server sessions, ordered by start time descending.
115
+
116
+ ### Example
117
+
118
+ ```typescript
119
+ import {
120
+ ServerSessionsApi,
121
+ Configuration
122
+ } from '@rebornteam/reborn-api';
123
+
124
+ const configuration = new Configuration();
125
+ const apiInstance = new ServerSessionsApi(configuration);
126
+
127
+ const { status, data } = await apiInstance.listOnline();
128
+ ```
129
+
130
+ ### Parameters
131
+ This endpoint does not have any parameters.
132
+
133
+
134
+ ### Return type
135
+
136
+ **Array<ServerSessionDTO>**
137
+
138
+ ### Authorization
139
+
140
+ [DiscordAuth](../README.md#DiscordAuth)
141
+
142
+ ### HTTP request headers
143
+
144
+ - **Content-Type**: Not defined
145
+ - **Accept**: application/json
146
+
147
+
148
+ ### HTTP response details
149
+ | Status code | Description | Response headers |
150
+ |-------------|-------------|------------------|
151
+ |**200** | List of online sessions | - |
152
+ |**401** | Unauthorized | - |
153
+
154
+ [[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)
155
+
156
+ # **markOffline**
157
+ > markOffline()
158
+
159
+ Marks the session as offline with the current timestamp as `endedAt`. Call this from the game server\'s shutdown hook for a clean shutdown signal. Sessions that crash without calling this endpoint will be tombstoned automatically by the 2-minute heartbeat scheduler.
160
+
161
+ ### Example
162
+
163
+ ```typescript
164
+ import {
165
+ ServerSessionsApi,
166
+ Configuration
167
+ } from '@rebornteam/reborn-api';
168
+
169
+ const configuration = new Configuration();
170
+ const apiInstance = new ServerSessionsApi(configuration);
171
+
172
+ let id: string; //Session UUID returned from the registration call (default to undefined)
173
+
174
+ const { status, data } = await apiInstance.markOffline(
175
+ id
176
+ );
177
+ ```
178
+
179
+ ### Parameters
180
+
181
+ |Name | Type | Description | Notes|
182
+ |------------- | ------------- | ------------- | -------------|
183
+ | **id** | [**string**] | Session UUID returned from the registration call | defaults to undefined|
184
+
185
+
186
+ ### Return type
187
+
188
+ void (empty response body)
189
+
190
+ ### Authorization
191
+
192
+ [DiscordAuth](../README.md#DiscordAuth)
193
+
194
+ ### HTTP request headers
195
+
196
+ - **Content-Type**: Not defined
197
+ - **Accept**: Not defined
198
+
199
+
200
+ ### HTTP response details
201
+ | Status code | Description | Response headers |
202
+ |-------------|-------------|------------------|
203
+ |**204** | Session marked offline | - |
204
+ |**401** | Unauthorized | - |
205
+
206
+ [[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)
207
+
208
+ # **register**
209
+ > ServerSessionDTO register(serverRegisterRequest)
210
+
211
+ Registers a game server instance and returns a session ID used for subsequent heartbeats and chat ingestion. If a `containerId` is provided and an online session already exists for that container (e.g. after a Velocity restart), the existing session is returned unchanged. Otherwise a fresh session is created with an auto-generated instance name.
212
+
213
+ ### Example
214
+
215
+ ```typescript
216
+ import {
217
+ ServerSessionsApi,
218
+ Configuration,
219
+ ServerRegisterRequest
220
+ } from '@rebornteam/reborn-api';
221
+
222
+ const configuration = new Configuration();
223
+ const apiInstance = new ServerSessionsApi(configuration);
224
+
225
+ let serverRegisterRequest: ServerRegisterRequest; //
226
+
227
+ const { status, data } = await apiInstance.register(
228
+ serverRegisterRequest
229
+ );
230
+ ```
231
+
232
+ ### Parameters
233
+
234
+ |Name | Type | Description | Notes|
235
+ |------------- | ------------- | ------------- | -------------|
236
+ | **serverRegisterRequest** | **ServerRegisterRequest**| | |
237
+
238
+
239
+ ### Return type
240
+
241
+ **ServerSessionDTO**
242
+
243
+ ### Authorization
244
+
245
+ [DiscordAuth](../README.md#DiscordAuth)
246
+
247
+ ### HTTP request headers
248
+
249
+ - **Content-Type**: application/json
250
+ - **Accept**: application/json
251
+
252
+
253
+ ### HTTP response details
254
+ | Status code | Description | Response headers |
255
+ |-------------|-------------|------------------|
256
+ |**201** | Session created or resumed | - |
257
+ |**400** | Bad request — missing required fields | - |
258
+ |**401** | Unauthorized | - |
259
+
260
+ [[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)
261
+
@@ -0,0 +1,24 @@
1
+ # TokenRequest
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **grant_type** | **string** | | [optional] [default to undefined]
9
+ **client_id** | **string** | | [optional] [default to undefined]
10
+ **client_secret** | **string** | | [optional] [default to undefined]
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import { TokenRequest } from '@rebornteam/reborn-api';
16
+
17
+ const instance: TokenRequest = {
18
+ grant_type,
19
+ client_id,
20
+ client_secret,
21
+ };
22
+ ```
23
+
24
+ [[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.6.0
7
+ * The version of the OpenAPI document: 2.7.0
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.6.0",
3
+ "version": "2.7.0",
4
4
  "description": "OpenAPI client for @rebornteam/reborn-api",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {
@@ -1,31 +0,0 @@
1
- # ApplyPunishmentRequest
2
-
3
- Request to apply a punishment to a player
4
-
5
- ## Properties
6
-
7
- Name | Type | Description | Notes
8
- ------------ | ------------- | ------------- | -------------
9
- **playerUuid** | **string** | Player UUID to punish | [default to undefined]
10
- **reason** | **string** | Reason for the punishment | [default to undefined]
11
- **type** | **string** | Type of punishment | [default to undefined]
12
- **severity** | **number** | Severity level of the punishment (1-10) | [default to undefined]
13
- **createdBy** | **string** | Staff member applying the punishment | [default to undefined]
14
- **durationSeconds** | **number** | Duration of the punishment in seconds. Null means permanent. | [optional] [default to undefined]
15
-
16
- ## Example
17
-
18
- ```typescript
19
- import { ApplyPunishmentRequest } from '@rebornteam/reborn-api';
20
-
21
- const instance: ApplyPunishmentRequest = {
22
- playerUuid,
23
- reason,
24
- type,
25
- severity,
26
- createdBy,
27
- durationSeconds,
28
- };
29
- ```
30
-
31
- [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -1,33 +0,0 @@
1
- # ApplyPunishmentResponse
2
-
3
- Response after applying a punishment
4
-
5
- ## Properties
6
-
7
- Name | Type | Description | Notes
8
- ------------ | ------------- | ------------- | -------------
9
- **punishmentId** | **number** | ID of the created punishment | [optional] [default to undefined]
10
- **playerUuid** | **string** | Player UUID punished | [optional] [default to undefined]
11
- **type** | **string** | Type of punishment applied | [optional] [default to undefined]
12
- **severity** | **number** | Severity level (1-10) | [optional] [default to undefined]
13
- **newScore** | **number** | New total punishment score after applying | [optional] [default to undefined]
14
- **isPermanent** | **boolean** | Whether this punishment is permanent | [optional] [default to undefined]
15
- **expiresAt** | **string** | Timestamp when punishment expires (ISO-8601 format, null if permanent) | [optional] [default to undefined]
16
-
17
- ## Example
18
-
19
- ```typescript
20
- import { ApplyPunishmentResponse } from '@rebornteam/reborn-api';
21
-
22
- const instance: ApplyPunishmentResponse = {
23
- punishmentId,
24
- playerUuid,
25
- type,
26
- severity,
27
- newScore,
28
- isPermanent,
29
- expiresAt,
30
- };
31
- ```
32
-
33
- [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -1,29 +0,0 @@
1
- # CreatePunishmentDraftRequest
2
-
3
- Request to create a punishment draft for preview before applying
4
-
5
- ## Properties
6
-
7
- Name | Type | Description | Notes
8
- ------------ | ------------- | ------------- | -------------
9
- **playerUuid** | **string** | Player UUID to punish | [default to undefined]
10
- **reason** | **string** | Reason for the punishment | [default to undefined]
11
- **type** | **string** | Type of punishment | [default to undefined]
12
- **severity** | **number** | Severity level of the punishment (1-10) | [default to undefined]
13
- **durationSeconds** | **number** | Duration of the punishment in seconds. Null means permanent. | [optional] [default to undefined]
14
-
15
- ## Example
16
-
17
- ```typescript
18
- import { CreatePunishmentDraftRequest } from '@rebornteam/reborn-api';
19
-
20
- const instance: CreatePunishmentDraftRequest = {
21
- playerUuid,
22
- reason,
23
- type,
24
- severity,
25
- durationSeconds,
26
- };
27
- ```
28
-
29
- [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -1,105 +0,0 @@
1
- # DefaultApi
2
-
3
- All URIs are relative to *https://api.smsh.sh*
4
-
5
- |Method | HTTP request | Description|
6
- |------------- | ------------- | -------------|
7
- |[**callback**](#callback) | **GET** /auth/discord/callback | |
8
- |[**initiateLogin**](#initiatelogin) | **GET** /auth/discord | |
9
-
10
- # **callback**
11
- > object callback()
12
-
13
-
14
- ### Example
15
-
16
- ```typescript
17
- import {
18
- DefaultApi,
19
- Configuration
20
- } from '@rebornteam/reborn-api';
21
-
22
- const configuration = new Configuration();
23
- const apiInstance = new DefaultApi(configuration);
24
-
25
- let code: string; // (optional) (default to undefined)
26
- let error: string; // (optional) (default to undefined)
27
-
28
- const { status, data } = await apiInstance.callback(
29
- code,
30
- error
31
- );
32
- ```
33
-
34
- ### Parameters
35
-
36
- |Name | Type | Description | Notes|
37
- |------------- | ------------- | ------------- | -------------|
38
- | **code** | [**string**] | | (optional) defaults to undefined|
39
- | **error** | [**string**] | | (optional) defaults to undefined|
40
-
41
-
42
- ### Return type
43
-
44
- **object**
45
-
46
- ### Authorization
47
-
48
- [DiscordAuth](../README.md#DiscordAuth)
49
-
50
- ### HTTP request headers
51
-
52
- - **Content-Type**: Not defined
53
- - **Accept**: application/json
54
-
55
-
56
- ### HTTP response details
57
- | Status code | Description | Response headers |
58
- |-------------|-------------|------------------|
59
- |**200** | callback 200 response | - |
60
-
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)
62
-
63
- # **initiateLogin**
64
- > object initiateLogin()
65
-
66
-
67
- ### Example
68
-
69
- ```typescript
70
- import {
71
- DefaultApi,
72
- Configuration
73
- } from '@rebornteam/reborn-api';
74
-
75
- const configuration = new Configuration();
76
- const apiInstance = new DefaultApi(configuration);
77
-
78
- const { status, data } = await apiInstance.initiateLogin();
79
- ```
80
-
81
- ### Parameters
82
- This endpoint does not have any parameters.
83
-
84
-
85
- ### Return type
86
-
87
- **object**
88
-
89
- ### Authorization
90
-
91
- [DiscordAuth](../README.md#DiscordAuth)
92
-
93
- ### HTTP request headers
94
-
95
- - **Content-Type**: Not defined
96
- - **Accept**: application/json
97
-
98
-
99
- ### HTTP response details
100
- | Status code | Description | Response headers |
101
- |-------------|-------------|------------------|
102
- |**200** | initiateLogin 200 response | - |
103
-
104
- [[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)
105
-
@@ -1,39 +0,0 @@
1
- # PunishmentDraftResponse
2
-
3
- Response containing punishment draft preview with calculated points and thresholds
4
-
5
- ## Properties
6
-
7
- Name | Type | Description | Notes
8
- ------------ | ------------- | ------------- | -------------
9
- **playerUuid** | **string** | Player UUID this punishment would apply to | [optional] [default to undefined]
10
- **reason** | **string** | Reason for the punishment | [optional] [default to undefined]
11
- **type** | **string** | Type of punishment | [optional] [default to undefined]
12
- **severity** | **number** | Severity level (1-10) | [optional] [default to undefined]
13
- **currentScore** | **number** | Current total punishment score before applying this punishment | [optional] [default to undefined]
14
- **pointsToAdd** | **number** | Points this punishment would add | [optional] [default to undefined]
15
- **newScore** | **number** | New total score after applying this punishment | [optional] [default to undefined]
16
- **willBePermanent** | **boolean** | Whether this punishment will be permanent | [optional] [default to undefined]
17
- **durationSeconds** | **number** | Duration in seconds (null if permanent) | [optional] [default to undefined]
18
- **previousPunishmentCount** | **number** | Number of previous punishments for this player | [optional] [default to undefined]
19
-
20
- ## Example
21
-
22
- ```typescript
23
- import { PunishmentDraftResponse } from '@rebornteam/reborn-api';
24
-
25
- const instance: PunishmentDraftResponse = {
26
- playerUuid,
27
- reason,
28
- type,
29
- severity,
30
- currentScore,
31
- pointsToAdd,
32
- newScore,
33
- willBePermanent,
34
- durationSeconds,
35
- previousPunishmentCount,
36
- };
37
- ```
38
-
39
- [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)