@rebornteam/reborn-api 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/.gitkeep +0 -0
  2. package/.openapi-generator/FILES +36 -0
  3. package/.openapi-generator/VERSION +1 -0
  4. package/.openapi-generator-ignore +23 -0
  5. package/README.md +104 -0
  6. package/api.ts +2037 -0
  7. package/base.ts +62 -0
  8. package/common.ts +127 -0
  9. package/configuration.ts +121 -0
  10. package/dist/api.d.ts +1144 -0
  11. package/dist/api.js +1594 -0
  12. package/dist/base.d.ts +42 -0
  13. package/dist/base.js +46 -0
  14. package/dist/common.d.ts +34 -0
  15. package/dist/common.js +139 -0
  16. package/dist/configuration.d.ts +98 -0
  17. package/dist/configuration.js +44 -0
  18. package/dist/esm/api.d.ts +1144 -0
  19. package/dist/esm/api.js +1567 -0
  20. package/dist/esm/base.d.ts +42 -0
  21. package/dist/esm/base.js +41 -0
  22. package/dist/esm/common.d.ts +34 -0
  23. package/dist/esm/common.js +126 -0
  24. package/dist/esm/configuration.d.ts +98 -0
  25. package/dist/esm/configuration.js +40 -0
  26. package/dist/esm/index.d.ts +13 -0
  27. package/dist/esm/index.js +15 -0
  28. package/dist/index.d.ts +13 -0
  29. package/dist/index.js +31 -0
  30. package/docs/AdminClientCredentialResponse.md +33 -0
  31. package/docs/AdminClientCredentialsApi.md +390 -0
  32. package/docs/AdminConnectionBypassResponse.md +27 -0
  33. package/docs/AdminConnectionsApi.md +135 -0
  34. package/docs/AdminDashboardApi.md +54 -0
  35. package/docs/AdminDashboardConnectionResponse.md +38 -0
  36. package/docs/AdminGetDashboardStats.md +24 -0
  37. package/docs/ApplyPunishmentRequest.md +31 -0
  38. package/docs/ApplyPunishmentResponse.md +33 -0
  39. package/docs/ClientCredentialRequest.md +23 -0
  40. package/docs/ConnectionApi.md +69 -0
  41. package/docs/ConnectionGetConnectionDetailsResponse.md +35 -0
  42. package/docs/CreateBypassRequest.md +23 -0
  43. package/docs/CreatePunishmentDraftRequest.md +29 -0
  44. package/docs/PlayerApi.md +62 -0
  45. package/docs/PlayerGetPlayerInformation.md +27 -0
  46. package/docs/PunishmentApi.md +347 -0
  47. package/docs/PunishmentDraftResponse.md +39 -0
  48. package/docs/PunishmentGetPunishmentResponse.md +33 -0
  49. package/docs/PunishmentSeveritiesResponse.md +21 -0
  50. package/docs/PunishmentSeveritiesResponsePunishmentTypeInfo.md +23 -0
  51. package/docs/PunishmentSeveritiesResponseSeverityInfo.md +23 -0
  52. package/docs/UpdateClientRequest.md +23 -0
  53. package/git_push.sh +57 -0
  54. package/index.ts +18 -0
  55. package/package.json +33 -0
  56. package/tsconfig.esm.json +7 -0
  57. package/tsconfig.json +18 -0
