@rebornteam/reborn-api 2.6.0 → 2.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/.openapi-generator/FILES +11 -4
  2. package/README.md +16 -8
  3. package/api.ts +463 -262
  4. package/base.ts +1 -1
  5. package/common.ts +1 -1
  6. package/configuration.ts +1 -1
  7. package/dist/api.d.ts +329 -180
  8. package/dist/api.js +231 -146
  9. package/dist/base.d.ts +1 -1
  10. package/dist/base.js +1 -1
  11. package/dist/common.d.ts +1 -1
  12. package/dist/common.js +1 -1
  13. package/dist/configuration.d.ts +1 -1
  14. package/dist/configuration.js +1 -1
  15. package/dist/esm/api.d.ts +329 -180
  16. package/dist/esm/api.js +230 -145
  17. package/dist/esm/base.d.ts +1 -1
  18. package/dist/esm/base.js +1 -1
  19. package/dist/esm/common.d.ts +1 -1
  20. package/dist/esm/common.js +1 -1
  21. package/dist/esm/configuration.d.ts +1 -1
  22. package/dist/esm/configuration.js +1 -1
  23. package/dist/esm/index.d.ts +1 -1
  24. package/dist/esm/index.js +1 -1
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.js +1 -1
  27. package/docs/AdminApplyPunishmentRequest.md +33 -0
  28. package/docs/AdminApplyPunishmentResponse.md +21 -0
  29. package/docs/AdminApplyPunishmentResult.md +33 -0
  30. package/docs/AdminCreatePunishmentDraftRequest.md +31 -0
  31. package/docs/AdminIpSearchResult.md +23 -0
  32. package/docs/AdminPagedPunishmentResponse.md +1 -1
  33. package/docs/AdminPlayerSearchResult.md +23 -0
  34. package/docs/AdminPunishmentDraftResponse.md +21 -0
  35. package/docs/AdminPunishmentEvaluation.md +39 -0
  36. package/docs/AdminPunishmentListItem.md +42 -0
  37. package/docs/AdminPunishmentSearchResponse.md +25 -0
  38. package/docs/AdminPunishmentTarget.md +23 -0
  39. package/docs/AdminPunishmentsApi.md +168 -2
  40. package/docs/PunishmentApi.md +0 -106
  41. package/docs/PunishmentGetPunishmentResponse.md +5 -3
  42. package/index.ts +1 -1
  43. package/package.json +1 -1
  44. package/docs/ApplyPunishmentRequest.md +0 -31
  45. package/docs/ApplyPunishmentResponse.md +0 -33
  46. package/docs/CreatePunishmentDraftRequest.md +0 -29
  47. package/docs/PunishmentDraftResponse.md +0 -39
package/dist/esm/api.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * Reborn API
5
5
  * The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
6
6
  *
7
- * The version of the OpenAPI document: 2.6.0
7
+ * The version of the OpenAPI document: 2.6.4
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -26,6 +26,20 @@ import globalAxios from 'axios';
26
26
  import { DUMMY_BASE_URL, assertParamExists, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
27
27
  // @ts-ignore
28
28
  import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, operationServerMap } from './base';
29
+ export const AdminApplyPunishmentRequestTypeEnum = {
30
+ Ban: 'BAN',
31
+ Mute: 'MUTE',
32
+ Warning: 'WARNING'
33
+ };
34
+ export const AdminCreatePunishmentDraftRequestTypeEnum = {
35
+ Ban: 'BAN',
36
+ Mute: 'MUTE',
37
+ Warning: 'WARNING'
38
+ };
39
+ export const AdminPunishmentSearchResponseKindEnum = {
40
+ Player: 'player',
41
+ Ip: 'ip'
42
+ };
29
43
  /**
30
44
  * AdminClientCredentialsApi - axios parameter creator
31
45
  */
