@rebornteam/reborn-api 2.6.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +19 -5
- package/README.md +33 -11
- package/api.ts +1572 -588
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +776 -248
- package/dist/api.js +1264 -467
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/esm/api.d.ts +776 -248
- package/dist/esm/api.js +1243 -454
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/AdminApplyPunishmentRequest.md +33 -0
- package/docs/AdminApplyPunishmentResponse.md +21 -0
- package/docs/AdminApplyPunishmentResult.md +33 -0
- package/docs/AdminCreatePunishmentDraftRequest.md +31 -0
- package/docs/AdminIpSearchResult.md +23 -0
- package/docs/AdminPagedPunishmentResponse.md +1 -1
- package/docs/AdminPlayerSearchResult.md +23 -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 +168 -2
- package/docs/AuthenticationApi.md +167 -0
- package/docs/ChatApi.md +121 -0
- package/docs/ChatMessageDTO.md +30 -0
- package/docs/ChatMessageRequest.md +26 -0
- package/docs/PlayerApi.md +56 -3
- package/docs/PunishmentApi.md +0 -106
- package/docs/PunishmentGetPunishmentResponse.md +5 -3
- package/docs/ServerRegisterRequest.md +24 -0
- package/docs/ServerSessionDTO.md +36 -0
- package/docs/ServerSessionsApi.md +261 -0
- package/docs/TokenRequest.md +24 -0
- package/index.ts +1 -1
- package/package.json +1 -1
- package/docs/ApplyPunishmentRequest.md +0 -31
- package/docs/ApplyPunishmentResponse.md +0 -33
- package/docs/CreatePunishmentDraftRequest.md +0 -29
- package/docs/DefaultApi.md +0 -105
- package/docs/PunishmentDraftResponse.md +0 -39
package/dist/esm/api.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Reborn API
|
|
5
5
|
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 2.
|
|
7
|
+
* The version of the OpenAPI document: 2.7.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -26,6 +26,20 @@ import globalAxios from 'axios';
|
|
|
26
26
|
import { DUMMY_BASE_URL, assertParamExists, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
|
27
27
|
// @ts-ignore
|
|
28
28
|
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, operationServerMap } from './base';
|
|
29
|
+
export const AdminApplyPunishmentRequestTypeEnum = {
|
|
30
|
+
Ban: 'BAN',
|
|
31
|
+
Mute: 'MUTE',
|
|
32
|
+
Warning: 'WARNING'
|
|
33
|
+
};
|
|
34
|
+
export const AdminCreatePunishmentDraftRequestTypeEnum = {
|
|
35
|
+
Ban: 'BAN',
|
|
36
|
+
Mute: 'MUTE',
|
|
37
|
+
Warning: 'WARNING'
|
|
38
|
+
};
|
|
39
|
+
export const AdminPunishmentSearchResponseKindEnum = {
|
|
40
|
+
Player: 'player',
|
|
41
|
+
Ip: 'ip'
|
|
42
|
+
};
|
|
29
43
|
/**
|
|
30
44
|
* AdminClientCredentialsApi - axios parameter creator
|
|
31
45
|
*/
|
|
@@ -1121,6 +1135,74 @@ export class AdminPlayersApi extends BaseAPI {
|
|
|
1121
1135
|
*/
|
|
1122
1136
|
export const AdminPunishmentsApiAxiosParamCreator = function (configuration) {
|
|
1123
1137
|
return {
|
|
1138
|
+
/**
|
|
1139
|
+
* 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.
|
|
1140
|
+
* @summary Apply punishment
|
|
1141
|
+
* @param {AdminApplyPunishmentRequest} adminApplyPunishmentRequest
|
|
1142
|
+
* @param {*} [options] Override http request option.
|
|
1143
|
+
* @throws {RequiredError}
|
|
1144
|
+
*/
|
|
1145
|
+
applyPunishment: (adminApplyPunishmentRequest_1, ...args_1) => __awaiter(this, [adminApplyPunishmentRequest_1, ...args_1], void 0, function* (adminApplyPunishmentRequest, options = {}) {
|
|
1146
|
+
// verify required parameter 'adminApplyPunishmentRequest' is not null or undefined
|
|
1147
|
+
assertParamExists('applyPunishment', 'adminApplyPunishmentRequest', adminApplyPunishmentRequest);
|
|
1148
|
+
const localVarPath = `/admin/punishment/apply`;
|
|
1149
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1150
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1151
|
+
let baseOptions;
|
|
1152
|
+
if (configuration) {
|
|
1153
|
+
baseOptions = configuration.baseOptions;
|
|
1154
|
+
}
|
|
1155
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1156
|
+
const localVarHeaderParameter = {};
|
|
1157
|
+
const localVarQueryParameter = {};
|
|
1158
|
+
// authentication DiscordAuth required
|
|
1159
|
+
// http bearer authentication required
|
|
1160
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1161
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1162
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1163
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1164
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1165
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1166
|
+
localVarRequestOptions.data = serializeDataIfNeeded(adminApplyPunishmentRequest, localVarRequestOptions, configuration);
|
|
1167
|
+
return {
|
|
1168
|
+
url: toPathString(localVarUrlObj),
|
|
1169
|
+
options: localVarRequestOptions,
|
|
1170
|
+
};
|
|
1171
|
+
}),
|
|
1172
|
+
/**
|
|
1173
|
+
* 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.
|
|
1174
|
+
* @summary Evaluate punishment impact
|
|
1175
|
+
* @param {AdminCreatePunishmentDraftRequest} adminCreatePunishmentDraftRequest
|
|
1176
|
+
* @param {*} [options] Override http request option.
|
|
1177
|
+
* @throws {RequiredError}
|
|
1178
|
+
*/
|
|
1179
|
+
createDraft: (adminCreatePunishmentDraftRequest_1, ...args_1) => __awaiter(this, [adminCreatePunishmentDraftRequest_1, ...args_1], void 0, function* (adminCreatePunishmentDraftRequest, options = {}) {
|
|
1180
|
+
// verify required parameter 'adminCreatePunishmentDraftRequest' is not null or undefined
|
|
1181
|
+
assertParamExists('createDraft', 'adminCreatePunishmentDraftRequest', adminCreatePunishmentDraftRequest);
|
|
1182
|
+
const localVarPath = `/admin/punishment/draft`;
|
|
1183
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1184
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1185
|
+
let baseOptions;
|
|
1186
|
+
if (configuration) {
|
|
1187
|
+
baseOptions = configuration.baseOptions;
|
|
1188
|
+
}
|
|
1189
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1190
|
+
const localVarHeaderParameter = {};
|
|
1191
|
+
const localVarQueryParameter = {};
|
|
1192
|
+
// authentication DiscordAuth required
|
|
1193
|
+
// http bearer authentication required
|
|
1194
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1195
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1196
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1197
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1198
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1199
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1200
|
+
localVarRequestOptions.data = serializeDataIfNeeded(adminCreatePunishmentDraftRequest, localVarRequestOptions, configuration);
|
|
1201
|
+
return {
|
|
1202
|
+
url: toPathString(localVarUrlObj),
|
|
1203
|
+
options: localVarRequestOptions,
|
|
1204
|
+
};
|
|
1205
|
+
}),
|
|
1124
1206
|
/**
|
|
1125
1207
|
* Returns a paginated list of punishments with optional filtering by player UUID, username, IP address, type, and date range.
|
|
1126
1208
|
* @summary List punishments
|
|
@@ -1129,7 +1211,7 @@ export const AdminPunishmentsApiAxiosParamCreator = function (configuration) {
|
|
|
1129
1211
|
* @param {string | null} [uuid] Filter by player UUID
|
|
1130
1212
|
* @param {string | null} [username] Filter by player username (case-insensitive substring match)
|
|
1131
1213
|
* @param {string | null} [ipAddress] Filter by IP address
|
|
1132
|
-
* @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE,
|
|
1214
|
+
* @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, WARNING). Repeatable.
|
|
1133
1215
|
* @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (ms)
|
|
1134
1216
|
* @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (ms)
|
|
1135
1217
|
* @param {*} [options] Override http request option.
|
|
@@ -1186,6 +1268,41 @@ export const AdminPunishmentsApiAxiosParamCreator = function (configuration) {
|
|
|
1186
1268
|
options: localVarRequestOptions,
|
|
1187
1269
|
};
|
|
1188
1270
|
}),
|
|
1271
|
+
/**
|
|
1272
|
+
* 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.
|
|
1273
|
+
* @summary Search punishment targets
|
|
1274
|
+
* @param {string} q UUID, username, or partial/full IP address to search for
|
|
1275
|
+
* @param {*} [options] Override http request option.
|
|
1276
|
+
* @throws {RequiredError}
|
|
1277
|
+
*/
|
|
1278
|
+
searchTargets: (q_1, ...args_1) => __awaiter(this, [q_1, ...args_1], void 0, function* (q, options = {}) {
|
|
1279
|
+
// verify required parameter 'q' is not null or undefined
|
|
1280
|
+
assertParamExists('searchTargets', 'q', q);
|
|
1281
|
+
const localVarPath = `/admin/punishment/search`;
|
|
1282
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1283
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1284
|
+
let baseOptions;
|
|
1285
|
+
if (configuration) {
|
|
1286
|
+
baseOptions = configuration.baseOptions;
|
|
1287
|
+
}
|
|
1288
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1289
|
+
const localVarHeaderParameter = {};
|
|
1290
|
+
const localVarQueryParameter = {};
|
|
1291
|
+
// authentication DiscordAuth required
|
|
1292
|
+
// http bearer authentication required
|
|
1293
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1294
|
+
if (q !== undefined) {
|
|
1295
|
+
localVarQueryParameter['q'] = q;
|
|
1296
|
+
}
|
|
1297
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1298
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1299
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1300
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1301
|
+
return {
|
|
1302
|
+
url: toPathString(localVarUrlObj),
|
|
1303
|
+
options: localVarRequestOptions,
|
|
1304
|
+
};
|
|
1305
|
+
}),
|
|
1189
1306
|
};
|
|
1190
1307
|
};
|
|
1191
1308
|
/**
|
|
@@ -1194,6 +1311,38 @@ export const AdminPunishmentsApiAxiosParamCreator = function (configuration) {
|
|
|
1194
1311
|
export const AdminPunishmentsApiFp = function (configuration) {
|
|
1195
1312
|
const localVarAxiosParamCreator = AdminPunishmentsApiAxiosParamCreator(configuration);
|
|
1196
1313
|
return {
|
|
1314
|
+
/**
|
|
1315
|
+
* 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.
|
|
1316
|
+
* @summary Apply punishment
|
|
1317
|
+
* @param {AdminApplyPunishmentRequest} adminApplyPunishmentRequest
|
|
1318
|
+
* @param {*} [options] Override http request option.
|
|
1319
|
+
* @throws {RequiredError}
|
|
1320
|
+
*/
|
|
1321
|
+
applyPunishment(adminApplyPunishmentRequest, options) {
|
|
1322
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1323
|
+
var _a, _b, _c;
|
|
1324
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.applyPunishment(adminApplyPunishmentRequest, options);
|
|
1325
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1326
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminPunishmentsApi.applyPunishment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1327
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1328
|
+
});
|
|
1329
|
+
},
|
|
1330
|
+
/**
|
|
1331
|
+
* 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.
|
|
1332
|
+
* @summary Evaluate punishment impact
|
|
1333
|
+
* @param {AdminCreatePunishmentDraftRequest} adminCreatePunishmentDraftRequest
|
|
1334
|
+
* @param {*} [options] Override http request option.
|
|
1335
|
+
* @throws {RequiredError}
|
|
1336
|
+
*/
|
|
1337
|
+
createDraft(adminCreatePunishmentDraftRequest, options) {
|
|
1338
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1339
|
+
var _a, _b, _c;
|
|
1340
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createDraft(adminCreatePunishmentDraftRequest, options);
|
|
1341
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1342
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminPunishmentsApi.createDraft']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1343
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1344
|
+
});
|
|
1345
|
+
},
|
|
1197
1346
|
/**
|
|
1198
1347
|
* Returns a paginated list of punishments with optional filtering by player UUID, username, IP address, type, and date range.
|
|
1199
1348
|
* @summary List punishments
|
|
@@ -1202,7 +1351,7 @@ export const AdminPunishmentsApiFp = function (configuration) {
|
|
|
1202
1351
|
* @param {string | null} [uuid] Filter by player UUID
|
|
1203
1352
|
* @param {string | null} [username] Filter by player username (case-insensitive substring match)
|
|
1204
1353
|
* @param {string | null} [ipAddress] Filter by IP address
|
|
1205
|
-
* @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE,
|
|
1354
|
+
* @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, WARNING). Repeatable.
|
|
1206
1355
|
* @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (ms)
|
|
1207
1356
|
* @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (ms)
|
|
1208
1357
|
* @param {*} [options] Override http request option.
|
|
@@ -1217,6 +1366,22 @@ export const AdminPunishmentsApiFp = function (configuration) {
|
|
|
1217
1366
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1218
1367
|
});
|
|
1219
1368
|
},
|
|
1369
|
+
/**
|
|
1370
|
+
* 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.
|
|
1371
|
+
* @summary Search punishment targets
|
|
1372
|
+
* @param {string} q UUID, username, or partial/full IP address to search for
|
|
1373
|
+
* @param {*} [options] Override http request option.
|
|
1374
|
+
* @throws {RequiredError}
|
|
1375
|
+
*/
|
|
1376
|
+
searchTargets(q, options) {
|
|
1377
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1378
|
+
var _a, _b, _c;
|
|
1379
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.searchTargets(q, options);
|
|
1380
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1381
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminPunishmentsApi.searchTargets']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1382
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1383
|
+
});
|
|
1384
|
+
},
|
|
1220
1385
|
};
|
|
1221
1386
|
};
|
|
1222
1387
|
/**
|
|
@@ -1225,6 +1390,26 @@ export const AdminPunishmentsApiFp = function (configuration) {
|
|
|
1225
1390
|
export const AdminPunishmentsApiFactory = function (configuration, basePath, axios) {
|
|
1226
1391
|
const localVarFp = AdminPunishmentsApiFp(configuration);
|
|
1227
1392
|
return {
|
|
1393
|
+
/**
|
|
1394
|
+
* 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.
|
|
1395
|
+
* @summary Apply punishment
|
|
1396
|
+
* @param {AdminApplyPunishmentRequest} adminApplyPunishmentRequest
|
|
1397
|
+
* @param {*} [options] Override http request option.
|
|
1398
|
+
* @throws {RequiredError}
|
|
1399
|
+
*/
|
|
1400
|
+
applyPunishment(adminApplyPunishmentRequest, options) {
|
|
1401
|
+
return localVarFp.applyPunishment(adminApplyPunishmentRequest, options).then((request) => request(axios, basePath));
|
|
1402
|
+
},
|
|
1403
|
+
/**
|
|
1404
|
+
* 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.
|
|
1405
|
+
* @summary Evaluate punishment impact
|
|
1406
|
+
* @param {AdminCreatePunishmentDraftRequest} adminCreatePunishmentDraftRequest
|
|
1407
|
+
* @param {*} [options] Override http request option.
|
|
1408
|
+
* @throws {RequiredError}
|
|
1409
|
+
*/
|
|
1410
|
+
createDraft(adminCreatePunishmentDraftRequest, options) {
|
|
1411
|
+
return localVarFp.createDraft(adminCreatePunishmentDraftRequest, options).then((request) => request(axios, basePath));
|
|
1412
|
+
},
|
|
1228
1413
|
/**
|
|
1229
1414
|
* Returns a paginated list of punishments with optional filtering by player UUID, username, IP address, type, and date range.
|
|
1230
1415
|
* @summary List punishments
|
|
@@ -1233,7 +1418,7 @@ export const AdminPunishmentsApiFactory = function (configuration, basePath, axi
|
|
|
1233
1418
|
* @param {string | null} [uuid] Filter by player UUID
|
|
1234
1419
|
* @param {string | null} [username] Filter by player username (case-insensitive substring match)
|
|
1235
1420
|
* @param {string | null} [ipAddress] Filter by IP address
|
|
1236
|
-
* @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE,
|
|
1421
|
+
* @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, WARNING). Repeatable.
|
|
1237
1422
|
* @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (ms)
|
|
1238
1423
|
* @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (ms)
|
|
1239
1424
|
* @param {*} [options] Override http request option.
|
|
@@ -1242,12 +1427,42 @@ export const AdminPunishmentsApiFactory = function (configuration, basePath, axi
|
|
|
1242
1427
|
getPunishments(page, limit, uuid, username, ipAddress, type, issuedAfter, issuedBefore, options) {
|
|
1243
1428
|
return localVarFp.getPunishments(page, limit, uuid, username, ipAddress, type, issuedAfter, issuedBefore, options).then((request) => request(axios, basePath));
|
|
1244
1429
|
},
|
|
1430
|
+
/**
|
|
1431
|
+
* 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.
|
|
1432
|
+
* @summary Search punishment targets
|
|
1433
|
+
* @param {string} q UUID, username, or partial/full IP address to search for
|
|
1434
|
+
* @param {*} [options] Override http request option.
|
|
1435
|
+
* @throws {RequiredError}
|
|
1436
|
+
*/
|
|
1437
|
+
searchTargets(q, options) {
|
|
1438
|
+
return localVarFp.searchTargets(q, options).then((request) => request(axios, basePath));
|
|
1439
|
+
},
|
|
1245
1440
|
};
|
|
1246
1441
|
};
|
|
1247
1442
|
/**
|
|
1248
1443
|
* AdminPunishmentsApi - object-oriented interface
|
|
1249
1444
|
*/
|
|
1250
1445
|
export class AdminPunishmentsApi extends BaseAPI {
|
|
1446
|
+
/**
|
|
1447
|
+
* 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.
|
|
1448
|
+
* @summary Apply punishment
|
|
1449
|
+
* @param {AdminApplyPunishmentRequest} adminApplyPunishmentRequest
|
|
1450
|
+
* @param {*} [options] Override http request option.
|
|
1451
|
+
* @throws {RequiredError}
|
|
1452
|
+
*/
|
|
1453
|
+
applyPunishment(adminApplyPunishmentRequest, options) {
|
|
1454
|
+
return AdminPunishmentsApiFp(this.configuration).applyPunishment(adminApplyPunishmentRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1455
|
+
}
|
|
1456
|
+
/**
|
|
1457
|
+
* 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.
|
|
1458
|
+
* @summary Evaluate punishment impact
|
|
1459
|
+
* @param {AdminCreatePunishmentDraftRequest} adminCreatePunishmentDraftRequest
|
|
1460
|
+
* @param {*} [options] Override http request option.
|
|
1461
|
+
* @throws {RequiredError}
|
|
1462
|
+
*/
|
|
1463
|
+
createDraft(adminCreatePunishmentDraftRequest, options) {
|
|
1464
|
+
return AdminPunishmentsApiFp(this.configuration).createDraft(adminCreatePunishmentDraftRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1465
|
+
}
|
|
1251
1466
|
/**
|
|
1252
1467
|
* Returns a paginated list of punishments with optional filtering by player UUID, username, IP address, type, and date range.
|
|
1253
1468
|
* @summary List punishments
|
|
@@ -1256,7 +1471,7 @@ export class AdminPunishmentsApi extends BaseAPI {
|
|
|
1256
1471
|
* @param {string | null} [uuid] Filter by player UUID
|
|
1257
1472
|
* @param {string | null} [username] Filter by player username (case-insensitive substring match)
|
|
1258
1473
|
* @param {string | null} [ipAddress] Filter by IP address
|
|
1259
|
-
* @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE,
|
|
1474
|
+
* @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, WARNING). Repeatable.
|
|
1260
1475
|
* @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (ms)
|
|
1261
1476
|
* @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (ms)
|
|
1262
1477
|
* @param {*} [options] Override http request option.
|
|
@@ -1265,28 +1480,32 @@ export class AdminPunishmentsApi extends BaseAPI {
|
|
|
1265
1480
|
getPunishments(page, limit, uuid, username, ipAddress, type, issuedAfter, issuedBefore, options) {
|
|
1266
1481
|
return AdminPunishmentsApiFp(this.configuration).getPunishments(page, limit, uuid, username, ipAddress, type, issuedAfter, issuedBefore, options).then((request) => request(this.axios, this.basePath));
|
|
1267
1482
|
}
|
|
1483
|
+
/**
|
|
1484
|
+
* 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.
|
|
1485
|
+
* @summary Search punishment targets
|
|
1486
|
+
* @param {string} q UUID, username, or partial/full IP address to search for
|
|
1487
|
+
* @param {*} [options] Override http request option.
|
|
1488
|
+
* @throws {RequiredError}
|
|
1489
|
+
*/
|
|
1490
|
+
searchTargets(q, options) {
|
|
1491
|
+
return AdminPunishmentsApiFp(this.configuration).searchTargets(q, options).then((request) => request(this.axios, this.basePath));
|
|
1492
|
+
}
|
|
1268
1493
|
}
|
|
1269
1494
|
/**
|
|
1270
|
-
*
|
|
1495
|
+
* AuthenticationApi - axios parameter creator
|
|
1271
1496
|
*/
|
|
1272
|
-
export const
|
|
1497
|
+
export const AuthenticationApiAxiosParamCreator = function (configuration) {
|
|
1273
1498
|
return {
|
|
1274
1499
|
/**
|
|
1275
|
-
*
|
|
1276
|
-
* @summary
|
|
1277
|
-
* @param {string}
|
|
1278
|
-
* @param {
|
|
1279
|
-
* @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\'s history - Update the player\'s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\'t block the response.
|
|
1500
|
+
* Receives the authorization code from Discord after the user approves the OAuth2 prompt. Exchanges the code for an access token, verifies the user holds an admin guild role, then redirects back to the admin frontend with a signed JWT in the query string (`?token=...`). On failure, redirects with `?error=<reason>` instead.
|
|
1501
|
+
* @summary Discord - OAuth2 callback
|
|
1502
|
+
* @param {string | null} [code] Authorization code provided by Discord on successful approval
|
|
1503
|
+
* @param {string | null} [error] Error code provided by Discord if the user denied access
|
|
1280
1504
|
* @param {*} [options] Override http request option.
|
|
1281
1505
|
* @throws {RequiredError}
|
|
1282
1506
|
*/
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
assertParamExists('getConnectionDetails', 'ip', ip);
|
|
1286
|
-
// verify required parameter 'forceRecheck' is not null or undefined
|
|
1287
|
-
assertParamExists('getConnectionDetails', 'forceRecheck', forceRecheck);
|
|
1288
|
-
const localVarPath = `/v1/connection/get-connection-details/{ip}`
|
|
1289
|
-
.replace(`{${"ip"}}`, encodeURIComponent(String(ip)));
|
|
1507
|
+
callback: (code_1, error_1, ...args_1) => __awaiter(this, [code_1, error_1, ...args_1], void 0, function* (code, error, options = {}) {
|
|
1508
|
+
const localVarPath = `/auth/discord/callback`;
|
|
1290
1509
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1291
1510
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1292
1511
|
let baseOptions;
|
|
@@ -1299,13 +1518,12 @@ export const ConnectionApiAxiosParamCreator = function (configuration) {
|
|
|
1299
1518
|
// authentication DiscordAuth required
|
|
1300
1519
|
// http bearer authentication required
|
|
1301
1520
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1302
|
-
if (
|
|
1303
|
-
localVarQueryParameter['
|
|
1521
|
+
if (code !== undefined) {
|
|
1522
|
+
localVarQueryParameter['code'] = code;
|
|
1304
1523
|
}
|
|
1305
|
-
if (
|
|
1306
|
-
localVarQueryParameter['
|
|
1524
|
+
if (error !== undefined) {
|
|
1525
|
+
localVarQueryParameter['error'] = error;
|
|
1307
1526
|
}
|
|
1308
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1309
1527
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1310
1528
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1311
1529
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -1314,85 +1532,14 @@ export const ConnectionApiAxiosParamCreator = function (configuration) {
|
|
|
1314
1532
|
options: localVarRequestOptions,
|
|
1315
1533
|
};
|
|
1316
1534
|
}),
|
|
1317
|
-
};
|
|
1318
|
-
};
|
|
1319
|
-
/**
|
|
1320
|
-
* ConnectionApi - functional programming interface
|
|
1321
|
-
*/
|
|
1322
|
-
export const ConnectionApiFp = function (configuration) {
|
|
1323
|
-
const localVarAxiosParamCreator = ConnectionApiAxiosParamCreator(configuration);
|
|
1324
|
-
return {
|
|
1325
|
-
/**
|
|
1326
|
-
* Performs comprehensive analysis of an IPv4 address to detect VPN, proxy, or suspicious connections. **Features:** - Multi-provider VPN/proxy detection with aggregated confidence scoring - Approximate geolocation lookup (city and country) - Connection bypass status and expiration tracking - Optional player UUID association for connection history **Use Cases:** - Prevent VPN/proxy usage during player authentication - Track player connection history across sessions - Implement temporary bypass systems for false positives - Monitor suspicious connection patterns **Query Parameters:** - `force_recheck`: Bypass cache and re-run all detection services - `associate_uuid`: Link this IP to a player UUID and return player info **Caching:** Results are cached unless `force_recheck=true` is specified, reducing API costs and improving response times.
|
|
1327
|
-
* @summary Check Connection and Detect VPN/Proxy
|
|
1328
|
-
* @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
|
|
1329
|
-
* @param {boolean} forceRecheck When true, bypasses cached results and re-runs all VPN detection services. Use this when you need the most up-to-date analysis or suspect cached data may be stale. Default: false
|
|
1330
|
-
* @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\'s history - Update the player\'s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\'t block the response.
|
|
1331
|
-
* @param {*} [options] Override http request option.
|
|
1332
|
-
* @throws {RequiredError}
|
|
1333
|
-
*/
|
|
1334
|
-
getConnectionDetails(ip, forceRecheck, associateUuid, options) {
|
|
1335
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1336
|
-
var _a, _b, _c;
|
|
1337
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getConnectionDetails(ip, forceRecheck, associateUuid, options);
|
|
1338
|
-
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1339
|
-
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ConnectionApi.getConnectionDetails']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1340
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1341
|
-
});
|
|
1342
|
-
},
|
|
1343
|
-
};
|
|
1344
|
-
};
|
|
1345
|
-
/**
|
|
1346
|
-
* ConnectionApi - factory interface
|
|
1347
|
-
*/
|
|
1348
|
-
export const ConnectionApiFactory = function (configuration, basePath, axios) {
|
|
1349
|
-
const localVarFp = ConnectionApiFp(configuration);
|
|
1350
|
-
return {
|
|
1351
|
-
/**
|
|
1352
|
-
* Performs comprehensive analysis of an IPv4 address to detect VPN, proxy, or suspicious connections. **Features:** - Multi-provider VPN/proxy detection with aggregated confidence scoring - Approximate geolocation lookup (city and country) - Connection bypass status and expiration tracking - Optional player UUID association for connection history **Use Cases:** - Prevent VPN/proxy usage during player authentication - Track player connection history across sessions - Implement temporary bypass systems for false positives - Monitor suspicious connection patterns **Query Parameters:** - `force_recheck`: Bypass cache and re-run all detection services - `associate_uuid`: Link this IP to a player UUID and return player info **Caching:** Results are cached unless `force_recheck=true` is specified, reducing API costs and improving response times.
|
|
1353
|
-
* @summary Check Connection and Detect VPN/Proxy
|
|
1354
|
-
* @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
|
|
1355
|
-
* @param {boolean} forceRecheck When true, bypasses cached results and re-runs all VPN detection services. Use this when you need the most up-to-date analysis or suspect cached data may be stale. Default: false
|
|
1356
|
-
* @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\'s history - Update the player\'s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\'t block the response.
|
|
1357
|
-
* @param {*} [options] Override http request option.
|
|
1358
|
-
* @throws {RequiredError}
|
|
1359
|
-
*/
|
|
1360
|
-
getConnectionDetails(ip, forceRecheck, associateUuid, options) {
|
|
1361
|
-
return localVarFp.getConnectionDetails(ip, forceRecheck, associateUuid, options).then((request) => request(axios, basePath));
|
|
1362
|
-
},
|
|
1363
|
-
};
|
|
1364
|
-
};
|
|
1365
|
-
/**
|
|
1366
|
-
* ConnectionApi - object-oriented interface
|
|
1367
|
-
*/
|
|
1368
|
-
export class ConnectionApi extends BaseAPI {
|
|
1369
|
-
/**
|
|
1370
|
-
* Performs comprehensive analysis of an IPv4 address to detect VPN, proxy, or suspicious connections. **Features:** - Multi-provider VPN/proxy detection with aggregated confidence scoring - Approximate geolocation lookup (city and country) - Connection bypass status and expiration tracking - Optional player UUID association for connection history **Use Cases:** - Prevent VPN/proxy usage during player authentication - Track player connection history across sessions - Implement temporary bypass systems for false positives - Monitor suspicious connection patterns **Query Parameters:** - `force_recheck`: Bypass cache and re-run all detection services - `associate_uuid`: Link this IP to a player UUID and return player info **Caching:** Results are cached unless `force_recheck=true` is specified, reducing API costs and improving response times.
|
|
1371
|
-
* @summary Check Connection and Detect VPN/Proxy
|
|
1372
|
-
* @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
|
|
1373
|
-
* @param {boolean} forceRecheck When true, bypasses cached results and re-runs all VPN detection services. Use this when you need the most up-to-date analysis or suspect cached data may be stale. Default: false
|
|
1374
|
-
* @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\'s history - Update the player\'s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\'t block the response.
|
|
1375
|
-
* @param {*} [options] Override http request option.
|
|
1376
|
-
* @throws {RequiredError}
|
|
1377
|
-
*/
|
|
1378
|
-
getConnectionDetails(ip, forceRecheck, associateUuid, options) {
|
|
1379
|
-
return ConnectionApiFp(this.configuration).getConnectionDetails(ip, forceRecheck, associateUuid, options).then((request) => request(this.axios, this.basePath));
|
|
1380
|
-
}
|
|
1381
|
-
}
|
|
1382
|
-
/**
|
|
1383
|
-
* DefaultApi - axios parameter creator
|
|
1384
|
-
*/
|
|
1385
|
-
export const DefaultApiAxiosParamCreator = function (configuration) {
|
|
1386
|
-
return {
|
|
1387
1535
|
/**
|
|
1388
|
-
*
|
|
1389
|
-
* @
|
|
1390
|
-
* @param {string | null} [error]
|
|
1536
|
+
* Redirects the browser to Discord\'s OAuth2 authorization page. Not called directly — the admin frontend navigates to this URL to begin the login flow.
|
|
1537
|
+
* @summary Discord - Initiate login
|
|
1391
1538
|
* @param {*} [options] Override http request option.
|
|
1392
1539
|
* @throws {RequiredError}
|
|
1393
1540
|
*/
|
|
1394
|
-
|
|
1395
|
-
const localVarPath = `/auth/discord
|
|
1541
|
+
initiateLogin: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
1542
|
+
const localVarPath = `/auth/discord`;
|
|
1396
1543
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1397
1544
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1398
1545
|
let baseOptions;
|
|
@@ -1405,13 +1552,6 @@ export const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
1405
1552
|
// authentication DiscordAuth required
|
|
1406
1553
|
// http bearer authentication required
|
|
1407
1554
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1408
|
-
if (code !== undefined) {
|
|
1409
|
-
localVarQueryParameter['code'] = code;
|
|
1410
|
-
}
|
|
1411
|
-
if (error !== undefined) {
|
|
1412
|
-
localVarQueryParameter['error'] = error;
|
|
1413
|
-
}
|
|
1414
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1415
1555
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1416
1556
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1417
1557
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -1421,28 +1561,44 @@ export const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
1421
1561
|
};
|
|
1422
1562
|
}),
|
|
1423
1563
|
/**
|
|
1424
|
-
*
|
|
1564
|
+
* Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
|
|
1565
|
+
* @summary Service - Exchange client credentials for token
|
|
1566
|
+
* @param {string | null} [grantType]
|
|
1567
|
+
* @param {string | null} [clientId]
|
|
1568
|
+
* @param {string | null} [clientSecret]
|
|
1425
1569
|
* @param {*} [options] Override http request option.
|
|
1426
1570
|
* @throws {RequiredError}
|
|
1427
1571
|
*/
|
|
1428
|
-
|
|
1429
|
-
const localVarPath = `/
|
|
1572
|
+
token: (grantType_1, clientId_1, clientSecret_1, ...args_1) => __awaiter(this, [grantType_1, clientId_1, clientSecret_1, ...args_1], void 0, function* (grantType, clientId, clientSecret, options = {}) {
|
|
1573
|
+
const localVarPath = `/oauth/token`;
|
|
1430
1574
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1431
1575
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1432
1576
|
let baseOptions;
|
|
1433
1577
|
if (configuration) {
|
|
1434
1578
|
baseOptions = configuration.baseOptions;
|
|
1435
1579
|
}
|
|
1436
|
-
const localVarRequestOptions = Object.assign(Object.assign({ method: '
|
|
1580
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1437
1581
|
const localVarHeaderParameter = {};
|
|
1438
1582
|
const localVarQueryParameter = {};
|
|
1583
|
+
const localVarFormParams = new URLSearchParams();
|
|
1439
1584
|
// authentication DiscordAuth required
|
|
1440
1585
|
// http bearer authentication required
|
|
1441
1586
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1587
|
+
if (grantType !== undefined) {
|
|
1588
|
+
localVarFormParams.set('grant_type', grantType);
|
|
1589
|
+
}
|
|
1590
|
+
if (clientId !== undefined) {
|
|
1591
|
+
localVarFormParams.set('client_id', clientId);
|
|
1592
|
+
}
|
|
1593
|
+
if (clientSecret !== undefined) {
|
|
1594
|
+
localVarFormParams.set('client_secret', clientSecret);
|
|
1595
|
+
}
|
|
1596
|
+
localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
1442
1597
|
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1443
1598
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1444
1599
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1445
1600
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1601
|
+
localVarRequestOptions.data = localVarFormParams.toString();
|
|
1446
1602
|
return {
|
|
1447
1603
|
url: toPathString(localVarUrlObj),
|
|
1448
1604
|
options: localVarRequestOptions,
|
|
@@ -1451,15 +1607,16 @@ export const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
1451
1607
|
};
|
|
1452
1608
|
};
|
|
1453
1609
|
/**
|
|
1454
|
-
*
|
|
1610
|
+
* AuthenticationApi - functional programming interface
|
|
1455
1611
|
*/
|
|
1456
|
-
export const
|
|
1457
|
-
const localVarAxiosParamCreator =
|
|
1612
|
+
export const AuthenticationApiFp = function (configuration) {
|
|
1613
|
+
const localVarAxiosParamCreator = AuthenticationApiAxiosParamCreator(configuration);
|
|
1458
1614
|
return {
|
|
1459
1615
|
/**
|
|
1460
|
-
*
|
|
1461
|
-
* @
|
|
1462
|
-
* @param {string | null} [
|
|
1616
|
+
* Receives the authorization code from Discord after the user approves the OAuth2 prompt. Exchanges the code for an access token, verifies the user holds an admin guild role, then redirects back to the admin frontend with a signed JWT in the query string (`?token=...`). On failure, redirects with `?error=<reason>` instead.
|
|
1617
|
+
* @summary Discord - OAuth2 callback
|
|
1618
|
+
* @param {string | null} [code] Authorization code provided by Discord on successful approval
|
|
1619
|
+
* @param {string | null} [error] Error code provided by Discord if the user denied access
|
|
1463
1620
|
* @param {*} [options] Override http request option.
|
|
1464
1621
|
* @throws {RequiredError}
|
|
1465
1622
|
*/
|
|
@@ -1468,12 +1625,13 @@ export const DefaultApiFp = function (configuration) {
|
|
|
1468
1625
|
var _a, _b, _c;
|
|
1469
1626
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.callback(code, error, options);
|
|
1470
1627
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1471
|
-
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['
|
|
1628
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AuthenticationApi.callback']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1472
1629
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1473
1630
|
});
|
|
1474
1631
|
},
|
|
1475
1632
|
/**
|
|
1476
|
-
*
|
|
1633
|
+
* Redirects the browser to Discord\'s OAuth2 authorization page. Not called directly — the admin frontend navigates to this URL to begin the login flow.
|
|
1634
|
+
* @summary Discord - Initiate login
|
|
1477
1635
|
* @param {*} [options] Override http request option.
|
|
1478
1636
|
* @throws {RequiredError}
|
|
1479
1637
|
*/
|
|
@@ -1482,22 +1640,41 @@ export const DefaultApiFp = function (configuration) {
|
|
|
1482
1640
|
var _a, _b, _c;
|
|
1483
1641
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.initiateLogin(options);
|
|
1484
1642
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1485
|
-
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['
|
|
1643
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AuthenticationApi.initiateLogin']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1486
1644
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1487
1645
|
});
|
|
1488
1646
|
},
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1647
|
+
/**
|
|
1648
|
+
* Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
|
|
1649
|
+
* @summary Service - Exchange client credentials for token
|
|
1650
|
+
* @param {string | null} [grantType]
|
|
1651
|
+
* @param {string | null} [clientId]
|
|
1652
|
+
* @param {string | null} [clientSecret]
|
|
1653
|
+
* @param {*} [options] Override http request option.
|
|
1654
|
+
* @throws {RequiredError}
|
|
1655
|
+
*/
|
|
1656
|
+
token(grantType, clientId, clientSecret, options) {
|
|
1657
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1658
|
+
var _a, _b, _c;
|
|
1659
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.token(grantType, clientId, clientSecret, options);
|
|
1660
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1661
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AuthenticationApi.token']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1662
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1663
|
+
});
|
|
1664
|
+
},
|
|
1665
|
+
};
|
|
1666
|
+
};
|
|
1667
|
+
/**
|
|
1668
|
+
* AuthenticationApi - factory interface
|
|
1669
|
+
*/
|
|
1670
|
+
export const AuthenticationApiFactory = function (configuration, basePath, axios) {
|
|
1671
|
+
const localVarFp = AuthenticationApiFp(configuration);
|
|
1496
1672
|
return {
|
|
1497
1673
|
/**
|
|
1498
|
-
*
|
|
1499
|
-
* @
|
|
1500
|
-
* @param {string | null} [
|
|
1674
|
+
* Receives the authorization code from Discord after the user approves the OAuth2 prompt. Exchanges the code for an access token, verifies the user holds an admin guild role, then redirects back to the admin frontend with a signed JWT in the query string (`?token=...`). On failure, redirects with `?error=<reason>` instead.
|
|
1675
|
+
* @summary Discord - OAuth2 callback
|
|
1676
|
+
* @param {string | null} [code] Authorization code provided by Discord on successful approval
|
|
1677
|
+
* @param {string | null} [error] Error code provided by Discord if the user denied access
|
|
1501
1678
|
* @param {*} [options] Override http request option.
|
|
1502
1679
|
* @throws {RequiredError}
|
|
1503
1680
|
*/
|
|
@@ -1505,55 +1682,83 @@ export const DefaultApiFactory = function (configuration, basePath, axios) {
|
|
|
1505
1682
|
return localVarFp.callback(code, error, options).then((request) => request(axios, basePath));
|
|
1506
1683
|
},
|
|
1507
1684
|
/**
|
|
1508
|
-
*
|
|
1685
|
+
* Redirects the browser to Discord\'s OAuth2 authorization page. Not called directly — the admin frontend navigates to this URL to begin the login flow.
|
|
1686
|
+
* @summary Discord - Initiate login
|
|
1509
1687
|
* @param {*} [options] Override http request option.
|
|
1510
1688
|
* @throws {RequiredError}
|
|
1511
1689
|
*/
|
|
1512
1690
|
initiateLogin(options) {
|
|
1513
1691
|
return localVarFp.initiateLogin(options).then((request) => request(axios, basePath));
|
|
1514
1692
|
},
|
|
1693
|
+
/**
|
|
1694
|
+
* Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
|
|
1695
|
+
* @summary Service - Exchange client credentials for token
|
|
1696
|
+
* @param {string | null} [grantType]
|
|
1697
|
+
* @param {string | null} [clientId]
|
|
1698
|
+
* @param {string | null} [clientSecret]
|
|
1699
|
+
* @param {*} [options] Override http request option.
|
|
1700
|
+
* @throws {RequiredError}
|
|
1701
|
+
*/
|
|
1702
|
+
token(grantType, clientId, clientSecret, options) {
|
|
1703
|
+
return localVarFp.token(grantType, clientId, clientSecret, options).then((request) => request(axios, basePath));
|
|
1704
|
+
},
|
|
1515
1705
|
};
|
|
1516
1706
|
};
|
|
1517
1707
|
/**
|
|
1518
|
-
*
|
|
1708
|
+
* AuthenticationApi - object-oriented interface
|
|
1519
1709
|
*/
|
|
1520
|
-
export class
|
|
1710
|
+
export class AuthenticationApi extends BaseAPI {
|
|
1521
1711
|
/**
|
|
1522
|
-
*
|
|
1523
|
-
* @
|
|
1524
|
-
* @param {string | null} [
|
|
1712
|
+
* Receives the authorization code from Discord after the user approves the OAuth2 prompt. Exchanges the code for an access token, verifies the user holds an admin guild role, then redirects back to the admin frontend with a signed JWT in the query string (`?token=...`). On failure, redirects with `?error=<reason>` instead.
|
|
1713
|
+
* @summary Discord - OAuth2 callback
|
|
1714
|
+
* @param {string | null} [code] Authorization code provided by Discord on successful approval
|
|
1715
|
+
* @param {string | null} [error] Error code provided by Discord if the user denied access
|
|
1525
1716
|
* @param {*} [options] Override http request option.
|
|
1526
1717
|
* @throws {RequiredError}
|
|
1527
1718
|
*/
|
|
1528
1719
|
callback(code, error, options) {
|
|
1529
|
-
return
|
|
1720
|
+
return AuthenticationApiFp(this.configuration).callback(code, error, options).then((request) => request(this.axios, this.basePath));
|
|
1530
1721
|
}
|
|
1531
1722
|
/**
|
|
1532
|
-
*
|
|
1723
|
+
* Redirects the browser to Discord\'s OAuth2 authorization page. Not called directly — the admin frontend navigates to this URL to begin the login flow.
|
|
1724
|
+
* @summary Discord - Initiate login
|
|
1533
1725
|
* @param {*} [options] Override http request option.
|
|
1534
1726
|
* @throws {RequiredError}
|
|
1535
1727
|
*/
|
|
1536
1728
|
initiateLogin(options) {
|
|
1537
|
-
return
|
|
1729
|
+
return AuthenticationApiFp(this.configuration).initiateLogin(options).then((request) => request(this.axios, this.basePath));
|
|
1730
|
+
}
|
|
1731
|
+
/**
|
|
1732
|
+
* Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
|
|
1733
|
+
* @summary Service - Exchange client credentials for token
|
|
1734
|
+
* @param {string | null} [grantType]
|
|
1735
|
+
* @param {string | null} [clientId]
|
|
1736
|
+
* @param {string | null} [clientSecret]
|
|
1737
|
+
* @param {*} [options] Override http request option.
|
|
1738
|
+
* @throws {RequiredError}
|
|
1739
|
+
*/
|
|
1740
|
+
token(grantType, clientId, clientSecret, options) {
|
|
1741
|
+
return AuthenticationApiFp(this.configuration).token(grantType, clientId, clientSecret, options).then((request) => request(this.axios, this.basePath));
|
|
1538
1742
|
}
|
|
1539
1743
|
}
|
|
1540
1744
|
/**
|
|
1541
|
-
*
|
|
1745
|
+
* ChatApi - axios parameter creator
|
|
1542
1746
|
*/
|
|
1543
|
-
export const
|
|
1747
|
+
export const ChatApiAxiosParamCreator = function (configuration) {
|
|
1544
1748
|
return {
|
|
1545
1749
|
/**
|
|
1546
|
-
*
|
|
1547
|
-
* @summary Get
|
|
1548
|
-
* @param {
|
|
1750
|
+
* Returns up to `limit` chat messages before the given `before` timestamp (keyset pagination). Results are returned in ascending chronological order. Omit `before` to start from the current time. Scroll back through history by passing the `sentAt` of the oldest message received as the next `before` value.
|
|
1751
|
+
* @summary Get chat history
|
|
1752
|
+
* @param {number} limit Maximum number of messages to return (1–100)
|
|
1753
|
+
* @param {string | null} [sessionId] Filter to a specific server session. Omit for global history.
|
|
1754
|
+
* @param {string | null} [before] ISO-8601 timestamp cursor — return messages sent before this time. Omit to start from now.
|
|
1549
1755
|
* @param {*} [options] Override http request option.
|
|
1550
1756
|
* @throws {RequiredError}
|
|
1551
1757
|
*/
|
|
1552
|
-
|
|
1553
|
-
// verify required parameter '
|
|
1554
|
-
assertParamExists('
|
|
1555
|
-
const localVarPath = `/v1/
|
|
1556
|
-
.replace(`{${"uuid"}}`, encodeURIComponent(String(uuid)));
|
|
1758
|
+
history: (limit_1, sessionId_1, before_1, ...args_1) => __awaiter(this, [limit_1, sessionId_1, before_1, ...args_1], void 0, function* (limit, sessionId, before, options = {}) {
|
|
1759
|
+
// verify required parameter 'limit' is not null or undefined
|
|
1760
|
+
assertParamExists('history', 'limit', limit);
|
|
1761
|
+
const localVarPath = `/v1/chat`;
|
|
1557
1762
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1558
1763
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1559
1764
|
let baseOptions;
|
|
@@ -1566,10 +1771,53 @@ export const PlayerApiAxiosParamCreator = function (configuration) {
|
|
|
1566
1771
|
// authentication DiscordAuth required
|
|
1567
1772
|
// http bearer authentication required
|
|
1568
1773
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1774
|
+
if (sessionId !== undefined) {
|
|
1775
|
+
localVarQueryParameter['sessionId'] = sessionId;
|
|
1776
|
+
}
|
|
1777
|
+
if (before !== undefined) {
|
|
1778
|
+
localVarQueryParameter['before'] = before;
|
|
1779
|
+
}
|
|
1780
|
+
if (limit !== undefined) {
|
|
1781
|
+
localVarQueryParameter['limit'] = limit;
|
|
1782
|
+
}
|
|
1783
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1784
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1785
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1786
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1787
|
+
return {
|
|
1788
|
+
url: toPathString(localVarUrlObj),
|
|
1789
|
+
options: localVarRequestOptions,
|
|
1790
|
+
};
|
|
1791
|
+
}),
|
|
1792
|
+
/**
|
|
1793
|
+
* Stores a chat message from a game server and fans it out to all connected WebSocket clients via PostgreSQL LISTEN/NOTIFY. The session must be currently online. Only the player UUID is stored — usernames are resolved on the web UI from the player database cache.
|
|
1794
|
+
* @summary Ingest a chat message
|
|
1795
|
+
* @param {ChatMessageRequest} chatMessageRequest
|
|
1796
|
+
* @param {*} [options] Override http request option.
|
|
1797
|
+
* @throws {RequiredError}
|
|
1798
|
+
*/
|
|
1799
|
+
ingest: (chatMessageRequest_1, ...args_1) => __awaiter(this, [chatMessageRequest_1, ...args_1], void 0, function* (chatMessageRequest, options = {}) {
|
|
1800
|
+
// verify required parameter 'chatMessageRequest' is not null or undefined
|
|
1801
|
+
assertParamExists('ingest', 'chatMessageRequest', chatMessageRequest);
|
|
1802
|
+
const localVarPath = `/v1/chat`;
|
|
1803
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1804
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1805
|
+
let baseOptions;
|
|
1806
|
+
if (configuration) {
|
|
1807
|
+
baseOptions = configuration.baseOptions;
|
|
1808
|
+
}
|
|
1809
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1810
|
+
const localVarHeaderParameter = {};
|
|
1811
|
+
const localVarQueryParameter = {};
|
|
1812
|
+
// authentication DiscordAuth required
|
|
1813
|
+
// http bearer authentication required
|
|
1814
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1815
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1569
1816
|
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1570
1817
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1571
1818
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1572
1819
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1820
|
+
localVarRequestOptions.data = serializeDataIfNeeded(chatMessageRequest, localVarRequestOptions, configuration);
|
|
1573
1821
|
return {
|
|
1574
1822
|
url: toPathString(localVarUrlObj),
|
|
1575
1823
|
options: localVarRequestOptions,
|
|
@@ -1578,143 +1826,810 @@ export const PlayerApiAxiosParamCreator = function (configuration) {
|
|
|
1578
1826
|
};
|
|
1579
1827
|
};
|
|
1580
1828
|
/**
|
|
1581
|
-
*
|
|
1829
|
+
* ChatApi - functional programming interface
|
|
1582
1830
|
*/
|
|
1583
|
-
export const
|
|
1584
|
-
const localVarAxiosParamCreator =
|
|
1831
|
+
export const ChatApiFp = function (configuration) {
|
|
1832
|
+
const localVarAxiosParamCreator = ChatApiAxiosParamCreator(configuration);
|
|
1585
1833
|
return {
|
|
1586
1834
|
/**
|
|
1587
|
-
*
|
|
1588
|
-
* @summary Get
|
|
1589
|
-
* @param {
|
|
1835
|
+
* Returns up to `limit` chat messages before the given `before` timestamp (keyset pagination). Results are returned in ascending chronological order. Omit `before` to start from the current time. Scroll back through history by passing the `sentAt` of the oldest message received as the next `before` value.
|
|
1836
|
+
* @summary Get chat history
|
|
1837
|
+
* @param {number} limit Maximum number of messages to return (1–100)
|
|
1838
|
+
* @param {string | null} [sessionId] Filter to a specific server session. Omit for global history.
|
|
1839
|
+
* @param {string | null} [before] ISO-8601 timestamp cursor — return messages sent before this time. Omit to start from now.
|
|
1590
1840
|
* @param {*} [options] Override http request option.
|
|
1591
1841
|
* @throws {RequiredError}
|
|
1592
1842
|
*/
|
|
1593
|
-
|
|
1843
|
+
history(limit, sessionId, before, options) {
|
|
1594
1844
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1595
1845
|
var _a, _b, _c;
|
|
1596
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
1846
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.history(limit, sessionId, before, options);
|
|
1597
1847
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1598
|
-
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['
|
|
1848
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ChatApi.history']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1849
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1850
|
+
});
|
|
1851
|
+
},
|
|
1852
|
+
/**
|
|
1853
|
+
* Stores a chat message from a game server and fans it out to all connected WebSocket clients via PostgreSQL LISTEN/NOTIFY. The session must be currently online. Only the player UUID is stored — usernames are resolved on the web UI from the player database cache.
|
|
1854
|
+
* @summary Ingest a chat message
|
|
1855
|
+
* @param {ChatMessageRequest} chatMessageRequest
|
|
1856
|
+
* @param {*} [options] Override http request option.
|
|
1857
|
+
* @throws {RequiredError}
|
|
1858
|
+
*/
|
|
1859
|
+
ingest(chatMessageRequest, options) {
|
|
1860
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1861
|
+
var _a, _b, _c;
|
|
1862
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.ingest(chatMessageRequest, options);
|
|
1863
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1864
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ChatApi.ingest']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1599
1865
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1600
1866
|
});
|
|
1601
1867
|
},
|
|
1602
1868
|
};
|
|
1603
1869
|
};
|
|
1604
1870
|
/**
|
|
1605
|
-
*
|
|
1871
|
+
* ChatApi - factory interface
|
|
1606
1872
|
*/
|
|
1607
|
-
export const
|
|
1608
|
-
const localVarFp =
|
|
1873
|
+
export const ChatApiFactory = function (configuration, basePath, axios) {
|
|
1874
|
+
const localVarFp = ChatApiFp(configuration);
|
|
1609
1875
|
return {
|
|
1610
1876
|
/**
|
|
1611
|
-
*
|
|
1612
|
-
* @summary Get
|
|
1613
|
-
* @param {
|
|
1877
|
+
* Returns up to `limit` chat messages before the given `before` timestamp (keyset pagination). Results are returned in ascending chronological order. Omit `before` to start from the current time. Scroll back through history by passing the `sentAt` of the oldest message received as the next `before` value.
|
|
1878
|
+
* @summary Get chat history
|
|
1879
|
+
* @param {number} limit Maximum number of messages to return (1–100)
|
|
1880
|
+
* @param {string | null} [sessionId] Filter to a specific server session. Omit for global history.
|
|
1881
|
+
* @param {string | null} [before] ISO-8601 timestamp cursor — return messages sent before this time. Omit to start from now.
|
|
1614
1882
|
* @param {*} [options] Override http request option.
|
|
1615
1883
|
* @throws {RequiredError}
|
|
1616
1884
|
*/
|
|
1617
|
-
|
|
1618
|
-
return localVarFp.
|
|
1885
|
+
history(limit, sessionId, before, options) {
|
|
1886
|
+
return localVarFp.history(limit, sessionId, before, options).then((request) => request(axios, basePath));
|
|
1887
|
+
},
|
|
1888
|
+
/**
|
|
1889
|
+
* Stores a chat message from a game server and fans it out to all connected WebSocket clients via PostgreSQL LISTEN/NOTIFY. The session must be currently online. Only the player UUID is stored — usernames are resolved on the web UI from the player database cache.
|
|
1890
|
+
* @summary Ingest a chat message
|
|
1891
|
+
* @param {ChatMessageRequest} chatMessageRequest
|
|
1892
|
+
* @param {*} [options] Override http request option.
|
|
1893
|
+
* @throws {RequiredError}
|
|
1894
|
+
*/
|
|
1895
|
+
ingest(chatMessageRequest, options) {
|
|
1896
|
+
return localVarFp.ingest(chatMessageRequest, options).then((request) => request(axios, basePath));
|
|
1619
1897
|
},
|
|
1620
1898
|
};
|
|
1621
1899
|
};
|
|
1622
1900
|
/**
|
|
1623
|
-
*
|
|
1901
|
+
* ChatApi - object-oriented interface
|
|
1624
1902
|
*/
|
|
1625
|
-
export class
|
|
1903
|
+
export class ChatApi extends BaseAPI {
|
|
1626
1904
|
/**
|
|
1627
|
-
*
|
|
1628
|
-
* @summary Get
|
|
1629
|
-
* @param {
|
|
1905
|
+
* Returns up to `limit` chat messages before the given `before` timestamp (keyset pagination). Results are returned in ascending chronological order. Omit `before` to start from the current time. Scroll back through history by passing the `sentAt` of the oldest message received as the next `before` value.
|
|
1906
|
+
* @summary Get chat history
|
|
1907
|
+
* @param {number} limit Maximum number of messages to return (1–100)
|
|
1908
|
+
* @param {string | null} [sessionId] Filter to a specific server session. Omit for global history.
|
|
1909
|
+
* @param {string | null} [before] ISO-8601 timestamp cursor — return messages sent before this time. Omit to start from now.
|
|
1910
|
+
* @param {*} [options] Override http request option.
|
|
1911
|
+
* @throws {RequiredError}
|
|
1912
|
+
*/
|
|
1913
|
+
history(limit, sessionId, before, options) {
|
|
1914
|
+
return ChatApiFp(this.configuration).history(limit, sessionId, before, options).then((request) => request(this.axios, this.basePath));
|
|
1915
|
+
}
|
|
1916
|
+
/**
|
|
1917
|
+
* Stores a chat message from a game server and fans it out to all connected WebSocket clients via PostgreSQL LISTEN/NOTIFY. The session must be currently online. Only the player UUID is stored — usernames are resolved on the web UI from the player database cache.
|
|
1918
|
+
* @summary Ingest a chat message
|
|
1919
|
+
* @param {ChatMessageRequest} chatMessageRequest
|
|
1920
|
+
* @param {*} [options] Override http request option.
|
|
1921
|
+
* @throws {RequiredError}
|
|
1922
|
+
*/
|
|
1923
|
+
ingest(chatMessageRequest, options) {
|
|
1924
|
+
return ChatApiFp(this.configuration).ingest(chatMessageRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1925
|
+
}
|
|
1926
|
+
}
|
|
1927
|
+
/**
|
|
1928
|
+
* ConnectionApi - axios parameter creator
|
|
1929
|
+
*/
|
|
1930
|
+
export const ConnectionApiAxiosParamCreator = function (configuration) {
|
|
1931
|
+
return {
|
|
1932
|
+
/**
|
|
1933
|
+
* Performs comprehensive analysis of an IPv4 address to detect VPN, proxy, or suspicious connections. **Features:** - Multi-provider VPN/proxy detection with aggregated confidence scoring - Approximate geolocation lookup (city and country) - Connection bypass status and expiration tracking - Optional player UUID association for connection history **Use Cases:** - Prevent VPN/proxy usage during player authentication - Track player connection history across sessions - Implement temporary bypass systems for false positives - Monitor suspicious connection patterns **Query Parameters:** - `force_recheck`: Bypass cache and re-run all detection services - `associate_uuid`: Link this IP to a player UUID and return player info **Caching:** Results are cached unless `force_recheck=true` is specified, reducing API costs and improving response times.
|
|
1934
|
+
* @summary Check Connection and Detect VPN/Proxy
|
|
1935
|
+
* @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
|
|
1936
|
+
* @param {boolean} forceRecheck When true, bypasses cached results and re-runs all VPN detection services. Use this when you need the most up-to-date analysis or suspect cached data may be stale. Default: false
|
|
1937
|
+
* @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\'s history - Update the player\'s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\'t block the response.
|
|
1938
|
+
* @param {*} [options] Override http request option.
|
|
1939
|
+
* @throws {RequiredError}
|
|
1940
|
+
*/
|
|
1941
|
+
getConnectionDetails: (ip_1, forceRecheck_1, associateUuid_1, ...args_1) => __awaiter(this, [ip_1, forceRecheck_1, associateUuid_1, ...args_1], void 0, function* (ip, forceRecheck, associateUuid, options = {}) {
|
|
1942
|
+
// verify required parameter 'ip' is not null or undefined
|
|
1943
|
+
assertParamExists('getConnectionDetails', 'ip', ip);
|
|
1944
|
+
// verify required parameter 'forceRecheck' is not null or undefined
|
|
1945
|
+
assertParamExists('getConnectionDetails', 'forceRecheck', forceRecheck);
|
|
1946
|
+
const localVarPath = `/v1/connection/get-connection-details/{ip}`
|
|
1947
|
+
.replace(`{${"ip"}}`, encodeURIComponent(String(ip)));
|
|
1948
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1949
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1950
|
+
let baseOptions;
|
|
1951
|
+
if (configuration) {
|
|
1952
|
+
baseOptions = configuration.baseOptions;
|
|
1953
|
+
}
|
|
1954
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1955
|
+
const localVarHeaderParameter = {};
|
|
1956
|
+
const localVarQueryParameter = {};
|
|
1957
|
+
// authentication DiscordAuth required
|
|
1958
|
+
// http bearer authentication required
|
|
1959
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1960
|
+
if (forceRecheck !== undefined) {
|
|
1961
|
+
localVarQueryParameter['force_recheck'] = forceRecheck;
|
|
1962
|
+
}
|
|
1963
|
+
if (associateUuid !== undefined) {
|
|
1964
|
+
localVarQueryParameter['associate_uuid'] = associateUuid;
|
|
1965
|
+
}
|
|
1966
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1967
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1968
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1969
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1970
|
+
return {
|
|
1971
|
+
url: toPathString(localVarUrlObj),
|
|
1972
|
+
options: localVarRequestOptions,
|
|
1973
|
+
};
|
|
1974
|
+
}),
|
|
1975
|
+
};
|
|
1976
|
+
};
|
|
1977
|
+
/**
|
|
1978
|
+
* ConnectionApi - functional programming interface
|
|
1979
|
+
*/
|
|
1980
|
+
export const ConnectionApiFp = function (configuration) {
|
|
1981
|
+
const localVarAxiosParamCreator = ConnectionApiAxiosParamCreator(configuration);
|
|
1982
|
+
return {
|
|
1983
|
+
/**
|
|
1984
|
+
* Performs comprehensive analysis of an IPv4 address to detect VPN, proxy, or suspicious connections. **Features:** - Multi-provider VPN/proxy detection with aggregated confidence scoring - Approximate geolocation lookup (city and country) - Connection bypass status and expiration tracking - Optional player UUID association for connection history **Use Cases:** - Prevent VPN/proxy usage during player authentication - Track player connection history across sessions - Implement temporary bypass systems for false positives - Monitor suspicious connection patterns **Query Parameters:** - `force_recheck`: Bypass cache and re-run all detection services - `associate_uuid`: Link this IP to a player UUID and return player info **Caching:** Results are cached unless `force_recheck=true` is specified, reducing API costs and improving response times.
|
|
1985
|
+
* @summary Check Connection and Detect VPN/Proxy
|
|
1986
|
+
* @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
|
|
1987
|
+
* @param {boolean} forceRecheck When true, bypasses cached results and re-runs all VPN detection services. Use this when you need the most up-to-date analysis or suspect cached data may be stale. Default: false
|
|
1988
|
+
* @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\'s history - Update the player\'s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\'t block the response.
|
|
1989
|
+
* @param {*} [options] Override http request option.
|
|
1990
|
+
* @throws {RequiredError}
|
|
1991
|
+
*/
|
|
1992
|
+
getConnectionDetails(ip, forceRecheck, associateUuid, options) {
|
|
1993
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1994
|
+
var _a, _b, _c;
|
|
1995
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getConnectionDetails(ip, forceRecheck, associateUuid, options);
|
|
1996
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1997
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ConnectionApi.getConnectionDetails']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1998
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1999
|
+
});
|
|
2000
|
+
},
|
|
2001
|
+
};
|
|
2002
|
+
};
|
|
2003
|
+
/**
|
|
2004
|
+
* ConnectionApi - factory interface
|
|
2005
|
+
*/
|
|
2006
|
+
export const ConnectionApiFactory = function (configuration, basePath, axios) {
|
|
2007
|
+
const localVarFp = ConnectionApiFp(configuration);
|
|
2008
|
+
return {
|
|
2009
|
+
/**
|
|
2010
|
+
* Performs comprehensive analysis of an IPv4 address to detect VPN, proxy, or suspicious connections. **Features:** - Multi-provider VPN/proxy detection with aggregated confidence scoring - Approximate geolocation lookup (city and country) - Connection bypass status and expiration tracking - Optional player UUID association for connection history **Use Cases:** - Prevent VPN/proxy usage during player authentication - Track player connection history across sessions - Implement temporary bypass systems for false positives - Monitor suspicious connection patterns **Query Parameters:** - `force_recheck`: Bypass cache and re-run all detection services - `associate_uuid`: Link this IP to a player UUID and return player info **Caching:** Results are cached unless `force_recheck=true` is specified, reducing API costs and improving response times.
|
|
2011
|
+
* @summary Check Connection and Detect VPN/Proxy
|
|
2012
|
+
* @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
|
|
2013
|
+
* @param {boolean} forceRecheck When true, bypasses cached results and re-runs all VPN detection services. Use this when you need the most up-to-date analysis or suspect cached data may be stale. Default: false
|
|
2014
|
+
* @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\'s history - Update the player\'s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\'t block the response.
|
|
2015
|
+
* @param {*} [options] Override http request option.
|
|
2016
|
+
* @throws {RequiredError}
|
|
2017
|
+
*/
|
|
2018
|
+
getConnectionDetails(ip, forceRecheck, associateUuid, options) {
|
|
2019
|
+
return localVarFp.getConnectionDetails(ip, forceRecheck, associateUuid, options).then((request) => request(axios, basePath));
|
|
2020
|
+
},
|
|
2021
|
+
};
|
|
2022
|
+
};
|
|
2023
|
+
/**
|
|
2024
|
+
* ConnectionApi - object-oriented interface
|
|
2025
|
+
*/
|
|
2026
|
+
export class ConnectionApi extends BaseAPI {
|
|
2027
|
+
/**
|
|
2028
|
+
* Performs comprehensive analysis of an IPv4 address to detect VPN, proxy, or suspicious connections. **Features:** - Multi-provider VPN/proxy detection with aggregated confidence scoring - Approximate geolocation lookup (city and country) - Connection bypass status and expiration tracking - Optional player UUID association for connection history **Use Cases:** - Prevent VPN/proxy usage during player authentication - Track player connection history across sessions - Implement temporary bypass systems for false positives - Monitor suspicious connection patterns **Query Parameters:** - `force_recheck`: Bypass cache and re-run all detection services - `associate_uuid`: Link this IP to a player UUID and return player info **Caching:** Results are cached unless `force_recheck=true` is specified, reducing API costs and improving response times.
|
|
2029
|
+
* @summary Check Connection and Detect VPN/Proxy
|
|
2030
|
+
* @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
|
|
2031
|
+
* @param {boolean} forceRecheck When true, bypasses cached results and re-runs all VPN detection services. Use this when you need the most up-to-date analysis or suspect cached data may be stale. Default: false
|
|
2032
|
+
* @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\'s history - Update the player\'s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\'t block the response.
|
|
2033
|
+
* @param {*} [options] Override http request option.
|
|
2034
|
+
* @throws {RequiredError}
|
|
2035
|
+
*/
|
|
2036
|
+
getConnectionDetails(ip, forceRecheck, associateUuid, options) {
|
|
2037
|
+
return ConnectionApiFp(this.configuration).getConnectionDetails(ip, forceRecheck, associateUuid, options).then((request) => request(this.axios, this.basePath));
|
|
2038
|
+
}
|
|
2039
|
+
}
|
|
2040
|
+
/**
|
|
2041
|
+
* PlayerApi - axios parameter creator
|
|
2042
|
+
*/
|
|
2043
|
+
export const PlayerApiAxiosParamCreator = function (configuration) {
|
|
2044
|
+
return {
|
|
2045
|
+
/**
|
|
2046
|
+
* 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.
|
|
2047
|
+
* @summary Get player information
|
|
2048
|
+
* @param {string} uuid The Minecraft player UUID (with or without dashes)
|
|
2049
|
+
* @param {*} [options] Override http request option.
|
|
2050
|
+
* @throws {RequiredError}
|
|
2051
|
+
*/
|
|
2052
|
+
getPlayer1: (uuid_1, ...args_1) => __awaiter(this, [uuid_1, ...args_1], void 0, function* (uuid, options = {}) {
|
|
2053
|
+
// verify required parameter 'uuid' is not null or undefined
|
|
2054
|
+
assertParamExists('getPlayer1', 'uuid', uuid);
|
|
2055
|
+
const localVarPath = `/v1/player/{uuid}`
|
|
2056
|
+
.replace(`{${"uuid"}}`, encodeURIComponent(String(uuid)));
|
|
2057
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2058
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2059
|
+
let baseOptions;
|
|
2060
|
+
if (configuration) {
|
|
2061
|
+
baseOptions = configuration.baseOptions;
|
|
2062
|
+
}
|
|
2063
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2064
|
+
const localVarHeaderParameter = {};
|
|
2065
|
+
const localVarQueryParameter = {};
|
|
2066
|
+
// authentication DiscordAuth required
|
|
2067
|
+
// http bearer authentication required
|
|
2068
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
2069
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
2070
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2071
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2072
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2073
|
+
return {
|
|
2074
|
+
url: toPathString(localVarUrlObj),
|
|
2075
|
+
options: localVarRequestOptions,
|
|
2076
|
+
};
|
|
2077
|
+
}),
|
|
2078
|
+
/**
|
|
2079
|
+
* Accepts a list of player UUIDs and returns a map of `uuid → username` for those that have a recorded username. UUIDs with no username record (e.g. players who have never joined) are omitted from the response. Used by the web UI to display player names in the chat log.
|
|
2080
|
+
* @summary Batch resolve UUIDs to usernames
|
|
2081
|
+
* @param {Array<string>} uuids List of player UUIDs to resolve (repeatable query param)
|
|
2082
|
+
* @param {*} [options] Override http request option.
|
|
2083
|
+
* @throws {RequiredError}
|
|
2084
|
+
*/
|
|
2085
|
+
getUsernames: (uuids_1, ...args_1) => __awaiter(this, [uuids_1, ...args_1], void 0, function* (uuids, options = {}) {
|
|
2086
|
+
// verify required parameter 'uuids' is not null or undefined
|
|
2087
|
+
assertParamExists('getUsernames', 'uuids', uuids);
|
|
2088
|
+
const localVarPath = `/v1/player/usernames`;
|
|
2089
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2090
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2091
|
+
let baseOptions;
|
|
2092
|
+
if (configuration) {
|
|
2093
|
+
baseOptions = configuration.baseOptions;
|
|
2094
|
+
}
|
|
2095
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2096
|
+
const localVarHeaderParameter = {};
|
|
2097
|
+
const localVarQueryParameter = {};
|
|
2098
|
+
// authentication DiscordAuth required
|
|
2099
|
+
// http bearer authentication required
|
|
2100
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
2101
|
+
if (uuids) {
|
|
2102
|
+
localVarQueryParameter['uuids'] = uuids.join(COLLECTION_FORMATS.csv);
|
|
2103
|
+
}
|
|
2104
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
2105
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2106
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2107
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2108
|
+
return {
|
|
2109
|
+
url: toPathString(localVarUrlObj),
|
|
2110
|
+
options: localVarRequestOptions,
|
|
2111
|
+
};
|
|
2112
|
+
}),
|
|
2113
|
+
};
|
|
2114
|
+
};
|
|
2115
|
+
/**
|
|
2116
|
+
* PlayerApi - functional programming interface
|
|
2117
|
+
*/
|
|
2118
|
+
export const PlayerApiFp = function (configuration) {
|
|
2119
|
+
const localVarAxiosParamCreator = PlayerApiAxiosParamCreator(configuration);
|
|
2120
|
+
return {
|
|
2121
|
+
/**
|
|
2122
|
+
* 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.
|
|
2123
|
+
* @summary Get player information
|
|
2124
|
+
* @param {string} uuid The Minecraft player UUID (with or without dashes)
|
|
2125
|
+
* @param {*} [options] Override http request option.
|
|
2126
|
+
* @throws {RequiredError}
|
|
2127
|
+
*/
|
|
2128
|
+
getPlayer1(uuid, options) {
|
|
2129
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2130
|
+
var _a, _b, _c;
|
|
2131
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getPlayer1(uuid, options);
|
|
2132
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2133
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PlayerApi.getPlayer1']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2134
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2135
|
+
});
|
|
2136
|
+
},
|
|
2137
|
+
/**
|
|
2138
|
+
* Accepts a list of player UUIDs and returns a map of `uuid → username` for those that have a recorded username. UUIDs with no username record (e.g. players who have never joined) are omitted from the response. Used by the web UI to display player names in the chat log.
|
|
2139
|
+
* @summary Batch resolve UUIDs to usernames
|
|
2140
|
+
* @param {Array<string>} uuids List of player UUIDs to resolve (repeatable query param)
|
|
2141
|
+
* @param {*} [options] Override http request option.
|
|
2142
|
+
* @throws {RequiredError}
|
|
2143
|
+
*/
|
|
2144
|
+
getUsernames(uuids, options) {
|
|
2145
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2146
|
+
var _a, _b, _c;
|
|
2147
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getUsernames(uuids, options);
|
|
2148
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2149
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PlayerApi.getUsernames']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2150
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2151
|
+
});
|
|
2152
|
+
},
|
|
2153
|
+
};
|
|
2154
|
+
};
|
|
2155
|
+
/**
|
|
2156
|
+
* PlayerApi - factory interface
|
|
2157
|
+
*/
|
|
2158
|
+
export const PlayerApiFactory = function (configuration, basePath, axios) {
|
|
2159
|
+
const localVarFp = PlayerApiFp(configuration);
|
|
2160
|
+
return {
|
|
2161
|
+
/**
|
|
2162
|
+
* 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.
|
|
2163
|
+
* @summary Get player information
|
|
2164
|
+
* @param {string} uuid The Minecraft player UUID (with or without dashes)
|
|
2165
|
+
* @param {*} [options] Override http request option.
|
|
2166
|
+
* @throws {RequiredError}
|
|
2167
|
+
*/
|
|
2168
|
+
getPlayer1(uuid, options) {
|
|
2169
|
+
return localVarFp.getPlayer1(uuid, options).then((request) => request(axios, basePath));
|
|
2170
|
+
},
|
|
2171
|
+
/**
|
|
2172
|
+
* Accepts a list of player UUIDs and returns a map of `uuid → username` for those that have a recorded username. UUIDs with no username record (e.g. players who have never joined) are omitted from the response. Used by the web UI to display player names in the chat log.
|
|
2173
|
+
* @summary Batch resolve UUIDs to usernames
|
|
2174
|
+
* @param {Array<string>} uuids List of player UUIDs to resolve (repeatable query param)
|
|
2175
|
+
* @param {*} [options] Override http request option.
|
|
2176
|
+
* @throws {RequiredError}
|
|
2177
|
+
*/
|
|
2178
|
+
getUsernames(uuids, options) {
|
|
2179
|
+
return localVarFp.getUsernames(uuids, options).then((request) => request(axios, basePath));
|
|
2180
|
+
},
|
|
2181
|
+
};
|
|
2182
|
+
};
|
|
2183
|
+
/**
|
|
2184
|
+
* PlayerApi - object-oriented interface
|
|
2185
|
+
*/
|
|
2186
|
+
export class PlayerApi extends BaseAPI {
|
|
2187
|
+
/**
|
|
2188
|
+
* 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.
|
|
2189
|
+
* @summary Get player information
|
|
2190
|
+
* @param {string} uuid The Minecraft player UUID (with or without dashes)
|
|
2191
|
+
* @param {*} [options] Override http request option.
|
|
2192
|
+
* @throws {RequiredError}
|
|
2193
|
+
*/
|
|
2194
|
+
getPlayer1(uuid, options) {
|
|
2195
|
+
return PlayerApiFp(this.configuration).getPlayer1(uuid, options).then((request) => request(this.axios, this.basePath));
|
|
2196
|
+
}
|
|
2197
|
+
/**
|
|
2198
|
+
* Accepts a list of player UUIDs and returns a map of `uuid → username` for those that have a recorded username. UUIDs with no username record (e.g. players who have never joined) are omitted from the response. Used by the web UI to display player names in the chat log.
|
|
2199
|
+
* @summary Batch resolve UUIDs to usernames
|
|
2200
|
+
* @param {Array<string>} uuids List of player UUIDs to resolve (repeatable query param)
|
|
2201
|
+
* @param {*} [options] Override http request option.
|
|
2202
|
+
* @throws {RequiredError}
|
|
2203
|
+
*/
|
|
2204
|
+
getUsernames(uuids, options) {
|
|
2205
|
+
return PlayerApiFp(this.configuration).getUsernames(uuids, options).then((request) => request(this.axios, this.basePath));
|
|
2206
|
+
}
|
|
2207
|
+
}
|
|
2208
|
+
/**
|
|
2209
|
+
* PunishmentApi - axios parameter creator
|
|
2210
|
+
*/
|
|
2211
|
+
export const PunishmentApiAxiosParamCreator = function (configuration) {
|
|
2212
|
+
return {
|
|
2213
|
+
/**
|
|
2214
|
+
* Retrieve duration information for each punishment type and severity level (1-10)
|
|
2215
|
+
* @summary Get punishment severities
|
|
2216
|
+
* @param {*} [options] Override http request option.
|
|
2217
|
+
* @throws {RequiredError}
|
|
2218
|
+
*/
|
|
2219
|
+
getPunishmentSeverities: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
2220
|
+
const localVarPath = `/v1/punishment/severities`;
|
|
2221
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2222
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2223
|
+
let baseOptions;
|
|
2224
|
+
if (configuration) {
|
|
2225
|
+
baseOptions = configuration.baseOptions;
|
|
2226
|
+
}
|
|
2227
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2228
|
+
const localVarHeaderParameter = {};
|
|
2229
|
+
const localVarQueryParameter = {};
|
|
2230
|
+
// authentication DiscordAuth required
|
|
2231
|
+
// http bearer authentication required
|
|
2232
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
2233
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
2234
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2235
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2236
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2237
|
+
return {
|
|
2238
|
+
url: toPathString(localVarUrlObj),
|
|
2239
|
+
options: localVarRequestOptions,
|
|
2240
|
+
};
|
|
2241
|
+
}),
|
|
2242
|
+
/**
|
|
2243
|
+
* Retrieve all active punishments for a player by UUID or username, optionally filtered by type and time
|
|
2244
|
+
* @summary Get punishments by player
|
|
2245
|
+
* @param {string | null} [uuid] Player UUID
|
|
2246
|
+
* @param {string | null} [username] Player username
|
|
2247
|
+
* @param {Array<string> | null} [type] Filter by punishment types
|
|
2248
|
+
* @param {number | null} [since] Filter punishments created after this Unix epoch timestamp (milliseconds)
|
|
2249
|
+
* @param {*} [options] Override http request option.
|
|
2250
|
+
* @throws {RequiredError}
|
|
2251
|
+
*/
|
|
2252
|
+
getPunishments1: (uuid_1, username_1, type_1, since_1, ...args_1) => __awaiter(this, [uuid_1, username_1, type_1, since_1, ...args_1], void 0, function* (uuid, username, type, since, options = {}) {
|
|
2253
|
+
const localVarPath = `/v1/punishment`;
|
|
2254
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2255
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2256
|
+
let baseOptions;
|
|
2257
|
+
if (configuration) {
|
|
2258
|
+
baseOptions = configuration.baseOptions;
|
|
2259
|
+
}
|
|
2260
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2261
|
+
const localVarHeaderParameter = {};
|
|
2262
|
+
const localVarQueryParameter = {};
|
|
2263
|
+
// authentication DiscordAuth required
|
|
2264
|
+
// http bearer authentication required
|
|
2265
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
2266
|
+
if (uuid !== undefined) {
|
|
2267
|
+
localVarQueryParameter['uuid'] = uuid;
|
|
2268
|
+
}
|
|
2269
|
+
if (username !== undefined) {
|
|
2270
|
+
localVarQueryParameter['username'] = username;
|
|
2271
|
+
}
|
|
2272
|
+
if (type) {
|
|
2273
|
+
localVarQueryParameter['type'] = type.join(COLLECTION_FORMATS.csv);
|
|
2274
|
+
}
|
|
2275
|
+
if (since !== undefined) {
|
|
2276
|
+
localVarQueryParameter['since'] = since;
|
|
2277
|
+
}
|
|
2278
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
2279
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2280
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2281
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2282
|
+
return {
|
|
2283
|
+
url: toPathString(localVarUrlObj),
|
|
2284
|
+
options: localVarRequestOptions,
|
|
2285
|
+
};
|
|
2286
|
+
}),
|
|
2287
|
+
/**
|
|
2288
|
+
* Retrieve all active punishments associated with an IP address
|
|
2289
|
+
* @summary Get punishments by IP address
|
|
2290
|
+
* @param {string} ip IP address
|
|
2291
|
+
* @param {*} [options] Override http request option.
|
|
2292
|
+
* @throws {RequiredError}
|
|
2293
|
+
*/
|
|
2294
|
+
getPunishmentsByIp: (ip_1, ...args_1) => __awaiter(this, [ip_1, ...args_1], void 0, function* (ip, options = {}) {
|
|
2295
|
+
// verify required parameter 'ip' is not null or undefined
|
|
2296
|
+
assertParamExists('getPunishmentsByIp', 'ip', ip);
|
|
2297
|
+
const localVarPath = `/v1/punishment/ip`;
|
|
2298
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2299
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2300
|
+
let baseOptions;
|
|
2301
|
+
if (configuration) {
|
|
2302
|
+
baseOptions = configuration.baseOptions;
|
|
2303
|
+
}
|
|
2304
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2305
|
+
const localVarHeaderParameter = {};
|
|
2306
|
+
const localVarQueryParameter = {};
|
|
2307
|
+
// authentication DiscordAuth required
|
|
2308
|
+
// http bearer authentication required
|
|
2309
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
2310
|
+
if (ip !== undefined) {
|
|
2311
|
+
localVarQueryParameter['ip'] = ip;
|
|
2312
|
+
}
|
|
2313
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
2314
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2315
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2316
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2317
|
+
return {
|
|
2318
|
+
url: toPathString(localVarUrlObj),
|
|
2319
|
+
options: localVarRequestOptions,
|
|
2320
|
+
};
|
|
2321
|
+
}),
|
|
2322
|
+
/**
|
|
2323
|
+
* Returns a paginated list of recent punishments with optional filtering by issue date, expiration date, and type
|
|
2324
|
+
* @summary List recent punishments
|
|
2325
|
+
* @param {number} limit Maximum number of records to return
|
|
2326
|
+
* @param {number} page Page number for pagination
|
|
2327
|
+
* @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (milliseconds)
|
|
2328
|
+
* @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (milliseconds)
|
|
2329
|
+
* @param {number | null} [expiresAfter] Filter punishments expiring after this epoch timestamp (milliseconds)
|
|
2330
|
+
* @param {number | null} [expiresBefore] Filter punishments expiring before this epoch timestamp (milliseconds)
|
|
2331
|
+
* @param {Array<string> | null} [type] Filter by punishment types
|
|
2332
|
+
* @param {string | null} [uuid] Filter by player UUID
|
|
2333
|
+
* @param {string | null} [ipAddress] Filter by IP address
|
|
2334
|
+
* @param {*} [options] Override http request option.
|
|
2335
|
+
* @throws {RequiredError}
|
|
2336
|
+
*/
|
|
2337
|
+
getRecentPunishments: (limit_1, page_1, issuedAfter_1, issuedBefore_1, expiresAfter_1, expiresBefore_1, type_1, uuid_1, ipAddress_1, ...args_1) => __awaiter(this, [limit_1, page_1, issuedAfter_1, issuedBefore_1, expiresAfter_1, expiresBefore_1, type_1, uuid_1, ipAddress_1, ...args_1], void 0, function* (limit, page, issuedAfter, issuedBefore, expiresAfter, expiresBefore, type, uuid, ipAddress, options = {}) {
|
|
2338
|
+
// verify required parameter 'limit' is not null or undefined
|
|
2339
|
+
assertParamExists('getRecentPunishments', 'limit', limit);
|
|
2340
|
+
// verify required parameter 'page' is not null or undefined
|
|
2341
|
+
assertParamExists('getRecentPunishments', 'page', page);
|
|
2342
|
+
const localVarPath = `/v1/punishment/recent`;
|
|
2343
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2344
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2345
|
+
let baseOptions;
|
|
2346
|
+
if (configuration) {
|
|
2347
|
+
baseOptions = configuration.baseOptions;
|
|
2348
|
+
}
|
|
2349
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2350
|
+
const localVarHeaderParameter = {};
|
|
2351
|
+
const localVarQueryParameter = {};
|
|
2352
|
+
// authentication DiscordAuth required
|
|
2353
|
+
// http bearer authentication required
|
|
2354
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
2355
|
+
if (issuedAfter !== undefined) {
|
|
2356
|
+
localVarQueryParameter['issuedAfter'] = issuedAfter;
|
|
2357
|
+
}
|
|
2358
|
+
if (issuedBefore !== undefined) {
|
|
2359
|
+
localVarQueryParameter['issuedBefore'] = issuedBefore;
|
|
2360
|
+
}
|
|
2361
|
+
if (expiresAfter !== undefined) {
|
|
2362
|
+
localVarQueryParameter['expiresAfter'] = expiresAfter;
|
|
2363
|
+
}
|
|
2364
|
+
if (expiresBefore !== undefined) {
|
|
2365
|
+
localVarQueryParameter['expiresBefore'] = expiresBefore;
|
|
2366
|
+
}
|
|
2367
|
+
if (type) {
|
|
2368
|
+
localVarQueryParameter['type'] = type.join(COLLECTION_FORMATS.csv);
|
|
2369
|
+
}
|
|
2370
|
+
if (uuid !== undefined) {
|
|
2371
|
+
localVarQueryParameter['uuid'] = uuid;
|
|
2372
|
+
}
|
|
2373
|
+
if (ipAddress !== undefined) {
|
|
2374
|
+
localVarQueryParameter['ipAddress'] = ipAddress;
|
|
2375
|
+
}
|
|
2376
|
+
if (limit !== undefined) {
|
|
2377
|
+
localVarQueryParameter['limit'] = limit;
|
|
2378
|
+
}
|
|
2379
|
+
if (page !== undefined) {
|
|
2380
|
+
localVarQueryParameter['page'] = page;
|
|
2381
|
+
}
|
|
2382
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
2383
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2384
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2385
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2386
|
+
return {
|
|
2387
|
+
url: toPathString(localVarUrlObj),
|
|
2388
|
+
options: localVarRequestOptions,
|
|
2389
|
+
};
|
|
2390
|
+
}),
|
|
2391
|
+
};
|
|
2392
|
+
};
|
|
2393
|
+
/**
|
|
2394
|
+
* PunishmentApi - functional programming interface
|
|
2395
|
+
*/
|
|
2396
|
+
export const PunishmentApiFp = function (configuration) {
|
|
2397
|
+
const localVarAxiosParamCreator = PunishmentApiAxiosParamCreator(configuration);
|
|
2398
|
+
return {
|
|
2399
|
+
/**
|
|
2400
|
+
* Retrieve duration information for each punishment type and severity level (1-10)
|
|
2401
|
+
* @summary Get punishment severities
|
|
2402
|
+
* @param {*} [options] Override http request option.
|
|
2403
|
+
* @throws {RequiredError}
|
|
2404
|
+
*/
|
|
2405
|
+
getPunishmentSeverities(options) {
|
|
2406
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2407
|
+
var _a, _b, _c;
|
|
2408
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getPunishmentSeverities(options);
|
|
2409
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2410
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PunishmentApi.getPunishmentSeverities']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2411
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2412
|
+
});
|
|
2413
|
+
},
|
|
2414
|
+
/**
|
|
2415
|
+
* Retrieve all active punishments for a player by UUID or username, optionally filtered by type and time
|
|
2416
|
+
* @summary Get punishments by player
|
|
2417
|
+
* @param {string | null} [uuid] Player UUID
|
|
2418
|
+
* @param {string | null} [username] Player username
|
|
2419
|
+
* @param {Array<string> | null} [type] Filter by punishment types
|
|
2420
|
+
* @param {number | null} [since] Filter punishments created after this Unix epoch timestamp (milliseconds)
|
|
2421
|
+
* @param {*} [options] Override http request option.
|
|
2422
|
+
* @throws {RequiredError}
|
|
2423
|
+
*/
|
|
2424
|
+
getPunishments1(uuid, username, type, since, options) {
|
|
2425
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2426
|
+
var _a, _b, _c;
|
|
2427
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getPunishments1(uuid, username, type, since, options);
|
|
2428
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2429
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PunishmentApi.getPunishments1']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2430
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2431
|
+
});
|
|
2432
|
+
},
|
|
2433
|
+
/**
|
|
2434
|
+
* Retrieve all active punishments associated with an IP address
|
|
2435
|
+
* @summary Get punishments by IP address
|
|
2436
|
+
* @param {string} ip IP address
|
|
2437
|
+
* @param {*} [options] Override http request option.
|
|
2438
|
+
* @throws {RequiredError}
|
|
2439
|
+
*/
|
|
2440
|
+
getPunishmentsByIp(ip, options) {
|
|
2441
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2442
|
+
var _a, _b, _c;
|
|
2443
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getPunishmentsByIp(ip, options);
|
|
2444
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2445
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PunishmentApi.getPunishmentsByIp']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2446
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2447
|
+
});
|
|
2448
|
+
},
|
|
2449
|
+
/**
|
|
2450
|
+
* Returns a paginated list of recent punishments with optional filtering by issue date, expiration date, and type
|
|
2451
|
+
* @summary List recent punishments
|
|
2452
|
+
* @param {number} limit Maximum number of records to return
|
|
2453
|
+
* @param {number} page Page number for pagination
|
|
2454
|
+
* @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (milliseconds)
|
|
2455
|
+
* @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (milliseconds)
|
|
2456
|
+
* @param {number | null} [expiresAfter] Filter punishments expiring after this epoch timestamp (milliseconds)
|
|
2457
|
+
* @param {number | null} [expiresBefore] Filter punishments expiring before this epoch timestamp (milliseconds)
|
|
2458
|
+
* @param {Array<string> | null} [type] Filter by punishment types
|
|
2459
|
+
* @param {string | null} [uuid] Filter by player UUID
|
|
2460
|
+
* @param {string | null} [ipAddress] Filter by IP address
|
|
2461
|
+
* @param {*} [options] Override http request option.
|
|
2462
|
+
* @throws {RequiredError}
|
|
2463
|
+
*/
|
|
2464
|
+
getRecentPunishments(limit, page, issuedAfter, issuedBefore, expiresAfter, expiresBefore, type, uuid, ipAddress, options) {
|
|
2465
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2466
|
+
var _a, _b, _c;
|
|
2467
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getRecentPunishments(limit, page, issuedAfter, issuedBefore, expiresAfter, expiresBefore, type, uuid, ipAddress, options);
|
|
2468
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2469
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PunishmentApi.getRecentPunishments']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2470
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2471
|
+
});
|
|
2472
|
+
},
|
|
2473
|
+
};
|
|
2474
|
+
};
|
|
2475
|
+
/**
|
|
2476
|
+
* PunishmentApi - factory interface
|
|
2477
|
+
*/
|
|
2478
|
+
export const PunishmentApiFactory = function (configuration, basePath, axios) {
|
|
2479
|
+
const localVarFp = PunishmentApiFp(configuration);
|
|
2480
|
+
return {
|
|
2481
|
+
/**
|
|
2482
|
+
* Retrieve duration information for each punishment type and severity level (1-10)
|
|
2483
|
+
* @summary Get punishment severities
|
|
2484
|
+
* @param {*} [options] Override http request option.
|
|
2485
|
+
* @throws {RequiredError}
|
|
2486
|
+
*/
|
|
2487
|
+
getPunishmentSeverities(options) {
|
|
2488
|
+
return localVarFp.getPunishmentSeverities(options).then((request) => request(axios, basePath));
|
|
2489
|
+
},
|
|
2490
|
+
/**
|
|
2491
|
+
* Retrieve all active punishments for a player by UUID or username, optionally filtered by type and time
|
|
2492
|
+
* @summary Get punishments by player
|
|
2493
|
+
* @param {string | null} [uuid] Player UUID
|
|
2494
|
+
* @param {string | null} [username] Player username
|
|
2495
|
+
* @param {Array<string> | null} [type] Filter by punishment types
|
|
2496
|
+
* @param {number | null} [since] Filter punishments created after this Unix epoch timestamp (milliseconds)
|
|
2497
|
+
* @param {*} [options] Override http request option.
|
|
2498
|
+
* @throws {RequiredError}
|
|
2499
|
+
*/
|
|
2500
|
+
getPunishments1(uuid, username, type, since, options) {
|
|
2501
|
+
return localVarFp.getPunishments1(uuid, username, type, since, options).then((request) => request(axios, basePath));
|
|
2502
|
+
},
|
|
2503
|
+
/**
|
|
2504
|
+
* Retrieve all active punishments associated with an IP address
|
|
2505
|
+
* @summary Get punishments by IP address
|
|
2506
|
+
* @param {string} ip IP address
|
|
2507
|
+
* @param {*} [options] Override http request option.
|
|
2508
|
+
* @throws {RequiredError}
|
|
2509
|
+
*/
|
|
2510
|
+
getPunishmentsByIp(ip, options) {
|
|
2511
|
+
return localVarFp.getPunishmentsByIp(ip, options).then((request) => request(axios, basePath));
|
|
2512
|
+
},
|
|
2513
|
+
/**
|
|
2514
|
+
* Returns a paginated list of recent punishments with optional filtering by issue date, expiration date, and type
|
|
2515
|
+
* @summary List recent punishments
|
|
2516
|
+
* @param {number} limit Maximum number of records to return
|
|
2517
|
+
* @param {number} page Page number for pagination
|
|
2518
|
+
* @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (milliseconds)
|
|
2519
|
+
* @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (milliseconds)
|
|
2520
|
+
* @param {number | null} [expiresAfter] Filter punishments expiring after this epoch timestamp (milliseconds)
|
|
2521
|
+
* @param {number | null} [expiresBefore] Filter punishments expiring before this epoch timestamp (milliseconds)
|
|
2522
|
+
* @param {Array<string> | null} [type] Filter by punishment types
|
|
2523
|
+
* @param {string | null} [uuid] Filter by player UUID
|
|
2524
|
+
* @param {string | null} [ipAddress] Filter by IP address
|
|
2525
|
+
* @param {*} [options] Override http request option.
|
|
2526
|
+
* @throws {RequiredError}
|
|
2527
|
+
*/
|
|
2528
|
+
getRecentPunishments(limit, page, issuedAfter, issuedBefore, expiresAfter, expiresBefore, type, uuid, ipAddress, options) {
|
|
2529
|
+
return localVarFp.getRecentPunishments(limit, page, issuedAfter, issuedBefore, expiresAfter, expiresBefore, type, uuid, ipAddress, options).then((request) => request(axios, basePath));
|
|
2530
|
+
},
|
|
2531
|
+
};
|
|
2532
|
+
};
|
|
2533
|
+
/**
|
|
2534
|
+
* PunishmentApi - object-oriented interface
|
|
2535
|
+
*/
|
|
2536
|
+
export class PunishmentApi extends BaseAPI {
|
|
2537
|
+
/**
|
|
2538
|
+
* Retrieve duration information for each punishment type and severity level (1-10)
|
|
2539
|
+
* @summary Get punishment severities
|
|
2540
|
+
* @param {*} [options] Override http request option.
|
|
2541
|
+
* @throws {RequiredError}
|
|
2542
|
+
*/
|
|
2543
|
+
getPunishmentSeverities(options) {
|
|
2544
|
+
return PunishmentApiFp(this.configuration).getPunishmentSeverities(options).then((request) => request(this.axios, this.basePath));
|
|
2545
|
+
}
|
|
2546
|
+
/**
|
|
2547
|
+
* Retrieve all active punishments for a player by UUID or username, optionally filtered by type and time
|
|
2548
|
+
* @summary Get punishments by player
|
|
2549
|
+
* @param {string | null} [uuid] Player UUID
|
|
2550
|
+
* @param {string | null} [username] Player username
|
|
2551
|
+
* @param {Array<string> | null} [type] Filter by punishment types
|
|
2552
|
+
* @param {number | null} [since] Filter punishments created after this Unix epoch timestamp (milliseconds)
|
|
2553
|
+
* @param {*} [options] Override http request option.
|
|
2554
|
+
* @throws {RequiredError}
|
|
2555
|
+
*/
|
|
2556
|
+
getPunishments1(uuid, username, type, since, options) {
|
|
2557
|
+
return PunishmentApiFp(this.configuration).getPunishments1(uuid, username, type, since, options).then((request) => request(this.axios, this.basePath));
|
|
2558
|
+
}
|
|
2559
|
+
/**
|
|
2560
|
+
* Retrieve all active punishments associated with an IP address
|
|
2561
|
+
* @summary Get punishments by IP address
|
|
2562
|
+
* @param {string} ip IP address
|
|
2563
|
+
* @param {*} [options] Override http request option.
|
|
2564
|
+
* @throws {RequiredError}
|
|
2565
|
+
*/
|
|
2566
|
+
getPunishmentsByIp(ip, options) {
|
|
2567
|
+
return PunishmentApiFp(this.configuration).getPunishmentsByIp(ip, options).then((request) => request(this.axios, this.basePath));
|
|
2568
|
+
}
|
|
2569
|
+
/**
|
|
2570
|
+
* Returns a paginated list of recent punishments with optional filtering by issue date, expiration date, and type
|
|
2571
|
+
* @summary List recent punishments
|
|
2572
|
+
* @param {number} limit Maximum number of records to return
|
|
2573
|
+
* @param {number} page Page number for pagination
|
|
2574
|
+
* @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (milliseconds)
|
|
2575
|
+
* @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (milliseconds)
|
|
2576
|
+
* @param {number | null} [expiresAfter] Filter punishments expiring after this epoch timestamp (milliseconds)
|
|
2577
|
+
* @param {number | null} [expiresBefore] Filter punishments expiring before this epoch timestamp (milliseconds)
|
|
2578
|
+
* @param {Array<string> | null} [type] Filter by punishment types
|
|
2579
|
+
* @param {string | null} [uuid] Filter by player UUID
|
|
2580
|
+
* @param {string | null} [ipAddress] Filter by IP address
|
|
1630
2581
|
* @param {*} [options] Override http request option.
|
|
1631
2582
|
* @throws {RequiredError}
|
|
1632
2583
|
*/
|
|
1633
|
-
|
|
1634
|
-
return
|
|
2584
|
+
getRecentPunishments(limit, page, issuedAfter, issuedBefore, expiresAfter, expiresBefore, type, uuid, ipAddress, options) {
|
|
2585
|
+
return PunishmentApiFp(this.configuration).getRecentPunishments(limit, page, issuedAfter, issuedBefore, expiresAfter, expiresBefore, type, uuid, ipAddress, options).then((request) => request(this.axios, this.basePath));
|
|
1635
2586
|
}
|
|
1636
2587
|
}
|
|
1637
2588
|
/**
|
|
1638
|
-
*
|
|
2589
|
+
* ServerSessionsApi - axios parameter creator
|
|
1639
2590
|
*/
|
|
1640
|
-
export const
|
|
2591
|
+
export const ServerSessionsApiAxiosParamCreator = function (configuration) {
|
|
1641
2592
|
return {
|
|
1642
2593
|
/**
|
|
1643
|
-
*
|
|
1644
|
-
* @summary
|
|
1645
|
-
* @param {
|
|
1646
|
-
* @param {*} [options] Override http request option.
|
|
1647
|
-
* @throws {RequiredError}
|
|
1648
|
-
*/
|
|
1649
|
-
applyPunishment: (applyPunishmentRequest_1, ...args_1) => __awaiter(this, [applyPunishmentRequest_1, ...args_1], void 0, function* (applyPunishmentRequest, options = {}) {
|
|
1650
|
-
// verify required parameter 'applyPunishmentRequest' is not null or undefined
|
|
1651
|
-
assertParamExists('applyPunishment', 'applyPunishmentRequest', applyPunishmentRequest);
|
|
1652
|
-
const localVarPath = `/v1/punishment/apply`;
|
|
1653
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1654
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1655
|
-
let baseOptions;
|
|
1656
|
-
if (configuration) {
|
|
1657
|
-
baseOptions = configuration.baseOptions;
|
|
1658
|
-
}
|
|
1659
|
-
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1660
|
-
const localVarHeaderParameter = {};
|
|
1661
|
-
const localVarQueryParameter = {};
|
|
1662
|
-
// authentication DiscordAuth required
|
|
1663
|
-
// http bearer authentication required
|
|
1664
|
-
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1665
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1666
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1667
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1668
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1669
|
-
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1670
|
-
localVarRequestOptions.data = serializeDataIfNeeded(applyPunishmentRequest, localVarRequestOptions, configuration);
|
|
1671
|
-
return {
|
|
1672
|
-
url: toPathString(localVarUrlObj),
|
|
1673
|
-
options: localVarRequestOptions,
|
|
1674
|
-
};
|
|
1675
|
-
}),
|
|
1676
|
-
/**
|
|
1677
|
-
* Preview punishment impact before applying. Returns calculated points, current/new thresholds, and whether it will be permanent.
|
|
1678
|
-
* @summary Create a punishment draft
|
|
1679
|
-
* @param {CreatePunishmentDraftRequest} createPunishmentDraftRequest
|
|
2594
|
+
* Updates the `last_heartbeat` timestamp for the given session, keeping it marked as online. Sessions that miss heartbeats for more than 2 minutes are automatically tombstoned by the scheduler. Call this every 30 seconds from the game server.
|
|
2595
|
+
* @summary Send a heartbeat
|
|
2596
|
+
* @param {string} id Session UUID returned from the registration call
|
|
1680
2597
|
* @param {*} [options] Override http request option.
|
|
1681
2598
|
* @throws {RequiredError}
|
|
1682
2599
|
*/
|
|
1683
|
-
|
|
1684
|
-
// verify required parameter '
|
|
1685
|
-
assertParamExists('
|
|
1686
|
-
const localVarPath = `/v1/
|
|
2600
|
+
heartbeat: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
|
|
2601
|
+
// verify required parameter 'id' is not null or undefined
|
|
2602
|
+
assertParamExists('heartbeat', 'id', id);
|
|
2603
|
+
const localVarPath = `/v1/servers/{id}/heartbeat`
|
|
2604
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
1687
2605
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1688
2606
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1689
2607
|
let baseOptions;
|
|
1690
2608
|
if (configuration) {
|
|
1691
2609
|
baseOptions = configuration.baseOptions;
|
|
1692
2610
|
}
|
|
1693
|
-
const localVarRequestOptions = Object.assign(Object.assign({ method: '
|
|
2611
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
1694
2612
|
const localVarHeaderParameter = {};
|
|
1695
2613
|
const localVarQueryParameter = {};
|
|
1696
2614
|
// authentication DiscordAuth required
|
|
1697
2615
|
// http bearer authentication required
|
|
1698
2616
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1699
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1700
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1701
2617
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1702
2618
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1703
2619
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1704
|
-
localVarRequestOptions.data = serializeDataIfNeeded(createPunishmentDraftRequest, localVarRequestOptions, configuration);
|
|
1705
2620
|
return {
|
|
1706
2621
|
url: toPathString(localVarUrlObj),
|
|
1707
2622
|
options: localVarRequestOptions,
|
|
1708
2623
|
};
|
|
1709
2624
|
}),
|
|
1710
2625
|
/**
|
|
1711
|
-
*
|
|
1712
|
-
* @summary
|
|
2626
|
+
* Returns all server sessions — both online and historical — ordered by start time descending. Used by the web UI to populate the session filter dropdown.
|
|
2627
|
+
* @summary List all server sessions
|
|
1713
2628
|
* @param {*} [options] Override http request option.
|
|
1714
2629
|
* @throws {RequiredError}
|
|
1715
2630
|
*/
|
|
1716
|
-
|
|
1717
|
-
const localVarPath = `/v1/
|
|
2631
|
+
listAll: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
2632
|
+
const localVarPath = `/v1/servers/history`;
|
|
1718
2633
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1719
2634
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1720
2635
|
let baseOptions;
|
|
@@ -1737,17 +2652,13 @@ export const PunishmentApiAxiosParamCreator = function (configuration) {
|
|
|
1737
2652
|
};
|
|
1738
2653
|
}),
|
|
1739
2654
|
/**
|
|
1740
|
-
*
|
|
1741
|
-
* @summary
|
|
1742
|
-
* @param {string | null} [uuid] Player UUID
|
|
1743
|
-
* @param {string | null} [username] Player username
|
|
1744
|
-
* @param {Array<string> | null} [type] Filter by punishment types
|
|
1745
|
-
* @param {number | null} [since] Filter punishments created after this Unix epoch timestamp (milliseconds)
|
|
2655
|
+
* Returns all currently online server sessions, ordered by start time descending.
|
|
2656
|
+
* @summary List online server sessions
|
|
1746
2657
|
* @param {*} [options] Override http request option.
|
|
1747
2658
|
* @throws {RequiredError}
|
|
1748
2659
|
*/
|
|
1749
|
-
|
|
1750
|
-
const localVarPath = `/v1/
|
|
2660
|
+
listOnline: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
2661
|
+
const localVarPath = `/v1/servers`;
|
|
1751
2662
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1752
2663
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1753
2664
|
let baseOptions;
|
|
@@ -1760,18 +2671,6 @@ export const PunishmentApiAxiosParamCreator = function (configuration) {
|
|
|
1760
2671
|
// authentication DiscordAuth required
|
|
1761
2672
|
// http bearer authentication required
|
|
1762
2673
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1763
|
-
if (uuid !== undefined) {
|
|
1764
|
-
localVarQueryParameter['uuid'] = uuid;
|
|
1765
|
-
}
|
|
1766
|
-
if (username !== undefined) {
|
|
1767
|
-
localVarQueryParameter['username'] = username;
|
|
1768
|
-
}
|
|
1769
|
-
if (type) {
|
|
1770
|
-
localVarQueryParameter['type'] = type.join(COLLECTION_FORMATS.csv);
|
|
1771
|
-
}
|
|
1772
|
-
if (since !== undefined) {
|
|
1773
|
-
localVarQueryParameter['since'] = since;
|
|
1774
|
-
}
|
|
1775
2674
|
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1776
2675
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1777
2676
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -1782,32 +2681,29 @@ export const PunishmentApiAxiosParamCreator = function (configuration) {
|
|
|
1782
2681
|
};
|
|
1783
2682
|
}),
|
|
1784
2683
|
/**
|
|
1785
|
-
*
|
|
1786
|
-
* @summary
|
|
1787
|
-
* @param {string}
|
|
2684
|
+
* Marks the session as offline with the current timestamp as `endedAt`. Call this from the game server\'s shutdown hook for a clean shutdown signal. Sessions that crash without calling this endpoint will be tombstoned automatically by the 2-minute heartbeat scheduler.
|
|
2685
|
+
* @summary Mark a session offline
|
|
2686
|
+
* @param {string} id Session UUID returned from the registration call
|
|
1788
2687
|
* @param {*} [options] Override http request option.
|
|
1789
2688
|
* @throws {RequiredError}
|
|
1790
2689
|
*/
|
|
1791
|
-
|
|
1792
|
-
// verify required parameter '
|
|
1793
|
-
assertParamExists('
|
|
1794
|
-
const localVarPath = `/v1/
|
|
2690
|
+
markOffline: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
|
|
2691
|
+
// verify required parameter 'id' is not null or undefined
|
|
2692
|
+
assertParamExists('markOffline', 'id', id);
|
|
2693
|
+
const localVarPath = `/v1/servers/{id}/offline`
|
|
2694
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
1795
2695
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1796
2696
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1797
2697
|
let baseOptions;
|
|
1798
2698
|
if (configuration) {
|
|
1799
2699
|
baseOptions = configuration.baseOptions;
|
|
1800
2700
|
}
|
|
1801
|
-
const localVarRequestOptions = Object.assign(Object.assign({ method: '
|
|
2701
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
1802
2702
|
const localVarHeaderParameter = {};
|
|
1803
2703
|
const localVarQueryParameter = {};
|
|
1804
2704
|
// authentication DiscordAuth required
|
|
1805
2705
|
// http bearer authentication required
|
|
1806
2706
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1807
|
-
if (ip !== undefined) {
|
|
1808
|
-
localVarQueryParameter['ip'] = ip;
|
|
1809
|
-
}
|
|
1810
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1811
2707
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1812
2708
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1813
2709
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -1817,69 +2713,34 @@ export const PunishmentApiAxiosParamCreator = function (configuration) {
|
|
|
1817
2713
|
};
|
|
1818
2714
|
}),
|
|
1819
2715
|
/**
|
|
1820
|
-
*
|
|
1821
|
-
* @summary
|
|
1822
|
-
* @param {
|
|
1823
|
-
* @param {number} page Page number for pagination
|
|
1824
|
-
* @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (milliseconds)
|
|
1825
|
-
* @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (milliseconds)
|
|
1826
|
-
* @param {number | null} [expiresAfter] Filter punishments expiring after this epoch timestamp (milliseconds)
|
|
1827
|
-
* @param {number | null} [expiresBefore] Filter punishments expiring before this epoch timestamp (milliseconds)
|
|
1828
|
-
* @param {Array<string> | null} [type] Filter by punishment types
|
|
1829
|
-
* @param {string | null} [uuid] Filter by player UUID
|
|
1830
|
-
* @param {string | null} [ipAddress] Filter by IP address
|
|
2716
|
+
* Registers a game server instance and returns a session ID used for subsequent heartbeats and chat ingestion. If a `containerId` is provided and an online session already exists for that container (e.g. after a Velocity restart), the existing session is returned unchanged. Otherwise a fresh session is created with an auto-generated instance name.
|
|
2717
|
+
* @summary Register a server session
|
|
2718
|
+
* @param {ServerRegisterRequest} serverRegisterRequest
|
|
1831
2719
|
* @param {*} [options] Override http request option.
|
|
1832
2720
|
* @throws {RequiredError}
|
|
1833
2721
|
*/
|
|
1834
|
-
|
|
1835
|
-
// verify required parameter '
|
|
1836
|
-
assertParamExists('
|
|
1837
|
-
|
|
1838
|
-
assertParamExists('getRecentPunishments', 'page', page);
|
|
1839
|
-
const localVarPath = `/v1/punishment/recent`;
|
|
2722
|
+
register: (serverRegisterRequest_1, ...args_1) => __awaiter(this, [serverRegisterRequest_1, ...args_1], void 0, function* (serverRegisterRequest, options = {}) {
|
|
2723
|
+
// verify required parameter 'serverRegisterRequest' is not null or undefined
|
|
2724
|
+
assertParamExists('register', 'serverRegisterRequest', serverRegisterRequest);
|
|
2725
|
+
const localVarPath = `/v1/servers`;
|
|
1840
2726
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1841
2727
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1842
2728
|
let baseOptions;
|
|
1843
2729
|
if (configuration) {
|
|
1844
2730
|
baseOptions = configuration.baseOptions;
|
|
1845
2731
|
}
|
|
1846
|
-
const localVarRequestOptions = Object.assign(Object.assign({ method: '
|
|
2732
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1847
2733
|
const localVarHeaderParameter = {};
|
|
1848
2734
|
const localVarQueryParameter = {};
|
|
1849
2735
|
// authentication DiscordAuth required
|
|
1850
2736
|
// http bearer authentication required
|
|
1851
2737
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1852
|
-
|
|
1853
|
-
localVarQueryParameter['issuedAfter'] = issuedAfter;
|
|
1854
|
-
}
|
|
1855
|
-
if (issuedBefore !== undefined) {
|
|
1856
|
-
localVarQueryParameter['issuedBefore'] = issuedBefore;
|
|
1857
|
-
}
|
|
1858
|
-
if (expiresAfter !== undefined) {
|
|
1859
|
-
localVarQueryParameter['expiresAfter'] = expiresAfter;
|
|
1860
|
-
}
|
|
1861
|
-
if (expiresBefore !== undefined) {
|
|
1862
|
-
localVarQueryParameter['expiresBefore'] = expiresBefore;
|
|
1863
|
-
}
|
|
1864
|
-
if (type) {
|
|
1865
|
-
localVarQueryParameter['type'] = type.join(COLLECTION_FORMATS.csv);
|
|
1866
|
-
}
|
|
1867
|
-
if (uuid !== undefined) {
|
|
1868
|
-
localVarQueryParameter['uuid'] = uuid;
|
|
1869
|
-
}
|
|
1870
|
-
if (ipAddress !== undefined) {
|
|
1871
|
-
localVarQueryParameter['ipAddress'] = ipAddress;
|
|
1872
|
-
}
|
|
1873
|
-
if (limit !== undefined) {
|
|
1874
|
-
localVarQueryParameter['limit'] = limit;
|
|
1875
|
-
}
|
|
1876
|
-
if (page !== undefined) {
|
|
1877
|
-
localVarQueryParameter['page'] = page;
|
|
1878
|
-
}
|
|
2738
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1879
2739
|
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1880
2740
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1881
2741
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1882
2742
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2743
|
+
localVarRequestOptions.data = serializeDataIfNeeded(serverRegisterRequest, localVarRequestOptions, configuration);
|
|
1883
2744
|
return {
|
|
1884
2745
|
url: toPathString(localVarUrlObj),
|
|
1885
2746
|
options: localVarRequestOptions,
|
|
@@ -1888,269 +2749,197 @@ export const PunishmentApiAxiosParamCreator = function (configuration) {
|
|
|
1888
2749
|
};
|
|
1889
2750
|
};
|
|
1890
2751
|
/**
|
|
1891
|
-
*
|
|
2752
|
+
* ServerSessionsApi - functional programming interface
|
|
1892
2753
|
*/
|
|
1893
|
-
export const
|
|
1894
|
-
const localVarAxiosParamCreator =
|
|
2754
|
+
export const ServerSessionsApiFp = function (configuration) {
|
|
2755
|
+
const localVarAxiosParamCreator = ServerSessionsApiAxiosParamCreator(configuration);
|
|
1895
2756
|
return {
|
|
1896
2757
|
/**
|
|
1897
|
-
*
|
|
1898
|
-
* @summary
|
|
1899
|
-
* @param {
|
|
1900
|
-
* @param {*} [options] Override http request option.
|
|
1901
|
-
* @throws {RequiredError}
|
|
1902
|
-
*/
|
|
1903
|
-
applyPunishment(applyPunishmentRequest, options) {
|
|
1904
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1905
|
-
var _a, _b, _c;
|
|
1906
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.applyPunishment(applyPunishmentRequest, options);
|
|
1907
|
-
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1908
|
-
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PunishmentApi.applyPunishment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1909
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1910
|
-
});
|
|
1911
|
-
},
|
|
1912
|
-
/**
|
|
1913
|
-
* Preview punishment impact before applying. Returns calculated points, current/new thresholds, and whether it will be permanent.
|
|
1914
|
-
* @summary Create a punishment draft
|
|
1915
|
-
* @param {CreatePunishmentDraftRequest} createPunishmentDraftRequest
|
|
2758
|
+
* Updates the `last_heartbeat` timestamp for the given session, keeping it marked as online. Sessions that miss heartbeats for more than 2 minutes are automatically tombstoned by the scheduler. Call this every 30 seconds from the game server.
|
|
2759
|
+
* @summary Send a heartbeat
|
|
2760
|
+
* @param {string} id Session UUID returned from the registration call
|
|
1916
2761
|
* @param {*} [options] Override http request option.
|
|
1917
2762
|
* @throws {RequiredError}
|
|
1918
2763
|
*/
|
|
1919
|
-
|
|
2764
|
+
heartbeat(id, options) {
|
|
1920
2765
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1921
2766
|
var _a, _b, _c;
|
|
1922
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
2767
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.heartbeat(id, options);
|
|
1923
2768
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1924
|
-
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['
|
|
2769
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ServerSessionsApi.heartbeat']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1925
2770
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1926
2771
|
});
|
|
1927
2772
|
},
|
|
1928
2773
|
/**
|
|
1929
|
-
*
|
|
1930
|
-
* @summary
|
|
2774
|
+
* Returns all server sessions — both online and historical — ordered by start time descending. Used by the web UI to populate the session filter dropdown.
|
|
2775
|
+
* @summary List all server sessions
|
|
1931
2776
|
* @param {*} [options] Override http request option.
|
|
1932
2777
|
* @throws {RequiredError}
|
|
1933
2778
|
*/
|
|
1934
|
-
|
|
2779
|
+
listAll(options) {
|
|
1935
2780
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1936
2781
|
var _a, _b, _c;
|
|
1937
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
2782
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listAll(options);
|
|
1938
2783
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1939
|
-
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['
|
|
2784
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ServerSessionsApi.listAll']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1940
2785
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1941
2786
|
});
|
|
1942
2787
|
},
|
|
1943
2788
|
/**
|
|
1944
|
-
*
|
|
1945
|
-
* @summary
|
|
1946
|
-
* @param {string | null} [uuid] Player UUID
|
|
1947
|
-
* @param {string | null} [username] Player username
|
|
1948
|
-
* @param {Array<string> | null} [type] Filter by punishment types
|
|
1949
|
-
* @param {number | null} [since] Filter punishments created after this Unix epoch timestamp (milliseconds)
|
|
2789
|
+
* Returns all currently online server sessions, ordered by start time descending.
|
|
2790
|
+
* @summary List online server sessions
|
|
1950
2791
|
* @param {*} [options] Override http request option.
|
|
1951
2792
|
* @throws {RequiredError}
|
|
1952
2793
|
*/
|
|
1953
|
-
|
|
2794
|
+
listOnline(options) {
|
|
1954
2795
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1955
2796
|
var _a, _b, _c;
|
|
1956
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
2797
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listOnline(options);
|
|
1957
2798
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1958
|
-
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['
|
|
2799
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ServerSessionsApi.listOnline']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1959
2800
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1960
2801
|
});
|
|
1961
2802
|
},
|
|
1962
2803
|
/**
|
|
1963
|
-
*
|
|
1964
|
-
* @summary
|
|
1965
|
-
* @param {string}
|
|
2804
|
+
* Marks the session as offline with the current timestamp as `endedAt`. Call this from the game server\'s shutdown hook for a clean shutdown signal. Sessions that crash without calling this endpoint will be tombstoned automatically by the 2-minute heartbeat scheduler.
|
|
2805
|
+
* @summary Mark a session offline
|
|
2806
|
+
* @param {string} id Session UUID returned from the registration call
|
|
1966
2807
|
* @param {*} [options] Override http request option.
|
|
1967
2808
|
* @throws {RequiredError}
|
|
1968
2809
|
*/
|
|
1969
|
-
|
|
2810
|
+
markOffline(id, options) {
|
|
1970
2811
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1971
2812
|
var _a, _b, _c;
|
|
1972
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
2813
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.markOffline(id, options);
|
|
1973
2814
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1974
|
-
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['
|
|
2815
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ServerSessionsApi.markOffline']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1975
2816
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1976
2817
|
});
|
|
1977
2818
|
},
|
|
1978
2819
|
/**
|
|
1979
|
-
*
|
|
1980
|
-
* @summary
|
|
1981
|
-
* @param {
|
|
1982
|
-
* @param {number} page Page number for pagination
|
|
1983
|
-
* @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (milliseconds)
|
|
1984
|
-
* @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (milliseconds)
|
|
1985
|
-
* @param {number | null} [expiresAfter] Filter punishments expiring after this epoch timestamp (milliseconds)
|
|
1986
|
-
* @param {number | null} [expiresBefore] Filter punishments expiring before this epoch timestamp (milliseconds)
|
|
1987
|
-
* @param {Array<string> | null} [type] Filter by punishment types
|
|
1988
|
-
* @param {string | null} [uuid] Filter by player UUID
|
|
1989
|
-
* @param {string | null} [ipAddress] Filter by IP address
|
|
2820
|
+
* Registers a game server instance and returns a session ID used for subsequent heartbeats and chat ingestion. If a `containerId` is provided and an online session already exists for that container (e.g. after a Velocity restart), the existing session is returned unchanged. Otherwise a fresh session is created with an auto-generated instance name.
|
|
2821
|
+
* @summary Register a server session
|
|
2822
|
+
* @param {ServerRegisterRequest} serverRegisterRequest
|
|
1990
2823
|
* @param {*} [options] Override http request option.
|
|
1991
2824
|
* @throws {RequiredError}
|
|
1992
2825
|
*/
|
|
1993
|
-
|
|
2826
|
+
register(serverRegisterRequest, options) {
|
|
1994
2827
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1995
2828
|
var _a, _b, _c;
|
|
1996
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
2829
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.register(serverRegisterRequest, options);
|
|
1997
2830
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1998
|
-
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['
|
|
2831
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ServerSessionsApi.register']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1999
2832
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2000
2833
|
});
|
|
2001
2834
|
},
|
|
2002
2835
|
};
|
|
2003
2836
|
};
|
|
2004
2837
|
/**
|
|
2005
|
-
*
|
|
2838
|
+
* ServerSessionsApi - factory interface
|
|
2006
2839
|
*/
|
|
2007
|
-
export const
|
|
2008
|
-
const localVarFp =
|
|
2840
|
+
export const ServerSessionsApiFactory = function (configuration, basePath, axios) {
|
|
2841
|
+
const localVarFp = ServerSessionsApiFp(configuration);
|
|
2009
2842
|
return {
|
|
2010
2843
|
/**
|
|
2011
|
-
*
|
|
2012
|
-
* @summary
|
|
2013
|
-
* @param {
|
|
2844
|
+
* Updates the `last_heartbeat` timestamp for the given session, keeping it marked as online. Sessions that miss heartbeats for more than 2 minutes are automatically tombstoned by the scheduler. Call this every 30 seconds from the game server.
|
|
2845
|
+
* @summary Send a heartbeat
|
|
2846
|
+
* @param {string} id Session UUID returned from the registration call
|
|
2014
2847
|
* @param {*} [options] Override http request option.
|
|
2015
2848
|
* @throws {RequiredError}
|
|
2016
2849
|
*/
|
|
2017
|
-
|
|
2018
|
-
return localVarFp.
|
|
2850
|
+
heartbeat(id, options) {
|
|
2851
|
+
return localVarFp.heartbeat(id, options).then((request) => request(axios, basePath));
|
|
2019
2852
|
},
|
|
2020
2853
|
/**
|
|
2021
|
-
*
|
|
2022
|
-
* @summary
|
|
2023
|
-
* @param {CreatePunishmentDraftRequest} createPunishmentDraftRequest
|
|
2854
|
+
* Returns all server sessions — both online and historical — ordered by start time descending. Used by the web UI to populate the session filter dropdown.
|
|
2855
|
+
* @summary List all server sessions
|
|
2024
2856
|
* @param {*} [options] Override http request option.
|
|
2025
2857
|
* @throws {RequiredError}
|
|
2026
2858
|
*/
|
|
2027
|
-
|
|
2028
|
-
return localVarFp.
|
|
2029
|
-
},
|
|
2030
|
-
/**
|
|
2031
|
-
* Retrieve duration information for each punishment type and severity level (1-10)
|
|
2032
|
-
* @summary Get punishment severities
|
|
2033
|
-
* @param {*} [options] Override http request option.
|
|
2034
|
-
* @throws {RequiredError}
|
|
2035
|
-
*/
|
|
2036
|
-
getPunishmentSeverities(options) {
|
|
2037
|
-
return localVarFp.getPunishmentSeverities(options).then((request) => request(axios, basePath));
|
|
2859
|
+
listAll(options) {
|
|
2860
|
+
return localVarFp.listAll(options).then((request) => request(axios, basePath));
|
|
2038
2861
|
},
|
|
2039
2862
|
/**
|
|
2040
|
-
*
|
|
2041
|
-
* @summary
|
|
2042
|
-
* @param {string | null} [uuid] Player UUID
|
|
2043
|
-
* @param {string | null} [username] Player username
|
|
2044
|
-
* @param {Array<string> | null} [type] Filter by punishment types
|
|
2045
|
-
* @param {number | null} [since] Filter punishments created after this Unix epoch timestamp (milliseconds)
|
|
2863
|
+
* Returns all currently online server sessions, ordered by start time descending.
|
|
2864
|
+
* @summary List online server sessions
|
|
2046
2865
|
* @param {*} [options] Override http request option.
|
|
2047
2866
|
* @throws {RequiredError}
|
|
2048
2867
|
*/
|
|
2049
|
-
|
|
2050
|
-
return localVarFp.
|
|
2868
|
+
listOnline(options) {
|
|
2869
|
+
return localVarFp.listOnline(options).then((request) => request(axios, basePath));
|
|
2051
2870
|
},
|
|
2052
2871
|
/**
|
|
2053
|
-
*
|
|
2054
|
-
* @summary
|
|
2055
|
-
* @param {string}
|
|
2872
|
+
* Marks the session as offline with the current timestamp as `endedAt`. Call this from the game server\'s shutdown hook for a clean shutdown signal. Sessions that crash without calling this endpoint will be tombstoned automatically by the 2-minute heartbeat scheduler.
|
|
2873
|
+
* @summary Mark a session offline
|
|
2874
|
+
* @param {string} id Session UUID returned from the registration call
|
|
2056
2875
|
* @param {*} [options] Override http request option.
|
|
2057
2876
|
* @throws {RequiredError}
|
|
2058
2877
|
*/
|
|
2059
|
-
|
|
2060
|
-
return localVarFp.
|
|
2878
|
+
markOffline(id, options) {
|
|
2879
|
+
return localVarFp.markOffline(id, options).then((request) => request(axios, basePath));
|
|
2061
2880
|
},
|
|
2062
2881
|
/**
|
|
2063
|
-
*
|
|
2064
|
-
* @summary
|
|
2065
|
-
* @param {
|
|
2066
|
-
* @param {number} page Page number for pagination
|
|
2067
|
-
* @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (milliseconds)
|
|
2068
|
-
* @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (milliseconds)
|
|
2069
|
-
* @param {number | null} [expiresAfter] Filter punishments expiring after this epoch timestamp (milliseconds)
|
|
2070
|
-
* @param {number | null} [expiresBefore] Filter punishments expiring before this epoch timestamp (milliseconds)
|
|
2071
|
-
* @param {Array<string> | null} [type] Filter by punishment types
|
|
2072
|
-
* @param {string | null} [uuid] Filter by player UUID
|
|
2073
|
-
* @param {string | null} [ipAddress] Filter by IP address
|
|
2882
|
+
* Registers a game server instance and returns a session ID used for subsequent heartbeats and chat ingestion. If a `containerId` is provided and an online session already exists for that container (e.g. after a Velocity restart), the existing session is returned unchanged. Otherwise a fresh session is created with an auto-generated instance name.
|
|
2883
|
+
* @summary Register a server session
|
|
2884
|
+
* @param {ServerRegisterRequest} serverRegisterRequest
|
|
2074
2885
|
* @param {*} [options] Override http request option.
|
|
2075
2886
|
* @throws {RequiredError}
|
|
2076
2887
|
*/
|
|
2077
|
-
|
|
2078
|
-
return localVarFp.
|
|
2888
|
+
register(serverRegisterRequest, options) {
|
|
2889
|
+
return localVarFp.register(serverRegisterRequest, options).then((request) => request(axios, basePath));
|
|
2079
2890
|
},
|
|
2080
2891
|
};
|
|
2081
2892
|
};
|
|
2082
2893
|
/**
|
|
2083
|
-
*
|
|
2894
|
+
* ServerSessionsApi - object-oriented interface
|
|
2084
2895
|
*/
|
|
2085
|
-
export class
|
|
2086
|
-
/**
|
|
2087
|
-
* Create and apply a punishment to a player. Automatically determines if permanent based on current score threshold (≥100%).
|
|
2088
|
-
* @summary Apply a punishment
|
|
2089
|
-
* @param {ApplyPunishmentRequest} applyPunishmentRequest
|
|
2090
|
-
* @param {*} [options] Override http request option.
|
|
2091
|
-
* @throws {RequiredError}
|
|
2092
|
-
*/
|
|
2093
|
-
applyPunishment(applyPunishmentRequest, options) {
|
|
2094
|
-
return PunishmentApiFp(this.configuration).applyPunishment(applyPunishmentRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2095
|
-
}
|
|
2896
|
+
export class ServerSessionsApi extends BaseAPI {
|
|
2096
2897
|
/**
|
|
2097
|
-
*
|
|
2098
|
-
* @summary
|
|
2099
|
-
* @param {
|
|
2898
|
+
* Updates the `last_heartbeat` timestamp for the given session, keeping it marked as online. Sessions that miss heartbeats for more than 2 minutes are automatically tombstoned by the scheduler. Call this every 30 seconds from the game server.
|
|
2899
|
+
* @summary Send a heartbeat
|
|
2900
|
+
* @param {string} id Session UUID returned from the registration call
|
|
2100
2901
|
* @param {*} [options] Override http request option.
|
|
2101
2902
|
* @throws {RequiredError}
|
|
2102
2903
|
*/
|
|
2103
|
-
|
|
2104
|
-
return
|
|
2904
|
+
heartbeat(id, options) {
|
|
2905
|
+
return ServerSessionsApiFp(this.configuration).heartbeat(id, options).then((request) => request(this.axios, this.basePath));
|
|
2105
2906
|
}
|
|
2106
2907
|
/**
|
|
2107
|
-
*
|
|
2108
|
-
* @summary
|
|
2908
|
+
* Returns all server sessions — both online and historical — ordered by start time descending. Used by the web UI to populate the session filter dropdown.
|
|
2909
|
+
* @summary List all server sessions
|
|
2109
2910
|
* @param {*} [options] Override http request option.
|
|
2110
2911
|
* @throws {RequiredError}
|
|
2111
2912
|
*/
|
|
2112
|
-
|
|
2113
|
-
return
|
|
2913
|
+
listAll(options) {
|
|
2914
|
+
return ServerSessionsApiFp(this.configuration).listAll(options).then((request) => request(this.axios, this.basePath));
|
|
2114
2915
|
}
|
|
2115
2916
|
/**
|
|
2116
|
-
*
|
|
2117
|
-
* @summary
|
|
2118
|
-
* @param {string | null} [uuid] Player UUID
|
|
2119
|
-
* @param {string | null} [username] Player username
|
|
2120
|
-
* @param {Array<string> | null} [type] Filter by punishment types
|
|
2121
|
-
* @param {number | null} [since] Filter punishments created after this Unix epoch timestamp (milliseconds)
|
|
2917
|
+
* Returns all currently online server sessions, ordered by start time descending.
|
|
2918
|
+
* @summary List online server sessions
|
|
2122
2919
|
* @param {*} [options] Override http request option.
|
|
2123
2920
|
* @throws {RequiredError}
|
|
2124
2921
|
*/
|
|
2125
|
-
|
|
2126
|
-
return
|
|
2922
|
+
listOnline(options) {
|
|
2923
|
+
return ServerSessionsApiFp(this.configuration).listOnline(options).then((request) => request(this.axios, this.basePath));
|
|
2127
2924
|
}
|
|
2128
2925
|
/**
|
|
2129
|
-
*
|
|
2130
|
-
* @summary
|
|
2131
|
-
* @param {string}
|
|
2926
|
+
* Marks the session as offline with the current timestamp as `endedAt`. Call this from the game server\'s shutdown hook for a clean shutdown signal. Sessions that crash without calling this endpoint will be tombstoned automatically by the 2-minute heartbeat scheduler.
|
|
2927
|
+
* @summary Mark a session offline
|
|
2928
|
+
* @param {string} id Session UUID returned from the registration call
|
|
2132
2929
|
* @param {*} [options] Override http request option.
|
|
2133
2930
|
* @throws {RequiredError}
|
|
2134
2931
|
*/
|
|
2135
|
-
|
|
2136
|
-
return
|
|
2932
|
+
markOffline(id, options) {
|
|
2933
|
+
return ServerSessionsApiFp(this.configuration).markOffline(id, options).then((request) => request(this.axios, this.basePath));
|
|
2137
2934
|
}
|
|
2138
2935
|
/**
|
|
2139
|
-
*
|
|
2140
|
-
* @summary
|
|
2141
|
-
* @param {
|
|
2142
|
-
* @param {number} page Page number for pagination
|
|
2143
|
-
* @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (milliseconds)
|
|
2144
|
-
* @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (milliseconds)
|
|
2145
|
-
* @param {number | null} [expiresAfter] Filter punishments expiring after this epoch timestamp (milliseconds)
|
|
2146
|
-
* @param {number | null} [expiresBefore] Filter punishments expiring before this epoch timestamp (milliseconds)
|
|
2147
|
-
* @param {Array<string> | null} [type] Filter by punishment types
|
|
2148
|
-
* @param {string | null} [uuid] Filter by player UUID
|
|
2149
|
-
* @param {string | null} [ipAddress] Filter by IP address
|
|
2936
|
+
* Registers a game server instance and returns a session ID used for subsequent heartbeats and chat ingestion. If a `containerId` is provided and an online session already exists for that container (e.g. after a Velocity restart), the existing session is returned unchanged. Otherwise a fresh session is created with an auto-generated instance name.
|
|
2937
|
+
* @summary Register a server session
|
|
2938
|
+
* @param {ServerRegisterRequest} serverRegisterRequest
|
|
2150
2939
|
* @param {*} [options] Override http request option.
|
|
2151
2940
|
* @throws {RequiredError}
|
|
2152
2941
|
*/
|
|
2153
|
-
|
|
2154
|
-
return
|
|
2942
|
+
register(serverRegisterRequest, options) {
|
|
2943
|
+
return ServerSessionsApiFp(this.configuration).register(serverRegisterRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2155
2944
|
}
|
|
2156
2945
|
}
|