@rebornteam/reborn-api 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/.gitkeep +0 -0
  2. package/.openapi-generator/FILES +36 -0
  3. package/.openapi-generator/VERSION +1 -0
  4. package/.openapi-generator-ignore +23 -0
  5. package/README.md +104 -0
  6. package/api.ts +2037 -0
  7. package/base.ts +62 -0
  8. package/common.ts +127 -0
  9. package/configuration.ts +121 -0
  10. package/dist/api.d.ts +1144 -0
  11. package/dist/api.js +1594 -0
  12. package/dist/base.d.ts +42 -0
  13. package/dist/base.js +46 -0
  14. package/dist/common.d.ts +34 -0
  15. package/dist/common.js +139 -0
  16. package/dist/configuration.d.ts +98 -0
  17. package/dist/configuration.js +44 -0
  18. package/dist/esm/api.d.ts +1144 -0
  19. package/dist/esm/api.js +1567 -0
  20. package/dist/esm/base.d.ts +42 -0
  21. package/dist/esm/base.js +41 -0
  22. package/dist/esm/common.d.ts +34 -0
  23. package/dist/esm/common.js +126 -0
  24. package/dist/esm/configuration.d.ts +98 -0
  25. package/dist/esm/configuration.js +40 -0
  26. package/dist/esm/index.d.ts +13 -0
  27. package/dist/esm/index.js +15 -0
  28. package/dist/index.d.ts +13 -0
  29. package/dist/index.js +31 -0
  30. package/docs/AdminClientCredentialResponse.md +33 -0
  31. package/docs/AdminClientCredentialsApi.md +390 -0
  32. package/docs/AdminConnectionBypassResponse.md +27 -0
  33. package/docs/AdminConnectionsApi.md +135 -0
  34. package/docs/AdminDashboardApi.md +54 -0
  35. package/docs/AdminDashboardConnectionResponse.md +38 -0
  36. package/docs/AdminGetDashboardStats.md +24 -0
  37. package/docs/ApplyPunishmentRequest.md +31 -0
  38. package/docs/ApplyPunishmentResponse.md +33 -0
  39. package/docs/ClientCredentialRequest.md +23 -0
  40. package/docs/ConnectionApi.md +69 -0
  41. package/docs/ConnectionGetConnectionDetailsResponse.md +35 -0
  42. package/docs/CreateBypassRequest.md +23 -0
  43. package/docs/CreatePunishmentDraftRequest.md +29 -0
  44. package/docs/PlayerApi.md +62 -0
  45. package/docs/PlayerGetPlayerInformation.md +27 -0
  46. package/docs/PunishmentApi.md +347 -0
  47. package/docs/PunishmentDraftResponse.md +39 -0
  48. package/docs/PunishmentGetPunishmentResponse.md +33 -0
  49. package/docs/PunishmentSeveritiesResponse.md +21 -0
  50. package/docs/PunishmentSeveritiesResponsePunishmentTypeInfo.md +23 -0
  51. package/docs/PunishmentSeveritiesResponseSeverityInfo.md +23 -0
  52. package/docs/UpdateClientRequest.md +23 -0
  53. package/git_push.sh +57 -0
  54. package/index.ts +18 -0
  55. package/package.json +33 -0
  56. package/tsconfig.esm.json +7 -0
  57. package/tsconfig.json +18 -0
