@rebornteam/reborn-api 4.9.1 → 4.9.3
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/.openapi-generator/FILES +11 -0
- package/README.md +23 -2
- package/api.ts +1104 -183
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +516 -1
- package/dist/api.js +684 -1
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/esm/api.d.ts +516 -1
- package/dist/esm/api.js +684 -1
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/AdminDashboardActivityCell.md +25 -0
- package/docs/AdminDashboardApi.md +453 -0
- package/docs/AdminDashboardCategoryCount.md +23 -0
- package/docs/AdminDashboardCountryCount.md +25 -0
- package/docs/AdminDashboardDailySessions.md +27 -0
- package/docs/AdminDashboardModeratorActivity.md +23 -0
- package/docs/AdminDashboardOverview.md +35 -0
- package/docs/AdminDashboardPunishmentDaily.md +25 -0
- package/docs/AdminDashboardReportSummary.md +27 -0
- package/docs/AdminDashboardServerRegion.md +27 -0
- package/docs/AdminDashboardTrustBucket.md +23 -0
- package/docs/AuthenticationApi.md +53 -0
- package/docs/DiscordAuthUrlResponse.md +21 -0
- package/index.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# AdminDashboardOverview
|
|
2
|
+
|
|
3
|
+
\"At a glance\" dashboard tiles --- current pulse of the network plus rolling 7-day session averages. Session durations are in seconds.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**onlinePlayers** | **number** | Players with an open session right now | [default to undefined]
|
|
10
|
+
**newPlayersToday** | **number** | Players whose first join was today (UTC) | [default to undefined]
|
|
11
|
+
**dauToday** | **number** | Distinct players seen today (UTC) | [default to undefined]
|
|
12
|
+
**avgSessionSeconds** | **number** | Mean completed-session length over the last 7 days, seconds | [default to undefined]
|
|
13
|
+
**medianSessionSeconds** | **number** | Median completed-session length over the last 7 days, seconds | [default to undefined]
|
|
14
|
+
**activeBans** | **number** | Unexpired BAN punishments | [default to undefined]
|
|
15
|
+
**activeMutes** | **number** | Unexpired MUTE punishments | [default to undefined]
|
|
16
|
+
**openReports** | **number** | Reports awaiting resolution | [default to undefined]
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import { AdminDashboardOverview } from '@rebornteam/reborn-api';
|
|
22
|
+
|
|
23
|
+
const instance: AdminDashboardOverview = {
|
|
24
|
+
onlinePlayers,
|
|
25
|
+
newPlayersToday,
|
|
26
|
+
dauToday,
|
|
27
|
+
avgSessionSeconds,
|
|
28
|
+
medianSessionSeconds,
|
|
29
|
+
activeBans,
|
|
30
|
+
activeMutes,
|
|
31
|
+
openReports,
|
|
32
|
+
};
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
[[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,25 @@
|
|
|
1
|
+
# AdminDashboardPunishmentDaily
|
|
2
|
+
|
|
3
|
+
Punishments issued on one UTC day for a single type (BAN/MUTE/KICK/WARNING).
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**day** | **string** | UTC day, YYYY-MM-DD | [default to undefined]
|
|
10
|
+
**type** | **string** | Punishment type | [default to undefined]
|
|
11
|
+
**count** | **number** | Issued this day of this type | [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { AdminDashboardPunishmentDaily } from '@rebornteam/reborn-api';
|
|
17
|
+
|
|
18
|
+
const instance: AdminDashboardPunishmentDaily = {
|
|
19
|
+
day,
|
|
20
|
+
type,
|
|
21
|
+
count,
|
|
22
|
+
};
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
[[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,27 @@
|
|
|
1
|
+
# AdminDashboardReportSummary
|
|
2
|
+
|
|
3
|
+
Report backlog, resolution speed, and category breakdown over the window.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**openReports** | **number** | Reports awaiting resolution (all time) | [default to undefined]
|
|
10
|
+
**resolvedReports** | **number** | Reports resolved within the window | [default to undefined]
|
|
11
|
+
**avgResolutionSeconds** | **number** | Mean time-to-resolution within the window, seconds | [default to undefined]
|
|
12
|
+
**byCategory** | [**Array<AdminDashboardCategoryCount>**](AdminDashboardCategoryCount.md) | Reports filed within the window, grouped by category | [default to undefined]
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { AdminDashboardReportSummary } from '@rebornteam/reborn-api';
|
|
18
|
+
|
|
19
|
+
const instance: AdminDashboardReportSummary = {
|
|
20
|
+
openReports,
|
|
21
|
+
resolvedReports,
|
|
22
|
+
avgResolutionSeconds,
|
|
23
|
+
byCategory,
|
|
24
|
+
};
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
[[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,27 @@
|
|
|
1
|
+
# AdminDashboardServerRegion
|
|
2
|
+
|
|
3
|
+
Online server count and current player load for a region/game-type pair.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**region** | **string** | Server region | [default to undefined]
|
|
10
|
+
**gameType** | **string** | Game type | [default to undefined]
|
|
11
|
+
**onlineServers** | **number** | Online server instances | [default to undefined]
|
|
12
|
+
**players** | **number** | Players currently in open sessions on those servers | [default to undefined]
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { AdminDashboardServerRegion } from '@rebornteam/reborn-api';
|
|
18
|
+
|
|
19
|
+
const instance: AdminDashboardServerRegion = {
|
|
20
|
+
region,
|
|
21
|
+
gameType,
|
|
22
|
+
onlineServers,
|
|
23
|
+
players,
|
|
24
|
+
};
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
[[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,23 @@
|
|
|
1
|
+
# AdminDashboardTrustBucket
|
|
2
|
+
|
|
3
|
+
One bar of the trust-factor distribution histogram. Bucket 0 = scores 0--9, bucket 9 = scores 90--100; count is players whose latest snapshot falls in it.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**bucket** | **number** | Histogram bucket index, 0–9 (each spans 10 trust points) | [default to undefined]
|
|
10
|
+
**count** | **number** | Players in this bucket | [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { AdminDashboardTrustBucket } from '@rebornteam/reborn-api';
|
|
16
|
+
|
|
17
|
+
const instance: AdminDashboardTrustBucket = {
|
|
18
|
+
bucket,
|
|
19
|
+
count,
|
|
20
|
+
};
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -4,11 +4,64 @@ All URIs are relative to *https://api.smsh.sh*
|
|
|
4
4
|
|
|
5
5
|
|Method | HTTP request | Description|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
+
|[**authorizeUrl**](#authorizeurl) | **GET** /auth/discord/url | Discord - Authorize URL (native clients)|
|
|
7
8
|
|[**callback**](#callback) | **GET** /auth/discord/callback | Discord - OAuth2 callback|
|
|
8
9
|
|[**initiateLogin**](#initiatelogin) | **GET** /auth/discord | Discord - Initiate login|
|
|
9
10
|
|[**me**](#me) | **GET** /auth/me | Get current user profile|
|
|
10
11
|
|[**token**](#token) | **POST** /oauth/token | Service - Exchange client credentials for token|
|
|
11
12
|
|
|
13
|
+
# **authorizeUrl**
|
|
14
|
+
> DiscordAuthUrlResponse authorizeUrl()
|
|
15
|
+
|
|
16
|
+
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.
|
|
17
|
+
|
|
18
|
+
### Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import {
|
|
22
|
+
AuthenticationApi,
|
|
23
|
+
Configuration
|
|
24
|
+
} from '@rebornteam/reborn-api';
|
|
25
|
+
|
|
26
|
+
const configuration = new Configuration();
|
|
27
|
+
const apiInstance = new AuthenticationApi(configuration);
|
|
28
|
+
|
|
29
|
+
let redirect: string; //Final redirect target for the JWT (native deep link). Must be allowlisted. (optional) (default to undefined)
|
|
30
|
+
|
|
31
|
+
const { status, data } = await apiInstance.authorizeUrl(
|
|
32
|
+
redirect
|
|
33
|
+
);
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Parameters
|
|
37
|
+
|
|
38
|
+
|Name | Type | Description | Notes|
|
|
39
|
+
|------------- | ------------- | ------------- | -------------|
|
|
40
|
+
| **redirect** | [**string**] | Final redirect target for the JWT (native deep link). Must be allowlisted. | (optional) defaults to undefined|
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Return type
|
|
44
|
+
|
|
45
|
+
**DiscordAuthUrlResponse**
|
|
46
|
+
|
|
47
|
+
### Authorization
|
|
48
|
+
|
|
49
|
+
[DiscordAuth](../README.md#DiscordAuth)
|
|
50
|
+
|
|
51
|
+
### HTTP request headers
|
|
52
|
+
|
|
53
|
+
- **Content-Type**: Not defined
|
|
54
|
+
- **Accept**: application/json
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### HTTP response details
|
|
58
|
+
| Status code | Description | Response headers |
|
|
59
|
+
|-------------|-------------|------------------|
|
|
60
|
+
|**200** | Authorize URL payload | - |
|
|
61
|
+
|**400** | The requested `redirect` is not allowlisted | - |
|
|
62
|
+
|
|
63
|
+
[[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
|
+
|
|
12
65
|
# **callback**
|
|
13
66
|
> callback()
|
|
14
67
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# DiscordAuthUrlResponse
|
|
2
|
+
|
|
3
|
+
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.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**authorizeUrl** | **string** | Discord OAuth2 authorize URL to open on the client. | [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { DiscordAuthUrlResponse } from '@rebornteam/reborn-api';
|
|
15
|
+
|
|
16
|
+
const instance: DiscordAuthUrlResponse = {
|
|
17
|
+
authorizeUrl,
|
|
18
|
+
};
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
[[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: 4.9.
|
|
7
|
+
* The version of the OpenAPI document: 4.9.3
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|