@rebornteam/reborn-api 2.5.1 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/.openapi-generator/FILES +9 -0
  2. package/README.md +18 -6
  3. package/api.ts +881 -67
  4. package/base.ts +2 -2
  5. package/common.ts +2 -2
  6. package/configuration.ts +2 -2
  7. package/dist/api.d.ts +480 -10
  8. package/dist/api.js +639 -38
  9. package/dist/base.d.ts +2 -2
  10. package/dist/base.js +2 -2
  11. package/dist/common.d.ts +2 -2
  12. package/dist/common.js +2 -2
  13. package/dist/configuration.d.ts +2 -2
  14. package/dist/configuration.js +2 -2
  15. package/dist/esm/api.d.ts +480 -10
  16. package/dist/esm/api.js +626 -37
  17. package/dist/esm/base.d.ts +2 -2
  18. package/dist/esm/base.js +2 -2
  19. package/dist/esm/common.d.ts +2 -2
  20. package/dist/esm/common.js +2 -2
  21. package/dist/esm/configuration.d.ts +2 -2
  22. package/dist/esm/configuration.js +2 -2
  23. package/dist/esm/index.d.ts +2 -2
  24. package/dist/esm/index.js +2 -2
  25. package/dist/index.d.ts +2 -2
  26. package/dist/index.js +2 -2
  27. package/docs/AdminClientCredentialResponse.md +2 -0
  28. package/docs/AdminClientCredentialsApi.md +17 -17
  29. package/docs/AdminConnectionsApi.md +70 -4
  30. package/docs/AdminDashboardApi.md +2 -2
  31. package/docs/AdminPagedConnectionResponse.md +29 -0
  32. package/docs/AdminPagedPlayerResponse.md +29 -0
  33. package/docs/AdminPagedPunishmentResponse.md +29 -0
  34. package/docs/AdminPlayerDetailResponse.md +37 -0
  35. package/docs/AdminPlayerSummary.md +35 -0
  36. package/docs/AdminPlayersApi.md +122 -0
  37. package/docs/AdminPunishmentsApi.md +82 -0
  38. package/docs/AdminUsernameHistoryEntry.md +23 -0
  39. package/docs/ClientCredentialRequest.md +2 -0
  40. package/docs/ConnectionApi.md +1 -1
  41. package/docs/DefaultApi.md +105 -0
  42. package/docs/PlayerApi.md +5 -5
  43. package/docs/PunishmentApi.md +10 -10
  44. package/index.ts +2 -2
  45. package/package.json +2 -2
package/api.ts CHANGED
@@ -2,9 +2,9 @@
2
2
  /* eslint-disable */
3
3
  /**
4
4
  * Reborn API
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 - **Cognito Bearer Token**: For admin endpoints requiring AWS Cognito authentication
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.5.1
7
+ * The version of the OpenAPI document: 2.6.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -55,6 +55,10 @@ export interface AdminClientCredentialResponse {
55
55
  * Timestamp when the credential was created (ISO-8601 format)
56
56
  */
57
57
  'createdAt'?: string;
58
+ /**
59
+ * Timestamp when the credential expires (ISO-8601 format). Null means the credential never expires.
60
+ */
61
+ 'expiresAt'?: string | null;
58
62
  }
59
63
  /**
60
64
  * Connection bypass response
@@ -94,6 +98,172 @@ export interface AdminGetDashboardStats {
94
98
  'totalConnections': number;
95
99
  'totalClients': number;
96
100
  }
101
+ /**
102
+ * Paginated connection list response
103
+ */
104
+ export interface AdminPagedConnectionResponse {
105
+ /**
106
+ * Connections on the current page
107
+ */
108
+ 'data'?: Array<AdminDashboardConnectionResponse>;
109
+ /**
110
+ * Total number of connections matching the filters
111
+ */
112
+ 'total'?: number;
113
+ /**
114
+ * Current page (1-indexed)
115
+ */
116
+ 'page'?: number;
117
+ /**
118
+ * Page size
119
+ */
120
+ 'limit'?: number;
121
+ /**
122
+ * Total number of pages
123
+ */
124
+ 'totalPages'?: number;
125
+ }
126
+ /**
127
+ * Paginated player list response
128
+ */
129
+ export interface AdminPagedPlayerResponse {
130
+ /**
131
+ * Players on the current page
132
+ */
133
+ 'data'?: Array<AdminPlayerSummary>;
134
+ /**
135
+ * Total number of players matching the search filter
136
+ */
137
+ 'total'?: number;
138
+ /**
139
+ * Current page (1-indexed)
140
+ */
141
+ 'page'?: number;
142
+ /**
143
+ * Page size
144
+ */
145
+ 'limit'?: number;
146
+ /**
147
+ * Total number of pages
148
+ */
149
+ 'totalPages'?: number;
150
+ }
151
+ /**
152
+ * Paginated punishment list response
153
+ */
154
+ export interface AdminPagedPunishmentResponse {
155
+ /**
156
+ * Punishments on the current page
157
+ */
158
+ 'data'?: Array<PunishmentGetPunishmentResponse>;
159
+ /**
160
+ * Total number of punishments matching the filters
161
+ */
162
+ 'total'?: number;
163
+ /**
164
+ * Current page (1-indexed)
165
+ */
166
+ 'page'?: number;
167
+ /**
168
+ * Page size
169
+ */
170
+ 'limit'?: number;
171
+ /**
172
+ * Total number of pages
173
+ */
174
+ 'totalPages'?: number;
175
+ }
176
+ /**
177
+ * Full player detail including punishment history and all known usernames
178
+ */
179
+ export interface AdminPlayerDetailResponse {
180
+ /**
181
+ * Internal player ID
182
+ */
183
+ 'id'?: number;
184
+ /**
185
+ * Player Minecraft UUID
186
+ */
187
+ 'uuid'?: string;
188
+ /**
189
+ * Most recently seen username
190
+ */
191
+ 'username'?: string | null;
192
+ /**
193
+ * Whether this player still has first-join status
194
+ */
195
+ 'firstJoin'?: boolean;
196
+ /**
197
+ * Timestamp of first connection (ISO-8601)
198
+ */
199
+ 'firstLogin'?: string;
200
+ /**
201
+ * Timestamp of most recent connection (ISO-8601)
202
+ */
203
+ 'lastUsedAt'?: string | null;
204
+ /**
205
+ * Raw punishment score
206
+ */
207
+ 'punishmentPointsRaw'?: number;
208
+ /**
209
+ * Punishment score as a percentage
210
+ */
211
+ 'punishmentPointsPercent'?: number;
212
+ /**
213
+ * All usernames this player has used, newest first
214
+ */
215
+ 'usernameHistory'?: Array<AdminUsernameHistoryEntry>;
216
+ }
217
+ /**
218
+ * Summary of a player record, used in list views
219
+ */
220
+ export interface AdminPlayerSummary {
221
+ /**
222
+ * Internal player ID
223
+ */
224
+ 'id'?: number;
225
+ /**
226
+ * Player Minecraft UUID
227
+ */
228
+ 'uuid'?: string;
229
+ /**
230
+ * Most recently seen username, null if never recorded
231
+ */
232
+ 'username'?: string | null;
233
+ /**
234
+ * Whether this player still has first-join status
235
+ */
236
+ 'firstJoin'?: boolean;
237
+ /**
238
+ * Timestamp of first connection (ISO-8601)
239
+ */
240
+ 'firstLogin'?: string;
241
+ /**
242
+ * Timestamp of most recent connection (ISO-8601)
243
+ */
244
+ 'lastUsedAt'?: string | null;
245
+ /**
246
+ * Raw punishment score (sum of weighted punishment values)
247
+ */
248
+ 'punishmentPointsRaw'?: number;
249
+ /**
250
+ * Punishment score as a percentage. Values above 100 indicate future punishments should be permanent.
251
+ */
252
+ 'punishmentPointsPercent'?: number;
253
+ }
254
+ /**
255
+ * A single entry in a player\'s username history
256
+ */
257
+ export interface AdminUsernameHistoryEntry {
258
+ /**
259
+ * The username at this point in time
260
+ */
261
+ 'username'?: string;
262
+ /**
263
+ * When this username was first observed (ISO-8601)
264
+ */
265
+ 'changedAt'?: string;
266
+ }
97
267
  /**
98
268
  * Request to apply a punishment to a player
99
269
  */