@@ -1121,6 +1135,74 @@ export class AdminPlayersApi extends BaseAPI {
1121
1135
  */
1122
1136
  export const AdminPunishmentsApiAxiosParamCreator = function (configuration) {
1123
1137
  return {
1138
+ /**
1139
+ * Apply a punishment to one or more targets. Player targets are linked via player_punishment; IP targets are linked via connection_punishment. The authenticated user is recorded as the issuer.
1140
+ * @summary Apply punishment
1141
+ * @param {AdminApplyPunishmentRequest} adminApplyPunishmentRequest
1142
+ * @param {*} [options] Override http request option.
1143
+ * @throws {RequiredError}
1144
+ */
1145
+ applyPunishment: (adminApplyPunishmentRequest_1, ...args_1) => __awaiter(this, [adminApplyPunishmentRequest_1, ...args_1], void 0, function* (adminApplyPunishmentRequest, options = {}) {
1146
+ // verify required parameter 'adminApplyPunishmentRequest' is not null or undefined
1147
+ assertParamExists('applyPunishment', 'adminApplyPunishmentRequest', adminApplyPunishmentRequest);
1148
+ const localVarPath = `/admin/punishment/apply`;
1149
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1150
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1151
+ let baseOptions;
1152
+ if (configuration) {
1153
+ baseOptions = configuration.baseOptions;
1154
+ }
1155
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1156
+ const localVarHeaderParameter = {};
1157
+ const localVarQueryParameter = {};
1158
+ // authentication DiscordAuth required
1159
+ // http bearer authentication required
1160
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1161
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1162
+ localVarHeaderParameter['Accept'] = 'application/json';
1163
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1164
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1165
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1166
+ localVarRequestOptions.data = serializeDataIfNeeded(adminApplyPunishmentRequest, localVarRequestOptions, configuration);
1167
+ return {
1168
+ url: toPathString(localVarUrlObj),
1169
+ options: localVarRequestOptions,
1170
+ };
1171
+ }),
1172
+ /**
1173
+ * Preview the impact of a punishment across one or more targets. Returns current score, points to add, projected new score, and affected players per target. No changes are made.
1174
+ * @summary Evaluate punishment impact
1175
+ * @param {AdminCreatePunishmentDraftRequest} adminCreatePunishmentDraftRequest
1176
+ * @param {*} [options] Override http request option.
1177
+ * @throws {RequiredError}
1178
+ */
1179
+ createDraft: (adminCreatePunishmentDraftRequest_1, ...args_1) => __awaiter(this, [adminCreatePunishmentDraftRequest_1, ...args_1], void 0, function* (adminCreatePunishmentDraftRequest, options = {}) {
1180
+ // verify required parameter 'adminCreatePunishmentDraftRequest' is not null or undefined
1181
+ assertParamExists('createDraft', 'adminCreatePunishmentDraftRequest', adminCreatePunishmentDraftRequest);
1182
+ const localVarPath = `/admin/punishment/draft`;
1183
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1184
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1185
+ let baseOptions;
1186
+ if (configuration) {
1187
+ baseOptions = configuration.baseOptions;
1188
+ }
1189
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1190
+ const localVarHeaderParameter = {};
1191
+ const localVarQueryParameter = {};
1192
+ // authentication DiscordAuth required
1193
+ // http bearer authentication required
1194
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1195
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1196
+ localVarHeaderParameter['Accept'] = 'application/json';
1197
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1198
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1199
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1200
+ localVarRequestOptions.data = serializeDataIfNeeded(adminCreatePunishmentDraftRequest, localVarRequestOptions, configuration);
1201
+ return {
1202
+ url: toPathString(localVarUrlObj),
1203
+ options: localVarRequestOptions,
1204
+ };
1205
+ }),
1124
1206
  /**
1125
1207
  * Returns a paginated list of punishments with optional filtering by player UUID, username, IP address, type, and date range.
1126
1208
  * @summary List punishments
@@ -1129,7 +1211,7 @@ export const AdminPunishmentsApiAxiosParamCreator = function (configuration) {
1129
1211
  * @param {string | null} [uuid] Filter by player UUID
1130
1212
  * @param {string | null} [username] Filter by player username (case-insensitive substring match)
1131
1213
  * @param {string | null} [ipAddress] Filter by IP address
1132
- * @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, KICK, WARNING). Repeatable.
1214
+ * @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, WARNING). Repeatable.
1133
1215
  * @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (ms)
1134
1216
  * @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (ms)
1135
1217
  * @param {*} [options] Override http request option.
@@ -1186,6 +1268,41 @@ export const AdminPunishmentsApiAxiosParamCreator = function (configuration) {
1186
1268
  options: localVarRequestOptions,
1187
1269
  };
1188
1270
  }),
1271
+ /**
1272
+ * Search for players by UUID or username, or look up all players associated with an IP address. Used to populate the target table before issuing a punishment.
1273
+ * @summary Search punishment targets
1274
+ * @param {string} q UUID, username, or partial/full IP address to search for
1275
+ * @param {*} [options] Override http request option.
1276
+ * @throws {RequiredError}
1277
+ */
1278
+ searchTargets: (q_1, ...args_1) => __awaiter(this, [q_1, ...args_1], void 0, function* (q, options = {}) {
1279
+ // verify required parameter 'q' is not null or undefined
1280
+ assertParamExists('searchTargets', 'q', q);
1281
+ const localVarPath = `/admin/punishment/search`;
1282
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1283
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1284
+ let baseOptions;
1285
+ if (configuration) {
1286
+ baseOptions = configuration.baseOptions;
1287
+ }
1288
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1289
+ const localVarHeaderParameter = {};
1290
+ const localVarQueryParameter = {};
1291
+ // authentication DiscordAuth required
1292
+ // http bearer authentication required
1293
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1294
+ if (q !== undefined) {
1295
+ localVarQueryParameter['q'] = q;
1296
+ }
1297
+ localVarHeaderParameter['Accept'] = 'application/json';
1298
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1299
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1300
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1301
+ return {
1302
+ url: toPathString(localVarUrlObj),
1303
+ options: localVarRequestOptions,
1304
+ };
1305
+ }),
1189
1306
  };
1190
1307
  };
1191
1308
  /**
@@ -1194,6 +1311,38 @@ export const AdminPunishmentsApiAxiosParamCreator = function (configuration) {
1194
1311
  export const AdminPunishmentsApiFp = function (configuration) {
1195
1312
  const localVarAxiosParamCreator = AdminPunishmentsApiAxiosParamCreator(configuration);
1196
1313
  return {
1314
+ /**
1315
+ * Apply a punishment to one or more targets. Player targets are linked via player_punishment; IP targets are linked via connection_punishment. The authenticated user is recorded as the issuer.
1316
+ * @summary Apply punishment
1317
+ * @param {AdminApplyPunishmentRequest} adminApplyPunishmentRequest
1318
+ * @param {*} [options] Override http request option.
1319
+ * @throws {RequiredError}
1320
+ */
1321
+ applyPunishment(adminApplyPunishmentRequest, options) {
1322
+ return __awaiter(this, void 0, void 0, function* () {
1323
+ var _a, _b, _c;
1324
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.applyPunishment(adminApplyPunishmentRequest, options);
1325
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1326
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminPunishmentsApi.applyPunishment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1327
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1328
+ });
1329
+ },
1330
+ /**
1331
+ * Preview the impact of a punishment across one or more targets. Returns current score, points to add, projected new score, and affected players per target. No changes are made.
1332
+ * @summary Evaluate punishment impact
1333
+ * @param {AdminCreatePunishmentDraftRequest} adminCreatePunishmentDraftRequest
1334
+ * @param {*} [options] Override http request option.
1335
+ * @throws {RequiredError}
1336
+ */
1337
+ createDraft(adminCreatePunishmentDraftRequest, options) {
1338
+ return __awaiter(this, void 0, void 0, function* () {
1339
+ var _a, _b, _c;
1340
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createDraft(adminCreatePunishmentDraftRequest, options);
1341
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1342
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminPunishmentsApi.createDraft']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1343
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1344
+ });
1345
+ },
1197
1346
  /**
1198
1347
  * Returns a paginated list of punishments with optional filtering by player UUID, username, IP address, type, and date range.
1199
1348
  * @summary List punishments
@@ -1202,7 +1351,7 @@ export const AdminPunishmentsApiFp = function (configuration) {
1202
1351
  * @param {string | null} [uuid] Filter by player UUID
1203
1352
  * @param {string | null} [username] Filter by player username (case-insensitive substring match)
1204
1353
  * @param {string | null} [ipAddress] Filter by IP address
1205
- * @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, KICK, WARNING). Repeatable.
1354
+ * @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, WARNING). Repeatable.
1206
1355
  * @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (ms)
1207
1356
  * @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (ms)
1208
1357
  * @param {*} [options] Override http request option.
@@ -1217,6 +1366,22 @@ export const AdminPunishmentsApiFp = function (configuration) {
1217
1366
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1218
1367
  });
1219
1368
  },
1369
+ /**
1370
+ * Search for players by UUID or username, or look up all players associated with an IP address. Used to populate the target table before issuing a punishment.
1371
+ * @summary Search punishment targets
1372
+ * @param {string} q UUID, username, or partial/full IP address to search for
1373
+ * @param {*} [options] Override http request option.
1374
+ * @throws {RequiredError}
1375
+ */
1376
+ searchTargets(q, options) {
1377
+ return __awaiter(this, void 0, void 0, function* () {
1378
+ var _a, _b, _c;
1379
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.searchTargets(q, options);
1380
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1381
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminPunishmentsApi.searchTargets']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1382
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1383
+ });
1384
+ },
1220
1385
  };