package/api.ts ADDED
@@ -0,0 +1,2037 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Reborn API
5
+ * The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Cognito Bearer Token**: For admin endpoints requiring AWS Cognito authentication
6
+ *
7
+ * The version of the OpenAPI document: 2.5.1
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import type { Configuration } from './configuration';
17
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
18
+ import globalAxios from 'axios';
19
+ // Some imports not used depending on template conditions
20
+ // @ts-ignore
21
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from './common';
22
+ import type { RequestArgs } from './base';
23
+ // @ts-ignore
24
+ import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
25
+
26
+ /**
27
+ * Client credential response
28
+ */
29
+ export interface AdminClientCredentialResponse {
30
+ /**
31
+ * Unique identifier for the client credential
32
+ */
33
+ 'id'?: number;
34
+ /**
35
+ * Client ID used for authentication
36
+ */
37
+ 'clientId'?: string;
38
+ /**
39
+ * Client secret (only returned on generation/rotation, null otherwise)
40
+ */
41
+ 'clientSecret'?: string | null;
42
+ /**
43
+ * Human-readable name for the client
44
+ */
45
+ 'name'?: string;
46
+ /**
47
+ * Optional description of the client\'s purpose
48
+ */
49
+ 'description'?: string;
50
+ /**
51
+ * Whether the client credential is currently enabled
52
+ */
53
+ 'enabled'?: boolean;
54
+ /**
55
+ * Timestamp when the credential was created (ISO-8601 format)
56
+ */
57
+ 'createdAt'?: string;
58
+ }
59
+ /**
60
+ * Connection bypass response
61
+ */
62
+ export interface AdminConnectionBypassResponse {
63
+ /**
64
+ * Unique identifier for the bypass
65
+ */
66
+ 'id'?: number;
67
+ /**
68
+ * IP address that is bypassed
69
+ */
70
+ 'ipAddress'?: string;
71
+ /**
72
+ * Timestamp when the bypass expires (ISO-8601 format)
73
+ */
74
+ 'expiresAt'?: string;
75
+ /**
76
+ * Timestamp when the bypass was created (ISO-8601 format)
77
+ */
78
+ 'createdAt'?: string;
79
+ }
80
+ export interface AdminDashboardConnectionResponse {
81
+ 'id': number;
82
+ 'ipAddress': string;
83
+ 'location': string;
84
+ 'isVpn': boolean;
85
+ 'isBypassed': boolean;
86
+ 'bypassExpiresAt'?: string | null;
87
+ 'playerUuid'?: string | null;
88
+ 'lastSeen'?: string | null;
89
+ 'percentPositive': number;
90
+ 'numberOfChecks': number;
91
+ }
92
+ export interface AdminGetDashboardStats {
93
+ 'totalPlayers': number;
94
+ 'totalConnections': number;
95
+ 'totalClients': number;
96
+ }
97
+ /**
98
+ * Request to apply a punishment to a player
99
+ */
100
+ export interface ApplyPunishmentRequest {
101
+ /**
102
+ * Player UUID to punish
103
+ */
104
+ 'playerUuid': string;
105
+ /**
106
+ * Reason for the punishment
107
+ */
108
+ 'reason': string;
109
+ /**
110
+ * Type of punishment
111
+ */
112
+ 'type': string;
113
+ /**
114
+ * Severity level of the punishment (1-10)
115
+ */
116
+ 'severity': number;
117
+ /**
118
+ * Staff member applying the punishment
119
+ */
120
+ 'createdBy': string;
121
+ /**
122
+ * Duration of the punishment in seconds. Null means permanent.
123
+ */
124
+ 'durationSeconds'?: number | null;
125
+ }
126
+ /**
127
+ * Response after applying a punishment
128
+ */
129
+ export interface ApplyPunishmentResponse {
130
+ /**
131
+ * ID of the created punishment
132
+ */
133
+ 'punishmentId'?: number;
134
+ /**
135
+ * Player UUID punished
136
+ */
137
+ 'playerUuid'?: string;
138
+ /**
139
+ * Type of punishment applied
140
+ */
141
+ 'type'?: string;
142
+ /**
143
+ * Severity level (1-10)
144
+ */
145
+ 'severity'?: number;
146
+ /**
147
+ * New total punishment score after applying
148
+ */
149
+ 'newScore'?: number;
150
+ /**
151
+ * Whether this punishment is permanent
152
+ */
153
+ 'isPermanent'?: boolean;
154
+ /**
155
+ * Timestamp when punishment expires (ISO-8601 format, null if permanent)
156
+ */
157
+ 'expiresAt'?: string;
158
+ }
159
+ /**
160
+ * Request to create new client credentials
161
+ */
162
+ export interface ClientCredentialRequest {
163
+ /**
164
+ * Human-readable name for the client
165
+ */
166
+ 'name': string;
167
+ /**
168
+ * Optional description of the client\'s purpose
169
+ */
170
+ 'description'?: string;
171
+ }
172
+ /**
173
+ * Comprehensive connection analysis response including VPN detection, geolocation, bypass status, and optional player information
174
+ */
175
+ export interface ConnectionGetConnectionDetailsResponse {
176
+ /**
177
+ * The analyzed IPv4 address
178
+ */
179
+ 'ipAddress'?: string;
180
+ /**
181
+ * Approximate geographic location of the IP address, typically in \'City, Country\' format. Returns \'Local, N/A\' for localhost or private IPs.
182
+ */
183
+ 'approximateLocation'?: string;
184
+ /**
185
+ * Confidence score representing the percentage of VPN detection services that flagged this IP as suspicious. Range: 0.0 (clean) to 100.0 (definitely VPN/proxy). Values above 50.0 suggest high probability of VPN usage.
186
+ */
187
+ 'percentPositive'?: number;
188
+ /**
189
+ * Total number of VPN detection services successfully queried during the last check. Higher numbers indicate more comprehensive analysis.
190
+ */
191
+ 'numberOfChecks'?: number;
192
+ 'bypassed'?: boolean;
193
+ /**
194
+ * Expiration timestamp for the bypass (ISO-8601 format). After this time, normal VPN detection rules will apply again. Null if not bypassed or bypass is permanent.
195
+ */
196
+ 'bypassedUntil'?: string | null;
197
+ /**
198
+ * Player information associated with this connection. Only populated when \'associate_uuid\' query parameter is provided. Contains first join status and login history.
199
+ */
200
+ 'playerInformation'?: PlayerGetPlayerInformation | null;
201
+ /**
202
+ * Combined list of active punishments for both the IP address and player UUID (if provided). Only includes non-expired punishments.
203
+ */
204
+ 'punishments'?: Array<PunishmentGetPunishmentResponse>;
205
+ }
206
+ /**
207
+ * Request to create a connection bypass
208
+ */
209
+ export interface CreateBypassRequest {
210
+ /**
211
+ * IP address to bypass
212
+ */
213
+ 'ipAddress': string;
214
+ /**
215
+ * Unix epoch timestamp (seconds) when the bypass should expire
216
+ */
217
+ 'expiresAtEpoch': number;
218
+ }
219
+ /**
220
+ * Request to create a punishment draft for preview before applying
221
+ */
222
+ export interface CreatePunishmentDraftRequest {
223
+ /**
224
+ * Player UUID to punish
225
+ */
226
+ 'playerUuid': string;
227
+ /**
228
+ * Reason for the punishment
229
+ */
230
+ 'reason': string;
231
+ /**
232
+ * Type of punishment
233
+ */
234
+ 'type': string;
235
+ /**
236
+ * Severity level of the punishment (1-10)
237
+ */
238
+ 'severity': number;
239
+ /**
240
+ * Duration of the punishment in seconds. Null means permanent.
241
+ */
242
+ 'durationSeconds'?: number | null;
243
+ }
244
+ /**
245
+ * Player information including join history, tracking data, and punishment scoring
246
+ */
247
+ export interface PlayerGetPlayerInformation {
248
+ /**
249
+ * Timestamp of when the player first connected to the server (ISO-8601 format).
250
+ */
251
+ 'firstLogin'?: string;
252
+ /**
253
+ * Indicates whether this is the player\'s first time joining the server. Useful for triggering welcome messages, tutorials, or first-join rewards.
254
+ */
255
+ 'firstJoin'?: boolean;
256
+ /**
257
+ * Raw punishment score calculated as: SUM((base_weight × severity/10)) where base_weight is 0.10 for WARNING, 0.30 for MUTE, 0.50 for BAN. Severity ranges 1-10. Used for tracking overall punishment severity.
258
+ */
259
+ 'punishmentPointsRaw'?: number;
260
+ /**
261
+ * Punishment score as a percentage (0-100). When this score is >100% BEFORE applying a new punishment, the new punishment should be made permanent. Check this value BEFORE issuing punishment, not after. Calculated as raw_score × 100.
262
+ */
263
+ 'punishmentPointsPercent'?: number;
264
+ }
265
+ /**
266
+ * Response containing punishment draft preview with calculated points and thresholds
267
+ */
268
+ export interface PunishmentDraftResponse {
269
+ /**
270
+ * Player UUID this punishment would apply to
271
+ */
272
+ 'playerUuid'?: string;
273
+ /**
274
+ * Reason for the punishment
275
+ */
276
+ 'reason'?: string;
277
+ /**
278
+ * Type of punishment
279
+ */
280
+ 'type'?: string;
281
+ /**
282
+ * Severity level (1-10)
283
+ */
284
+ 'severity'?: number;
285
+ /**
286
+ * Current total punishment score before applying this punishment
287
+ */
288
+ 'currentScore'?: number;
289
+ /**
290
+ * Points this punishment would add
291
+ */
292
+ 'pointsToAdd'?: number;
293
+ /**
294
+ * New total score after applying this punishment
295
+ */
296
+ 'newScore'?: number;
297
+ /**
298
+ * Whether this punishment will be permanent
299
+ */
300
+ 'willBePermanent'?: boolean;
301
+ /**
302
+ * Duration in seconds (null if permanent)
303
+ */
304
+ 'durationSeconds'?: number;
305
+ /**
306
+ * Number of previous punishments for this player
307
+ */
308
+ 'previousPunishmentCount'?: number;
309
+ }
310
+ /**
311
+ * Punishment information including reason, type, creator, and expiration
312
+ */
313
+ export interface PunishmentGetPunishmentResponse {
314
+ /**
315
+ * Unique identifier for the punishment
316
+ */
317
+ 'id'?: number;
318
+ /**
319
+ * Reason for the punishment
320
+ */
321
+ 'reason'?: string;
322
+ /**
323
+ * Type of punishment (e.g., BAN, MUTE, KICK, WARNING)
324
+ */
325
+ 'type'?: string;
326
+ /**
327
+ * Severity level of the punishment (1-10, where 10 is most severe)
328
+ */
329
+ 'severity'?: number;
330
+ /**
331
+ * Username or identifier of the person who created this punishment
332
+ */
333
+ 'createdBy'?: string;
334
+ /**
335
+ * Timestamp when the punishment expires (ISO-8601 format). Null for permanent punishments.
336
+ */
337
+ 'expiresAt'?: string | null;
338
+ /**
339
+ * Timestamp when the punishment was created (ISO-8601 format)
340
+ */
341
+ 'createdAt'?: string;
342
+ }
343
+ /**
344
+ * Response containing punishment severity durations for each type
345
+ */
346
+ export interface PunishmentSeveritiesResponse {
347
+ /**
348
+ * List of punishment types with their severity durations
349
+ */
350
+ 'punishmentTypes'?: Array<PunishmentSeveritiesResponsePunishmentTypeInfo>;
351
+ }
352
+ /**
353
+ * Punishment type with severity information
354
+ */
355
+ export interface PunishmentSeveritiesResponsePunishmentTypeInfo {
356
+ /**
357
+ * Type of punishment
358
+ */
359
+ 'type'?: string;
360
+ /**
361
+ * List of severity levels with durations
362
+ */
363
+ 'severities'?: Array<PunishmentSeveritiesResponseSeverityInfo>;
364
+ }
365
+ /**
366
+ * Severity level with duration information
367
+ */
368
+ export interface PunishmentSeveritiesResponseSeverityInfo {
369
+ /**
370
+ * Severity level
371
+ */
372
+ 'severity'?: number;
373
+ /**
374
+ * Duration in seconds (0 means no duration)
375
+ */
376
+ 'durationSeconds'?: number;
377
+ }
378
+ /**
379
+ * Request to update client metadata
380
+ */
381
+ export interface UpdateClientRequest {
382
+ /**
383
+ * Human-readable name for the client
384
+ */
385
+ 'name'?: string;
386
+ /**
387
+ * Optional description of the client\'s purpose
388
+ */
389
+ 'description'?: string;
390
+ }
391
+
392
+ /**
393
+ * AdminClientCredentialsApi - axios parameter creator
394
+ */
395
+ export const AdminClientCredentialsApiAxiosParamCreator = function (configuration?: Configuration) {
396
+ return {
397
+ /**
398
+ * Temporarily disables a client credential, preventing authentication. Can be re-enabled later.
399
+ * @summary Disable client credentials
400
+ * @param {number} id Client credential ID
401
+ * @param {*} [options] Override http request option.
402
+ * @throws {RequiredError}
403
+ */
404
+ disableClient: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
405
+ // verify required parameter 'id' is not null or undefined
406
+ assertParamExists('disableClient', 'id', id)
407
+ const localVarPath = `/admin/client/{id}/disable`
408
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
409
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
410
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
411
+ let baseOptions;
412
+ if (configuration) {
413
+ baseOptions = configuration.baseOptions;
414
+ }
415
+
416
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
417
+ const localVarHeaderParameter = {} as any;
418
+ const localVarQueryParameter = {} as any;
419
+
420
+ // authentication CognitoAuth required
421
+ // http bearer authentication required
422
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
423
+
424
+
425
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
426
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
427
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
428
+
429
+ return {
430
+ url: toPathString(localVarUrlObj),
431
+ options: localVarRequestOptions,
432
+ };
433
+ },
434
+ /**
435
+ * Re-enables a previously disabled client credential, allowing authentication.
436
+ * @summary Enable client credentials
437
+ * @param {number} id Client credential ID
438
+ * @param {*} [options] Override http request option.
439
+ * @throws {RequiredError}
440
+ */
441
+ enableClient: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
442
+ // verify required parameter 'id' is not null or undefined
443
+ assertParamExists('enableClient', 'id', id)
444
+ const localVarPath = `/admin/client/{id}/enable`
445
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
446
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
447
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
448
+ let baseOptions;
449
+ if (configuration) {
450
+ baseOptions = configuration.baseOptions;
451
+ }
452
+
453
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
454
+ const localVarHeaderParameter = {} as any;
455
+ const localVarQueryParameter = {} as any;
456
+
457
+ // authentication CognitoAuth required
458
+ // http bearer authentication required
459
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
460
+
461
+
462
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
463
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
464
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
465
+
466
+ return {
467
+ url: toPathString(localVarUrlObj),
468
+ options: localVarRequestOptions,
469
+ };
470
+ },
471
+ /**
472
+ * Creates a new API client with credentials for authentication. Returns the client ID and secret (only shown once).
473
+ * @summary Generate new client credentials
474
+ * @param {ClientCredentialRequest} clientCredentialRequest
475
+ * @param {*} [options] Override http request option.
476
+ * @throws {RequiredError}
477
+ */
478
+ generateClientCredentials: async (clientCredentialRequest: ClientCredentialRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
479
+ // verify required parameter 'clientCredentialRequest' is not null or undefined
480
+ assertParamExists('generateClientCredentials', 'clientCredentialRequest', clientCredentialRequest)
481
+ const localVarPath = `/admin/client/generate`;
482
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
483
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
484
+ let baseOptions;
485
+ if (configuration) {
486
+ baseOptions = configuration.baseOptions;
487
+ }
488
+
489
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
490
+ const localVarHeaderParameter = {} as any;
491
+ const localVarQueryParameter = {} as any;
492
+
493
+ // authentication CognitoAuth required
494
+ // http bearer authentication required
495
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
496
+
497
+ localVarHeaderParameter['Content-Type'] = 'application/json';
498
+ localVarHeaderParameter['Accept'] = 'application/json';
499
+
500
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
501
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
502
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
503
+ localVarRequestOptions.data = serializeDataIfNeeded(clientCredentialRequest, localVarRequestOptions, configuration)
504
+
505
+ return {
506
+ url: toPathString(localVarUrlObj),
507
+ options: localVarRequestOptions,
508
+ };
509
+ },
510
+ /**
511
+ * Returns all client credentials. **Client secrets are never returned** from this endpoint.
512
+ * @summary List client credentials
513
+ * @param {*} [options] Override http request option.
514
+ * @throws {RequiredError}
515
+ */
516
+ listClients: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
517
+ const localVarPath = `/admin/client`;
518
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
519
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
520
+ let baseOptions;
521
+ if (configuration) {
522
+ baseOptions = configuration.baseOptions;
523
+ }
524
+
525
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
526
+ const localVarHeaderParameter = {} as any;
527
+ const localVarQueryParameter = {} as any;
528
+
529
+ // authentication CognitoAuth required
530
+ // http bearer authentication required
531
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
532
+
533
+ localVarHeaderParameter['Accept'] = 'application/json';
534
+
535
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
536
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
537
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
538
+
539
+ return {
540
+ url: toPathString(localVarUrlObj),
541
+ options: localVarRequestOptions,
542
+ };
543
+ },
544
+ /**
545
+ * Permanently deletes a client credential from the database, revoking all access.
546
+ * @summary Revoke client credentials
547
+ * @param {number} id Client credential ID
548
+ * @param {*} [options] Override http request option.
549
+ * @throws {RequiredError}
550
+ */
551
+ revokeToken: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
552
+ // verify required parameter 'id' is not null or undefined
553
+ assertParamExists('revokeToken', 'id', id)
554
+ const localVarPath = `/admin/client/{id}`
555
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
556
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
557
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
558
+ let baseOptions;
559
+ if (configuration) {
560
+ baseOptions = configuration.baseOptions;
561
+ }
562
+
563
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
564
+ const localVarHeaderParameter = {} as any;
565
+ const localVarQueryParameter = {} as any;
566
+
567
+ // authentication CognitoAuth required
568
+ // http bearer authentication required
569
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
570
+
571
+
572
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
573
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
574
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
575
+
576
+ return {
577
+ url: toPathString(localVarUrlObj),
578
+ options: localVarRequestOptions,
579
+ };
580
+ },
581
+ /**
582
+ * Generates new client ID and secret for an existing client. The old credentials will no longer work. Returns the new credentials (secret only shown once).
583
+ * @summary Rotate client credentials
584
+ * @param {number} id Client credential ID
585
+ * @param {*} [options] Override http request option.
586
+ * @throws {RequiredError}
587
+ */
588
+ rotateToken: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
589
+ // verify required parameter 'id' is not null or undefined
590
+ assertParamExists('rotateToken', 'id', id)
591
+ const localVarPath = `/admin/client/{id}/rotate`
592
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
593
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
594
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
595
+ let baseOptions;
596
+ if (configuration) {
597
+ baseOptions = configuration.baseOptions;
598
+ }
599
+
600
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
601
+ const localVarHeaderParameter = {} as any;
602
+ const localVarQueryParameter = {} as any;
603
+
604
+ // authentication CognitoAuth required
605
+ // http bearer authentication required
606
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
607
+
608
+ localVarHeaderParameter['Accept'] = 'application/json';
609
+
610
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
611
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
612
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
613
+
614
+ return {
615
+ url: toPathString(localVarUrlObj),
616
+ options: localVarRequestOptions,
617
+ };
618
+ },
619
+ /**
620
+ * Updates the name and/or description of a client credential. Does not affect the actual credentials.
621
+ * @summary Update client metadata
622
+ * @param {number} id Client credential ID
623
+ * @param {UpdateClientRequest} updateClientRequest
624
+ * @param {*} [options] Override http request option.
625
+ * @throws {RequiredError}
626
+ */
627
+ updateClient: async (id: number, updateClientRequest: UpdateClientRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
628
+ // verify required parameter 'id' is not null or undefined
629
+ assertParamExists('updateClient', 'id', id)
630
+ // verify required parameter 'updateClientRequest' is not null or undefined
631
+ assertParamExists('updateClient', 'updateClientRequest', updateClientRequest)
632
+ const localVarPath = `/admin/client/{id}`
633
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
634
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
635
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
636
+ let baseOptions;
637
+ if (configuration) {
638
+ baseOptions = configuration.baseOptions;
639
+ }
640
+
641
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
642
+ const localVarHeaderParameter = {} as any;
643
+ const localVarQueryParameter = {} as any;
644
+
645
+ // authentication CognitoAuth required
646
+ // http bearer authentication required
647
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
648
+
649
+ localVarHeaderParameter['Content-Type'] = 'application/json';
650
+ localVarHeaderParameter['Accept'] = 'application/json';
651
+
652
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
653
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
654
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
655
+ localVarRequestOptions.data = serializeDataIfNeeded(updateClientRequest, localVarRequestOptions, configuration)
656
+
657
+ return {
658
+ url: toPathString(localVarUrlObj),
659
+ options: localVarRequestOptions,
660
+ };
661
+ },
662
+ }
663
+ };
664
+
665
+ /**
666
+ * AdminClientCredentialsApi - functional programming interface
667
+ */
668
+ export const AdminClientCredentialsApiFp = function(configuration?: Configuration) {
669
+ const localVarAxiosParamCreator = AdminClientCredentialsApiAxiosParamCreator(configuration)
670
+ return {
671
+ /**
672
+ * Temporarily disables a client credential, preventing authentication. Can be re-enabled later.
673
+ * @summary Disable client credentials
674
+ * @param {number} id Client credential ID
675
+ * @param {*} [options] Override http request option.
676
+ * @throws {RequiredError}
677
+ */
678
+ async disableClient(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
679
+ const localVarAxiosArgs = await localVarAxiosParamCreator.disableClient(id, options);
680
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
681
+ const localVarOperationServerBasePath = operationServerMap['AdminClientCredentialsApi.disableClient']?.[localVarOperationServerIndex]?.url;
682
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
683
+ },
684
+ /**
685
+ * Re-enables a previously disabled client credential, allowing authentication.
686
+ * @summary Enable client credentials
687
+ * @param {number} id Client credential ID
688
+ * @param {*} [options] Override http request option.
689
+ * @throws {RequiredError}
690
+ */
691
+ async enableClient(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
692
+ const localVarAxiosArgs = await localVarAxiosParamCreator.enableClient(id, options);
693
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
694
+ const localVarOperationServerBasePath = operationServerMap['AdminClientCredentialsApi.enableClient']?.[localVarOperationServerIndex]?.url;
695
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
696
+ },
697
+ /**
698
+ * Creates a new API client with credentials for authentication. Returns the client ID and secret (only shown once).
699
+ * @summary Generate new client credentials
700
+ * @param {ClientCredentialRequest} clientCredentialRequest
701
+ * @param {*} [options] Override http request option.
702
+ * @throws {RequiredError}
703
+ */
704
+ async generateClientCredentials(clientCredentialRequest: ClientCredentialRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminClientCredentialResponse>> {
705
+ const localVarAxiosArgs = await localVarAxiosParamCreator.generateClientCredentials(clientCredentialRequest, options);
706
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
707
+ const localVarOperationServerBasePath = operationServerMap['AdminClientCredentialsApi.generateClientCredentials']?.[localVarOperationServerIndex]?.url;
708
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
709
+ },
710
+ /**
711
+ * Returns all client credentials. **Client secrets are never returned** from this endpoint.
712
+ * @summary List client credentials
713
+ * @param {*} [options] Override http request option.
714
+ * @throws {RequiredError}
715
+ */
716
+ async listClients(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AdminClientCredentialResponse>>> {
717
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listClients(options);
718
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
719
+ const localVarOperationServerBasePath = operationServerMap['AdminClientCredentialsApi.listClients']?.[localVarOperationServerIndex]?.url;
720
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
721
+ },
722
+ /**
723
+ * Permanently deletes a client credential from the database, revoking all access.
724
+ * @summary Revoke client credentials
725
+ * @param {number} id Client credential ID
726
+ * @param {*} [options] Override http request option.
727
+ * @throws {RequiredError}
728
+ */
729
+ async revokeToken(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
730
+ const localVarAxiosArgs = await localVarAxiosParamCreator.revokeToken(id, options);
731
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
732
+ const localVarOperationServerBasePath = operationServerMap['AdminClientCredentialsApi.revokeToken']?.[localVarOperationServerIndex]?.url;
733
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
734
+ },
735
+ /**
736
+ * Generates new client ID and secret for an existing client. The old credentials will no longer work. Returns the new credentials (secret only shown once).
737
+ * @summary Rotate client credentials
738
+ * @param {number} id Client credential ID
739
+ * @param {*} [options] Override http request option.
740
+ * @throws {RequiredError}
741
+ */
742
+ async rotateToken(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminClientCredentialResponse>> {
743
+ const localVarAxiosArgs = await localVarAxiosParamCreator.rotateToken(id, options);
744
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
745
+ const localVarOperationServerBasePath = operationServerMap['AdminClientCredentialsApi.rotateToken']?.[localVarOperationServerIndex]?.url;
746
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
747
+ },
748
+ /**
749
+ * Updates the name and/or description of a client credential. Does not affect the actual credentials.
750
+ * @summary Update client metadata
751
+ * @param {number} id Client credential ID
752
+ * @param {UpdateClientRequest} updateClientRequest
753
+ * @param {*} [options] Override http request option.
754
+ * @throws {RequiredError}
755
+ */
756
+ async updateClient(id: number, updateClientRequest: UpdateClientRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminClientCredentialResponse>> {
757
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateClient(id, updateClientRequest, options);
758
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
759
+ const localVarOperationServerBasePath = operationServerMap['AdminClientCredentialsApi.updateClient']?.[localVarOperationServerIndex]?.url;
760
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
761
+ },
762
+ }
763
+ };
764
+
765
+ /**
766
+ * AdminClientCredentialsApi - factory interface
767
+ */
768
+ export const AdminClientCredentialsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
769
+ const localVarFp = AdminClientCredentialsApiFp(configuration)
770
+ return {
771
+ /**
772
+ * Temporarily disables a client credential, preventing authentication. Can be re-enabled later.
773
+ * @summary Disable client credentials
774
+ * @param {number} id Client credential ID
775
+ * @param {*} [options] Override http request option.
776
+ * @throws {RequiredError}
777
+ */
778
+ disableClient(id: number, options?: RawAxiosRequestConfig): AxiosPromise<void> {
779
+ return localVarFp.disableClient(id, options).then((request) => request(axios, basePath));
780
+ },
781
+ /**
782
+ * Re-enables a previously disabled client credential, allowing authentication.
783
+ * @summary Enable client credentials
784
+ * @param {number} id Client credential ID
785
+ * @param {*} [options] Override http request option.
786
+ * @throws {RequiredError}
787
+ */
788
+ enableClient(id: number, options?: RawAxiosRequestConfig): AxiosPromise<void> {
789
+ return localVarFp.enableClient(id, options).then((request) => request(axios, basePath));
790
+ },
791
+ /**
792
+ * Creates a new API client with credentials for authentication. Returns the client ID and secret (only shown once).
793
+ * @summary Generate new client credentials
794
+ * @param {ClientCredentialRequest} clientCredentialRequest
795
+ * @param {*} [options] Override http request option.
796
+ * @throws {RequiredError}
797
+ */
798
+ generateClientCredentials(clientCredentialRequest: ClientCredentialRequest, options?: RawAxiosRequestConfig): AxiosPromise<AdminClientCredentialResponse> {
799
+ return localVarFp.generateClientCredentials(clientCredentialRequest, options).then((request) => request(axios, basePath));
800
+ },
801
+ /**
802
+ * Returns all client credentials. **Client secrets are never returned** from this endpoint.
803
+ * @summary List client credentials
804
+ * @param {*} [options] Override http request option.
805
+ * @throws {RequiredError}
806
+ */
807
+ listClients(options?: RawAxiosRequestConfig): AxiosPromise<Array<AdminClientCredentialResponse>> {
808
+ return localVarFp.listClients(options).then((request) => request(axios, basePath));
809
+ },
810
+ /**
811
+ * Permanently deletes a client credential from the database, revoking all access.
812
+ * @summary Revoke client credentials
813
+ * @param {number} id Client credential ID
814
+ * @param {*} [options] Override http request option.
815
+ * @throws {RequiredError}
816
+ */
817
+ revokeToken(id: number, options?: RawAxiosRequestConfig): AxiosPromise<void> {
818
+ return localVarFp.revokeToken(id, options).then((request) => request(axios, basePath));
819
+ },
820
+ /**
821
+ * Generates new client ID and secret for an existing client. The old credentials will no longer work. Returns the new credentials (secret only shown once).
822
+ * @summary Rotate client credentials
823
+ * @param {number} id Client credential ID
824
+ * @param {*} [options] Override http request option.
825
+ * @throws {RequiredError}
826
+ */
827
+ rotateToken(id: number, options?: RawAxiosRequestConfig): AxiosPromise<AdminClientCredentialResponse> {
828
+ return localVarFp.rotateToken(id, options).then((request) => request(axios, basePath));
829
+ },
830
+ /**
831
+ * Updates the name and/or description of a client credential. Does not affect the actual credentials.
832
+ * @summary Update client metadata
833
+ * @param {number} id Client credential ID
834
+ * @param {UpdateClientRequest} updateClientRequest
835
+ * @param {*} [options] Override http request option.
836
+ * @throws {RequiredError}
837
+ */
838
+ updateClient(id: number, updateClientRequest: UpdateClientRequest, options?: RawAxiosRequestConfig): AxiosPromise<AdminClientCredentialResponse> {
839
+ return localVarFp.updateClient(id, updateClientRequest, options).then((request) => request(axios, basePath));
840
+ },
841
+ };
842
+ };
843
+
844
+ /**
845
+ * AdminClientCredentialsApi - object-oriented interface
846
+ */
847
+ export class AdminClientCredentialsApi extends BaseAPI {
848
+ /**
849
+ * Temporarily disables a client credential, preventing authentication. Can be re-enabled later.
850
+ * @summary Disable client credentials
851
+ * @param {number} id Client credential ID
852
+ * @param {*} [options] Override http request option.
853
+ * @throws {RequiredError}
854
+ */
855
+ public disableClient(id: number, options?: RawAxiosRequestConfig) {
856
+ return AdminClientCredentialsApiFp(this.configuration).disableClient(id, options).then((request) => request(this.axios, this.basePath));
857
+ }
858
+
859
+ /**
860
+ * Re-enables a previously disabled client credential, allowing authentication.
861
+ * @summary Enable client credentials
862
+ * @param {number} id Client credential ID
863
+ * @param {*} [options] Override http request option.
864
+ * @throws {RequiredError}
865
+ */
866
+ public enableClient(id: number, options?: RawAxiosRequestConfig) {
867
+ return AdminClientCredentialsApiFp(this.configuration).enableClient(id, options).then((request) => request(this.axios, this.basePath));
868
+ }
869
+
870
+ /**
871
+ * Creates a new API client with credentials for authentication. Returns the client ID and secret (only shown once).
872
+ * @summary Generate new client credentials
873
+ * @param {ClientCredentialRequest} clientCredentialRequest
874
+ * @param {*} [options] Override http request option.
875
+ * @throws {RequiredError}
876
+ */
877
+ public generateClientCredentials(clientCredentialRequest: ClientCredentialRequest, options?: RawAxiosRequestConfig) {
878
+ return AdminClientCredentialsApiFp(this.configuration).generateClientCredentials(clientCredentialRequest, options).then((request) => request(this.axios, this.basePath));
879
+ }
880
+
881
+ /**
882
+ * Returns all client credentials. **Client secrets are never returned** from this endpoint.
883
+ * @summary List client credentials
884
+ * @param {*} [options] Override http request option.
885
+ * @throws {RequiredError}
886
+ */
887
+ public listClients(options?: RawAxiosRequestConfig) {
888
+ return AdminClientCredentialsApiFp(this.configuration).listClients(options).then((request) => request(this.axios, this.basePath));
889
+ }
890
+
891
+ /**
892
+ * Permanently deletes a client credential from the database, revoking all access.
893
+ * @summary Revoke client credentials
894
+ * @param {number} id Client credential ID
895
+ * @param {*} [options] Override http request option.
896
+ * @throws {RequiredError}
897
+ */
898
+ public revokeToken(id: number, options?: RawAxiosRequestConfig) {
899
+ return AdminClientCredentialsApiFp(this.configuration).revokeToken(id, options).then((request) => request(this.axios, this.basePath));
900
+ }
901
+
902
+ /**
903
+ * Generates new client ID and secret for an existing client. The old credentials will no longer work. Returns the new credentials (secret only shown once).
904
+ * @summary Rotate client credentials
905
+ * @param {number} id Client credential ID
906
+ * @param {*} [options] Override http request option.
907
+ * @throws {RequiredError}
908
+ */
909
+ public rotateToken(id: number, options?: RawAxiosRequestConfig) {
910
+ return AdminClientCredentialsApiFp(this.configuration).rotateToken(id, options).then((request) => request(this.axios, this.basePath));
911
+ }
912
+
913
+ /**
914
+ * Updates the name and/or description of a client credential. Does not affect the actual credentials.
915
+ * @summary Update client metadata
916
+ * @param {number} id Client credential ID
917
+ * @param {UpdateClientRequest} updateClientRequest
918
+ * @param {*} [options] Override http request option.
919
+ * @throws {RequiredError}
920
+ */
921
+ public updateClient(id: number, updateClientRequest: UpdateClientRequest, options?: RawAxiosRequestConfig) {
922
+ return AdminClientCredentialsApiFp(this.configuration).updateClient(id, updateClientRequest, options).then((request) => request(this.axios, this.basePath));
923
+ }
924
+ }
925
+
926
+
927
+
928
+ /**
929
+ * AdminConnectionsApi - axios parameter creator
930
+ */
931
+ export const AdminConnectionsApiAxiosParamCreator = function (configuration?: Configuration) {
932
+ return {
933
+ /**
934
+ * Creates a temporary bypass for an IP address, expiring at the specified epoch timestamp (milliseconds since Unix epoch).
935
+ * @summary Create connection bypass
936
+ * @param {CreateBypassRequest} createBypassRequest
937
+ * @param {*} [options] Override http request option.
938
+ * @throws {RequiredError}
939
+ */
940
+ createBypass: async (createBypassRequest: CreateBypassRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
941
+ // verify required parameter 'createBypassRequest' is not null or undefined
942
+ assertParamExists('createBypass', 'createBypassRequest', createBypassRequest)
943
+ const localVarPath = `/admin/connection/bypass`;
944
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
945
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
946
+ let baseOptions;
947
+ if (configuration) {
948
+ baseOptions = configuration.baseOptions;
949
+ }
950
+
951
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
952
+ const localVarHeaderParameter = {} as any;
953
+ const localVarQueryParameter = {} as any;
954
+
955
+ // authentication CognitoAuth required
956
+ // http bearer authentication required
957
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
958
+
959
+ localVarHeaderParameter['Content-Type'] = 'application/json';
960
+ localVarHeaderParameter['Accept'] = 'application/json';
961
+
962
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
963
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
964
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
965
+ localVarRequestOptions.data = serializeDataIfNeeded(createBypassRequest, localVarRequestOptions, configuration)
966
+
967
+ return {
968
+ url: toPathString(localVarUrlObj),
969
+ options: localVarRequestOptions,
970
+ };
971
+ },
972
+ /**
973
+ * Returns a list of recent connections with VPN detection status, bypass information, and associated player data. Optionally filter by epoch timestamp (seconds since Unix epoch).
974
+ * @summary List recent connections
975
+ * @param {number | null} [createdAfter] Filter connections after this epoch timestamp in milliseconds
976
+ * @param {number | null} [createdBefore] Filter connections before this epoch timestamp in milliseconds
977
+ * @param {string | null} [ipAddress] Filter by IP address
978
+ * @param {string | null} [uuid] Filter by player UUID
979
+ * @param {boolean | null} [isVpn] Filter by VPN status (true&#x3D;VPN, false&#x3D;not VPN)
980
+ * @param {number | null} [page] Page number for pagination
981
+ * @param {number | null} [limit] Maximum number of records to return
982
+ * @param {*} [options] Override http request option.
983
+ * @throws {RequiredError}
984
+ */
985
+ listConnections: async (createdAfter?: number | null, createdBefore?: number | null, ipAddress?: string | null, uuid?: string | null, isVpn?: boolean | null, page?: number | null, limit?: number | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
986
+ const localVarPath = `/admin/connection/recent`;
987
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
988
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
989
+ let baseOptions;
990
+ if (configuration) {
991
+ baseOptions = configuration.baseOptions;
992
+ }
993
+
994
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
995
+ const localVarHeaderParameter = {} as any;
996
+ const localVarQueryParameter = {} as any;
997
+
998
+ // authentication CognitoAuth required
999
+ // http bearer authentication required
1000
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
1001
+
1002
+ if (createdAfter !== undefined) {
1003
+ localVarQueryParameter['createdAfter'] = createdAfter;
1004
+ }
1005
+
1006
+ if (createdBefore !== undefined) {
1007
+ localVarQueryParameter['createdBefore'] = createdBefore;
1008
+ }
1009
+
1010
+ if (ipAddress !== undefined) {
1011
+ localVarQueryParameter['ipAddress'] = ipAddress;
1012
+ }
1013
+
1014
+ if (uuid !== undefined) {
1015
+ localVarQueryParameter['uuid'] = uuid;
1016
+ }
1017
+
1018
+ if (isVpn !== undefined) {
1019
+ localVarQueryParameter['isVpn'] = isVpn;
1020
+ }
1021
+
1022
+ if (page !== undefined) {
1023
+ localVarQueryParameter['page'] = page;
1024
+ }
1025
+
1026
+ if (limit !== undefined) {
1027
+ localVarQueryParameter['limit'] = limit;
1028
+ }
1029
+
1030
+ localVarHeaderParameter['Accept'] = 'application/json';
1031
+
1032
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1033
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1034
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1035
+
1036
+ return {
1037
+ url: toPathString(localVarUrlObj),
1038
+ options: localVarRequestOptions,
1039
+ };
1040
+ },
1041
+ }
1042
+ };
1043
+
1044
+ /**
1045
+ * AdminConnectionsApi - functional programming interface
1046
+ */
1047
+ export const AdminConnectionsApiFp = function(configuration?: Configuration) {
1048
+ const localVarAxiosParamCreator = AdminConnectionsApiAxiosParamCreator(configuration)
1049
+ return {
1050
+ /**
1051
+ * Creates a temporary bypass for an IP address, expiring at the specified epoch timestamp (milliseconds since Unix epoch).
1052
+ * @summary Create connection bypass
1053
+ * @param {CreateBypassRequest} createBypassRequest
1054
+ * @param {*} [options] Override http request option.
1055
+ * @throws {RequiredError}
1056
+ */
1057
+ async createBypass(createBypassRequest: CreateBypassRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminConnectionBypassResponse>> {
1058
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createBypass(createBypassRequest, options);
1059
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1060
+ const localVarOperationServerBasePath = operationServerMap['AdminConnectionsApi.createBypass']?.[localVarOperationServerIndex]?.url;
1061
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1062
+ },
1063
+ /**
1064
+ * Returns a list of recent connections with VPN detection status, bypass information, and associated player data. Optionally filter by epoch timestamp (seconds since Unix epoch).
1065
+ * @summary List recent connections
1066
+ * @param {number | null} [createdAfter] Filter connections after this epoch timestamp in milliseconds
1067
+ * @param {number | null} [createdBefore] Filter connections before this epoch timestamp in milliseconds
1068
+ * @param {string | null} [ipAddress] Filter by IP address
1069
+ * @param {string | null} [uuid] Filter by player UUID
1070
+ * @param {boolean | null} [isVpn] Filter by VPN status (true&#x3D;VPN, false&#x3D;not VPN)
1071
+ * @param {number | null} [page] Page number for pagination
1072
+ * @param {number | null} [limit] Maximum number of records to return
1073
+ * @param {*} [options] Override http request option.
1074
+ * @throws {RequiredError}
1075
+ */
1076
+ async listConnections(createdAfter?: number | null, createdBefore?: number | null, ipAddress?: string | null, uuid?: string | null, isVpn?: boolean | null, page?: number | null, limit?: number | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AdminDashboardConnectionResponse>>> {
1077
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listConnections(createdAfter, createdBefore, ipAddress, uuid, isVpn, page, limit, options);
1078
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1079
+ const localVarOperationServerBasePath = operationServerMap['AdminConnectionsApi.listConnections']?.[localVarOperationServerIndex]?.url;
1080
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1081
+ },
1082
+ }
1083
+ };
1084
+
1085
+ /**
1086
+ * AdminConnectionsApi - factory interface
1087
+ */
1088
+ export const AdminConnectionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1089
+ const localVarFp = AdminConnectionsApiFp(configuration)
1090
+ return {
1091
+ /**
1092
+ * Creates a temporary bypass for an IP address, expiring at the specified epoch timestamp (milliseconds since Unix epoch).
1093
+ * @summary Create connection bypass
1094
+ * @param {CreateBypassRequest} createBypassRequest
1095
+ * @param {*} [options] Override http request option.
1096
+ * @throws {RequiredError}
1097
+ */
1098
+ createBypass(createBypassRequest: CreateBypassRequest, options?: RawAxiosRequestConfig): AxiosPromise<AdminConnectionBypassResponse> {
1099
+ return localVarFp.createBypass(createBypassRequest, options).then((request) => request(axios, basePath));
1100
+ },
1101
+ /**
1102
+ * Returns a list of recent connections with VPN detection status, bypass information, and associated player data. Optionally filter by epoch timestamp (seconds since Unix epoch).
1103
+ * @summary List recent connections
1104
+ * @param {number | null} [createdAfter] Filter connections after this epoch timestamp in milliseconds
1105
+ * @param {number | null} [createdBefore] Filter connections before this epoch timestamp in milliseconds
1106
+ * @param {string | null} [ipAddress] Filter by IP address
1107
+ * @param {string | null} [uuid] Filter by player UUID
1108
+ * @param {boolean | null} [isVpn] Filter by VPN status (true&#x3D;VPN, false&#x3D;not VPN)
1109
+ * @param {number | null} [page] Page number for pagination
1110
+ * @param {number | null} [limit] Maximum number of records to return
1111
+ * @param {*} [options] Override http request option.
1112
+ * @throws {RequiredError}
1113
+ */
1114
+ listConnections(createdAfter?: number | null, createdBefore?: number | null, ipAddress?: string | null, uuid?: string | null, isVpn?: boolean | null, page?: number | null, limit?: number | null, options?: RawAxiosRequestConfig): AxiosPromise<Array<AdminDashboardConnectionResponse>> {
1115
+ return localVarFp.listConnections(createdAfter, createdBefore, ipAddress, uuid, isVpn, page, limit, options).then((request) => request(axios, basePath));
1116
+ },
1117
+ };
1118
+ };
1119
+
1120
+ /**
1121
+ * AdminConnectionsApi - object-oriented interface
1122
+ */
1123
+ export class AdminConnectionsApi extends BaseAPI {
1124
+ /**
1125
+ * Creates a temporary bypass for an IP address, expiring at the specified epoch timestamp (milliseconds since Unix epoch).
1126
+ * @summary Create connection bypass
1127
+ * @param {CreateBypassRequest} createBypassRequest
1128
+ * @param {*} [options] Override http request option.
1129
+ * @throws {RequiredError}
1130
+ */
1131
+ public createBypass(createBypassRequest: CreateBypassRequest, options?: RawAxiosRequestConfig) {
1132
+ return AdminConnectionsApiFp(this.configuration).createBypass(createBypassRequest, options).then((request) => request(this.axios, this.basePath));
1133
+ }
1134
+
1135
+ /**
1136
+ * Returns a list of recent connections with VPN detection status, bypass information, and associated player data. Optionally filter by epoch timestamp (seconds since Unix epoch).
1137
+ * @summary List recent connections
1138
+ * @param {number | null} [createdAfter] Filter connections after this epoch timestamp in milliseconds
1139
+ * @param {number | null} [createdBefore] Filter connections before this epoch timestamp in milliseconds
1140
+ * @param {string | null} [ipAddress] Filter by IP address
1141
+ * @param {string | null} [uuid] Filter by player UUID
1142
+ * @param {boolean | null} [isVpn] Filter by VPN status (true&#x3D;VPN, false&#x3D;not VPN)
1143
+ * @param {number | null} [page] Page number for pagination
1144
+ * @param {number | null} [limit] Maximum number of records to return
1145
+ * @param {*} [options] Override http request option.
1146
+ * @throws {RequiredError}
1147
+ */
1148
+ public listConnections(createdAfter?: number | null, createdBefore?: number | null, ipAddress?: string | null, uuid?: string | null, isVpn?: boolean | null, page?: number | null, limit?: number | null, options?: RawAxiosRequestConfig) {
1149
+ return AdminConnectionsApiFp(this.configuration).listConnections(createdAfter, createdBefore, ipAddress, uuid, isVpn, page, limit, options).then((request) => request(this.axios, this.basePath));
1150
+ }
1151
+ }
1152
+
1153
+
1154
+
1155
+ /**
1156
+ * AdminDashboardApi - axios parameter creator
1157
+ */
1158
+ export const AdminDashboardApiAxiosParamCreator = function (configuration?: Configuration) {
1159
+ return {
1160
+ /**
1161
+ * Returns aggregate counts for clients, connections, and players in the system.
1162
+ * @summary Get dashboard statistics
1163
+ * @param {*} [options] Override http request option.
1164
+ * @throws {RequiredError}
1165
+ */
1166
+ dashboardStats: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1167
+ const localVarPath = `/admin/dashboard`;
1168
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1169
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1170
+ let baseOptions;
1171
+ if (configuration) {
1172
+ baseOptions = configuration.baseOptions;
1173
+ }
1174
+
1175
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1176
+ const localVarHeaderParameter = {} as any;
1177
+ const localVarQueryParameter = {} as any;
1178
+
1179
+ // authentication CognitoAuth required
1180
+ // http bearer authentication required
1181
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
1182
+
1183
+ localVarHeaderParameter['Accept'] = 'application/json';
1184
+
1185
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1186
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1187
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1188
+
1189
+ return {
1190
+ url: toPathString(localVarUrlObj),
1191
+ options: localVarRequestOptions,
1192
+ };
1193
+ },
1194
+ }
1195
+ };
1196
+
1197
+ /**
1198
+ * AdminDashboardApi - functional programming interface
1199
+ */
1200
+ export const AdminDashboardApiFp = function(configuration?: Configuration) {
1201
+ const localVarAxiosParamCreator = AdminDashboardApiAxiosParamCreator(configuration)
1202
+ return {
1203
+ /**
1204
+ * Returns aggregate counts for clients, connections, and players in the system.
1205
+ * @summary Get dashboard statistics
1206
+ * @param {*} [options] Override http request option.
1207
+ * @throws {RequiredError}
1208
+ */
1209
+ async dashboardStats(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminGetDashboardStats>> {
1210
+ const localVarAxiosArgs = await localVarAxiosParamCreator.dashboardStats(options);
1211
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1212
+ const localVarOperationServerBasePath = operationServerMap['AdminDashboardApi.dashboardStats']?.[localVarOperationServerIndex]?.url;
1213
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1214
+ },
1215
+ }
1216
+ };
1217
+
1218
+ /**
1219
+ * AdminDashboardApi - factory interface
1220
+ */
1221
+ export const AdminDashboardApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1222
+ const localVarFp = AdminDashboardApiFp(configuration)
1223
+ return {
1224
+ /**
1225
+ * Returns aggregate counts for clients, connections, and players in the system.
1226
+ * @summary Get dashboard statistics
1227
+ * @param {*} [options] Override http request option.
1228
+ * @throws {RequiredError}
1229
+ */
1230
+ dashboardStats(options?: RawAxiosRequestConfig): AxiosPromise<AdminGetDashboardStats> {
1231
+ return localVarFp.dashboardStats(options).then((request) => request(axios, basePath));
1232
+ },
1233
+ };
1234
+ };
1235
+
1236
+ /**
1237
+ * AdminDashboardApi - object-oriented interface
1238
+ */
1239
+ export class AdminDashboardApi extends BaseAPI {
1240
+ /**
1241
+ * Returns aggregate counts for clients, connections, and players in the system.
1242
+ * @summary Get dashboard statistics
1243
+ * @param {*} [options] Override http request option.
1244
+ * @throws {RequiredError}
1245
+ */
1246
+ public dashboardStats(options?: RawAxiosRequestConfig) {
1247
+ return AdminDashboardApiFp(this.configuration).dashboardStats(options).then((request) => request(this.axios, this.basePath));
1248
+ }
1249
+ }
1250
+
1251
+
1252
+
1253
+ /**
1254
+ * ConnectionApi - axios parameter creator
1255
+ */
1256
+ export const ConnectionApiAxiosParamCreator = function (configuration?: Configuration) {
1257
+ return {
1258
+ /**
1259
+ * Performs comprehensive analysis of an IPv4 address to detect VPN, proxy, or suspicious connections. **Features:** - Multi-provider VPN/proxy detection with aggregated confidence scoring - Approximate geolocation lookup (city and country) - Connection bypass status and expiration tracking - Optional player UUID association for connection history **Use Cases:** - Prevent VPN/proxy usage during player authentication - Track player connection history across sessions - Implement temporary bypass systems for false positives - Monitor suspicious connection patterns **Query Parameters:** - `force_recheck`: Bypass cache and re-run all detection services - `associate_uuid`: Link this IP to a player UUID and return player info **Caching:** Results are cached unless `force_recheck=true` is specified, reducing API costs and improving response times.
1260
+ * @summary Check Connection and Detect VPN/Proxy
1261
+ * @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
1262
+ * @param {boolean} forceRecheck When true, bypasses cached results and re-runs all VPN detection services. Use this when you need the most up-to-date analysis or suspect cached data may be stale. Default: false
1263
+ * @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\&#39;s history - Update the player\&#39;s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\&#39;t block the response.
1264
+ * @param {*} [options] Override http request option.
1265
+ * @throws {RequiredError}
1266
+ */
1267
+ getConnectionDetails: async (ip: string, forceRecheck: boolean, associateUuid?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1268
+ // verify required parameter 'ip' is not null or undefined
1269
+ assertParamExists('getConnectionDetails', 'ip', ip)
1270
+ // verify required parameter 'forceRecheck' is not null or undefined
1271
+ assertParamExists('getConnectionDetails', 'forceRecheck', forceRecheck)
1272
+ const localVarPath = `/v1/connection/get-connection-details/{ip}`
1273
+ .replace(`{${"ip"}}`, encodeURIComponent(String(ip)));
1274
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1275
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1276
+ let baseOptions;
1277
+ if (configuration) {
1278
+ baseOptions = configuration.baseOptions;
1279
+ }
1280
+
1281
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1282
+ const localVarHeaderParameter = {} as any;
1283
+ const localVarQueryParameter = {} as any;
1284
+
1285
+ // authentication CognitoAuth required
1286
+ // http bearer authentication required
1287
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
1288
+
1289
+ if (forceRecheck !== undefined) {
1290
+ localVarQueryParameter['force_recheck'] = forceRecheck;
1291
+ }
1292
+
1293
+ if (associateUuid !== undefined) {
1294
+ localVarQueryParameter['associate_uuid'] = associateUuid;
1295
+ }
1296
+
1297
+ localVarHeaderParameter['Accept'] = 'application/json';
1298
+
1299
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1300
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1301
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1302
+
1303
+ return {
1304
+ url: toPathString(localVarUrlObj),
1305
+ options: localVarRequestOptions,
1306
+ };
1307
+ },
1308
+ }
1309
+ };
1310
+
1311
+ /**
1312
+ * ConnectionApi - functional programming interface
1313
+ */
1314
+ export const ConnectionApiFp = function(configuration?: Configuration) {
1315
+ const localVarAxiosParamCreator = ConnectionApiAxiosParamCreator(configuration)
1316
+ return {
1317
+ /**
1318
+ * Performs comprehensive analysis of an IPv4 address to detect VPN, proxy, or suspicious connections. **Features:** - Multi-provider VPN/proxy detection with aggregated confidence scoring - Approximate geolocation lookup (city and country) - Connection bypass status and expiration tracking - Optional player UUID association for connection history **Use Cases:** - Prevent VPN/proxy usage during player authentication - Track player connection history across sessions - Implement temporary bypass systems for false positives - Monitor suspicious connection patterns **Query Parameters:** - `force_recheck`: Bypass cache and re-run all detection services - `associate_uuid`: Link this IP to a player UUID and return player info **Caching:** Results are cached unless `force_recheck=true` is specified, reducing API costs and improving response times.
1319
+ * @summary Check Connection and Detect VPN/Proxy
1320
+ * @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
1321
+ * @param {boolean} forceRecheck When true, bypasses cached results and re-runs all VPN detection services. Use this when you need the most up-to-date analysis or suspect cached data may be stale. Default: false
1322
+ * @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\&#39;s history - Update the player\&#39;s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\&#39;t block the response.
1323
+ * @param {*} [options] Override http request option.
1324
+ * @throws {RequiredError}
1325
+ */
1326
+ async getConnectionDetails(ip: string, forceRecheck: boolean, associateUuid?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ConnectionGetConnectionDetailsResponse>> {
1327
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getConnectionDetails(ip, forceRecheck, associateUuid, options);
1328
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1329
+ const localVarOperationServerBasePath = operationServerMap['ConnectionApi.getConnectionDetails']?.[localVarOperationServerIndex]?.url;
1330
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1331
+ },
1332
+ }
1333
+ };
1334
+
1335
+ /**
1336
+ * ConnectionApi - factory interface
1337
+ */
1338
+ export const ConnectionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1339
+ const localVarFp = ConnectionApiFp(configuration)
1340
+ return {
1341
+ /**
1342
+ * 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.
1343
+ * @summary Check Connection and Detect VPN/Proxy
1344
+ * @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
1345
+ * @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
1346
+ * @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.
1347
+ * @param {*} [options] Override http request option.
1348
+ * @throws {RequiredError}
1349
+ */
1350
+ getConnectionDetails(ip: string, forceRecheck: boolean, associateUuid?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<ConnectionGetConnectionDetailsResponse> {
1351
+ return localVarFp.getConnectionDetails(ip, forceRecheck, associateUuid, options).then((request) => request(axios, basePath));
1352
+ },
1353
+ };
1354
+ };
1355
+
1356
+ /**
1357
+ * ConnectionApi - object-oriented interface
1358
+ */
1359
+ export class ConnectionApi extends BaseAPI {
1360
+ /**
1361
+ * 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.
1362
+ * @summary Check Connection and Detect VPN/Proxy
1363
+ * @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
1364
+ * @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
1365
+ * @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.
1366
+ * @param {*} [options] Override http request option.
1367
+ * @throws {RequiredError}
1368
+ */
1369
+ public getConnectionDetails(ip: string, forceRecheck: boolean, associateUuid?: string | null, options?: RawAxiosRequestConfig) {
1370
+ return ConnectionApiFp(this.configuration).getConnectionDetails(ip, forceRecheck, associateUuid, options).then((request) => request(this.axios, this.basePath));
1371
+ }
1372
+ }
1373
+
1374
+
1375
+
1376
+ /**
1377
+ * PlayerApi - axios parameter creator
1378
+ */
1379
+ export const PlayerApiAxiosParamCreator = function (configuration?: Configuration) {
1380
+ return {
1381
+ /**
1382
+ * 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.
1383
+ * @summary Get Player Information
1384
+ * @param {string} uuid The Minecraft player UUID (with or without dashes)
1385
+ * @param {*} [options] Override http request option.
1386
+ * @throws {RequiredError}
1387
+ */
1388
+ getPlayer: async (uuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1389
+ // verify required parameter 'uuid' is not null or undefined
1390
+ assertParamExists('getPlayer', 'uuid', uuid)
1391
+ const localVarPath = `/v1/player/{uuid}`
1392
+ .replace(`{${"uuid"}}`, encodeURIComponent(String(uuid)));
1393
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1394
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1395
+ let baseOptions;
1396
+ if (configuration) {
1397
+ baseOptions = configuration.baseOptions;
1398
+ }
1399
+
1400
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1401
+ const localVarHeaderParameter = {} as any;
1402
+ const localVarQueryParameter = {} as any;
1403
+
1404
+ // authentication CognitoAuth required
1405
+ // http bearer authentication required
1406
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
1407
+
1408
+ localVarHeaderParameter['Accept'] = 'application/json';
1409
+
1410
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1411
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1412
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1413
+
1414
+ return {
1415
+ url: toPathString(localVarUrlObj),
1416
+ options: localVarRequestOptions,
1417
+ };
1418
+ },
1419
+ }
1420
+ };
1421
+
1422
+ /**
1423
+ * PlayerApi - functional programming interface
1424
+ */
1425
+ export const PlayerApiFp = function(configuration?: Configuration) {
1426
+ const localVarAxiosParamCreator = PlayerApiAxiosParamCreator(configuration)
1427
+ return {
1428
+ /**
1429
+ * 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.
1430
+ * @summary Get Player Information
1431
+ * @param {string} uuid The Minecraft player UUID (with or without dashes)
1432
+ * @param {*} [options] Override http request option.
1433
+ * @throws {RequiredError}
1434
+ */
1435
+ async getPlayer(uuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PlayerGetPlayerInformation>> {
1436
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPlayer(uuid, options);
1437
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1438
+ const localVarOperationServerBasePath = operationServerMap['PlayerApi.getPlayer']?.[localVarOperationServerIndex]?.url;
1439
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1440
+ },
1441
+ }
1442
+ };
1443
+
1444
+ /**
1445
+ * PlayerApi - factory interface
1446
+ */
1447
+ export const PlayerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1448
+ const localVarFp = PlayerApiFp(configuration)
1449
+ return {
1450
+ /**
1451
+ * 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.
1452
+ * @summary Get Player Information
1453
+ * @param {string} uuid The Minecraft player UUID (with or without dashes)
1454
+ * @param {*} [options] Override http request option.
1455
+ * @throws {RequiredError}
1456
+ */
1457
+ getPlayer(uuid: string, options?: RawAxiosRequestConfig): AxiosPromise<PlayerGetPlayerInformation> {
1458
+ return localVarFp.getPlayer(uuid, options).then((request) => request(axios, basePath));
1459
+ },
1460
+ };
1461
+ };
1462
+
1463
+ /**
1464
+ * PlayerApi - object-oriented interface
1465
+ */
1466
+ export class PlayerApi extends BaseAPI {
1467
+ /**
1468
+ * 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.
1469
+ * @summary Get Player Information
1470
+ * @param {string} uuid The Minecraft player UUID (with or without dashes)
1471
+ * @param {*} [options] Override http request option.
1472
+ * @throws {RequiredError}
1473
+ */
1474
+ public getPlayer(uuid: string, options?: RawAxiosRequestConfig) {
1475
+ return PlayerApiFp(this.configuration).getPlayer(uuid, options).then((request) => request(this.axios, this.basePath));
1476
+ }
1477
+ }
1478
+
1479
+
1480
+
1481
+ /**
1482
+ * PunishmentApi - axios parameter creator
1483
+ */
1484
+ export const PunishmentApiAxiosParamCreator = function (configuration?: Configuration) {
1485
+ return {
1486
+ /**
1487
+ * Create and apply a punishment to a player. Automatically determines if permanent based on current score threshold (≥100%).
1488
+ * @summary Apply a punishment
1489
+ * @param {ApplyPunishmentRequest} applyPunishmentRequest
1490
+ * @param {*} [options] Override http request option.
1491
+ * @throws {RequiredError}
1492
+ */
1493
+ applyPunishment: async (applyPunishmentRequest: ApplyPunishmentRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1494
+ // verify required parameter 'applyPunishmentRequest' is not null or undefined
1495
+ assertParamExists('applyPunishment', 'applyPunishmentRequest', applyPunishmentRequest)
1496
+ const localVarPath = `/v1/punishment/apply`;
1497
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1498
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1499
+ let baseOptions;
1500
+ if (configuration) {
1501
+ baseOptions = configuration.baseOptions;
1502
+ }
1503
+
1504
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
1505
+ const localVarHeaderParameter = {} as any;
1506
+ const localVarQueryParameter = {} as any;
1507
+
1508
+ // authentication CognitoAuth required
1509
+ // http bearer authentication required
1510
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
1511
+
1512
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1513
+ localVarHeaderParameter['Accept'] = 'application/json';
1514
+
1515
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1516
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1517
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1518
+ localVarRequestOptions.data = serializeDataIfNeeded(applyPunishmentRequest, localVarRequestOptions, configuration)
1519
+
1520
+ return {
1521
+ url: toPathString(localVarUrlObj),
1522
+ options: localVarRequestOptions,
1523
+ };
1524
+ },
1525
+ /**
1526
+ * Preview punishment impact before applying. Returns calculated points, current/new thresholds, and whether it will be permanent.
1527
+ * @summary Create a punishment draft
1528
+ * @param {CreatePunishmentDraftRequest} createPunishmentDraftRequest
1529
+ * @param {*} [options] Override http request option.
1530
+ * @throws {RequiredError}
1531
+ */
1532
+ createPunishmentDraft: async (createPunishmentDraftRequest: CreatePunishmentDraftRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1533
+ // verify required parameter 'createPunishmentDraftRequest' is not null or undefined
1534
+ assertParamExists('createPunishmentDraft', 'createPunishmentDraftRequest', createPunishmentDraftRequest)
1535
+ const localVarPath = `/v1/punishment/draft`;
1536
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1537
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1538
+ let baseOptions;
1539
+ if (configuration) {
1540
+ baseOptions = configuration.baseOptions;
1541
+ }
1542
+
1543
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
1544
+ const localVarHeaderParameter = {} as any;
1545
+ const localVarQueryParameter = {} as any;
1546
+
1547
+ // authentication CognitoAuth required
1548
+ // http bearer authentication required
1549
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
1550
+
1551
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1552
+ localVarHeaderParameter['Accept'] = 'application/json';
1553
+
1554
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1555
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1556
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1557
+ localVarRequestOptions.data = serializeDataIfNeeded(createPunishmentDraftRequest, localVarRequestOptions, configuration)
1558
+
1559
+ return {
1560
+ url: toPathString(localVarUrlObj),
1561
+ options: localVarRequestOptions,
1562
+ };
1563
+ },
1564
+ /**
1565
+ * Retrieve duration information for each punishment type and severity level (1-10)
1566
+ * @summary Get punishment severities
1567
+ * @param {*} [options] Override http request option.
1568
+ * @throws {RequiredError}
1569
+ */
1570
+ getPunishmentSeverities: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1571
+ const localVarPath = `/v1/punishment/severities`;
1572
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1573
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1574
+ let baseOptions;
1575
+ if (configuration) {
1576
+ baseOptions = configuration.baseOptions;
1577
+ }
1578
+
1579
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1580
+ const localVarHeaderParameter = {} as any;
1581
+ const localVarQueryParameter = {} as any;
1582
+
1583
+ // authentication CognitoAuth required
1584
+ // http bearer authentication required
1585
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
1586
+
1587
+ localVarHeaderParameter['Accept'] = 'application/json';
1588
+
1589
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1590
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1591
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1592
+
1593
+ return {
1594
+ url: toPathString(localVarUrlObj),
1595
+ options: localVarRequestOptions,
1596
+ };
1597
+ },
1598
+ /**
1599
+ * Retrieve all active punishments for a player by UUID or username, optionally filtered by type and time
1600
+ * @summary Get punishments by player
1601
+ * @param {string | null} [uuid] Player UUID
1602
+ * @param {string | null} [username] Player username
1603
+ * @param {Array<string> | null} [type] Filter by punishment types
1604
+ * @param {number | null} [since] Filter punishments created after this Unix epoch timestamp (milliseconds)
1605
+ * @param {*} [options] Override http request option.
1606
+ * @throws {RequiredError}
1607
+ */
1608
+ getPunishments: async (uuid?: string | null, username?: string | null, type?: Array<string> | null, since?: number | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1609
+ const localVarPath = `/v1/punishment`;
1610
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1611
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1612
+ let baseOptions;
1613
+ if (configuration) {
1614
+ baseOptions = configuration.baseOptions;
1615
+ }
1616
+
1617
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1618
+ const localVarHeaderParameter = {} as any;
1619
+ const localVarQueryParameter = {} as any;
1620
+
1621
+ // authentication CognitoAuth required
1622
+ // http bearer authentication required
1623
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
1624
+
1625
+ if (uuid !== undefined) {
1626
+ localVarQueryParameter['uuid'] = uuid;
1627
+ }
1628
+
1629
+ if (username !== undefined) {
1630
+ localVarQueryParameter['username'] = username;
1631
+ }
1632
+
1633
+ if (type) {
1634
+ localVarQueryParameter['type'] = type.join(COLLECTION_FORMATS.csv);
1635
+ }
1636
+
1637
+ if (since !== undefined) {
1638
+ localVarQueryParameter['since'] = since;
1639
+ }
1640
+
1641
+ localVarHeaderParameter['Accept'] = 'application/json';
1642
+
1643
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1644
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1645
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1646
+
1647
+ return {
1648
+ url: toPathString(localVarUrlObj),
1649
+ options: localVarRequestOptions,
1650
+ };
1651
+ },
1652
+ /**
1653
+ * Retrieve all active punishments associated with an IP address
1654
+ * @summary Get punishments by IP address
1655
+ * @param {string} ip IP address
1656
+ * @param {*} [options] Override http request option.
1657
+ * @throws {RequiredError}
1658
+ */
1659
+ getPunishmentsByIp: async (ip: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1660
+ // verify required parameter 'ip' is not null or undefined
1661
+ assertParamExists('getPunishmentsByIp', 'ip', ip)
1662
+ const localVarPath = `/v1/punishment/ip`;
1663
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1664
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1665
+ let baseOptions;
1666
+ if (configuration) {
1667
+ baseOptions = configuration.baseOptions;
1668
+ }
1669
+
1670
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1671
+ const localVarHeaderParameter = {} as any;
1672
+ const localVarQueryParameter = {} as any;
1673
+
1674
+ // authentication CognitoAuth required
1675
+ // http bearer authentication required
1676
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
1677
+
1678
+ if (ip !== undefined) {
1679
+ localVarQueryParameter['ip'] = ip;
1680
+ }
1681
+
1682
+ localVarHeaderParameter['Accept'] = 'application/json';
1683
+
1684
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1685
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1686
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1687
+
1688
+ return {
1689
+ url: toPathString(localVarUrlObj),
1690
+ options: localVarRequestOptions,
1691
+ };
1692
+ },
1693
+ /**
1694
+ * Returns a paginated list of recent punishments with optional filtering by issue date, expiration date, and type
1695
+ * @summary List recent punishments
1696
+ * @param {number} limit Maximum number of records to return
1697
+ * @param {number} page Page number for pagination
1698
+ * @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (milliseconds)
1699
+ * @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (milliseconds)
1700
+ * @param {number | null} [expiresAfter] Filter punishments expiring after this epoch timestamp (milliseconds)
1701
+ * @param {number | null} [expiresBefore] Filter punishments expiring before this epoch timestamp (milliseconds)
1702
+ * @param {Array<string> | null} [type] Filter by punishment types
1703
+ * @param {string | null} [uuid] Filter by player UUID
1704
+ * @param {string | null} [ipAddress] Filter by IP address
1705
+ * @param {*} [options] Override http request option.
1706
+ * @throws {RequiredError}
1707
+ */
1708
+ 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> => {
1709
+ // verify required parameter 'limit' is not null or undefined
1710
+ assertParamExists('getRecentPunishments', 'limit', limit)
1711
+ // verify required parameter 'page' is not null or undefined
1712
+ assertParamExists('getRecentPunishments', 'page', page)
1713
+ const localVarPath = `/v1/punishment/recent`;
1714
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1715
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1716
+ let baseOptions;
1717
+ if (configuration) {
1718
+ baseOptions = configuration.baseOptions;
1719
+ }
1720
+
1721
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1722
+ const localVarHeaderParameter = {} as any;
1723
+ const localVarQueryParameter = {} as any;
1724
+
1725
+ // authentication CognitoAuth required
1726
+ // http bearer authentication required
1727
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
1728
+
1729
+ if (issuedAfter !== undefined) {
1730
+ localVarQueryParameter['issuedAfter'] = issuedAfter;
1731
+ }
1732
+
1733
+ if (issuedBefore !== undefined) {
1734
+ localVarQueryParameter['issuedBefore'] = issuedBefore;
1735
+ }
1736
+
1737
+ if (expiresAfter !== undefined) {
1738
+ localVarQueryParameter['expiresAfter'] = expiresAfter;
1739
+ }
1740
+
1741
+ if (expiresBefore !== undefined) {
1742
+ localVarQueryParameter['expiresBefore'] = expiresBefore;
1743
+ }
1744
+
1745
+ if (type) {
1746
+ localVarQueryParameter['type'] = type.join(COLLECTION_FORMATS.csv);
1747
+ }
1748
+
1749
+ if (uuid !== undefined) {
1750
+ localVarQueryParameter['uuid'] = uuid;
1751
+ }
1752
+
1753
+ if (ipAddress !== undefined) {
1754
+ localVarQueryParameter['ipAddress'] = ipAddress;
1755
+ }
1756
+
1757
+ if (limit !== undefined) {
1758
+ localVarQueryParameter['limit'] = limit;
1759
+ }
1760
+
1761
+ if (page !== undefined) {
1762
+ localVarQueryParameter['page'] = page;
1763
+ }
1764
+
1765
+ localVarHeaderParameter['Accept'] = 'application/json';
1766
+
1767
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1768
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1769
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1770
+
1771
+ return {
1772
+ url: toPathString(localVarUrlObj),
1773
+ options: localVarRequestOptions,
1774
+ };
1775
+ },
1776
+ }
1777
+ };
1778
+
1779
+ /**
1780
+ * PunishmentApi - functional programming interface
1781
+ */
1782
+ export const PunishmentApiFp = function(configuration?: Configuration) {
1783
+ const localVarAxiosParamCreator = PunishmentApiAxiosParamCreator(configuration)
1784
+ return {
1785
+ /**
1786
+ * Create and apply a punishment to a player. Automatically determines if permanent based on current score threshold (≥100%).
1787
+ * @summary Apply a punishment
1788
+ * @param {ApplyPunishmentRequest} applyPunishmentRequest
1789
+ * @param {*} [options] Override http request option.
1790
+ * @throws {RequiredError}
1791
+ */
1792
+ async applyPunishment(applyPunishmentRequest: ApplyPunishmentRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApplyPunishmentResponse>> {
1793
+ const localVarAxiosArgs = await localVarAxiosParamCreator.applyPunishment(applyPunishmentRequest, options);
1794
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1795
+ const localVarOperationServerBasePath = operationServerMap['PunishmentApi.applyPunishment']?.[localVarOperationServerIndex]?.url;
1796
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1797
+ },
1798
+ /**
1799
+ * Preview punishment impact before applying. Returns calculated points, current/new thresholds, and whether it will be permanent.
1800
+ * @summary Create a punishment draft
1801
+ * @param {CreatePunishmentDraftRequest} createPunishmentDraftRequest
1802
+ * @param {*} [options] Override http request option.
1803
+ * @throws {RequiredError}
1804
+ */
1805
+ async createPunishmentDraft(createPunishmentDraftRequest: CreatePunishmentDraftRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PunishmentDraftResponse>> {
1806
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createPunishmentDraft(createPunishmentDraftRequest, options);
1807
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1808
+ const localVarOperationServerBasePath = operationServerMap['PunishmentApi.createPunishmentDraft']?.[localVarOperationServerIndex]?.url;
1809
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1810
+ },
1811
+ /**
1812
+ * Retrieve duration information for each punishment type and severity level (1-10)
1813
+ * @summary Get punishment severities
1814
+ * @param {*} [options] Override http request option.
1815
+ * @throws {RequiredError}
1816
+ */
1817
+ async getPunishmentSeverities(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PunishmentSeveritiesResponse>> {
1818
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPunishmentSeverities(options);
1819
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1820
+ const localVarOperationServerBasePath = operationServerMap['PunishmentApi.getPunishmentSeverities']?.[localVarOperationServerIndex]?.url;
1821
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1822
+ },
1823
+ /**
1824
+ * Retrieve all active punishments for a player by UUID or username, optionally filtered by type and time
1825
+ * @summary Get punishments by player
1826
+ * @param {string | null} [uuid] Player UUID
1827
+ * @param {string | null} [username] Player username
1828
+ * @param {Array<string> | null} [type] Filter by punishment types
1829
+ * @param {number | null} [since] Filter punishments created after this Unix epoch timestamp (milliseconds)
1830
+ * @param {*} [options] Override http request option.
1831
+ * @throws {RequiredError}
1832
+ */
1833
+ async getPunishments(uuid?: string | null, username?: string | null, type?: Array<string> | null, since?: number | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<PunishmentGetPunishmentResponse>>> {
1834
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPunishments(uuid, username, type, since, options);
1835
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1836
+ const localVarOperationServerBasePath = operationServerMap['PunishmentApi.getPunishments']?.[localVarOperationServerIndex]?.url;
1837
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1838
+ },
1839
+ /**
1840
+ * Retrieve all active punishments associated with an IP address
1841
+ * @summary Get punishments by IP address
1842
+ * @param {string} ip IP address
1843
+ * @param {*} [options] Override http request option.
1844
+ * @throws {RequiredError}
1845
+ */
1846
+ async getPunishmentsByIp(ip: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<PunishmentGetPunishmentResponse>>> {
1847
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPunishmentsByIp(ip, options);
1848
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1849
+ const localVarOperationServerBasePath = operationServerMap['PunishmentApi.getPunishmentsByIp']?.[localVarOperationServerIndex]?.url;
1850
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1851
+ },
1852
+ /**
1853
+ * Returns a paginated list of recent punishments with optional filtering by issue date, expiration date, and type
1854
+ * @summary List recent punishments
1855
+ * @param {number} limit Maximum number of records to return
1856
+ * @param {number} page Page number for pagination
1857
+ * @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (milliseconds)
1858
+ * @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (milliseconds)
1859
+ * @param {number | null} [expiresAfter] Filter punishments expiring after this epoch timestamp (milliseconds)
1860
+ * @param {number | null} [expiresBefore] Filter punishments expiring before this epoch timestamp (milliseconds)
1861
+ * @param {Array<string> | null} [type] Filter by punishment types
1862
+ * @param {string | null} [uuid] Filter by player UUID
1863
+ * @param {string | null} [ipAddress] Filter by IP address
1864
+ * @param {*} [options] Override http request option.
1865
+ * @throws {RequiredError}
1866
+ */
1867
+ 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>>> {
1868
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getRecentPunishments(limit, page, issuedAfter, issuedBefore, expiresAfter, expiresBefore, type, uuid, ipAddress, options);
1869
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1870
+ const localVarOperationServerBasePath = operationServerMap['PunishmentApi.getRecentPunishments']?.[localVarOperationServerIndex]?.url;
1871
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1872
+ },
1873
+ }
1874
+ };
1875
+
1876
+ /**
1877
+ * PunishmentApi - factory interface
1878
+ */
1879
+ export const PunishmentApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1880
+ const localVarFp = PunishmentApiFp(configuration)
1881
+ return {
1882
+ /**
1883
+ * Create and apply a punishment to a player. Automatically determines if permanent based on current score threshold (≥100%).
1884
+ * @summary Apply a punishment
1885
+ * @param {ApplyPunishmentRequest} applyPunishmentRequest
1886
+ * @param {*} [options] Override http request option.
1887
+ * @throws {RequiredError}
1888
+ */
1889
+ applyPunishment(applyPunishmentRequest: ApplyPunishmentRequest, options?: RawAxiosRequestConfig): AxiosPromise<ApplyPunishmentResponse> {
1890
+ return localVarFp.applyPunishment(applyPunishmentRequest, options).then((request) => request(axios, basePath));
1891
+ },
1892
+ /**
1893
+ * Preview punishment impact before applying. Returns calculated points, current/new thresholds, and whether it will be permanent.
1894
+ * @summary Create a punishment draft
1895
+ * @param {CreatePunishmentDraftRequest} createPunishmentDraftRequest
1896
+ * @param {*} [options] Override http request option.
1897
+ * @throws {RequiredError}
1898
+ */
1899
+ createPunishmentDraft(createPunishmentDraftRequest: CreatePunishmentDraftRequest, options?: RawAxiosRequestConfig): AxiosPromise<PunishmentDraftResponse> {
1900
+ return localVarFp.createPunishmentDraft(createPunishmentDraftRequest, options).then((request) => request(axios, basePath));
1901
+ },
1902
+ /**
1903
+ * Retrieve duration information for each punishment type and severity level (1-10)
1904
+ * @summary Get punishment severities
1905
+ * @param {*} [options] Override http request option.
1906
+ * @throws {RequiredError}
1907
+ */
1908
+ getPunishmentSeverities(options?: RawAxiosRequestConfig): AxiosPromise<PunishmentSeveritiesResponse> {
1909
+ return localVarFp.getPunishmentSeverities(options).then((request) => request(axios, basePath));
1910
+ },
1911
+ /**
1912
+ * Retrieve all active punishments for a player by UUID or username, optionally filtered by type and time
1913
+ * @summary Get punishments by player
1914
+ * @param {string | null} [uuid] Player UUID
1915
+ * @param {string | null} [username] Player username
1916
+ * @param {Array<string> | null} [type] Filter by punishment types
1917
+ * @param {number | null} [since] Filter punishments created after this Unix epoch timestamp (milliseconds)
1918
+ * @param {*} [options] Override http request option.
1919
+ * @throws {RequiredError}
1920
+ */
1921
+ getPunishments(uuid?: string | null, username?: string | null, type?: Array<string> | null, since?: number | null, options?: RawAxiosRequestConfig): AxiosPromise<Array<PunishmentGetPunishmentResponse>> {
1922
+ return localVarFp.getPunishments(uuid, username, type, since, options).then((request) => request(axios, basePath));
1923
+ },
1924
+ /**
1925
+ * Retrieve all active punishments associated with an IP address
1926
+ * @summary Get punishments by IP address
1927
+ * @param {string} ip IP address
1928
+ * @param {*} [options] Override http request option.
1929
+ * @throws {RequiredError}
1930
+ */
1931
+ getPunishmentsByIp(ip: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<PunishmentGetPunishmentResponse>> {
1932
+ return localVarFp.getPunishmentsByIp(ip, options).then((request) => request(axios, basePath));
1933
+ },
1934
+ /**
1935
+ * Returns a paginated list of recent punishments with optional filtering by issue date, expiration date, and type
1936
+ * @summary List recent punishments
1937
+ * @param {number} limit Maximum number of records to return
1938
+ * @param {number} page Page number for pagination
1939
+ * @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (milliseconds)
1940
+ * @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (milliseconds)
1941
+ * @param {number | null} [expiresAfter] Filter punishments expiring after this epoch timestamp (milliseconds)
1942
+ * @param {number | null} [expiresBefore] Filter punishments expiring before this epoch timestamp (milliseconds)
1943
+ * @param {Array<string> | null} [type] Filter by punishment types
1944
+ * @param {string | null} [uuid] Filter by player UUID
1945
+ * @param {string | null} [ipAddress] Filter by IP address
1946
+ * @param {*} [options] Override http request option.
1947
+ * @throws {RequiredError}
1948
+ */
1949
+ 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>> {
1950
+ return localVarFp.getRecentPunishments(limit, page, issuedAfter, issuedBefore, expiresAfter, expiresBefore, type, uuid, ipAddress, options).then((request) => request(axios, basePath));
1951
+ },
1952
+ };
1953
+ };
1954
+
1955
+ /**
1956
+ * PunishmentApi - object-oriented interface
1957
+ */
1958
+ export class PunishmentApi extends BaseAPI {
1959
+ /**
1960
+ * Create and apply a punishment to a player. Automatically determines if permanent based on current score threshold (≥100%).
1961
+ * @summary Apply a punishment
1962
+ * @param {ApplyPunishmentRequest} applyPunishmentRequest
1963
+ * @param {*} [options] Override http request option.
1964
+ * @throws {RequiredError}
1965
+ */
1966
+ public applyPunishment(applyPunishmentRequest: ApplyPunishmentRequest, options?: RawAxiosRequestConfig) {
1967
+ return PunishmentApiFp(this.configuration).applyPunishment(applyPunishmentRequest, options).then((request) => request(this.axios, this.basePath));
1968
+ }
1969
+
1970
+ /**
1971
+ * Preview punishment impact before applying. Returns calculated points, current/new thresholds, and whether it will be permanent.
1972
+ * @summary Create a punishment draft
1973
+ * @param {CreatePunishmentDraftRequest} createPunishmentDraftRequest
1974
+ * @param {*} [options] Override http request option.
1975
+ * @throws {RequiredError}
1976
+ */
1977
+ public createPunishmentDraft(createPunishmentDraftRequest: CreatePunishmentDraftRequest, options?: RawAxiosRequestConfig) {
1978
+ return PunishmentApiFp(this.configuration).createPunishmentDraft(createPunishmentDraftRequest, options).then((request) => request(this.axios, this.basePath));
1979
+ }
1980
+
1981
+ /**
1982
+ * Retrieve duration information for each punishment type and severity level (1-10)
1983
+ * @summary Get punishment severities
1984
+ * @param {*} [options] Override http request option.
1985
+ * @throws {RequiredError}
1986
+ */
1987
+ public getPunishmentSeverities(options?: RawAxiosRequestConfig) {
1988
+ return PunishmentApiFp(this.configuration).getPunishmentSeverities(options).then((request) => request(this.axios, this.basePath));
1989
+ }
1990
+
1991
+ /**
1992
+ * Retrieve all active punishments for a player by UUID or username, optionally filtered by type and time
1993
+ * @summary Get punishments by player
1994
+ * @param {string | null} [uuid] Player UUID
1995
+ * @param {string | null} [username] Player username
1996
+ * @param {Array<string> | null} [type] Filter by punishment types
1997
+ * @param {number | null} [since] Filter punishments created after this Unix epoch timestamp (milliseconds)
1998
+ * @param {*} [options] Override http request option.
1999
+ * @throws {RequiredError}
2000
+ */
2001
+ public getPunishments(uuid?: string | null, username?: string | null, type?: Array<string> | null, since?: number | null, options?: RawAxiosRequestConfig) {
2002
+ return PunishmentApiFp(this.configuration).getPunishments(uuid, username, type, since, options).then((request) => request(this.axios, this.basePath));
2003
+ }
2004
+
2005
+ /**
2006
+ * Retrieve all active punishments associated with an IP address
2007
+ * @summary Get punishments by IP address
2008
+ * @param {string} ip IP address
2009
+ * @param {*} [options] Override http request option.
2010
+ * @throws {RequiredError}
2011
+ */
2012
+ public getPunishmentsByIp(ip: string, options?: RawAxiosRequestConfig) {
2013
+ return PunishmentApiFp(this.configuration).getPunishmentsByIp(ip, options).then((request) => request(this.axios, this.basePath));
2014
+ }
2015
+
2016
+ /**
2017
+ * Returns a paginated list of recent punishments with optional filtering by issue date, expiration date, and type
2018
+ * @summary List recent punishments
2019
+ * @param {number} limit Maximum number of records to return
2020
+ * @param {number} page Page number for pagination
2021
+ * @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (milliseconds)
2022
+ * @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (milliseconds)
2023
+ * @param {number | null} [expiresAfter] Filter punishments expiring after this epoch timestamp (milliseconds)
2024
+ * @param {number | null} [expiresBefore] Filter punishments expiring before this epoch timestamp (milliseconds)
2025
+ * @param {Array<string> | null} [type] Filter by punishment types
2026
+ * @param {string | null} [uuid] Filter by player UUID
2027
+ * @param {string | null} [ipAddress] Filter by IP address
2028
+ * @param {*} [options] Override http request option.
2029
+ * @throws {RequiredError}
2030
+ */
2031
+ 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) {
2032
+ return PunishmentApiFp(this.configuration).getRecentPunishments(limit, page, issuedAfter, issuedBefore, expiresAfter, expiresBefore, type, uuid, ipAddress, options).then((request) => request(this.axios, this.basePath));
2033
+ }
2034
+ }
2035
+
2036
+
2037
+