@@ -168,6 +338,10 @@ export interface ClientCredentialRequest {
168
338
  * Optional description of the client\'s purpose
169
339
  */
170
340
  'description'?: string;
341
+ /**
342
+ * Optional expiration timestamp (ISO-8601). Null means the credential never expires.
343
+ */
344
+ 'expiresAt'?: string | null;
171
345
  }
172
346
  /**
173
347
  * Comprehensive connection analysis response including VPN detection, geolocation, bypass status, and optional player information
@@ -417,7 +591,7 @@ export const AdminClientCredentialsApiAxiosParamCreator = function (configuratio
417
591
  const localVarHeaderParameter = {} as any;
418
592
  const localVarQueryParameter = {} as any;
419
593
 
420
- // authentication CognitoAuth required
594
+ // authentication DiscordAuth required
421
595
  // http bearer authentication required
422
596
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
423
597
 
@@ -454,7 +628,7 @@ export const AdminClientCredentialsApiAxiosParamCreator = function (configuratio
454
628
  const localVarHeaderParameter = {} as any;
455
629
  const localVarQueryParameter = {} as any;
456
630
 
457
- // authentication CognitoAuth required
631
+ // authentication DiscordAuth required
458
632
  // http bearer authentication required
459
633
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
460
634
 
@@ -490,7 +664,7 @@ export const AdminClientCredentialsApiAxiosParamCreator = function (configuratio
490
664
  const localVarHeaderParameter = {} as any;
491
665
  const localVarQueryParameter = {} as any;
492
666
 
493
- // authentication CognitoAuth required
667
+ // authentication DiscordAuth required
494
668
  // http bearer authentication required
495
669
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
496
670
 
@@ -526,7 +700,7 @@ export const AdminClientCredentialsApiAxiosParamCreator = function (configuratio
526
700
  const localVarHeaderParameter = {} as any;
527
701
  const localVarQueryParameter = {} as any;
528
702
 
529
- // authentication CognitoAuth required
703
+ // authentication DiscordAuth required
530
704
  // http bearer authentication required
531
705
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
532
706
 
@@ -564,7 +738,7 @@ export const AdminClientCredentialsApiAxiosParamCreator = function (configuratio
564
738
  const localVarHeaderParameter = {} as any;
565
739
  const localVarQueryParameter = {} as any;
566
740
 
567
- // authentication CognitoAuth required
741
+ // authentication DiscordAuth required
568
742
  // http bearer authentication required
569
743
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
570
744
 
@@ -601,7 +775,7 @@ export const AdminClientCredentialsApiAxiosParamCreator = function (configuratio
601
775
  const localVarHeaderParameter = {} as any;
602
776
  const localVarQueryParameter = {} as any;
603
777
 
604
- // authentication CognitoAuth required
778
+ // authentication DiscordAuth required
605
779
  // http bearer authentication required
606
780
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
607
781
 
@@ -642,7 +816,7 @@ export const AdminClientCredentialsApiAxiosParamCreator = function (configuratio
642
816
  const localVarHeaderParameter = {} as any;
643
817
  const localVarQueryParameter = {} as any;
644
818
 
645
- // authentication CognitoAuth required
819
+ // authentication DiscordAuth required
646
820
  // http bearer authentication required
647
821
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
648
822
 
@@ -952,7 +1126,7 @@ export const AdminConnectionsApiAxiosParamCreator = function (configuration?: Co
952
1126
  const localVarHeaderParameter = {} as any;
953
1127
  const localVarQueryParameter = {} as any;
954
1128
 
955
- // authentication CognitoAuth required
1129
+ // authentication DiscordAuth required
956
1130
  // http bearer authentication required
957
1131
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
958
1132
 
@@ -969,6 +1143,65 @@ export const AdminConnectionsApiAxiosParamCreator = function (configuration?: Co
969
1143
  options: localVarRequestOptions,
970
1144
  };
971
1145
  },
1146
+ /**
1147
+ * Returns a paginated list of all connections with a total count. Supports filtering by IP address, UUID, and VPN status.
1148
+ * @summary List all connections (paginated)
1149
+ * @param {string | null} [ipAddress] Filter by IP address
1150
+ * @param {string | null} [uuid] Filter by player UUID
1151
+ * @param {boolean | null} [isVpn] Filter by VPN status
1152
+ * @param {number | null} [page] Page number (1-indexed)
1153
+ * @param {number | null} [limit] Page size
1154
+ * @param {*} [options] Override http request option.
1155
+ * @throws {RequiredError}
1156
+ */
1157
+ listAllConnections: async (ipAddress?: string | null, uuid?: string | null, isVpn?: boolean | null, page?: number | null, limit?: number | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1158
+ const localVarPath = `/admin/connection`;
1159
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1160
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1161
+ let baseOptions;
1162
+ if (configuration) {
1163
+ baseOptions = configuration.baseOptions;
1164
+ }
1165
+
1166
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1167
+ const localVarHeaderParameter = {} as any;
1168
+ const localVarQueryParameter = {} as any;
1169
+
1170
+ // authentication DiscordAuth required
1171
+ // http bearer authentication required
1172
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
1173
+
1174
+ if (ipAddress !== undefined) {
1175
+ localVarQueryParameter['ipAddress'] = ipAddress;
1176
+ }
1177
+
1178
+ if (uuid !== undefined) {
1179
+ localVarQueryParameter['uuid'] = uuid;
1180
+ }
1181
+
1182
+ if (isVpn !== undefined) {
1183
+ localVarQueryParameter['isVpn'] = isVpn;
1184
+ }
1185
+
1186
+ if (page !== undefined) {
1187
+ localVarQueryParameter['page'] = page;
1188
+ }
1189
+
1190
+ if (limit !== undefined) {
1191
+ localVarQueryParameter['limit'] = limit;
1192
+ }
1193
+
1194
+ localVarHeaderParameter['Accept'] = 'application/json';
1195
+
1196
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1197
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1198
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1199
+
1200
+ return {
1201
+ url: toPathString(localVarUrlObj),
1202
+ options: localVarRequestOptions,
1203
+ };
1204
+ },
972
1205
  /**
973
1206
  * Returns a list of recent connections with VPN detection status, bypass information, and associated player data. Optionally filter by epoch timestamp (seconds since Unix epoch).
974
1207
  * @summary List recent connections
@@ -995,7 +1228,7 @@ export const AdminConnectionsApiAxiosParamCreator = function (configuration?: Co
995
1228
  const localVarHeaderParameter = {} as any;
996
1229
  const localVarQueryParameter = {} as any;
997
1230
 
998
- // authentication CognitoAuth required
1231
+ // authentication DiscordAuth required
999
1232
  // http bearer authentication required
1000
1233
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
1001
1234
 
@@ -1060,6 +1293,23 @@ export const AdminConnectionsApiFp = function(configuration?: Configuration) {
1060
1293
  const localVarOperationServerBasePath = operationServerMap['AdminConnectionsApi.createBypass']?.[localVarOperationServerIndex]?.url;
1061
1294
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1062
1295
  },
1296
+ /**
1297
+ * Returns a paginated list of all connections with a total count. Supports filtering by IP address, UUID, and VPN status.
1298
+ * @summary List all connections (paginated)
1299
+ * @param {string | null} [ipAddress] Filter by IP address
1300
+ * @param {string | null} [uuid] Filter by player UUID
1301
+ * @param {boolean | null} [isVpn] Filter by VPN status
1302
+ * @param {number | null} [page] Page number (1-indexed)
1303
+ * @param {number | null} [limit] Page size
1304
+ * @param {*} [options] Override http request option.
1305
+ * @throws {RequiredError}
1306
+ */
1307
+ async listAllConnections(ipAddress?: string | null, uuid?: string | null, isVpn?: boolean | null, page?: number | null, limit?: number | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminPagedConnectionResponse>> {
1308
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listAllConnections(ipAddress, uuid, isVpn, page, limit, options);
1309
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1310
+ const localVarOperationServerBasePath = operationServerMap['AdminConnectionsApi.listAllConnections']?.[localVarOperationServerIndex]?.url;
1311
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1312
+ },
1063
1313
  /**
1064
1314
  * Returns a list of recent connections with VPN detection status, bypass information, and associated player data. Optionally filter by epoch timestamp (seconds since Unix epoch).
1065
1315
  * @summary List recent connections
@@ -1098,6 +1348,20 @@ export const AdminConnectionsApiFactory = function (configuration?: Configuratio
1098
1348
  createBypass(createBypassRequest: CreateBypassRequest, options?: RawAxiosRequestConfig): AxiosPromise<AdminConnectionBypassResponse> {
1099
1349
  return localVarFp.createBypass(createBypassRequest, options).then((request) => request(axios, basePath));
1100
1350
  },
1351
+ /**
1352
+ * Returns a paginated list of all connections with a total count. Supports filtering by IP address, UUID, and VPN status.
1353
+ * @summary List all connections (paginated)
1354
+ * @param {string | null} [ipAddress] Filter by IP address
1355
+ * @param {string | null} [uuid] Filter by player UUID
1356
+ * @param {boolean | null} [isVpn] Filter by VPN status
1357
+ * @param {number | null} [page] Page number (1-indexed)
1358
+ * @param {number | null} [limit] Page size
1359
+ * @param {*} [options] Override http request option.
1360
+ * @throws {RequiredError}
1361
+ */
1362
+ listAllConnections(ipAddress?: string | null, uuid?: string | null, isVpn?: boolean | null, page?: number | null, limit?: number | null, options?: RawAxiosRequestConfig): AxiosPromise<AdminPagedConnectionResponse> {
1363
+ return localVarFp.listAllConnections(ipAddress, uuid, isVpn, page, limit, options).then((request) => request(axios, basePath));
1364
+ },
1101
1365
  /**
1102
1366
  * Returns a list of recent connections with VPN detection status, bypass information, and associated player data. Optionally filter by epoch timestamp (seconds since Unix epoch).
1103
1367
  * @summary List recent connections
@@ -1132,6 +1396,21 @@ export class AdminConnectionsApi extends BaseAPI {
1132
1396
  return AdminConnectionsApiFp(this.configuration).createBypass(createBypassRequest, options).then((request) => request(this.axios, this.basePath));
1133
1397
  }
1134
1398
 
1399
+ /**
1400
+ * Returns a paginated list of all connections with a total count. Supports filtering by IP address, UUID, and VPN status.
1401
+ * @summary List all connections (paginated)
1402
+ * @param {string | null} [ipAddress] Filter by IP address
1403
+ * @param {string | null} [uuid] Filter by player UUID
1404
+ * @param {boolean | null} [isVpn] Filter by VPN status
1405
+ * @param {number | null} [page] Page number (1-indexed)
1406
+ * @param {number | null} [limit] Page size
1407
+ * @param {*} [options] Override http request option.
1408
+ * @throws {RequiredError}
1409
+ */
1410
+ public listAllConnections(ipAddress?: string | null, uuid?: string | null, isVpn?: boolean | null, page?: number | null, limit?: number | null, options?: RawAxiosRequestConfig) {
1411
+ return AdminConnectionsApiFp(this.configuration).listAllConnections(ipAddress, uuid, isVpn, page, limit, options).then((request) => request(this.axios, this.basePath));
1412
+ }
1413
+
1135
1414
  /**
1136
1415
  * Returns a list of recent connections with VPN detection status, bypass information, and associated player data. Optionally filter by epoch timestamp (seconds since Unix epoch).
1137
1416
  * @summary List recent connections
@@ -1176,7 +1455,7 @@ export const AdminDashboardApiAxiosParamCreator = function (configuration?: Conf
1176
1455
  const localVarHeaderParameter = {} as any;
1177
1456
  const localVarQueryParameter = {} as any;
1178
1457
 
1179
- // authentication CognitoAuth required
1458
+ // authentication DiscordAuth required
1180
1459
  // http bearer authentication required
1181
1460
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
1182
1461
 
@@ -1251,26 +1530,22 @@ export class AdminDashboardApi extends BaseAPI {
1251
1530
 
1252
1531
 
1253
1532
  /**
1254
- * ConnectionApi - axios parameter creator
1533
+ * AdminPlayersApi - axios parameter creator
1255
1534
  */
1256
- export const ConnectionApiAxiosParamCreator = function (configuration?: Configuration) {
1535
+ export const AdminPlayersApiAxiosParamCreator = function (configuration?: Configuration) {
1257
1536
  return {
1258
1537
  /**
1259
- * 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.
1260
- * @summary Check Connection and Detect VPN/Proxy
1261
- * @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
1262
- * @param {boolean} forceRecheck 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
1263
- * @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\&#39;s history - Update the player\&#39;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\&#39;t block the response.
1538
+ * Returns full detail for a single player including all known usernames and punishment scoring.
1539
+ * @summary Get player detail
1540
+ * @param {string} uuid Player Minecraft UUID
1264
1541
  * @param {*} [options] Override http request option.
1265
1542
  * @throws {RequiredError}
1266
1543
  */
1267
- getConnectionDetails: async (ip: string, forceRecheck: boolean, associateUuid?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1268
- // verify required parameter 'ip' is not null or undefined
1269
- assertParamExists('getConnectionDetails', 'ip', ip)
1270
- // verify required parameter 'forceRecheck' is not null or undefined
1271
- assertParamExists('getConnectionDetails', 'forceRecheck', forceRecheck)
1272
- const localVarPath = `/v1/connection/get-connection-details/{ip}`
1273
- .replace(`{${"ip"}}`, encodeURIComponent(String(ip)));
1544
+ getPlayer: async (uuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1545
+ // verify required parameter 'uuid' is not null or undefined
1546
+ assertParamExists('getPlayer', 'uuid', uuid)
1547
+ const localVarPath = `/admin/player/{uuid}`
1548
+ .replace(`{${"uuid"}}`, encodeURIComponent(String(uuid)));
1274
1549
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1275
1550
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1276
1551
  let baseOptions;
@@ -1282,16 +1557,61 @@ export const ConnectionApiAxiosParamCreator = function (configuration?: Configur
1282
1557
  const localVarHeaderParameter = {} as any;
1283
1558
  const localVarQueryParameter = {} as any;
1284
1559
 
1285
- // authentication CognitoAuth required
1560
+ // authentication DiscordAuth required
1286
1561
  // http bearer authentication required
1287
1562
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
1288
1563
 
1289
- if (forceRecheck !== undefined) {
1290
- localVarQueryParameter['force_recheck'] = forceRecheck;
1564
+ localVarHeaderParameter['Accept'] = 'application/json';
1565
+
1566
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1567
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1568
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1569
+
1570
+ return {
1571
+ url: toPathString(localVarUrlObj),
1572
+ options: localVarRequestOptions,
1573
+ };
1574
+ },
1575
+ /**
1576
+ * Returns up to 500 players ordered by most recently seen. Optionally filter by UUID or username substring.
1577
+ * @summary List players
1578
+ * @param {number} page Page number (1-indexed)
1579
+ * @param {number} limit Page size
1580
+ * @param {string | null} [search] Optional search string matched against UUID or username (case-insensitive substring)
1581
+ * @param {*} [options] Override http request option.
1582
+ * @throws {RequiredError}
1583
+ */
1584
+ listPlayers: async (page: number, limit: number, search?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1585
+ // verify required parameter 'page' is not null or undefined
1586
+ assertParamExists('listPlayers', 'page', page)
1587
+ // verify required parameter 'limit' is not null or undefined
1588
+ assertParamExists('listPlayers', 'limit', limit)
1589
+ const localVarPath = `/admin/player`;
1590
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1591
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1592
+ let baseOptions;
1593
+ if (configuration) {
1594
+ baseOptions = configuration.baseOptions;
1291
1595
  }
1292
1596
 
1293
- if (associateUuid !== undefined) {
1294
- localVarQueryParameter['associate_uuid'] = associateUuid;
1597
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1598
+ const localVarHeaderParameter = {} as any;
1599
+ const localVarQueryParameter = {} as any;
1600
+
1601
+ // authentication DiscordAuth required
1602
+ // http bearer authentication required
1603
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
1604
+
1605
+ if (search !== undefined) {
1606
+ localVarQueryParameter['search'] = search;
1607
+ }
1608
+
1609
+ if (page !== undefined) {
1610
+ localVarQueryParameter['page'] = page;
1611
+ }
1612
+
1613
+ if (limit !== undefined) {
1614
+ localVarQueryParameter['limit'] = limit;
1295
1615
  }
1296
1616
 
1297
1617
  localVarHeaderParameter['Accept'] = 'application/json';
@@ -1309,31 +1629,354 @@ export const ConnectionApiAxiosParamCreator = function (configuration?: Configur
1309
1629
  };
1310
1630
 
1311
1631
  /**
1312
- * ConnectionApi - functional programming interface
1632
+ * AdminPlayersApi - functional programming interface
1313
1633
  */
1314
- export const ConnectionApiFp = function(configuration?: Configuration) {
1315
- const localVarAxiosParamCreator = ConnectionApiAxiosParamCreator(configuration)
1634
+ export const AdminPlayersApiFp = function(configuration?: Configuration) {
1635
+ const localVarAxiosParamCreator = AdminPlayersApiAxiosParamCreator(configuration)
1316
1636
  return {
1317
1637
  /**
1318
- * 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.
1319
- * @summary Check Connection and Detect VPN/Proxy
1320
- * @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
1321
- * @param {boolean} forceRecheck 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
1322
- * @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\&#39;s history - Update the player\&#39;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\&#39;t block the response.
1638
+ * Returns full detail for a single player including all known usernames and punishment scoring.
1639
+ * @summary Get player detail
1640
+ * @param {string} uuid Player Minecraft UUID
1323
1641
  * @param {*} [options] Override http request option.
1324
1642
  * @throws {RequiredError}
1325
1643
  */
1326
- async getConnectionDetails(ip: string, forceRecheck: boolean, associateUuid?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ConnectionGetConnectionDetailsResponse>> {
1327
- const localVarAxiosArgs = await localVarAxiosParamCreator.getConnectionDetails(ip, forceRecheck, associateUuid, options);
1644
+ async getPlayer(uuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminPlayerDetailResponse>> {
1645
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPlayer(uuid, options);
1328
1646
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1329
- const localVarOperationServerBasePath = operationServerMap['ConnectionApi.getConnectionDetails']?.[localVarOperationServerIndex]?.url;
1647
+ const localVarOperationServerBasePath = operationServerMap['AdminPlayersApi.getPlayer']?.[localVarOperationServerIndex]?.url;
1648
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1649
+ },
1650
+ /**
1651
+ * Returns up to 500 players ordered by most recently seen. Optionally filter by UUID or username substring.
1652
+ * @summary List players
1653
+ * @param {number} page Page number (1-indexed)
1654
+ * @param {number} limit Page size
1655
+ * @param {string | null} [search] Optional search string matched against UUID or username (case-insensitive substring)
1656
+ * @param {*} [options] Override http request option.
1657
+ * @throws {RequiredError}
1658
+ */
1659
+ async listPlayers(page: number, limit: number, search?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminPagedPlayerResponse>> {
1660
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listPlayers(page, limit, search, options);
1661
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1662
+ const localVarOperationServerBasePath = operationServerMap['AdminPlayersApi.listPlayers']?.[localVarOperationServerIndex]?.url;
1330
1663
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1331
1664
  },
1332
1665
  }
1333
1666
  };
1334
1667
 
1335
1668
  /**
1336
- * ConnectionApi - factory interface
1669
+ * AdminPlayersApi - factory interface
1670
+ */
1671
+ export const AdminPlayersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1672
+ const localVarFp = AdminPlayersApiFp(configuration)
1673
+ return {
1674
+ /**
1675
+ * Returns full detail for a single player including all known usernames and punishment scoring.
1676
+ * @summary Get player detail
1677
+ * @param {string} uuid Player Minecraft UUID
1678
+ * @param {*} [options] Override http request option.
1679
+ * @throws {RequiredError}
1680
+ */
1681
+ getPlayer(uuid: string, options?: RawAxiosRequestConfig): AxiosPromise<AdminPlayerDetailResponse> {
1682
+ return localVarFp.getPlayer(uuid, options).then((request) => request(axios, basePath));
1683
+ },
1684
+ /**
1685
+ * Returns up to 500 players ordered by most recently seen. Optionally filter by UUID or username substring.
1686
+ * @summary List players
1687
+ * @param {number} page Page number (1-indexed)
1688
+ * @param {number} limit Page size
1689
+ * @param {string | null} [search] Optional search string matched against UUID or username (case-insensitive substring)
1690
+ * @param {*} [options] Override http request option.
1691
+ * @throws {RequiredError}
1692
+ */
1693
+ listPlayers(page: number, limit: number, search?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<AdminPagedPlayerResponse> {
1694
+ return localVarFp.listPlayers(page, limit, search, options).then((request) => request(axios, basePath));
1695
+ },
1696
+ };
1697
+ };
1698
+
1699
+ /**
1700
+ * AdminPlayersApi - object-oriented interface
1701
+ */
1702
+ export class AdminPlayersApi extends BaseAPI {
1703
+ /**
1704
+ * Returns full detail for a single player including all known usernames and punishment scoring.
1705
+ * @summary Get player detail
1706
+ * @param {string} uuid Player Minecraft UUID
1707
+ * @param {*} [options] Override http request option.
1708
+ * @throws {RequiredError}
1709
+ */
1710
+ public getPlayer(uuid: string, options?: RawAxiosRequestConfig) {
1711
+ return AdminPlayersApiFp(this.configuration).getPlayer(uuid, options).then((request) => request(this.axios, this.basePath));
1712
+ }
1713
+
1714
+ /**
1715
+ * Returns up to 500 players ordered by most recently seen. Optionally filter by UUID or username substring.
1716
+ * @summary List players
1717
+ * @param {number} page Page number (1-indexed)
1718
+ * @param {number} limit Page size
1719
+ * @param {string | null} [search] Optional search string matched against UUID or username (case-insensitive substring)
1720
+ * @param {*} [options] Override http request option.
1721
+ * @throws {RequiredError}
1722
+ */
1723
+ public listPlayers(page: number, limit: number, search?: string | null, options?: RawAxiosRequestConfig) {
1724
+ return AdminPlayersApiFp(this.configuration).listPlayers(page, limit, search, options).then((request) => request(this.axios, this.basePath));
1725
+ }
1726
+ }
1727
+
1728
+
1729
+
1730
+ /**
1731
+ * AdminPunishmentsApi - axios parameter creator
1732
+ */
1733
+ export const AdminPunishmentsApiAxiosParamCreator = function (configuration?: Configuration) {
1734
+ return {
1735
+ /**
1736
+ * Returns a paginated list of punishments with optional filtering by player UUID, username, IP address, type, and date range.
1737
+ * @summary List punishments
1738
+ * @param {number} page Page number (1-indexed)
1739
+ * @param {number} limit Page size
1740
+ * @param {string | null} [uuid] Filter by player UUID
1741
+ * @param {string | null} [username] Filter by player username (case-insensitive substring match)
1742
+ * @param {string | null} [ipAddress] Filter by IP address
1743
+ * @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, KICK, WARNING). Repeatable.
1744
+ * @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (ms)
1745
+ * @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (ms)
1746
+ * @param {*} [options] Override http request option.
1747
+ * @throws {RequiredError}
1748
+ */
1749
+ getPunishments: async (page: number, limit: number, uuid?: string | null, username?: string | null, ipAddress?: string | null, type?: Array<string> | null, issuedAfter?: number | null, issuedBefore?: number | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1750
+ // verify required parameter 'page' is not null or undefined
1751
+ assertParamExists('getPunishments', 'page', page)
1752
+ // verify required parameter 'limit' is not null or undefined
1753
+ assertParamExists('getPunishments', 'limit', limit)
1754
+ const localVarPath = `/admin/punishment`;
1755
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1756
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1757
+ let baseOptions;
1758
+ if (configuration) {
1759
+ baseOptions = configuration.baseOptions;
1760
+ }
1761
+
1762
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1763
+ const localVarHeaderParameter = {} as any;
1764
+ const localVarQueryParameter = {} as any;
1765
+
1766
+ // authentication DiscordAuth required
1767
+ // http bearer authentication required
1768
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
1769
+
1770
+ if (uuid !== undefined) {
1771
+ localVarQueryParameter['uuid'] = uuid;
1772
+ }
1773
+
1774
+ if (username !== undefined) {
1775
+ localVarQueryParameter['username'] = username;
1776
+ }
1777
+
1778
+ if (ipAddress !== undefined) {
1779
+ localVarQueryParameter['ipAddress'] = ipAddress;
1780
+ }
1781
+
1782
+ if (type) {
1783
+ localVarQueryParameter['type'] = type.join(COLLECTION_FORMATS.csv);
1784
+ }
1785
+
1786
+ if (issuedAfter !== undefined) {
1787
+ localVarQueryParameter['issuedAfter'] = issuedAfter;
1788
+ }
1789
+
1790
+ if (issuedBefore !== undefined) {
1791
+ localVarQueryParameter['issuedBefore'] = issuedBefore;
1792
+ }
1793
+
1794
+ if (page !== undefined) {
1795
+ localVarQueryParameter['page'] = page;
1796
+ }
1797
+
1798
+ if (limit !== undefined) {
1799
+ localVarQueryParameter['limit'] = limit;
1800
+ }
1801
+
1802
+ localVarHeaderParameter['Accept'] = 'application/json';
1803
+
1804
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1805
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1806
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1807
+
1808
+ return {
1809
+ url: toPathString(localVarUrlObj),
1810
+ options: localVarRequestOptions,
1811
+ };
1812
+ },
1813
+ }
1814
+ };
1815
+
1816
+ /**
1817
+ * AdminPunishmentsApi - functional programming interface
1818
+ */
1819
+ export const AdminPunishmentsApiFp = function(configuration?: Configuration) {
1820
+ const localVarAxiosParamCreator = AdminPunishmentsApiAxiosParamCreator(configuration)
1821
+ return {
1822
+ /**
1823
+ * Returns a paginated list of punishments with optional filtering by player UUID, username, IP address, type, and date range.
1824
+ * @summary List punishments
1825
+ * @param {number} page Page number (1-indexed)
1826
+ * @param {number} limit Page size
1827
+ * @param {string | null} [uuid] Filter by player UUID
1828
+ * @param {string | null} [username] Filter by player username (case-insensitive substring match)
1829
+ * @param {string | null} [ipAddress] Filter by IP address
1830
+ * @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, KICK, WARNING). Repeatable.
1831
+ * @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (ms)
1832
+ * @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (ms)
1833
+ * @param {*} [options] Override http request option.
1834
+ * @throws {RequiredError}
1835
+ */
1836
+ async getPunishments(page: number, limit: number, uuid?: string | null, username?: string | null, ipAddress?: string | null, type?: Array<string> | null, issuedAfter?: number | null, issuedBefore?: number | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminPagedPunishmentResponse>> {
1837
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPunishments(page, limit, uuid, username, ipAddress, type, issuedAfter, issuedBefore, options);
1838
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1839
+ const localVarOperationServerBasePath = operationServerMap['AdminPunishmentsApi.getPunishments']?.[localVarOperationServerIndex]?.url;
1840
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1841
+ },
1842
+ }
1843
+ };
1844
+
1845
+ /**
1846
+ * AdminPunishmentsApi - factory interface
1847
+ */
1848
+ export const AdminPunishmentsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1849
+ const localVarFp = AdminPunishmentsApiFp(configuration)
1850
+ return {
1851
+ /**
1852
+ * Returns a paginated list of punishments with optional filtering by player UUID, username, IP address, type, and date range.
1853
+ * @summary List punishments
1854
+ * @param {number} page Page number (1-indexed)
1855
+ * @param {number} limit Page size
1856
+ * @param {string | null} [uuid] Filter by player UUID
1857
+ * @param {string | null} [username] Filter by player username (case-insensitive substring match)
1858
+ * @param {string | null} [ipAddress] Filter by IP address
1859
+ * @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, KICK, WARNING). Repeatable.
1860
+ * @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (ms)
1861
+ * @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (ms)
1862
+ * @param {*} [options] Override http request option.
1863
+ * @throws {RequiredError}
1864
+ */
1865
+ getPunishments(page: number, limit: number, uuid?: string | null, username?: string | null, ipAddress?: string | null, type?: Array<string> | null, issuedAfter?: number | null, issuedBefore?: number | null, options?: RawAxiosRequestConfig): AxiosPromise<AdminPagedPunishmentResponse> {
1866
+ return localVarFp.getPunishments(page, limit, uuid, username, ipAddress, type, issuedAfter, issuedBefore, options).then((request) => request(axios, basePath));
1867
+ },
1868
+ };
1869
+ };
1870
+
1871
+ /**
1872
+ * AdminPunishmentsApi - object-oriented interface
1873
+ */
1874
+ export class AdminPunishmentsApi extends BaseAPI {
1875
+ /**
1876
+ * Returns a paginated list of punishments with optional filtering by player UUID, username, IP address, type, and date range.
1877
+ * @summary List punishments
1878
+ * @param {number} page Page number (1-indexed)
1879
+ * @param {number} limit Page size
1880
+ * @param {string | null} [uuid] Filter by player UUID
1881
+ * @param {string | null} [username] Filter by player username (case-insensitive substring match)
1882
+ * @param {string | null} [ipAddress] Filter by IP address
1883
+ * @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, KICK, WARNING). Repeatable.
1884
+ * @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (ms)
1885
+ * @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (ms)
1886
+ * @param {*} [options] Override http request option.
1887
+ * @throws {RequiredError}
1888
+ */
1889
+ public getPunishments(page: number, limit: number, uuid?: string | null, username?: string | null, ipAddress?: string | null, type?: Array<string> | null, issuedAfter?: number | null, issuedBefore?: number | null, options?: RawAxiosRequestConfig) {
1890
+ return AdminPunishmentsApiFp(this.configuration).getPunishments(page, limit, uuid, username, ipAddress, type, issuedAfter, issuedBefore, options).then((request) => request(this.axios, this.basePath));
1891
+ }
1892
+ }
1893
+
1894
+
1895
+
1896
+ /**
1897
+ * ConnectionApi - axios parameter creator
1898
+ */
1899
+ export const ConnectionApiAxiosParamCreator = function (configuration?: Configuration) {
1900
+ return {
1901
+ /**
1902
+ * 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.
1903
+ * @summary Check Connection and Detect VPN/Proxy
1904
+ * @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
1905
+ * @param {boolean} forceRecheck 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
1906
+ * @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\&#39;s history - Update the player\&#39;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\&#39;t block the response.
1907
+ * @param {*} [options] Override http request option.
1908
+ * @throws {RequiredError}
1909
+ */
1910
+ getConnectionDetails: async (ip: string, forceRecheck: boolean, associateUuid?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1911
+ // verify required parameter 'ip' is not null or undefined
1912
+ assertParamExists('getConnectionDetails', 'ip', ip)
1913
+ // verify required parameter 'forceRecheck' is not null or undefined
1914
+ assertParamExists('getConnectionDetails', 'forceRecheck', forceRecheck)
1915
+ const localVarPath = `/v1/connection/get-connection-details/{ip}`
1916
+ .replace(`{${"ip"}}`, encodeURIComponent(String(ip)));
1917
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1918
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1919
+ let baseOptions;
1920
+ if (configuration) {
1921
+ baseOptions = configuration.baseOptions;
1922
+ }
1923
+
1924
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1925
+ const localVarHeaderParameter = {} as any;
1926
+ const localVarQueryParameter = {} as any;
1927
+
1928
+ // authentication DiscordAuth required
1929
+ // http bearer authentication required
1930
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
1931
+
1932
+ if (forceRecheck !== undefined) {
1933
+ localVarQueryParameter['force_recheck'] = forceRecheck;
1934
+ }
1935
+
1936
+ if (associateUuid !== undefined) {
1937
+ localVarQueryParameter['associate_uuid'] = associateUuid;
1938
+ }
1939
+
1940
+ localVarHeaderParameter['Accept'] = 'application/json';
1941
+
1942
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1943
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1944
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1945
+
1946
+ return {
1947
+ url: toPathString(localVarUrlObj),
1948
+ options: localVarRequestOptions,
1949
+ };
1950
+ },
1951
+ }
1952
+ };
1953
+
1954
+ /**
1955
+ * ConnectionApi - functional programming interface
1956
+ */
1957
+ export const ConnectionApiFp = function(configuration?: Configuration) {
1958
+ const localVarAxiosParamCreator = ConnectionApiAxiosParamCreator(configuration)
1959
+ return {
1960
+ /**
1961
+ * 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.
1962
+ * @summary Check Connection and Detect VPN/Proxy
1963
+ * @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
1964
+ * @param {boolean} forceRecheck 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
1965
+ * @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\&#39;s history - Update the player\&#39;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\&#39;t block the response.
1966
+ * @param {*} [options] Override http request option.
1967
+ * @throws {RequiredError}
1968
+ */
1969
+ async getConnectionDetails(ip: string, forceRecheck: boolean, associateUuid?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ConnectionGetConnectionDetailsResponse>> {
1970
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getConnectionDetails(ip, forceRecheck, associateUuid, options);
1971
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1972
+ const localVarOperationServerBasePath = operationServerMap['ConnectionApi.getConnectionDetails']?.[localVarOperationServerIndex]?.url;
1973
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1974
+ },
1975
+ }
1976
+ };
1977
+
1978
+ /**
1979
+ * ConnectionApi - factory interface
1337
1980
  */
1338
1981
  export const ConnectionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1339
1982
  const localVarFp = ConnectionApiFp(configuration)
@@ -1373,6 +2016,177 @@ export class ConnectionApi extends BaseAPI {
1373
2016
 
1374
2017
 
1375
2018
 
2019
+ /**
2020
+ * DefaultApi - axios parameter creator
2021
+ */
2022
+ export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) {
2023
+ return {
2024
+ /**
2025
+ *
2026
+ * @param {string | null} [code]
2027
+ * @param {string | null} [error]
2028
+ * @param {*} [options] Override http request option.
2029
+ * @throws {RequiredError}
2030
+ */
2031
+ callback: async (code?: string | null, error?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2032
+ const localVarPath = `/auth/discord/callback`;
2033
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2034
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2035
+ let baseOptions;
2036
+ if (configuration) {
2037
+ baseOptions = configuration.baseOptions;
2038
+ }
2039
+
2040
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2041
+ const localVarHeaderParameter = {} as any;
2042
+ const localVarQueryParameter = {} as any;
2043
+
2044
+ // authentication DiscordAuth required
2045
+ // http bearer authentication required
2046
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
2047
+
2048
+ if (code !== undefined) {
2049
+ localVarQueryParameter['code'] = code;
2050
+ }
2051
+
2052
+ if (error !== undefined) {
2053
+ localVarQueryParameter['error'] = error;
2054
+ }
2055
+
2056
+ localVarHeaderParameter['Accept'] = 'application/json';
2057
+
2058
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2059
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2060
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2061
+
2062
+ return {
2063
+ url: toPathString(localVarUrlObj),
2064
+ options: localVarRequestOptions,
2065
+ };
2066
+ },
2067
+ /**
2068
+ *
2069
+ * @param {*} [options] Override http request option.
2070
+ * @throws {RequiredError}
2071
+ */
2072
+ initiateLogin: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2073
+ const localVarPath = `/auth/discord`;
2074
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2075
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2076
+ let baseOptions;
2077
+ if (configuration) {
2078
+ baseOptions = configuration.baseOptions;
2079
+ }
2080
+
2081
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2082
+ const localVarHeaderParameter = {} as any;
2083
+ const localVarQueryParameter = {} as any;
2084
+
2085
+ // authentication DiscordAuth required
2086
+ // http bearer authentication required
2087
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
2088
+
2089
+ localVarHeaderParameter['Accept'] = 'application/json';
2090
+
2091
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2092
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2093
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2094
+
2095
+ return {
2096
+ url: toPathString(localVarUrlObj),
2097
+ options: localVarRequestOptions,
2098
+ };
2099
+ },
2100
+ }
2101
+ };
2102
+
2103
+ /**
2104
+ * DefaultApi - functional programming interface
2105
+ */
2106
+ export const DefaultApiFp = function(configuration?: Configuration) {
2107
+ const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration)
2108
+ return {
2109
+ /**
2110
+ *
2111
+ * @param {string | null} [code]
2112
+ * @param {string | null} [error]
2113
+ * @param {*} [options] Override http request option.
2114
+ * @throws {RequiredError}
2115
+ */
2116
+ async callback(code?: string | null, error?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
2117
+ const localVarAxiosArgs = await localVarAxiosParamCreator.callback(code, error, options);
2118
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2119
+ const localVarOperationServerBasePath = operationServerMap['DefaultApi.callback']?.[localVarOperationServerIndex]?.url;
2120
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2121
+ },
2122
+ /**
2123
+ *
2124
+ * @param {*} [options] Override http request option.
2125
+ * @throws {RequiredError}
2126
+ */
2127
+ async initiateLogin(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
2128
+ const localVarAxiosArgs = await localVarAxiosParamCreator.initiateLogin(options);
2129
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2130
+ const localVarOperationServerBasePath = operationServerMap['DefaultApi.initiateLogin']?.[localVarOperationServerIndex]?.url;
2131
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2132
+ },
2133
+ }
2134
+ };
2135
+
2136
+ /**
2137
+ * DefaultApi - factory interface
2138
+ */
2139
+ export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
2140
+ const localVarFp = DefaultApiFp(configuration)
2141
+ return {
2142
+ /**
2143
+ *
2144
+ * @param {string | null} [code]
2145
+ * @param {string | null} [error]
2146
+ * @param {*} [options] Override http request option.
2147
+ * @throws {RequiredError}
2148
+ */
2149
+ callback(code?: string | null, error?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<object> {
2150
+ return localVarFp.callback(code, error, options).then((request) => request(axios, basePath));
2151
+ },
2152
+ /**
2153
+ *
2154
+ * @param {*} [options] Override http request option.
2155
+ * @throws {RequiredError}
2156
+ */
2157
+ initiateLogin(options?: RawAxiosRequestConfig): AxiosPromise<object> {
2158
+ return localVarFp.initiateLogin(options).then((request) => request(axios, basePath));
2159
+ },
2160
+ };
2161
+ };
2162
+
2163
+ /**
2164
+ * DefaultApi - object-oriented interface
2165
+ */
2166
+ export class DefaultApi extends BaseAPI {
2167
+ /**
2168
+ *
2169
+ * @param {string | null} [code]
2170
+ * @param {string | null} [error]
2171
+ * @param {*} [options] Override http request option.
2172
+ * @throws {RequiredError}
2173
+ */
2174
+ public callback(code?: string | null, error?: string | null, options?: RawAxiosRequestConfig) {
2175
+ return DefaultApiFp(this.configuration).callback(code, error, options).then((request) => request(this.axios, this.basePath));
2176
+ }
2177
+
2178
+ /**
2179
+ *
2180
+ * @param {*} [options] Override http request option.
2181
+ * @throws {RequiredError}
2182
+ */
2183
+ public initiateLogin(options?: RawAxiosRequestConfig) {
2184
+ return DefaultApiFp(this.configuration).initiateLogin(options).then((request) => request(this.axios, this.basePath));
2185
+ }
2186
+ }
2187
+
2188
+
2189
+
1376
2190
  /**
1377
2191
  * PlayerApi - axios parameter creator
1378
2192
  */
@@ -1385,9 +2199,9 @@ export const PlayerApiAxiosParamCreator = function (configuration?: Configuratio
1385
2199
  * @param {*} [options] Override http request option.
1386
2200
  * @throws {RequiredError}
1387
2201
  */
1388
- getPlayer: async (uuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2202
+ getPlayer1: async (uuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1389
2203
  // verify required parameter 'uuid' is not null or undefined
1390
- assertParamExists('getPlayer', 'uuid', uuid)
2204
+ assertParamExists('getPlayer1', 'uuid', uuid)
1391
2205
  const localVarPath = `/v1/player/{uuid}`
1392
2206
  .replace(`{${"uuid"}}`, encodeURIComponent(String(uuid)));
1393
2207
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -1401,7 +2215,7 @@ export const PlayerApiAxiosParamCreator = function (configuration?: Configuratio
1401
2215
  const localVarHeaderParameter = {} as any;
1402
2216
  const localVarQueryParameter = {} as any;
1403
2217
 
1404
- // authentication CognitoAuth required
2218
+ // authentication DiscordAuth required
1405
2219
  // http bearer authentication required
1406
2220
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
1407
2221
 
@@ -1432,10 +2246,10 @@ export const PlayerApiFp = function(configuration?: Configuration) {
1432
2246
  * @param {*} [options] Override http request option.
1433
2247
  * @throws {RequiredError}
1434
2248
  */
1435
- async getPlayer(uuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PlayerGetPlayerInformation>> {
1436
- const localVarAxiosArgs = await localVarAxiosParamCreator.getPlayer(uuid, options);
2249
+ async getPlayer1(uuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PlayerGetPlayerInformation>> {
2250
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPlayer1(uuid, options);
1437
2251
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1438
- const localVarOperationServerBasePath = operationServerMap['PlayerApi.getPlayer']?.[localVarOperationServerIndex]?.url;
2252
+ const localVarOperationServerBasePath = operationServerMap['PlayerApi.getPlayer1']?.[localVarOperationServerIndex]?.url;
1439
2253
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1440
2254
  },
1441
2255
  }
@@ -1454,8 +2268,8 @@ export const PlayerApiFactory = function (configuration?: Configuration, basePat
1454
2268
  * @param {*} [options] Override http request option.
1455
2269
  * @throws {RequiredError}
1456
2270
  */
1457
- getPlayer(uuid: string, options?: RawAxiosRequestConfig): AxiosPromise<PlayerGetPlayerInformation> {
1458
- return localVarFp.getPlayer(uuid, options).then((request) => request(axios, basePath));
2271
+ getPlayer1(uuid: string, options?: RawAxiosRequestConfig): AxiosPromise<PlayerGetPlayerInformation> {
2272
+ return localVarFp.getPlayer1(uuid, options).then((request) => request(axios, basePath));
1459
2273
  },
1460
2274
  };
1461
2275
  };
@@ -1471,8 +2285,8 @@ export class PlayerApi extends BaseAPI {
1471
2285
  * @param {*} [options] Override http request option.
1472
2286
  * @throws {RequiredError}
1473
2287
  */
1474
- public getPlayer(uuid: string, options?: RawAxiosRequestConfig) {
1475
- return PlayerApiFp(this.configuration).getPlayer(uuid, options).then((request) => request(this.axios, this.basePath));
2288
+ public getPlayer1(uuid: string, options?: RawAxiosRequestConfig) {
2289
+ return PlayerApiFp(this.configuration).getPlayer1(uuid, options).then((request) => request(this.axios, this.basePath));
1476
2290
  }
1477
2291
  }
1478
2292
 
@@ -1505,7 +2319,7 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
1505
2319
  const localVarHeaderParameter = {} as any;
1506
2320
  const localVarQueryParameter = {} as any;
1507
2321
 
1508
- // authentication CognitoAuth required
2322
+ // authentication DiscordAuth required
1509
2323
  // http bearer authentication required
1510
2324
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
1511
2325
 
@@ -1544,7 +2358,7 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
1544
2358
  const localVarHeaderParameter = {} as any;
1545
2359
  const localVarQueryParameter = {} as any;
1546
2360
 
1547
- // authentication CognitoAuth required
2361
+ // authentication DiscordAuth required
1548
2362
  // http bearer authentication required
1549
2363
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
1550
2364
 
@@ -1580,7 +2394,7 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
1580
2394
  const localVarHeaderParameter = {} as any;
1581
2395
  const localVarQueryParameter = {} as any;
1582
2396
 
1583
- // authentication CognitoAuth required
2397
+ // authentication DiscordAuth required
1584
2398
  // http bearer authentication required
1585
2399
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
1586
2400
 
@@ -1605,7 +2419,7 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
1605
2419
  * @param {*} [options] Override http request option.
1606
2420
  * @throws {RequiredError}
1607
2421
  */
1608
- getPunishments: async (uuid?: string | null, username?: string | null, type?: Array<string> | null, since?: number | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2422
+ getPunishments1: async (uuid?: string | null, username?: string | null, type?: Array<string> | null, since?: number | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1609
2423
  const localVarPath = `/v1/punishment`;
1610
2424
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1611
2425
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -1618,7 +2432,7 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
1618
2432
  const localVarHeaderParameter = {} as any;
1619
2433
  const localVarQueryParameter = {} as any;
1620
2434
 
1621
- // authentication CognitoAuth required
2435
+ // authentication DiscordAuth required
1622
2436
  // http bearer authentication required
1623
2437
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
1624
2438
 
@@ -1671,7 +2485,7 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
1671
2485
  const localVarHeaderParameter = {} as any;
1672
2486
  const localVarQueryParameter = {} as any;
1673
2487
 
1674
- // authentication CognitoAuth required
2488
+ // authentication DiscordAuth required
1675
2489
  // http bearer authentication required
1676
2490
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
1677
2491
 
@@ -1722,7 +2536,7 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
1722
2536
  const localVarHeaderParameter = {} as any;
1723
2537
  const localVarQueryParameter = {} as any;
1724
2538
 
1725
- // authentication CognitoAuth required
2539
+ // authentication DiscordAuth required
1726
2540
  // http bearer authentication required
1727
2541
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
1728
2542
 
@@ -1830,10 +2644,10 @@ export const PunishmentApiFp = function(configuration?: Configuration) {
1830
2644
  * @param {*} [options] Override http request option.
1831
2645
  * @throws {RequiredError}
1832
2646
  */
1833
- async getPunishments(uuid?: string | null, username?: string | null, type?: Array<string> | null, since?: number | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<PunishmentGetPunishmentResponse>>> {
1834
- const localVarAxiosArgs = await localVarAxiosParamCreator.getPunishments(uuid, username, type, since, options);
2647
+ async getPunishments1(uuid?: string | null, username?: string | null, type?: Array<string> | null, since?: number | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<PunishmentGetPunishmentResponse>>> {
2648
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPunishments1(uuid, username, type, since, options);
1835
2649
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1836
- const localVarOperationServerBasePath = operationServerMap['PunishmentApi.getPunishments']?.[localVarOperationServerIndex]?.url;
2650
+ const localVarOperationServerBasePath = operationServerMap['PunishmentApi.getPunishments1']?.[localVarOperationServerIndex]?.url;
1837
2651
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1838
2652
  },
1839
2653
  /**
@@ -1918,8 +2732,8 @@ export const PunishmentApiFactory = function (configuration?: Configuration, bas
1918
2732
  * @param {*} [options] Override http request option.
1919
2733
  * @throws {RequiredError}
1920
2734
  */
1921
- getPunishments(uuid?: string | null, username?: string | null, type?: Array<string> | null, since?: number | null, options?: RawAxiosRequestConfig): AxiosPromise<Array<PunishmentGetPunishmentResponse>> {
1922
- return localVarFp.getPunishments(uuid, username, type, since, options).then((request) => request(axios, basePath));
2735
+ getPunishments1(uuid?: string | null, username?: string | null, type?: Array<string> | null, since?: number | null, options?: RawAxiosRequestConfig): AxiosPromise<Array<PunishmentGetPunishmentResponse>> {
2736
+ return localVarFp.getPunishments1(uuid, username, type, since, options).then((request) => request(axios, basePath));
1923
2737
  },
1924
2738
  /**
1925
2739
  * Retrieve all active punishments associated with an IP address
@@ -1998,8 +2812,8 @@ export class PunishmentApi extends BaseAPI {
1998
2812
  * @param {*} [options] Override http request option.
1999
2813
  * @throws {RequiredError}
2000
2814
  */
2001
- public getPunishments(uuid?: string | null, username?: string | null, type?: Array<string> | null, since?: number | null, options?: RawAxiosRequestConfig) {
2002
- return PunishmentApiFp(this.configuration).getPunishments(uuid, username, type, since, options).then((request) => request(this.axios, this.basePath));
2815
+ public getPunishments1(uuid?: string | null, username?: string | null, type?: Array<string> | null, since?: number | null, options?: RawAxiosRequestConfig) {
2816
+ return PunishmentApiFp(this.configuration).getPunishments1(uuid, username, type, since, options).then((request) => request(this.axios, this.basePath));
2003
2817
  }
2004
2818
 
2005
2819
  /**