1221
1386
  };
1222
1387
  /**
@@ -1225,6 +1390,26 @@ export const AdminPunishmentsApiFp = function (configuration) {
1225
1390
  export const AdminPunishmentsApiFactory = function (configuration, basePath, axios) {
1226
1391
  const localVarFp = AdminPunishmentsApiFp(configuration);
1227
1392
  return {
1393
+ /**
1394
+ * Apply a punishment to one or more targets. Player targets are linked via player_punishment; IP targets are linked via connection_punishment. The authenticated user is recorded as the issuer.
1395
+ * @summary Apply punishment
1396
+ * @param {AdminApplyPunishmentRequest} adminApplyPunishmentRequest
1397
+ * @param {*} [options] Override http request option.
1398
+ * @throws {RequiredError}
1399
+ */
1400
+ applyPunishment(adminApplyPunishmentRequest, options) {
1401
+ return localVarFp.applyPunishment(adminApplyPunishmentRequest, options).then((request) => request(axios, basePath));
1402
+ },
1403
+ /**
1404
+ * Preview the impact of a punishment across one or more targets. Returns current score, points to add, projected new score, and affected players per target. No changes are made.
1405
+ * @summary Evaluate punishment impact
1406
+ * @param {AdminCreatePunishmentDraftRequest} adminCreatePunishmentDraftRequest
1407
+ * @param {*} [options] Override http request option.
1408
+ * @throws {RequiredError}
1409
+ */
1410
+ createDraft(adminCreatePunishmentDraftRequest, options) {
1411
+ return localVarFp.createDraft(adminCreatePunishmentDraftRequest, options).then((request) => request(axios, basePath));
1412
+ },
1228
1413
  /**
1229
1414
  * Returns a paginated list of punishments with optional filtering by player UUID, username, IP address, type, and date range.
1230
1415
  * @summary List punishments
@@ -1233,7 +1418,7 @@ export const AdminPunishmentsApiFactory = function (configuration, basePath, axi
1233
1418
  * @param {string | null} [uuid] Filter by player UUID
1234
1419
  * @param {string | null} [username] Filter by player username (case-insensitive substring match)
1235
1420
  * @param {string | null} [ipAddress] Filter by IP address
1236
- * @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, KICK, WARNING). Repeatable.
1421
+ * @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, WARNING). Repeatable.
1237
1422
  * @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (ms)
1238
1423
  * @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (ms)
1239
1424
  * @param {*} [options] Override http request option.
@@ -1242,12 +1427,42 @@ export const AdminPunishmentsApiFactory = function (configuration, basePath, axi
1242
1427
  getPunishments(page, limit, uuid, username, ipAddress, type, issuedAfter, issuedBefore, options) {
1243
1428
  return localVarFp.getPunishments(page, limit, uuid, username, ipAddress, type, issuedAfter, issuedBefore, options).then((request) => request(axios, basePath));
1244
1429
  },
1430
+ /**
1431
+ * Search for players by UUID or username, or look up all players associated with an IP address. Used to populate the target table before issuing a punishment.
1432
+ * @summary Search punishment targets
1433
+ * @param {string} q UUID, username, or partial/full IP address to search for
1434
+ * @param {*} [options] Override http request option.
1435
+ * @throws {RequiredError}
1436
+ */
1437
+ searchTargets(q, options) {
1438
+ return localVarFp.searchTargets(q, options).then((request) => request(axios, basePath));
1439
+ },
1245
1440
  };
