@rebornteam/reborn-api 2.5.1 → 2.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +20 -4
- package/README.md +32 -12
- package/api.ts +1372 -357
- package/base.ts +2 -2
- package/common.ts +2 -2
- package/configuration.ts +2 -2
- package/dist/api.d.ts +795 -176
- package/dist/api.js +954 -268
- package/dist/base.d.ts +2 -2
- package/dist/base.js +2 -2
- package/dist/common.d.ts +2 -2
- package/dist/common.js +2 -2
- package/dist/configuration.d.ts +2 -2
- package/dist/configuration.js +2 -2
- package/dist/esm/api.d.ts +795 -176
- package/dist/esm/api.js +917 -243
- package/dist/esm/base.d.ts +2 -2
- package/dist/esm/base.js +2 -2
- package/dist/esm/common.d.ts +2 -2
- package/dist/esm/common.js +2 -2
- package/dist/esm/configuration.d.ts +2 -2
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/docs/AdminApplyPunishmentRequest.md +33 -0
- package/docs/AdminApplyPunishmentResponse.md +21 -0
- package/docs/AdminApplyPunishmentResult.md +33 -0
- package/docs/AdminClientCredentialResponse.md +2 -0
- package/docs/AdminClientCredentialsApi.md +17 -17
- package/docs/AdminConnectionsApi.md +70 -4
- package/docs/AdminCreatePunishmentDraftRequest.md +31 -0
- package/docs/AdminDashboardApi.md +2 -2
- package/docs/AdminIpSearchResult.md +23 -0
- package/docs/AdminPagedConnectionResponse.md +29 -0
- package/docs/AdminPagedPlayerResponse.md +29 -0
- package/docs/AdminPagedPunishmentResponse.md +29 -0
- package/docs/AdminPlayerDetailResponse.md +37 -0
- package/docs/AdminPlayerSearchResult.md +23 -0
- package/docs/AdminPlayerSummary.md +35 -0
- package/docs/AdminPlayersApi.md +122 -0
- package/docs/AdminPunishmentDraftResponse.md +21 -0
- package/docs/AdminPunishmentEvaluation.md +39 -0
- package/docs/AdminPunishmentListItem.md +42 -0
- package/docs/AdminPunishmentSearchResponse.md +25 -0
- package/docs/AdminPunishmentTarget.md +23 -0
- package/docs/AdminPunishmentsApi.md +248 -0
- package/docs/AdminUsernameHistoryEntry.md +23 -0
- package/docs/ClientCredentialRequest.md +2 -0
- package/docs/ConnectionApi.md +1 -1
- package/docs/DefaultApi.md +105 -0
- package/docs/PlayerApi.md +5 -5
- package/docs/PunishmentApi.md +8 -114
- package/docs/PunishmentGetPunishmentResponse.md +5 -3
- package/index.ts +2 -2
- package/package.json +2 -2
- package/docs/ApplyPunishmentRequest.md +0 -31
- package/docs/ApplyPunishmentResponse.md +0 -33
- package/docs/CreatePunishmentDraftRequest.md +0 -29
- package/docs/PunishmentDraftResponse.md +0 -39
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# AdminPlayerDetailResponse
|
|
2
|
+
|
|
3
|
+
Full player detail including punishment history and all known usernames
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**id** | **number** | Internal player ID | [optional] [default to undefined]
|
|
10
|
+
**uuid** | **string** | Player Minecraft UUID | [optional] [default to undefined]
|
|
11
|
+
**username** | **string** | Most recently seen username | [optional] [default to undefined]
|
|
12
|
+
**firstJoin** | **boolean** | Whether this player still has first-join status | [optional] [default to undefined]
|
|
13
|
+
**firstLogin** | **string** | Timestamp of first connection (ISO-8601) | [optional] [default to undefined]
|
|
14
|
+
**lastUsedAt** | **string** | Timestamp of most recent connection (ISO-8601) | [optional] [default to undefined]
|
|
15
|
+
**punishmentPointsRaw** | **number** | Raw punishment score | [optional] [default to undefined]
|
|
16
|
+
**punishmentPointsPercent** | **number** | Punishment score as a percentage | [optional] [default to undefined]
|
|
17
|
+
**usernameHistory** | [**Array<AdminUsernameHistoryEntry>**](AdminUsernameHistoryEntry.md) | All usernames this player has used, newest first | [optional] [default to undefined]
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { AdminPlayerDetailResponse } from '@rebornteam/reborn-api';
|
|
23
|
+
|
|
24
|
+
const instance: AdminPlayerDetailResponse = {
|
|
25
|
+
id,
|
|
26
|
+
uuid,
|
|
27
|
+
username,
|
|
28
|
+
firstJoin,
|
|
29
|
+
firstLogin,
|
|
30
|
+
lastUsedAt,
|
|
31
|
+
punishmentPointsRaw,
|
|
32
|
+
punishmentPointsPercent,
|
|
33
|
+
usernameHistory,
|
|
34
|
+
};
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
[[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
|
+
# AdminPlayerSearchResult
|
|
2
|
+
|
|
3
|
+
Lightweight player reference used in search results and punishment evaluations
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**uuid** | **string** | Player Minecraft UUID | [optional] [default to undefined]
|
|
10
|
+
**username** | **string** | Most recently seen username, null if never recorded | [optional] [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { AdminPlayerSearchResult } from '@rebornteam/reborn-api';
|
|
16
|
+
|
|
17
|
+
const instance: AdminPlayerSearchResult = {
|
|
18
|
+
uuid,
|
|
19
|
+
username,
|
|
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)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# AdminPlayerSummary
|
|
2
|
+
|
|
3
|
+
Summary of a player record, used in list views
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**id** | **number** | Internal player ID | [optional] [default to undefined]
|
|
10
|
+
**uuid** | **string** | Player Minecraft UUID | [optional] [default to undefined]
|
|
11
|
+
**username** | **string** | Most recently seen username, null if never recorded | [optional] [default to undefined]
|
|
12
|
+
**firstJoin** | **boolean** | Whether this player still has first-join status | [optional] [default to undefined]
|
|
13
|
+
**firstLogin** | **string** | Timestamp of first connection (ISO-8601) | [optional] [default to undefined]
|
|
14
|
+
**lastUsedAt** | **string** | Timestamp of most recent connection (ISO-8601) | [optional] [default to undefined]
|
|
15
|
+
**punishmentPointsRaw** | **number** | Raw punishment score (sum of weighted punishment values) | [optional] [default to undefined]
|
|
16
|
+
**punishmentPointsPercent** | **number** | Punishment score as a percentage. Values above 100 indicate future punishments should be permanent. | [optional] [default to undefined]
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import { AdminPlayerSummary } from '@rebornteam/reborn-api';
|
|
22
|
+
|
|
23
|
+
const instance: AdminPlayerSummary = {
|
|
24
|
+
id,
|
|
25
|
+
uuid,
|
|
26
|
+
username,
|
|
27
|
+
firstJoin,
|
|
28
|
+
firstLogin,
|
|
29
|
+
lastUsedAt,
|
|
30
|
+
punishmentPointsRaw,
|
|
31
|
+
punishmentPointsPercent,
|
|
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,122 @@
|
|
|
1
|
+
# AdminPlayersApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.smsh.sh*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**getPlayer**](#getplayer) | **GET** /admin/player/{uuid} | Get player detail|
|
|
8
|
+
|[**listPlayers**](#listplayers) | **GET** /admin/player | List players|
|
|
9
|
+
|
|
10
|
+
# **getPlayer**
|
|
11
|
+
> AdminPlayerDetailResponse getPlayer()
|
|
12
|
+
|
|
13
|
+
Returns full detail for a single player including all known usernames and punishment scoring.
|
|
14
|
+
|
|
15
|
+
### Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import {
|
|
19
|
+
AdminPlayersApi,
|
|
20
|
+
Configuration
|
|
21
|
+
} from '@rebornteam/reborn-api';
|
|
22
|
+
|
|
23
|
+
const configuration = new Configuration();
|
|
24
|
+
const apiInstance = new AdminPlayersApi(configuration);
|
|
25
|
+
|
|
26
|
+
let uuid: string; //Player Minecraft UUID (default to undefined)
|
|
27
|
+
|
|
28
|
+
const { status, data } = await apiInstance.getPlayer(
|
|
29
|
+
uuid
|
|
30
|
+
);
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Parameters
|
|
34
|
+
|
|
35
|
+
|Name | Type | Description | Notes|
|
|
36
|
+
|------------- | ------------- | ------------- | -------------|
|
|
37
|
+
| **uuid** | [**string**] | Player Minecraft UUID | defaults to undefined|
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Return type
|
|
41
|
+
|
|
42
|
+
**AdminPlayerDetailResponse**
|
|
43
|
+
|
|
44
|
+
### Authorization
|
|
45
|
+
|
|
46
|
+
[DiscordAuth](../README.md#DiscordAuth)
|
|
47
|
+
|
|
48
|
+
### HTTP request headers
|
|
49
|
+
|
|
50
|
+
- **Content-Type**: Not defined
|
|
51
|
+
- **Accept**: application/json
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
### HTTP response details
|
|
55
|
+
| Status code | Description | Response headers |
|
|
56
|
+
|-------------|-------------|------------------|
|
|
57
|
+
|**200** | Player detail retrieved successfully | - |
|
|
58
|
+
|**404** | Player not found | - |
|
|
59
|
+
|**401** | Unauthorized | - |
|
|
60
|
+
|**403** | Forbidden - Administrator role required | - |
|
|
61
|
+
|
|
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
|
+
|
|
64
|
+
# **listPlayers**
|
|
65
|
+
> AdminPagedPlayerResponse listPlayers()
|
|
66
|
+
|
|
67
|
+
Returns up to 500 players ordered by most recently seen. Optionally filter by UUID or username substring.
|
|
68
|
+
|
|
69
|
+
### Example
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
import {
|
|
73
|
+
AdminPlayersApi,
|
|
74
|
+
Configuration
|
|
75
|
+
} from '@rebornteam/reborn-api';
|
|
76
|
+
|
|
77
|
+
const configuration = new Configuration();
|
|
78
|
+
const apiInstance = new AdminPlayersApi(configuration);
|
|
79
|
+
|
|
80
|
+
let page: number; //Page number (1-indexed) (default to 1)
|
|
81
|
+
let limit: number; //Page size (default to 50)
|
|
82
|
+
let search: string; //Optional search string matched against UUID or username (case-insensitive substring) (optional) (default to undefined)
|
|
83
|
+
|
|
84
|
+
const { status, data } = await apiInstance.listPlayers(
|
|
85
|
+
page,
|
|
86
|
+
limit,
|
|
87
|
+
search
|
|
88
|
+
);
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Parameters
|
|
92
|
+
|
|
93
|
+
|Name | Type | Description | Notes|
|
|
94
|
+
|------------- | ------------- | ------------- | -------------|
|
|
95
|
+
| **page** | [**number**] | Page number (1-indexed) | defaults to 1|
|
|
96
|
+
| **limit** | [**number**] | Page size | defaults to 50|
|
|
97
|
+
| **search** | [**string**] | Optional search string matched against UUID or username (case-insensitive substring) | (optional) defaults to undefined|
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
### Return type
|
|
101
|
+
|
|
102
|
+
**AdminPagedPlayerResponse**
|
|
103
|
+
|
|
104
|
+
### Authorization
|
|
105
|
+
|
|
106
|
+
[DiscordAuth](../README.md#DiscordAuth)
|
|
107
|
+
|
|
108
|
+
### HTTP request headers
|
|
109
|
+
|
|
110
|
+
- **Content-Type**: Not defined
|
|
111
|
+
- **Accept**: application/json
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
### HTTP response details
|
|
115
|
+
| Status code | Description | Response headers |
|
|
116
|
+
|-------------|-------------|------------------|
|
|
117
|
+
|**200** | Player list retrieved successfully | - |
|
|
118
|
+
|**401** | Unauthorized | - |
|
|
119
|
+
|**403** | Forbidden - Administrator role required | - |
|
|
120
|
+
|
|
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
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# AdminPunishmentDraftResponse
|
|
2
|
+
|
|
3
|
+
Batch punishment draft — one evaluation per target
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**evaluations** | [**Array<AdminPunishmentEvaluation>**](AdminPunishmentEvaluation.md) | Ordered list of evaluations, one per target in the request | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { AdminPunishmentDraftResponse } from '@rebornteam/reborn-api';
|
|
15
|
+
|
|
16
|
+
const instance: AdminPunishmentDraftResponse = {
|
|
17
|
+
evaluations,
|
|
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)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# AdminPunishmentEvaluation
|
|
2
|
+
|
|
3
|
+
Evaluation of a punishment\'s impact on a single target
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**target** | [**AdminPunishmentTarget**](AdminPunishmentTarget.md) | The target this evaluation applies to | [optional] [default to undefined]
|
|
10
|
+
**affectedPlayers** | [**Array<AdminPlayerSearchResult>**](AdminPlayerSearchResult.md) | Players affected — one player for UUID targets, all players on the IP for connection targets | [optional] [default to undefined]
|
|
11
|
+
**currentScore** | **number** | Current punishment score before applying this punishment (0–100+) | [optional] [default to undefined]
|
|
12
|
+
**pointsToAdd** | **number** | Points this punishment would add to the score | [optional] [default to undefined]
|
|
13
|
+
**newScore** | **number** | Projected score after applying this punishment | [optional] [default to undefined]
|
|
14
|
+
**willBePermanent** | **boolean** | Whether this punishment would be permanent based on the current score threshold | [optional] [default to undefined]
|
|
15
|
+
**durationSeconds** | **number** | Resolved duration in seconds — null if permanent or a WARNING | [optional] [default to undefined]
|
|
16
|
+
**previousPunishmentCount** | **number** | Number of existing punishments on this target | [optional] [default to undefined]
|
|
17
|
+
**isConnectionTarget** | **boolean** | True when the target is an IP address (connection punishment) rather than a player UUID | [optional] [default to undefined]
|
|
18
|
+
**effectiveType** | **string** | The effective punishment type that will be applied — may differ from the requested type if escalated to BAN at threshold | [optional] [default to undefined]
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import { AdminPunishmentEvaluation } from '@rebornteam/reborn-api';
|
|
24
|
+
|
|
25
|
+
const instance: AdminPunishmentEvaluation = {
|
|
26
|
+
target,
|
|
27
|
+
affectedPlayers,
|
|
28
|
+
currentScore,
|
|
29
|
+
pointsToAdd,
|
|
30
|
+
newScore,
|
|
31
|
+
willBePermanent,
|
|
32
|
+
durationSeconds,
|
|
33
|
+
previousPunishmentCount,
|
|
34
|
+
isConnectionTarget,
|
|
35
|
+
effectiveType,
|
|
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)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# AdminPunishmentListItem
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**id** | **number** | | [default to undefined]
|
|
9
|
+
**reason** | **string** | | [default to undefined]
|
|
10
|
+
**notes** | **string** | | [optional] [default to undefined]
|
|
11
|
+
**type** | **string** | | [default to undefined]
|
|
12
|
+
**severity** | **number** | | [default to undefined]
|
|
13
|
+
**createdBy** | **string** | | [default to undefined]
|
|
14
|
+
**expiresAt** | **string** | | [optional] [default to undefined]
|
|
15
|
+
**createdAt** | **string** | | [default to undefined]
|
|
16
|
+
**targetType** | **string** | | [default to undefined]
|
|
17
|
+
**targetUuid** | **string** | | [optional] [default to undefined]
|
|
18
|
+
**targetUsername** | **string** | | [optional] [default to undefined]
|
|
19
|
+
**targetIp** | **string** | | [optional] [default to undefined]
|
|
20
|
+
|
|
21
|
+
## Example
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import { AdminPunishmentListItem } from '@rebornteam/reborn-api';
|
|
25
|
+
|
|
26
|
+
const instance: AdminPunishmentListItem = {
|
|
27
|
+
id,
|
|
28
|
+
reason,
|
|
29
|
+
notes,
|
|
30
|
+
type,
|
|
31
|
+
severity,
|
|
32
|
+
createdBy,
|
|
33
|
+
expiresAt,
|
|
34
|
+
createdAt,
|
|
35
|
+
targetType,
|
|
36
|
+
targetUuid,
|
|
37
|
+
targetUsername,
|
|
38
|
+
targetIp,
|
|
39
|
+
};
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
[[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
|
+
# AdminPunishmentSearchResponse
|
|
2
|
+
|
|
3
|
+
Result of a punishment target search — either a list of matching players or a list of matching IP addresses
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**kind** | **string** | Search kind — \'player\' for UUID/username searches, \'ip\' for IP address searches | [optional] [default to undefined]
|
|
10
|
+
**players** | [**Array<AdminPlayerSearchResult>**](AdminPlayerSearchResult.md) | Matching players — only populated when kind=\'player\' | [optional] [default to undefined]
|
|
11
|
+
**ipResults** | [**Array<AdminIpSearchResult>**](AdminIpSearchResult.md) | Matching IP addresses with their associated players — only populated when kind=\'ip\' | [optional] [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { AdminPunishmentSearchResponse } from '@rebornteam/reborn-api';
|
|
17
|
+
|
|
18
|
+
const instance: AdminPunishmentSearchResponse = {
|
|
19
|
+
kind,
|
|
20
|
+
players,
|
|
21
|
+
ipResults,
|
|
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,23 @@
|
|
|
1
|
+
# AdminPunishmentTarget
|
|
2
|
+
|
|
3
|
+
A target for a punishment — either a player UUID or an IP address (mutually exclusive)
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**uuid** | **string** | Player Minecraft UUID | [optional] [default to undefined]
|
|
10
|
+
**ipAddress** | **string** | IP address — when specified, the punishment is linked to the connection record and all players on that IP are shown as affected | [optional] [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { AdminPunishmentTarget } from '@rebornteam/reborn-api';
|
|
16
|
+
|
|
17
|
+
const instance: AdminPunishmentTarget = {
|
|
18
|
+
uuid,
|
|
19
|
+
ipAddress,
|
|
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)
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
# AdminPunishmentsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.smsh.sh*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**applyPunishment**](#applypunishment) | **POST** /admin/punishment/apply | Apply punishment|
|
|
8
|
+
|[**createDraft**](#createdraft) | **POST** /admin/punishment/draft | Evaluate punishment impact|
|
|
9
|
+
|[**getPunishments**](#getpunishments) | **GET** /admin/punishment | List punishments|
|
|
10
|
+
|[**searchTargets**](#searchtargets) | **GET** /admin/punishment/search | Search punishment targets|
|
|
11
|
+
|
|
12
|
+
# **applyPunishment**
|
|
13
|
+
> AdminApplyPunishmentResponse applyPunishment(adminApplyPunishmentRequest)
|
|
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.
|
|
16
|
+
|
|
17
|
+
### Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import {
|
|
21
|
+
AdminPunishmentsApi,
|
|
22
|
+
Configuration,
|
|
23
|
+
AdminApplyPunishmentRequest
|
|
24
|
+
} from '@rebornteam/reborn-api';
|
|
25
|
+
|
|
26
|
+
const configuration = new Configuration();
|
|
27
|
+
const apiInstance = new AdminPunishmentsApi(configuration);
|
|
28
|
+
|
|
29
|
+
let adminApplyPunishmentRequest: AdminApplyPunishmentRequest; //
|
|
30
|
+
|
|
31
|
+
const { status, data } = await apiInstance.applyPunishment(
|
|
32
|
+
adminApplyPunishmentRequest
|
|
33
|
+
);
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Parameters
|
|
37
|
+
|
|
38
|
+
|Name | Type | Description | Notes|
|
|
39
|
+
|------------- | ------------- | ------------- | -------------|
|
|
40
|
+
| **adminApplyPunishmentRequest** | **AdminApplyPunishmentRequest**| | |
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Return type
|
|
44
|
+
|
|
45
|
+
**AdminApplyPunishmentResponse**
|
|
46
|
+
|
|
47
|
+
### Authorization
|
|
48
|
+
|
|
49
|
+
[DiscordAuth](../README.md#DiscordAuth)
|
|
50
|
+
|
|
51
|
+
### HTTP request headers
|
|
52
|
+
|
|
53
|
+
- **Content-Type**: application/json
|
|
54
|
+
- **Accept**: application/json
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### HTTP response details
|
|
58
|
+
| Status code | Description | Response headers |
|
|
59
|
+
|-------------|-------------|------------------|
|
|
60
|
+
|**200** | Punishments applied successfully | - |
|
|
61
|
+
|**400** | Invalid request | - |
|
|
62
|
+
|**401** | Unauthorized | - |
|
|
63
|
+
|**403** | Forbidden - Administrator role required | - |
|
|
64
|
+
|
|
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
|
+
|
|
67
|
+
# **createDraft**
|
|
68
|
+
> AdminPunishmentDraftResponse createDraft(adminCreatePunishmentDraftRequest)
|
|
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.
|
|
71
|
+
|
|
72
|
+
### Example
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
import {
|
|
76
|
+
AdminPunishmentsApi,
|
|
77
|
+
Configuration,
|
|
78
|
+
AdminCreatePunishmentDraftRequest
|
|
79
|
+
} from '@rebornteam/reborn-api';
|
|
80
|
+
|
|
81
|
+
const configuration = new Configuration();
|
|
82
|
+
const apiInstance = new AdminPunishmentsApi(configuration);
|
|
83
|
+
|
|
84
|
+
let adminCreatePunishmentDraftRequest: AdminCreatePunishmentDraftRequest; //
|
|
85
|
+
|
|
86
|
+
const { status, data } = await apiInstance.createDraft(
|
|
87
|
+
adminCreatePunishmentDraftRequest
|
|
88
|
+
);
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Parameters
|
|
92
|
+
|
|
93
|
+
|Name | Type | Description | Notes|
|
|
94
|
+
|------------- | ------------- | ------------- | -------------|
|
|
95
|
+
| **adminCreatePunishmentDraftRequest** | **AdminCreatePunishmentDraftRequest**| | |
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
### Return type
|
|
99
|
+
|
|
100
|
+
**AdminPunishmentDraftResponse**
|
|
101
|
+
|
|
102
|
+
### Authorization
|
|
103
|
+
|
|
104
|
+
[DiscordAuth](../README.md#DiscordAuth)
|
|
105
|
+
|
|
106
|
+
### HTTP request headers
|
|
107
|
+
|
|
108
|
+
- **Content-Type**: application/json
|
|
109
|
+
- **Accept**: application/json
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
### HTTP response details
|
|
113
|
+
| Status code | Description | Response headers |
|
|
114
|
+
|-------------|-------------|------------------|
|
|
115
|
+
|**200** | Evaluation results | - |
|
|
116
|
+
|**400** | Invalid request | - |
|
|
117
|
+
|**401** | Unauthorized | - |
|
|
118
|
+
|**403** | Forbidden - Administrator role required | - |
|
|
119
|
+
|
|
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
|
+
|
|
122
|
+
# **getPunishments**
|
|
123
|
+
> AdminPagedPunishmentResponse getPunishments()
|
|
124
|
+
|
|
125
|
+
Returns a paginated list of punishments with optional filtering by player UUID, username, IP address, type, and date range.
|
|
126
|
+
|
|
127
|
+
### Example
|
|
128
|
+
|
|
129
|
+
```typescript
|
|
130
|
+
import {
|
|
131
|
+
AdminPunishmentsApi,
|
|
132
|
+
Configuration
|
|
133
|
+
} from '@rebornteam/reborn-api';
|
|
134
|
+
|
|
135
|
+
const configuration = new Configuration();
|
|
136
|
+
const apiInstance = new AdminPunishmentsApi(configuration);
|
|
137
|
+
|
|
138
|
+
let page: number; //Page number (1-indexed) (default to 1)
|
|
139
|
+
let limit: number; //Page size (default to 50)
|
|
140
|
+
let uuid: string; //Filter by player UUID (optional) (default to undefined)
|
|
141
|
+
let username: string; //Filter by player username (case-insensitive substring match) (optional) (default to undefined)
|
|
142
|
+
let ipAddress: string; //Filter by IP address (optional) (default to undefined)
|
|
143
|
+
let type: Array<string>; //Filter by punishment type (BAN, MUTE, WARNING). Repeatable. (optional) (default to undefined)
|
|
144
|
+
let issuedAfter: number; //Filter punishments issued after this epoch timestamp (ms) (optional) (default to undefined)
|
|
145
|
+
let issuedBefore: number; //Filter punishments issued before this epoch timestamp (ms) (optional) (default to undefined)
|
|
146
|
+
|
|
147
|
+
const { status, data } = await apiInstance.getPunishments(
|
|
148
|
+
page,
|
|
149
|
+
limit,
|
|
150
|
+
uuid,
|
|
151
|
+
username,
|
|
152
|
+
ipAddress,
|
|
153
|
+
type,
|
|
154
|
+
issuedAfter,
|
|
155
|
+
issuedBefore
|
|
156
|
+
);
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Parameters
|
|
160
|
+
|
|
161
|
+
|Name | Type | Description | Notes|
|
|
162
|
+
|------------- | ------------- | ------------- | -------------|
|
|
163
|
+
| **page** | [**number**] | Page number (1-indexed) | defaults to 1|
|
|
164
|
+
| **limit** | [**number**] | Page size | defaults to 50|
|
|
165
|
+
| **uuid** | [**string**] | Filter by player UUID | (optional) defaults to undefined|
|
|
166
|
+
| **username** | [**string**] | Filter by player username (case-insensitive substring match) | (optional) defaults to undefined|
|
|
167
|
+
| **ipAddress** | [**string**] | Filter by IP address | (optional) defaults to undefined|
|
|
168
|
+
| **type** | **Array<string>** | Filter by punishment type (BAN, MUTE, WARNING). Repeatable. | (optional) defaults to undefined|
|
|
169
|
+
| **issuedAfter** | [**number**] | Filter punishments issued after this epoch timestamp (ms) | (optional) defaults to undefined|
|
|
170
|
+
| **issuedBefore** | [**number**] | Filter punishments issued before this epoch timestamp (ms) | (optional) defaults to undefined|
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
### Return type
|
|
174
|
+
|
|
175
|
+
**AdminPagedPunishmentResponse**
|
|
176
|
+
|
|
177
|
+
### Authorization
|
|
178
|
+
|
|
179
|
+
[DiscordAuth](../README.md#DiscordAuth)
|
|
180
|
+
|
|
181
|
+
### HTTP request headers
|
|
182
|
+
|
|
183
|
+
- **Content-Type**: Not defined
|
|
184
|
+
- **Accept**: application/json
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
### HTTP response details
|
|
188
|
+
| Status code | Description | Response headers |
|
|
189
|
+
|-------------|-------------|------------------|
|
|
190
|
+
|**200** | Punishment list retrieved successfully | - |
|
|
191
|
+
|**401** | Unauthorized | - |
|
|
192
|
+
|**403** | Forbidden - Administrator role required | - |
|
|
193
|
+
|
|
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
|
+
|
|
196
|
+
# **searchTargets**
|
|
197
|
+
> AdminPunishmentSearchResponse searchTargets()
|
|
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.
|
|
200
|
+
|
|
201
|
+
### Example
|
|
202
|
+
|
|
203
|
+
```typescript
|
|
204
|
+
import {
|
|
205
|
+
AdminPunishmentsApi,
|
|
206
|
+
Configuration
|
|
207
|
+
} from '@rebornteam/reborn-api';
|
|
208
|
+
|
|
209
|
+
const configuration = new Configuration();
|
|
210
|
+
const apiInstance = new AdminPunishmentsApi(configuration);
|
|
211
|
+
|
|
212
|
+
let q: string; //UUID, username, or partial/full IP address to search for (default to undefined)
|
|
213
|
+
|
|
214
|
+
const { status, data } = await apiInstance.searchTargets(
|
|
215
|
+
q
|
|
216
|
+
);
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### Parameters
|
|
220
|
+
|
|
221
|
+
|Name | Type | Description | Notes|
|
|
222
|
+
|------------- | ------------- | ------------- | -------------|
|
|
223
|
+
| **q** | [**string**] | UUID, username, or partial/full IP address to search for | defaults to undefined|
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
### Return type
|
|
227
|
+
|
|
228
|
+
**AdminPunishmentSearchResponse**
|
|
229
|
+
|
|
230
|
+
### Authorization
|
|
231
|
+
|
|
232
|
+
[DiscordAuth](../README.md#DiscordAuth)
|
|
233
|
+
|
|
234
|
+
### HTTP request headers
|
|
235
|
+
|
|
236
|
+
- **Content-Type**: Not defined
|
|
237
|
+
- **Accept**: application/json
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
### HTTP response details
|
|
241
|
+
| Status code | Description | Response headers |
|
|
242
|
+
|-------------|-------------|------------------|
|
|
243
|
+
|**200** | Search results | - |
|
|
244
|
+
|**401** | Unauthorized | - |
|
|
245
|
+
|**403** | Forbidden - Administrator role required | - |
|
|
246
|
+
|
|
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
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# AdminUsernameHistoryEntry
|
|
2
|
+
|
|
3
|
+
A single entry in a player\'s username history
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**username** | **string** | The username at this point in time | [optional] [default to undefined]
|
|
10
|
+
**changedAt** | **string** | When this username was first observed (ISO-8601) | [optional] [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { AdminUsernameHistoryEntry } from '@rebornteam/reborn-api';
|
|
16
|
+
|
|
17
|
+
const instance: AdminUsernameHistoryEntry = {
|
|
18
|
+
username,
|
|
19
|
+
changedAt,
|
|
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)
|
|
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
|
|
|
8
8
|
------------ | ------------- | ------------- | -------------
|
|
9
9
|
**name** | **string** | Human-readable name for the client | [default to undefined]
|
|
10
10
|
**description** | **string** | Optional description of the client\'s purpose | [optional] [default to undefined]
|
|
11
|
+
**expiresAt** | **string** | Optional expiration timestamp (ISO-8601). Null means the credential never expires. | [optional] [default to undefined]
|
|
11
12
|
|
|
12
13
|
## Example
|
|
13
14
|
|
|
@@ -17,6 +18,7 @@ import { ClientCredentialRequest } from '@rebornteam/reborn-api';
|
|
|
17
18
|
const instance: ClientCredentialRequest = {
|
|
18
19
|
name,
|
|
19
20
|
description,
|
|
21
|
+
expiresAt,
|
|
20
22
|
};
|
|
21
23
|
```
|
|
22
24
|
|