@rebornteam/reborn-api 2.6.4 → 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/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.4
7
+ * The version of the OpenAPI document: 2.7.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -1492,26 +1492,20 @@ export class AdminPunishmentsApi extends BaseAPI {
1492
1492
  }
1493
1493
  }
1494
1494
  /**
1495
- * ConnectionApi - axios parameter creator
1495
+ * AuthenticationApi - axios parameter creator
1496
1496
  */
1497
- export const ConnectionApiAxiosParamCreator = function (configuration) {
1497
+ export const AuthenticationApiAxiosParamCreator = function (configuration) {
1498
1498
  return {
1499
1499
  /**
1500
- * 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.
1501
- * @summary Check Connection and Detect VPN/Proxy
1502
- * @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
1503
- * @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
1504
- * @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\'s history - Update the player\'s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\'t block the response.
1500
+ * Receives the authorization code from Discord after the user approves the OAuth2 prompt. Exchanges the code for an access token, verifies the user holds an admin guild role, then redirects back to the admin frontend with a signed JWT in the query string (`?token=...`). On failure, redirects with `?error=<reason>` instead.
1501
+ * @summary Discord - OAuth2 callback
1502
+ * @param {string | null} [code] Authorization code provided by Discord on successful approval
1503
+ * @param {string | null} [error] Error code provided by Discord if the user denied access
1505
1504
  * @param {*} [options] Override http request option.
1506
1505
  * @throws {RequiredError}
1507
1506
  */
1508
- 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 = {}) {
1509
- // verify required parameter 'ip' is not null or undefined
1510
- assertParamExists('getConnectionDetails', 'ip', ip);
1511
- // verify required parameter 'forceRecheck' is not null or undefined
1512
- assertParamExists('getConnectionDetails', 'forceRecheck', forceRecheck);
1513
- const localVarPath = `/v1/connection/get-connection-details/{ip}`
1514
- .replace(`{${"ip"}}`, encodeURIComponent(String(ip)));
1507
+ callback: (code_1, error_1, ...args_1) => __awaiter(this, [code_1, error_1, ...args_1], void 0, function* (code, error, options = {}) {
1508
+ const localVarPath = `/auth/discord/callback`;
1515
1509
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1516
1510
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1517
1511
  let baseOptions;
@@ -1524,16 +1518,87 @@ export const ConnectionApiAxiosParamCreator = function (configuration) {
1524
1518
  // authentication DiscordAuth required
1525
1519
  // http bearer authentication required
1526
1520
  yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1527
- if (forceRecheck !== undefined) {
1528
- localVarQueryParameter['force_recheck'] = forceRecheck;
1521
+ if (code !== undefined) {
1522
+ localVarQueryParameter['code'] = code;
1529
1523
  }
1530
- if (associateUuid !== undefined) {
1531
- localVarQueryParameter['associate_uuid'] = associateUuid;
1524
+ if (error !== undefined) {
1525
+ localVarQueryParameter['error'] = error;
1532
1526
  }
1527
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1528
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1529
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1530
+ return {
1531
+ url: toPathString(localVarUrlObj),
1532
+ options: localVarRequestOptions,
1533
+ };
1534
+ }),
1535
+ /**
1536
+ * Redirects the browser to Discord\'s OAuth2 authorization page. Not called directly — the admin frontend navigates to this URL to begin the login flow.
1537
+ * @summary Discord - Initiate login
1538
+ * @param {*} [options] Override http request option.
1539
+ * @throws {RequiredError}
1540
+ */
1541
+ initiateLogin: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
1542
+ const localVarPath = `/auth/discord`;
1543
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1544
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1545
+ let baseOptions;
1546
+ if (configuration) {
1547
+ baseOptions = configuration.baseOptions;
1548
+ }
1549
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1550
+ const localVarHeaderParameter = {};
1551
+ const localVarQueryParameter = {};
1552
+ // authentication DiscordAuth required
1553
+ // http bearer authentication required
1554
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1555
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1556
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1557
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1558
+ return {
1559
+ url: toPathString(localVarUrlObj),
1560
+ options: localVarRequestOptions,
1561
+ };
1562
+ }),
1563
+ /**
1564
+ * Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
1565
+ * @summary Service - Exchange client credentials for token
1566
+ * @param {string | null} [grantType]
1567
+ * @param {string | null} [clientId]
1568
+ * @param {string | null} [clientSecret]
1569
+ * @param {*} [options] Override http request option.
1570
+ * @throws {RequiredError}
1571
+ */
1572
+ token: (grantType_1, clientId_1, clientSecret_1, ...args_1) => __awaiter(this, [grantType_1, clientId_1, clientSecret_1, ...args_1], void 0, function* (grantType, clientId, clientSecret, options = {}) {
1573
+ const localVarPath = `/oauth/token`;
1574
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1575
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1576
+ let baseOptions;
1577
+ if (configuration) {
1578
+ baseOptions = configuration.baseOptions;
1579
+ }
1580
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1581
+ const localVarHeaderParameter = {};
1582
+ const localVarQueryParameter = {};
1583
+ const localVarFormParams = new URLSearchParams();
1584
+ // authentication DiscordAuth required
1585
+ // http bearer authentication required
1586
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1587
+ if (grantType !== undefined) {
1588
+ localVarFormParams.set('grant_type', grantType);
1589
+ }
1590
+ if (clientId !== undefined) {
1591
+ localVarFormParams.set('client_id', clientId);
1592
+ }
1593
+ if (clientSecret !== undefined) {
1594
+ localVarFormParams.set('client_secret', clientSecret);
1595
+ }
1596
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
1533
1597
  localVarHeaderParameter['Accept'] = 'application/json';
1534
1598
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1535
1599
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1536
1600
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1601
+ localVarRequestOptions.data = localVarFormParams.toString();
1537
1602
  return {
1538
1603
  url: toPathString(localVarUrlObj),
1539
1604
  options: localVarRequestOptions,
@@ -1542,82 +1607,158 @@ export const ConnectionApiAxiosParamCreator = function (configuration) {
1542
1607
  };
1543
1608
  };
1544
1609
  /**
1545
- * ConnectionApi - functional programming interface
1610
+ * AuthenticationApi - functional programming interface
1546
1611
  */
1547
- export const ConnectionApiFp = function (configuration) {
1548
- const localVarAxiosParamCreator = ConnectionApiAxiosParamCreator(configuration);
1612
+ export const AuthenticationApiFp = function (configuration) {
1613
+ const localVarAxiosParamCreator = AuthenticationApiAxiosParamCreator(configuration);
1549
1614
  return {
1550
1615
  /**
1551
- * 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.
1552
- * @summary Check Connection and Detect VPN/Proxy
1553
- * @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
1554
- * @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
1555
- * @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\&#39;s history - Update the player\&#39;s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\&#39;t block the response.
1616
+ * Receives the authorization code from Discord after the user approves the OAuth2 prompt. Exchanges the code for an access token, verifies the user holds an admin guild role, then redirects back to the admin frontend with a signed JWT in the query string (`?token=...`). On failure, redirects with `?error=<reason>` instead.
1617
+ * @summary Discord - OAuth2 callback
1618
+ * @param {string | null} [code] Authorization code provided by Discord on successful approval
1619
+ * @param {string | null} [error] Error code provided by Discord if the user denied access
1556
1620
  * @param {*} [options] Override http request option.
1557
1621
  * @throws {RequiredError}
1558
1622
  */
1559
- getConnectionDetails(ip, forceRecheck, associateUuid, options) {
1623
+ callback(code, error, options) {
1560
1624
  return __awaiter(this, void 0, void 0, function* () {
1561
1625
  var _a, _b, _c;
1562
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getConnectionDetails(ip, forceRecheck, associateUuid, options);
1626
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.callback(code, error, options);
1563
1627
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1564
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ConnectionApi.getConnectionDetails']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1628
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AuthenticationApi.callback']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1629
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1630
+ });
1631
+ },
1632
+ /**
1633
+ * Redirects the browser to Discord\'s OAuth2 authorization page. Not called directly — the admin frontend navigates to this URL to begin the login flow.
1634
+ * @summary Discord - Initiate login
1635
+ * @param {*} [options] Override http request option.
1636
+ * @throws {RequiredError}
1637
+ */
1638
+ initiateLogin(options) {
1639
+ return __awaiter(this, void 0, void 0, function* () {
1640
+ var _a, _b, _c;
1641
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.initiateLogin(options);
1642
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1643
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AuthenticationApi.initiateLogin']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1644
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1645
+ });
1646
+ },
1647
+ /**
1648
+ * Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
1649
+ * @summary Service - Exchange client credentials for token
1650
+ * @param {string | null} [grantType]
1651
+ * @param {string | null} [clientId]
1652
+ * @param {string | null} [clientSecret]
1653
+ * @param {*} [options] Override http request option.
1654
+ * @throws {RequiredError}
1655
+ */
1656
+ token(grantType, clientId, clientSecret, options) {
1657
+ return __awaiter(this, void 0, void 0, function* () {
1658
+ var _a, _b, _c;
1659
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.token(grantType, clientId, clientSecret, options);
1660
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1661
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AuthenticationApi.token']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1565
1662
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1566
1663
  });
1567
1664
  },
1568
1665
  };
1569
1666
  };
1570
1667
  /**
1571
- * ConnectionApi - factory interface
1668
+ * AuthenticationApi - factory interface
1572
1669
  */
1573
- export const ConnectionApiFactory = function (configuration, basePath, axios) {
1574
- const localVarFp = ConnectionApiFp(configuration);
1670
+ export const AuthenticationApiFactory = function (configuration, basePath, axios) {
1671
+ const localVarFp = AuthenticationApiFp(configuration);
1575
1672
  return {
1576
1673
  /**
1577
- * 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.
1578
- * @summary Check Connection and Detect VPN/Proxy
1579
- * @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
1580
- * @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
1581
- * @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\&#39;s history - Update the player\&#39;s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\&#39;t block the response.
1674
+ * Receives the authorization code from Discord after the user approves the OAuth2 prompt. Exchanges the code for an access token, verifies the user holds an admin guild role, then redirects back to the admin frontend with a signed JWT in the query string (`?token=...`). On failure, redirects with `?error=<reason>` instead.
1675
+ * @summary Discord - OAuth2 callback
1676
+ * @param {string | null} [code] Authorization code provided by Discord on successful approval
1677
+ * @param {string | null} [error] Error code provided by Discord if the user denied access
1582
1678
  * @param {*} [options] Override http request option.
1583
1679
  * @throws {RequiredError}
1584
1680
  */
1585
- getConnectionDetails(ip, forceRecheck, associateUuid, options) {
1586
- return localVarFp.getConnectionDetails(ip, forceRecheck, associateUuid, options).then((request) => request(axios, basePath));
1681
+ callback(code, error, options) {
1682
+ return localVarFp.callback(code, error, options).then((request) => request(axios, basePath));
1683
+ },
1684
+ /**
1685
+ * Redirects the browser to Discord\'s OAuth2 authorization page. Not called directly — the admin frontend navigates to this URL to begin the login flow.
1686
+ * @summary Discord - Initiate login
1687
+ * @param {*} [options] Override http request option.
1688
+ * @throws {RequiredError}
1689
+ */
1690
+ initiateLogin(options) {
1691
+ return localVarFp.initiateLogin(options).then((request) => request(axios, basePath));
1692
+ },
1693
+ /**
1694
+ * Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
1695
+ * @summary Service - Exchange client credentials for token
1696
+ * @param {string | null} [grantType]
1697
+ * @param {string | null} [clientId]
1698
+ * @param {string | null} [clientSecret]
1699
+ * @param {*} [options] Override http request option.
1700
+ * @throws {RequiredError}
1701
+ */
1702
+ token(grantType, clientId, clientSecret, options) {
1703
+ return localVarFp.token(grantType, clientId, clientSecret, options).then((request) => request(axios, basePath));
1587
1704
  },
1588
1705
  };
1589
1706
  };
1590
1707
  /**
1591
- * ConnectionApi - object-oriented interface
1708
+ * AuthenticationApi - object-oriented interface
1592
1709
  */
1593
- export class ConnectionApi extends BaseAPI {
1710
+ export class AuthenticationApi extends BaseAPI {
1594
1711
  /**
1595
- * 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.
1596
- * @summary Check Connection and Detect VPN/Proxy
1597
- * @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
1598
- * @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
1599
- * @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\&#39;s history - Update the player\&#39;s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\&#39;t block the response.
1712
+ * Receives the authorization code from Discord after the user approves the OAuth2 prompt. Exchanges the code for an access token, verifies the user holds an admin guild role, then redirects back to the admin frontend with a signed JWT in the query string (`?token=...`). On failure, redirects with `?error=<reason>` instead.
1713
+ * @summary Discord - OAuth2 callback
1714
+ * @param {string | null} [code] Authorization code provided by Discord on successful approval
1715
+ * @param {string | null} [error] Error code provided by Discord if the user denied access
1600
1716
  * @param {*} [options] Override http request option.
1601
1717
  * @throws {RequiredError}
1602
1718
  */
1603
- getConnectionDetails(ip, forceRecheck, associateUuid, options) {
1604
- return ConnectionApiFp(this.configuration).getConnectionDetails(ip, forceRecheck, associateUuid, options).then((request) => request(this.axios, this.basePath));
1719
+ callback(code, error, options) {
1720
+ return AuthenticationApiFp(this.configuration).callback(code, error, options).then((request) => request(this.axios, this.basePath));
1721
+ }
1722
+ /**
1723
+ * Redirects the browser to Discord\'s OAuth2 authorization page. Not called directly — the admin frontend navigates to this URL to begin the login flow.
1724
+ * @summary Discord - Initiate login
1725
+ * @param {*} [options] Override http request option.
1726
+ * @throws {RequiredError}
1727
+ */
1728
+ initiateLogin(options) {
1729
+ return AuthenticationApiFp(this.configuration).initiateLogin(options).then((request) => request(this.axios, this.basePath));
1730
+ }
1731
+ /**
1732
+ * Exchange service client credentials for a Bearer JWT using the OAuth2 client_credentials grant. Used by game server plugins to authenticate against the API.
1733
+ * @summary Service - Exchange client credentials for token
1734
+ * @param {string | null} [grantType]
1735
+ * @param {string | null} [clientId]
1736
+ * @param {string | null} [clientSecret]
1737
+ * @param {*} [options] Override http request option.
1738
+ * @throws {RequiredError}
1739
+ */
1740
+ token(grantType, clientId, clientSecret, options) {
1741
+ return AuthenticationApiFp(this.configuration).token(grantType, clientId, clientSecret, options).then((request) => request(this.axios, this.basePath));
1605
1742
  }
1606
1743
  }
1607
1744
  /**
1608
- * DefaultApi - axios parameter creator
1745
+ * ChatApi - axios parameter creator
1609
1746
  */
1610
- export const DefaultApiAxiosParamCreator = function (configuration) {
1747
+ export const ChatApiAxiosParamCreator = function (configuration) {
1611
1748
  return {
1612
1749
  /**
1613
- *
1614
- * @param {string | null} [code]
1615
- * @param {string | null} [error]
1750
+ * Returns up to `limit` chat messages before the given `before` timestamp (keyset pagination). Results are returned in ascending chronological order. Omit `before` to start from the current time. Scroll back through history by passing the `sentAt` of the oldest message received as the next `before` value.
1751
+ * @summary Get chat history
1752
+ * @param {number} limit Maximum number of messages to return (1–100)
1753
+ * @param {string | null} [sessionId] Filter to a specific server session. Omit for global history.
1754
+ * @param {string | null} [before] ISO-8601 timestamp cursor — return messages sent before this time. Omit to start from now.
1616
1755
  * @param {*} [options] Override http request option.
1617
1756
  * @throws {RequiredError}
1618
1757
  */
1619
- callback: (code_1, error_1, ...args_1) => __awaiter(this, [code_1, error_1, ...args_1], void 0, function* (code, error, options = {}) {
1620
- const localVarPath = `/auth/discord/callback`;
1758
+ history: (limit_1, sessionId_1, before_1, ...args_1) => __awaiter(this, [limit_1, sessionId_1, before_1, ...args_1], void 0, function* (limit, sessionId, before, options = {}) {
1759
+ // verify required parameter 'limit' is not null or undefined
1760
+ assertParamExists('history', 'limit', limit);
1761
+ const localVarPath = `/v1/chat`;
1621
1762
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1622
1763
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1623
1764
  let baseOptions;
@@ -1630,11 +1771,14 @@ export const DefaultApiAxiosParamCreator = function (configuration) {
1630
1771
  // authentication DiscordAuth required
1631
1772
  // http bearer authentication required
1632
1773
  yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1633
- if (code !== undefined) {
1634
- localVarQueryParameter['code'] = code;
1774
+ if (sessionId !== undefined) {
1775
+ localVarQueryParameter['sessionId'] = sessionId;
1635
1776
  }
1636
- if (error !== undefined) {
1637
- localVarQueryParameter['error'] = error;
1777
+ if (before !== undefined) {
1778
+ localVarQueryParameter['before'] = before;
1779
+ }
1780
+ if (limit !== undefined) {
1781
+ localVarQueryParameter['limit'] = limit;
1638
1782
  }
1639
1783
  localVarHeaderParameter['Accept'] = 'application/json';
1640
1784
  setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -1646,28 +1790,34 @@ export const DefaultApiAxiosParamCreator = function (configuration) {
1646
1790
  };
1647
1791
  }),
1648
1792
  /**
1649
- *
1793
+ * Stores a chat message from a game server and fans it out to all connected WebSocket clients via PostgreSQL LISTEN/NOTIFY. The session must be currently online. Only the player UUID is stored — usernames are resolved on the web UI from the player database cache.
1794
+ * @summary Ingest a chat message
1795
+ * @param {ChatMessageRequest} chatMessageRequest
1650
1796
  * @param {*} [options] Override http request option.
1651
1797
  * @throws {RequiredError}
1652
1798
  */
1653
- initiateLogin: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
1654
- const localVarPath = `/auth/discord`;
1799
+ ingest: (chatMessageRequest_1, ...args_1) => __awaiter(this, [chatMessageRequest_1, ...args_1], void 0, function* (chatMessageRequest, options = {}) {
1800
+ // verify required parameter 'chatMessageRequest' is not null or undefined
1801
+ assertParamExists('ingest', 'chatMessageRequest', chatMessageRequest);
1802
+ const localVarPath = `/v1/chat`;
1655
1803
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1656
1804
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1657
1805
  let baseOptions;
1658
1806
  if (configuration) {
1659
1807
  baseOptions = configuration.baseOptions;
1660
1808
  }
1661
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1809
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1662
1810
  const localVarHeaderParameter = {};
1663
1811
  const localVarQueryParameter = {};
1664
1812
  // authentication DiscordAuth required
1665
1813
  // http bearer authentication required
1666
1814
  yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1815
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1667
1816
  localVarHeaderParameter['Accept'] = 'application/json';
1668
1817
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1669
1818
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1670
1819
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1820
+ localVarRequestOptions.data = serializeDataIfNeeded(chatMessageRequest, localVarRequestOptions, configuration);
1671
1821
  return {
1672
1822
  url: toPathString(localVarUrlObj),
1673
1823
  options: localVarRequestOptions,
@@ -1676,90 +1826,215 @@ export const DefaultApiAxiosParamCreator = function (configuration) {
1676
1826
  };
1677
1827
  };
1678
1828
  /**
1679
- * DefaultApi - functional programming interface
1829
+ * ChatApi - functional programming interface
1680
1830
  */
1681
- export const DefaultApiFp = function (configuration) {
1682
- const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration);
1831
+ export const ChatApiFp = function (configuration) {
1832
+ const localVarAxiosParamCreator = ChatApiAxiosParamCreator(configuration);
1683
1833
  return {
1684
1834
  /**
1685
- *
1686
- * @param {string | null} [code]
1687
- * @param {string | null} [error]
1835
+ * Returns up to `limit` chat messages before the given `before` timestamp (keyset pagination). Results are returned in ascending chronological order. Omit `before` to start from the current time. Scroll back through history by passing the `sentAt` of the oldest message received as the next `before` value.
1836
+ * @summary Get chat history
1837
+ * @param {number} limit Maximum number of messages to return (1–100)
1838
+ * @param {string | null} [sessionId] Filter to a specific server session. Omit for global history.
1839
+ * @param {string | null} [before] ISO-8601 timestamp cursor — return messages sent before this time. Omit to start from now.
1688
1840
  * @param {*} [options] Override http request option.
1689
1841
  * @throws {RequiredError}
1690
1842
  */
1691
- callback(code, error, options) {
1843
+ history(limit, sessionId, before, options) {
1692
1844
  return __awaiter(this, void 0, void 0, function* () {
1693
1845
  var _a, _b, _c;
1694
- const localVarAxiosArgs = yield localVarAxiosParamCreator.callback(code, error, options);
1846
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.history(limit, sessionId, before, options);
1695
1847
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1696
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DefaultApi.callback']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1848
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ChatApi.history']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1697
1849
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1698
1850
  });
1699
1851
  },
1700
1852
  /**
1701
- *
1853
+ * Stores a chat message from a game server and fans it out to all connected WebSocket clients via PostgreSQL LISTEN/NOTIFY. The session must be currently online. Only the player UUID is stored — usernames are resolved on the web UI from the player database cache.
1854
+ * @summary Ingest a chat message
1855
+ * @param {ChatMessageRequest} chatMessageRequest
1702
1856
  * @param {*} [options] Override http request option.
1703
1857
  * @throws {RequiredError}
1704
1858
  */
1705
- initiateLogin(options) {
1859
+ ingest(chatMessageRequest, options) {
1706
1860
  return __awaiter(this, void 0, void 0, function* () {
1707
1861
  var _a, _b, _c;
1708
- const localVarAxiosArgs = yield localVarAxiosParamCreator.initiateLogin(options);
1862
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.ingest(chatMessageRequest, options);
1709
1863
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1710
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DefaultApi.initiateLogin']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1864
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ChatApi.ingest']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1711
1865
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1712
1866
  });
1713
1867
  },
1714
1868
  };
1715
1869
  };
1716
1870
  /**
1717
- * DefaultApi - factory interface
1871
+ * ChatApi - factory interface
1718
1872
  */
1719
- export const DefaultApiFactory = function (configuration, basePath, axios) {
1720
- const localVarFp = DefaultApiFp(configuration);
1873
+ export const ChatApiFactory = function (configuration, basePath, axios) {
1874
+ const localVarFp = ChatApiFp(configuration);
1721
1875
  return {
1722
1876
  /**
1723
- *
1724
- * @param {string | null} [code]
1725
- * @param {string | null} [error]
1877
+ * Returns up to `limit` chat messages before the given `before` timestamp (keyset pagination). Results are returned in ascending chronological order. Omit `before` to start from the current time. Scroll back through history by passing the `sentAt` of the oldest message received as the next `before` value.
1878
+ * @summary Get chat history
1879
+ * @param {number} limit Maximum number of messages to return (1–100)
1880
+ * @param {string | null} [sessionId] Filter to a specific server session. Omit for global history.
1881
+ * @param {string | null} [before] ISO-8601 timestamp cursor — return messages sent before this time. Omit to start from now.
1726
1882
  * @param {*} [options] Override http request option.
1727
1883
  * @throws {RequiredError}
1728
1884
  */
1729
- callback(code, error, options) {
1730
- return localVarFp.callback(code, error, options).then((request) => request(axios, basePath));
1885
+ history(limit, sessionId, before, options) {
1886
+ return localVarFp.history(limit, sessionId, before, options).then((request) => request(axios, basePath));
1731
1887
  },
1732
1888
  /**
1733
- *
1889
+ * Stores a chat message from a game server and fans it out to all connected WebSocket clients via PostgreSQL LISTEN/NOTIFY. The session must be currently online. Only the player UUID is stored — usernames are resolved on the web UI from the player database cache.
1890
+ * @summary Ingest a chat message
1891
+ * @param {ChatMessageRequest} chatMessageRequest
1734
1892
  * @param {*} [options] Override http request option.
1735
1893
  * @throws {RequiredError}
1736
1894
  */
1737
- initiateLogin(options) {
1738
- return localVarFp.initiateLogin(options).then((request) => request(axios, basePath));
1895
+ ingest(chatMessageRequest, options) {
1896
+ return localVarFp.ingest(chatMessageRequest, options).then((request) => request(axios, basePath));
1739
1897
  },
1740
1898
  };
1741
1899
  };
1742
1900
  /**
1743
- * DefaultApi - object-oriented interface
1901
+ * ChatApi - object-oriented interface
1744
1902
  */
1745
- export class DefaultApi extends BaseAPI {
1903
+ export class ChatApi extends BaseAPI {
1746
1904
  /**
1747
- *
1748
- * @param {string | null} [code]
1749
- * @param {string | null} [error]
1905
+ * Returns up to `limit` chat messages before the given `before` timestamp (keyset pagination). Results are returned in ascending chronological order. Omit `before` to start from the current time. Scroll back through history by passing the `sentAt` of the oldest message received as the next `before` value.
1906
+ * @summary Get chat history
1907
+ * @param {number} limit Maximum number of messages to return (1–100)
1908
+ * @param {string | null} [sessionId] Filter to a specific server session. Omit for global history.
1909
+ * @param {string | null} [before] ISO-8601 timestamp cursor — return messages sent before this time. Omit to start from now.
1750
1910
  * @param {*} [options] Override http request option.
1751
1911
  * @throws {RequiredError}
1752
1912
  */
1753
- callback(code, error, options) {
1754
- return DefaultApiFp(this.configuration).callback(code, error, options).then((request) => request(this.axios, this.basePath));
1913
+ history(limit, sessionId, before, options) {
1914
+ return ChatApiFp(this.configuration).history(limit, sessionId, before, options).then((request) => request(this.axios, this.basePath));
1755
1915
  }
1756
1916
  /**
1757
- *
1917
+ * Stores a chat message from a game server and fans it out to all connected WebSocket clients via PostgreSQL LISTEN/NOTIFY. The session must be currently online. Only the player UUID is stored — usernames are resolved on the web UI from the player database cache.
1918
+ * @summary Ingest a chat message
1919
+ * @param {ChatMessageRequest} chatMessageRequest
1758
1920
  * @param {*} [options] Override http request option.
1759
1921
  * @throws {RequiredError}
1760
1922
  */
1761
- initiateLogin(options) {
1762
- return DefaultApiFp(this.configuration).initiateLogin(options).then((request) => request(this.axios, this.basePath));
1923
+ ingest(chatMessageRequest, options) {
1924
+ return ChatApiFp(this.configuration).ingest(chatMessageRequest, options).then((request) => request(this.axios, this.basePath));
1925
+ }
1926
+ }
1927
+ /**
1928
+ * ConnectionApi - axios parameter creator
1929
+ */
1930
+ export const ConnectionApiAxiosParamCreator = function (configuration) {
1931
+ return {
1932
+ /**
1933
+ * Performs comprehensive analysis of an IPv4 address to detect VPN, proxy, or suspicious connections. **Features:** - Multi-provider VPN/proxy detection with aggregated confidence scoring - Approximate geolocation lookup (city and country) - Connection bypass status and expiration tracking - Optional player UUID association for connection history **Use Cases:** - Prevent VPN/proxy usage during player authentication - Track player connection history across sessions - Implement temporary bypass systems for false positives - Monitor suspicious connection patterns **Query Parameters:** - `force_recheck`: Bypass cache and re-run all detection services - `associate_uuid`: Link this IP to a player UUID and return player info **Caching:** Results are cached unless `force_recheck=true` is specified, reducing API costs and improving response times.
1934
+ * @summary Check Connection and Detect VPN/Proxy
1935
+ * @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
1936
+ * @param {boolean} forceRecheck When true, bypasses cached results and re-runs all VPN detection services. Use this when you need the most up-to-date analysis or suspect cached data may be stale. Default: false
1937
+ * @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\&#39;s history - Update the player\&#39;s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\&#39;t block the response.
1938
+ * @param {*} [options] Override http request option.
1939
+ * @throws {RequiredError}
1940
+ */
1941
+ getConnectionDetails: (ip_1, forceRecheck_1, associateUuid_1, ...args_1) => __awaiter(this, [ip_1, forceRecheck_1, associateUuid_1, ...args_1], void 0, function* (ip, forceRecheck, associateUuid, options = {}) {
1942
+ // verify required parameter 'ip' is not null or undefined
1943
+ assertParamExists('getConnectionDetails', 'ip', ip);
1944
+ // verify required parameter 'forceRecheck' is not null or undefined
1945
+ assertParamExists('getConnectionDetails', 'forceRecheck', forceRecheck);
1946
+ const localVarPath = `/v1/connection/get-connection-details/{ip}`
1947
+ .replace(`{${"ip"}}`, encodeURIComponent(String(ip)));
1948
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1949
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1950
+ let baseOptions;
1951
+ if (configuration) {
1952
+ baseOptions = configuration.baseOptions;
1953
+ }
1954
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1955
+ const localVarHeaderParameter = {};
1956
+ const localVarQueryParameter = {};
1957
+ // authentication DiscordAuth required
1958
+ // http bearer authentication required
1959
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1960
+ if (forceRecheck !== undefined) {
1961
+ localVarQueryParameter['force_recheck'] = forceRecheck;
1962
+ }
1963
+ if (associateUuid !== undefined) {
1964
+ localVarQueryParameter['associate_uuid'] = associateUuid;
1965
+ }
1966
+ localVarHeaderParameter['Accept'] = 'application/json';
1967
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1968
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1969
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1970
+ return {
1971
+ url: toPathString(localVarUrlObj),
1972
+ options: localVarRequestOptions,
1973
+ };
1974
+ }),
1975
+ };
1976
+ };
1977
+ /**
1978
+ * ConnectionApi - functional programming interface
1979
+ */
1980
+ export const ConnectionApiFp = function (configuration) {
1981
+ const localVarAxiosParamCreator = ConnectionApiAxiosParamCreator(configuration);
1982
+ return {
1983
+ /**
1984
+ * Performs comprehensive analysis of an IPv4 address to detect VPN, proxy, or suspicious connections. **Features:** - Multi-provider VPN/proxy detection with aggregated confidence scoring - Approximate geolocation lookup (city and country) - Connection bypass status and expiration tracking - Optional player UUID association for connection history **Use Cases:** - Prevent VPN/proxy usage during player authentication - Track player connection history across sessions - Implement temporary bypass systems for false positives - Monitor suspicious connection patterns **Query Parameters:** - `force_recheck`: Bypass cache and re-run all detection services - `associate_uuid`: Link this IP to a player UUID and return player info **Caching:** Results are cached unless `force_recheck=true` is specified, reducing API costs and improving response times.
1985
+ * @summary Check Connection and Detect VPN/Proxy
1986
+ * @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
1987
+ * @param {boolean} forceRecheck When true, bypasses cached results and re-runs all VPN detection services. Use this when you need the most up-to-date analysis or suspect cached data may be stale. Default: false
1988
+ * @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\&#39;s history - Update the player\&#39;s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\&#39;t block the response.
1989
+ * @param {*} [options] Override http request option.
1990
+ * @throws {RequiredError}
1991
+ */
1992
+ getConnectionDetails(ip, forceRecheck, associateUuid, options) {
1993
+ return __awaiter(this, void 0, void 0, function* () {
1994
+ var _a, _b, _c;
1995
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getConnectionDetails(ip, forceRecheck, associateUuid, options);
1996
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1997
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ConnectionApi.getConnectionDetails']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1998
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1999
+ });
2000
+ },
2001
+ };
2002
+ };
2003
+ /**
2004
+ * ConnectionApi - factory interface
2005
+ */
2006
+ export const ConnectionApiFactory = function (configuration, basePath, axios) {
2007
+ const localVarFp = ConnectionApiFp(configuration);
2008
+ return {
2009
+ /**
2010
+ * Performs comprehensive analysis of an IPv4 address to detect VPN, proxy, or suspicious connections. **Features:** - Multi-provider VPN/proxy detection with aggregated confidence scoring - Approximate geolocation lookup (city and country) - Connection bypass status and expiration tracking - Optional player UUID association for connection history **Use Cases:** - Prevent VPN/proxy usage during player authentication - Track player connection history across sessions - Implement temporary bypass systems for false positives - Monitor suspicious connection patterns **Query Parameters:** - `force_recheck`: Bypass cache and re-run all detection services - `associate_uuid`: Link this IP to a player UUID and return player info **Caching:** Results are cached unless `force_recheck=true` is specified, reducing API costs and improving response times.
2011
+ * @summary Check Connection and Detect VPN/Proxy
2012
+ * @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
2013
+ * @param {boolean} forceRecheck When true, bypasses cached results and re-runs all VPN detection services. Use this when you need the most up-to-date analysis or suspect cached data may be stale. Default: false
2014
+ * @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\&#39;s history - Update the player\&#39;s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\&#39;t block the response.
2015
+ * @param {*} [options] Override http request option.
2016
+ * @throws {RequiredError}
2017
+ */
2018
+ getConnectionDetails(ip, forceRecheck, associateUuid, options) {
2019
+ return localVarFp.getConnectionDetails(ip, forceRecheck, associateUuid, options).then((request) => request(axios, basePath));
2020
+ },
2021
+ };
2022
+ };
2023
+ /**
2024
+ * ConnectionApi - object-oriented interface
2025
+ */
2026
+ export class ConnectionApi extends BaseAPI {
2027
+ /**
2028
+ * Performs comprehensive analysis of an IPv4 address to detect VPN, proxy, or suspicious connections. **Features:** - Multi-provider VPN/proxy detection with aggregated confidence scoring - Approximate geolocation lookup (city and country) - Connection bypass status and expiration tracking - Optional player UUID association for connection history **Use Cases:** - Prevent VPN/proxy usage during player authentication - Track player connection history across sessions - Implement temporary bypass systems for false positives - Monitor suspicious connection patterns **Query Parameters:** - `force_recheck`: Bypass cache and re-run all detection services - `associate_uuid`: Link this IP to a player UUID and return player info **Caching:** Results are cached unless `force_recheck=true` is specified, reducing API costs and improving response times.
2029
+ * @summary Check Connection and Detect VPN/Proxy
2030
+ * @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
2031
+ * @param {boolean} forceRecheck When true, bypasses cached results and re-runs all VPN detection services. Use this when you need the most up-to-date analysis or suspect cached data may be stale. Default: false
2032
+ * @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\&#39;s history - Update the player\&#39;s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\&#39;t block the response.
2033
+ * @param {*} [options] Override http request option.
2034
+ * @throws {RequiredError}
2035
+ */
2036
+ getConnectionDetails(ip, forceRecheck, associateUuid, options) {
2037
+ return ConnectionApiFp(this.configuration).getConnectionDetails(ip, forceRecheck, associateUuid, options).then((request) => request(this.axios, this.basePath));
1763
2038
  }
1764
2039
  }
1765
2040
  /**
@@ -1769,7 +2044,7 @@ export const PlayerApiAxiosParamCreator = function (configuration) {
1769
2044
  return {
1770
2045
  /**
1771
2046
  * Retrieves player information by their Minecraft UUID. Returns whether this is the player\'s first join and their first login timestamp. This endpoint is useful for tracking player join history and implementing first-join rewards or tutorials.
1772
- * @summary Get Player Information
2047
+ * @summary Get player information
1773
2048
  * @param {string} uuid The Minecraft player UUID (with or without dashes)
1774
2049
  * @param {*} [options] Override http request option.
1775
2050
  * @throws {RequiredError}
@@ -1800,6 +2075,41 @@ export const PlayerApiAxiosParamCreator = function (configuration) {
1800
2075
  options: localVarRequestOptions,
1801
2076
  };
1802
2077
  }),
2078
+ /**
2079
+ * Accepts a list of player UUIDs and returns a map of `uuid → username` for those that have a recorded username. UUIDs with no username record (e.g. players who have never joined) are omitted from the response. Used by the web UI to display player names in the chat log.
2080
+ * @summary Batch resolve UUIDs to usernames
2081
+ * @param {Array<string>} uuids List of player UUIDs to resolve (repeatable query param)
2082
+ * @param {*} [options] Override http request option.
2083
+ * @throws {RequiredError}
2084
+ */
2085
+ getUsernames: (uuids_1, ...args_1) => __awaiter(this, [uuids_1, ...args_1], void 0, function* (uuids, options = {}) {
2086
+ // verify required parameter 'uuids' is not null or undefined
2087
+ assertParamExists('getUsernames', 'uuids', uuids);
2088
+ const localVarPath = `/v1/player/usernames`;
2089
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2090
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2091
+ let baseOptions;
2092
+ if (configuration) {
2093
+ baseOptions = configuration.baseOptions;
2094
+ }
2095
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2096
+ const localVarHeaderParameter = {};
2097
+ const localVarQueryParameter = {};
2098
+ // authentication DiscordAuth required
2099
+ // http bearer authentication required
2100
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2101
+ if (uuids) {
2102
+ localVarQueryParameter['uuids'] = uuids.join(COLLECTION_FORMATS.csv);
2103
+ }
2104
+ localVarHeaderParameter['Accept'] = 'application/json';
2105
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2106
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2107
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2108
+ return {
2109
+ url: toPathString(localVarUrlObj),
2110
+ options: localVarRequestOptions,
2111
+ };
2112
+ }),
1803
2113
  };
1804
2114
  };
1805
2115
  /**
@@ -1810,7 +2120,7 @@ export const PlayerApiFp = function (configuration) {
1810
2120
  return {
1811
2121
  /**
1812
2122
  * Retrieves player information by their Minecraft UUID. Returns whether this is the player\'s first join and their first login timestamp. This endpoint is useful for tracking player join history and implementing first-join rewards or tutorials.
1813
- * @summary Get Player Information
2123
+ * @summary Get player information
1814
2124
  * @param {string} uuid The Minecraft player UUID (with or without dashes)
1815
2125
  * @param {*} [options] Override http request option.
1816
2126
  * @throws {RequiredError}
@@ -1824,6 +2134,22 @@ export const PlayerApiFp = function (configuration) {
1824
2134
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1825
2135
  });
1826
2136
  },
2137
+ /**
2138
+ * Accepts a list of player UUIDs and returns a map of `uuid → username` for those that have a recorded username. UUIDs with no username record (e.g. players who have never joined) are omitted from the response. Used by the web UI to display player names in the chat log.
2139
+ * @summary Batch resolve UUIDs to usernames
2140
+ * @param {Array<string>} uuids List of player UUIDs to resolve (repeatable query param)
2141
+ * @param {*} [options] Override http request option.
2142
+ * @throws {RequiredError}
2143
+ */
2144
+ getUsernames(uuids, options) {
2145
+ return __awaiter(this, void 0, void 0, function* () {
2146
+ var _a, _b, _c;
2147
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getUsernames(uuids, options);
2148
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2149
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PlayerApi.getUsernames']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2150
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2151
+ });
2152
+ },
1827
2153
  };
1828
2154
  };
1829
2155
  /**
@@ -1834,7 +2160,7 @@ export const PlayerApiFactory = function (configuration, basePath, axios) {
1834
2160
  return {
1835
2161
  /**
1836
2162
  * Retrieves player information by their Minecraft UUID. Returns whether this is the player\'s first join and their first login timestamp. This endpoint is useful for tracking player join history and implementing first-join rewards or tutorials.
1837
- * @summary Get Player Information
2163
+ * @summary Get player information
1838
2164
  * @param {string} uuid The Minecraft player UUID (with or without dashes)
1839
2165
  * @param {*} [options] Override http request option.
1840
2166
  * @throws {RequiredError}
@@ -1842,6 +2168,16 @@ export const PlayerApiFactory = function (configuration, basePath, axios) {
1842
2168
  getPlayer1(uuid, options) {
1843
2169
  return localVarFp.getPlayer1(uuid, options).then((request) => request(axios, basePath));
1844
2170
  },
2171
+ /**
2172
+ * Accepts a list of player UUIDs and returns a map of `uuid → username` for those that have a recorded username. UUIDs with no username record (e.g. players who have never joined) are omitted from the response. Used by the web UI to display player names in the chat log.
2173
+ * @summary Batch resolve UUIDs to usernames
2174
+ * @param {Array<string>} uuids List of player UUIDs to resolve (repeatable query param)
2175
+ * @param {*} [options] Override http request option.
2176
+ * @throws {RequiredError}
2177
+ */
2178
+ getUsernames(uuids, options) {
2179
+ return localVarFp.getUsernames(uuids, options).then((request) => request(axios, basePath));
2180
+ },
1845
2181
  };
1846
2182
  };
1847
2183
  /**
@@ -1850,7 +2186,7 @@ export const PlayerApiFactory = function (configuration, basePath, axios) {
1850
2186
  export class PlayerApi extends BaseAPI {
1851
2187
  /**
1852
2188
  * Retrieves player information by their Minecraft UUID. Returns whether this is the player\'s first join and their first login timestamp. This endpoint is useful for tracking player join history and implementing first-join rewards or tutorials.
1853
- * @summary Get Player Information
2189
+ * @summary Get player information
1854
2190
  * @param {string} uuid The Minecraft player UUID (with or without dashes)
1855
2191
  * @param {*} [options] Override http request option.
1856
2192
  * @throws {RequiredError}
@@ -1858,6 +2194,16 @@ export class PlayerApi extends BaseAPI {
1858
2194
  getPlayer1(uuid, options) {
1859
2195
  return PlayerApiFp(this.configuration).getPlayer1(uuid, options).then((request) => request(this.axios, this.basePath));
1860
2196
  }
2197
+ /**
2198
+ * Accepts a list of player UUIDs and returns a map of `uuid → username` for those that have a recorded username. UUIDs with no username record (e.g. players who have never joined) are omitted from the response. Used by the web UI to display player names in the chat log.
2199
+ * @summary Batch resolve UUIDs to usernames
2200
+ * @param {Array<string>} uuids List of player UUIDs to resolve (repeatable query param)
2201
+ * @param {*} [options] Override http request option.
2202
+ * @throws {RequiredError}
2203
+ */
2204
+ getUsernames(uuids, options) {
2205
+ return PlayerApiFp(this.configuration).getUsernames(uuids, options).then((request) => request(this.axios, this.basePath));
2206
+ }
1861
2207
  }
1862
2208
  /**
1863
2209
  * PunishmentApi - axios parameter creator
@@ -2239,3 +2585,361 @@ export class PunishmentApi extends BaseAPI {
2239
2585
  return PunishmentApiFp(this.configuration).getRecentPunishments(limit, page, issuedAfter, issuedBefore, expiresAfter, expiresBefore, type, uuid, ipAddress, options).then((request) => request(this.axios, this.basePath));
2240
2586
  }
2241
2587
  }
2588
+ /**
2589
+ * ServerSessionsApi - axios parameter creator
2590
+ */
2591
+ export const ServerSessionsApiAxiosParamCreator = function (configuration) {
2592
+ return {
2593
+ /**
2594
+ * Updates the `last_heartbeat` timestamp for the given session, keeping it marked as online. Sessions that miss heartbeats for more than 2 minutes are automatically tombstoned by the scheduler. Call this every 30 seconds from the game server.
2595
+ * @summary Send a heartbeat
2596
+ * @param {string} id Session UUID returned from the registration call
2597
+ * @param {*} [options] Override http request option.
2598
+ * @throws {RequiredError}
2599
+ */
2600
+ heartbeat: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
2601
+ // verify required parameter 'id' is not null or undefined
2602
+ assertParamExists('heartbeat', 'id', id);
2603
+ const localVarPath = `/v1/servers/{id}/heartbeat`
2604
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2605
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2606
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2607
+ let baseOptions;
2608
+ if (configuration) {
2609
+ baseOptions = configuration.baseOptions;
2610
+ }
2611
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
2612
+ const localVarHeaderParameter = {};
2613
+ const localVarQueryParameter = {};
2614
+ // authentication DiscordAuth required
2615
+ // http bearer authentication required
2616
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2617
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2618
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2619
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2620
+ return {
2621
+ url: toPathString(localVarUrlObj),
2622
+ options: localVarRequestOptions,
2623
+ };
2624
+ }),
2625
+ /**
2626
+ * Returns all server sessions — both online and historical — ordered by start time descending. Used by the web UI to populate the session filter dropdown.
2627
+ * @summary List all server sessions
2628
+ * @param {*} [options] Override http request option.
2629
+ * @throws {RequiredError}
2630
+ */
2631
+ listAll: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
2632
+ const localVarPath = `/v1/servers/history`;
2633
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2634
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2635
+ let baseOptions;
2636
+ if (configuration) {
2637
+ baseOptions = configuration.baseOptions;
2638
+ }
2639
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2640
+ const localVarHeaderParameter = {};
2641
+ const localVarQueryParameter = {};
2642
+ // authentication DiscordAuth required
2643
+ // http bearer authentication required
2644
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2645
+ localVarHeaderParameter['Accept'] = 'application/json';
2646
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2647
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2648
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2649
+ return {
2650
+ url: toPathString(localVarUrlObj),
2651
+ options: localVarRequestOptions,
2652
+ };
2653
+ }),
2654
+ /**
2655
+ * Returns all currently online server sessions, ordered by start time descending.
2656
+ * @summary List online server sessions
2657
+ * @param {*} [options] Override http request option.
2658
+ * @throws {RequiredError}
2659
+ */
2660
+ listOnline: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
2661
+ const localVarPath = `/v1/servers`;
2662
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2663
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2664
+ let baseOptions;
2665
+ if (configuration) {
2666
+ baseOptions = configuration.baseOptions;
2667
+ }
2668
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2669
+ const localVarHeaderParameter = {};
2670
+ const localVarQueryParameter = {};
2671
+ // authentication DiscordAuth required
2672
+ // http bearer authentication required
2673
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2674
+ localVarHeaderParameter['Accept'] = 'application/json';
2675
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2676
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2677
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2678
+ return {
2679
+ url: toPathString(localVarUrlObj),
2680
+ options: localVarRequestOptions,
2681
+ };
2682
+ }),
2683
+ /**
2684
+ * Marks the session as offline with the current timestamp as `endedAt`. Call this from the game server\'s shutdown hook for a clean shutdown signal. Sessions that crash without calling this endpoint will be tombstoned automatically by the 2-minute heartbeat scheduler.
2685
+ * @summary Mark a session offline
2686
+ * @param {string} id Session UUID returned from the registration call
2687
+ * @param {*} [options] Override http request option.
2688
+ * @throws {RequiredError}
2689
+ */
2690
+ markOffline: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
2691
+ // verify required parameter 'id' is not null or undefined
2692
+ assertParamExists('markOffline', 'id', id);
2693
+ const localVarPath = `/v1/servers/{id}/offline`
2694
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2695
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2696
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2697
+ let baseOptions;
2698
+ if (configuration) {
2699
+ baseOptions = configuration.baseOptions;
2700
+ }
2701
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
2702
+ const localVarHeaderParameter = {};
2703
+ const localVarQueryParameter = {};
2704
+ // authentication DiscordAuth required
2705
+ // http bearer authentication required
2706
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2707
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2708
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2709
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2710
+ return {
2711
+ url: toPathString(localVarUrlObj),
2712
+ options: localVarRequestOptions,
2713
+ };
2714
+ }),
2715
+ /**
2716
+ * Registers a game server instance and returns a session ID used for subsequent heartbeats and chat ingestion. If a `containerId` is provided and an online session already exists for that container (e.g. after a Velocity restart), the existing session is returned unchanged. Otherwise a fresh session is created with an auto-generated instance name.
2717
+ * @summary Register a server session
2718
+ * @param {ServerRegisterRequest} serverRegisterRequest
2719
+ * @param {*} [options] Override http request option.
2720
+ * @throws {RequiredError}
2721
+ */
2722
+ register: (serverRegisterRequest_1, ...args_1) => __awaiter(this, [serverRegisterRequest_1, ...args_1], void 0, function* (serverRegisterRequest, options = {}) {
2723
+ // verify required parameter 'serverRegisterRequest' is not null or undefined
2724
+ assertParamExists('register', 'serverRegisterRequest', serverRegisterRequest);
2725
+ const localVarPath = `/v1/servers`;
2726
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2727
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2728
+ let baseOptions;
2729
+ if (configuration) {
2730
+ baseOptions = configuration.baseOptions;
2731
+ }
2732
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2733
+ const localVarHeaderParameter = {};
2734
+ const localVarQueryParameter = {};
2735
+ // authentication DiscordAuth required
2736
+ // http bearer authentication required
2737
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2738
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2739
+ localVarHeaderParameter['Accept'] = 'application/json';
2740
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2741
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2742
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2743
+ localVarRequestOptions.data = serializeDataIfNeeded(serverRegisterRequest, localVarRequestOptions, configuration);
2744
+ return {
2745
+ url: toPathString(localVarUrlObj),
2746
+ options: localVarRequestOptions,
2747
+ };
2748
+ }),
2749
+ };
2750
+ };
2751
+ /**
2752
+ * ServerSessionsApi - functional programming interface
2753
+ */
2754
+ export const ServerSessionsApiFp = function (configuration) {
2755
+ const localVarAxiosParamCreator = ServerSessionsApiAxiosParamCreator(configuration);
2756
+ return {
2757
+ /**
2758
+ * Updates the `last_heartbeat` timestamp for the given session, keeping it marked as online. Sessions that miss heartbeats for more than 2 minutes are automatically tombstoned by the scheduler. Call this every 30 seconds from the game server.
2759
+ * @summary Send a heartbeat
2760
+ * @param {string} id Session UUID returned from the registration call
2761
+ * @param {*} [options] Override http request option.
2762
+ * @throws {RequiredError}
2763
+ */
2764
+ heartbeat(id, options) {
2765
+ return __awaiter(this, void 0, void 0, function* () {
2766
+ var _a, _b, _c;
2767
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.heartbeat(id, options);
2768
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2769
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ServerSessionsApi.heartbeat']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2770
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2771
+ });
2772
+ },
2773
+ /**
2774
+ * Returns all server sessions — both online and historical — ordered by start time descending. Used by the web UI to populate the session filter dropdown.
2775
+ * @summary List all server sessions
2776
+ * @param {*} [options] Override http request option.
2777
+ * @throws {RequiredError}
2778
+ */
2779
+ listAll(options) {
2780
+ return __awaiter(this, void 0, void 0, function* () {
2781
+ var _a, _b, _c;
2782
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listAll(options);
2783
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2784
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ServerSessionsApi.listAll']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2785
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2786
+ });
2787
+ },
2788
+ /**
2789
+ * Returns all currently online server sessions, ordered by start time descending.
2790
+ * @summary List online server sessions
2791
+ * @param {*} [options] Override http request option.
2792
+ * @throws {RequiredError}
2793
+ */
2794
+ listOnline(options) {
2795
+ return __awaiter(this, void 0, void 0, function* () {
2796
+ var _a, _b, _c;
2797
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listOnline(options);
2798
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2799
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ServerSessionsApi.listOnline']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2800
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2801
+ });
2802
+ },
2803
+ /**
2804
+ * Marks the session as offline with the current timestamp as `endedAt`. Call this from the game server\'s shutdown hook for a clean shutdown signal. Sessions that crash without calling this endpoint will be tombstoned automatically by the 2-minute heartbeat scheduler.
2805
+ * @summary Mark a session offline
2806
+ * @param {string} id Session UUID returned from the registration call
2807
+ * @param {*} [options] Override http request option.
2808
+ * @throws {RequiredError}
2809
+ */
2810
+ markOffline(id, options) {
2811
+ return __awaiter(this, void 0, void 0, function* () {
2812
+ var _a, _b, _c;
2813
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.markOffline(id, options);
2814
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2815
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ServerSessionsApi.markOffline']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2816
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2817
+ });
2818
+ },
2819
+ /**
2820
+ * Registers a game server instance and returns a session ID used for subsequent heartbeats and chat ingestion. If a `containerId` is provided and an online session already exists for that container (e.g. after a Velocity restart), the existing session is returned unchanged. Otherwise a fresh session is created with an auto-generated instance name.
2821
+ * @summary Register a server session
2822
+ * @param {ServerRegisterRequest} serverRegisterRequest
2823
+ * @param {*} [options] Override http request option.
2824
+ * @throws {RequiredError}
2825
+ */
2826
+ register(serverRegisterRequest, options) {
2827
+ return __awaiter(this, void 0, void 0, function* () {
2828
+ var _a, _b, _c;
2829
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.register(serverRegisterRequest, options);
2830
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2831
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ServerSessionsApi.register']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2832
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2833
+ });
2834
+ },
2835
+ };
2836
+ };
2837
+ /**
2838
+ * ServerSessionsApi - factory interface
2839
+ */
2840
+ export const ServerSessionsApiFactory = function (configuration, basePath, axios) {
2841
+ const localVarFp = ServerSessionsApiFp(configuration);
2842
+ return {
2843
+ /**
2844
+ * Updates the `last_heartbeat` timestamp for the given session, keeping it marked as online. Sessions that miss heartbeats for more than 2 minutes are automatically tombstoned by the scheduler. Call this every 30 seconds from the game server.
2845
+ * @summary Send a heartbeat
2846
+ * @param {string} id Session UUID returned from the registration call
2847
+ * @param {*} [options] Override http request option.
2848
+ * @throws {RequiredError}
2849
+ */
2850
+ heartbeat(id, options) {
2851
+ return localVarFp.heartbeat(id, options).then((request) => request(axios, basePath));
2852
+ },
2853
+ /**
2854
+ * Returns all server sessions — both online and historical — ordered by start time descending. Used by the web UI to populate the session filter dropdown.
2855
+ * @summary List all server sessions
2856
+ * @param {*} [options] Override http request option.
2857
+ * @throws {RequiredError}
2858
+ */
2859
+ listAll(options) {
2860
+ return localVarFp.listAll(options).then((request) => request(axios, basePath));
2861
+ },
2862
+ /**
2863
+ * Returns all currently online server sessions, ordered by start time descending.
2864
+ * @summary List online server sessions
2865
+ * @param {*} [options] Override http request option.
2866
+ * @throws {RequiredError}
2867
+ */
2868
+ listOnline(options) {
2869
+ return localVarFp.listOnline(options).then((request) => request(axios, basePath));
2870
+ },
2871
+ /**
2872
+ * Marks the session as offline with the current timestamp as `endedAt`. Call this from the game server\'s shutdown hook for a clean shutdown signal. Sessions that crash without calling this endpoint will be tombstoned automatically by the 2-minute heartbeat scheduler.
2873
+ * @summary Mark a session offline
2874
+ * @param {string} id Session UUID returned from the registration call
2875
+ * @param {*} [options] Override http request option.
2876
+ * @throws {RequiredError}
2877
+ */
2878
+ markOffline(id, options) {
2879
+ return localVarFp.markOffline(id, options).then((request) => request(axios, basePath));
2880
+ },
2881
+ /**
2882
+ * Registers a game server instance and returns a session ID used for subsequent heartbeats and chat ingestion. If a `containerId` is provided and an online session already exists for that container (e.g. after a Velocity restart), the existing session is returned unchanged. Otherwise a fresh session is created with an auto-generated instance name.
2883
+ * @summary Register a server session
2884
+ * @param {ServerRegisterRequest} serverRegisterRequest
2885
+ * @param {*} [options] Override http request option.
2886
+ * @throws {RequiredError}
2887
+ */
2888
+ register(serverRegisterRequest, options) {
2889
+ return localVarFp.register(serverRegisterRequest, options).then((request) => request(axios, basePath));
2890
+ },
2891
+ };
2892
+ };
2893
+ /**
2894
+ * ServerSessionsApi - object-oriented interface
2895
+ */
2896
+ export class ServerSessionsApi extends BaseAPI {
2897
+ /**
2898
+ * Updates the `last_heartbeat` timestamp for the given session, keeping it marked as online. Sessions that miss heartbeats for more than 2 minutes are automatically tombstoned by the scheduler. Call this every 30 seconds from the game server.
2899
+ * @summary Send a heartbeat
2900
+ * @param {string} id Session UUID returned from the registration call
2901
+ * @param {*} [options] Override http request option.
2902
+ * @throws {RequiredError}
2903
+ */
2904
+ heartbeat(id, options) {
2905
+ return ServerSessionsApiFp(this.configuration).heartbeat(id, options).then((request) => request(this.axios, this.basePath));
2906
+ }
2907
+ /**
2908
+ * Returns all server sessions — both online and historical — ordered by start time descending. Used by the web UI to populate the session filter dropdown.
2909
+ * @summary List all server sessions
2910
+ * @param {*} [options] Override http request option.
2911
+ * @throws {RequiredError}
2912
+ */
2913
+ listAll(options) {
2914
+ return ServerSessionsApiFp(this.configuration).listAll(options).then((request) => request(this.axios, this.basePath));
2915
+ }
2916
+ /**
2917
+ * Returns all currently online server sessions, ordered by start time descending.
2918
+ * @summary List online server sessions
2919
+ * @param {*} [options] Override http request option.
2920
+ * @throws {RequiredError}
2921
+ */
2922
+ listOnline(options) {
2923
+ return ServerSessionsApiFp(this.configuration).listOnline(options).then((request) => request(this.axios, this.basePath));
2924
+ }
2925
+ /**
2926
+ * Marks the session as offline with the current timestamp as `endedAt`. Call this from the game server\'s shutdown hook for a clean shutdown signal. Sessions that crash without calling this endpoint will be tombstoned automatically by the 2-minute heartbeat scheduler.
2927
+ * @summary Mark a session offline
2928
+ * @param {string} id Session UUID returned from the registration call
2929
+ * @param {*} [options] Override http request option.
2930
+ * @throws {RequiredError}
2931
+ */
2932
+ markOffline(id, options) {
2933
+ return ServerSessionsApiFp(this.configuration).markOffline(id, options).then((request) => request(this.axios, this.basePath));
2934
+ }
2935
+ /**
2936
+ * Registers a game server instance and returns a session ID used for subsequent heartbeats and chat ingestion. If a `containerId` is provided and an online session already exists for that container (e.g. after a Velocity restart), the existing session is returned unchanged. Otherwise a fresh session is created with an auto-generated instance name.
2937
+ * @summary Register a server session
2938
+ * @param {ServerRegisterRequest} serverRegisterRequest
2939
+ * @param {*} [options] Override http request option.
2940
+ * @throws {RequiredError}
2941
+ */
2942
+ register(serverRegisterRequest, options) {
2943
+ return ServerSessionsApiFp(this.configuration).register(serverRegisterRequest, options).then((request) => request(this.axios, this.basePath));
2944
+ }
2945
+ }