1246
1441
  };
1247
1442
  /**
1248
1443
  * AdminPunishmentsApi - object-oriented interface
1249
1444
  */
1250
1445
  export class AdminPunishmentsApi extends BaseAPI {
1446
+ /**
1447
+ * Apply a punishment to one or more targets. Player targets are linked via player_punishment; IP targets are linked via connection_punishment. The authenticated user is recorded as the issuer.
1448
+ * @summary Apply punishment
1449
+ * @param {AdminApplyPunishmentRequest} adminApplyPunishmentRequest
1450
+ * @param {*} [options] Override http request option.
1451
+ * @throws {RequiredError}
1452
+ */
1453
+ applyPunishment(adminApplyPunishmentRequest, options) {
1454
+ return AdminPunishmentsApiFp(this.configuration).applyPunishment(adminApplyPunishmentRequest, options).then((request) => request(this.axios, this.basePath));
1455
+ }
1456
+ /**
1457
+ * Preview the impact of a punishment across one or more targets. Returns current score, points to add, projected new score, and affected players per target. No changes are made.
1458
+ * @summary Evaluate punishment impact
1459
+ * @param {AdminCreatePunishmentDraftRequest} adminCreatePunishmentDraftRequest
1460
+ * @param {*} [options] Override http request option.
1461
+ * @throws {RequiredError}
1462
+ */
1463
+ createDraft(adminCreatePunishmentDraftRequest, options) {
1464
+ return AdminPunishmentsApiFp(this.configuration).createDraft(adminCreatePunishmentDraftRequest, options).then((request) => request(this.axios, this.basePath));
1465
+ }
1251
1466
  /**
1252
1467
  * Returns a paginated list of punishments with optional filtering by player UUID, username, IP address, type, and date range.
1253
1468
  * @summary List punishments
@@ -1256,7 +1471,7 @@ export class AdminPunishmentsApi extends BaseAPI {
1256
1471
  * @param {string | null} [uuid] Filter by player UUID
1257
1472
  * @param {string | null} [username] Filter by player username (case-insensitive substring match)
1258
1473
  * @param {string | null} [ipAddress] Filter by IP address
1259
- * @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, KICK, WARNING). Repeatable.
1474
+ * @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, WARNING). Repeatable.
1260
1475
  * @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (ms)
1261
1476
  * @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (ms)
1262
1477
  * @param {*} [options] Override http request option.
@@ -1265,6 +1480,16 @@ export class AdminPunishmentsApi extends BaseAPI {
1265
1480
  getPunishments(page, limit, uuid, username, ipAddress, type, issuedAfter, issuedBefore, options) {
1266
1481
  return AdminPunishmentsApiFp(this.configuration).getPunishments(page, limit, uuid, username, ipAddress, type, issuedAfter, issuedBefore, options).then((request) => request(this.axios, this.basePath));
1267
1482
  }
1483
+ /**
1484
+ * Search for players by UUID or username, or look up all players associated with an IP address. Used to populate the target table before issuing a punishment.
1485
+ * @summary Search punishment targets
1486
+ * @param {string} q UUID, username, or partial/full IP address to search for
1487
+ * @param {*} [options] Override http request option.
1488
+ * @throws {RequiredError}
1489
+ */
1490
+ searchTargets(q, options) {
1491
+ return AdminPunishmentsApiFp(this.configuration).searchTargets(q, options).then((request) => request(this.axios, this.basePath));
1492
+ }
1268
1493
  }
