@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.
- package/.openapi-generator/FILES +19 -5
- package/README.md +33 -11
- package/api.ts +1572 -588
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +776 -248
- package/dist/api.js +1264 -467
- 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 +776 -248
- package/dist/esm/api.js +1243 -454
- 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/AdminApplyPunishmentRequest.md +33 -0
- package/docs/AdminApplyPunishmentResponse.md +21 -0
- package/docs/AdminApplyPunishmentResult.md +33 -0
- package/docs/AdminCreatePunishmentDraftRequest.md +31 -0
- package/docs/AdminIpSearchResult.md +23 -0
- package/docs/AdminPagedPunishmentResponse.md +1 -1
- package/docs/AdminPlayerSearchResult.md +23 -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 +168 -2
- package/docs/AuthenticationApi.md +167 -0
- package/docs/ChatApi.md +121 -0
- package/docs/ChatMessageDTO.md +30 -0
- package/docs/ChatMessageRequest.md +26 -0
- package/docs/PlayerApi.md +56 -3
- package/docs/PunishmentApi.md +0 -106
- package/docs/PunishmentGetPunishmentResponse.md +5 -3
- package/docs/ServerRegisterRequest.md +24 -0
- package/docs/ServerSessionDTO.md +36 -0
- package/docs/ServerSessionsApi.md +261 -0
- package/docs/TokenRequest.md +24 -0
- package/index.ts +1 -1
- package/package.json +1 -1
- package/docs/ApplyPunishmentRequest.md +0 -31
- package/docs/ApplyPunishmentResponse.md +0 -33
- package/docs/CreatePunishmentDraftRequest.md +0 -29
- package/docs/DefaultApi.md +0 -105
- package/docs/PunishmentDraftResponse.md +0 -39
package/dist/esm/base.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Reborn API
|
|
3
3
|
* 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
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 2.
|
|
5
|
+
* The version of the OpenAPI document: 2.7.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/esm/base.js
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.
|
|
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/dist/esm/common.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Reborn API
|
|
3
3
|
* 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
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 2.
|
|
5
|
+
* The version of the OpenAPI document: 2.7.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/esm/common.js
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.
|
|
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).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Reborn API
|
|
3
3
|
* 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
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 2.
|
|
5
|
+
* The version of the OpenAPI document: 2.7.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -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.
|
|
6
|
+
* The version of the OpenAPI document: 2.7.0
|
|
7
7
|
*
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Reborn API
|
|
3
3
|
* 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
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 2.
|
|
5
|
+
* The version of the OpenAPI document: 2.7.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/esm/index.js
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.
|
|
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/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Reborn API
|
|
3
3
|
* 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
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 2.
|
|
5
|
+
* The version of the OpenAPI document: 2.7.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Reborn API
|
|
6
6
|
* 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
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 2.
|
|
8
|
+
* The version of the OpenAPI document: 2.7.0
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# AdminApplyPunishmentRequest
|
|
2
|
+
|
|
3
|
+
Request to apply a punishment to one or more targets
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**targets** | [**Array<AdminPunishmentTarget>**](AdminPunishmentTarget.md) | List of targets to punish — each must have either a uuid or ipAddress | [default to undefined]
|
|
10
|
+
**type** | **string** | Punishment type | [default to undefined]
|
|
11
|
+
**severity** | **number** | Severity level: 1=Minor, 2=Moderate, 3=Severe, 4=Critical | [optional] [default to undefined]
|
|
12
|
+
**reason** | **string** | Reason for the punishment | [default to undefined]
|
|
13
|
+
**durationSeconds** | **number** | Custom duration in seconds — if omitted the suggested duration for the type and severity is used | [optional] [default to undefined]
|
|
14
|
+
**forcePermanent** | **boolean** | Force the punishment to be permanent regardless of the target\'s current score | [optional] [default to false]
|
|
15
|
+
**notes** | **string** | Internal notes visible only to administrators — not shown to the punished player | [optional] [default to undefined]
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { AdminApplyPunishmentRequest } from '@rebornteam/reborn-api';
|
|
21
|
+
|
|
22
|
+
const instance: AdminApplyPunishmentRequest = {
|
|
23
|
+
targets,
|
|
24
|
+
type,
|
|
25
|
+
severity,
|
|
26
|
+
reason,
|
|
27
|
+
durationSeconds,
|
|
28
|
+
forcePermanent,
|
|
29
|
+
notes,
|
|
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)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# AdminApplyPunishmentResponse
|
|
2
|
+
|
|
3
|
+
Batch punishment apply result — one result per target
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**results** | [**Array<AdminApplyPunishmentResult>**](AdminApplyPunishmentResult.md) | Ordered list of results, one per target in the request | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { AdminApplyPunishmentResponse } from '@rebornteam/reborn-api';
|
|
15
|
+
|
|
16
|
+
const instance: AdminApplyPunishmentResponse = {
|
|
17
|
+
results,
|
|
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,33 @@
|
|
|
1
|
+
# AdminApplyPunishmentResult
|
|
2
|
+
|
|
3
|
+
Result of applying a punishment to a single target
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**target** | [**AdminPunishmentTarget**](AdminPunishmentTarget.md) | The target this result applies to | [optional] [default to undefined]
|
|
10
|
+
**punishmentId** | **number** | ID of the created punishment record | [optional] [default to undefined]
|
|
11
|
+
**type** | **string** | Punishment type applied | [optional] [default to undefined]
|
|
12
|
+
**severity** | **number** | Severity level applied | [optional] [default to undefined]
|
|
13
|
+
**newScore** | **number** | Updated punishment score after applying | [optional] [default to undefined]
|
|
14
|
+
**isPermanent** | **boolean** | Whether the punishment was made permanent | [optional] [default to undefined]
|
|
15
|
+
**expiresAt** | **string** | When the punishment expires — null if permanent or a WARNING | [optional] [default to undefined]
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { AdminApplyPunishmentResult } from '@rebornteam/reborn-api';
|
|
21
|
+
|
|
22
|
+
const instance: AdminApplyPunishmentResult = {
|
|
23
|
+
target,
|
|
24
|
+
punishmentId,
|
|
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)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# AdminCreatePunishmentDraftRequest
|
|
2
|
+
|
|
3
|
+
Request to evaluate the impact of a punishment across one or more targets before applying
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**targets** | [**Array<AdminPunishmentTarget>**](AdminPunishmentTarget.md) | List of targets to evaluate — each must have either a uuid or ipAddress | [default to undefined]
|
|
10
|
+
**type** | **string** | Punishment type | [default to undefined]
|
|
11
|
+
**severity** | **number** | Severity level: 1=Minor, 2=Moderate, 3=Severe, 4=Critical | [optional] [default to undefined]
|
|
12
|
+
**reason** | **string** | Reason for the punishment (not used in evaluation, required for apply) | [default to undefined]
|
|
13
|
+
**durationSeconds** | **number** | Custom duration in seconds — if omitted the suggested duration for the type and severity is used | [optional] [default to undefined]
|
|
14
|
+
**forcePermanent** | **boolean** | Force the punishment to be permanent regardless of the target\'s current score | [optional] [default to false]
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import { AdminCreatePunishmentDraftRequest } from '@rebornteam/reborn-api';
|
|
20
|
+
|
|
21
|
+
const instance: AdminCreatePunishmentDraftRequest = {
|
|
22
|
+
targets,
|
|
23
|
+
type,
|
|
24
|
+
severity,
|
|
25
|
+
reason,
|
|
26
|
+
durationSeconds,
|
|
27
|
+
forcePermanent,
|
|
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)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# AdminIpSearchResult
|
|
2
|
+
|
|
3
|
+
A single IP address match in a punishment search, with all players ever seen on that IP
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**ipAddress** | **string** | IP address | [optional] [default to undefined]
|
|
10
|
+
**players** | [**Array<AdminPlayerSearchResult>**](AdminPlayerSearchResult.md) | Players ever seen on this IP | [optional] [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { AdminIpSearchResult } from '@rebornteam/reborn-api';
|
|
16
|
+
|
|
17
|
+
const instance: AdminIpSearchResult = {
|
|
18
|
+
ipAddress,
|
|
19
|
+
players,
|
|
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)
|
|
@@ -6,7 +6,7 @@ Paginated punishment list response
|
|
|
6
6
|
|
|
7
7
|
Name | Type | Description | Notes
|
|
8
8
|
------------ | ------------- | ------------- | -------------
|
|
9
|
-
**data** | [**Array<
|
|
9
|
+
**data** | [**Array<AdminPunishmentListItem>**](AdminPunishmentListItem.md) | Punishments on the current page | [optional] [default to undefined]
|
|
10
10
|
**total** | **number** | Total number of punishments matching the filters | [optional] [default to undefined]
|
|
11
11
|
**page** | **number** | Current page (1-indexed) | [optional] [default to undefined]
|
|
12
12
|
**limit** | **number** | Page size | [optional] [default to undefined]
|
|
@@ -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,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)
|
|
@@ -4,7 +4,120 @@ All URIs are relative to *https://api.smsh.sh*
|
|
|
4
4
|
|
|
5
5
|
|Method | HTTP request | Description|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
+
|[**applyPunishment**](#applypunishment) | **POST** /admin/punishment/apply | Apply punishment|
|
|
8
|
+
|[**createDraft**](#createdraft) | **POST** /admin/punishment/draft | Evaluate punishment impact|
|
|
7
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)
|
|
8
121
|
|
|
9
122
|
# **getPunishments**
|
|
10
123
|
> AdminPagedPunishmentResponse getPunishments()
|
|
@@ -27,7 +140,7 @@ let limit: number; //Page size (default to 50)
|
|
|
27
140
|
let uuid: string; //Filter by player UUID (optional) (default to undefined)
|
|
28
141
|
let username: string; //Filter by player username (case-insensitive substring match) (optional) (default to undefined)
|
|
29
142
|
let ipAddress: string; //Filter by IP address (optional) (default to undefined)
|
|
30
|
-
let type: Array<string>; //Filter by punishment type (BAN, MUTE,
|
|
143
|
+
let type: Array<string>; //Filter by punishment type (BAN, MUTE, WARNING). Repeatable. (optional) (default to undefined)
|
|
31
144
|
let issuedAfter: number; //Filter punishments issued after this epoch timestamp (ms) (optional) (default to undefined)
|
|
32
145
|
let issuedBefore: number; //Filter punishments issued before this epoch timestamp (ms) (optional) (default to undefined)
|
|
33
146
|
|
|
@@ -52,7 +165,7 @@ const { status, data } = await apiInstance.getPunishments(
|
|
|
52
165
|
| **uuid** | [**string**] | Filter by player UUID | (optional) defaults to undefined|
|
|
53
166
|
| **username** | [**string**] | Filter by player username (case-insensitive substring match) | (optional) defaults to undefined|
|
|
54
167
|
| **ipAddress** | [**string**] | Filter by IP address | (optional) defaults to undefined|
|
|
55
|
-
| **type** | **Array<string>** | Filter by punishment type (BAN, MUTE,
|
|
168
|
+
| **type** | **Array<string>** | Filter by punishment type (BAN, MUTE, WARNING). Repeatable. | (optional) defaults to undefined|
|
|
56
169
|
| **issuedAfter** | [**number**] | Filter punishments issued after this epoch timestamp (ms) | (optional) defaults to undefined|
|
|
57
170
|
| **issuedBefore** | [**number**] | Filter punishments issued before this epoch timestamp (ms) | (optional) defaults to undefined|
|
|
58
171
|
|
|
@@ -80,3 +193,56 @@ const { status, data } = await apiInstance.getPunishments(
|
|
|
80
193
|
|
|
81
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)
|
|
82
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
|
+
|