@@ -0,0 +1,33 @@
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)
@@ -0,0 +1,23 @@
1
+ # ClientCredentialRequest
2
+
3
+ Request to create new client credentials
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **name** | **string** | Human-readable name for the client | [default to undefined]
10
+ **description** | **string** | Optional description of the client\'s purpose | [optional] [default to undefined]
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import { ClientCredentialRequest } from '@rebornteam/reborn-api';
16
+
17
+ const instance: ClientCredentialRequest = {
18
+ name,
19
+ description,
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,69 @@
1
+ # ConnectionApi
2
+
3
+ All URIs are relative to *https://api.smsh.sh*
4
+
5
+ |Method | HTTP request | Description|
6
+ |------------- | ------------- | -------------|
7
+ |[**getConnectionDetails**](#getconnectiondetails) | **GET** /v1/connection/get-connection-details/{ip} | Check Connection and Detect VPN/Proxy|
8
+
9
+ # **getConnectionDetails**
10
+ > ConnectionGetConnectionDetailsResponse getConnectionDetails()
11
+
12
+ Performs comprehensive analysis of an IPv4 address to detect VPN, proxy, or suspicious connections. **Features:** - Multi-provider VPN/proxy detection with aggregated confidence scoring - Approximate geolocation lookup (city and country) - Connection bypass status and expiration tracking - Optional player UUID association for connection history **Use Cases:** - Prevent VPN/proxy usage during player authentication - Track player connection history across sessions - Implement temporary bypass systems for false positives - Monitor suspicious connection patterns **Query Parameters:** - `force_recheck`: Bypass cache and re-run all detection services - `associate_uuid`: Link this IP to a player UUID and return player info **Caching:** Results are cached unless `force_recheck=true` is specified, reducing API costs and improving response times.
13
+
14
+ ### Example
15
+
16
+ ```typescript
17
+ import {
18
+ ConnectionApi,
19
+ Configuration
20
+ } from '@rebornteam/reborn-api';
21
+
22
+ const configuration = new Configuration();
23
+ const apiInstance = new ConnectionApi(configuration);
24
+
25
+ let ip: string; //IPv4 address to analyze for VPN/proxy detection and geolocation (default to undefined)
26
+ let forceRecheck: boolean; //When true, bypasses cached results and re-runs all VPN detection services. Use this when you need the most up-to-date analysis or suspect cached data may be stale. Default: false (default to false)
27
+ let associateUuid: string; //Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\'s history - Update the player\'s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\'t block the response. (optional) (default to undefined)
28
+
29
+ const { status, data } = await apiInstance.getConnectionDetails(
30
+ ip,
31
+ forceRecheck,
32
+ associateUuid
33
+ );
34
+ ```
35
+
36
+ ### Parameters
37
+
38
+ |Name | Type | Description | Notes|
39
+ |------------- | ------------- | ------------- | -------------|
40
+ | **ip** | [**string**] | IPv4 address to analyze for VPN/proxy detection and geolocation | defaults to undefined|
41
+ | **forceRecheck** | [**boolean**] | When true, bypasses cached results and re-runs all VPN detection services. Use this when you need the most up-to-date analysis or suspect cached data may be stale. Default: false | defaults to false|
42
+ | **associateUuid** | [**string**] | Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\'s history - Update the player\'s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\'t block the response. | (optional) defaults to undefined|
43
+
44
+
45
+ ### Return type
46
+
47
+ **ConnectionGetConnectionDetailsResponse**
48
+
49
+ ### Authorization
50
+
51
+ [CognitoAuth](../README.md#CognitoAuth)
52
+
53
+ ### HTTP request headers
54
+
55
+ - **Content-Type**: Not defined
56
+ - **Accept**: application/json
57
+
58
+
59
+ ### HTTP response details
60
+ | Status code | Description | Response headers |
61
+ |-------------|-------------|------------------|
62
+ |**200** | Connection analysis completed successfully | - |
63
+ |**400** | Bad Request - Invalid IP address format or malformed UUID | - |
64
+ |**401** | Unauthorized - Invalid or missing authentication token | - |
65
+ |**403** | Forbidden - Insufficient permissions | - |
66
+ |**429** | Too Many Requests - Rate limit exceeded | - |
67
+
68
+ [[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)
69
+
@@ -0,0 +1,35 @@
1
+ # ConnectionGetConnectionDetailsResponse
2
+
3
+ Comprehensive connection analysis response including VPN detection, geolocation, bypass status, and optional player information
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **ipAddress** | **string** | The analyzed IPv4 address | [optional] [default to undefined]
10
+ **approximateLocation** | **string** | Approximate geographic location of the IP address, typically in \'City, Country\' format. Returns \'Local, N/A\' for localhost or private IPs. | [optional] [default to undefined]
11
+ **percentPositive** | **number** | Confidence score representing the percentage of VPN detection services that flagged this IP as suspicious. Range: 0.0 (clean) to 100.0 (definitely VPN/proxy). Values above 50.0 suggest high probability of VPN usage. | [optional] [default to undefined]
12
+ **numberOfChecks** | **number** | Total number of VPN detection services successfully queried during the last check. Higher numbers indicate more comprehensive analysis. | [optional] [default to undefined]
13
+ **bypassed** | **boolean** | | [optional] [default to undefined]
14
+ **bypassedUntil** | **string** | Expiration timestamp for the bypass (ISO-8601 format). After this time, normal VPN detection rules will apply again. Null if not bypassed or bypass is permanent. | [optional] [default to undefined]
15
+ **playerInformation** | [**PlayerGetPlayerInformation**](PlayerGetPlayerInformation.md) | Player information associated with this connection. Only populated when \'associate_uuid\' query parameter is provided. Contains first join status and login history. | [optional] [default to undefined]
16
+ **punishments** | [**Array<PunishmentGetPunishmentResponse>**](PunishmentGetPunishmentResponse.md) | Combined list of active punishments for both the IP address and player UUID (if provided). Only includes non-expired punishments. | [optional] [default to undefined]
17
+
18
+ ## Example
19
+
20
+ ```typescript
21
+ import { ConnectionGetConnectionDetailsResponse } from '@rebornteam/reborn-api';
22
+
23
+ const instance: ConnectionGetConnectionDetailsResponse = {
24
+ ipAddress,
25
+ approximateLocation,
26
+ percentPositive,
27
+ numberOfChecks,
28
+ bypassed,
29
+ bypassedUntil,
30
+ playerInformation,
31
+ punishments,
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,23 @@
1
+ # CreateBypassRequest
2
+
3
+ Request to create a connection bypass
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **ipAddress** | **string** | IP address to bypass | [default to undefined]
10
+ **expiresAtEpoch** | **number** | Unix epoch timestamp (seconds) when the bypass should expire | [default to undefined]
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import { CreateBypassRequest } from '@rebornteam/reborn-api';
16
+
17
+ const instance: CreateBypassRequest = {
18
+ ipAddress,
19
+ expiresAtEpoch,
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,29 @@
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)
@@ -0,0 +1,62 @@
1
+ # PlayerApi
2
+
3
+ All URIs are relative to *https://api.smsh.sh*
4
+
5
+ |Method | HTTP request | Description|
6
+ |------------- | ------------- | -------------|
7
+ |[**getPlayer**](#getplayer) | **GET** /v1/player/{uuid} | Get Player Information|
8
+
9
+ # **getPlayer**
10
+ > PlayerGetPlayerInformation getPlayer()
11
+
12
+ Retrieves player information by their Minecraft UUID. Returns whether this is the player\'s first join and their first login timestamp. This endpoint is useful for tracking player join history and implementing first-join rewards or tutorials.
13
+
14
+ ### Example
15
+
16
+ ```typescript
17
+ import {
18
+ PlayerApi,
19
+ Configuration
20
+ } from '@rebornteam/reborn-api';
21
+
22
+ const configuration = new Configuration();
23
+ const apiInstance = new PlayerApi(configuration);
24
+
25
+ let uuid: string; //The Minecraft player UUID (with or without dashes) (default to undefined)
26
+
27
+ const { status, data } = await apiInstance.getPlayer(
28
+ uuid
29
+ );
30
+ ```
31
+
32
+ ### Parameters
33
+
34
+ |Name | Type | Description | Notes|
35
+ |------------- | ------------- | ------------- | -------------|
36
+ | **uuid** | [**string**] | The Minecraft player UUID (with or without dashes) | defaults to undefined|
37
+
38
+
39
+ ### Return type
40
+
41
+ **PlayerGetPlayerInformation**
42
+
43
+ ### Authorization
44
+
45
+ [CognitoAuth](../README.md#CognitoAuth)
46
+
47
+ ### HTTP request headers
48
+
49
+ - **Content-Type**: Not defined
50
+ - **Accept**: application/json
51
+
52
+
53
+ ### HTTP response details
54
+ | Status code | Description | Response headers |
55
+ |-------------|-------------|------------------|
56
+ |**200** | Player information retrieved successfully | - |
57
+ |**401** | Unauthorized - Invalid or missing authentication token | - |
58
+ |**400** | Bad Request - Invalid UUID format | - |
59
+ |**404** | Player not found | - |
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
+
@@ -0,0 +1,27 @@
1
+ # PlayerGetPlayerInformation
2
+
3
+ Player information including join history, tracking data, and punishment scoring
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **firstLogin** | **string** | Timestamp of when the player first connected to the server (ISO-8601 format). | [optional] [default to undefined]
10
+ **firstJoin** | **boolean** | Indicates whether this is the player\'s first time joining the server. Useful for triggering welcome messages, tutorials, or first-join rewards. | [optional] [default to undefined]
11
+ **punishmentPointsRaw** | **number** | Raw punishment score calculated as: SUM((base_weight × severity/10)) where base_weight is 0.10 for WARNING, 0.30 for MUTE, 0.50 for BAN. Severity ranges 1-10. Used for tracking overall punishment severity. | [optional] [default to undefined]
12
+ **punishmentPointsPercent** | **number** | Punishment score as a percentage (0-100). When this score is >100% BEFORE applying a new punishment, the new punishment should be made permanent. Check this value BEFORE issuing punishment, not after. Calculated as raw_score × 100. | [optional] [default to undefined]
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import { PlayerGetPlayerInformation } from '@rebornteam/reborn-api';
18
+
19
+ const instance: PlayerGetPlayerInformation = {
20
+ firstLogin,
21
+ firstJoin,
22
+ punishmentPointsRaw,
23
+ punishmentPointsPercent,
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,347 @@
1
+ # PunishmentApi
2
+
3
+ All URIs are relative to *https://api.smsh.sh*
4
+
5
+ |Method | HTTP request | Description|
6
+ |------------- | ------------- | -------------|
7
+ |[**applyPunishment**](#applypunishment) | **POST** /v1/punishment/apply | Apply a punishment|
8
+ |[**createPunishmentDraft**](#createpunishmentdraft) | **POST** /v1/punishment/draft | Create a punishment draft|
9
+ |[**getPunishmentSeverities**](#getpunishmentseverities) | **GET** /v1/punishment/severities | Get punishment severities|
10
+ |[**getPunishments**](#getpunishments) | **GET** /v1/punishment | Get punishments by player|
11
+ |[**getPunishmentsByIp**](#getpunishmentsbyip) | **GET** /v1/punishment/ip | Get punishments by IP address|
12
+ |[**getRecentPunishments**](#getrecentpunishments) | **GET** /v1/punishment/recent | List recent punishments|
13
+
14
+ # **applyPunishment**
15
+ > ApplyPunishmentResponse applyPunishment(applyPunishmentRequest)
16
+
17
+ Create and apply a punishment to a player. Automatically determines if permanent based on current score threshold (≥100%).
18
+
19
+ ### Example
20
+
21
+ ```typescript
22
+ import {
23
+ PunishmentApi,
24
+ Configuration,
25
+ ApplyPunishmentRequest
26
+ } from '@rebornteam/reborn-api';
27
+
28
+ const configuration = new Configuration();
29
+ const apiInstance = new PunishmentApi(configuration);
30
+
31
+ let applyPunishmentRequest: ApplyPunishmentRequest; //
32
+
33
+ const { status, data } = await apiInstance.applyPunishment(
34
+ applyPunishmentRequest
35
+ );
36
+ ```
37
+
38
+ ### Parameters
39
+
40
+ |Name | Type | Description | Notes|
41
+ |------------- | ------------- | ------------- | -------------|
42
+ | **applyPunishmentRequest** | **ApplyPunishmentRequest**| | |
43
+
44
+
45
+ ### Return type
46
+
47
+ **ApplyPunishmentResponse**
48
+
49
+ ### Authorization
50
+
51
+ [CognitoAuth](../README.md#CognitoAuth)
52
+
53
+ ### HTTP request headers
54
+
55
+ - **Content-Type**: application/json
56
+ - **Accept**: application/json
57
+
58
+
59
+ ### HTTP response details
60
+ | Status code | Description | Response headers |
61
+ |-------------|-------------|------------------|
62
+ |**200** | Punishment successfully applied | - |
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
+ # **createPunishmentDraft**
67
+ > PunishmentDraftResponse createPunishmentDraft(createPunishmentDraftRequest)
68
+
69
+ Preview punishment impact before applying. Returns calculated points, current/new thresholds, and whether it will be permanent.
70
+
71
+ ### Example
72
+
73
+ ```typescript
74
+ import {
75
+ PunishmentApi,
76
+ Configuration,
77
+ CreatePunishmentDraftRequest
78
+ } from '@rebornteam/reborn-api';
79
+
80
+ const configuration = new Configuration();
81
+ const apiInstance = new PunishmentApi(configuration);
82
+
83
+ let createPunishmentDraftRequest: CreatePunishmentDraftRequest; //
84
+
85
+ const { status, data } = await apiInstance.createPunishmentDraft(
86
+ createPunishmentDraftRequest
87
+ );
88
+ ```
89
+
90
+ ### Parameters
91
+
92
+ |Name | Type | Description | Notes|
93
+ |------------- | ------------- | ------------- | -------------|
94
+ | **createPunishmentDraftRequest** | **CreatePunishmentDraftRequest**| | |
95
+
96
+
97
+ ### Return type
98
+
99
+ **PunishmentDraftResponse**
100
+
101
+ ### Authorization
102
+
103
+ [CognitoAuth](../README.md#CognitoAuth)
104
+
105
+ ### HTTP request headers
106
+
107
+ - **Content-Type**: application/json
108
+ - **Accept**: application/json
109
+
110
+
111
+ ### HTTP response details
112
+ | Status code | Description | Response headers |
113
+ |-------------|-------------|------------------|
114
+ |**200** | Punishment draft with calculated impact | - |
115
+
116
+ [[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)
117
+
118
+ # **getPunishmentSeverities**
119
+ > PunishmentSeveritiesResponse getPunishmentSeverities()
120
+
121
+ Retrieve duration information for each punishment type and severity level (1-10)
122
+
123
+ ### Example
124
+
125
+ ```typescript
126
+ import {
127
+ PunishmentApi,
128
+ Configuration
129
+ } from '@rebornteam/reborn-api';
130
+
131
+ const configuration = new Configuration();
132
+ const apiInstance = new PunishmentApi(configuration);
133
+
134
+ const { status, data } = await apiInstance.getPunishmentSeverities();
135
+ ```
136
+
137
+ ### Parameters
138
+ This endpoint does not have any parameters.
139
+
140
+
141
+ ### Return type
142
+
143
+ **PunishmentSeveritiesResponse**
144
+
145
+ ### Authorization
146
+
147
+ [CognitoAuth](../README.md#CognitoAuth)
148
+
149
+ ### HTTP request headers
150
+
151
+ - **Content-Type**: Not defined
152
+ - **Accept**: application/json
153
+
154
+
155
+ ### HTTP response details
156
+ | Status code | Description | Response headers |
157
+ |-------------|-------------|------------------|
158
+ |**200** | Punishment severity durations | - |
159
+
160
+ [[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)
161
+
162
+ # **getPunishments**
163
+ > Array<PunishmentGetPunishmentResponse> getPunishments()
164
+
165
+ Retrieve all active punishments for a player by UUID or username, optionally filtered by type and time
166
+
167
+ ### Example
168
+
169
+ ```typescript
170
+ import {
171
+ PunishmentApi,
172
+ Configuration
173
+ } from '@rebornteam/reborn-api';
174
+
175
+ const configuration = new Configuration();
176
+ const apiInstance = new PunishmentApi(configuration);
177
+
178
+ let uuid: string; //Player UUID (optional) (default to undefined)
179
+ let username: string; //Player username (optional) (default to undefined)
180
+ let type: Array<string>; //Filter by punishment types (optional) (default to undefined)
181
+ let since: number; //Filter punishments created after this Unix epoch timestamp (milliseconds) (optional) (default to undefined)
182
+
183
+ const { status, data } = await apiInstance.getPunishments(
184
+ uuid,
185
+ username,
186
+ type,
187
+ since
188
+ );
189
+ ```
190
+
191
+ ### Parameters
192
+
193
+ |Name | Type | Description | Notes|
194
+ |------------- | ------------- | ------------- | -------------|
195
+ | **uuid** | [**string**] | Player UUID | (optional) defaults to undefined|
196
+ | **username** | [**string**] | Player username | (optional) defaults to undefined|
197
+ | **type** | **Array&lt;string&gt;** | Filter by punishment types | (optional) defaults to undefined|
198
+ | **since** | [**number**] | Filter punishments created after this Unix epoch timestamp (milliseconds) | (optional) defaults to undefined|
199
+
200
+
201
+ ### Return type
202
+
203
+ **Array<PunishmentGetPunishmentResponse>**
204
+
205
+ ### Authorization
206
+
207
+ [CognitoAuth](../README.md#CognitoAuth)
208
+
209
+ ### HTTP request headers
210
+
211
+ - **Content-Type**: Not defined
212
+ - **Accept**: application/json
213
+
214
+
215
+ ### HTTP response details
216
+ | Status code | Description | Response headers |
217
+ |-------------|-------------|------------------|
218
+ |**200** | List of active punishments for the player | - |
219
+
220
+ [[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)
221
+
222
+ # **getPunishmentsByIp**
223
+ > Array<PunishmentGetPunishmentResponse> getPunishmentsByIp()
224
+
225
+ Retrieve all active punishments associated with an IP address
226
+
227
+ ### Example
228
+
229
+ ```typescript
230
+ import {
231
+ PunishmentApi,
232
+ Configuration
233
+ } from '@rebornteam/reborn-api';
234
+
235
+ const configuration = new Configuration();
236
+ const apiInstance = new PunishmentApi(configuration);
237
+
238
+ let ip: string; //IP address (default to undefined)
239
+
240
+ const { status, data } = await apiInstance.getPunishmentsByIp(
241
+ ip
242
+ );
243
+ ```
244
+
245
+ ### Parameters
246
+
247
+ |Name | Type | Description | Notes|
248
+ |------------- | ------------- | ------------- | -------------|
249
+ | **ip** | [**string**] | IP address | defaults to undefined|
250
+
251
+
252
+ ### Return type
253
+
254
+ **Array<PunishmentGetPunishmentResponse>**
255
+
256
+ ### Authorization
257
+
258
+ [CognitoAuth](../README.md#CognitoAuth)
259
+
260
+ ### HTTP request headers
261
+
262
+ - **Content-Type**: Not defined
263
+ - **Accept**: application/json
264
+
265
+
266
+ ### HTTP response details
267
+ | Status code | Description | Response headers |
268
+ |-------------|-------------|------------------|
269
+ |**200** | List of active punishments for the IP address | - |
270
+
271
+ [[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)
272
+
273
+ # **getRecentPunishments**
274
+ > Array<PunishmentGetPunishmentResponse> getRecentPunishments()
275
+
276
+ Returns a paginated list of recent punishments with optional filtering by issue date, expiration date, and type
277
+
278
+ ### Example
279
+
280
+ ```typescript
281
+ import {
282
+ PunishmentApi,
283
+ Configuration
284
+ } from '@rebornteam/reborn-api';
285
+
286
+ const configuration = new Configuration();
287
+ const apiInstance = new PunishmentApi(configuration);
288
+
289
+ let limit: number; //Maximum number of records to return (default to 100)
290
+ let page: number; //Page number for pagination (default to 1)
291
+ let issuedAfter: number; //Filter punishments issued after this epoch timestamp (milliseconds) (optional) (default to undefined)
292
+ let issuedBefore: number; //Filter punishments issued before this epoch timestamp (milliseconds) (optional) (default to undefined)
293
+ let expiresAfter: number; //Filter punishments expiring after this epoch timestamp (milliseconds) (optional) (default to undefined)
294
+ let expiresBefore: number; //Filter punishments expiring before this epoch timestamp (milliseconds) (optional) (default to undefined)
295
+ let type: Array<string>; //Filter by punishment types (optional) (default to undefined)
296
+ let uuid: string; //Filter by player UUID (optional) (default to undefined)
297
+ let ipAddress: string; //Filter by IP address (optional) (default to undefined)
298
+
299
+ const { status, data } = await apiInstance.getRecentPunishments(
300
+ limit,
301
+ page,
302
+ issuedAfter,
303
+ issuedBefore,
304
+ expiresAfter,
305
+ expiresBefore,
306
+ type,
307
+ uuid,
308
+ ipAddress
309
+ );
310
+ ```
311
+
312
+ ### Parameters
313
+
314
+ |Name | Type | Description | Notes|
315
+ |------------- | ------------- | ------------- | -------------|
316
+ | **limit** | [**number**] | Maximum number of records to return | defaults to 100|
317
+ | **page** | [**number**] | Page number for pagination | defaults to 1|
318
+ | **issuedAfter** | [**number**] | Filter punishments issued after this epoch timestamp (milliseconds) | (optional) defaults to undefined|
319
+ | **issuedBefore** | [**number**] | Filter punishments issued before this epoch timestamp (milliseconds) | (optional) defaults to undefined|
320
+ | **expiresAfter** | [**number**] | Filter punishments expiring after this epoch timestamp (milliseconds) | (optional) defaults to undefined|
321
+ | **expiresBefore** | [**number**] | Filter punishments expiring before this epoch timestamp (milliseconds) | (optional) defaults to undefined|
322
+ | **type** | **Array&lt;string&gt;** | Filter by punishment types | (optional) defaults to undefined|
323
+ | **uuid** | [**string**] | Filter by player UUID | (optional) defaults to undefined|
324
+ | **ipAddress** | [**string**] | Filter by IP address | (optional) defaults to undefined|
325
+
326
+
327
+ ### Return type
328
+
329
+ **Array<PunishmentGetPunishmentResponse>**
330
+
331
+ ### Authorization
332
+
333
+ [CognitoAuth](../README.md#CognitoAuth)
334
+
335
+ ### HTTP request headers
336
+
337
+ - **Content-Type**: Not defined
338
+ - **Accept**: application/json
339
+
340
+
341
+ ### HTTP response details
342
+ | Status code | Description | Response headers |
343
+ |-------------|-------------|------------------|
344
+ |**200** | List of recent punishments | - |
345
+
346
+ [[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)
347
+