1269
1494
  /**
1270
1495
  * ConnectionApi - axios parameter creator
@@ -1639,74 +1864,6 @@ export class PlayerApi extends BaseAPI {
1639
1864
  */
1640
1865
  export const PunishmentApiAxiosParamCreator = function (configuration) {
1641
1866
  return {
1642
- /**
1643
- * Create and apply a punishment to a player. Automatically determines if permanent based on current score threshold (≥100%).
1644
- * @summary Apply a punishment
1645
- * @param {ApplyPunishmentRequest} applyPunishmentRequest
1646
- * @param {*} [options] Override http request option.
1647
- * @throws {RequiredError}
1648
- */
1649
- applyPunishment: (applyPunishmentRequest_1, ...args_1) => __awaiter(this, [applyPunishmentRequest_1, ...args_1], void 0, function* (applyPunishmentRequest, options = {}) {
1650
- // verify required parameter 'applyPunishmentRequest' is not null or undefined
1651
- assertParamExists('applyPunishment', 'applyPunishmentRequest', applyPunishmentRequest);
1652
- const localVarPath = `/v1/punishment/apply`;
1653
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1654
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1655
- let baseOptions;
1656
- if (configuration) {
1657
- baseOptions = configuration.baseOptions;
1658
- }
1659
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1660
- const localVarHeaderParameter = {};
1661
- const localVarQueryParameter = {};
1662
- // authentication DiscordAuth required
1663
- // http bearer authentication required
1664
- yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1665
- localVarHeaderParameter['Content-Type'] = 'application/json';
1666
- localVarHeaderParameter['Accept'] = 'application/json';
1667
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1668
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1669
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1670
- localVarRequestOptions.data = serializeDataIfNeeded(applyPunishmentRequest, localVarRequestOptions, configuration);
1671
- return {
1672
- url: toPathString(localVarUrlObj),
1673
- options: localVarRequestOptions,
1674
- };
1675
- }),
1676
- /**
1677
- * Preview punishment impact before applying. Returns calculated points, current/new thresholds, and whether it will be permanent.
1678
- * @summary Create a punishment draft
1679
- * @param {CreatePunishmentDraftRequest} createPunishmentDraftRequest
1680
- * @param {*} [options] Override http request option.
1681
- * @throws {RequiredError}
1682
- */
1683
- createPunishmentDraft: (createPunishmentDraftRequest_1, ...args_1) => __awaiter(this, [createPunishmentDraftRequest_1, ...args_1], void 0, function* (createPunishmentDraftRequest, options = {}) {
1684
- // verify required parameter 'createPunishmentDraftRequest' is not null or undefined
1685
- assertParamExists('createPunishmentDraft', 'createPunishmentDraftRequest', createPunishmentDraftRequest);
1686
- const localVarPath = `/v1/punishment/draft`;
1687
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1688
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1689
- let baseOptions;
1690
- if (configuration) {
1691
- baseOptions = configuration.baseOptions;
1692
- }
1693
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1694
- const localVarHeaderParameter = {};
1695
- const localVarQueryParameter = {};
1696
- // authentication DiscordAuth required
1697
- // http bearer authentication required
1698
- yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1699
- localVarHeaderParameter['Content-Type'] = 'application/json';
1700
- localVarHeaderParameter['Accept'] = 'application/json';
1701
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1702
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1703
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1704
- localVarRequestOptions.data = serializeDataIfNeeded(createPunishmentDraftRequest, localVarRequestOptions, configuration);
1705
- return {
1706
- url: toPathString(localVarUrlObj),
1707
- options: localVarRequestOptions,
1708
- };
1709
- }),
1710
1867
  /**
1711
1868
  * Retrieve duration information for each punishment type and severity level (1-10)
1712
1869
  * @summary Get punishment severities
@@ -1893,38 +2050,6 @@ export const PunishmentApiAxiosParamCreator = function (configuration) {
1893
2050
  export const PunishmentApiFp = function (configuration) {
1894
2051
  const localVarAxiosParamCreator = PunishmentApiAxiosParamCreator(configuration);
1895
2052
  return {
1896
- /**
1897
- * Create and apply a punishment to a player. Automatically determines if permanent based on current score threshold (≥100%).
1898
- * @summary Apply a punishment
1899
- * @param {ApplyPunishmentRequest} applyPunishmentRequest
1900
- * @param {*} [options] Override http request option.
1901
- * @throws {RequiredError}
1902
- */
1903
- applyPunishment(applyPunishmentRequest, options) {
1904
- return __awaiter(this, void 0, void 0, function* () {
1905
- var _a, _b, _c;
1906
- const localVarAxiosArgs = yield localVarAxiosParamCreator.applyPunishment(applyPunishmentRequest, options);
1907
- const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1908
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PunishmentApi.applyPunishment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1909
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1910
- });
1911
- },
1912
- /**
1913
- * Preview punishment impact before applying. Returns calculated points, current/new thresholds, and whether it will be permanent.
1914
- * @summary Create a punishment draft
1915
- * @param {CreatePunishmentDraftRequest} createPunishmentDraftRequest
1916
- * @param {*} [options] Override http request option.
1917
- * @throws {RequiredError}
1918
- */
1919
- createPunishmentDraft(createPunishmentDraftRequest, options) {
1920
- return __awaiter(this, void 0, void 0, function* () {
1921
- var _a, _b, _c;
1922
- const localVarAxiosArgs = yield localVarAxiosParamCreator.createPunishmentDraft(createPunishmentDraftRequest, options);
1923
- const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1924
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PunishmentApi.createPunishmentDraft']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1925
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1926
- });
1927
- },
1928
2053
  /**
1929
2054
  * Retrieve duration information for each punishment type and severity level (1-10)
1930
2055
  * @summary Get punishment severities
@@ -2007,26 +2132,6 @@ export const PunishmentApiFp = function (configuration) {
2007
2132
  export const PunishmentApiFactory = function (configuration, basePath, axios) {
2008
2133
  const localVarFp = PunishmentApiFp(configuration);
2009
2134
  return {
2010
- /**
2011
- * Create and apply a punishment to a player. Automatically determines if permanent based on current score threshold (≥100%).
2012
- * @summary Apply a punishment
2013
- * @param {ApplyPunishmentRequest} applyPunishmentRequest
2014
- * @param {*} [options] Override http request option.
2015
- * @throws {RequiredError}
2016
- */
2017
- applyPunishment(applyPunishmentRequest, options) {
2018
- return localVarFp.applyPunishment(applyPunishmentRequest, options).then((request) => request(axios, basePath));
2019
- },
2020
- /**
2021
- * Preview punishment impact before applying. Returns calculated points, current/new thresholds, and whether it will be permanent.
2022
- * @summary Create a punishment draft
2023
- * @param {CreatePunishmentDraftRequest} createPunishmentDraftRequest
2024
- * @param {*} [options] Override http request option.
2025
- * @throws {RequiredError}
2026
- */
2027
- createPunishmentDraft(createPunishmentDraftRequest, options) {
2028
- return localVarFp.createPunishmentDraft(createPunishmentDraftRequest, options).then((request) => request(axios, basePath));
2029
- },
2030
2135
  /**
2031
2136
  * Retrieve duration information for each punishment type and severity level (1-10)
2032
2137
  * @summary Get punishment severities
@@ -2083,26 +2188,6 @@ export const PunishmentApiFactory = function (configuration, basePath, axios) {
2083
2188
  * PunishmentApi - object-oriented interface
2084
2189
  */
2085
2190
  export class PunishmentApi extends BaseAPI {
2086
- /**
2087
- * Create and apply a punishment to a player. Automatically determines if permanent based on current score threshold (≥100%).
2088
- * @summary Apply a punishment
2089
- * @param {ApplyPunishmentRequest} applyPunishmentRequest
2090
- * @param {*} [options] Override http request option.
2091
- * @throws {RequiredError}
2092
- */
2093
- applyPunishment(applyPunishmentRequest, options) {
2094
- return PunishmentApiFp(this.configuration).applyPunishment(applyPunishmentRequest, options).then((request) => request(this.axios, this.basePath));
2095
- }
2096
- /**
2097
- * Preview punishment impact before applying. Returns calculated points, current/new thresholds, and whether it will be permanent.
2098
- * @summary Create a punishment draft
2099
- * @param {CreatePunishmentDraftRequest} createPunishmentDraftRequest
2100
- * @param {*} [options] Override http request option.
2101
- * @throws {RequiredError}
2102
- */
2103
- createPunishmentDraft(createPunishmentDraftRequest, options) {
2104
- return PunishmentApiFp(this.configuration).createPunishmentDraft(createPunishmentDraftRequest, options).then((request) => request(this.axios, this.basePath));
2105
- }
2106
2191
  /**
2107
2192
  * Retrieve duration information for each punishment type and severity level (1-10)
2108
2193
  * @summary Get punishment severities
@@ -2,7 +2,7 @@
2
2
  * Reborn API
3
3
  * 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
4
4
  *
5
- * The version of the OpenAPI document: 2.6.0
5
+ * The version of the OpenAPI document: 2.6.4
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/esm/base.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * Reborn API
5
5
  * The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
6
6
  *
7
- * The version of the OpenAPI document: 2.6.0
7
+ * The version of the OpenAPI document: 2.6.4
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Reborn API
3
3
  * 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
4
4
  *
5
- * The version of the OpenAPI document: 2.6.0
5
+ * The version of the OpenAPI document: 2.6.4
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Reborn API
5
5
  * The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
6
6
  *
7
- * The version of the OpenAPI document: 2.6.0
7
+ * The version of the OpenAPI document: 2.6.4
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Reborn API
3
3
  * 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
4
4
  *
5
- * The version of the OpenAPI document: 2.6.0
5
+ * The version of the OpenAPI document: 2.6.4
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -3,7 +3,7 @@
3
3
  * Reborn API
4
4
  * 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
5
5
  *
6
- * The version of the OpenAPI document: 2.6.0
6
+ * The version of the OpenAPI document: 2.6.4
7
7
  *
8
8
  *
9
9
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Reborn API
3
3
  * 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
4
4
  *
5
- * The version of the OpenAPI document: 2.6.0
5
+ * The version of the OpenAPI document: 2.6.4
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/esm/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * Reborn API
5
5
  * The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
6
6
  *
7
- * The version of the OpenAPI document: 2.6.0
7
+ * The version of the OpenAPI document: 2.6.4
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Reborn API
3
3
  * 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
4
4
  *
5
- * The version of the OpenAPI document: 2.6.0
5
+ * The version of the OpenAPI document: 2.6.4
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/index.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.6.0
8
+ * The version of the OpenAPI document: 2.6.4
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -0,0 +1,33 @@
1
+ # AdminApplyPunishmentRequest
2
+
3
+ Request to apply a punishment to one or more targets
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **targets** | [**Array&lt;AdminPunishmentTarget&gt;**](AdminPunishmentTarget.md) | List of targets to punish — each must have either a uuid or ipAddress | [default to undefined]
10
+ **type** | **string** | Punishment type | [default to undefined]
11
+ **severity** | **number** | Severity level: 1&#x3D;Minor, 2&#x3D;Moderate, 3&#x3D;Severe, 4&#x3D;Critical | [optional] [default to undefined]
12
+ **reason** | **string** | Reason for the punishment | [default to undefined]
13
+ **durationSeconds** | **number** | Custom duration in seconds — if omitted the suggested duration for the type and severity is used | [optional] [default to undefined]
14
+ **forcePermanent** | **boolean** | Force the punishment to be permanent regardless of the target\&#39;s current score | [optional] [default to false]
15
+ **notes** | **string** | Internal notes visible only to administrators — not shown to the punished player | [optional] [default to undefined]
16
+
17
+ ## Example
18
+
19
+ ```typescript
20
+ import { AdminApplyPunishmentRequest } from '@rebornteam/reborn-api';
21
+
22
+ const instance: AdminApplyPunishmentRequest = {
23
+ targets,
24
+ type,
25
+ severity,
26
+ reason,
27
+ durationSeconds,
28
+ forcePermanent,
29
+ notes,
30
+ };
31
+ ```
32
+
33
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)