@rebornteam/reborn-api 2.5.1 → 2.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +20 -4
- package/README.md +32 -12
- package/api.ts +1372 -357
- package/base.ts +2 -2
- package/common.ts +2 -2
- package/configuration.ts +2 -2
- package/dist/api.d.ts +795 -176
- package/dist/api.js +954 -268
- package/dist/base.d.ts +2 -2
- package/dist/base.js +2 -2
- package/dist/common.d.ts +2 -2
- package/dist/common.js +2 -2
- package/dist/configuration.d.ts +2 -2
- package/dist/configuration.js +2 -2
- package/dist/esm/api.d.ts +795 -176
- package/dist/esm/api.js +917 -243
- package/dist/esm/base.d.ts +2 -2
- package/dist/esm/base.js +2 -2
- package/dist/esm/common.d.ts +2 -2
- package/dist/esm/common.js +2 -2
- package/dist/esm/configuration.d.ts +2 -2
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/docs/AdminApplyPunishmentRequest.md +33 -0
- package/docs/AdminApplyPunishmentResponse.md +21 -0
- package/docs/AdminApplyPunishmentResult.md +33 -0
- package/docs/AdminClientCredentialResponse.md +2 -0
- package/docs/AdminClientCredentialsApi.md +17 -17
- package/docs/AdminConnectionsApi.md +70 -4
- package/docs/AdminCreatePunishmentDraftRequest.md +31 -0
- package/docs/AdminDashboardApi.md +2 -2
- package/docs/AdminIpSearchResult.md +23 -0
- package/docs/AdminPagedConnectionResponse.md +29 -0
- package/docs/AdminPagedPlayerResponse.md +29 -0
- package/docs/AdminPagedPunishmentResponse.md +29 -0
- package/docs/AdminPlayerDetailResponse.md +37 -0
- package/docs/AdminPlayerSearchResult.md +23 -0
- package/docs/AdminPlayerSummary.md +35 -0
- package/docs/AdminPlayersApi.md +122 -0
- package/docs/AdminPunishmentDraftResponse.md +21 -0
- package/docs/AdminPunishmentEvaluation.md +39 -0
- package/docs/AdminPunishmentListItem.md +42 -0
- package/docs/AdminPunishmentSearchResponse.md +25 -0
- package/docs/AdminPunishmentTarget.md +23 -0
- package/docs/AdminPunishmentsApi.md +248 -0
- package/docs/AdminUsernameHistoryEntry.md +23 -0
- package/docs/ClientCredentialRequest.md +2 -0
- package/docs/ConnectionApi.md +1 -1
- package/docs/DefaultApi.md +105 -0
- package/docs/PlayerApi.md +5 -5
- package/docs/PunishmentApi.md +8 -114
- package/docs/PunishmentGetPunishmentResponse.md +5 -3
- package/index.ts +2 -2
- package/package.json +2 -2
- package/docs/ApplyPunishmentRequest.md +0 -31
- package/docs/ApplyPunishmentResponse.md +0 -33
- package/docs/CreatePunishmentDraftRequest.md +0 -29
- package/docs/PunishmentDraftResponse.md +0 -39
package/api.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Reborn API
|
|
5
|
-
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **
|
|
5
|
+
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 2.
|
|
7
|
+
* The version of the OpenAPI document: 2.6.4
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -23,6 +23,90 @@ import type { RequestArgs } from './base';
|
|
|
23
23
|
// @ts-ignore
|
|
24
24
|
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
|
|
25
25
|
|
|
26
|
+
/**
|
|
27
|
+
* Request to apply a punishment to one or more targets
|
|
28
|
+
*/
|
|
29
|
+
export interface AdminApplyPunishmentRequest {
|
|
30
|
+
/**
|
|
31
|
+
* List of targets to punish — each must have either a uuid or ipAddress
|
|
32
|
+
*/
|
|
33
|
+
'targets': Array<AdminPunishmentTarget>;
|
|
34
|
+
/**
|
|
35
|
+
* Punishment type
|
|
36
|
+
*/
|
|
37
|
+
'type': AdminApplyPunishmentRequestTypeEnum;
|
|
38
|
+
/**
|
|
39
|
+
* Severity level: 1=Minor, 2=Moderate, 3=Severe, 4=Critical
|
|
40
|
+
*/
|
|
41
|
+
'severity'?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Reason for the punishment
|
|
44
|
+
*/
|
|
45
|
+
'reason': string;
|
|
46
|
+
/**
|
|
47
|
+
* Custom duration in seconds — if omitted the suggested duration for the type and severity is used
|
|
48
|
+
*/
|
|
49
|
+
'durationSeconds'?: number | null;
|
|
50
|
+
/**
|
|
51
|
+
* Force the punishment to be permanent regardless of the target\'s current score
|
|
52
|
+
*/
|
|
53
|
+
'forcePermanent'?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Internal notes visible only to administrators — not shown to the punished player
|
|
56
|
+
*/
|
|
57
|
+
'notes'?: string | null;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export const AdminApplyPunishmentRequestTypeEnum = {
|
|
61
|
+
Ban: 'BAN',
|
|
62
|
+
Mute: 'MUTE',
|
|
63
|
+
Warning: 'WARNING'
|
|
64
|
+
} as const;
|
|
65
|
+
|
|
66
|
+
export type AdminApplyPunishmentRequestTypeEnum = typeof AdminApplyPunishmentRequestTypeEnum[keyof typeof AdminApplyPunishmentRequestTypeEnum];
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Batch punishment apply result — one result per target
|
|
70
|
+
*/
|
|
71
|
+
export interface AdminApplyPunishmentResponse {
|
|
72
|
+
/**
|
|
73
|
+
* Ordered list of results, one per target in the request
|
|
74
|
+
*/
|
|
75
|
+
'results'?: Array<AdminApplyPunishmentResult>;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Result of applying a punishment to a single target
|
|
79
|
+
*/
|
|
80
|
+
export interface AdminApplyPunishmentResult {
|
|
81
|
+
/**
|
|
82
|
+
* The target this result applies to
|
|
83
|
+
*/
|
|
84
|
+
'target'?: AdminPunishmentTarget;
|
|
85
|
+
/**
|
|
86
|
+
* ID of the created punishment record
|
|
87
|
+
*/
|
|
88
|
+
'punishmentId'?: number;
|
|
89
|
+
/**
|
|
90
|
+
* Punishment type applied
|
|
91
|
+
*/
|
|
92
|
+
'type'?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Severity level applied
|
|
95
|
+
*/
|
|
96
|
+
'severity'?: number;
|
|
97
|
+
/**
|
|
98
|
+
* Updated punishment score after applying
|
|
99
|
+
*/
|
|
100
|
+
'newScore'?: number;
|
|
101
|
+
/**
|
|
102
|
+
* Whether the punishment was made permanent
|
|
103
|
+
*/
|
|
104
|
+
'isPermanent'?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* When the punishment expires — null if permanent or a WARNING
|
|
107
|
+
*/
|
|
108
|
+
'expiresAt'?: string | null;
|
|
109
|
+
}
|
|
26
110
|
/**
|
|
27
111
|
* Client credential response
|
|
28
112
|
*/
|
|
@@ -55,6 +139,10 @@ export interface AdminClientCredentialResponse {
|
|
|
55
139
|
* Timestamp when the credential was created (ISO-8601 format)
|
|
56
140
|
*/
|
|
57
141
|
'createdAt'?: string;
|
|
142
|
+
/**
|
|
143
|
+
* Timestamp when the credential expires (ISO-8601 format). Null means the credential never expires.
|
|
144
|
+
*/
|
|
145
|
+
'expiresAt'?: string | null;
|
|
58
146
|
}
|
|
59
147
|
/**
|
|
60
148
|
* Connection bypass response
|
|
@@ -77,6 +165,44 @@ export interface AdminConnectionBypassResponse {
|
|
|
77
165
|
*/
|
|
78
166
|
'createdAt'?: string;
|
|
79
167
|
}
|
|
168
|
+
/**
|
|
169
|
+
* Request to evaluate the impact of a punishment across one or more targets before applying
|
|
170
|
+
*/
|
|
171
|
+
export interface AdminCreatePunishmentDraftRequest {
|
|
172
|
+
/**
|
|
173
|
+
* List of targets to evaluate — each must have either a uuid or ipAddress
|
|
174
|
+
*/
|
|
175
|
+
'targets': Array<AdminPunishmentTarget>;
|
|
176
|
+
/**
|
|
177
|
+
* Punishment type
|
|
178
|
+
*/
|
|
179
|
+
'type': AdminCreatePunishmentDraftRequestTypeEnum;
|
|
180
|
+
/**
|
|
181
|
+
* Severity level: 1=Minor, 2=Moderate, 3=Severe, 4=Critical
|
|
182
|
+
*/
|
|
183
|
+
'severity'?: number;
|
|
184
|
+
/**
|
|
185
|
+
* Reason for the punishment (not used in evaluation, required for apply)
|
|
186
|
+
*/
|
|
187
|
+
'reason': string;
|
|
188
|
+
/**
|
|
189
|
+
* Custom duration in seconds — if omitted the suggested duration for the type and severity is used
|
|
190
|
+
*/
|
|
191
|
+
'durationSeconds'?: number | null;
|
|
192
|
+
/**
|
|
193
|
+
* Force the punishment to be permanent regardless of the target\'s current score
|
|
194
|
+
*/
|
|
195
|
+
'forcePermanent'?: boolean;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export const AdminCreatePunishmentDraftRequestTypeEnum = {
|
|
199
|
+
Ban: 'BAN',
|
|
200
|
+
Mute: 'MUTE',
|
|
201
|
+
Warning: 'WARNING'
|
|
202
|
+
} as const;
|
|
203
|
+
|
|
204
|
+
export type AdminCreatePunishmentDraftRequestTypeEnum = typeof AdminCreatePunishmentDraftRequestTypeEnum[keyof typeof AdminCreatePunishmentDraftRequestTypeEnum];
|
|
205
|
+
|
|
80
206
|
export interface AdminDashboardConnectionResponse {
|
|
81
207
|
'id': number;
|
|
82
208
|
'ipAddress': string;
|
|
@@ -95,319 +221,493 @@ export interface AdminGetDashboardStats {
|
|
|
95
221
|
'totalClients': number;
|
|
96
222
|
}
|
|
97
223
|
/**
|
|
98
|
-
*
|
|
224
|
+
* A single IP address match in a punishment search, with all players ever seen on that IP
|
|
99
225
|
*/
|
|
100
|
-
export interface
|
|
226
|
+
export interface AdminIpSearchResult {
|
|
101
227
|
/**
|
|
102
|
-
*
|
|
228
|
+
* IP address
|
|
103
229
|
*/
|
|
104
|
-
'
|
|
230
|
+
'ipAddress'?: string;
|
|
105
231
|
/**
|
|
106
|
-
*
|
|
232
|
+
* Players ever seen on this IP
|
|
107
233
|
*/
|
|
108
|
-
'
|
|
234
|
+
'players'?: Array<AdminPlayerSearchResult>;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Paginated connection list response
|
|
238
|
+
*/
|
|
239
|
+
export interface AdminPagedConnectionResponse {
|
|
109
240
|
/**
|
|
110
|
-
*
|
|
241
|
+
* Connections on the current page
|
|
111
242
|
*/
|
|
112
|
-
'
|
|
243
|
+
'data'?: Array<AdminDashboardConnectionResponse>;
|
|
113
244
|
/**
|
|
114
|
-
*
|
|
245
|
+
* Total number of connections matching the filters
|
|
115
246
|
*/
|
|
116
|
-
'
|
|
247
|
+
'total'?: number;
|
|
117
248
|
/**
|
|
118
|
-
*
|
|
249
|
+
* Current page (1-indexed)
|
|
119
250
|
*/
|
|
120
|
-
'
|
|
251
|
+
'page'?: number;
|
|
121
252
|
/**
|
|
122
|
-
*
|
|
253
|
+
* Page size
|
|
123
254
|
*/
|
|
124
|
-
'
|
|
255
|
+
'limit'?: number;
|
|
256
|
+
/**
|
|
257
|
+
* Total number of pages
|
|
258
|
+
*/
|
|
259
|
+
'totalPages'?: number;
|
|
125
260
|
}
|
|
126
261
|
/**
|
|
127
|
-
*
|
|
262
|
+
* Paginated player list response
|
|
128
263
|
*/
|
|
129
|
-
export interface
|
|
264
|
+
export interface AdminPagedPlayerResponse {
|
|
130
265
|
/**
|
|
131
|
-
*
|
|
266
|
+
* Players on the current page
|
|
132
267
|
*/
|
|
133
|
-
'
|
|
268
|
+
'data'?: Array<AdminPlayerSummary>;
|
|
134
269
|
/**
|
|
135
|
-
*
|
|
270
|
+
* Total number of players matching the search filter
|
|
136
271
|
*/
|
|
137
|
-
'
|
|
272
|
+
'total'?: number;
|
|
138
273
|
/**
|
|
139
|
-
*
|
|
274
|
+
* Current page (1-indexed)
|
|
140
275
|
*/
|
|
141
|
-
'
|
|
276
|
+
'page'?: number;
|
|
142
277
|
/**
|
|
143
|
-
*
|
|
278
|
+
* Page size
|
|
144
279
|
*/
|
|
145
|
-
'
|
|
280
|
+
'limit'?: number;
|
|
146
281
|
/**
|
|
147
|
-
*
|
|
282
|
+
* Total number of pages
|
|
148
283
|
*/
|
|
149
|
-
'
|
|
284
|
+
'totalPages'?: number;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Paginated punishment list response
|
|
288
|
+
*/
|
|
289
|
+
export interface AdminPagedPunishmentResponse {
|
|
150
290
|
/**
|
|
151
|
-
*
|
|
291
|
+
* Punishments on the current page
|
|
152
292
|
*/
|
|
153
|
-
'
|
|
293
|
+
'data'?: Array<AdminPunishmentListItem>;
|
|
154
294
|
/**
|
|
155
|
-
*
|
|
295
|
+
* Total number of punishments matching the filters
|
|
156
296
|
*/
|
|
157
|
-
'
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Request to create new client credentials
|
|
161
|
-
*/
|
|
162
|
-
export interface ClientCredentialRequest {
|
|
297
|
+
'total'?: number;
|
|
163
298
|
/**
|
|
164
|
-
*
|
|
299
|
+
* Current page (1-indexed)
|
|
165
300
|
*/
|
|
166
|
-
'
|
|
301
|
+
'page'?: number;
|
|
167
302
|
/**
|
|
168
|
-
*
|
|
303
|
+
* Page size
|
|
169
304
|
*/
|
|
170
|
-
'
|
|
305
|
+
'limit'?: number;
|
|
306
|
+
/**
|
|
307
|
+
* Total number of pages
|
|
308
|
+
*/
|
|
309
|
+
'totalPages'?: number;
|
|
171
310
|
}
|
|
172
311
|
/**
|
|
173
|
-
*
|
|
312
|
+
* Full player detail including punishment history and all known usernames
|
|
174
313
|
*/
|
|
175
|
-
export interface
|
|
314
|
+
export interface AdminPlayerDetailResponse {
|
|
176
315
|
/**
|
|
177
|
-
*
|
|
316
|
+
* Internal player ID
|
|
178
317
|
*/
|
|
179
|
-
'
|
|
318
|
+
'id'?: number;
|
|
180
319
|
/**
|
|
181
|
-
*
|
|
320
|
+
* Player Minecraft UUID
|
|
182
321
|
*/
|
|
183
|
-
'
|
|
322
|
+
'uuid'?: string;
|
|
184
323
|
/**
|
|
185
|
-
*
|
|
324
|
+
* Most recently seen username
|
|
186
325
|
*/
|
|
187
|
-
'
|
|
326
|
+
'username'?: string | null;
|
|
188
327
|
/**
|
|
189
|
-
*
|
|
328
|
+
* Whether this player still has first-join status
|
|
190
329
|
*/
|
|
191
|
-
'
|
|
192
|
-
'bypassed'?: boolean;
|
|
330
|
+
'firstJoin'?: boolean;
|
|
193
331
|
/**
|
|
194
|
-
*
|
|
332
|
+
* Timestamp of first connection (ISO-8601)
|
|
195
333
|
*/
|
|
196
|
-
'
|
|
334
|
+
'firstLogin'?: string;
|
|
197
335
|
/**
|
|
198
|
-
*
|
|
336
|
+
* Timestamp of most recent connection (ISO-8601)
|
|
199
337
|
*/
|
|
200
|
-
'
|
|
338
|
+
'lastUsedAt'?: string | null;
|
|
201
339
|
/**
|
|
202
|
-
*
|
|
340
|
+
* Raw punishment score
|
|
203
341
|
*/
|
|
204
|
-
'
|
|
342
|
+
'punishmentPointsRaw'?: number;
|
|
343
|
+
/**
|
|
344
|
+
* Punishment score as a percentage
|
|
345
|
+
*/
|
|
346
|
+
'punishmentPointsPercent'?: number;
|
|
347
|
+
/**
|
|
348
|
+
* All usernames this player has used, newest first
|
|
349
|
+
*/
|
|
350
|
+
'usernameHistory'?: Array<AdminUsernameHistoryEntry>;
|
|
205
351
|
}
|
|
206
352
|
/**
|
|
207
|
-
*
|
|
353
|
+
* Lightweight player reference used in search results and punishment evaluations
|
|
208
354
|
*/
|
|
209
|
-
export interface
|
|
355
|
+
export interface AdminPlayerSearchResult {
|
|
210
356
|
/**
|
|
211
|
-
*
|
|
357
|
+
* Player Minecraft UUID
|
|
212
358
|
*/
|
|
213
|
-
'
|
|
359
|
+
'uuid'?: string;
|
|
214
360
|
/**
|
|
215
|
-
*
|
|
361
|
+
* Most recently seen username, null if never recorded
|
|
216
362
|
*/
|
|
217
|
-
'
|
|
363
|
+
'username'?: string | null;
|
|
218
364
|
}
|
|
219
365
|
/**
|
|
220
|
-
*
|
|
366
|
+
* Summary of a player record, used in list views
|
|
221
367
|
*/
|
|
222
|
-
export interface
|
|
223
|
-
/**
|
|
224
|
-
* Player UUID to punish
|
|
225
|
-
*/
|
|
226
|
-
'playerUuid': string;
|
|
368
|
+
export interface AdminPlayerSummary {
|
|
227
369
|
/**
|
|
228
|
-
*
|
|
370
|
+
* Internal player ID
|
|
229
371
|
*/
|
|
230
|
-
'
|
|
372
|
+
'id'?: number;
|
|
231
373
|
/**
|
|
232
|
-
*
|
|
374
|
+
* Player Minecraft UUID
|
|
233
375
|
*/
|
|
234
|
-
'
|
|
376
|
+
'uuid'?: string;
|
|
235
377
|
/**
|
|
236
|
-
*
|
|
378
|
+
* Most recently seen username, null if never recorded
|
|
237
379
|
*/
|
|
238
|
-
'
|
|
380
|
+
'username'?: string | null;
|
|
239
381
|
/**
|
|
240
|
-
*
|
|
382
|
+
* Whether this player still has first-join status
|
|
241
383
|
*/
|
|
242
|
-
'
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
* Player information including join history, tracking data, and punishment scoring
|
|
246
|
-
*/
|
|
247
|
-
export interface PlayerGetPlayerInformation {
|
|
384
|
+
'firstJoin'?: boolean;
|
|
248
385
|
/**
|
|
249
|
-
* Timestamp of
|
|
386
|
+
* Timestamp of first connection (ISO-8601)
|
|
250
387
|
*/
|
|
251
388
|
'firstLogin'?: string;
|
|
252
389
|
/**
|
|
253
|
-
*
|
|
390
|
+
* Timestamp of most recent connection (ISO-8601)
|
|
254
391
|
*/
|
|
255
|
-
'
|
|
392
|
+
'lastUsedAt'?: string | null;
|
|
256
393
|
/**
|
|
257
|
-
* Raw punishment score
|
|
394
|
+
* Raw punishment score (sum of weighted punishment values)
|
|
258
395
|
*/
|
|
259
396
|
'punishmentPointsRaw'?: number;
|
|
260
397
|
/**
|
|
261
|
-
* Punishment score as a percentage
|
|
398
|
+
* Punishment score as a percentage. Values above 100 indicate future punishments should be permanent.
|
|
262
399
|
*/
|
|
263
400
|
'punishmentPointsPercent'?: number;
|
|
264
401
|
}
|
|
265
402
|
/**
|
|
266
|
-
*
|
|
403
|
+
* Batch punishment draft — one evaluation per target
|
|
267
404
|
*/
|
|
268
|
-
export interface
|
|
269
|
-
/**
|
|
270
|
-
* Player UUID this punishment would apply to
|
|
271
|
-
*/
|
|
272
|
-
'playerUuid'?: string;
|
|
405
|
+
export interface AdminPunishmentDraftResponse {
|
|
273
406
|
/**
|
|
274
|
-
*
|
|
407
|
+
* Ordered list of evaluations, one per target in the request
|
|
275
408
|
*/
|
|
276
|
-
'
|
|
409
|
+
'evaluations'?: Array<AdminPunishmentEvaluation>;
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* Evaluation of a punishment\'s impact on a single target
|
|
413
|
+
*/
|
|
414
|
+
export interface AdminPunishmentEvaluation {
|
|
277
415
|
/**
|
|
278
|
-
*
|
|
416
|
+
* The target this evaluation applies to
|
|
279
417
|
*/
|
|
280
|
-
'
|
|
418
|
+
'target'?: AdminPunishmentTarget;
|
|
281
419
|
/**
|
|
282
|
-
*
|
|
420
|
+
* Players affected — one player for UUID targets, all players on the IP for connection targets
|
|
283
421
|
*/
|
|
284
|
-
'
|
|
422
|
+
'affectedPlayers'?: Array<AdminPlayerSearchResult>;
|
|
285
423
|
/**
|
|
286
|
-
* Current
|
|
424
|
+
* Current punishment score before applying this punishment (0–100+)
|
|
287
425
|
*/
|
|
288
426
|
'currentScore'?: number;
|
|
289
427
|
/**
|
|
290
|
-
* Points this punishment would add
|
|
428
|
+
* Points this punishment would add to the score
|
|
291
429
|
*/
|
|
292
430
|
'pointsToAdd'?: number;
|
|
293
431
|
/**
|
|
294
|
-
*
|
|
432
|
+
* Projected score after applying this punishment
|
|
295
433
|
*/
|
|
296
434
|
'newScore'?: number;
|
|
297
435
|
/**
|
|
298
|
-
* Whether this punishment
|
|
436
|
+
* Whether this punishment would be permanent based on the current score threshold
|
|
299
437
|
*/
|
|
300
438
|
'willBePermanent'?: boolean;
|
|
301
439
|
/**
|
|
302
|
-
*
|
|
440
|
+
* Resolved duration in seconds — null if permanent or a WARNING
|
|
303
441
|
*/
|
|
304
|
-
'durationSeconds'?: number;
|
|
442
|
+
'durationSeconds'?: number | null;
|
|
305
443
|
/**
|
|
306
|
-
* Number of
|
|
444
|
+
* Number of existing punishments on this target
|
|
307
445
|
*/
|
|
308
446
|
'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
447
|
/**
|
|
331
|
-
*
|
|
448
|
+
* True when the target is an IP address (connection punishment) rather than a player UUID
|
|
332
449
|
*/
|
|
333
|
-
'
|
|
450
|
+
'isConnectionTarget'?: boolean;
|
|
334
451
|
/**
|
|
335
|
-
*
|
|
452
|
+
* The effective punishment type that will be applied — may differ from the requested type if escalated to BAN at threshold
|
|
336
453
|
*/
|
|
454
|
+
'effectiveType'?: string;
|
|
455
|
+
}
|
|
456
|
+
export interface AdminPunishmentListItem {
|
|
457
|
+
'id': number;
|
|
458
|
+
'reason': string;
|
|
459
|
+
'notes'?: string | null;
|
|
460
|
+
'type': string;
|
|
461
|
+
'severity': number;
|
|
462
|
+
'createdBy': string;
|
|
337
463
|
'expiresAt'?: string | null;
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
'
|
|
464
|
+
'createdAt': string;
|
|
465
|
+
'targetType': string;
|
|
466
|
+
'targetUuid'?: string | null;
|
|
467
|
+
'targetUsername'?: string | null;
|
|
468
|
+
'targetIp'?: string | null;
|
|
342
469
|
}
|
|
343
470
|
/**
|
|
344
|
-
*
|
|
471
|
+
* Result of a punishment target search — either a list of matching players or a list of matching IP addresses
|
|
345
472
|
*/
|
|
346
|
-
export interface
|
|
473
|
+
export interface AdminPunishmentSearchResponse {
|
|
347
474
|
/**
|
|
348
|
-
*
|
|
475
|
+
* Search kind — \'player\' for UUID/username searches, \'ip\' for IP address searches
|
|
349
476
|
*/
|
|
350
|
-
'
|
|
477
|
+
'kind'?: AdminPunishmentSearchResponseKindEnum;
|
|
478
|
+
/**
|
|
479
|
+
* Matching players — only populated when kind=\'player\'
|
|
480
|
+
*/
|
|
481
|
+
'players'?: Array<AdminPlayerSearchResult>;
|
|
482
|
+
/**
|
|
483
|
+
* Matching IP addresses with their associated players — only populated when kind=\'ip\'
|
|
484
|
+
*/
|
|
485
|
+
'ipResults'?: Array<AdminIpSearchResult>;
|
|
351
486
|
}
|
|
487
|
+
|
|
488
|
+
export const AdminPunishmentSearchResponseKindEnum = {
|
|
489
|
+
Player: 'player',
|
|
490
|
+
Ip: 'ip'
|
|
491
|
+
} as const;
|
|
492
|
+
|
|
493
|
+
export type AdminPunishmentSearchResponseKindEnum = typeof AdminPunishmentSearchResponseKindEnum[keyof typeof AdminPunishmentSearchResponseKindEnum];
|
|
494
|
+
|
|
352
495
|
/**
|
|
353
|
-
*
|
|
496
|
+
* A target for a punishment — either a player UUID or an IP address (mutually exclusive)
|
|
354
497
|
*/
|
|
355
|
-
export interface
|
|
498
|
+
export interface AdminPunishmentTarget {
|
|
356
499
|
/**
|
|
357
|
-
*
|
|
500
|
+
* Player Minecraft UUID
|
|
358
501
|
*/
|
|
359
|
-
'
|
|
502
|
+
'uuid'?: string | null;
|
|
360
503
|
/**
|
|
361
|
-
*
|
|
504
|
+
* IP address — when specified, the punishment is linked to the connection record and all players on that IP are shown as affected
|
|
362
505
|
*/
|
|
363
|
-
'
|
|
506
|
+
'ipAddress'?: string | null;
|
|
364
507
|
}
|
|
365
508
|
/**
|
|
366
|
-
*
|
|
509
|
+
* A single entry in a player\'s username history
|
|
367
510
|
*/
|
|
368
|
-
export interface
|
|
511
|
+
export interface AdminUsernameHistoryEntry {
|
|
369
512
|
/**
|
|
370
|
-
*
|
|
513
|
+
* The username at this point in time
|
|
371
514
|
*/
|
|
372
|
-
'
|
|
515
|
+
'username'?: string;
|
|
373
516
|
/**
|
|
374
|
-
*
|
|
517
|
+
* When this username was first observed (ISO-8601)
|
|
375
518
|
*/
|
|
376
|
-
'
|
|
519
|
+
'changedAt'?: string;
|
|
377
520
|
}
|
|
378
521
|
/**
|
|
379
|
-
* Request to
|
|
522
|
+
* Request to create new client credentials
|
|
380
523
|
*/
|
|
381
|
-
export interface
|
|
524
|
+
export interface ClientCredentialRequest {
|
|
382
525
|
/**
|
|
383
526
|
* Human-readable name for the client
|
|
384
527
|
*/
|
|
385
|
-
'name'
|
|
528
|
+
'name': string;
|
|
386
529
|
/**
|
|
387
530
|
* Optional description of the client\'s purpose
|
|
388
531
|
*/
|
|
389
532
|
'description'?: string;
|
|
533
|
+
/**
|
|
534
|
+
* Optional expiration timestamp (ISO-8601). Null means the credential never expires.
|
|
535
|
+
*/
|
|
536
|
+
'expiresAt'?: string | null;
|
|
390
537
|
}
|
|
391
|
-
|
|
392
538
|
/**
|
|
393
|
-
*
|
|
539
|
+
* Comprehensive connection analysis response including VPN detection, geolocation, bypass status, and optional player information
|
|
394
540
|
*/
|
|
395
|
-
export
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
541
|
+
export interface ConnectionGetConnectionDetailsResponse {
|
|
542
|
+
/**
|
|
543
|
+
* The analyzed IPv4 address
|
|
544
|
+
*/
|
|
545
|
+
'ipAddress'?: string;
|
|
546
|
+
/**
|
|
547
|
+
* Approximate geographic location of the IP address, typically in \'City, Country\' format. Returns \'Local, N/A\' for localhost or private IPs.
|
|
548
|
+
*/
|
|
549
|
+
'approximateLocation'?: string;
|
|
550
|
+
/**
|
|
551
|
+
* 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.
|
|
552
|
+
*/
|
|
553
|
+
'percentPositive'?: number;
|
|
554
|
+
/**
|
|
555
|
+
* Total number of VPN detection services successfully queried during the last check. Higher numbers indicate more comprehensive analysis.
|
|
556
|
+
*/
|
|
557
|
+
'numberOfChecks'?: number;
|
|
558
|
+
'bypassed'?: boolean;
|
|
559
|
+
/**
|
|
560
|
+
* 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.
|
|
561
|
+
*/
|
|
562
|
+
'bypassedUntil'?: string | null;
|
|
563
|
+
/**
|
|
564
|
+
* Player information associated with this connection. Only populated when \'associate_uuid\' query parameter is provided. Contains first join status and login history.
|
|
565
|
+
*/
|
|
566
|
+
'playerInformation'?: PlayerGetPlayerInformation | null;
|
|
567
|
+
/**
|
|
568
|
+
* Combined list of active punishments for both the IP address and player UUID (if provided). Only includes non-expired punishments.
|
|
569
|
+
*/
|
|
570
|
+
'punishments'?: Array<PunishmentGetPunishmentResponse>;
|
|
571
|
+
}
|
|
572
|
+
/**
|
|
573
|
+
* Request to create a connection bypass
|
|
574
|
+
*/
|
|
575
|
+
export interface CreateBypassRequest {
|
|
576
|
+
/**
|
|
577
|
+
* IP address to bypass
|
|
578
|
+
*/
|
|
579
|
+
'ipAddress': string;
|
|
580
|
+
/**
|
|
581
|
+
* Unix epoch timestamp (seconds) when the bypass should expire
|
|
582
|
+
*/
|
|
583
|
+
'expiresAtEpoch': number;
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* Player information including join history, tracking data, and punishment scoring
|
|
587
|
+
*/
|
|
588
|
+
export interface PlayerGetPlayerInformation {
|
|
589
|
+
/**
|
|
590
|
+
* Timestamp of when the player first connected to the server (ISO-8601 format).
|
|
591
|
+
*/
|
|
592
|
+
'firstLogin'?: string;
|
|
593
|
+
/**
|
|
594
|
+
* Indicates whether this is the player\'s first time joining the server. Useful for triggering welcome messages, tutorials, or first-join rewards.
|
|
595
|
+
*/
|
|
596
|
+
'firstJoin'?: boolean;
|
|
597
|
+
/**
|
|
598
|
+
* 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.
|
|
599
|
+
*/
|
|
600
|
+
'punishmentPointsRaw'?: number;
|
|
601
|
+
/**
|
|
602
|
+
* 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.
|
|
603
|
+
*/
|
|
604
|
+
'punishmentPointsPercent'?: number;
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* Punishment information including reason, type, creator, and expiration
|
|
608
|
+
*/
|
|
609
|
+
export interface PunishmentGetPunishmentResponse {
|
|
610
|
+
/**
|
|
611
|
+
* Unique identifier for the punishment
|
|
612
|
+
*/
|
|
613
|
+
'id'?: number;
|
|
614
|
+
/**
|
|
615
|
+
* Reason for the punishment, shown to the punished player
|
|
616
|
+
*/
|
|
617
|
+
'reason'?: string;
|
|
618
|
+
/**
|
|
619
|
+
* Internal administrator notes — not shown to the punished player
|
|
620
|
+
*/
|
|
621
|
+
'notes'?: string | null;
|
|
622
|
+
/**
|
|
623
|
+
* Type of punishment (BAN, MUTE, WARNING)
|
|
624
|
+
*/
|
|
625
|
+
'type'?: string;
|
|
626
|
+
/**
|
|
627
|
+
* Severity level (1=Minor, 2=Moderate, 3=Severe, 4=Critical)
|
|
628
|
+
*/
|
|
629
|
+
'severity'?: number;
|
|
630
|
+
/**
|
|
631
|
+
* Username or identifier of the person who created this punishment
|
|
632
|
+
*/
|
|
633
|
+
'createdBy'?: string;
|
|
634
|
+
/**
|
|
635
|
+
* Timestamp when the punishment expires (ISO-8601 format). Null for permanent punishments.
|
|
636
|
+
*/
|
|
637
|
+
'expiresAt'?: string | null;
|
|
638
|
+
/**
|
|
639
|
+
* Timestamp when the punishment was created (ISO-8601 format)
|
|
640
|
+
*/
|
|
641
|
+
'createdAt'?: string;
|
|
642
|
+
}
|
|
643
|
+
/**
|
|
644
|
+
* Response containing punishment severity durations for each type
|
|
645
|
+
*/
|
|
646
|
+
export interface PunishmentSeveritiesResponse {
|
|
647
|
+
/**
|
|
648
|
+
* List of punishment types with their severity durations
|
|
649
|
+
*/
|
|
650
|
+
'punishmentTypes'?: Array<PunishmentSeveritiesResponsePunishmentTypeInfo>;
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* Punishment type with severity information
|
|
654
|
+
*/
|
|
655
|
+
export interface PunishmentSeveritiesResponsePunishmentTypeInfo {
|
|
656
|
+
/**
|
|
657
|
+
* Type of punishment
|
|
658
|
+
*/
|
|
659
|
+
'type'?: string;
|
|
660
|
+
/**
|
|
661
|
+
* List of severity levels with durations
|
|
662
|
+
*/
|
|
663
|
+
'severities'?: Array<PunishmentSeveritiesResponseSeverityInfo>;
|
|
664
|
+
}
|
|
665
|
+
/**
|
|
666
|
+
* Severity level with duration information
|
|
667
|
+
*/
|
|
668
|
+
export interface PunishmentSeveritiesResponseSeverityInfo {
|
|
669
|
+
/**
|
|
670
|
+
* Severity level
|
|
671
|
+
*/
|
|
672
|
+
'severity'?: number;
|
|
673
|
+
/**
|
|
674
|
+
* Duration in seconds (0 means no duration)
|
|
675
|
+
*/
|
|
676
|
+
'durationSeconds'?: number;
|
|
677
|
+
}
|
|
678
|
+
/**
|
|
679
|
+
* Request to update client metadata
|
|
680
|
+
*/
|
|
681
|
+
export interface UpdateClientRequest {
|
|
682
|
+
/**
|
|
683
|
+
* Human-readable name for the client
|
|
684
|
+
*/
|
|
685
|
+
'name'?: string;
|
|
686
|
+
/**
|
|
687
|
+
* Optional description of the client\'s purpose
|
|
688
|
+
*/
|
|
689
|
+
'description'?: string;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* AdminClientCredentialsApi - axios parameter creator
|
|
694
|
+
*/
|
|
695
|
+
export const AdminClientCredentialsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
696
|
+
return {
|
|
697
|
+
/**
|
|
698
|
+
* Temporarily disables a client credential, preventing authentication. Can be re-enabled later.
|
|
699
|
+
* @summary Disable client credentials
|
|
700
|
+
* @param {number} id Client credential ID
|
|
701
|
+
* @param {*} [options] Override http request option.
|
|
702
|
+
* @throws {RequiredError}
|
|
703
|
+
*/
|
|
704
|
+
disableClient: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
705
|
+
// verify required parameter 'id' is not null or undefined
|
|
706
|
+
assertParamExists('disableClient', 'id', id)
|
|
707
|
+
const localVarPath = `/admin/client/{id}/disable`
|
|
708
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
709
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
710
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
411
711
|
let baseOptions;
|
|
412
712
|
if (configuration) {
|
|
413
713
|
baseOptions = configuration.baseOptions;
|
|
@@ -417,7 +717,7 @@ export const AdminClientCredentialsApiAxiosParamCreator = function (configuratio
|
|
|
417
717
|
const localVarHeaderParameter = {} as any;
|
|
418
718
|
const localVarQueryParameter = {} as any;
|
|
419
719
|
|
|
420
|
-
// authentication
|
|
720
|
+
// authentication DiscordAuth required
|
|
421
721
|
// http bearer authentication required
|
|
422
722
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
423
723
|
|
|
@@ -454,7 +754,7 @@ export const AdminClientCredentialsApiAxiosParamCreator = function (configuratio
|
|
|
454
754
|
const localVarHeaderParameter = {} as any;
|
|
455
755
|
const localVarQueryParameter = {} as any;
|
|
456
756
|
|
|
457
|
-
// authentication
|
|
757
|
+
// authentication DiscordAuth required
|
|
458
758
|
// http bearer authentication required
|
|
459
759
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
460
760
|
|
|
@@ -490,7 +790,7 @@ export const AdminClientCredentialsApiAxiosParamCreator = function (configuratio
|
|
|
490
790
|
const localVarHeaderParameter = {} as any;
|
|
491
791
|
const localVarQueryParameter = {} as any;
|
|
492
792
|
|
|
493
|
-
// authentication
|
|
793
|
+
// authentication DiscordAuth required
|
|
494
794
|
// http bearer authentication required
|
|
495
795
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
496
796
|
|
|
@@ -526,7 +826,7 @@ export const AdminClientCredentialsApiAxiosParamCreator = function (configuratio
|
|
|
526
826
|
const localVarHeaderParameter = {} as any;
|
|
527
827
|
const localVarQueryParameter = {} as any;
|
|
528
828
|
|
|
529
|
-
// authentication
|
|
829
|
+
// authentication DiscordAuth required
|
|
530
830
|
// http bearer authentication required
|
|
531
831
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
532
832
|
|
|
@@ -564,7 +864,7 @@ export const AdminClientCredentialsApiAxiosParamCreator = function (configuratio
|
|
|
564
864
|
const localVarHeaderParameter = {} as any;
|
|
565
865
|
const localVarQueryParameter = {} as any;
|
|
566
866
|
|
|
567
|
-
// authentication
|
|
867
|
+
// authentication DiscordAuth required
|
|
568
868
|
// http bearer authentication required
|
|
569
869
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
570
870
|
|
|
@@ -601,7 +901,7 @@ export const AdminClientCredentialsApiAxiosParamCreator = function (configuratio
|
|
|
601
901
|
const localVarHeaderParameter = {} as any;
|
|
602
902
|
const localVarQueryParameter = {} as any;
|
|
603
903
|
|
|
604
|
-
// authentication
|
|
904
|
+
// authentication DiscordAuth required
|
|
605
905
|
// http bearer authentication required
|
|
606
906
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
607
907
|
|
|
@@ -642,7 +942,7 @@ export const AdminClientCredentialsApiAxiosParamCreator = function (configuratio
|
|
|
642
942
|
const localVarHeaderParameter = {} as any;
|
|
643
943
|
const localVarQueryParameter = {} as any;
|
|
644
944
|
|
|
645
|
-
// authentication
|
|
945
|
+
// authentication DiscordAuth required
|
|
646
946
|
// http bearer authentication required
|
|
647
947
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
648
948
|
|
|
@@ -952,7 +1252,7 @@ export const AdminConnectionsApiAxiosParamCreator = function (configuration?: Co
|
|
|
952
1252
|
const localVarHeaderParameter = {} as any;
|
|
953
1253
|
const localVarQueryParameter = {} as any;
|
|
954
1254
|
|
|
955
|
-
// authentication
|
|
1255
|
+
// authentication DiscordAuth required
|
|
956
1256
|
// http bearer authentication required
|
|
957
1257
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
958
1258
|
|
|
@@ -969,6 +1269,65 @@ export const AdminConnectionsApiAxiosParamCreator = function (configuration?: Co
|
|
|
969
1269
|
options: localVarRequestOptions,
|
|
970
1270
|
};
|
|
971
1271
|
},
|
|
1272
|
+
/**
|
|
1273
|
+
* Returns a paginated list of all connections with a total count. Supports filtering by IP address, UUID, and VPN status.
|
|
1274
|
+
* @summary List all connections (paginated)
|
|
1275
|
+
* @param {string | null} [ipAddress] Filter by IP address
|
|
1276
|
+
* @param {string | null} [uuid] Filter by player UUID
|
|
1277
|
+
* @param {boolean | null} [isVpn] Filter by VPN status
|
|
1278
|
+
* @param {number | null} [page] Page number (1-indexed)
|
|
1279
|
+
* @param {number | null} [limit] Page size
|
|
1280
|
+
* @param {*} [options] Override http request option.
|
|
1281
|
+
* @throws {RequiredError}
|
|
1282
|
+
*/
|
|
1283
|
+
listAllConnections: async (ipAddress?: string | null, uuid?: string | null, isVpn?: boolean | null, page?: number | null, limit?: number | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1284
|
+
const localVarPath = `/admin/connection`;
|
|
1285
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1286
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1287
|
+
let baseOptions;
|
|
1288
|
+
if (configuration) {
|
|
1289
|
+
baseOptions = configuration.baseOptions;
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
1293
|
+
const localVarHeaderParameter = {} as any;
|
|
1294
|
+
const localVarQueryParameter = {} as any;
|
|
1295
|
+
|
|
1296
|
+
// authentication DiscordAuth required
|
|
1297
|
+
// http bearer authentication required
|
|
1298
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1299
|
+
|
|
1300
|
+
if (ipAddress !== undefined) {
|
|
1301
|
+
localVarQueryParameter['ipAddress'] = ipAddress;
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
if (uuid !== undefined) {
|
|
1305
|
+
localVarQueryParameter['uuid'] = uuid;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
if (isVpn !== undefined) {
|
|
1309
|
+
localVarQueryParameter['isVpn'] = isVpn;
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
if (page !== undefined) {
|
|
1313
|
+
localVarQueryParameter['page'] = page;
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
if (limit !== undefined) {
|
|
1317
|
+
localVarQueryParameter['limit'] = limit;
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1321
|
+
|
|
1322
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1323
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1324
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1325
|
+
|
|
1326
|
+
return {
|
|
1327
|
+
url: toPathString(localVarUrlObj),
|
|
1328
|
+
options: localVarRequestOptions,
|
|
1329
|
+
};
|
|
1330
|
+
},
|
|
972
1331
|
/**
|
|
973
1332
|
* 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
1333
|
* @summary List recent connections
|
|
@@ -995,7 +1354,7 @@ export const AdminConnectionsApiAxiosParamCreator = function (configuration?: Co
|
|
|
995
1354
|
const localVarHeaderParameter = {} as any;
|
|
996
1355
|
const localVarQueryParameter = {} as any;
|
|
997
1356
|
|
|
998
|
-
// authentication
|
|
1357
|
+
// authentication DiscordAuth required
|
|
999
1358
|
// http bearer authentication required
|
|
1000
1359
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1001
1360
|
|
|
@@ -1060,6 +1419,23 @@ export const AdminConnectionsApiFp = function(configuration?: Configuration) {
|
|
|
1060
1419
|
const localVarOperationServerBasePath = operationServerMap['AdminConnectionsApi.createBypass']?.[localVarOperationServerIndex]?.url;
|
|
1061
1420
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1062
1421
|
},
|
|
1422
|
+
/**
|
|
1423
|
+
* Returns a paginated list of all connections with a total count. Supports filtering by IP address, UUID, and VPN status.
|
|
1424
|
+
* @summary List all connections (paginated)
|
|
1425
|
+
* @param {string | null} [ipAddress] Filter by IP address
|
|
1426
|
+
* @param {string | null} [uuid] Filter by player UUID
|
|
1427
|
+
* @param {boolean | null} [isVpn] Filter by VPN status
|
|
1428
|
+
* @param {number | null} [page] Page number (1-indexed)
|
|
1429
|
+
* @param {number | null} [limit] Page size
|
|
1430
|
+
* @param {*} [options] Override http request option.
|
|
1431
|
+
* @throws {RequiredError}
|
|
1432
|
+
*/
|
|
1433
|
+
async listAllConnections(ipAddress?: string | null, uuid?: string | null, isVpn?: boolean | null, page?: number | null, limit?: number | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminPagedConnectionResponse>> {
|
|
1434
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listAllConnections(ipAddress, uuid, isVpn, page, limit, options);
|
|
1435
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1436
|
+
const localVarOperationServerBasePath = operationServerMap['AdminConnectionsApi.listAllConnections']?.[localVarOperationServerIndex]?.url;
|
|
1437
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1438
|
+
},
|
|
1063
1439
|
/**
|
|
1064
1440
|
* 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
1441
|
* @summary List recent connections
|
|
@@ -1098,6 +1474,20 @@ export const AdminConnectionsApiFactory = function (configuration?: Configuratio
|
|
|
1098
1474
|
createBypass(createBypassRequest: CreateBypassRequest, options?: RawAxiosRequestConfig): AxiosPromise<AdminConnectionBypassResponse> {
|
|
1099
1475
|
return localVarFp.createBypass(createBypassRequest, options).then((request) => request(axios, basePath));
|
|
1100
1476
|
},
|
|
1477
|
+
/**
|
|
1478
|
+
* Returns a paginated list of all connections with a total count. Supports filtering by IP address, UUID, and VPN status.
|
|
1479
|
+
* @summary List all connections (paginated)
|
|
1480
|
+
* @param {string | null} [ipAddress] Filter by IP address
|
|
1481
|
+
* @param {string | null} [uuid] Filter by player UUID
|
|
1482
|
+
* @param {boolean | null} [isVpn] Filter by VPN status
|
|
1483
|
+
* @param {number | null} [page] Page number (1-indexed)
|
|
1484
|
+
* @param {number | null} [limit] Page size
|
|
1485
|
+
* @param {*} [options] Override http request option.
|
|
1486
|
+
* @throws {RequiredError}
|
|
1487
|
+
*/
|
|
1488
|
+
listAllConnections(ipAddress?: string | null, uuid?: string | null, isVpn?: boolean | null, page?: number | null, limit?: number | null, options?: RawAxiosRequestConfig): AxiosPromise<AdminPagedConnectionResponse> {
|
|
1489
|
+
return localVarFp.listAllConnections(ipAddress, uuid, isVpn, page, limit, options).then((request) => request(axios, basePath));
|
|
1490
|
+
},
|
|
1101
1491
|
/**
|
|
1102
1492
|
* 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
1493
|
* @summary List recent connections
|
|
@@ -1132,6 +1522,21 @@ export class AdminConnectionsApi extends BaseAPI {
|
|
|
1132
1522
|
return AdminConnectionsApiFp(this.configuration).createBypass(createBypassRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1133
1523
|
}
|
|
1134
1524
|
|
|
1525
|
+
/**
|
|
1526
|
+
* Returns a paginated list of all connections with a total count. Supports filtering by IP address, UUID, and VPN status.
|
|
1527
|
+
* @summary List all connections (paginated)
|
|
1528
|
+
* @param {string | null} [ipAddress] Filter by IP address
|
|
1529
|
+
* @param {string | null} [uuid] Filter by player UUID
|
|
1530
|
+
* @param {boolean | null} [isVpn] Filter by VPN status
|
|
1531
|
+
* @param {number | null} [page] Page number (1-indexed)
|
|
1532
|
+
* @param {number | null} [limit] Page size
|
|
1533
|
+
* @param {*} [options] Override http request option.
|
|
1534
|
+
* @throws {RequiredError}
|
|
1535
|
+
*/
|
|
1536
|
+
public listAllConnections(ipAddress?: string | null, uuid?: string | null, isVpn?: boolean | null, page?: number | null, limit?: number | null, options?: RawAxiosRequestConfig) {
|
|
1537
|
+
return AdminConnectionsApiFp(this.configuration).listAllConnections(ipAddress, uuid, isVpn, page, limit, options).then((request) => request(this.axios, this.basePath));
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1135
1540
|
/**
|
|
1136
1541
|
* 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
1542
|
* @summary List recent connections
|
|
@@ -1176,7 +1581,7 @@ export const AdminDashboardApiAxiosParamCreator = function (configuration?: Conf
|
|
|
1176
1581
|
const localVarHeaderParameter = {} as any;
|
|
1177
1582
|
const localVarQueryParameter = {} as any;
|
|
1178
1583
|
|
|
1179
|
-
// authentication
|
|
1584
|
+
// authentication DiscordAuth required
|
|
1180
1585
|
// http bearer authentication required
|
|
1181
1586
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1182
1587
|
|
|
@@ -1206,45 +1611,630 @@ export const AdminDashboardApiFp = function(configuration?: Configuration) {
|
|
|
1206
1611
|
* @param {*} [options] Override http request option.
|
|
1207
1612
|
* @throws {RequiredError}
|
|
1208
1613
|
*/
|
|
1209
|
-
async dashboardStats(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminGetDashboardStats>> {
|
|
1210
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.dashboardStats(options);
|
|
1614
|
+
async dashboardStats(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminGetDashboardStats>> {
|
|
1615
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.dashboardStats(options);
|
|
1616
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1617
|
+
const localVarOperationServerBasePath = operationServerMap['AdminDashboardApi.dashboardStats']?.[localVarOperationServerIndex]?.url;
|
|
1618
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1619
|
+
},
|
|
1620
|
+
}
|
|
1621
|
+
};
|
|
1622
|
+
|
|
1623
|
+
/**
|
|
1624
|
+
* AdminDashboardApi - factory interface
|
|
1625
|
+
*/
|
|
1626
|
+
export const AdminDashboardApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
1627
|
+
const localVarFp = AdminDashboardApiFp(configuration)
|
|
1628
|
+
return {
|
|
1629
|
+
/**
|
|
1630
|
+
* Returns aggregate counts for clients, connections, and players in the system.
|
|
1631
|
+
* @summary Get dashboard statistics
|
|
1632
|
+
* @param {*} [options] Override http request option.
|
|
1633
|
+
* @throws {RequiredError}
|
|
1634
|
+
*/
|
|
1635
|
+
dashboardStats(options?: RawAxiosRequestConfig): AxiosPromise<AdminGetDashboardStats> {
|
|
1636
|
+
return localVarFp.dashboardStats(options).then((request) => request(axios, basePath));
|
|
1637
|
+
},
|
|
1638
|
+
};
|
|
1639
|
+
};
|
|
1640
|
+
|
|
1641
|
+
/**
|
|
1642
|
+
* AdminDashboardApi - object-oriented interface
|
|
1643
|
+
*/
|
|
1644
|
+
export class AdminDashboardApi extends BaseAPI {
|
|
1645
|
+
/**
|
|
1646
|
+
* Returns aggregate counts for clients, connections, and players in the system.
|
|
1647
|
+
* @summary Get dashboard statistics
|
|
1648
|
+
* @param {*} [options] Override http request option.
|
|
1649
|
+
* @throws {RequiredError}
|
|
1650
|
+
*/
|
|
1651
|
+
public dashboardStats(options?: RawAxiosRequestConfig) {
|
|
1652
|
+
return AdminDashboardApiFp(this.configuration).dashboardStats(options).then((request) => request(this.axios, this.basePath));
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
|
|
1657
|
+
|
|
1658
|
+
/**
|
|
1659
|
+
* AdminPlayersApi - axios parameter creator
|
|
1660
|
+
*/
|
|
1661
|
+
export const AdminPlayersApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
1662
|
+
return {
|
|
1663
|
+
/**
|
|
1664
|
+
* Returns full detail for a single player including all known usernames and punishment scoring.
|
|
1665
|
+
* @summary Get player detail
|
|
1666
|
+
* @param {string} uuid Player Minecraft UUID
|
|
1667
|
+
* @param {*} [options] Override http request option.
|
|
1668
|
+
* @throws {RequiredError}
|
|
1669
|
+
*/
|
|
1670
|
+
getPlayer: async (uuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1671
|
+
// verify required parameter 'uuid' is not null or undefined
|
|
1672
|
+
assertParamExists('getPlayer', 'uuid', uuid)
|
|
1673
|
+
const localVarPath = `/admin/player/{uuid}`
|
|
1674
|
+
.replace(`{${"uuid"}}`, encodeURIComponent(String(uuid)));
|
|
1675
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1676
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1677
|
+
let baseOptions;
|
|
1678
|
+
if (configuration) {
|
|
1679
|
+
baseOptions = configuration.baseOptions;
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1682
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
1683
|
+
const localVarHeaderParameter = {} as any;
|
|
1684
|
+
const localVarQueryParameter = {} as any;
|
|
1685
|
+
|
|
1686
|
+
// authentication DiscordAuth required
|
|
1687
|
+
// http bearer authentication required
|
|
1688
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1689
|
+
|
|
1690
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1691
|
+
|
|
1692
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1693
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1694
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1695
|
+
|
|
1696
|
+
return {
|
|
1697
|
+
url: toPathString(localVarUrlObj),
|
|
1698
|
+
options: localVarRequestOptions,
|
|
1699
|
+
};
|
|
1700
|
+
},
|
|
1701
|
+
/**
|
|
1702
|
+
* Returns up to 500 players ordered by most recently seen. Optionally filter by UUID or username substring.
|
|
1703
|
+
* @summary List players
|
|
1704
|
+
* @param {number} page Page number (1-indexed)
|
|
1705
|
+
* @param {number} limit Page size
|
|
1706
|
+
* @param {string | null} [search] Optional search string matched against UUID or username (case-insensitive substring)
|
|
1707
|
+
* @param {*} [options] Override http request option.
|
|
1708
|
+
* @throws {RequiredError}
|
|
1709
|
+
*/
|
|
1710
|
+
listPlayers: async (page: number, limit: number, search?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1711
|
+
// verify required parameter 'page' is not null or undefined
|
|
1712
|
+
assertParamExists('listPlayers', 'page', page)
|
|
1713
|
+
// verify required parameter 'limit' is not null or undefined
|
|
1714
|
+
assertParamExists('listPlayers', 'limit', limit)
|
|
1715
|
+
const localVarPath = `/admin/player`;
|
|
1716
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1717
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1718
|
+
let baseOptions;
|
|
1719
|
+
if (configuration) {
|
|
1720
|
+
baseOptions = configuration.baseOptions;
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
1724
|
+
const localVarHeaderParameter = {} as any;
|
|
1725
|
+
const localVarQueryParameter = {} as any;
|
|
1726
|
+
|
|
1727
|
+
// authentication DiscordAuth required
|
|
1728
|
+
// http bearer authentication required
|
|
1729
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1730
|
+
|
|
1731
|
+
if (search !== undefined) {
|
|
1732
|
+
localVarQueryParameter['search'] = search;
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
if (page !== undefined) {
|
|
1736
|
+
localVarQueryParameter['page'] = page;
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
if (limit !== undefined) {
|
|
1740
|
+
localVarQueryParameter['limit'] = limit;
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1744
|
+
|
|
1745
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1746
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1747
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1748
|
+
|
|
1749
|
+
return {
|
|
1750
|
+
url: toPathString(localVarUrlObj),
|
|
1751
|
+
options: localVarRequestOptions,
|
|
1752
|
+
};
|
|
1753
|
+
},
|
|
1754
|
+
}
|
|
1755
|
+
};
|
|
1756
|
+
|
|
1757
|
+
/**
|
|
1758
|
+
* AdminPlayersApi - functional programming interface
|
|
1759
|
+
*/
|
|
1760
|
+
export const AdminPlayersApiFp = function(configuration?: Configuration) {
|
|
1761
|
+
const localVarAxiosParamCreator = AdminPlayersApiAxiosParamCreator(configuration)
|
|
1762
|
+
return {
|
|
1763
|
+
/**
|
|
1764
|
+
* Returns full detail for a single player including all known usernames and punishment scoring.
|
|
1765
|
+
* @summary Get player detail
|
|
1766
|
+
* @param {string} uuid Player Minecraft UUID
|
|
1767
|
+
* @param {*} [options] Override http request option.
|
|
1768
|
+
* @throws {RequiredError}
|
|
1769
|
+
*/
|
|
1770
|
+
async getPlayer(uuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminPlayerDetailResponse>> {
|
|
1771
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getPlayer(uuid, options);
|
|
1772
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1773
|
+
const localVarOperationServerBasePath = operationServerMap['AdminPlayersApi.getPlayer']?.[localVarOperationServerIndex]?.url;
|
|
1774
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1775
|
+
},
|
|
1776
|
+
/**
|
|
1777
|
+
* Returns up to 500 players ordered by most recently seen. Optionally filter by UUID or username substring.
|
|
1778
|
+
* @summary List players
|
|
1779
|
+
* @param {number} page Page number (1-indexed)
|
|
1780
|
+
* @param {number} limit Page size
|
|
1781
|
+
* @param {string | null} [search] Optional search string matched against UUID or username (case-insensitive substring)
|
|
1782
|
+
* @param {*} [options] Override http request option.
|
|
1783
|
+
* @throws {RequiredError}
|
|
1784
|
+
*/
|
|
1785
|
+
async listPlayers(page: number, limit: number, search?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminPagedPlayerResponse>> {
|
|
1786
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listPlayers(page, limit, search, options);
|
|
1787
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1788
|
+
const localVarOperationServerBasePath = operationServerMap['AdminPlayersApi.listPlayers']?.[localVarOperationServerIndex]?.url;
|
|
1789
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1790
|
+
},
|
|
1791
|
+
}
|
|
1792
|
+
};
|
|
1793
|
+
|
|
1794
|
+
/**
|
|
1795
|
+
* AdminPlayersApi - factory interface
|
|
1796
|
+
*/
|
|
1797
|
+
export const AdminPlayersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
1798
|
+
const localVarFp = AdminPlayersApiFp(configuration)
|
|
1799
|
+
return {
|
|
1800
|
+
/**
|
|
1801
|
+
* Returns full detail for a single player including all known usernames and punishment scoring.
|
|
1802
|
+
* @summary Get player detail
|
|
1803
|
+
* @param {string} uuid Player Minecraft UUID
|
|
1804
|
+
* @param {*} [options] Override http request option.
|
|
1805
|
+
* @throws {RequiredError}
|
|
1806
|
+
*/
|
|
1807
|
+
getPlayer(uuid: string, options?: RawAxiosRequestConfig): AxiosPromise<AdminPlayerDetailResponse> {
|
|
1808
|
+
return localVarFp.getPlayer(uuid, options).then((request) => request(axios, basePath));
|
|
1809
|
+
},
|
|
1810
|
+
/**
|
|
1811
|
+
* Returns up to 500 players ordered by most recently seen. Optionally filter by UUID or username substring.
|
|
1812
|
+
* @summary List players
|
|
1813
|
+
* @param {number} page Page number (1-indexed)
|
|
1814
|
+
* @param {number} limit Page size
|
|
1815
|
+
* @param {string | null} [search] Optional search string matched against UUID or username (case-insensitive substring)
|
|
1816
|
+
* @param {*} [options] Override http request option.
|
|
1817
|
+
* @throws {RequiredError}
|
|
1818
|
+
*/
|
|
1819
|
+
listPlayers(page: number, limit: number, search?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<AdminPagedPlayerResponse> {
|
|
1820
|
+
return localVarFp.listPlayers(page, limit, search, options).then((request) => request(axios, basePath));
|
|
1821
|
+
},
|
|
1822
|
+
};
|
|
1823
|
+
};
|
|
1824
|
+
|
|
1825
|
+
/**
|
|
1826
|
+
* AdminPlayersApi - object-oriented interface
|
|
1827
|
+
*/
|
|
1828
|
+
export class AdminPlayersApi extends BaseAPI {
|
|
1829
|
+
/**
|
|
1830
|
+
* Returns full detail for a single player including all known usernames and punishment scoring.
|
|
1831
|
+
* @summary Get player detail
|
|
1832
|
+
* @param {string} uuid Player Minecraft UUID
|
|
1833
|
+
* @param {*} [options] Override http request option.
|
|
1834
|
+
* @throws {RequiredError}
|
|
1835
|
+
*/
|
|
1836
|
+
public getPlayer(uuid: string, options?: RawAxiosRequestConfig) {
|
|
1837
|
+
return AdminPlayersApiFp(this.configuration).getPlayer(uuid, options).then((request) => request(this.axios, this.basePath));
|
|
1838
|
+
}
|
|
1839
|
+
|
|
1840
|
+
/**
|
|
1841
|
+
* Returns up to 500 players ordered by most recently seen. Optionally filter by UUID or username substring.
|
|
1842
|
+
* @summary List players
|
|
1843
|
+
* @param {number} page Page number (1-indexed)
|
|
1844
|
+
* @param {number} limit Page size
|
|
1845
|
+
* @param {string | null} [search] Optional search string matched against UUID or username (case-insensitive substring)
|
|
1846
|
+
* @param {*} [options] Override http request option.
|
|
1847
|
+
* @throws {RequiredError}
|
|
1848
|
+
*/
|
|
1849
|
+
public listPlayers(page: number, limit: number, search?: string | null, options?: RawAxiosRequestConfig) {
|
|
1850
|
+
return AdminPlayersApiFp(this.configuration).listPlayers(page, limit, search, options).then((request) => request(this.axios, this.basePath));
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1853
|
+
|
|
1854
|
+
|
|
1855
|
+
|
|
1856
|
+
/**
|
|
1857
|
+
* AdminPunishmentsApi - axios parameter creator
|
|
1858
|
+
*/
|
|
1859
|
+
export const AdminPunishmentsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
1860
|
+
return {
|
|
1861
|
+
/**
|
|
1862
|
+
* Apply a punishment to one or more targets. Player targets are linked via player_punishment; IP targets are linked via connection_punishment. The authenticated user is recorded as the issuer.
|
|
1863
|
+
* @summary Apply punishment
|
|
1864
|
+
* @param {AdminApplyPunishmentRequest} adminApplyPunishmentRequest
|
|
1865
|
+
* @param {*} [options] Override http request option.
|
|
1866
|
+
* @throws {RequiredError}
|
|
1867
|
+
*/
|
|
1868
|
+
applyPunishment: async (adminApplyPunishmentRequest: AdminApplyPunishmentRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1869
|
+
// verify required parameter 'adminApplyPunishmentRequest' is not null or undefined
|
|
1870
|
+
assertParamExists('applyPunishment', 'adminApplyPunishmentRequest', adminApplyPunishmentRequest)
|
|
1871
|
+
const localVarPath = `/admin/punishment/apply`;
|
|
1872
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1873
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1874
|
+
let baseOptions;
|
|
1875
|
+
if (configuration) {
|
|
1876
|
+
baseOptions = configuration.baseOptions;
|
|
1877
|
+
}
|
|
1878
|
+
|
|
1879
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
1880
|
+
const localVarHeaderParameter = {} as any;
|
|
1881
|
+
const localVarQueryParameter = {} as any;
|
|
1882
|
+
|
|
1883
|
+
// authentication DiscordAuth required
|
|
1884
|
+
// http bearer authentication required
|
|
1885
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1886
|
+
|
|
1887
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1888
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1889
|
+
|
|
1890
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1891
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1892
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1893
|
+
localVarRequestOptions.data = serializeDataIfNeeded(adminApplyPunishmentRequest, localVarRequestOptions, configuration)
|
|
1894
|
+
|
|
1895
|
+
return {
|
|
1896
|
+
url: toPathString(localVarUrlObj),
|
|
1897
|
+
options: localVarRequestOptions,
|
|
1898
|
+
};
|
|
1899
|
+
},
|
|
1900
|
+
/**
|
|
1901
|
+
* Preview the impact of a punishment across one or more targets. Returns current score, points to add, projected new score, and affected players per target. No changes are made.
|
|
1902
|
+
* @summary Evaluate punishment impact
|
|
1903
|
+
* @param {AdminCreatePunishmentDraftRequest} adminCreatePunishmentDraftRequest
|
|
1904
|
+
* @param {*} [options] Override http request option.
|
|
1905
|
+
* @throws {RequiredError}
|
|
1906
|
+
*/
|
|
1907
|
+
createDraft: async (adminCreatePunishmentDraftRequest: AdminCreatePunishmentDraftRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1908
|
+
// verify required parameter 'adminCreatePunishmentDraftRequest' is not null or undefined
|
|
1909
|
+
assertParamExists('createDraft', 'adminCreatePunishmentDraftRequest', adminCreatePunishmentDraftRequest)
|
|
1910
|
+
const localVarPath = `/admin/punishment/draft`;
|
|
1911
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1912
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1913
|
+
let baseOptions;
|
|
1914
|
+
if (configuration) {
|
|
1915
|
+
baseOptions = configuration.baseOptions;
|
|
1916
|
+
}
|
|
1917
|
+
|
|
1918
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
1919
|
+
const localVarHeaderParameter = {} as any;
|
|
1920
|
+
const localVarQueryParameter = {} as any;
|
|
1921
|
+
|
|
1922
|
+
// authentication DiscordAuth required
|
|
1923
|
+
// http bearer authentication required
|
|
1924
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1925
|
+
|
|
1926
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1927
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1928
|
+
|
|
1929
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1930
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1931
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1932
|
+
localVarRequestOptions.data = serializeDataIfNeeded(adminCreatePunishmentDraftRequest, localVarRequestOptions, configuration)
|
|
1933
|
+
|
|
1934
|
+
return {
|
|
1935
|
+
url: toPathString(localVarUrlObj),
|
|
1936
|
+
options: localVarRequestOptions,
|
|
1937
|
+
};
|
|
1938
|
+
},
|
|
1939
|
+
/**
|
|
1940
|
+
* Returns a paginated list of punishments with optional filtering by player UUID, username, IP address, type, and date range.
|
|
1941
|
+
* @summary List punishments
|
|
1942
|
+
* @param {number} page Page number (1-indexed)
|
|
1943
|
+
* @param {number} limit Page size
|
|
1944
|
+
* @param {string | null} [uuid] Filter by player UUID
|
|
1945
|
+
* @param {string | null} [username] Filter by player username (case-insensitive substring match)
|
|
1946
|
+
* @param {string | null} [ipAddress] Filter by IP address
|
|
1947
|
+
* @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, WARNING). Repeatable.
|
|
1948
|
+
* @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (ms)
|
|
1949
|
+
* @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (ms)
|
|
1950
|
+
* @param {*} [options] Override http request option.
|
|
1951
|
+
* @throws {RequiredError}
|
|
1952
|
+
*/
|
|
1953
|
+
getPunishments: async (page: number, limit: number, uuid?: string | null, username?: string | null, ipAddress?: string | null, type?: Array<string> | null, issuedAfter?: number | null, issuedBefore?: number | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1954
|
+
// verify required parameter 'page' is not null or undefined
|
|
1955
|
+
assertParamExists('getPunishments', 'page', page)
|
|
1956
|
+
// verify required parameter 'limit' is not null or undefined
|
|
1957
|
+
assertParamExists('getPunishments', 'limit', limit)
|
|
1958
|
+
const localVarPath = `/admin/punishment`;
|
|
1959
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1960
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1961
|
+
let baseOptions;
|
|
1962
|
+
if (configuration) {
|
|
1963
|
+
baseOptions = configuration.baseOptions;
|
|
1964
|
+
}
|
|
1965
|
+
|
|
1966
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
1967
|
+
const localVarHeaderParameter = {} as any;
|
|
1968
|
+
const localVarQueryParameter = {} as any;
|
|
1969
|
+
|
|
1970
|
+
// authentication DiscordAuth required
|
|
1971
|
+
// http bearer authentication required
|
|
1972
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1973
|
+
|
|
1974
|
+
if (uuid !== undefined) {
|
|
1975
|
+
localVarQueryParameter['uuid'] = uuid;
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1978
|
+
if (username !== undefined) {
|
|
1979
|
+
localVarQueryParameter['username'] = username;
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1982
|
+
if (ipAddress !== undefined) {
|
|
1983
|
+
localVarQueryParameter['ipAddress'] = ipAddress;
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
if (type) {
|
|
1987
|
+
localVarQueryParameter['type'] = type.join(COLLECTION_FORMATS.csv);
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1990
|
+
if (issuedAfter !== undefined) {
|
|
1991
|
+
localVarQueryParameter['issuedAfter'] = issuedAfter;
|
|
1992
|
+
}
|
|
1993
|
+
|
|
1994
|
+
if (issuedBefore !== undefined) {
|
|
1995
|
+
localVarQueryParameter['issuedBefore'] = issuedBefore;
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
if (page !== undefined) {
|
|
1999
|
+
localVarQueryParameter['page'] = page;
|
|
2000
|
+
}
|
|
2001
|
+
|
|
2002
|
+
if (limit !== undefined) {
|
|
2003
|
+
localVarQueryParameter['limit'] = limit;
|
|
2004
|
+
}
|
|
2005
|
+
|
|
2006
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
2007
|
+
|
|
2008
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2009
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2010
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
2011
|
+
|
|
2012
|
+
return {
|
|
2013
|
+
url: toPathString(localVarUrlObj),
|
|
2014
|
+
options: localVarRequestOptions,
|
|
2015
|
+
};
|
|
2016
|
+
},
|
|
2017
|
+
/**
|
|
2018
|
+
* Search for players by UUID or username, or look up all players associated with an IP address. Used to populate the target table before issuing a punishment.
|
|
2019
|
+
* @summary Search punishment targets
|
|
2020
|
+
* @param {string} q UUID, username, or partial/full IP address to search for
|
|
2021
|
+
* @param {*} [options] Override http request option.
|
|
2022
|
+
* @throws {RequiredError}
|
|
2023
|
+
*/
|
|
2024
|
+
searchTargets: async (q: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
2025
|
+
// verify required parameter 'q' is not null or undefined
|
|
2026
|
+
assertParamExists('searchTargets', 'q', q)
|
|
2027
|
+
const localVarPath = `/admin/punishment/search`;
|
|
2028
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2029
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2030
|
+
let baseOptions;
|
|
2031
|
+
if (configuration) {
|
|
2032
|
+
baseOptions = configuration.baseOptions;
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2035
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
2036
|
+
const localVarHeaderParameter = {} as any;
|
|
2037
|
+
const localVarQueryParameter = {} as any;
|
|
2038
|
+
|
|
2039
|
+
// authentication DiscordAuth required
|
|
2040
|
+
// http bearer authentication required
|
|
2041
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
2042
|
+
|
|
2043
|
+
if (q !== undefined) {
|
|
2044
|
+
localVarQueryParameter['q'] = q;
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
2048
|
+
|
|
2049
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2050
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2051
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
2052
|
+
|
|
2053
|
+
return {
|
|
2054
|
+
url: toPathString(localVarUrlObj),
|
|
2055
|
+
options: localVarRequestOptions,
|
|
2056
|
+
};
|
|
2057
|
+
},
|
|
2058
|
+
}
|
|
2059
|
+
};
|
|
2060
|
+
|
|
2061
|
+
/**
|
|
2062
|
+
* AdminPunishmentsApi - functional programming interface
|
|
2063
|
+
*/
|
|
2064
|
+
export const AdminPunishmentsApiFp = function(configuration?: Configuration) {
|
|
2065
|
+
const localVarAxiosParamCreator = AdminPunishmentsApiAxiosParamCreator(configuration)
|
|
2066
|
+
return {
|
|
2067
|
+
/**
|
|
2068
|
+
* Apply a punishment to one or more targets. Player targets are linked via player_punishment; IP targets are linked via connection_punishment. The authenticated user is recorded as the issuer.
|
|
2069
|
+
* @summary Apply punishment
|
|
2070
|
+
* @param {AdminApplyPunishmentRequest} adminApplyPunishmentRequest
|
|
2071
|
+
* @param {*} [options] Override http request option.
|
|
2072
|
+
* @throws {RequiredError}
|
|
2073
|
+
*/
|
|
2074
|
+
async applyPunishment(adminApplyPunishmentRequest: AdminApplyPunishmentRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminApplyPunishmentResponse>> {
|
|
2075
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.applyPunishment(adminApplyPunishmentRequest, options);
|
|
2076
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2077
|
+
const localVarOperationServerBasePath = operationServerMap['AdminPunishmentsApi.applyPunishment']?.[localVarOperationServerIndex]?.url;
|
|
2078
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2079
|
+
},
|
|
2080
|
+
/**
|
|
2081
|
+
* Preview the impact of a punishment across one or more targets. Returns current score, points to add, projected new score, and affected players per target. No changes are made.
|
|
2082
|
+
* @summary Evaluate punishment impact
|
|
2083
|
+
* @param {AdminCreatePunishmentDraftRequest} adminCreatePunishmentDraftRequest
|
|
2084
|
+
* @param {*} [options] Override http request option.
|
|
2085
|
+
* @throws {RequiredError}
|
|
2086
|
+
*/
|
|
2087
|
+
async createDraft(adminCreatePunishmentDraftRequest: AdminCreatePunishmentDraftRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminPunishmentDraftResponse>> {
|
|
2088
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createDraft(adminCreatePunishmentDraftRequest, options);
|
|
2089
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2090
|
+
const localVarOperationServerBasePath = operationServerMap['AdminPunishmentsApi.createDraft']?.[localVarOperationServerIndex]?.url;
|
|
2091
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2092
|
+
},
|
|
2093
|
+
/**
|
|
2094
|
+
* Returns a paginated list of punishments with optional filtering by player UUID, username, IP address, type, and date range.
|
|
2095
|
+
* @summary List punishments
|
|
2096
|
+
* @param {number} page Page number (1-indexed)
|
|
2097
|
+
* @param {number} limit Page size
|
|
2098
|
+
* @param {string | null} [uuid] Filter by player UUID
|
|
2099
|
+
* @param {string | null} [username] Filter by player username (case-insensitive substring match)
|
|
2100
|
+
* @param {string | null} [ipAddress] Filter by IP address
|
|
2101
|
+
* @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, WARNING). Repeatable.
|
|
2102
|
+
* @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (ms)
|
|
2103
|
+
* @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (ms)
|
|
2104
|
+
* @param {*} [options] Override http request option.
|
|
2105
|
+
* @throws {RequiredError}
|
|
2106
|
+
*/
|
|
2107
|
+
async getPunishments(page: number, limit: number, uuid?: string | null, username?: string | null, ipAddress?: string | null, type?: Array<string> | null, issuedAfter?: number | null, issuedBefore?: number | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminPagedPunishmentResponse>> {
|
|
2108
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getPunishments(page, limit, uuid, username, ipAddress, type, issuedAfter, issuedBefore, options);
|
|
2109
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2110
|
+
const localVarOperationServerBasePath = operationServerMap['AdminPunishmentsApi.getPunishments']?.[localVarOperationServerIndex]?.url;
|
|
2111
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2112
|
+
},
|
|
2113
|
+
/**
|
|
2114
|
+
* Search for players by UUID or username, or look up all players associated with an IP address. Used to populate the target table before issuing a punishment.
|
|
2115
|
+
* @summary Search punishment targets
|
|
2116
|
+
* @param {string} q UUID, username, or partial/full IP address to search for
|
|
2117
|
+
* @param {*} [options] Override http request option.
|
|
2118
|
+
* @throws {RequiredError}
|
|
2119
|
+
*/
|
|
2120
|
+
async searchTargets(q: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminPunishmentSearchResponse>> {
|
|
2121
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.searchTargets(q, options);
|
|
1211
2122
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1212
|
-
const localVarOperationServerBasePath = operationServerMap['
|
|
2123
|
+
const localVarOperationServerBasePath = operationServerMap['AdminPunishmentsApi.searchTargets']?.[localVarOperationServerIndex]?.url;
|
|
1213
2124
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1214
2125
|
},
|
|
1215
2126
|
}
|
|
1216
2127
|
};
|
|
1217
2128
|
|
|
1218
2129
|
/**
|
|
1219
|
-
*
|
|
2130
|
+
* AdminPunishmentsApi - factory interface
|
|
1220
2131
|
*/
|
|
1221
|
-
export const
|
|
1222
|
-
const localVarFp =
|
|
2132
|
+
export const AdminPunishmentsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
2133
|
+
const localVarFp = AdminPunishmentsApiFp(configuration)
|
|
1223
2134
|
return {
|
|
1224
2135
|
/**
|
|
1225
|
-
*
|
|
1226
|
-
* @summary
|
|
2136
|
+
* Apply a punishment to one or more targets. Player targets are linked via player_punishment; IP targets are linked via connection_punishment. The authenticated user is recorded as the issuer.
|
|
2137
|
+
* @summary Apply punishment
|
|
2138
|
+
* @param {AdminApplyPunishmentRequest} adminApplyPunishmentRequest
|
|
1227
2139
|
* @param {*} [options] Override http request option.
|
|
1228
2140
|
* @throws {RequiredError}
|
|
1229
2141
|
*/
|
|
1230
|
-
|
|
1231
|
-
return localVarFp.
|
|
2142
|
+
applyPunishment(adminApplyPunishmentRequest: AdminApplyPunishmentRequest, options?: RawAxiosRequestConfig): AxiosPromise<AdminApplyPunishmentResponse> {
|
|
2143
|
+
return localVarFp.applyPunishment(adminApplyPunishmentRequest, options).then((request) => request(axios, basePath));
|
|
2144
|
+
},
|
|
2145
|
+
/**
|
|
2146
|
+
* Preview the impact of a punishment across one or more targets. Returns current score, points to add, projected new score, and affected players per target. No changes are made.
|
|
2147
|
+
* @summary Evaluate punishment impact
|
|
2148
|
+
* @param {AdminCreatePunishmentDraftRequest} adminCreatePunishmentDraftRequest
|
|
2149
|
+
* @param {*} [options] Override http request option.
|
|
2150
|
+
* @throws {RequiredError}
|
|
2151
|
+
*/
|
|
2152
|
+
createDraft(adminCreatePunishmentDraftRequest: AdminCreatePunishmentDraftRequest, options?: RawAxiosRequestConfig): AxiosPromise<AdminPunishmentDraftResponse> {
|
|
2153
|
+
return localVarFp.createDraft(adminCreatePunishmentDraftRequest, options).then((request) => request(axios, basePath));
|
|
2154
|
+
},
|
|
2155
|
+
/**
|
|
2156
|
+
* Returns a paginated list of punishments with optional filtering by player UUID, username, IP address, type, and date range.
|
|
2157
|
+
* @summary List punishments
|
|
2158
|
+
* @param {number} page Page number (1-indexed)
|
|
2159
|
+
* @param {number} limit Page size
|
|
2160
|
+
* @param {string | null} [uuid] Filter by player UUID
|
|
2161
|
+
* @param {string | null} [username] Filter by player username (case-insensitive substring match)
|
|
2162
|
+
* @param {string | null} [ipAddress] Filter by IP address
|
|
2163
|
+
* @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, WARNING). Repeatable.
|
|
2164
|
+
* @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (ms)
|
|
2165
|
+
* @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (ms)
|
|
2166
|
+
* @param {*} [options] Override http request option.
|
|
2167
|
+
* @throws {RequiredError}
|
|
2168
|
+
*/
|
|
2169
|
+
getPunishments(page: number, limit: number, uuid?: string | null, username?: string | null, ipAddress?: string | null, type?: Array<string> | null, issuedAfter?: number | null, issuedBefore?: number | null, options?: RawAxiosRequestConfig): AxiosPromise<AdminPagedPunishmentResponse> {
|
|
2170
|
+
return localVarFp.getPunishments(page, limit, uuid, username, ipAddress, type, issuedAfter, issuedBefore, options).then((request) => request(axios, basePath));
|
|
2171
|
+
},
|
|
2172
|
+
/**
|
|
2173
|
+
* Search for players by UUID or username, or look up all players associated with an IP address. Used to populate the target table before issuing a punishment.
|
|
2174
|
+
* @summary Search punishment targets
|
|
2175
|
+
* @param {string} q UUID, username, or partial/full IP address to search for
|
|
2176
|
+
* @param {*} [options] Override http request option.
|
|
2177
|
+
* @throws {RequiredError}
|
|
2178
|
+
*/
|
|
2179
|
+
searchTargets(q: string, options?: RawAxiosRequestConfig): AxiosPromise<AdminPunishmentSearchResponse> {
|
|
2180
|
+
return localVarFp.searchTargets(q, options).then((request) => request(axios, basePath));
|
|
1232
2181
|
},
|
|
1233
2182
|
};
|
|
1234
2183
|
};
|
|
1235
2184
|
|
|
1236
2185
|
/**
|
|
1237
|
-
*
|
|
2186
|
+
* AdminPunishmentsApi - object-oriented interface
|
|
1238
2187
|
*/
|
|
1239
|
-
export class
|
|
2188
|
+
export class AdminPunishmentsApi extends BaseAPI {
|
|
1240
2189
|
/**
|
|
1241
|
-
*
|
|
1242
|
-
* @summary
|
|
2190
|
+
* Apply a punishment to one or more targets. Player targets are linked via player_punishment; IP targets are linked via connection_punishment. The authenticated user is recorded as the issuer.
|
|
2191
|
+
* @summary Apply punishment
|
|
2192
|
+
* @param {AdminApplyPunishmentRequest} adminApplyPunishmentRequest
|
|
1243
2193
|
* @param {*} [options] Override http request option.
|
|
1244
2194
|
* @throws {RequiredError}
|
|
1245
2195
|
*/
|
|
1246
|
-
public
|
|
1247
|
-
return
|
|
2196
|
+
public applyPunishment(adminApplyPunishmentRequest: AdminApplyPunishmentRequest, options?: RawAxiosRequestConfig) {
|
|
2197
|
+
return AdminPunishmentsApiFp(this.configuration).applyPunishment(adminApplyPunishmentRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2200
|
+
/**
|
|
2201
|
+
* Preview the impact of a punishment across one or more targets. Returns current score, points to add, projected new score, and affected players per target. No changes are made.
|
|
2202
|
+
* @summary Evaluate punishment impact
|
|
2203
|
+
* @param {AdminCreatePunishmentDraftRequest} adminCreatePunishmentDraftRequest
|
|
2204
|
+
* @param {*} [options] Override http request option.
|
|
2205
|
+
* @throws {RequiredError}
|
|
2206
|
+
*/
|
|
2207
|
+
public createDraft(adminCreatePunishmentDraftRequest: AdminCreatePunishmentDraftRequest, options?: RawAxiosRequestConfig) {
|
|
2208
|
+
return AdminPunishmentsApiFp(this.configuration).createDraft(adminCreatePunishmentDraftRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2209
|
+
}
|
|
2210
|
+
|
|
2211
|
+
/**
|
|
2212
|
+
* Returns a paginated list of punishments with optional filtering by player UUID, username, IP address, type, and date range.
|
|
2213
|
+
* @summary List punishments
|
|
2214
|
+
* @param {number} page Page number (1-indexed)
|
|
2215
|
+
* @param {number} limit Page size
|
|
2216
|
+
* @param {string | null} [uuid] Filter by player UUID
|
|
2217
|
+
* @param {string | null} [username] Filter by player username (case-insensitive substring match)
|
|
2218
|
+
* @param {string | null} [ipAddress] Filter by IP address
|
|
2219
|
+
* @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, WARNING). Repeatable.
|
|
2220
|
+
* @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (ms)
|
|
2221
|
+
* @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (ms)
|
|
2222
|
+
* @param {*} [options] Override http request option.
|
|
2223
|
+
* @throws {RequiredError}
|
|
2224
|
+
*/
|
|
2225
|
+
public getPunishments(page: number, limit: number, uuid?: string | null, username?: string | null, ipAddress?: string | null, type?: Array<string> | null, issuedAfter?: number | null, issuedBefore?: number | null, options?: RawAxiosRequestConfig) {
|
|
2226
|
+
return AdminPunishmentsApiFp(this.configuration).getPunishments(page, limit, uuid, username, ipAddress, type, issuedAfter, issuedBefore, options).then((request) => request(this.axios, this.basePath));
|
|
2227
|
+
}
|
|
2228
|
+
|
|
2229
|
+
/**
|
|
2230
|
+
* Search for players by UUID or username, or look up all players associated with an IP address. Used to populate the target table before issuing a punishment.
|
|
2231
|
+
* @summary Search punishment targets
|
|
2232
|
+
* @param {string} q UUID, username, or partial/full IP address to search for
|
|
2233
|
+
* @param {*} [options] Override http request option.
|
|
2234
|
+
* @throws {RequiredError}
|
|
2235
|
+
*/
|
|
2236
|
+
public searchTargets(q: string, options?: RawAxiosRequestConfig) {
|
|
2237
|
+
return AdminPunishmentsApiFp(this.configuration).searchTargets(q, options).then((request) => request(this.axios, this.basePath));
|
|
1248
2238
|
}
|
|
1249
2239
|
}
|
|
1250
2240
|
|
|
@@ -1282,7 +2272,7 @@ export const ConnectionApiAxiosParamCreator = function (configuration?: Configur
|
|
|
1282
2272
|
const localVarHeaderParameter = {} as any;
|
|
1283
2273
|
const localVarQueryParameter = {} as any;
|
|
1284
2274
|
|
|
1285
|
-
// authentication
|
|
2275
|
+
// authentication DiscordAuth required
|
|
1286
2276
|
// http bearer authentication required
|
|
1287
2277
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1288
2278
|
|
|
@@ -1374,22 +2364,19 @@ export class ConnectionApi extends BaseAPI {
|
|
|
1374
2364
|
|
|
1375
2365
|
|
|
1376
2366
|
/**
|
|
1377
|
-
*
|
|
2367
|
+
* DefaultApi - axios parameter creator
|
|
1378
2368
|
*/
|
|
1379
|
-
export const
|
|
2369
|
+
export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
1380
2370
|
return {
|
|
1381
2371
|
/**
|
|
1382
|
-
*
|
|
1383
|
-
* @
|
|
1384
|
-
* @param {string
|
|
2372
|
+
*
|
|
2373
|
+
* @param {string | null} [code]
|
|
2374
|
+
* @param {string | null} [error]
|
|
1385
2375
|
* @param {*} [options] Override http request option.
|
|
1386
2376
|
* @throws {RequiredError}
|
|
1387
2377
|
*/
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
assertParamExists('getPlayer', 'uuid', uuid)
|
|
1391
|
-
const localVarPath = `/v1/player/{uuid}`
|
|
1392
|
-
.replace(`{${"uuid"}}`, encodeURIComponent(String(uuid)));
|
|
2378
|
+
callback: async (code?: string | null, error?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
2379
|
+
const localVarPath = `/auth/discord/callback`;
|
|
1393
2380
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1394
2381
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1395
2382
|
let baseOptions;
|
|
@@ -1401,7 +2388,48 @@ export const PlayerApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
1401
2388
|
const localVarHeaderParameter = {} as any;
|
|
1402
2389
|
const localVarQueryParameter = {} as any;
|
|
1403
2390
|
|
|
1404
|
-
// authentication
|
|
2391
|
+
// authentication DiscordAuth required
|
|
2392
|
+
// http bearer authentication required
|
|
2393
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
2394
|
+
|
|
2395
|
+
if (code !== undefined) {
|
|
2396
|
+
localVarQueryParameter['code'] = code;
|
|
2397
|
+
}
|
|
2398
|
+
|
|
2399
|
+
if (error !== undefined) {
|
|
2400
|
+
localVarQueryParameter['error'] = error;
|
|
2401
|
+
}
|
|
2402
|
+
|
|
2403
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
2404
|
+
|
|
2405
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2406
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2407
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
2408
|
+
|
|
2409
|
+
return {
|
|
2410
|
+
url: toPathString(localVarUrlObj),
|
|
2411
|
+
options: localVarRequestOptions,
|
|
2412
|
+
};
|
|
2413
|
+
},
|
|
2414
|
+
/**
|
|
2415
|
+
*
|
|
2416
|
+
* @param {*} [options] Override http request option.
|
|
2417
|
+
* @throws {RequiredError}
|
|
2418
|
+
*/
|
|
2419
|
+
initiateLogin: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
2420
|
+
const localVarPath = `/auth/discord`;
|
|
2421
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2422
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2423
|
+
let baseOptions;
|
|
2424
|
+
if (configuration) {
|
|
2425
|
+
baseOptions = configuration.baseOptions;
|
|
2426
|
+
}
|
|
2427
|
+
|
|
2428
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
2429
|
+
const localVarHeaderParameter = {} as any;
|
|
2430
|
+
const localVarQueryParameter = {} as any;
|
|
2431
|
+
|
|
2432
|
+
// authentication DiscordAuth required
|
|
1405
2433
|
// http bearer authentication required
|
|
1406
2434
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1407
2435
|
|
|
@@ -1420,80 +2448,109 @@ export const PlayerApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
1420
2448
|
};
|
|
1421
2449
|
|
|
1422
2450
|
/**
|
|
1423
|
-
*
|
|
2451
|
+
* DefaultApi - functional programming interface
|
|
1424
2452
|
*/
|
|
1425
|
-
export const
|
|
1426
|
-
const localVarAxiosParamCreator =
|
|
2453
|
+
export const DefaultApiFp = function(configuration?: Configuration) {
|
|
2454
|
+
const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration)
|
|
1427
2455
|
return {
|
|
1428
2456
|
/**
|
|
1429
|
-
*
|
|
1430
|
-
* @
|
|
1431
|
-
* @param {string
|
|
2457
|
+
*
|
|
2458
|
+
* @param {string | null} [code]
|
|
2459
|
+
* @param {string | null} [error]
|
|
1432
2460
|
* @param {*} [options] Override http request option.
|
|
1433
2461
|
* @throws {RequiredError}
|
|
1434
2462
|
*/
|
|
1435
|
-
async
|
|
1436
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
2463
|
+
async callback(code?: string | null, error?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
|
2464
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.callback(code, error, options);
|
|
1437
2465
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1438
|
-
const localVarOperationServerBasePath = operationServerMap['
|
|
2466
|
+
const localVarOperationServerBasePath = operationServerMap['DefaultApi.callback']?.[localVarOperationServerIndex]?.url;
|
|
2467
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2468
|
+
},
|
|
2469
|
+
/**
|
|
2470
|
+
*
|
|
2471
|
+
* @param {*} [options] Override http request option.
|
|
2472
|
+
* @throws {RequiredError}
|
|
2473
|
+
*/
|
|
2474
|
+
async initiateLogin(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
|
2475
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.initiateLogin(options);
|
|
2476
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2477
|
+
const localVarOperationServerBasePath = operationServerMap['DefaultApi.initiateLogin']?.[localVarOperationServerIndex]?.url;
|
|
1439
2478
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1440
2479
|
},
|
|
1441
2480
|
}
|
|
1442
2481
|
};
|
|
1443
2482
|
|
|
1444
2483
|
/**
|
|
1445
|
-
*
|
|
2484
|
+
* DefaultApi - factory interface
|
|
1446
2485
|
*/
|
|
1447
|
-
export const
|
|
1448
|
-
const localVarFp =
|
|
2486
|
+
export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
2487
|
+
const localVarFp = DefaultApiFp(configuration)
|
|
1449
2488
|
return {
|
|
1450
2489
|
/**
|
|
1451
|
-
*
|
|
1452
|
-
* @
|
|
1453
|
-
* @param {string
|
|
2490
|
+
*
|
|
2491
|
+
* @param {string | null} [code]
|
|
2492
|
+
* @param {string | null} [error]
|
|
1454
2493
|
* @param {*} [options] Override http request option.
|
|
1455
2494
|
* @throws {RequiredError}
|
|
1456
2495
|
*/
|
|
1457
|
-
|
|
1458
|
-
return localVarFp.
|
|
2496
|
+
callback(code?: string | null, error?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<object> {
|
|
2497
|
+
return localVarFp.callback(code, error, options).then((request) => request(axios, basePath));
|
|
2498
|
+
},
|
|
2499
|
+
/**
|
|
2500
|
+
*
|
|
2501
|
+
* @param {*} [options] Override http request option.
|
|
2502
|
+
* @throws {RequiredError}
|
|
2503
|
+
*/
|
|
2504
|
+
initiateLogin(options?: RawAxiosRequestConfig): AxiosPromise<object> {
|
|
2505
|
+
return localVarFp.initiateLogin(options).then((request) => request(axios, basePath));
|
|
1459
2506
|
},
|
|
1460
2507
|
};
|
|
1461
2508
|
};
|
|
1462
2509
|
|
|
1463
2510
|
/**
|
|
1464
|
-
*
|
|
2511
|
+
* DefaultApi - object-oriented interface
|
|
1465
2512
|
*/
|
|
1466
|
-
export class
|
|
2513
|
+
export class DefaultApi extends BaseAPI {
|
|
1467
2514
|
/**
|
|
1468
|
-
*
|
|
1469
|
-
* @
|
|
1470
|
-
* @param {string
|
|
2515
|
+
*
|
|
2516
|
+
* @param {string | null} [code]
|
|
2517
|
+
* @param {string | null} [error]
|
|
1471
2518
|
* @param {*} [options] Override http request option.
|
|
1472
2519
|
* @throws {RequiredError}
|
|
1473
2520
|
*/
|
|
1474
|
-
public
|
|
1475
|
-
return
|
|
2521
|
+
public callback(code?: string | null, error?: string | null, options?: RawAxiosRequestConfig) {
|
|
2522
|
+
return DefaultApiFp(this.configuration).callback(code, error, options).then((request) => request(this.axios, this.basePath));
|
|
2523
|
+
}
|
|
2524
|
+
|
|
2525
|
+
/**
|
|
2526
|
+
*
|
|
2527
|
+
* @param {*} [options] Override http request option.
|
|
2528
|
+
* @throws {RequiredError}
|
|
2529
|
+
*/
|
|
2530
|
+
public initiateLogin(options?: RawAxiosRequestConfig) {
|
|
2531
|
+
return DefaultApiFp(this.configuration).initiateLogin(options).then((request) => request(this.axios, this.basePath));
|
|
1476
2532
|
}
|
|
1477
2533
|
}
|
|
1478
2534
|
|
|
1479
2535
|
|
|
1480
2536
|
|
|
1481
2537
|
/**
|
|
1482
|
-
*
|
|
2538
|
+
* PlayerApi - axios parameter creator
|
|
1483
2539
|
*/
|
|
1484
|
-
export const
|
|
2540
|
+
export const PlayerApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
1485
2541
|
return {
|
|
1486
2542
|
/**
|
|
1487
|
-
*
|
|
1488
|
-
* @summary
|
|
1489
|
-
* @param {
|
|
2543
|
+
* 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.
|
|
2544
|
+
* @summary Get Player Information
|
|
2545
|
+
* @param {string} uuid The Minecraft player UUID (with or without dashes)
|
|
1490
2546
|
* @param {*} [options] Override http request option.
|
|
1491
2547
|
* @throws {RequiredError}
|
|
1492
2548
|
*/
|
|
1493
|
-
|
|
1494
|
-
// verify required parameter '
|
|
1495
|
-
assertParamExists('
|
|
1496
|
-
const localVarPath = `/v1/
|
|
2549
|
+
getPlayer1: async (uuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
2550
|
+
// verify required parameter 'uuid' is not null or undefined
|
|
2551
|
+
assertParamExists('getPlayer1', 'uuid', uuid)
|
|
2552
|
+
const localVarPath = `/v1/player/{uuid}`
|
|
2553
|
+
.replace(`{${"uuid"}}`, encodeURIComponent(String(uuid)));
|
|
1497
2554
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1498
2555
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1499
2556
|
let baseOptions;
|
|
@@ -1501,66 +2558,92 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
|
|
|
1501
2558
|
baseOptions = configuration.baseOptions;
|
|
1502
2559
|
}
|
|
1503
2560
|
|
|
1504
|
-
const localVarRequestOptions = { method: '
|
|
2561
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
1505
2562
|
const localVarHeaderParameter = {} as any;
|
|
1506
2563
|
const localVarQueryParameter = {} as any;
|
|
1507
2564
|
|
|
1508
|
-
// authentication
|
|
2565
|
+
// authentication DiscordAuth required
|
|
1509
2566
|
// http bearer authentication required
|
|
1510
2567
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1511
2568
|
|
|
1512
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1513
2569
|
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1514
2570
|
|
|
1515
2571
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1516
2572
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1517
2573
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1518
|
-
localVarRequestOptions.data = serializeDataIfNeeded(applyPunishmentRequest, localVarRequestOptions, configuration)
|
|
1519
2574
|
|
|
1520
2575
|
return {
|
|
1521
2576
|
url: toPathString(localVarUrlObj),
|
|
1522
2577
|
options: localVarRequestOptions,
|
|
1523
2578
|
};
|
|
1524
2579
|
},
|
|
2580
|
+
}
|
|
2581
|
+
};
|
|
2582
|
+
|
|
2583
|
+
/**
|
|
2584
|
+
* PlayerApi - functional programming interface
|
|
2585
|
+
*/
|
|
2586
|
+
export const PlayerApiFp = function(configuration?: Configuration) {
|
|
2587
|
+
const localVarAxiosParamCreator = PlayerApiAxiosParamCreator(configuration)
|
|
2588
|
+
return {
|
|
1525
2589
|
/**
|
|
1526
|
-
*
|
|
1527
|
-
* @summary
|
|
1528
|
-
* @param {
|
|
2590
|
+
* 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.
|
|
2591
|
+
* @summary Get Player Information
|
|
2592
|
+
* @param {string} uuid The Minecraft player UUID (with or without dashes)
|
|
1529
2593
|
* @param {*} [options] Override http request option.
|
|
1530
2594
|
* @throws {RequiredError}
|
|
1531
2595
|
*/
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
const
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
baseOptions = configuration.baseOptions;
|
|
1541
|
-
}
|
|
2596
|
+
async getPlayer1(uuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PlayerGetPlayerInformation>> {
|
|
2597
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getPlayer1(uuid, options);
|
|
2598
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2599
|
+
const localVarOperationServerBasePath = operationServerMap['PlayerApi.getPlayer1']?.[localVarOperationServerIndex]?.url;
|
|
2600
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2601
|
+
},
|
|
2602
|
+
}
|
|
2603
|
+
};
|
|
1542
2604
|
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
2605
|
+
/**
|
|
2606
|
+
* PlayerApi - factory interface
|
|
2607
|
+
*/
|
|
2608
|
+
export const PlayerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
2609
|
+
const localVarFp = PlayerApiFp(configuration)
|
|
2610
|
+
return {
|
|
2611
|
+
/**
|
|
2612
|
+
* 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.
|
|
2613
|
+
* @summary Get Player Information
|
|
2614
|
+
* @param {string} uuid The Minecraft player UUID (with or without dashes)
|
|
2615
|
+
* @param {*} [options] Override http request option.
|
|
2616
|
+
* @throws {RequiredError}
|
|
2617
|
+
*/
|
|
2618
|
+
getPlayer1(uuid: string, options?: RawAxiosRequestConfig): AxiosPromise<PlayerGetPlayerInformation> {
|
|
2619
|
+
return localVarFp.getPlayer1(uuid, options).then((request) => request(axios, basePath));
|
|
2620
|
+
},
|
|
2621
|
+
};
|
|
2622
|
+
};
|
|
1546
2623
|
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
2624
|
+
/**
|
|
2625
|
+
* PlayerApi - object-oriented interface
|
|
2626
|
+
*/
|
|
2627
|
+
export class PlayerApi extends BaseAPI {
|
|
2628
|
+
/**
|
|
2629
|
+
* 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.
|
|
2630
|
+
* @summary Get Player Information
|
|
2631
|
+
* @param {string} uuid The Minecraft player UUID (with or without dashes)
|
|
2632
|
+
* @param {*} [options] Override http request option.
|
|
2633
|
+
* @throws {RequiredError}
|
|
2634
|
+
*/
|
|
2635
|
+
public getPlayer1(uuid: string, options?: RawAxiosRequestConfig) {
|
|
2636
|
+
return PlayerApiFp(this.configuration).getPlayer1(uuid, options).then((request) => request(this.axios, this.basePath));
|
|
2637
|
+
}
|
|
2638
|
+
}
|
|
1550
2639
|
|
|
1551
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1552
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1553
2640
|
|
|
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
2641
|
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
2642
|
+
/**
|
|
2643
|
+
* PunishmentApi - axios parameter creator
|
|
2644
|
+
*/
|
|
2645
|
+
export const PunishmentApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
2646
|
+
return {
|
|
1564
2647
|
/**
|
|
1565
2648
|
* Retrieve duration information for each punishment type and severity level (1-10)
|
|
1566
2649
|
* @summary Get punishment severities
|
|
@@ -1580,7 +2663,7 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
|
|
|
1580
2663
|
const localVarHeaderParameter = {} as any;
|
|
1581
2664
|
const localVarQueryParameter = {} as any;
|
|
1582
2665
|
|
|
1583
|
-
// authentication
|
|
2666
|
+
// authentication DiscordAuth required
|
|
1584
2667
|
// http bearer authentication required
|
|
1585
2668
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1586
2669
|
|
|
@@ -1605,7 +2688,7 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
|
|
|
1605
2688
|
* @param {*} [options] Override http request option.
|
|
1606
2689
|
* @throws {RequiredError}
|
|
1607
2690
|
*/
|
|
1608
|
-
|
|
2691
|
+
getPunishments1: async (uuid?: string | null, username?: string | null, type?: Array<string> | null, since?: number | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1609
2692
|
const localVarPath = `/v1/punishment`;
|
|
1610
2693
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1611
2694
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -1618,7 +2701,7 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
|
|
|
1618
2701
|
const localVarHeaderParameter = {} as any;
|
|
1619
2702
|
const localVarQueryParameter = {} as any;
|
|
1620
2703
|
|
|
1621
|
-
// authentication
|
|
2704
|
+
// authentication DiscordAuth required
|
|
1622
2705
|
// http bearer authentication required
|
|
1623
2706
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1624
2707
|
|
|
@@ -1671,7 +2754,7 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
|
|
|
1671
2754
|
const localVarHeaderParameter = {} as any;
|
|
1672
2755
|
const localVarQueryParameter = {} as any;
|
|
1673
2756
|
|
|
1674
|
-
// authentication
|
|
2757
|
+
// authentication DiscordAuth required
|
|
1675
2758
|
// http bearer authentication required
|
|
1676
2759
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1677
2760
|
|
|
@@ -1722,7 +2805,7 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
|
|
|
1722
2805
|
const localVarHeaderParameter = {} as any;
|
|
1723
2806
|
const localVarQueryParameter = {} as any;
|
|
1724
2807
|
|
|
1725
|
-
// authentication
|
|
2808
|
+
// authentication DiscordAuth required
|
|
1726
2809
|
// http bearer authentication required
|
|
1727
2810
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1728
2811
|
|
|
@@ -1782,32 +2865,6 @@ export const PunishmentApiAxiosParamCreator = function (configuration?: Configur
|
|
|
1782
2865
|
export const PunishmentApiFp = function(configuration?: Configuration) {
|
|
1783
2866
|
const localVarAxiosParamCreator = PunishmentApiAxiosParamCreator(configuration)
|
|
1784
2867
|
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
2868
|
/**
|
|
1812
2869
|
* Retrieve duration information for each punishment type and severity level (1-10)
|
|
1813
2870
|
* @summary Get punishment severities
|
|
@@ -1830,10 +2887,10 @@ export const PunishmentApiFp = function(configuration?: Configuration) {
|
|
|
1830
2887
|
* @param {*} [options] Override http request option.
|
|
1831
2888
|
* @throws {RequiredError}
|
|
1832
2889
|
*/
|
|
1833
|
-
async
|
|
1834
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
2890
|
+
async getPunishments1(uuid?: string | null, username?: string | null, type?: Array<string> | null, since?: number | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<PunishmentGetPunishmentResponse>>> {
|
|
2891
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getPunishments1(uuid, username, type, since, options);
|
|
1835
2892
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1836
|
-
const localVarOperationServerBasePath = operationServerMap['PunishmentApi.
|
|
2893
|
+
const localVarOperationServerBasePath = operationServerMap['PunishmentApi.getPunishments1']?.[localVarOperationServerIndex]?.url;
|
|
1837
2894
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1838
2895
|
},
|
|
1839
2896
|
/**
|
|
@@ -1879,26 +2936,6 @@ export const PunishmentApiFp = function(configuration?: Configuration) {
|
|
|
1879
2936
|
export const PunishmentApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
1880
2937
|
const localVarFp = PunishmentApiFp(configuration)
|
|
1881
2938
|
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
2939
|
/**
|
|
1903
2940
|
* Retrieve duration information for each punishment type and severity level (1-10)
|
|
1904
2941
|
* @summary Get punishment severities
|
|
@@ -1918,8 +2955,8 @@ export const PunishmentApiFactory = function (configuration?: Configuration, bas
|
|
|
1918
2955
|
* @param {*} [options] Override http request option.
|
|
1919
2956
|
* @throws {RequiredError}
|
|
1920
2957
|
*/
|
|
1921
|
-
|
|
1922
|
-
return localVarFp.
|
|
2958
|
+
getPunishments1(uuid?: string | null, username?: string | null, type?: Array<string> | null, since?: number | null, options?: RawAxiosRequestConfig): AxiosPromise<Array<PunishmentGetPunishmentResponse>> {
|
|
2959
|
+
return localVarFp.getPunishments1(uuid, username, type, since, options).then((request) => request(axios, basePath));
|
|
1923
2960
|
},
|
|
1924
2961
|
/**
|
|
1925
2962
|
* Retrieve all active punishments associated with an IP address
|
|
@@ -1956,28 +2993,6 @@ export const PunishmentApiFactory = function (configuration?: Configuration, bas
|
|
|
1956
2993
|
* PunishmentApi - object-oriented interface
|
|
1957
2994
|
*/
|
|
1958
2995
|
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
2996
|
/**
|
|
1982
2997
|
* Retrieve duration information for each punishment type and severity level (1-10)
|
|
1983
2998
|
* @summary Get punishment severities
|
|
@@ -1998,8 +3013,8 @@ export class PunishmentApi extends BaseAPI {
|
|
|
1998
3013
|
* @param {*} [options] Override http request option.
|
|
1999
3014
|
* @throws {RequiredError}
|
|
2000
3015
|
*/
|
|
2001
|
-
public
|
|
2002
|
-
return PunishmentApiFp(this.configuration).
|
|
3016
|
+
public getPunishments1(uuid?: string | null, username?: string | null, type?: Array<string> | null, since?: number | null, options?: RawAxiosRequestConfig) {
|
|
3017
|
+
return PunishmentApiFp(this.configuration).getPunishments1(uuid, username, type, since, options).then((request) => request(this.axios, this.basePath));
|
|
2003
3018
|
}
|
|
2004
3019
|
|
|
2005
3020
|
/**
|