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