@rebornteam/reborn-api 2.6.0 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/.openapi-generator/FILES +19 -5
  2. package/README.md +33 -11
  3. package/api.ts +1572 -588
  4. package/base.ts +1 -1
  5. package/common.ts +1 -1
  6. package/configuration.ts +1 -1
  7. package/dist/api.d.ts +776 -248
  8. package/dist/api.js +1264 -467
  9. package/dist/base.d.ts +1 -1
  10. package/dist/base.js +1 -1
  11. package/dist/common.d.ts +1 -1
  12. package/dist/common.js +1 -1
  13. package/dist/configuration.d.ts +1 -1
  14. package/dist/configuration.js +1 -1
  15. package/dist/esm/api.d.ts +776 -248
  16. package/dist/esm/api.js +1243 -454
  17. package/dist/esm/base.d.ts +1 -1
  18. package/dist/esm/base.js +1 -1
  19. package/dist/esm/common.d.ts +1 -1
  20. package/dist/esm/common.js +1 -1
  21. package/dist/esm/configuration.d.ts +1 -1
  22. package/dist/esm/configuration.js +1 -1
  23. package/dist/esm/index.d.ts +1 -1
  24. package/dist/esm/index.js +1 -1
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.js +1 -1
  27. package/docs/AdminApplyPunishmentRequest.md +33 -0
  28. package/docs/AdminApplyPunishmentResponse.md +21 -0
  29. package/docs/AdminApplyPunishmentResult.md +33 -0
  30. package/docs/AdminCreatePunishmentDraftRequest.md +31 -0
  31. package/docs/AdminIpSearchResult.md +23 -0
  32. package/docs/AdminPagedPunishmentResponse.md +1 -1
  33. package/docs/AdminPlayerSearchResult.md +23 -0
  34. package/docs/AdminPunishmentDraftResponse.md +21 -0
  35. package/docs/AdminPunishmentEvaluation.md +39 -0
  36. package/docs/AdminPunishmentListItem.md +42 -0
  37. package/docs/AdminPunishmentSearchResponse.md +25 -0
  38. package/docs/AdminPunishmentTarget.md +23 -0
  39. package/docs/AdminPunishmentsApi.md +168 -2
  40. package/docs/AuthenticationApi.md +167 -0
  41. package/docs/ChatApi.md +121 -0
  42. package/docs/ChatMessageDTO.md +30 -0
  43. package/docs/ChatMessageRequest.md +26 -0
  44. package/docs/PlayerApi.md +56 -3
  45. package/docs/PunishmentApi.md +0 -106
  46. package/docs/PunishmentGetPunishmentResponse.md +5 -3
  47. package/docs/ServerRegisterRequest.md +24 -0
  48. package/docs/ServerSessionDTO.md +36 -0
  49. package/docs/ServerSessionsApi.md +261 -0
  50. package/docs/TokenRequest.md +24 -0
  51. package/index.ts +1 -1
  52. package/package.json +1 -1
  53. package/docs/ApplyPunishmentRequest.md +0 -31
  54. package/docs/ApplyPunishmentResponse.md +0 -33
  55. package/docs/CreatePunishmentDraftRequest.md +0 -29
  56. package/docs/DefaultApi.md +0 -105
  57. package/docs/PunishmentDraftResponse.md +0 -39
package/api.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Reborn API
5
5
  * The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
6
6
  *
7
- * The version of the OpenAPI document: 2.6.0
7
+ * The version of the OpenAPI document: 2.7.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -23,6 +23,90 @@ import type { RequestArgs } from './base';
23
23
  // @ts-ignore
24
24
  import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
25
25
 
26
+ /**
27
+ * Request to apply a punishment to one or more targets
28
+ */
29
+ export interface AdminApplyPunishmentRequest {
30
+ /**
31
+ * List of targets to punish — each must have either a uuid or ipAddress
32
+ */
33
+ 'targets': Array<AdminPunishmentTarget>;
34
+ /**
35
+ * Punishment type
36
+ */
37
+ 'type': AdminApplyPunishmentRequestTypeEnum;
38
+ /**
39
+ * Severity level: 1=Minor, 2=Moderate, 3=Severe, 4=Critical
40
+ */
41
+ 'severity'?: number;
42
+ /**
43
+ * Reason for the punishment
44
+ */
45
+ 'reason': string;
46
+ /**
47
+ * Custom duration in seconds — if omitted the suggested duration for the type and severity is used
48
+ */
49
+ 'durationSeconds'?: number | null;
50
+ /**
51
+ * Force the punishment to be permanent regardless of the target\'s current score
52
+ */
53
+ 'forcePermanent'?: boolean;
54
+ /**
55
+ * Internal notes visible only to administrators — not shown to the punished player
56
+ */
57
+ 'notes'?: string | null;
58
+ }
59
+
60
+ export const AdminApplyPunishmentRequestTypeEnum = {
61
+ Ban: 'BAN',
62
+ Mute: 'MUTE',
63
+ Warning: 'WARNING'
64
+ } as const;
65
+
66
+ export type AdminApplyPunishmentRequestTypeEnum = typeof AdminApplyPunishmentRequestTypeEnum[keyof typeof AdminApplyPunishmentRequestTypeEnum];
67
+
68
+ /**
69
+ * Batch punishment apply result — one result per target
70
+ */
71
+ export interface AdminApplyPunishmentResponse {
72
+ /**
73
+ * Ordered list of results, one per target in the request
74
+ */
75
+ 'results'?: Array<AdminApplyPunishmentResult>;
76
+ }
77
+ /**
78
+ * Result of applying a punishment to a single target
79
+ */
80
+ export interface AdminApplyPunishmentResult {
81
+ /**
82
+ * The target this result applies to
83
+ */
84
+ 'target'?: AdminPunishmentTarget;
85
+ /**
86
+ * ID of the created punishment record
87
+ */
88
+ 'punishmentId'?: number;
89
+ /**
90
+ * Punishment type applied
91
+ */
92
+ 'type'?: string;
93
+ /**
94
+ * Severity level applied
95
+ */
96
+ 'severity'?: number;
97
+ /**
98
+ * Updated punishment score after applying
99
+ */
100
+ 'newScore'?: number;
101
+ /**
102
+ * Whether the punishment was made permanent
103
+ */
104
+ 'isPermanent'?: boolean;
105
+ /**
106
+ * When the punishment expires — null if permanent or a WARNING
107
+ */
108
+ 'expiresAt'?: string | null;
109
+ }
26
110
  /**
27
111
  * Client credential response
28
112
  */
@@ -81,6 +165,44 @@ export interface AdminConnectionBypassResponse {
81
165
  */
82
166
  'createdAt'?: string;
83
167
  }
