@rebornteam/reborn-api 4.5.0 → 4.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.
@@ -92,6 +92,7 @@ docs/PageableMode.md
92
92
  docs/PlayerApi.md
93
93
  docs/PlayerGetPlayerInformation.md
94
94
  docs/PlayerSessionEndRequest.md
95
+ docs/PlayerSessionEndResponse.md
95
96
  docs/PlayerSessionStartRequest.md
96
97
  docs/PlayerSessionStartResponse.md
97
98
  docs/PlayerSessionsApi.md
@@ -108,6 +109,7 @@ docs/Region.md
108
109
  docs/ReportApi.md
109
110
  docs/ReportCategory.md
110
111
  docs/SearchKind.md
112
+ docs/ServerHeartbeatRequest.md
111
113
  docs/ServerRegisterRequest.md
112
114
  docs/ServerSessionDTO.md
113
115
  docs/ServerSessionsApi.md
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @rebornteam/reborn-api@4.5.0
1
+ ## @rebornteam/reborn-api@4.7.0
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @rebornteam/reborn-api@4.5.0 --save
39
+ npm install @rebornteam/reborn-api@4.7.0 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -200,6 +200,7 @@ Class | Method | HTTP request | Description
200
200
  - [PageableMode](docs/PageableMode.md)
201
201
  - [PlayerGetPlayerInformation](docs/PlayerGetPlayerInformation.md)
202
202
  - [PlayerSessionEndRequest](docs/PlayerSessionEndRequest.md)
203
+ - [PlayerSessionEndResponse](docs/PlayerSessionEndResponse.md)
203
204
  - [PlayerSessionStartRequest](docs/PlayerSessionStartRequest.md)
204
205
  - [PlayerSessionStartResponse](docs/PlayerSessionStartResponse.md)
205
206
  - [PunishmentGetPunishmentResponse](docs/PunishmentGetPunishmentResponse.md)
@@ -213,6 +214,7 @@ Class | Method | HTTP request | Description
213
214
  - [Region](docs/Region.md)
214
215
  - [ReportCategory](docs/ReportCategory.md)
215
216
  - [SearchKind](docs/SearchKind.md)
217
+ - [ServerHeartbeatRequest](docs/ServerHeartbeatRequest.md)
216
218
  - [ServerRegisterRequest](docs/ServerRegisterRequest.md)
217
219
  - [ServerSessionDTO](docs/ServerSessionDTO.md)
218
220
  - [SliceAdminAltAccount](docs/SliceAdminAltAccount.md)
package/api.ts 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: 4.5.0
7
+ * The version of the OpenAPI document: 4.7.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -775,6 +775,10 @@ export interface AdminPlayerSession {
775
775
  * Closed session duration in seconds (ended_at − started_at). Null while active.
776
776
  */
777
777
  'durationSeconds'?: number | null;
778
+ /**
779
+ * When the player transferred to another server, the id of the session they moved to. Null for a normal disconnect or an active session.
780
+ */
781
+ 'transferredTo'?: string | null;
778
782
  }
779
783
  /**
780
784
  * Aggregate session statistics for one player. Computed on demand from player_session.
@@ -1537,6 +1541,43 @@ export interface PlayerSessionEndRequest {
1537
1541
  */
1538
1542
  'serverSessionId': string;
1539
1543
  }
1544
+ /**
1545
+ * Result of POST /v1/player-session/end. Confirms whether a session was closed and returns that session\'s lifetime plus the player\'s refreshed aggregate stats.
1546
+ */
1547
+ export interface PlayerSessionEndResponse {
1548
+ /**
1549
+ * Player Minecraft UUID, echoed from the request
1550
+ */
1551
+ 'playerUuid': string;
1552
+ /**
1553
+ * Server session id the player was on, echoed from the request
1554
+ */
1555
+ 'serverSessionId': string;
1556
+ /**
1557
+ * True when an active session was found and closed by this call; false on a no-op (no active session existed, e.g. a duplicate/retried end event).
1558
+ */
1559
+ 'sessionClosed': boolean;
1560
+ /**
1561
+ * Id of the session that was closed. Null on a no-op.
1562
+ */
1563
+ 'sessionId'?: string | null;
1564
+ /**
1565
+ * When the closed session was opened (ISO-8601). Null on a no-op.
1566
+ */
1567
+ 'startedAt'?: string | null;
1568
+ /**
1569
+ * When the session was closed (ISO-8601), i.e. now. Null on a no-op.
1570
+ */
1571
+ 'endedAt'?: string | null;
1572
+ /**
1573
+ * Length of the closed session in seconds (endedAt - startedAt). Null on a no-op.
1574
+ */
1575
+ 'durationSeconds'?: number | null;
1576
+ /**
1577
+ * Player\'s aggregate session stats, recomputed after this session was closed (so the just-ended session is included in the totals).
1578
+ */
1579
+ 'sessionStats': AdminPlayerSessionStats;
1580
+ }
1540
1581
  /**
1541
1582
  * Unified player-join request. Runs the full authorization check (VPN, bypass, punishments) and conditionally opens a player_session for the allowed players.
1542
1583
  */
@@ -1784,6 +1825,15 @@ export const SearchKind = {
1784
1825
  export type SearchKind = typeof SearchKind[keyof typeof SearchKind];
1785
1826
 
1786
1827
 
1828
+ /**
1829
+ * Optional heartbeat payload carrying the players currently on this server session.
1830
+ */
1831
+ export interface ServerHeartbeatRequest {
1832
+ /**
1833
+ * UUIDs of players currently on this server session. Open sessions for this server whose player is absent from this list are auto-closed. Omit to heartbeat without reconciling player sessions.
1834
+ */
1835
+ 'activePlayers'?: Array<string> | null;
1836
+ }
1787
1837
  export interface ServerRegisterRequest {
1788
1838
  'region': Region;
1789
1839
  'gameType': GameType;
@@ -7038,7 +7088,7 @@ export class PlayerApi extends BaseAPI {
7038
7088
  export const PlayerSessionsApiAxiosParamCreator = function (configuration?: Configuration) {
7039
7089
  return {
7040
7090
  /**
7041
- * Closes the active session for a (playerUuid, serverSessionId) pair. No-op if no active session is found, so duplicate end events from a retry don\'t error.
7091
+ * Closes the active session for a (playerUuid, serverSessionId) pair and returns an acknowledgment: whether a session was actually closed, that session\'s start / end / duration, and the player\'s aggregate session stats recomputed after the close. No-op if no active session is found — `sessionClosed` is false and the per-session fields are null (stats are still returned) — so duplicate end events from a retry don\'t error.
7042
7092
  * @summary Close the active player session
7043
7093
  * @param {PlayerSessionEndRequest} playerSessionEndRequest
7044
7094
  * @param {*} [options] Override http request option.
@@ -7064,6 +7114,7 @@ export const PlayerSessionsApiAxiosParamCreator = function (configuration?: Conf
7064
7114
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
7065
7115
 
7066
7116
  localVarHeaderParameter['Content-Type'] = 'application/json';
7117
+ localVarHeaderParameter['Accept'] = 'application/json';
7067
7118
 
7068
7119
  setSearchParams(localVarUrlObj, localVarQueryParameter);
7069
7120
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -7124,13 +7175,13 @@ export const PlayerSessionsApiFp = function(configuration?: Configuration) {
7124
7175
  const localVarAxiosParamCreator = PlayerSessionsApiAxiosParamCreator(configuration)
7125
7176
  return {
7126
7177
  /**
7127
- * Closes the active session for a (playerUuid, serverSessionId) pair. No-op if no active session is found, so duplicate end events from a retry don\'t error.
7178
+ * Closes the active session for a (playerUuid, serverSessionId) pair and returns an acknowledgment: whether a session was actually closed, that session\'s start / end / duration, and the player\'s aggregate session stats recomputed after the close. No-op if no active session is found — `sessionClosed` is false and the per-session fields are null (stats are still returned) — so duplicate end events from a retry don\'t error.
7128
7179
  * @summary Close the active player session
7129
7180
  * @param {PlayerSessionEndRequest} playerSessionEndRequest
7130
7181
  * @param {*} [options] Override http request option.
7131
7182
  * @throws {RequiredError}
7132
7183
  */
7133
- async end(playerSessionEndRequest: PlayerSessionEndRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
7184
+ async end(playerSessionEndRequest: PlayerSessionEndRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PlayerSessionEndResponse>> {
7134
7185
  const localVarAxiosArgs = await localVarAxiosParamCreator.end(playerSessionEndRequest, options);
7135
7186
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
7136
7187
  const localVarOperationServerBasePath = operationServerMap['PlayerSessionsApi.end']?.[localVarOperationServerIndex]?.url;
@@ -7159,13 +7210,13 @@ export const PlayerSessionsApiFactory = function (configuration?: Configuration,
7159
7210
  const localVarFp = PlayerSessionsApiFp(configuration)
7160
7211
  return {
7161
7212
  /**
7162
- * Closes the active session for a (playerUuid, serverSessionId) pair. No-op if no active session is found, so duplicate end events from a retry don\'t error.
7213
+ * Closes the active session for a (playerUuid, serverSessionId) pair and returns an acknowledgment: whether a session was actually closed, that session\'s start / end / duration, and the player\'s aggregate session stats recomputed after the close. No-op if no active session is found — `sessionClosed` is false and the per-session fields are null (stats are still returned) — so duplicate end events from a retry don\'t error.
7163
7214
  * @summary Close the active player session
7164
7215
  * @param {PlayerSessionEndRequest} playerSessionEndRequest
7165
7216
  * @param {*} [options] Override http request option.
7166
7217
  * @throws {RequiredError}
7167
7218
  */
7168
- end(playerSessionEndRequest: PlayerSessionEndRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
7219
+ end(playerSessionEndRequest: PlayerSessionEndRequest, options?: RawAxiosRequestConfig): AxiosPromise<PlayerSessionEndResponse> {
7169
7220
  return localVarFp.end(playerSessionEndRequest, options).then((request) => request(axios, basePath));
7170
7221
  },
7171
7222
  /**
@@ -7186,7 +7237,7 @@ export const PlayerSessionsApiFactory = function (configuration?: Configuration,
7186
7237
  */
7187
7238
  export class PlayerSessionsApi extends BaseAPI {
7188
7239
  /**
7189
- * Closes the active session for a (playerUuid, serverSessionId) pair. No-op if no active session is found, so duplicate end events from a retry don\'t error.
7240
+ * Closes the active session for a (playerUuid, serverSessionId) pair and returns an acknowledgment: whether a session was actually closed, that session\'s start / end / duration, and the player\'s aggregate session stats recomputed after the close. No-op if no active session is found — `sessionClosed` is false and the per-session fields are null (stats are still returned) — so duplicate end events from a retry don\'t error.
7190
7241
  * @summary Close the active player session
7191
7242
  * @param {PlayerSessionEndRequest} playerSessionEndRequest
7192
7243
  * @param {*} [options] Override http request option.
@@ -7723,13 +7774,14 @@ export class ReportApi extends BaseAPI {
7723
7774
  export const ServerSessionsApiAxiosParamCreator = function (configuration?: Configuration) {
7724
7775
  return {
7725
7776
  /**
7726
- * 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.
7777
+ * 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. Optionally include an `activePlayers` list (the UUIDs currently on this server). When present, the API reconciles player sessions for this server: any open session whose player is absent from the list is closed, and linked to the player\'s new session if they transferred to another server. Omit the body for a plain liveness heartbeat.
7727
7778
  * @summary Send a heartbeat
7728
7779
  * @param {string} id Session UUID returned from the registration call
7780
+ * @param {ServerHeartbeatRequest} [serverHeartbeatRequest]
7729
7781
  * @param {*} [options] Override http request option.
7730
7782
  * @throws {RequiredError}
7731
7783
  */
7732
- heartbeat: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
7784
+ heartbeat: async (id: string, serverHeartbeatRequest?: ServerHeartbeatRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
7733
7785
  // verify required parameter 'id' is not null or undefined
7734
7786
  assertParamExists('heartbeat', 'id', id)
7735
7787
  const localVarPath = `/v1/servers/{id}/heartbeat`
@@ -7749,10 +7801,12 @@ export const ServerSessionsApiAxiosParamCreator = function (configuration?: Conf
7749
7801
  // http bearer authentication required
7750
7802
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
7751
7803
 
7804
+ localVarHeaderParameter['Content-Type'] = 'application/json';
7752
7805
 
7753
7806
  setSearchParams(localVarUrlObj, localVarQueryParameter);
7754
7807
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7755
7808
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
7809
+ localVarRequestOptions.data = serializeDataIfNeeded(serverHeartbeatRequest, localVarRequestOptions, configuration)
7756
7810
 
7757
7811
  return {
7758
7812
  url: toPathString(localVarUrlObj),
@@ -7913,14 +7967,15 @@ export const ServerSessionsApiFp = function(configuration?: Configuration) {
7913
7967
  const localVarAxiosParamCreator = ServerSessionsApiAxiosParamCreator(configuration)
7914
7968
  return {
7915
7969
  /**
7916
- * 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.
7970
+ * 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. Optionally include an `activePlayers` list (the UUIDs currently on this server). When present, the API reconciles player sessions for this server: any open session whose player is absent from the list is closed, and linked to the player\'s new session if they transferred to another server. Omit the body for a plain liveness heartbeat.
7917
7971
  * @summary Send a heartbeat
7918
7972
  * @param {string} id Session UUID returned from the registration call
7973
+ * @param {ServerHeartbeatRequest} [serverHeartbeatRequest]
7919
7974
  * @param {*} [options] Override http request option.
7920
7975
  * @throws {RequiredError}
7921
7976
  */
7922
- async heartbeat(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
7923
- const localVarAxiosArgs = await localVarAxiosParamCreator.heartbeat(id, options);
7977
+ async heartbeat(id: string, serverHeartbeatRequest?: ServerHeartbeatRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
7978
+ const localVarAxiosArgs = await localVarAxiosParamCreator.heartbeat(id, serverHeartbeatRequest, options);
7924
7979
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
7925
7980
  const localVarOperationServerBasePath = operationServerMap['ServerSessionsApi.heartbeat']?.[localVarOperationServerIndex]?.url;
7926
7981
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -7985,14 +8040,15 @@ export const ServerSessionsApiFactory = function (configuration?: Configuration,
7985
8040
  const localVarFp = ServerSessionsApiFp(configuration)
7986
8041
  return {
7987
8042
  /**
7988
- * 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.
8043
+ * 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. Optionally include an `activePlayers` list (the UUIDs currently on this server). When present, the API reconciles player sessions for this server: any open session whose player is absent from the list is closed, and linked to the player\'s new session if they transferred to another server. Omit the body for a plain liveness heartbeat.
7989
8044
  * @summary Send a heartbeat
7990
8045
  * @param {string} id Session UUID returned from the registration call
8046
+ * @param {ServerHeartbeatRequest} [serverHeartbeatRequest]
7991
8047
  * @param {*} [options] Override http request option.
7992
8048
  * @throws {RequiredError}
7993
8049
  */
7994
- heartbeat(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
7995
- return localVarFp.heartbeat(id, options).then((request) => request(axios, basePath));
8050
+ heartbeat(id: string, serverHeartbeatRequest?: ServerHeartbeatRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
8051
+ return localVarFp.heartbeat(id, serverHeartbeatRequest, options).then((request) => request(axios, basePath));
7996
8052
  },
7997
8053
  /**
7998
8054
  * Returns all server sessions — both online and historical — ordered by start time descending. Used by the web UI to populate the session filter dropdown.
@@ -8040,14 +8096,15 @@ export const ServerSessionsApiFactory = function (configuration?: Configuration,
8040
8096
  */
8041
8097
  export class ServerSessionsApi extends BaseAPI {
8042
8098
  /**
8043
- * 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.
8099
+ * 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. Optionally include an `activePlayers` list (the UUIDs currently on this server). When present, the API reconciles player sessions for this server: any open session whose player is absent from the list is closed, and linked to the player\'s new session if they transferred to another server. Omit the body for a plain liveness heartbeat.
8044
8100
  * @summary Send a heartbeat
8045
8101
  * @param {string} id Session UUID returned from the registration call
8102
+ * @param {ServerHeartbeatRequest} [serverHeartbeatRequest]
8046
8103
  * @param {*} [options] Override http request option.
8047
8104
  * @throws {RequiredError}
8048
8105
  */
8049
- public heartbeat(id: string, options?: RawAxiosRequestConfig) {
8050
- return ServerSessionsApiFp(this.configuration).heartbeat(id, options).then((request) => request(this.axios, this.basePath));
8106
+ public heartbeat(id: string, serverHeartbeatRequest?: ServerHeartbeatRequest, options?: RawAxiosRequestConfig) {
8107
+ return ServerSessionsApiFp(this.configuration).heartbeat(id, serverHeartbeatRequest, options).then((request) => request(this.axios, this.basePath));
8051
8108
  }
8052
8109
 
8053
8110
  /**
package/base.ts 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: 4.5.0
7
+ * The version of the OpenAPI document: 4.7.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/common.ts 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: 4.5.0
7
+ * The version of the OpenAPI document: 4.7.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/configuration.ts CHANGED
@@ -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: 4.5.0
6
+ * The version of the OpenAPI document: 4.7.0
7
7
  *
8
8
  *
9
9
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/api.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: 4.5.0
5
+ * The version of the OpenAPI document: 4.7.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -755,6 +755,10 @@ export interface AdminPlayerSession {
755
755
  * Closed session duration in seconds (ended_at − started_at). Null while active.
756
756
  */
757
757
  'durationSeconds'?: number | null;
758
+ /**
759
+ * When the player transferred to another server, the id of the session they moved to. Null for a normal disconnect or an active session.
760
+ */
761
+ 'transferredTo'?: string | null;
758
762
  }
759
763
  /**
760
764
  * Aggregate session statistics for one player. Computed on demand from player_session.
@@ -1485,6 +1489,43 @@ export interface PlayerSessionEndRequest {
1485
1489
  */
1486
1490
  'serverSessionId': string;
1487
1491
  }
1492
+ /**
1493
+ * Result of POST /v1/player-session/end. Confirms whether a session was closed and returns that session\'s lifetime plus the player\'s refreshed aggregate stats.
1494
+ */
1495
+ export interface PlayerSessionEndResponse {
1496
+ /**
1497
+ * Player Minecraft UUID, echoed from the request
1498
+ */
1499
+ 'playerUuid': string;
1500
+ /**
1501
+ * Server session id the player was on, echoed from the request
1502
+ */
1503
+ 'serverSessionId': string;
1504
+ /**
1505
+ * True when an active session was found and closed by this call; false on a no-op (no active session existed, e.g. a duplicate/retried end event).
1506
+ */
1507
+ 'sessionClosed': boolean;
1508
+ /**
1509
+ * Id of the session that was closed. Null on a no-op.
1510
+ */
1511
+ 'sessionId'?: string | null;
1512
+ /**
1513
+ * When the closed session was opened (ISO-8601). Null on a no-op.
1514
+ */
1515
+ 'startedAt'?: string | null;
1516
+ /**
1517
+ * When the session was closed (ISO-8601), i.e. now. Null on a no-op.
1518
+ */
1519
+ 'endedAt'?: string | null;
1520
+ /**
1521
+ * Length of the closed session in seconds (endedAt - startedAt). Null on a no-op.
1522
+ */
1523
+ 'durationSeconds'?: number | null;
1524
+ /**
1525
+ * Player\'s aggregate session stats, recomputed after this session was closed (so the just-ended session is included in the totals).
1526
+ */
1527
+ 'sessionStats': AdminPlayerSessionStats;
1528
+ }
1488
1529
  /**
1489
1530
  * Unified player-join request. Runs the full authorization check (VPN, bypass, punishments) and conditionally opens a player_session for the allowed players.
1490
1531
  */
@@ -1700,6 +1741,15 @@ export declare const SearchKind: {
1700
1741
  readonly Ip: "IP";
1701
1742
  };
1702
1743
  export type SearchKind = typeof SearchKind[keyof typeof SearchKind];
1744
+ /**
1745
+ * Optional heartbeat payload carrying the players currently on this server session.
1746
+ */
1747
+ export interface ServerHeartbeatRequest {
1748
+ /**
1749
+ * UUIDs of players currently on this server session. Open sessions for this server whose player is absent from this list are auto-closed. Omit to heartbeat without reconciling player sessions.
1750
+ */
1751
+ 'activePlayers'?: Array<string> | null;
1752
+ }
1703
1753
  export interface ServerRegisterRequest {
1704
1754
  'region': Region;
1705
1755
  'gameType': GameType;
@@ -4189,7 +4239,7 @@ export declare class PlayerApi extends BaseAPI {
4189
4239
  */
4190
4240
  export declare const PlayerSessionsApiAxiosParamCreator: (configuration?: Configuration) => {
4191
4241
  /**
4192
- * Closes the active session for a (playerUuid, serverSessionId) pair. No-op if no active session is found, so duplicate end events from a retry don\'t error.
4242
+ * Closes the active session for a (playerUuid, serverSessionId) pair and returns an acknowledgment: whether a session was actually closed, that session\'s start / end / duration, and the player\'s aggregate session stats recomputed after the close. No-op if no active session is found — `sessionClosed` is false and the per-session fields are null (stats are still returned) — so duplicate end events from a retry don\'t error.
4193
4243
  * @summary Close the active player session
4194
4244
  * @param {PlayerSessionEndRequest} playerSessionEndRequest
4195
4245
  * @param {*} [options] Override http request option.
@@ -4210,13 +4260,13 @@ export declare const PlayerSessionsApiAxiosParamCreator: (configuration?: Config
4210
4260
  */
4211
4261
  export declare const PlayerSessionsApiFp: (configuration?: Configuration) => {
4212
4262
  /**
4213
- * Closes the active session for a (playerUuid, serverSessionId) pair. No-op if no active session is found, so duplicate end events from a retry don\'t error.
4263
+ * Closes the active session for a (playerUuid, serverSessionId) pair and returns an acknowledgment: whether a session was actually closed, that session\'s start / end / duration, and the player\'s aggregate session stats recomputed after the close. No-op if no active session is found — `sessionClosed` is false and the per-session fields are null (stats are still returned) — so duplicate end events from a retry don\'t error.
4214
4264
  * @summary Close the active player session
4215
4265
  * @param {PlayerSessionEndRequest} playerSessionEndRequest
4216
4266
  * @param {*} [options] Override http request option.
4217
4267
  * @throws {RequiredError}
4218
4268
  */
4219
- end(playerSessionEndRequest: PlayerSessionEndRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
4269
+ end(playerSessionEndRequest: PlayerSessionEndRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PlayerSessionEndResponse>>;
4220
4270
  /**
4221
4271
  * Single round-trip the game server / proxy makes when a player joins. Runs the full authorization check (VPN detection, bypass tiers, punishment propagation, active-ban evaluation) and — only if allowed — opens (or re-attaches to) a player_session row. Replaces the older two-call flow (`GET /v1/connection/details` followed by a session-open POST). `/v1/connection/details` remains available for admin / debugging use but is deprecated for player-join purposes. Idempotent at the session-open step: a duplicate join request returns the existing active session\'s id instead of creating a duplicate row. Response shape: - `connectionResult` — always populated; carries ALLOWED / BANNED / VPN_DETECTED etc. plus a formatted kick message when denied. - `sessionId` / `startedAt` — populated only when the join was allowed. - Connection context (IP, location, VPN%, bypass) for display + logging. - `playerInformation`, `activePunishments` — full player history at join time. - `sessionStats` — total seconds played / days active / currently-online, useful for game-server-side welcome messages.
4222
4272
  * @summary Player join — unified authorization + session-open
@@ -4231,13 +4281,13 @@ export declare const PlayerSessionsApiFp: (configuration?: Configuration) => {
4231
4281
  */
4232
4282
  export declare const PlayerSessionsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
4233
4283
  /**
4234
- * Closes the active session for a (playerUuid, serverSessionId) pair. No-op if no active session is found, so duplicate end events from a retry don\'t error.
4284
+ * Closes the active session for a (playerUuid, serverSessionId) pair and returns an acknowledgment: whether a session was actually closed, that session\'s start / end / duration, and the player\'s aggregate session stats recomputed after the close. No-op if no active session is found — `sessionClosed` is false and the per-session fields are null (stats are still returned) — so duplicate end events from a retry don\'t error.
4235
4285
  * @summary Close the active player session
4236
4286
  * @param {PlayerSessionEndRequest} playerSessionEndRequest
4237
4287
  * @param {*} [options] Override http request option.
4238
4288
  * @throws {RequiredError}
4239
4289
  */
4240
- end(playerSessionEndRequest: PlayerSessionEndRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;
4290
+ end(playerSessionEndRequest: PlayerSessionEndRequest, options?: RawAxiosRequestConfig): AxiosPromise<PlayerSessionEndResponse>;
4241
4291
  /**
4242
4292
  * Single round-trip the game server / proxy makes when a player joins. Runs the full authorization check (VPN detection, bypass tiers, punishment propagation, active-ban evaluation) and — only if allowed — opens (or re-attaches to) a player_session row. Replaces the older two-call flow (`GET /v1/connection/details` followed by a session-open POST). `/v1/connection/details` remains available for admin / debugging use but is deprecated for player-join purposes. Idempotent at the session-open step: a duplicate join request returns the existing active session\'s id instead of creating a duplicate row. Response shape: - `connectionResult` — always populated; carries ALLOWED / BANNED / VPN_DETECTED etc. plus a formatted kick message when denied. - `sessionId` / `startedAt` — populated only when the join was allowed. - Connection context (IP, location, VPN%, bypass) for display + logging. - `playerInformation`, `activePunishments` — full player history at join time. - `sessionStats` — total seconds played / days active / currently-online, useful for game-server-side welcome messages.
4243
4293
  * @summary Player join — unified authorization + session-open
@@ -4252,13 +4302,13 @@ export declare const PlayerSessionsApiFactory: (configuration?: Configuration, b
4252
4302
  */
4253
4303
  export declare class PlayerSessionsApi extends BaseAPI {
4254
4304
  /**
4255
- * Closes the active session for a (playerUuid, serverSessionId) pair. No-op if no active session is found, so duplicate end events from a retry don\'t error.
4305
+ * Closes the active session for a (playerUuid, serverSessionId) pair and returns an acknowledgment: whether a session was actually closed, that session\'s start / end / duration, and the player\'s aggregate session stats recomputed after the close. No-op if no active session is found — `sessionClosed` is false and the per-session fields are null (stats are still returned) — so duplicate end events from a retry don\'t error.
4256
4306
  * @summary Close the active player session
4257
4307
  * @param {PlayerSessionEndRequest} playerSessionEndRequest
4258
4308
  * @param {*} [options] Override http request option.
4259
4309
  * @throws {RequiredError}
4260
4310
  */
4261
- end(playerSessionEndRequest: PlayerSessionEndRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
4311
+ end(playerSessionEndRequest: PlayerSessionEndRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<PlayerSessionEndResponse, any, {}>>;
4262
4312
  /**
4263
4313
  * Single round-trip the game server / proxy makes when a player joins. Runs the full authorization check (VPN detection, bypass tiers, punishment propagation, active-ban evaluation) and — only if allowed — opens (or re-attaches to) a player_session row. Replaces the older two-call flow (`GET /v1/connection/details` followed by a session-open POST). `/v1/connection/details` remains available for admin / debugging use but is deprecated for player-join purposes. Idempotent at the session-open step: a duplicate join request returns the existing active session\'s id instead of creating a duplicate row. Response shape: - `connectionResult` — always populated; carries ALLOWED / BANNED / VPN_DETECTED etc. plus a formatted kick message when denied. - `sessionId` / `startedAt` — populated only when the join was allowed. - Connection context (IP, location, VPN%, bypass) for display + logging. - `playerInformation`, `activePunishments` — full player history at join time. - `sessionStats` — total seconds played / days active / currently-online, useful for game-server-side welcome messages.
4264
4314
  * @summary Player join — unified authorization + session-open
@@ -4509,13 +4559,14 @@ export declare class ReportApi extends BaseAPI {
4509
4559
  */
4510
4560
  export declare const ServerSessionsApiAxiosParamCreator: (configuration?: Configuration) => {
4511
4561
  /**
4512
- * 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.
4562
+ * 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. Optionally include an `activePlayers` list (the UUIDs currently on this server). When present, the API reconciles player sessions for this server: any open session whose player is absent from the list is closed, and linked to the player\'s new session if they transferred to another server. Omit the body for a plain liveness heartbeat.
4513
4563
  * @summary Send a heartbeat
4514
4564
  * @param {string} id Session UUID returned from the registration call
4565
+ * @param {ServerHeartbeatRequest} [serverHeartbeatRequest]
4515
4566
  * @param {*} [options] Override http request option.
4516
4567
  * @throws {RequiredError}
4517
4568
  */
4518
- heartbeat: (id: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
4569
+ heartbeat: (id: string, serverHeartbeatRequest?: ServerHeartbeatRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
4519
4570
  /**
4520
4571
  * Returns all server sessions — both online and historical — ordered by start time descending. Used by the web UI to populate the session filter dropdown.
4521
4572
  * @summary List all server sessions
@@ -4552,13 +4603,14 @@ export declare const ServerSessionsApiAxiosParamCreator: (configuration?: Config
4552
4603
  */
4553
4604
  export declare const ServerSessionsApiFp: (configuration?: Configuration) => {
4554
4605
  /**
4555
- * 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.
4606
+ * 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. Optionally include an `activePlayers` list (the UUIDs currently on this server). When present, the API reconciles player sessions for this server: any open session whose player is absent from the list is closed, and linked to the player\'s new session if they transferred to another server. Omit the body for a plain liveness heartbeat.
4556
4607
  * @summary Send a heartbeat
4557
4608
  * @param {string} id Session UUID returned from the registration call
4609
+ * @param {ServerHeartbeatRequest} [serverHeartbeatRequest]
4558
4610
  * @param {*} [options] Override http request option.
4559
4611
  * @throws {RequiredError}
4560
4612
  */
4561
- heartbeat(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
4613
+ heartbeat(id: string, serverHeartbeatRequest?: ServerHeartbeatRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
4562
4614
  /**
4563
4615
  * Returns all server sessions — both online and historical — ordered by start time descending. Used by the web UI to populate the session filter dropdown.
4564
4616
  * @summary List all server sessions
@@ -4595,13 +4647,14 @@ export declare const ServerSessionsApiFp: (configuration?: Configuration) => {
4595
4647
  */
4596
4648
  export declare const ServerSessionsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
4597
4649
  /**
4598
- * 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.
4650
+ * 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. Optionally include an `activePlayers` list (the UUIDs currently on this server). When present, the API reconciles player sessions for this server: any open session whose player is absent from the list is closed, and linked to the player\'s new session if they transferred to another server. Omit the body for a plain liveness heartbeat.
4599
4651
  * @summary Send a heartbeat
4600
4652
  * @param {string} id Session UUID returned from the registration call
4653
+ * @param {ServerHeartbeatRequest} [serverHeartbeatRequest]
4601
4654
  * @param {*} [options] Override http request option.
4602
4655
  * @throws {RequiredError}
4603
4656
  */
4604
- heartbeat(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
4657
+ heartbeat(id: string, serverHeartbeatRequest?: ServerHeartbeatRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;
4605
4658
  /**
4606
4659
  * Returns all server sessions — both online and historical — ordered by start time descending. Used by the web UI to populate the session filter dropdown.
4607
4660
  * @summary List all server sessions
@@ -4638,13 +4691,14 @@ export declare const ServerSessionsApiFactory: (configuration?: Configuration, b
4638
4691
  */
4639
4692
  export declare class ServerSessionsApi extends BaseAPI {
4640
4693
  /**
4641
- * 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.
4694
+ * 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. Optionally include an `activePlayers` list (the UUIDs currently on this server). When present, the API reconciles player sessions for this server: any open session whose player is absent from the list is closed, and linked to the player\'s new session if they transferred to another server. Omit the body for a plain liveness heartbeat.
4642
4695
  * @summary Send a heartbeat
4643
4696
  * @param {string} id Session UUID returned from the registration call
4697
+ * @param {ServerHeartbeatRequest} [serverHeartbeatRequest]
4644
4698
  * @param {*} [options] Override http request option.
4645
4699
  * @throws {RequiredError}
4646
4700
  */
4647
- heartbeat(id: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
4701
+ heartbeat(id: string, serverHeartbeatRequest?: ServerHeartbeatRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
4648
4702
  /**
4649
4703
  * Returns all server sessions — both online and historical — ordered by start time descending. Used by the web UI to populate the session filter dropdown.
4650
4704
  * @summary List all server sessions