168
+ /**
169
+ * Request to evaluate the impact of a punishment across one or more targets before applying
170
+ */
171
+ export interface AdminCreatePunishmentDraftRequest {
172
+ /**
173
+ * List of targets to evaluate — each must have either a uuid or ipAddress
174
+ */
175
+ 'targets': Array<AdminPunishmentTarget>;
176
+ /**
177
+ * Punishment type
178
+ */
179
+ 'type': AdminCreatePunishmentDraftRequestTypeEnum;
180
+ /**
181
+ * Severity level: 1=Minor, 2=Moderate, 3=Severe, 4=Critical
182
+ */
183
+ 'severity'?: number;
184
+ /**
185
+ * Reason for the punishment (not used in evaluation, required for apply)
186
+ */
187
+ 'reason': string;
188
+ /**
189
+ * Custom duration in seconds — if omitted the suggested duration for the type and severity is used
190
+ */
191
+ 'durationSeconds'?: number | null;
192
+ /**
193
+ * Force the punishment to be permanent regardless of the target\'s current score
194
+ */
195
+ 'forcePermanent'?: boolean;
196
+ }
197
+
198
+ export const AdminCreatePunishmentDraftRequestTypeEnum = {
199
+ Ban: 'BAN',
200
+ Mute: 'MUTE',
201
+ Warning: 'WARNING'
202
+ } as const;
203
+
204
+ export type AdminCreatePunishmentDraftRequestTypeEnum = typeof AdminCreatePunishmentDraftRequestTypeEnum[keyof typeof AdminCreatePunishmentDraftRequestTypeEnum];
205
+
84
206
  export interface AdminDashboardConnectionResponse {
85
207
  'id': number;
86
208
  'ipAddress': string;
@@ -98,6 +220,19 @@ export interface AdminGetDashboardStats {
98
220
  'totalConnections': number;
99
221
  'totalClients': number;
100
222
  }
223
+ /**
224
+ * A single IP address match in a punishment search, with all players ever seen on that IP
225
+ */
226
+ export interface AdminIpSearchResult {
227
+ /**
228
+ * IP address
229
+ */
230
+ 'ipAddress'?: string;
231
+ /**
232
+ * Players ever seen on this IP
233
+ */
234
+ 'players'?: Array<AdminPlayerSearchResult>;
235
+ }
101
236
  /**
102
237
  * Paginated connection list response
103
238
  */
@@ -155,7 +290,7 @@ export interface AdminPagedPunishmentResponse {
155
290
  /**
156
291
  * Punishments on the current page
157
292
  */
158
- 'data'?: Array<PunishmentGetPunishmentResponse>;
293
+ 'data'?: Array<AdminPunishmentListItem>;
159
294
  /**
160
295
  * Total number of punishments matching the filters
161
296
  */
@@ -214,6 +349,19 @@ export interface AdminPlayerDetailResponse {
214
349
  */
215
350
  'usernameHistory'?: Array<AdminUsernameHistoryEntry>;
216
351
  }
352
+ /**
353
+ * Lightweight player reference used in search results and punishment evaluations
354
+ */
355
+ export interface AdminPlayerSearchResult {
356
+ /**
357
+ * Player Minecraft UUID
358
+ */
359
+ 'uuid'?: string;
360
+ /**
361
+ * Most recently seen username, null if never recorded
362
+ */
363
+ 'username'?: string | null;
364
+ }
217
365
  /**
218
366
  * Summary of a player record, used in list views
219
367
  */
@@ -252,79 +400,137 @@ export interface AdminPlayerSummary {
252
400
  'punishmentPointsPercent'?: number;
253
401
  }
254
402
  /**
255
- * A single entry in a player\'s username history
403
+ * Batch punishment draft one evaluation per target
256
404
  */
257
- export interface AdminUsernameHistoryEntry {
258
- /**
259
- * The username at this point in time
260
- */
261
- 'username'?: string;
405
+ export interface AdminPunishmentDraftResponse {
262
406
  /**
263
- * When this username was first observed (ISO-8601)
407
+ * Ordered list of evaluations, one per target in the request
264
408
  */
265
- 'changedAt'?: string;
409
+ 'evaluations'?: Array<AdminPunishmentEvaluation>;
266
410
  }
267
411
  /**
268
- * Request to apply a punishment to a player
412
+ * Evaluation of a punishment\'s impact on a single target
269
413
  */
270
- export interface ApplyPunishmentRequest {
414
+ export interface AdminPunishmentEvaluation {
271
415
  /**
272
- * Player UUID to punish
416
+ * The target this evaluation applies to
273
417
  */
274
- 'playerUuid': string;
418
+ 'target'?: AdminPunishmentTarget;
275
419
  /**
276
- * Reason for the punishment
420
+ * Players affected — one player for UUID targets, all players on the IP for connection targets
277
421
  */
278
- 'reason': string;
422
+ 'affectedPlayers'?: Array<AdminPlayerSearchResult>;
279
423
  /**
280
- * Type of punishment
424
+ * Current punishment score before applying this punishment (0–100+)
281
425
  */
282
- 'type': string;
426
+ 'currentScore'?: number;
283
427
  /**
284
- * Severity level of the punishment (1-10)
428
+ * Points this punishment would add to the score
285
429
  */
286
- 'severity': number;
430
+ 'pointsToAdd'?: number;
287
431
  /**
288
- * Staff member applying the punishment
432
+ * Projected score after applying this punishment
289
433
  */
290
- 'createdBy': string;
434
+ 'newScore'?: number;
435
+ /**
436
+ * Whether this punishment would be permanent based on the current score threshold
437
+ */
438
+ 'willBePermanent'?: boolean;
291
439
  /**
292
- * Duration of the punishment in seconds. Null means permanent.
440
+ * Resolved duration in seconds null if permanent or a WARNING
293
441
  */
294
442
  'durationSeconds'?: number | null;
443
+ /**
444
+ * Number of existing punishments on this target
445
+ */
446
+ 'previousPunishmentCount'?: number;
447
+ /**
448
+ * True when the target is an IP address (connection punishment) rather than a player UUID
449
+ */
450
+ 'isConnectionTarget'?: boolean;
451
+ /**
452
+ * The effective punishment type that will be applied — may differ from the requested type if escalated to BAN at threshold
453
+ */
454
+ 'effectiveType'?: string;
455
+ }
456
+ export interface AdminPunishmentListItem {
457
+ 'id': number;
458
+ 'reason': string;
459
+ 'notes'?: string | null;
460
+ 'type': string;
461
+ 'severity': number;
462
+ 'createdBy': string;
463
+ 'expiresAt'?: string | null;
464
+ 'createdAt': string;
465
+ 'targetType': string;
466
+ 'targetUuid'?: string | null;
467
+ 'targetUsername'?: string | null;
468
+ 'targetIp'?: string | null;
295
469
  }
296
470
  /**
297
- * Response after applying a punishment
471
+ * Result of a punishment target search — either a list of matching players or a list of matching IP addresses
298
472
  */
299
- export interface ApplyPunishmentResponse {
473
+ export interface AdminPunishmentSearchResponse {
300
474
  /**
301
- * ID of the created punishment
475
+ * Search kind \'player\' for UUID/username searches, \'ip\' for IP address searches
302
476
  */
303
- 'punishmentId'?: number;
477
+ 'kind'?: AdminPunishmentSearchResponseKindEnum;
304
478
  /**
305
- * Player UUID punished
479
+ * Matching players — only populated when kind=\'player\'
306
480
  */
307
- 'playerUuid'?: string;
481
+ 'players'?: Array<AdminPlayerSearchResult>;
308
482
  /**
309
- * Type of punishment applied
483
+ * Matching IP addresses with their associated players — only populated when kind=\'ip\'
310
484
  */
311
- 'type'?: string;
485
+ 'ipResults'?: Array<AdminIpSearchResult>;
486
+ }
487
+
488
+ export const AdminPunishmentSearchResponseKindEnum = {
489
+ Player: 'player',
490
+ Ip: 'ip'
491
+ } as const;
492
+
493
+ export type AdminPunishmentSearchResponseKindEnum = typeof AdminPunishmentSearchResponseKindEnum[keyof typeof AdminPunishmentSearchResponseKindEnum];
494
+
495
+ /**
496
+ * A target for a punishment — either a player UUID or an IP address (mutually exclusive)
497
+ */
498
+ export interface AdminPunishmentTarget {
312
499
  /**
313
- * Severity level (1-10)
500
+ * Player Minecraft UUID
314
501
  */
315
- 'severity'?: number;
502
+ 'uuid'?: string | null;
316
503
  /**
317
- * New total punishment score after applying
504
+ * IP address — when specified, the punishment is linked to the connection record and all players on that IP are shown as affected
318
505
  */
319
- 'newScore'?: number;
506
+ 'ipAddress'?: string | null;
507
+ }
508
+ /**
509
+ * A single entry in a player\'s username history
510
+ */
511
+ export interface AdminUsernameHistoryEntry {
320
512
  /**
321
- * Whether this punishment is permanent
513
+ * The username at this point in time
322
514
  */
323
- 'isPermanent'?: boolean;
515
+ 'username'?: string;
324
516
  /**
325
- * Timestamp when punishment expires (ISO-8601 format, null if permanent)
517
+ * When this username was first observed (ISO-8601)
326
518
  */
327
- 'expiresAt'?: string;
519
+ 'changedAt'?: string;
520
+ }
521
+ export interface ChatMessageDTO {
522
+ 'id': number;
523
+ 'sentAt': string;
524
+ 'sessionId': string;
525
+ 'playerUuid': string;
526
+ 'message': string;
527
+ 'channel': string;
528
+ }
529
+ export interface ChatMessageRequest {
530
+ 'sessionId': string;
531
+ 'playerUuid': string;
532
+ 'message': string;
533
+ 'channel'?: string | null;
328
534
  }
329
535
  /**
330
536
  * Request to create new client credentials
@@ -390,31 +596,6 @@ export interface CreateBypassRequest {
390
596
  */
391
597
  'expiresAtEpoch': number;
392
598
  }
393
- /**
394
- * Request to create a punishment draft for preview before applying
395
- */
396
- export interface CreatePunishmentDraftRequest {
397
- /**
398
- * Player UUID to punish
399
- */
400
- 'playerUuid': string;
401
- /**
402
- * Reason for the punishment
403
- */
404
- 'reason': string;
405
- /**
406
- * Type of punishment
407
- */
408
- 'type': string;
409
- /**
410
- * Severity level of the punishment (1-10)
411
- */
412
- 'severity': number;
413
- /**
414
- * Duration of the punishment in seconds. Null means permanent.
415
- */
416
- 'durationSeconds'?: number | null;
417
- }
418
599
  /**
419
600
  * Player information including join history, tracking data, and punishment scoring
420
601
  */
@@ -436,51 +617,6 @@ export interface PlayerGetPlayerInformation {
436
617
  */
437
618
  'punishmentPointsPercent'?: number;
438
619
  }
439
- /**
440
- * Response containing punishment draft preview with calculated points and thresholds
441
- */
442
- export interface PunishmentDraftResponse {
443
- /**
444
- * Player UUID this punishment would apply to
445
- */
446
- 'playerUuid'?: string;
447
- /**
448
- * Reason for the punishment
449
- */
450
- 'reason'?: string;
451
- /**
452
- * Type of punishment
453
- */
454
- 'type'?: string;
455
- /**
456
- * Severity level (1-10)
457
- */
458
- 'severity'?: number;
459
- /**
460
- * Current total punishment score before applying this punishment
461
- */
462
- 'currentScore'?: number;
463
- /**
464
- * Points this punishment would add
465
- */
466
- 'pointsToAdd'?: number;
467
- /**
468
- * New total score after applying this punishment
469
- */
470
- 'newScore'?: number;
471
- /**
472
- * Whether this punishment will be permanent
473
- */
474
- 'willBePermanent'?: boolean;
475
- /**
476
- * Duration in seconds (null if permanent)
477
- */
478
- 'durationSeconds'?: number;
479
- /**
480
- * Number of previous punishments for this player
481
- */
482
- 'previousPunishmentCount'?: number;
483
- }
484
620
  /**
485
621
  * Punishment information including reason, type, creator, and expiration
486
622
  */
@@ -490,15 +626,19 @@ export interface PunishmentGetPunishmentResponse {
490
626
  */
491
627
  'id'?: number;
492
628
  /**
493
- * Reason for the punishment
629
+ * Reason for the punishment, shown to the punished player
494
630
  */
495
631
  'reason'?: string;
496
632
  /**
497
- * Type of punishment (e.g., BAN, MUTE, KICK, WARNING)
633
+ * Internal administrator notes not shown to the punished player
634
+ */
635
+ 'notes'?: string | null;
636
+ /**
637
+ * Type of punishment (BAN, MUTE, WARNING)
498
638
  */
499
639
  'type'?: string;
500
640
  /**
501
- * Severity level of the punishment (1-10, where 10 is most severe)
641
+ * Severity level (1=Minor, 2=Moderate, 3=Severe, 4=Critical)
502
642
  */
503
643
  'severity'?: number;
504
644
  /**
@@ -549,6 +689,27 @@ export interface PunishmentSeveritiesResponseSeverityInfo {
549
689
  */
550
690
  'durationSeconds'?: number;
551
691
  }
692
+ export interface ServerRegisterRequest {
693
+ 'region': string;
694
+ 'gameType': string;
695
+ 'containerId'?: string | null;
696
+ }
697
+ export interface ServerSessionDTO {
698
+ 'id': string;
699
+ 'region': string;
700
+ 'gameType': string;
701
+ 'instanceName': string;
702
+ 'containerId'?: string | null;
703
+ 'startedAt': string;
704
+ 'lastHeartbeat': string;
705
+ 'endedAt'?: string | null;
706
+ 'online': boolean;
707
+ }
708
+ export interface TokenRequest {
709
+ 'grant_type'?: string | null;
710
+ 'client_id'?: string | null;
711
+ 'client_secret'?: string | null;
712
+ }
552
713
  /**
553
714
  * Request to update client metadata
554
715
  */
@@ -1733,25 +1894,16 @@ export class AdminPlayersApi extends BaseAPI {
1733
1894
  export const AdminPunishmentsApiAxiosParamCreator = function (configuration?: Configuration) {
1734
1895
  return {
1735
1896
  /**
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)
1897
+ * Apply a punishment to one or more targets. Player targets are linked via player_punishment; IP targets are linked via connection_punishment. The authenticated user is recorded as the issuer.
1898
+ * @summary Apply punishment
1899
+ * @param {AdminApplyPunishmentRequest} adminApplyPunishmentRequest
1746
1900
  * @param {*} [options] Override http request option.
1747
1901
  * @throws {RequiredError}
1748
1902
  */
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`;
1903
+ applyPunishment: async (adminApplyPunishmentRequest: AdminApplyPunishmentRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1904
+ // verify required parameter 'adminApplyPunishmentRequest' is not null or undefined
1905
+ assertParamExists('applyPunishment', 'adminApplyPunishmentRequest', adminApplyPunishmentRequest)
1906
+ const localVarPath = `/admin/punishment/apply`;
1755
1907
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1756
1908
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1757
1909
  let baseOptions;
@@ -1759,7 +1911,7 @@ export const AdminPunishmentsApiAxiosParamCreator = function (configuration?: Co
1759
1911
  baseOptions = configuration.baseOptions;
1760
1912
  }
1761
1913
 
1762
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1914
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
1763
1915
  const localVarHeaderParameter = {} as any;
1764
1916
  const localVarQueryParameter = {} as any;
1765
1917
 
@@ -1767,12 +1919,99 @@ export const AdminPunishmentsApiAxiosParamCreator = function (configuration?: Co
1767
1919
  // http bearer authentication required
1768
1920
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
1769
1921
 
1770
- if (uuid !== undefined) {
1771
- localVarQueryParameter['uuid'] = uuid;
1772
- }
1922
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1923
+ localVarHeaderParameter['Accept'] = 'application/json';
1773
1924
 
1774
- if (username !== undefined) {
1775
- localVarQueryParameter['username'] = username;
1925
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1926
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1927
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1928
+ localVarRequestOptions.data = serializeDataIfNeeded(adminApplyPunishmentRequest, localVarRequestOptions, configuration)
1929
+
1930
+ return {
1931
+ url: toPathString(localVarUrlObj),
1932
+ options: localVarRequestOptions,
1933
+ };
1934
+ },
1935
+ /**
1936
+ * Preview the impact of a punishment across one or more targets. Returns current score, points to add, projected new score, and affected players per target. No changes are made.
1937
+ * @summary Evaluate punishment impact
1938
+ * @param {AdminCreatePunishmentDraftRequest} adminCreatePunishmentDraftRequest
1939
+ * @param {*} [options] Override http request option.
1940
+ * @throws {RequiredError}
1941
+ */
1942
+ createDraft: async (adminCreatePunishmentDraftRequest: AdminCreatePunishmentDraftRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1943
+ // verify required parameter 'adminCreatePunishmentDraftRequest' is not null or undefined
1944
+ assertParamExists('createDraft', 'adminCreatePunishmentDraftRequest', adminCreatePunishmentDraftRequest)
1945
+ const localVarPath = `/admin/punishment/draft`;
1946
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1947
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1948
+ let baseOptions;
1949
+ if (configuration) {
1950
+ baseOptions = configuration.baseOptions;
1951
+ }
1952
+
1953
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
1954
+ const localVarHeaderParameter = {} as any;
1955
+ const localVarQueryParameter = {} as any;
1956
+
1957
+ // authentication DiscordAuth required
1958
+ // http bearer authentication required
1959
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
1960
+
1961
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1962
+ localVarHeaderParameter['Accept'] = 'application/json';
1963
+
1964
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1965
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1966
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1967
+ localVarRequestOptions.data = serializeDataIfNeeded(adminCreatePunishmentDraftRequest, localVarRequestOptions, configuration)
1968
+
1969
+ return {
1970
+ url: toPathString(localVarUrlObj),
1971
+ options: localVarRequestOptions,
1972
+ };
1973
+ },
1974
+ /**
1975
+ * Returns a paginated list of punishments with optional filtering by player UUID, username, IP address, type, and date range.
1976
+ * @summary List punishments
1977
+ * @param {number} page Page number (1-indexed)
1978
+ * @param {number} limit Page size
1979
+ * @param {string | null} [uuid] Filter by player UUID
1980
+ * @param {string | null} [username] Filter by player username (case-insensitive substring match)
1981
+ * @param {string | null} [ipAddress] Filter by IP address
1982
+ * @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, WARNING). Repeatable.
1983
+ * @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (ms)
1984
+ * @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (ms)
1985
+ * @param {*} [options] Override http request option.
1986
+ * @throws {RequiredError}
1987
+ */
1988
+ 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> => {
1989
+ // verify required parameter 'page' is not null or undefined
1990
+ assertParamExists('getPunishments', 'page', page)
1991
+ // verify required parameter 'limit' is not null or undefined
1992
+ assertParamExists('getPunishments', 'limit', limit)
1993
+ const localVarPath = `/admin/punishment`;
1994
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1995
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1996
+ let baseOptions;
1997
+ if (configuration) {
1998
+ baseOptions = configuration.baseOptions;
1999
+ }
2000
+
2001
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2002
+ const localVarHeaderParameter = {} as any;
2003
+ const localVarQueryParameter = {} as any;
2004
+
2005
+ // authentication DiscordAuth required
2006
+ // http bearer authentication required
2007
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
2008
+
2009
+ if (uuid !== undefined) {
2010
+ localVarQueryParameter['uuid'] = uuid;
2011
+ }
2012
+
2013
+ if (username !== undefined) {
2014
+ localVarQueryParameter['username'] = username;
1776
2015
  }
1777
2016
 
1778
2017
  if (ipAddress !== undefined) {
@@ -1805,6 +2044,47 @@ export const AdminPunishmentsApiAxiosParamCreator = function (configuration?: Co
1805
2044
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1806
2045
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1807
2046
 
2047
+ return {
2048
+ url: toPathString(localVarUrlObj),
2049
+ options: localVarRequestOptions,
2050
+ };
2051
+ },
2052
+ /**
2053
+ * Search for players by UUID or username, or look up all players associated with an IP address. Used to populate the target table before issuing a punishment.
2054
+ * @summary Search punishment targets
2055
+ * @param {string} q UUID, username, or partial/full IP address to search for
2056
+ * @param {*} [options] Override http request option.
2057
+ * @throws {RequiredError}
2058
+ */
2059
+ searchTargets: async (q: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2060
+ // verify required parameter 'q' is not null or undefined
2061
+ assertParamExists('searchTargets', 'q', q)
2062
+ const localVarPath = `/admin/punishment/search`;
2063
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2064
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2065
+ let baseOptions;
2066
+ if (configuration) {
2067
+ baseOptions = configuration.baseOptions;
2068
+ }
2069
+
2070
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2071
+ const localVarHeaderParameter = {} as any;
2072
+ const localVarQueryParameter = {} as any;
2073
+
2074
+ // authentication DiscordAuth required
2075
+ // http bearer authentication required
2076
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
2077
+
2078
+ if (q !== undefined) {
2079
+ localVarQueryParameter['q'] = q;
2080
+ }
2081
+
2082
+ localVarHeaderParameter['Accept'] = 'application/json';
2083
+
2084
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2085
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2086
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2087
+
1808
2088
  return {
1809
2089
  url: toPathString(localVarUrlObj),
1810
2090
  options: localVarRequestOptions,
@@ -1819,6 +2099,32 @@ export const AdminPunishmentsApiAxiosParamCreator = function (configuration?: Co
1819
2099
  export const AdminPunishmentsApiFp = function(configuration?: Configuration) {
1820
2100
  const localVarAxiosParamCreator = AdminPunishmentsApiAxiosParamCreator(configuration)
1821
2101
  return {
2102
+ /**
2103
+ * Apply a punishment to one or more targets. Player targets are linked via player_punishment; IP targets are linked via connection_punishment. The authenticated user is recorded as the issuer.
2104
+ * @summary Apply punishment
2105
+ * @param {AdminApplyPunishmentRequest} adminApplyPunishmentRequest
2106
+ * @param {*} [options] Override http request option.
2107
+ * @throws {RequiredError}
2108
+ */
2109
+ async applyPunishment(adminApplyPunishmentRequest: AdminApplyPunishmentRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminApplyPunishmentResponse>> {
2110
+ const localVarAxiosArgs = await localVarAxiosParamCreator.applyPunishment(adminApplyPunishmentRequest, options);
2111
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2112
+ const localVarOperationServerBasePath = operationServerMap['AdminPunishmentsApi.applyPunishment']?.[localVarOperationServerIndex]?.url;
2113
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2114
+ },
2115
+ /**
2116
+ * Preview the impact of a punishment across one or more targets. Returns current score, points to add, projected new score, and affected players per target. No changes are made.
2117
+ * @summary Evaluate punishment impact
2118
+ * @param {AdminCreatePunishmentDraftRequest} adminCreatePunishmentDraftRequest
2119
+ * @param {*} [options] Override http request option.
2120
+ * @throws {RequiredError}
2121
+ */
2122
+ async createDraft(adminCreatePunishmentDraftRequest: AdminCreatePunishmentDraftRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminPunishmentDraftResponse>> {
2123
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createDraft(adminCreatePunishmentDraftRequest, options);
2124
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2125
+ const localVarOperationServerBasePath = operationServerMap['AdminPunishmentsApi.createDraft']?.[localVarOperationServerIndex]?.url;
2126
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2127
+ },
1822
2128
  /**
1823
2129
  * Returns a paginated list of punishments with optional filtering by player UUID, username, IP address, type, and date range.
1824
2130
  * @summary List punishments
@@ -1827,7 +2133,7 @@ export const AdminPunishmentsApiFp = function(configuration?: Configuration) {
1827
2133
  * @param {string | null} [uuid] Filter by player UUID
1828
2134
  * @param {string | null} [username] Filter by player username (case-insensitive substring match)
1829
2135
  * @param {string | null} [ipAddress] Filter by IP address
1830
- * @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, KICK, WARNING). Repeatable.
2136
+ * @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, WARNING). Repeatable.
1831
2137
  * @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (ms)
1832
2138
  * @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (ms)
1833
2139
  * @param {*} [options] Override http request option.
@@ -1839,6 +2145,19 @@ export const AdminPunishmentsApiFp = function(configuration?: Configuration) {
1839
2145
  const localVarOperationServerBasePath = operationServerMap['AdminPunishmentsApi.getPunishments']?.[localVarOperationServerIndex]?.url;
1840
2146
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1841
2147
  },
2148
+ /**
2149
+ * Search for players by UUID or username, or look up all players associated with an IP address. Used to populate the target table before issuing a punishment.
2150
+ * @summary Search punishment targets
2151
+ * @param {string} q UUID, username, or partial/full IP address to search for
2152
+ * @param {*} [options] Override http request option.
2153
+ * @throws {RequiredError}
2154
+ */
2155
+ async searchTargets(q: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminPunishmentSearchResponse>> {
2156
+ const localVarAxiosArgs = await localVarAxiosParamCreator.searchTargets(q, options);
2157
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2158
+ const localVarOperationServerBasePath = operationServerMap['AdminPunishmentsApi.searchTargets']?.[localVarOperationServerIndex]?.url;
2159
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2160
+ },
1842
2161
  }
1843
2162
  };
1844
2163
 
@@ -1848,6 +2167,26 @@ export const AdminPunishmentsApiFp = function(configuration?: Configuration) {
1848
2167
  export const AdminPunishmentsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1849
2168
  const localVarFp = AdminPunishmentsApiFp(configuration)
1850
2169
  return {
2170
+ /**
2171
+ * Apply a punishment to one or more targets. Player targets are linked via player_punishment; IP targets are linked via connection_punishment. The authenticated user is recorded as the issuer.
2172
+ * @summary Apply punishment
2173
+ * @param {AdminApplyPunishmentRequest} adminApplyPunishmentRequest
2174
+ * @param {*} [options] Override http request option.
2175
+ * @throws {RequiredError}
2176
+ */
2177
+ applyPunishment(adminApplyPunishmentRequest: AdminApplyPunishmentRequest, options?: RawAxiosRequestConfig): AxiosPromise<AdminApplyPunishmentResponse> {
2178
+ return localVarFp.applyPunishment(adminApplyPunishmentRequest, options).then((request) => request(axios, basePath));
2179
+ },
2180
+ /**
2181
+ * Preview the impact of a punishment across one or more targets. Returns current score, points to add, projected new score, and affected players per target. No changes are made.
2182
+ * @summary Evaluate punishment impact
2183
+ * @param {AdminCreatePunishmentDraftRequest} adminCreatePunishmentDraftRequest
2184
+ * @param {*} [options] Override http request option.
2185
+ * @throws {RequiredError}
2186
+ */
2187
+ createDraft(adminCreatePunishmentDraftRequest: AdminCreatePunishmentDraftRequest, options?: RawAxiosRequestConfig): AxiosPromise<AdminPunishmentDraftResponse> {
2188
+ return localVarFp.createDraft(adminCreatePunishmentDraftRequest, options).then((request) => request(axios, basePath));
2189
+ },
1851
2190
  /**
1852
2191
  * Returns a paginated list of punishments with optional filtering by player UUID, username, IP address, type, and date range.
1853
2192
  * @summary List punishments
@@ -1856,7 +2195,7 @@ export const AdminPunishmentsApiFactory = function (configuration?: Configuratio
1856
2195
  * @param {string | null} [uuid] Filter by player UUID
1857
2196
  * @param {string | null} [username] Filter by player username (case-insensitive substring match)
1858
2197
  * @param {string | null} [ipAddress] Filter by IP address
1859
- * @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, KICK, WARNING). Repeatable.
2198
+ * @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, WARNING). Repeatable.
1860
2199
  * @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (ms)
1861
2200
  * @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (ms)
1862
2201
  * @param {*} [options] Override http request option.
@@ -1865,6 +2204,16 @@ export const AdminPunishmentsApiFactory = function (configuration?: Configuratio
1865
2204
  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
2205
  return localVarFp.getPunishments(page, limit, uuid, username, ipAddress, type, issuedAfter, issuedBefore, options).then((request) => request(axios, basePath));
1867
2206
  },
2207
+ /**
2208
+ * Search for players by UUID or username, or look up all players associated with an IP address. Used to populate the target table before issuing a punishment.
2209
+ * @summary Search punishment targets
2210
+ * @param {string} q UUID, username, or partial/full IP address to search for
2211
+ * @param {*} [options] Override http request option.
2212
+ * @throws {RequiredError}
2213
+ */
2214
+ searchTargets(q: string, options?: RawAxiosRequestConfig): AxiosPromise<AdminPunishmentSearchResponse> {
2215
+ return localVarFp.searchTargets(q, options).then((request) => request(axios, basePath));
2216
+ },
1868
2217
  };
1869
2218
  };
1870
2219
 
@@ -1872,6 +2221,28 @@ export const AdminPunishmentsApiFactory = function (configuration?: Configuratio
1872
2221
  * AdminPunishmentsApi - object-oriented interface
1873
2222
  */
1874
2223
  export class AdminPunishmentsApi extends BaseAPI {
2224
+ /**
2225
+ * Apply a punishment to one or more targets. Player targets are linked via player_punishment; IP targets are linked via connection_punishment. The authenticated user is recorded as the issuer.
2226
+ * @summary Apply punishment
2227
+ * @param {AdminApplyPunishmentRequest} adminApplyPunishmentRequest
2228
+ * @param {*} [options] Override http request option.
2229
+ * @throws {RequiredError}
2230
+ */
2231
+ public applyPunishment(adminApplyPunishmentRequest: AdminApplyPunishmentRequest, options?: RawAxiosRequestConfig) {
2232
+ return AdminPunishmentsApiFp(this.configuration).applyPunishment(adminApplyPunishmentRequest, options).then((request) => request(this.axios, this.basePath));
2233
+ }
2234
+
2235
+ /**
2236
+ * Preview the impact of a punishment across one or more targets. Returns current score, points to add, projected new score, and affected players per target. No changes are made.
2237
+ * @summary Evaluate punishment impact
2238
+ * @param {AdminCreatePunishmentDraftRequest} adminCreatePunishmentDraftRequest
2239
+ * @param {*} [options] Override http request option.
2240
+ * @throws {RequiredError}
2241
+ */
2242
+ public createDraft(adminCreatePunishmentDraftRequest: AdminCreatePunishmentDraftRequest, options?: RawAxiosRequestConfig) {
2243
+ return AdminPunishmentsApiFp(this.configuration).createDraft(adminCreatePunishmentDraftRequest, options).then((request) => request(this.axios, this.basePath));
2244
+ }
2245
+
1875
2246
  /**
1876
2247
  * Returns a paginated list of punishments with optional filtering by player UUID, username, IP address, type, and date range.
1877
2248
  * @summary List punishments
@@ -1880,7 +2251,7 @@ export class AdminPunishmentsApi extends BaseAPI {
1880
2251
  * @param {string | null} [uuid] Filter by player UUID
1881
2252
  * @param {string | null} [username] Filter by player username (case-insensitive substring match)
1882
2253
  * @param {string | null} [ipAddress] Filter by IP address
1883
- * @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, KICK, WARNING). Repeatable.
2254
+ * @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, WARNING). Repeatable.
1884
2255
  * @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (ms)
1885
2256
  * @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (ms)
1886
2257
  * @param {*} [options] Override http request option.
@@ -1889,31 +2260,36 @@ export class AdminPunishmentsApi extends BaseAPI {
1889
2260
  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
2261
  return AdminPunishmentsApiFp(this.configuration).getPunishments(page, limit, uuid, username, ipAddress, type, issuedAfter, issuedBefore, options).then((request) => request(this.axios, this.basePath));
1891
2262
  }
2263
+
2264
+ /**
2265
+ * Search for players by UUID or username, or look up all players associated with an IP address. Used to populate the target table before issuing a punishment.
2266
+ * @summary Search punishment targets
2267
+ * @param {string} q UUID, username, or partial/full IP address to search for
2268
+ * @param {*} [options] Override http request option.
2269
+ * @throws {RequiredError}
2270
+ */
2271
+ public searchTargets(q: string, options?: RawAxiosRequestConfig) {
2272
+ return AdminPunishmentsApiFp(this.configuration).searchTargets(q, options).then((request) => request(this.axios, this.basePath));
2273
+ }
1892
2274
  }
1893
2275
 
1894
2276
 
1895
2277
 
1896
2278
  /**
1897
- * ConnectionApi - axios parameter creator
2279
+ * AuthenticationApi - axios parameter creator
1898
2280
  */
1899
- export const ConnectionApiAxiosParamCreator = function (configuration?: Configuration) {
2281
+ export const AuthenticationApiAxiosParamCreator = function (configuration?: Configuration) {
1900
2282
  return {
1901
2283
  /**
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.
2284
+ * Receives the authorization code from Discord after the user approves the OAuth2 prompt. Exchanges the code for an access token, verifies the user holds an admin guild role, then redirects back to the admin frontend with a signed JWT in the query string (`?token=...`). On failure, redirects with `?error=<reason>` instead.
2285
+ * @summary Discord - OAuth2 callback
2286
+ * @param {string | null} [code] Authorization code provided by Discord on successful approval
2287
+ * @param {string | null} [error] Error code provided by Discord if the user denied access
1907
2288
  * @param {*} [options] Override http request option.
1908
2289
  * @throws {RequiredError}
1909
2290
  */
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)));
2291
+ callback: async (code?: string | null, error?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2292
+ const localVarPath = `/auth/discord/callback`;
1917
2293
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1918
2294
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1919
2295
  let baseOptions;
@@ -1929,15 +2305,14 @@ export const ConnectionApiAxiosParamCreator = function (configuration?: Configur
1929
2305
  // http bearer authentication required
1930
2306
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
1931
2307
 
1932
- if (forceRecheck !== undefined) {
1933
- localVarQueryParameter['force_recheck'] = forceRecheck;
2308
+ if (code !== undefined) {
2309
+ localVarQueryParameter['code'] = code;
1934
2310
  }
1935
2311
 
1936
- if (associateUuid !== undefined) {
1937
- localVarQueryParameter['associate_uuid'] = associateUuid;
2312
+ if (error !== undefined) {
2313
+ localVarQueryParameter['error'] = error;
1938
2314
  }
1939
2315
 
1940
- localVarHeaderParameter['Accept'] = 'application/json';
1941
2316
 
1942
2317
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1943
2318
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -1948,88 +2323,14 @@ export const ConnectionApiAxiosParamCreator = function (configuration?: Configur
1948
2323
  options: localVarRequestOptions,
1949
2324
  };
1950
2325
  },
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
1980
- */
1981
- export const ConnectionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1982
- const localVarFp = ConnectionApiFp(configuration)
1983
- return {
1984
- /**
1985
- * 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.
1986
- * @summary Check Connection and Detect VPN/Proxy
1987
- * @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
1988
- * @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
1989
- * @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.
1990
- * @param {*} [options] Override http request option.
1991
- * @throws {RequiredError}
1992
- */
1993
- getConnectionDetails(ip: string, forceRecheck: boolean, associateUuid?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<ConnectionGetConnectionDetailsResponse> {
1994
- return localVarFp.getConnectionDetails(ip, forceRecheck, associateUuid, options).then((request) => request(axios, basePath));
1995
- },
1996
- };
1997
- };
1998
-
1999
- /**
2000
- * ConnectionApi - object-oriented interface
2001
- */
2002
- export class ConnectionApi extends BaseAPI {
2003
- /**
2004
- * 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.
2005
- * @summary Check Connection and Detect VPN/Proxy
2006
- * @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
2007
- * @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
2008
- * @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.
2009
- * @param {*} [options] Override http request option.
2010
- * @throws {RequiredError}
2011
- */
2012
- public getConnectionDetails(ip: string, forceRecheck: boolean, associateUuid?: string | null, options?: RawAxiosRequestConfig) {
2013
- return ConnectionApiFp(this.configuration).getConnectionDetails(ip, forceRecheck, associateUuid, options).then((request) => request(this.axios, this.basePath));
2014
- }
2015
- }
2016
-
2017
-
2018
-
2019
- /**
2020
- * DefaultApi - axios parameter creator
2021
- */
2022
- export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) {
2023
- return {
2024
2326
  /**
2025
- *
2026
- * @param {string | null} [code]
2027
- * @param {string | null} [error]
2327
+ * Redirects the browser to Discord\'s OAuth2 authorization page. Not called directly — the admin frontend navigates to this URL to begin the login flow.
2328
+ * @summary Discord - Initiate login
2028
2329
  * @param {*} [options] Override http request option.
2029
2330
  * @throws {RequiredError}
2030
2331
  */
2031
- callback: async (code?: string | null, error?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2032
- const localVarPath = `/auth/discord/callback`;
2332
+ initiateLogin: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2333
+ const localVarPath = `/auth/discord`;
2033
2334
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2034
2335
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2035
2336
  let baseOptions;
@@ -2045,15 +2346,6 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
2045
2346
  // http bearer authentication required
2046
2347
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
2047
2348
 
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
2349
 
2058
2350
  setSearchParams(localVarUrlObj, localVarQueryParameter);
2059
2351
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -2065,12 +2357,16 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
2065
2357
  };
2066
2358
  },
2067
2359
  /**
2068
- *
2360
+ * Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
2361
+ * @summary Service - Exchange client credentials for token
2362
+ * @param {string | null} [grantType]
2363
+ * @param {string | null} [clientId]
2364
+ * @param {string | null} [clientSecret]
2069
2365
  * @param {*} [options] Override http request option.
2070
2366
  * @throws {RequiredError}
2071
2367
  */
2072
- initiateLogin: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2073
- const localVarPath = `/auth/discord`;
2368
+ token: async (grantType?: string | null, clientId?: string | null, clientSecret?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2369
+ const localVarPath = `/oauth/token`;
2074
2370
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2075
2371
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2076
2372
  let baseOptions;
@@ -2078,19 +2374,34 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
2078
2374
  baseOptions = configuration.baseOptions;
2079
2375
  }
2080
2376
 
2081
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2377
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
2082
2378
  const localVarHeaderParameter = {} as any;
2083
2379
  const localVarQueryParameter = {} as any;
2380
+ const localVarFormParams = new URLSearchParams();
2084
2381
 
2085
2382
  // authentication DiscordAuth required
2086
2383
  // http bearer authentication required
2087
2384
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
2088
2385
 
2386
+
2387
+ if (grantType !== undefined) {
2388
+ localVarFormParams.set('grant_type', grantType as any);
2389
+ }
2390
+
2391
+ if (clientId !== undefined) {
2392
+ localVarFormParams.set('client_id', clientId as any);
2393
+ }
2394
+
2395
+ if (clientSecret !== undefined) {
2396
+ localVarFormParams.set('client_secret', clientSecret as any);
2397
+ }
2398
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
2089
2399
  localVarHeaderParameter['Accept'] = 'application/json';
2090
2400
 
2091
2401
  setSearchParams(localVarUrlObj, localVarQueryParameter);
2092
2402
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2093
2403
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2404
+ localVarRequestOptions.data = localVarFormParams.toString();
2094
2405
 
2095
2406
  return {
2096
2407
  url: toPathString(localVarUrlObj),
@@ -2101,109 +2412,156 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
2101
2412
  };
2102
2413
 
2103
2414
  /**
2104
- * DefaultApi - functional programming interface
2415
+ * AuthenticationApi - functional programming interface
2105
2416
  */
2106
- export const DefaultApiFp = function(configuration?: Configuration) {
2107
- const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration)
2417
+ export const AuthenticationApiFp = function(configuration?: Configuration) {
2418
+ const localVarAxiosParamCreator = AuthenticationApiAxiosParamCreator(configuration)
2108
2419
  return {
2109
2420
  /**
2110
- *
2111
- * @param {string | null} [code]
2112
- * @param {string | null} [error]
2421
+ * Receives the authorization code from Discord after the user approves the OAuth2 prompt. Exchanges the code for an access token, verifies the user holds an admin guild role, then redirects back to the admin frontend with a signed JWT in the query string (`?token=...`). On failure, redirects with `?error=<reason>` instead.
2422
+ * @summary Discord - OAuth2 callback
2423
+ * @param {string | null} [code] Authorization code provided by Discord on successful approval
2424
+ * @param {string | null} [error] Error code provided by Discord if the user denied access
2113
2425
  * @param {*} [options] Override http request option.
2114
2426
  * @throws {RequiredError}
2115
2427
  */
2116
- async callback(code?: string | null, error?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
2428
+ async callback(code?: string | null, error?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
2117
2429
  const localVarAxiosArgs = await localVarAxiosParamCreator.callback(code, error, options);
2118
2430
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2119
- const localVarOperationServerBasePath = operationServerMap['DefaultApi.callback']?.[localVarOperationServerIndex]?.url;
2431
+ const localVarOperationServerBasePath = operationServerMap['AuthenticationApi.callback']?.[localVarOperationServerIndex]?.url;
2120
2432
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2121
2433
  },
2122
2434
  /**
2123
- *
2435
+ * Redirects the browser to Discord\'s OAuth2 authorization page. Not called directly — the admin frontend navigates to this URL to begin the login flow.
2436
+ * @summary Discord - Initiate login
2124
2437
  * @param {*} [options] Override http request option.
2125
2438
  * @throws {RequiredError}
2126
2439
  */
2127
- async initiateLogin(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
2440
+ async initiateLogin(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
2128
2441
  const localVarAxiosArgs = await localVarAxiosParamCreator.initiateLogin(options);
2129
2442
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2130
- const localVarOperationServerBasePath = operationServerMap['DefaultApi.initiateLogin']?.[localVarOperationServerIndex]?.url;
2443
+ const localVarOperationServerBasePath = operationServerMap['AuthenticationApi.initiateLogin']?.[localVarOperationServerIndex]?.url;
2444
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2445
+ },
2446
+ /**
2447
+ * Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
2448
+ * @summary Service - Exchange client credentials for token
2449
+ * @param {string | null} [grantType]
2450
+ * @param {string | null} [clientId]
2451
+ * @param {string | null} [clientSecret]
2452
+ * @param {*} [options] Override http request option.
2453
+ * @throws {RequiredError}
2454
+ */
2455
+ async token(grantType?: string | null, clientId?: string | null, clientSecret?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
2456
+ const localVarAxiosArgs = await localVarAxiosParamCreator.token(grantType, clientId, clientSecret, options);
2457
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2458
+ const localVarOperationServerBasePath = operationServerMap['AuthenticationApi.token']?.[localVarOperationServerIndex]?.url;
2131
2459
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2132
2460
  },
2133
2461
  }
2134
2462
  };
2135
2463
 
2136
2464
  /**
2137
- * DefaultApi - factory interface
2465
+ * AuthenticationApi - factory interface
2138
2466
  */
2139
- export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
2140
- const localVarFp = DefaultApiFp(configuration)
2467
+ export const AuthenticationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
2468
+ const localVarFp = AuthenticationApiFp(configuration)
2141
2469
  return {
2142
2470
  /**
2143
- *
2144
- * @param {string | null} [code]
2145
- * @param {string | null} [error]
2471
+ * Receives the authorization code from Discord after the user approves the OAuth2 prompt. Exchanges the code for an access token, verifies the user holds an admin guild role, then redirects back to the admin frontend with a signed JWT in the query string (`?token=...`). On failure, redirects with `?error=<reason>` instead.
2472
+ * @summary Discord - OAuth2 callback
2473
+ * @param {string | null} [code] Authorization code provided by Discord on successful approval
2474
+ * @param {string | null} [error] Error code provided by Discord if the user denied access
2146
2475
  * @param {*} [options] Override http request option.
2147
2476
  * @throws {RequiredError}
2148
2477
  */
2149
- callback(code?: string | null, error?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<object> {
2478
+ callback(code?: string | null, error?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<void> {
2150
2479
  return localVarFp.callback(code, error, options).then((request) => request(axios, basePath));
2151
2480
  },
2152
2481
  /**
2153
- *
2482
+ * Redirects the browser to Discord\'s OAuth2 authorization page. Not called directly — the admin frontend navigates to this URL to begin the login flow.
2483
+ * @summary Discord - Initiate login
2154
2484
  * @param {*} [options] Override http request option.
2155
2485
  * @throws {RequiredError}
2156
2486
  */
2157
- initiateLogin(options?: RawAxiosRequestConfig): AxiosPromise<object> {
2487
+ initiateLogin(options?: RawAxiosRequestConfig): AxiosPromise<void> {
2158
2488
  return localVarFp.initiateLogin(options).then((request) => request(axios, basePath));
2159
2489
  },
2490
+ /**
2491
+ * Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
2492
+ * @summary Service - Exchange client credentials for token
2493
+ * @param {string | null} [grantType]
2494
+ * @param {string | null} [clientId]
2495
+ * @param {string | null} [clientSecret]
2496
+ * @param {*} [options] Override http request option.
2497
+ * @throws {RequiredError}
2498
+ */
2499
+ token(grantType?: string | null, clientId?: string | null, clientSecret?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<object> {
2500
+ return localVarFp.token(grantType, clientId, clientSecret, options).then((request) => request(axios, basePath));
2501
+ },
2160
2502
  };
2161
2503
  };
2162
2504
 
2163
2505
  /**
2164
- * DefaultApi - object-oriented interface
2506
+ * AuthenticationApi - object-oriented interface
2165
2507
  */
2166
- export class DefaultApi extends BaseAPI {
2508
+ export class AuthenticationApi extends BaseAPI {
2167
2509
  /**
2168
- *
2169
- * @param {string | null} [code]
2170
- * @param {string | null} [error]
2510
+ * Receives the authorization code from Discord after the user approves the OAuth2 prompt. Exchanges the code for an access token, verifies the user holds an admin guild role, then redirects back to the admin frontend with a signed JWT in the query string (`?token=...`). On failure, redirects with `?error=<reason>` instead.
2511
+ * @summary Discord - OAuth2 callback
2512
+ * @param {string | null} [code] Authorization code provided by Discord on successful approval
2513
+ * @param {string | null} [error] Error code provided by Discord if the user denied access
2171
2514
  * @param {*} [options] Override http request option.
2172
2515
  * @throws {RequiredError}
2173
2516
  */
2174
2517
  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));
2518
+ return AuthenticationApiFp(this.configuration).callback(code, error, options).then((request) => request(this.axios, this.basePath));
2176
2519
  }
2177
2520
 
2178
2521
  /**
2179
- *
2522
+ * Redirects the browser to Discord\'s OAuth2 authorization page. Not called directly — the admin frontend navigates to this URL to begin the login flow.
2523
+ * @summary Discord - Initiate login
2180
2524
  * @param {*} [options] Override http request option.
2181
2525
  * @throws {RequiredError}
2182
2526
  */
2183
2527
  public initiateLogin(options?: RawAxiosRequestConfig) {
2184
- return DefaultApiFp(this.configuration).initiateLogin(options).then((request) => request(this.axios, this.basePath));
2528
+ return AuthenticationApiFp(this.configuration).initiateLogin(options).then((request) => request(this.axios, this.basePath));
2529
+ }
2530
+
2531
+ /**
2532
+ * Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
2533
+ * @summary Service - Exchange client credentials for token
2534
+ * @param {string | null} [grantType]
2535
+ * @param {string | null} [clientId]
2536
+ * @param {string | null} [clientSecret]
2537
+ * @param {*} [options] Override http request option.
2538
+ * @throws {RequiredError}
2539
+ */
2540
+ public token(grantType?: string | null, clientId?: string | null, clientSecret?: string | null, options?: RawAxiosRequestConfig) {
2541
+ return AuthenticationApiFp(this.configuration).token(grantType, clientId, clientSecret, options).then((request) => request(this.axios, this.basePath));
2185
2542
  }
2186
2543
  }
2187
2544
 
2188
2545
 
2189
2546
 
2190
2547
  /**
2191
- * PlayerApi - axios parameter creator
2548
+ * ChatApi - axios parameter creator
2192
2549
  */
2193
- export const PlayerApiAxiosParamCreator = function (configuration?: Configuration) {
2550
+ export const ChatApiAxiosParamCreator = function (configuration?: Configuration) {
2194
2551
  return {
2195
2552
  /**
2196
- * 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.
2197
- * @summary Get Player Information
2198
- * @param {string} uuid The Minecraft player UUID (with or without dashes)
2553
+ * Returns up to `limit` chat messages before the given `before` timestamp (keyset pagination). Results are returned in ascending chronological order. Omit `before` to start from the current time. Scroll back through history by passing the `sentAt` of the oldest message received as the next `before` value.
2554
+ * @summary Get chat history
2555
+ * @param {number} limit Maximum number of messages to return (1–100)
2556
+ * @param {string | null} [sessionId] Filter to a specific server session. Omit for global history.
2557
+ * @param {string | null} [before] ISO-8601 timestamp cursor — return messages sent before this time. Omit to start from now.
2199
2558
  * @param {*} [options] Override http request option.
2200
2559
  * @throws {RequiredError}
2201
2560
  */
2202
- getPlayer1: async (uuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2203
- // verify required parameter 'uuid' is not null or undefined
2204
- assertParamExists('getPlayer1', 'uuid', uuid)
2205
- const localVarPath = `/v1/player/{uuid}`
2206
- .replace(`{${"uuid"}}`, encodeURIComponent(String(uuid)));
2561
+ history: async (limit: number, sessionId?: string | null, before?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2562
+ // verify required parameter 'limit' is not null or undefined
2563
+ assertParamExists('history', 'limit', limit)
2564
+ const localVarPath = `/v1/chat`;
2207
2565
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2208
2566
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2209
2567
  let baseOptions;
@@ -2219,11 +2577,62 @@ export const PlayerApiAxiosParamCreator = function (configuration?: Configuratio
2219
2577
  // http bearer authentication required
2220
2578
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
2221
2579
 
2580
+ if (sessionId !== undefined) {
2581
+ localVarQueryParameter['sessionId'] = sessionId;
2582
+ }
2583
+
2584
+ if (before !== undefined) {
2585
+ localVarQueryParameter['before'] = before;
2586
+ }
2587
+
2588
+ if (limit !== undefined) {
2589
+ localVarQueryParameter['limit'] = limit;
2590
+ }
2591
+
2592
+ localVarHeaderParameter['Accept'] = 'application/json';
2593
+
2594
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2595
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2596
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2597
+
2598
+ return {
2599
+ url: toPathString(localVarUrlObj),
2600
+ options: localVarRequestOptions,
2601
+ };
2602
+ },
2603
+ /**
2604
+ * Stores a chat message from a game server and fans it out to all connected WebSocket clients via PostgreSQL LISTEN/NOTIFY. The session must be currently online. Only the player UUID is stored — usernames are resolved on the web UI from the player database cache.
2605
+ * @summary Ingest a chat message
2606
+ * @param {ChatMessageRequest} chatMessageRequest
2607
+ * @param {*} [options] Override http request option.
2608
+ * @throws {RequiredError}
2609
+ */
2610
+ ingest: async (chatMessageRequest: ChatMessageRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2611
+ // verify required parameter 'chatMessageRequest' is not null or undefined
2612
+ assertParamExists('ingest', 'chatMessageRequest', chatMessageRequest)
2613
+ const localVarPath = `/v1/chat`;
2614
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2615
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2616
+ let baseOptions;
2617
+ if (configuration) {
2618
+ baseOptions = configuration.baseOptions;
2619
+ }
2620
+
2621
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
2622
+ const localVarHeaderParameter = {} as any;
2623
+ const localVarQueryParameter = {} as any;
2624
+
2625
+ // authentication DiscordAuth required
2626
+ // http bearer authentication required
2627
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
2628
+
2629
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2222
2630
  localVarHeaderParameter['Accept'] = 'application/json';
2223
2631
 
2224
2632
  setSearchParams(localVarUrlObj, localVarQueryParameter);
2225
2633
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2226
2634
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2635
+ localVarRequestOptions.data = serializeDataIfNeeded(chatMessageRequest, localVarRequestOptions, configuration)
2227
2636
 
2228
2637
  return {
2229
2638
  url: toPathString(localVarUrlObj),
@@ -2234,80 +2643,244 @@ export const PlayerApiAxiosParamCreator = function (configuration?: Configuratio
2234
2643
  };
2235
2644
 
2236
2645
  /**
2237
- * PlayerApi - functional programming interface
2646
+ * ChatApi - functional programming interface
2238
2647
  */
2239
- export const PlayerApiFp = function(configuration?: Configuration) {
2240
- const localVarAxiosParamCreator = PlayerApiAxiosParamCreator(configuration)
2648
+ export const ChatApiFp = function(configuration?: Configuration) {
2649
+ const localVarAxiosParamCreator = ChatApiAxiosParamCreator(configuration)
2241
2650
  return {
2242
2651
  /**
2243
- * 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.
2244
- * @summary Get Player Information
2245
- * @param {string} uuid The Minecraft player UUID (with or without dashes)
2652
+ * Returns up to `limit` chat messages before the given `before` timestamp (keyset pagination). Results are returned in ascending chronological order. Omit `before` to start from the current time. Scroll back through history by passing the `sentAt` of the oldest message received as the next `before` value.
2653
+ * @summary Get chat history
2654
+ * @param {number} limit Maximum number of messages to return (1–100)
2655
+ * @param {string | null} [sessionId] Filter to a specific server session. Omit for global history.
2656
+ * @param {string | null} [before] ISO-8601 timestamp cursor — return messages sent before this time. Omit to start from now.
2246
2657
  * @param {*} [options] Override http request option.
2247
2658
  * @throws {RequiredError}
2248
2659
  */
2249
- async getPlayer1(uuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PlayerGetPlayerInformation>> {
2250
- const localVarAxiosArgs = await localVarAxiosParamCreator.getPlayer1(uuid, options);
2660
+ async history(limit: number, sessionId?: string | null, before?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ChatMessageDTO>>> {
2661
+ const localVarAxiosArgs = await localVarAxiosParamCreator.history(limit, sessionId, before, options);
2251
2662
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2252
- const localVarOperationServerBasePath = operationServerMap['PlayerApi.getPlayer1']?.[localVarOperationServerIndex]?.url;
2663
+ const localVarOperationServerBasePath = operationServerMap['ChatApi.history']?.[localVarOperationServerIndex]?.url;
2664
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2665
+ },
2666
+ /**
2667
+ * Stores a chat message from a game server and fans it out to all connected WebSocket clients via PostgreSQL LISTEN/NOTIFY. The session must be currently online. Only the player UUID is stored — usernames are resolved on the web UI from the player database cache.
2668
+ * @summary Ingest a chat message
2669
+ * @param {ChatMessageRequest} chatMessageRequest
2670
+ * @param {*} [options] Override http request option.
2671
+ * @throws {RequiredError}
2672
+ */
2673
+ async ingest(chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ChatMessageDTO>> {
2674
+ const localVarAxiosArgs = await localVarAxiosParamCreator.ingest(chatMessageRequest, options);
2675
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2676
+ const localVarOperationServerBasePath = operationServerMap['ChatApi.ingest']?.[localVarOperationServerIndex]?.url;
2253
2677
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2254
2678
  },
2255
2679
  }
2256
2680
  };
2257
2681
 
2258
2682
  /**
2259
- * PlayerApi - factory interface
2683
+ * ChatApi - factory interface
2260
2684
  */
2261
- export const PlayerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
2262
- const localVarFp = PlayerApiFp(configuration)
2685
+ export const ChatApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
2686
+ const localVarFp = ChatApiFp(configuration)
2263
2687
  return {
2264
2688
  /**
2265
- * 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.
2266
- * @summary Get Player Information
2267
- * @param {string} uuid The Minecraft player UUID (with or without dashes)
2689
+ * Returns up to `limit` chat messages before the given `before` timestamp (keyset pagination). Results are returned in ascending chronological order. Omit `before` to start from the current time. Scroll back through history by passing the `sentAt` of the oldest message received as the next `before` value.
2690
+ * @summary Get chat history
2691
+ * @param {number} limit Maximum number of messages to return (1–100)
2692
+ * @param {string | null} [sessionId] Filter to a specific server session. Omit for global history.
2693
+ * @param {string | null} [before] ISO-8601 timestamp cursor — return messages sent before this time. Omit to start from now.
2268
2694
  * @param {*} [options] Override http request option.
2269
2695
  * @throws {RequiredError}
2270
2696
  */
2271
- getPlayer1(uuid: string, options?: RawAxiosRequestConfig): AxiosPromise<PlayerGetPlayerInformation> {
2272
- return localVarFp.getPlayer1(uuid, options).then((request) => request(axios, basePath));
2697
+ history(limit: number, sessionId?: string | null, before?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<Array<ChatMessageDTO>> {
2698
+ return localVarFp.history(limit, sessionId, before, options).then((request) => request(axios, basePath));
2699
+ },
2700
+ /**
2701
+ * Stores a chat message from a game server and fans it out to all connected WebSocket clients via PostgreSQL LISTEN/NOTIFY. The session must be currently online. Only the player UUID is stored — usernames are resolved on the web UI from the player database cache.
2702
+ * @summary Ingest a chat message
2703
+ * @param {ChatMessageRequest} chatMessageRequest
2704
+ * @param {*} [options] Override http request option.
2705
+ * @throws {RequiredError}
2706
+ */
2707
+ ingest(chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig): AxiosPromise<ChatMessageDTO> {
2708
+ return localVarFp.ingest(chatMessageRequest, options).then((request) => request(axios, basePath));
2273
2709
  },
2274
2710
  };
2275
2711
  };
2276
2712
 
2277
2713
  /**
2278
- * PlayerApi - object-oriented interface
2714
+ * ChatApi - object-oriented interface
2279
2715
  */
2280
- export class PlayerApi extends BaseAPI {
2716
+ export class ChatApi extends BaseAPI {
2281
2717
  /**
2282
- * 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.
2283
- * @summary Get Player Information
2284
- * @param {string} uuid The Minecraft player UUID (with or without dashes)
2718
+ * Returns up to `limit` chat messages before the given `before` timestamp (keyset pagination). Results are returned in ascending chronological order. Omit `before` to start from the current time. Scroll back through history by passing the `sentAt` of the oldest message received as the next `before` value.
2719
+ * @summary Get chat history
2720
+ * @param {number} limit Maximum number of messages to return (1–100)
2721
+ * @param {string | null} [sessionId] Filter to a specific server session. Omit for global history.
2722
+ * @param {string | null} [before] ISO-8601 timestamp cursor — return messages sent before this time. Omit to start from now.
2285
2723
  * @param {*} [options] Override http request option.
2286
2724
  * @throws {RequiredError}
2287
2725
  */
2288
- public getPlayer1(uuid: string, options?: RawAxiosRequestConfig) {
2289
- return PlayerApiFp(this.configuration).getPlayer1(uuid, options).then((request) => request(this.axios, this.basePath));
2726
+ public history(limit: number, sessionId?: string | null, before?: string | null, options?: RawAxiosRequestConfig) {
2727
+ return ChatApiFp(this.configuration).history(limit, sessionId, before, options).then((request) => request(this.axios, this.basePath));
2728
+ }
2729
+
2730
+ /**
2731
+ * Stores a chat message from a game server and fans it out to all connected WebSocket clients via PostgreSQL LISTEN/NOTIFY. The session must be currently online. Only the player UUID is stored — usernames are resolved on the web UI from the player database cache.
2732
+ * @summary Ingest a chat message
2733
+ * @param {ChatMessageRequest} chatMessageRequest
2734
+ * @param {*} [options] Override http request option.
2735
+ * @throws {RequiredError}
2736
+ */
2737
+ public ingest(chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig) {
2738
+ return ChatApiFp(this.configuration).ingest(chatMessageRequest, options).then((request) => request(this.axios, this.basePath));
2290
2739
  }
2291
2740
  }
2292
2741
 
2293
2742
 
2294
2743
 
2295
2744
  /**
2296
- * PunishmentApi - axios parameter creator
2745
+ * ConnectionApi - axios parameter creator
2297
2746
  */
2298
- export const PunishmentApiAxiosParamCreator = function (configuration?: Configuration) {
2747
+ export const ConnectionApiAxiosParamCreator = function (configuration?: Configuration) {
2748
+ return {
2749
+ /**
2750
+ * 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.
2751
+ * @summary Check Connection and Detect VPN/Proxy
2752
+ * @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
2753
+ * @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
2754
+ * @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.
2755
+ * @param {*} [options] Override http request option.
2756
+ * @throws {RequiredError}
2757
+ */
2758
+ getConnectionDetails: async (ip: string, forceRecheck: boolean, associateUuid?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2759
+ // verify required parameter 'ip' is not null or undefined
2760
+ assertParamExists('getConnectionDetails', 'ip', ip)
2761
+ // verify required parameter 'forceRecheck' is not null or undefined
2762
+ assertParamExists('getConnectionDetails', 'forceRecheck', forceRecheck)
2763
+ const localVarPath = `/v1/connection/get-connection-details/{ip}`
2764
+ .replace(`{${"ip"}}`, encodeURIComponent(String(ip)));
2765
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2766
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2767
+ let baseOptions;
2768
+ if (configuration) {
2769
+ baseOptions = configuration.baseOptions;
2770
+ }
2771
+
2772
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2773
+ const localVarHeaderParameter = {} as any;
2774
+ const localVarQueryParameter = {} as any;
2775
+
2776
+ // authentication DiscordAuth required
2777
+ // http bearer authentication required
2778
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
2779
+
2780
+ if (forceRecheck !== undefined) {
2781
+ localVarQueryParameter['force_recheck'] = forceRecheck;
2782
+ }
2783
+
2784
+ if (associateUuid !== undefined) {
2785
+ localVarQueryParameter['associate_uuid'] = associateUuid;
2786
+ }
2787
+
2788
+ localVarHeaderParameter['Accept'] = 'application/json';
2789
+
2790
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2791
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2792
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2793
+
2794
+ return {
2795
+ url: toPathString(localVarUrlObj),
2796
+ options: localVarRequestOptions,
2797
+ };
2798
+ },
2799
+ }
2800
+ };
2801
+
2802
+ /**
2803
+ * ConnectionApi - functional programming interface
2804
+ */
2805
+ export const ConnectionApiFp = function(configuration?: Configuration) {
2806
+ const localVarAxiosParamCreator = ConnectionApiAxiosParamCreator(configuration)
2807
+ return {
2808
+ /**
2809
+ * 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.
2810
+ * @summary Check Connection and Detect VPN/Proxy
2811
+ * @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
2812
+ * @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
2813
+ * @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.
2814
+ * @param {*} [options] Override http request option.
2815
+ * @throws {RequiredError}
2816
+ */
2817
+ async getConnectionDetails(ip: string, forceRecheck: boolean, associateUuid?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ConnectionGetConnectionDetailsResponse>> {
2818
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getConnectionDetails(ip, forceRecheck, associateUuid, options);
2819
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2820
+ const localVarOperationServerBasePath = operationServerMap['ConnectionApi.getConnectionDetails']?.[localVarOperationServerIndex]?.url;
2821
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2822
+ },
2823
+ }
2824
+ };
2825
+
2826
+ /**
2827
+ * ConnectionApi - factory interface
2828
+ */
2829
+ export const ConnectionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
2830
+ const localVarFp = ConnectionApiFp(configuration)
2831
+ return {
2832
+ /**
2833
+ * 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.
2834
+ * @summary Check Connection and Detect VPN/Proxy
2835
+ * @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
2836
+ * @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
2837
+ * @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.
2838
+ * @param {*} [options] Override http request option.
2839
+ * @throws {RequiredError}
2840
+ */
2841
+ getConnectionDetails(ip: string, forceRecheck: boolean, associateUuid?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<ConnectionGetConnectionDetailsResponse> {
2842
+ return localVarFp.getConnectionDetails(ip, forceRecheck, associateUuid, options).then((request) => request(axios, basePath));
2843
+ },
2844
+ };
2845
+ };
2846
+
2847
+ /**
2848
+ * ConnectionApi - object-oriented interface
2849
+ */
2850
+ export class ConnectionApi extends BaseAPI {
2851
+ /**
2852
+ * 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.
2853
+ * @summary Check Connection and Detect VPN/Proxy
2854
+ * @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
2855
+ * @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
2856
+ * @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.
2857
+ * @param {*} [options] Override http request option.
2858
+ * @throws {RequiredError}
2859
+ */
2860
+ public getConnectionDetails(ip: string, forceRecheck: boolean, associateUuid?: string | null, options?: RawAxiosRequestConfig) {
2861
+ return ConnectionApiFp(this.configuration).getConnectionDetails(ip, forceRecheck, associateUuid, options).then((request) => request(this.axios, this.basePath));
2862
+ }
2863
+ }
2864
+
2865
+
2866
+
2867
+ /**
2868
+ * PlayerApi - axios parameter creator
2869
+ */
2870
+ export const PlayerApiAxiosParamCreator = function (configuration?: Configuration) {
2299
2871
  return {
2300
2872
  /**
2301
- * Create and apply a punishment to a player. Automatically determines if permanent based on current score threshold (≥100%).
2302
- * @summary Apply a punishment
2303
- * @param {ApplyPunishmentRequest} applyPunishmentRequest
2873
+ * 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.
2874
+ * @summary Get player information
2875
+ * @param {string} uuid The Minecraft player UUID (with or without dashes)
2304
2876
  * @param {*} [options] Override http request option.
2305
2877
  * @throws {RequiredError}
2306
2878
  */
2307
- applyPunishment: async (applyPunishmentRequest: ApplyPunishmentRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2308
- // verify required parameter 'applyPunishmentRequest' is not null or undefined
2309
- assertParamExists('applyPunishment', 'applyPunishmentRequest', applyPunishmentRequest)
2310
- const localVarPath = `/v1/punishment/apply`;
2879
+ getPlayer1: async (uuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2880
+ // verify required parameter 'uuid' is not null or undefined
2881
+ assertParamExists('getPlayer1', 'uuid', uuid)
2882
+ const localVarPath = `/v1/player/{uuid}`
2883
+ .replace(`{${"uuid"}}`, encodeURIComponent(String(uuid)));
2311
2884
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2312
2885
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2313
2886
  let baseOptions;
@@ -2315,7 +2888,7 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
2315
2888
  baseOptions = configuration.baseOptions;
2316
2889
  }
2317
2890
 
2318
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
2891
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2319
2892
  const localVarHeaderParameter = {} as any;
2320
2893
  const localVarQueryParameter = {} as any;
2321
2894
 
@@ -2323,30 +2896,582 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
2323
2896
  // http bearer authentication required
2324
2897
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
2325
2898
 
2326
- localVarHeaderParameter['Content-Type'] = 'application/json';
2327
- localVarHeaderParameter['Accept'] = 'application/json';
2899
+ localVarHeaderParameter['Accept'] = 'application/json';
2900
+
2901
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2902
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2903
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2904
+
2905
+ return {
2906
+ url: toPathString(localVarUrlObj),
2907
+ options: localVarRequestOptions,
2908
+ };
2909
+ },
2910
+ /**
2911
+ * Accepts a list of player UUIDs and returns a map of `uuid → username` for those that have a recorded username. UUIDs with no username record (e.g. players who have never joined) are omitted from the response. Used by the web UI to display player names in the chat log.
2912
+ * @summary Batch resolve UUIDs to usernames
2913
+ * @param {Array<string>} uuids List of player UUIDs to resolve (repeatable query param)
2914
+ * @param {*} [options] Override http request option.
2915
+ * @throws {RequiredError}
2916
+ */
2917
+ getUsernames: async (uuids: Array<string>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2918
+ // verify required parameter 'uuids' is not null or undefined
2919
+ assertParamExists('getUsernames', 'uuids', uuids)
2920
+ const localVarPath = `/v1/player/usernames`;
2921
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2922
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2923
+ let baseOptions;
2924
+ if (configuration) {
2925
+ baseOptions = configuration.baseOptions;
2926
+ }
2927
+
2928
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2929
+ const localVarHeaderParameter = {} as any;
2930
+ const localVarQueryParameter = {} as any;
2931
+
2932
+ // authentication DiscordAuth required
2933
+ // http bearer authentication required
2934
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
2935
+
2936
+ if (uuids) {
2937
+ localVarQueryParameter['uuids'] = uuids.join(COLLECTION_FORMATS.csv);
2938
+ }
2939
+
2940
+ localVarHeaderParameter['Accept'] = 'application/json';
2941
+
2942
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2943
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2944
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2945
+
2946
+ return {
2947
+ url: toPathString(localVarUrlObj),
2948
+ options: localVarRequestOptions,
2949
+ };
2950
+ },
2951
+ }
2952
+ };
2953
+
2954
+ /**
2955
+ * PlayerApi - functional programming interface
2956
+ */
2957
+ export const PlayerApiFp = function(configuration?: Configuration) {
2958
+ const localVarAxiosParamCreator = PlayerApiAxiosParamCreator(configuration)
2959
+ return {
2960
+ /**
2961
+ * 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.
2962
+ * @summary Get player information
2963
+ * @param {string} uuid The Minecraft player UUID (with or without dashes)
2964
+ * @param {*} [options] Override http request option.
2965
+ * @throws {RequiredError}
2966
+ */
2967
+ async getPlayer1(uuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PlayerGetPlayerInformation>> {
2968
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPlayer1(uuid, options);
2969
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2970
+ const localVarOperationServerBasePath = operationServerMap['PlayerApi.getPlayer1']?.[localVarOperationServerIndex]?.url;
2971
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2972
+ },
2973
+ /**
2974
+ * Accepts a list of player UUIDs and returns a map of `uuid → username` for those that have a recorded username. UUIDs with no username record (e.g. players who have never joined) are omitted from the response. Used by the web UI to display player names in the chat log.
2975
+ * @summary Batch resolve UUIDs to usernames
2976
+ * @param {Array<string>} uuids List of player UUIDs to resolve (repeatable query param)
2977
+ * @param {*} [options] Override http request option.
2978
+ * @throws {RequiredError}
2979
+ */
2980
+ async getUsernames(uuids: Array<string>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
2981
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getUsernames(uuids, options);
2982
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2983
+ const localVarOperationServerBasePath = operationServerMap['PlayerApi.getUsernames']?.[localVarOperationServerIndex]?.url;
2984
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2985
+ },
2986
+ }
2987
+ };
2988
+
2989
+ /**
2990
+ * PlayerApi - factory interface
2991
+ */
2992
+ export const PlayerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
2993
+ const localVarFp = PlayerApiFp(configuration)
2994
+ return {
2995
+ /**
2996
+ * 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.
2997
+ * @summary Get player information
2998
+ * @param {string} uuid The Minecraft player UUID (with or without dashes)
2999
+ * @param {*} [options] Override http request option.
3000
+ * @throws {RequiredError}
3001
+ */
3002
+ getPlayer1(uuid: string, options?: RawAxiosRequestConfig): AxiosPromise<PlayerGetPlayerInformation> {
3003
+ return localVarFp.getPlayer1(uuid, options).then((request) => request(axios, basePath));
3004
+ },
3005
+ /**
3006
+ * Accepts a list of player UUIDs and returns a map of `uuid → username` for those that have a recorded username. UUIDs with no username record (e.g. players who have never joined) are omitted from the response. Used by the web UI to display player names in the chat log.
3007
+ * @summary Batch resolve UUIDs to usernames
3008
+ * @param {Array<string>} uuids List of player UUIDs to resolve (repeatable query param)
3009
+ * @param {*} [options] Override http request option.
3010
+ * @throws {RequiredError}
3011
+ */
3012
+ getUsernames(uuids: Array<string>, options?: RawAxiosRequestConfig): AxiosPromise<void> {
3013
+ return localVarFp.getUsernames(uuids, options).then((request) => request(axios, basePath));
3014
+ },
3015
+ };
3016
+ };
3017
+
3018
+ /**
3019
+ * PlayerApi - object-oriented interface
3020
+ */
3021
+ export class PlayerApi extends BaseAPI {
3022
+ /**
3023
+ * 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.
3024
+ * @summary Get player information
3025
+ * @param {string} uuid The Minecraft player UUID (with or without dashes)
3026
+ * @param {*} [options] Override http request option.
3027
+ * @throws {RequiredError}
3028
+ */
3029
+ public getPlayer1(uuid: string, options?: RawAxiosRequestConfig) {
3030
+ return PlayerApiFp(this.configuration).getPlayer1(uuid, options).then((request) => request(this.axios, this.basePath));
3031
+ }
3032
+
3033
+ /**
3034
+ * Accepts a list of player UUIDs and returns a map of `uuid → username` for those that have a recorded username. UUIDs with no username record (e.g. players who have never joined) are omitted from the response. Used by the web UI to display player names in the chat log.
3035
+ * @summary Batch resolve UUIDs to usernames
3036
+ * @param {Array<string>} uuids List of player UUIDs to resolve (repeatable query param)
3037
+ * @param {*} [options] Override http request option.
3038
+ * @throws {RequiredError}
3039
+ */
3040
+ public getUsernames(uuids: Array<string>, options?: RawAxiosRequestConfig) {
3041
+ return PlayerApiFp(this.configuration).getUsernames(uuids, options).then((request) => request(this.axios, this.basePath));
3042
+ }
3043
+ }
3044
+
3045
+
3046
+
3047
+ /**
3048
+ * PunishmentApi - axios parameter creator
3049
+ */
3050
+ export const PunishmentApiAxiosParamCreator = function (configuration?: Configuration) {
3051
+ return {
3052
+ /**
3053
+ * Retrieve duration information for each punishment type and severity level (1-10)
3054
+ * @summary Get punishment severities
3055
+ * @param {*} [options] Override http request option.
3056
+ * @throws {RequiredError}
3057
+ */
3058
+ getPunishmentSeverities: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3059
+ const localVarPath = `/v1/punishment/severities`;
3060
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3061
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3062
+ let baseOptions;
3063
+ if (configuration) {
3064
+ baseOptions = configuration.baseOptions;
3065
+ }
3066
+
3067
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
3068
+ const localVarHeaderParameter = {} as any;
3069
+ const localVarQueryParameter = {} as any;
3070
+
3071
+ // authentication DiscordAuth required
3072
+ // http bearer authentication required
3073
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
3074
+
3075
+ localVarHeaderParameter['Accept'] = 'application/json';
3076
+
3077
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3078
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3079
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3080
+
3081
+ return {
3082
+ url: toPathString(localVarUrlObj),
3083
+ options: localVarRequestOptions,
3084
+ };
3085
+ },
3086
+ /**
3087
+ * Retrieve all active punishments for a player by UUID or username, optionally filtered by type and time
3088
+ * @summary Get punishments by player
3089
+ * @param {string | null} [uuid] Player UUID
3090
+ * @param {string | null} [username] Player username
3091
+ * @param {Array<string> | null} [type] Filter by punishment types
3092
+ * @param {number | null} [since] Filter punishments created after this Unix epoch timestamp (milliseconds)
3093
+ * @param {*} [options] Override http request option.
3094
+ * @throws {RequiredError}
3095
+ */
3096
+ getPunishments1: async (uuid?: string | null, username?: string | null, type?: Array<string> | null, since?: number | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3097
+ const localVarPath = `/v1/punishment`;
3098
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3099
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3100
+ let baseOptions;
3101
+ if (configuration) {
3102
+ baseOptions = configuration.baseOptions;
3103
+ }
3104
+
3105
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
3106
+ const localVarHeaderParameter = {} as any;
3107
+ const localVarQueryParameter = {} as any;
3108
+
3109
+ // authentication DiscordAuth required
3110
+ // http bearer authentication required
3111
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
3112
+
3113
+ if (uuid !== undefined) {
3114
+ localVarQueryParameter['uuid'] = uuid;
3115
+ }
3116
+
3117
+ if (username !== undefined) {
3118
+ localVarQueryParameter['username'] = username;
3119
+ }
3120
+
3121
+ if (type) {
3122
+ localVarQueryParameter['type'] = type.join(COLLECTION_FORMATS.csv);
3123
+ }
3124
+
3125
+ if (since !== undefined) {
3126
+ localVarQueryParameter['since'] = since;
3127
+ }
3128
+
3129
+ localVarHeaderParameter['Accept'] = 'application/json';
3130
+
3131
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3132
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3133
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3134
+
3135
+ return {
3136
+ url: toPathString(localVarUrlObj),
3137
+ options: localVarRequestOptions,
3138
+ };
3139
+ },
3140
+ /**
3141
+ * Retrieve all active punishments associated with an IP address
3142
+ * @summary Get punishments by IP address
3143
+ * @param {string} ip IP address
3144
+ * @param {*} [options] Override http request option.
3145
+ * @throws {RequiredError}
3146
+ */
3147
+ getPunishmentsByIp: async (ip: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3148
+ // verify required parameter 'ip' is not null or undefined
3149
+ assertParamExists('getPunishmentsByIp', 'ip', ip)
3150
+ const localVarPath = `/v1/punishment/ip`;
3151
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3152
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3153
+ let baseOptions;
3154
+ if (configuration) {
3155
+ baseOptions = configuration.baseOptions;
3156
+ }
3157
+
3158
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
3159
+ const localVarHeaderParameter = {} as any;
3160
+ const localVarQueryParameter = {} as any;
3161
+
3162
+ // authentication DiscordAuth required
3163
+ // http bearer authentication required
3164
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
3165
+
3166
+ if (ip !== undefined) {
3167
+ localVarQueryParameter['ip'] = ip;
3168
+ }
3169
+
3170
+ localVarHeaderParameter['Accept'] = 'application/json';
3171
+
3172
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3173
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3174
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3175
+
3176
+ return {
3177
+ url: toPathString(localVarUrlObj),
3178
+ options: localVarRequestOptions,
3179
+ };
3180
+ },
3181
+ /**
3182
+ * Returns a paginated list of recent punishments with optional filtering by issue date, expiration date, and type
3183
+ * @summary List recent punishments
3184
+ * @param {number} limit Maximum number of records to return
3185
+ * @param {number} page Page number for pagination
3186
+ * @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (milliseconds)
3187
+ * @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (milliseconds)
3188
+ * @param {number | null} [expiresAfter] Filter punishments expiring after this epoch timestamp (milliseconds)
3189
+ * @param {number | null} [expiresBefore] Filter punishments expiring before this epoch timestamp (milliseconds)
3190
+ * @param {Array<string> | null} [type] Filter by punishment types
3191
+ * @param {string | null} [uuid] Filter by player UUID
3192
+ * @param {string | null} [ipAddress] Filter by IP address
3193
+ * @param {*} [options] Override http request option.
3194
+ * @throws {RequiredError}
3195
+ */
3196
+ getRecentPunishments: async (limit: number, page: number, issuedAfter?: number | null, issuedBefore?: number | null, expiresAfter?: number | null, expiresBefore?: number | null, type?: Array<string> | null, uuid?: string | null, ipAddress?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3197
+ // verify required parameter 'limit' is not null or undefined
3198
+ assertParamExists('getRecentPunishments', 'limit', limit)
3199
+ // verify required parameter 'page' is not null or undefined
3200
+ assertParamExists('getRecentPunishments', 'page', page)
3201
+ const localVarPath = `/v1/punishment/recent`;
3202
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3203
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3204
+ let baseOptions;
3205
+ if (configuration) {
3206
+ baseOptions = configuration.baseOptions;
3207
+ }
3208
+
3209
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
3210
+ const localVarHeaderParameter = {} as any;
3211
+ const localVarQueryParameter = {} as any;
3212
+
3213
+ // authentication DiscordAuth required
3214
+ // http bearer authentication required
3215
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
3216
+
3217
+ if (issuedAfter !== undefined) {
3218
+ localVarQueryParameter['issuedAfter'] = issuedAfter;
3219
+ }
3220
+
3221
+ if (issuedBefore !== undefined) {
3222
+ localVarQueryParameter['issuedBefore'] = issuedBefore;
3223
+ }
3224
+
3225
+ if (expiresAfter !== undefined) {
3226
+ localVarQueryParameter['expiresAfter'] = expiresAfter;
3227
+ }
3228
+
3229
+ if (expiresBefore !== undefined) {
3230
+ localVarQueryParameter['expiresBefore'] = expiresBefore;
3231
+ }
3232
+
3233
+ if (type) {
3234
+ localVarQueryParameter['type'] = type.join(COLLECTION_FORMATS.csv);
3235
+ }
3236
+
3237
+ if (uuid !== undefined) {
3238
+ localVarQueryParameter['uuid'] = uuid;
3239
+ }
3240
+
3241
+ if (ipAddress !== undefined) {
3242
+ localVarQueryParameter['ipAddress'] = ipAddress;
3243
+ }
3244
+
3245
+ if (limit !== undefined) {
3246
+ localVarQueryParameter['limit'] = limit;
3247
+ }
3248
+
3249
+ if (page !== undefined) {
3250
+ localVarQueryParameter['page'] = page;
3251
+ }
3252
+
3253
+ localVarHeaderParameter['Accept'] = 'application/json';
3254
+
3255
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3256
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3257
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3258
+
3259
+ return {
3260
+ url: toPathString(localVarUrlObj),
3261
+ options: localVarRequestOptions,
3262
+ };
3263
+ },
3264
+ }
3265
+ };
3266
+
3267
+ /**
3268
+ * PunishmentApi - functional programming interface
3269
+ */
3270
+ export const PunishmentApiFp = function(configuration?: Configuration) {
3271
+ const localVarAxiosParamCreator = PunishmentApiAxiosParamCreator(configuration)
3272
+ return {
3273
+ /**
3274
+ * Retrieve duration information for each punishment type and severity level (1-10)
3275
+ * @summary Get punishment severities
3276
+ * @param {*} [options] Override http request option.
3277
+ * @throws {RequiredError}
3278
+ */
3279
+ async getPunishmentSeverities(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PunishmentSeveritiesResponse>> {
3280
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPunishmentSeverities(options);
3281
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3282
+ const localVarOperationServerBasePath = operationServerMap['PunishmentApi.getPunishmentSeverities']?.[localVarOperationServerIndex]?.url;
3283
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3284
+ },
3285
+ /**
3286
+ * Retrieve all active punishments for a player by UUID or username, optionally filtered by type and time
3287
+ * @summary Get punishments by player
3288
+ * @param {string | null} [uuid] Player UUID
3289
+ * @param {string | null} [username] Player username
3290
+ * @param {Array<string> | null} [type] Filter by punishment types
3291
+ * @param {number | null} [since] Filter punishments created after this Unix epoch timestamp (milliseconds)
3292
+ * @param {*} [options] Override http request option.
3293
+ * @throws {RequiredError}
3294
+ */
3295
+ 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>>> {
3296
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPunishments1(uuid, username, type, since, options);
3297
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3298
+ const localVarOperationServerBasePath = operationServerMap['PunishmentApi.getPunishments1']?.[localVarOperationServerIndex]?.url;
3299
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3300
+ },
3301
+ /**
3302
+ * Retrieve all active punishments associated with an IP address
3303
+ * @summary Get punishments by IP address
3304
+ * @param {string} ip IP address
3305
+ * @param {*} [options] Override http request option.
3306
+ * @throws {RequiredError}
3307
+ */
3308
+ async getPunishmentsByIp(ip: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<PunishmentGetPunishmentResponse>>> {
3309
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPunishmentsByIp(ip, options);
3310
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3311
+ const localVarOperationServerBasePath = operationServerMap['PunishmentApi.getPunishmentsByIp']?.[localVarOperationServerIndex]?.url;
3312
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3313
+ },
3314
+ /**
3315
+ * Returns a paginated list of recent punishments with optional filtering by issue date, expiration date, and type
3316
+ * @summary List recent punishments
3317
+ * @param {number} limit Maximum number of records to return
3318
+ * @param {number} page Page number for pagination
3319
+ * @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (milliseconds)
3320
+ * @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (milliseconds)
3321
+ * @param {number | null} [expiresAfter] Filter punishments expiring after this epoch timestamp (milliseconds)
3322
+ * @param {number | null} [expiresBefore] Filter punishments expiring before this epoch timestamp (milliseconds)
3323
+ * @param {Array<string> | null} [type] Filter by punishment types
3324
+ * @param {string | null} [uuid] Filter by player UUID
3325
+ * @param {string | null} [ipAddress] Filter by IP address
3326
+ * @param {*} [options] Override http request option.
3327
+ * @throws {RequiredError}
3328
+ */
3329
+ async getRecentPunishments(limit: number, page: number, issuedAfter?: number | null, issuedBefore?: number | null, expiresAfter?: number | null, expiresBefore?: number | null, type?: Array<string> | null, uuid?: string | null, ipAddress?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<PunishmentGetPunishmentResponse>>> {
3330
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getRecentPunishments(limit, page, issuedAfter, issuedBefore, expiresAfter, expiresBefore, type, uuid, ipAddress, options);
3331
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3332
+ const localVarOperationServerBasePath = operationServerMap['PunishmentApi.getRecentPunishments']?.[localVarOperationServerIndex]?.url;
3333
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3334
+ },
3335
+ }
3336
+ };
3337
+
3338
+ /**
3339
+ * PunishmentApi - factory interface
3340
+ */
3341
+ export const PunishmentApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
3342
+ const localVarFp = PunishmentApiFp(configuration)
3343
+ return {
3344
+ /**
3345
+ * Retrieve duration information for each punishment type and severity level (1-10)
3346
+ * @summary Get punishment severities
3347
+ * @param {*} [options] Override http request option.
3348
+ * @throws {RequiredError}
3349
+ */
3350
+ getPunishmentSeverities(options?: RawAxiosRequestConfig): AxiosPromise<PunishmentSeveritiesResponse> {
3351
+ return localVarFp.getPunishmentSeverities(options).then((request) => request(axios, basePath));
3352
+ },
3353
+ /**
3354
+ * Retrieve all active punishments for a player by UUID or username, optionally filtered by type and time
3355
+ * @summary Get punishments by player
3356
+ * @param {string | null} [uuid] Player UUID
3357
+ * @param {string | null} [username] Player username
3358
+ * @param {Array<string> | null} [type] Filter by punishment types
3359
+ * @param {number | null} [since] Filter punishments created after this Unix epoch timestamp (milliseconds)
3360
+ * @param {*} [options] Override http request option.
3361
+ * @throws {RequiredError}
3362
+ */
3363
+ getPunishments1(uuid?: string | null, username?: string | null, type?: Array<string> | null, since?: number | null, options?: RawAxiosRequestConfig): AxiosPromise<Array<PunishmentGetPunishmentResponse>> {
3364
+ return localVarFp.getPunishments1(uuid, username, type, since, options).then((request) => request(axios, basePath));
3365
+ },
3366
+ /**
3367
+ * Retrieve all active punishments associated with an IP address
3368
+ * @summary Get punishments by IP address
3369
+ * @param {string} ip IP address
3370
+ * @param {*} [options] Override http request option.
3371
+ * @throws {RequiredError}
3372
+ */
3373
+ getPunishmentsByIp(ip: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<PunishmentGetPunishmentResponse>> {
3374
+ return localVarFp.getPunishmentsByIp(ip, options).then((request) => request(axios, basePath));
3375
+ },
3376
+ /**
3377
+ * Returns a paginated list of recent punishments with optional filtering by issue date, expiration date, and type
3378
+ * @summary List recent punishments
3379
+ * @param {number} limit Maximum number of records to return
3380
+ * @param {number} page Page number for pagination
3381
+ * @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (milliseconds)
3382
+ * @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (milliseconds)
3383
+ * @param {number | null} [expiresAfter] Filter punishments expiring after this epoch timestamp (milliseconds)
3384
+ * @param {number | null} [expiresBefore] Filter punishments expiring before this epoch timestamp (milliseconds)
3385
+ * @param {Array<string> | null} [type] Filter by punishment types
3386
+ * @param {string | null} [uuid] Filter by player UUID
3387
+ * @param {string | null} [ipAddress] Filter by IP address
3388
+ * @param {*} [options] Override http request option.
3389
+ * @throws {RequiredError}
3390
+ */
3391
+ getRecentPunishments(limit: number, page: number, issuedAfter?: number | null, issuedBefore?: number | null, expiresAfter?: number | null, expiresBefore?: number | null, type?: Array<string> | null, uuid?: string | null, ipAddress?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<Array<PunishmentGetPunishmentResponse>> {
3392
+ return localVarFp.getRecentPunishments(limit, page, issuedAfter, issuedBefore, expiresAfter, expiresBefore, type, uuid, ipAddress, options).then((request) => request(axios, basePath));
3393
+ },
3394
+ };
3395
+ };
3396
+
3397
+ /**
3398
+ * PunishmentApi - object-oriented interface
3399
+ */
3400
+ export class PunishmentApi extends BaseAPI {
3401
+ /**
3402
+ * Retrieve duration information for each punishment type and severity level (1-10)
3403
+ * @summary Get punishment severities
3404
+ * @param {*} [options] Override http request option.
3405
+ * @throws {RequiredError}
3406
+ */
3407
+ public getPunishmentSeverities(options?: RawAxiosRequestConfig) {
3408
+ return PunishmentApiFp(this.configuration).getPunishmentSeverities(options).then((request) => request(this.axios, this.basePath));
3409
+ }
3410
+
3411
+ /**
3412
+ * Retrieve all active punishments for a player by UUID or username, optionally filtered by type and time
3413
+ * @summary Get punishments by player
3414
+ * @param {string | null} [uuid] Player UUID
3415
+ * @param {string | null} [username] Player username
3416
+ * @param {Array<string> | null} [type] Filter by punishment types
3417
+ * @param {number | null} [since] Filter punishments created after this Unix epoch timestamp (milliseconds)
3418
+ * @param {*} [options] Override http request option.
3419
+ * @throws {RequiredError}
3420
+ */
3421
+ public getPunishments1(uuid?: string | null, username?: string | null, type?: Array<string> | null, since?: number | null, options?: RawAxiosRequestConfig) {
3422
+ return PunishmentApiFp(this.configuration).getPunishments1(uuid, username, type, since, options).then((request) => request(this.axios, this.basePath));
3423
+ }
3424
+
3425
+ /**
3426
+ * Retrieve all active punishments associated with an IP address
3427
+ * @summary Get punishments by IP address
3428
+ * @param {string} ip IP address
3429
+ * @param {*} [options] Override http request option.
3430
+ * @throws {RequiredError}
3431
+ */
3432
+ public getPunishmentsByIp(ip: string, options?: RawAxiosRequestConfig) {
3433
+ return PunishmentApiFp(this.configuration).getPunishmentsByIp(ip, options).then((request) => request(this.axios, this.basePath));
3434
+ }
3435
+
3436
+ /**
3437
+ * Returns a paginated list of recent punishments with optional filtering by issue date, expiration date, and type
3438
+ * @summary List recent punishments
3439
+ * @param {number} limit Maximum number of records to return
3440
+ * @param {number} page Page number for pagination
3441
+ * @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (milliseconds)
3442
+ * @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (milliseconds)
3443
+ * @param {number | null} [expiresAfter] Filter punishments expiring after this epoch timestamp (milliseconds)
3444
+ * @param {number | null} [expiresBefore] Filter punishments expiring before this epoch timestamp (milliseconds)
3445
+ * @param {Array<string> | null} [type] Filter by punishment types
3446
+ * @param {string | null} [uuid] Filter by player UUID
3447
+ * @param {string | null} [ipAddress] Filter by IP address
3448
+ * @param {*} [options] Override http request option.
3449
+ * @throws {RequiredError}
3450
+ */
3451
+ public getRecentPunishments(limit: number, page: number, issuedAfter?: number | null, issuedBefore?: number | null, expiresAfter?: number | null, expiresBefore?: number | null, type?: Array<string> | null, uuid?: string | null, ipAddress?: string | null, options?: RawAxiosRequestConfig) {
3452
+ return PunishmentApiFp(this.configuration).getRecentPunishments(limit, page, issuedAfter, issuedBefore, expiresAfter, expiresBefore, type, uuid, ipAddress, options).then((request) => request(this.axios, this.basePath));
3453
+ }
3454
+ }
3455
+
2328
3456
 
2329
- setSearchParams(localVarUrlObj, localVarQueryParameter);
2330
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2331
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2332
- localVarRequestOptions.data = serializeDataIfNeeded(applyPunishmentRequest, localVarRequestOptions, configuration)
2333
3457
 
2334
- return {
2335
- url: toPathString(localVarUrlObj),
2336
- options: localVarRequestOptions,
2337
- };
2338
- },
3458
+ /**
3459
+ * ServerSessionsApi - axios parameter creator
3460
+ */
3461
+ export const ServerSessionsApiAxiosParamCreator = function (configuration?: Configuration) {
3462
+ return {
2339
3463
  /**
2340
- * Preview punishment impact before applying. Returns calculated points, current/new thresholds, and whether it will be permanent.
2341
- * @summary Create a punishment draft
2342
- * @param {CreatePunishmentDraftRequest} createPunishmentDraftRequest
3464
+ * Updates the `last_heartbeat` timestamp for the given session, keeping it marked as online. Sessions that miss heartbeats for more than 2 minutes are automatically tombstoned by the scheduler. Call this every 30 seconds from the game server.
3465
+ * @summary Send a heartbeat
3466
+ * @param {string} id Session UUID returned from the registration call
2343
3467
  * @param {*} [options] Override http request option.
2344
3468
  * @throws {RequiredError}
2345
3469
  */
2346
- createPunishmentDraft: async (createPunishmentDraftRequest: CreatePunishmentDraftRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2347
- // verify required parameter 'createPunishmentDraftRequest' is not null or undefined
2348
- assertParamExists('createPunishmentDraft', 'createPunishmentDraftRequest', createPunishmentDraftRequest)
2349
- const localVarPath = `/v1/punishment/draft`;
3470
+ heartbeat: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3471
+ // verify required parameter 'id' is not null or undefined
3472
+ assertParamExists('heartbeat', 'id', id)
3473
+ const localVarPath = `/v1/servers/{id}/heartbeat`
3474
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2350
3475
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2351
3476
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2352
3477
  let baseOptions;
@@ -2354,7 +3479,7 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
2354
3479
  baseOptions = configuration.baseOptions;
2355
3480
  }
2356
3481
 
2357
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
3482
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
2358
3483
  const localVarHeaderParameter = {} as any;
2359
3484
  const localVarQueryParameter = {} as any;
2360
3485
 
@@ -2362,13 +3487,10 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
2362
3487
  // http bearer authentication required
2363
3488
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
2364
3489
 
2365
- localVarHeaderParameter['Content-Type'] = 'application/json';
2366
- localVarHeaderParameter['Accept'] = 'application/json';
2367
3490
 
2368
3491
  setSearchParams(localVarUrlObj, localVarQueryParameter);
2369
3492
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2370
3493
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2371
- localVarRequestOptions.data = serializeDataIfNeeded(createPunishmentDraftRequest, localVarRequestOptions, configuration)
2372
3494
 
2373
3495
  return {
2374
3496
  url: toPathString(localVarUrlObj),
@@ -2376,13 +3498,13 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
2376
3498
  };
2377
3499
  },
2378
3500
  /**
2379
- * Retrieve duration information for each punishment type and severity level (1-10)
2380
- * @summary Get punishment severities
3501
+ * Returns all server sessions both online and historical ordered by start time descending. Used by the web UI to populate the session filter dropdown.
3502
+ * @summary List all server sessions
2381
3503
  * @param {*} [options] Override http request option.
2382
3504
  * @throws {RequiredError}
2383
3505
  */
2384
- getPunishmentSeverities: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2385
- const localVarPath = `/v1/punishment/severities`;
3506
+ listAll: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3507
+ const localVarPath = `/v1/servers/history`;
2386
3508
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2387
3509
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2388
3510
  let baseOptions;
@@ -2410,17 +3532,13 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
2410
3532
  };
2411
3533
  },
2412
3534
  /**
2413
- * Retrieve all active punishments for a player by UUID or username, optionally filtered by type and time
2414
- * @summary Get punishments by player
2415
- * @param {string | null} [uuid] Player UUID
2416
- * @param {string | null} [username] Player username
2417
- * @param {Array<string> | null} [type] Filter by punishment types
2418
- * @param {number | null} [since] Filter punishments created after this Unix epoch timestamp (milliseconds)
3535
+ * Returns all currently online server sessions, ordered by start time descending.
3536
+ * @summary List online server sessions
2419
3537
  * @param {*} [options] Override http request option.
2420
3538
  * @throws {RequiredError}
2421
3539
  */
2422
- getPunishments1: async (uuid?: string | null, username?: string | null, type?: Array<string> | null, since?: number | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2423
- const localVarPath = `/v1/punishment`;
3540
+ listOnline: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3541
+ const localVarPath = `/v1/servers`;
2424
3542
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2425
3543
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2426
3544
  let baseOptions;
@@ -2436,22 +3554,6 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
2436
3554
  // http bearer authentication required
2437
3555
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
2438
3556
 
2439
- if (uuid !== undefined) {
2440
- localVarQueryParameter['uuid'] = uuid;
2441
- }
2442
-
2443
- if (username !== undefined) {
2444
- localVarQueryParameter['username'] = username;
2445
- }
2446
-
2447
- if (type) {
2448
- localVarQueryParameter['type'] = type.join(COLLECTION_FORMATS.csv);
2449
- }
2450
-
2451
- if (since !== undefined) {
2452
- localVarQueryParameter['since'] = since;
2453
- }
2454
-
2455
3557
  localVarHeaderParameter['Accept'] = 'application/json';
2456
3558
 
2457
3559
  setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -2464,16 +3566,17 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
2464
3566
  };
2465
3567
  },
2466
3568
  /**
2467
- * Retrieve all active punishments associated with an IP address
2468
- * @summary Get punishments by IP address
2469
- * @param {string} ip IP address
3569
+ * Marks the session as offline with the current timestamp as `endedAt`. Call this from the game server\'s shutdown hook for a clean shutdown signal. Sessions that crash without calling this endpoint will be tombstoned automatically by the 2-minute heartbeat scheduler.
3570
+ * @summary Mark a session offline
3571
+ * @param {string} id Session UUID returned from the registration call
2470
3572
  * @param {*} [options] Override http request option.
2471
3573
  * @throws {RequiredError}
2472
3574
  */
2473
- getPunishmentsByIp: async (ip: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2474
- // verify required parameter 'ip' is not null or undefined
2475
- assertParamExists('getPunishmentsByIp', 'ip', ip)
2476
- const localVarPath = `/v1/punishment/ip`;
3575
+ markOffline: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3576
+ // verify required parameter 'id' is not null or undefined
3577
+ assertParamExists('markOffline', 'id', id)
3578
+ const localVarPath = `/v1/servers/{id}/offline`
3579
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2477
3580
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2478
3581
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2479
3582
  let baseOptions;
@@ -2481,7 +3584,7 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
2481
3584
  baseOptions = configuration.baseOptions;
2482
3585
  }
2483
3586
 
2484
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
3587
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
2485
3588
  const localVarHeaderParameter = {} as any;
2486
3589
  const localVarQueryParameter = {} as any;
2487
3590
 
@@ -2489,11 +3592,6 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
2489
3592
  // http bearer authentication required
2490
3593
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
2491
3594
 
2492
- if (ip !== undefined) {
2493
- localVarQueryParameter['ip'] = ip;
2494
- }
2495
-
2496
- localVarHeaderParameter['Accept'] = 'application/json';
2497
3595
 
2498
3596
  setSearchParams(localVarUrlObj, localVarQueryParameter);
2499
3597
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -2505,26 +3603,16 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
2505
3603
  };
2506
3604
  },
2507
3605
  /**
2508
- * Returns a paginated list of recent punishments with optional filtering by issue date, expiration date, and type
2509
- * @summary List recent punishments
2510
- * @param {number} limit Maximum number of records to return
2511
- * @param {number} page Page number for pagination
2512
- * @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (milliseconds)
2513
- * @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (milliseconds)
2514
- * @param {number | null} [expiresAfter] Filter punishments expiring after this epoch timestamp (milliseconds)
2515
- * @param {number | null} [expiresBefore] Filter punishments expiring before this epoch timestamp (milliseconds)
2516
- * @param {Array<string> | null} [type] Filter by punishment types
2517
- * @param {string | null} [uuid] Filter by player UUID
2518
- * @param {string | null} [ipAddress] Filter by IP address
3606
+ * Registers a game server instance and returns a session ID used for subsequent heartbeats and chat ingestion. If a `containerId` is provided and an online session already exists for that container (e.g. after a Velocity restart), the existing session is returned unchanged. Otherwise a fresh session is created with an auto-generated instance name.
3607
+ * @summary Register a server session
3608
+ * @param {ServerRegisterRequest} serverRegisterRequest
2519
3609
  * @param {*} [options] Override http request option.
2520
3610
  * @throws {RequiredError}
2521
3611
  */
2522
- getRecentPunishments: async (limit: number, page: number, issuedAfter?: number | null, issuedBefore?: number | null, expiresAfter?: number | null, expiresBefore?: number | null, type?: Array<string> | null, uuid?: string | null, ipAddress?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2523
- // verify required parameter 'limit' is not null or undefined
2524
- assertParamExists('getRecentPunishments', 'limit', limit)
2525
- // verify required parameter 'page' is not null or undefined
2526
- assertParamExists('getRecentPunishments', 'page', page)
2527
- const localVarPath = `/v1/punishment/recent`;
3612
+ register: async (serverRegisterRequest: ServerRegisterRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3613
+ // verify required parameter 'serverRegisterRequest' is not null or undefined
3614
+ assertParamExists('register', 'serverRegisterRequest', serverRegisterRequest)
3615
+ const localVarPath = `/v1/servers`;
2528
3616
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2529
3617
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2530
3618
  let baseOptions;
@@ -2532,7 +3620,7 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
2532
3620
  baseOptions = configuration.baseOptions;
2533
3621
  }
2534
3622
 
2535
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
3623
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
2536
3624
  const localVarHeaderParameter = {} as any;
2537
3625
  const localVarQueryParameter = {} as any;
2538
3626
 
@@ -2540,47 +3628,13 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
2540
3628
  // http bearer authentication required
2541
3629
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
2542
3630
 
2543
- if (issuedAfter !== undefined) {
2544
- localVarQueryParameter['issuedAfter'] = issuedAfter;
2545
- }
2546
-
2547
- if (issuedBefore !== undefined) {
2548
- localVarQueryParameter['issuedBefore'] = issuedBefore;
2549
- }
2550
-
2551
- if (expiresAfter !== undefined) {
2552
- localVarQueryParameter['expiresAfter'] = expiresAfter;
2553
- }
2554
-
2555
- if (expiresBefore !== undefined) {
2556
- localVarQueryParameter['expiresBefore'] = expiresBefore;
2557
- }
2558
-
2559
- if (type) {
2560
- localVarQueryParameter['type'] = type.join(COLLECTION_FORMATS.csv);
2561
- }
2562
-
2563
- if (uuid !== undefined) {
2564
- localVarQueryParameter['uuid'] = uuid;
2565
- }
2566
-
2567
- if (ipAddress !== undefined) {
2568
- localVarQueryParameter['ipAddress'] = ipAddress;
2569
- }
2570
-
2571
- if (limit !== undefined) {
2572
- localVarQueryParameter['limit'] = limit;
2573
- }
2574
-
2575
- if (page !== undefined) {
2576
- localVarQueryParameter['page'] = page;
2577
- }
2578
-
3631
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2579
3632
  localVarHeaderParameter['Accept'] = 'application/json';
2580
3633
 
2581
3634
  setSearchParams(localVarUrlObj, localVarQueryParameter);
2582
3635
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2583
3636
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3637
+ localVarRequestOptions.data = serializeDataIfNeeded(serverRegisterRequest, localVarRequestOptions, configuration)
2584
3638
 
2585
3639
  return {
2586
3640
  url: toPathString(localVarUrlObj),
@@ -2591,259 +3645,189 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
2591
3645
  };
2592
3646
 
2593
3647
  /**
2594
- * PunishmentApi - functional programming interface
3648
+ * ServerSessionsApi - functional programming interface
2595
3649
  */
2596
- export const PunishmentApiFp = function(configuration?: Configuration) {
2597
- const localVarAxiosParamCreator = PunishmentApiAxiosParamCreator(configuration)
3650
+ export const ServerSessionsApiFp = function(configuration?: Configuration) {
3651
+ const localVarAxiosParamCreator = ServerSessionsApiAxiosParamCreator(configuration)
2598
3652
  return {
2599
3653
  /**
2600
- * Create and apply a punishment to a player. Automatically determines if permanent based on current score threshold (≥100%).
2601
- * @summary Apply a punishment
2602
- * @param {ApplyPunishmentRequest} applyPunishmentRequest
2603
- * @param {*} [options] Override http request option.
2604
- * @throws {RequiredError}
2605
- */
2606
- async applyPunishment(applyPunishmentRequest: ApplyPunishmentRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApplyPunishmentResponse>> {
2607
- const localVarAxiosArgs = await localVarAxiosParamCreator.applyPunishment(applyPunishmentRequest, options);
2608
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2609
- const localVarOperationServerBasePath = operationServerMap['PunishmentApi.applyPunishment']?.[localVarOperationServerIndex]?.url;
2610
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2611
- },
2612
- /**
2613
- * Preview punishment impact before applying. Returns calculated points, current/new thresholds, and whether it will be permanent.
2614
- * @summary Create a punishment draft
2615
- * @param {CreatePunishmentDraftRequest} createPunishmentDraftRequest
3654
+ * Updates the `last_heartbeat` timestamp for the given session, keeping it marked as online. Sessions that miss heartbeats for more than 2 minutes are automatically tombstoned by the scheduler. Call this every 30 seconds from the game server.
3655
+ * @summary Send a heartbeat
3656
+ * @param {string} id Session UUID returned from the registration call
2616
3657
  * @param {*} [options] Override http request option.
2617
3658
  * @throws {RequiredError}
2618
3659
  */
2619
- async createPunishmentDraft(createPunishmentDraftRequest: CreatePunishmentDraftRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PunishmentDraftResponse>> {
2620
- const localVarAxiosArgs = await localVarAxiosParamCreator.createPunishmentDraft(createPunishmentDraftRequest, options);
3660
+ async heartbeat(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
3661
+ const localVarAxiosArgs = await localVarAxiosParamCreator.heartbeat(id, options);
2621
3662
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2622
- const localVarOperationServerBasePath = operationServerMap['PunishmentApi.createPunishmentDraft']?.[localVarOperationServerIndex]?.url;
3663
+ const localVarOperationServerBasePath = operationServerMap['ServerSessionsApi.heartbeat']?.[localVarOperationServerIndex]?.url;
2623
3664
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2624
3665
  },
2625
3666
  /**
2626
- * Retrieve duration information for each punishment type and severity level (1-10)
2627
- * @summary Get punishment severities
3667
+ * Returns all server sessions both online and historical ordered by start time descending. Used by the web UI to populate the session filter dropdown.
3668
+ * @summary List all server sessions
2628
3669
  * @param {*} [options] Override http request option.
2629
3670
  * @throws {RequiredError}
2630
3671
  */
2631
- async getPunishmentSeverities(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PunishmentSeveritiesResponse>> {
2632
- const localVarAxiosArgs = await localVarAxiosParamCreator.getPunishmentSeverities(options);
3672
+ async listAll(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ServerSessionDTO>>> {
3673
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listAll(options);
2633
3674
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2634
- const localVarOperationServerBasePath = operationServerMap['PunishmentApi.getPunishmentSeverities']?.[localVarOperationServerIndex]?.url;
3675
+ const localVarOperationServerBasePath = operationServerMap['ServerSessionsApi.listAll']?.[localVarOperationServerIndex]?.url;
2635
3676
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2636
3677
  },
2637
3678
  /**
2638
- * Retrieve all active punishments for a player by UUID or username, optionally filtered by type and time
2639
- * @summary Get punishments by player
2640
- * @param {string | null} [uuid] Player UUID
2641
- * @param {string | null} [username] Player username
2642
- * @param {Array<string> | null} [type] Filter by punishment types
2643
- * @param {number | null} [since] Filter punishments created after this Unix epoch timestamp (milliseconds)
3679
+ * Returns all currently online server sessions, ordered by start time descending.
3680
+ * @summary List online server sessions
2644
3681
  * @param {*} [options] Override http request option.
2645
3682
  * @throws {RequiredError}
2646
3683
  */
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);
3684
+ async listOnline(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ServerSessionDTO>>> {
3685
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listOnline(options);
2649
3686
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2650
- const localVarOperationServerBasePath = operationServerMap['PunishmentApi.getPunishments1']?.[localVarOperationServerIndex]?.url;
3687
+ const localVarOperationServerBasePath = operationServerMap['ServerSessionsApi.listOnline']?.[localVarOperationServerIndex]?.url;
2651
3688
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2652
3689
  },
2653
3690
  /**
2654
- * Retrieve all active punishments associated with an IP address
2655
- * @summary Get punishments by IP address
2656
- * @param {string} ip IP address
3691
+ * Marks the session as offline with the current timestamp as `endedAt`. Call this from the game server\'s shutdown hook for a clean shutdown signal. Sessions that crash without calling this endpoint will be tombstoned automatically by the 2-minute heartbeat scheduler.
3692
+ * @summary Mark a session offline
3693
+ * @param {string} id Session UUID returned from the registration call
2657
3694
  * @param {*} [options] Override http request option.
2658
3695
  * @throws {RequiredError}
2659
3696
  */
2660
- async getPunishmentsByIp(ip: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<PunishmentGetPunishmentResponse>>> {
2661
- const localVarAxiosArgs = await localVarAxiosParamCreator.getPunishmentsByIp(ip, options);
3697
+ async markOffline(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
3698
+ const localVarAxiosArgs = await localVarAxiosParamCreator.markOffline(id, options);
2662
3699
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2663
- const localVarOperationServerBasePath = operationServerMap['PunishmentApi.getPunishmentsByIp']?.[localVarOperationServerIndex]?.url;
3700
+ const localVarOperationServerBasePath = operationServerMap['ServerSessionsApi.markOffline']?.[localVarOperationServerIndex]?.url;
2664
3701
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2665
3702
  },
2666
3703
  /**
2667
- * Returns a paginated list of recent punishments with optional filtering by issue date, expiration date, and type
2668
- * @summary List recent punishments
2669
- * @param {number} limit Maximum number of records to return
2670
- * @param {number} page Page number for pagination
2671
- * @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (milliseconds)
2672
- * @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (milliseconds)
2673
- * @param {number | null} [expiresAfter] Filter punishments expiring after this epoch timestamp (milliseconds)
2674
- * @param {number | null} [expiresBefore] Filter punishments expiring before this epoch timestamp (milliseconds)
2675
- * @param {Array<string> | null} [type] Filter by punishment types
2676
- * @param {string | null} [uuid] Filter by player UUID
2677
- * @param {string | null} [ipAddress] Filter by IP address
3704
+ * Registers a game server instance and returns a session ID used for subsequent heartbeats and chat ingestion. If a `containerId` is provided and an online session already exists for that container (e.g. after a Velocity restart), the existing session is returned unchanged. Otherwise a fresh session is created with an auto-generated instance name.
3705
+ * @summary Register a server session
3706
+ * @param {ServerRegisterRequest} serverRegisterRequest
2678
3707
  * @param {*} [options] Override http request option.
2679
3708
  * @throws {RequiredError}
2680
3709
  */
2681
- async getRecentPunishments(limit: number, page: number, issuedAfter?: number | null, issuedBefore?: number | null, expiresAfter?: number | null, expiresBefore?: number | null, type?: Array<string> | null, uuid?: string | null, ipAddress?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<PunishmentGetPunishmentResponse>>> {
2682
- const localVarAxiosArgs = await localVarAxiosParamCreator.getRecentPunishments(limit, page, issuedAfter, issuedBefore, expiresAfter, expiresBefore, type, uuid, ipAddress, options);
3710
+ async register(serverRegisterRequest: ServerRegisterRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ServerSessionDTO>> {
3711
+ const localVarAxiosArgs = await localVarAxiosParamCreator.register(serverRegisterRequest, options);
2683
3712
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2684
- const localVarOperationServerBasePath = operationServerMap['PunishmentApi.getRecentPunishments']?.[localVarOperationServerIndex]?.url;
3713
+ const localVarOperationServerBasePath = operationServerMap['ServerSessionsApi.register']?.[localVarOperationServerIndex]?.url;
2685
3714
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2686
3715
  },
2687
3716
  }
2688
3717
  };
2689
3718
 
2690
3719
  /**
2691
- * PunishmentApi - factory interface
3720
+ * ServerSessionsApi - factory interface
2692
3721
  */
2693
- export const PunishmentApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
2694
- const localVarFp = PunishmentApiFp(configuration)
3722
+ export const ServerSessionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
3723
+ const localVarFp = ServerSessionsApiFp(configuration)
2695
3724
  return {
2696
3725
  /**
2697
- * Create and apply a punishment to a player. Automatically determines if permanent based on current score threshold (≥100%).
2698
- * @summary Apply a punishment
2699
- * @param {ApplyPunishmentRequest} applyPunishmentRequest
2700
- * @param {*} [options] Override http request option.
2701
- * @throws {RequiredError}
2702
- */
2703
- applyPunishment(applyPunishmentRequest: ApplyPunishmentRequest, options?: RawAxiosRequestConfig): AxiosPromise<ApplyPunishmentResponse> {
2704
- return localVarFp.applyPunishment(applyPunishmentRequest, options).then((request) => request(axios, basePath));
2705
- },
2706
- /**
2707
- * Preview punishment impact before applying. Returns calculated points, current/new thresholds, and whether it will be permanent.
2708
- * @summary Create a punishment draft
2709
- * @param {CreatePunishmentDraftRequest} createPunishmentDraftRequest
3726
+ * Updates the `last_heartbeat` timestamp for the given session, keeping it marked as online. Sessions that miss heartbeats for more than 2 minutes are automatically tombstoned by the scheduler. Call this every 30 seconds from the game server.
3727
+ * @summary Send a heartbeat
3728
+ * @param {string} id Session UUID returned from the registration call
2710
3729
  * @param {*} [options] Override http request option.
2711
3730
  * @throws {RequiredError}
2712
3731
  */
2713
- createPunishmentDraft(createPunishmentDraftRequest: CreatePunishmentDraftRequest, options?: RawAxiosRequestConfig): AxiosPromise<PunishmentDraftResponse> {
2714
- return localVarFp.createPunishmentDraft(createPunishmentDraftRequest, options).then((request) => request(axios, basePath));
3732
+ heartbeat(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
3733
+ return localVarFp.heartbeat(id, options).then((request) => request(axios, basePath));
2715
3734
  },
2716
3735
  /**
2717
- * Retrieve duration information for each punishment type and severity level (1-10)
2718
- * @summary Get punishment severities
3736
+ * Returns all server sessions both online and historical ordered by start time descending. Used by the web UI to populate the session filter dropdown.
3737
+ * @summary List all server sessions
2719
3738
  * @param {*} [options] Override http request option.
2720
3739
  * @throws {RequiredError}
2721
3740
  */
2722
- getPunishmentSeverities(options?: RawAxiosRequestConfig): AxiosPromise<PunishmentSeveritiesResponse> {
2723
- return localVarFp.getPunishmentSeverities(options).then((request) => request(axios, basePath));
3741
+ listAll(options?: RawAxiosRequestConfig): AxiosPromise<Array<ServerSessionDTO>> {
3742
+ return localVarFp.listAll(options).then((request) => request(axios, basePath));
2724
3743
  },
2725
3744
  /**
2726
- * Retrieve all active punishments for a player by UUID or username, optionally filtered by type and time
2727
- * @summary Get punishments by player
2728
- * @param {string | null} [uuid] Player UUID
2729
- * @param {string | null} [username] Player username
2730
- * @param {Array<string> | null} [type] Filter by punishment types
2731
- * @param {number | null} [since] Filter punishments created after this Unix epoch timestamp (milliseconds)
3745
+ * Returns all currently online server sessions, ordered by start time descending.
3746
+ * @summary List online server sessions
2732
3747
  * @param {*} [options] Override http request option.
2733
3748
  * @throws {RequiredError}
2734
3749
  */
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));
3750
+ listOnline(options?: RawAxiosRequestConfig): AxiosPromise<Array<ServerSessionDTO>> {
3751
+ return localVarFp.listOnline(options).then((request) => request(axios, basePath));
2737
3752
  },
2738
3753
  /**
2739
- * Retrieve all active punishments associated with an IP address
2740
- * @summary Get punishments by IP address
2741
- * @param {string} ip IP address
3754
+ * Marks the session as offline with the current timestamp as `endedAt`. Call this from the game server\'s shutdown hook for a clean shutdown signal. Sessions that crash without calling this endpoint will be tombstoned automatically by the 2-minute heartbeat scheduler.
3755
+ * @summary Mark a session offline
3756
+ * @param {string} id Session UUID returned from the registration call
2742
3757
  * @param {*} [options] Override http request option.
2743
3758
  * @throws {RequiredError}
2744
3759
  */
2745
- getPunishmentsByIp(ip: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<PunishmentGetPunishmentResponse>> {
2746
- return localVarFp.getPunishmentsByIp(ip, options).then((request) => request(axios, basePath));
3760
+ markOffline(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
3761
+ return localVarFp.markOffline(id, options).then((request) => request(axios, basePath));
2747
3762
  },
2748
3763
  /**
2749
- * Returns a paginated list of recent punishments with optional filtering by issue date, expiration date, and type
2750
- * @summary List recent punishments
2751
- * @param {number} limit Maximum number of records to return
2752
- * @param {number} page Page number for pagination
2753
- * @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (milliseconds)
2754
- * @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (milliseconds)
2755
- * @param {number | null} [expiresAfter] Filter punishments expiring after this epoch timestamp (milliseconds)
2756
- * @param {number | null} [expiresBefore] Filter punishments expiring before this epoch timestamp (milliseconds)
2757
- * @param {Array<string> | null} [type] Filter by punishment types
2758
- * @param {string | null} [uuid] Filter by player UUID
2759
- * @param {string | null} [ipAddress] Filter by IP address
3764
+ * Registers a game server instance and returns a session ID used for subsequent heartbeats and chat ingestion. If a `containerId` is provided and an online session already exists for that container (e.g. after a Velocity restart), the existing session is returned unchanged. Otherwise a fresh session is created with an auto-generated instance name.
3765
+ * @summary Register a server session
3766
+ * @param {ServerRegisterRequest} serverRegisterRequest
2760
3767
  * @param {*} [options] Override http request option.
2761
3768
  * @throws {RequiredError}
2762
3769
  */
2763
- getRecentPunishments(limit: number, page: number, issuedAfter?: number | null, issuedBefore?: number | null, expiresAfter?: number | null, expiresBefore?: number | null, type?: Array<string> | null, uuid?: string | null, ipAddress?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<Array<PunishmentGetPunishmentResponse>> {
2764
- return localVarFp.getRecentPunishments(limit, page, issuedAfter, issuedBefore, expiresAfter, expiresBefore, type, uuid, ipAddress, options).then((request) => request(axios, basePath));
3770
+ register(serverRegisterRequest: ServerRegisterRequest, options?: RawAxiosRequestConfig): AxiosPromise<ServerSessionDTO> {
3771
+ return localVarFp.register(serverRegisterRequest, options).then((request) => request(axios, basePath));
2765
3772
  },
2766
3773
  };
2767
3774
  };
2768
3775
 
2769
3776
  /**
2770
- * PunishmentApi - object-oriented interface
3777
+ * ServerSessionsApi - object-oriented interface
2771
3778
  */
2772
- export class PunishmentApi extends BaseAPI {
2773
- /**
2774
- * Create and apply a punishment to a player. Automatically determines if permanent based on current score threshold (≥100%).
2775
- * @summary Apply a punishment
2776
- * @param {ApplyPunishmentRequest} applyPunishmentRequest
2777
- * @param {*} [options] Override http request option.
2778
- * @throws {RequiredError}
2779
- */
2780
- public applyPunishment(applyPunishmentRequest: ApplyPunishmentRequest, options?: RawAxiosRequestConfig) {
2781
- return PunishmentApiFp(this.configuration).applyPunishment(applyPunishmentRequest, options).then((request) => request(this.axios, this.basePath));
2782
- }
2783
-
3779
+ export class ServerSessionsApi extends BaseAPI {
2784
3780
  /**
2785
- * Preview punishment impact before applying. Returns calculated points, current/new thresholds, and whether it will be permanent.
2786
- * @summary Create a punishment draft
2787
- * @param {CreatePunishmentDraftRequest} createPunishmentDraftRequest
3781
+ * Updates the `last_heartbeat` timestamp for the given session, keeping it marked as online. Sessions that miss heartbeats for more than 2 minutes are automatically tombstoned by the scheduler. Call this every 30 seconds from the game server.
3782
+ * @summary Send a heartbeat
3783
+ * @param {string} id Session UUID returned from the registration call
2788
3784
  * @param {*} [options] Override http request option.
2789
3785
  * @throws {RequiredError}
2790
3786
  */
2791
- public createPunishmentDraft(createPunishmentDraftRequest: CreatePunishmentDraftRequest, options?: RawAxiosRequestConfig) {
2792
- return PunishmentApiFp(this.configuration).createPunishmentDraft(createPunishmentDraftRequest, options).then((request) => request(this.axios, this.basePath));
3787
+ public heartbeat(id: string, options?: RawAxiosRequestConfig) {
3788
+ return ServerSessionsApiFp(this.configuration).heartbeat(id, options).then((request) => request(this.axios, this.basePath));
2793
3789
  }
2794
3790
 
2795
3791
  /**
2796
- * Retrieve duration information for each punishment type and severity level (1-10)
2797
- * @summary Get punishment severities
3792
+ * Returns all server sessions both online and historical ordered by start time descending. Used by the web UI to populate the session filter dropdown.
3793
+ * @summary List all server sessions
2798
3794
  * @param {*} [options] Override http request option.
2799
3795
  * @throws {RequiredError}
2800
3796
  */
2801
- public getPunishmentSeverities(options?: RawAxiosRequestConfig) {
2802
- return PunishmentApiFp(this.configuration).getPunishmentSeverities(options).then((request) => request(this.axios, this.basePath));
3797
+ public listAll(options?: RawAxiosRequestConfig) {
3798
+ return ServerSessionsApiFp(this.configuration).listAll(options).then((request) => request(this.axios, this.basePath));
2803
3799
  }
2804
3800
 
2805
3801
  /**
2806
- * Retrieve all active punishments for a player by UUID or username, optionally filtered by type and time
2807
- * @summary Get punishments by player
2808
- * @param {string | null} [uuid] Player UUID
2809
- * @param {string | null} [username] Player username
2810
- * @param {Array<string> | null} [type] Filter by punishment types
2811
- * @param {number | null} [since] Filter punishments created after this Unix epoch timestamp (milliseconds)
3802
+ * Returns all currently online server sessions, ordered by start time descending.
3803
+ * @summary List online server sessions
2812
3804
  * @param {*} [options] Override http request option.
2813
3805
  * @throws {RequiredError}
2814
3806
  */
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));
3807
+ public listOnline(options?: RawAxiosRequestConfig) {
3808
+ return ServerSessionsApiFp(this.configuration).listOnline(options).then((request) => request(this.axios, this.basePath));
2817
3809
  }
2818
3810
 
2819
3811
  /**
2820
- * Retrieve all active punishments associated with an IP address
2821
- * @summary Get punishments by IP address
2822
- * @param {string} ip IP address
3812
+ * Marks the session as offline with the current timestamp as `endedAt`. Call this from the game server\'s shutdown hook for a clean shutdown signal. Sessions that crash without calling this endpoint will be tombstoned automatically by the 2-minute heartbeat scheduler.
3813
+ * @summary Mark a session offline
3814
+ * @param {string} id Session UUID returned from the registration call
2823
3815
  * @param {*} [options] Override http request option.
2824
3816
  * @throws {RequiredError}
2825
3817
  */
2826
- public getPunishmentsByIp(ip: string, options?: RawAxiosRequestConfig) {
2827
- return PunishmentApiFp(this.configuration).getPunishmentsByIp(ip, options).then((request) => request(this.axios, this.basePath));
3818
+ public markOffline(id: string, options?: RawAxiosRequestConfig) {
3819
+ return ServerSessionsApiFp(this.configuration).markOffline(id, options).then((request) => request(this.axios, this.basePath));
2828
3820
  }
2829
3821
 
2830
3822
  /**
2831
- * Returns a paginated list of recent punishments with optional filtering by issue date, expiration date, and type
2832
- * @summary List recent punishments
2833
- * @param {number} limit Maximum number of records to return
2834
- * @param {number} page Page number for pagination
2835
- * @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (milliseconds)
2836
- * @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (milliseconds)
2837
- * @param {number | null} [expiresAfter] Filter punishments expiring after this epoch timestamp (milliseconds)
2838
- * @param {number | null} [expiresBefore] Filter punishments expiring before this epoch timestamp (milliseconds)
2839
- * @param {Array<string> | null} [type] Filter by punishment types
2840
- * @param {string | null} [uuid] Filter by player UUID
2841
- * @param {string | null} [ipAddress] Filter by IP address
3823
+ * Registers a game server instance and returns a session ID used for subsequent heartbeats and chat ingestion. If a `containerId` is provided and an online session already exists for that container (e.g. after a Velocity restart), the existing session is returned unchanged. Otherwise a fresh session is created with an auto-generated instance name.
3824
+ * @summary Register a server session
3825
+ * @param {ServerRegisterRequest} serverRegisterRequest
2842
3826
  * @param {*} [options] Override http request option.
2843
3827
  * @throws {RequiredError}
2844
3828
  */
2845
- public getRecentPunishments(limit: number, page: number, issuedAfter?: number | null, issuedBefore?: number | null, expiresAfter?: number | null, expiresBefore?: number | null, type?: Array<string> | null, uuid?: string | null, ipAddress?: string | null, options?: RawAxiosRequestConfig) {
2846
- return PunishmentApiFp(this.configuration).getRecentPunishments(limit, page, issuedAfter, issuedBefore, expiresAfter, expiresBefore, type, uuid, ipAddress, options).then((request) => request(this.axios, this.basePath));
3829
+ public register(serverRegisterRequest: ServerRegisterRequest, options?: RawAxiosRequestConfig) {
3830
+ return ServerSessionsApiFp(this.configuration).register(serverRegisterRequest, options).then((request) => request(this.axios, this.basePath));
2847
3831
  }
2848
3832
  }
2849
3833