glitch-javascript-sdk 2.9.3 → 2.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -586,7 +586,21 @@ declare class Titles {
586
586
  * @param title_id The UUID of the game title.
587
587
  * @returns AxiosPromise containing { signallingServer: string }
588
588
  */
589
- static getMatchmakerServer<T>(title_id: string): AxiosPromise<Response<T>>;
589
+ static getMatchmakerServer<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
590
+ /**
591
+ * Send a session heartbeat to keep the dedicated instance claimed.
592
+ * Called every 30s during active gameplay.
593
+ */
594
+ static matchmakerSessionHeartbeat<T>(title_id: string, data: {
595
+ sessionId: string;
596
+ }): AxiosPromise<Response<T>>;
597
+ /**
598
+ * Release the session (starts reclaim countdown).
599
+ * Called on beforeunload or explicit navigation away.
600
+ */
601
+ static matchmakerSessionRelease<T>(title_id: string, data: {
602
+ sessionId: string;
603
+ }): AxiosPromise<Response<T>>;
590
604
  /**
591
605
  * Initiates a resumable S3 multipart upload for large files.
592
606
  */
package/dist/esm/index.js CHANGED
@@ -11785,6 +11785,14 @@ var TitlesRoute = /** @class */ (function () {
11785
11785
  url: '/titles/{title_id}/matchmaker/server',
11786
11786
  method: HTTP_METHODS.GET
11787
11787
  },
11788
+ matchmakerSessionHeartbeat: {
11789
+ url: '/titles/{title_id}/matchmaker/session/heartbeat',
11790
+ method: HTTP_METHODS.POST
11791
+ },
11792
+ matchmakerSessionRelease: {
11793
+ url: '/titles/{title_id}/matchmaker/session/release',
11794
+ method: HTTP_METHODS.POST
11795
+ },
11788
11796
  };
11789
11797
  return TitlesRoute;
11790
11798
  }());
@@ -12549,8 +12557,23 @@ var Titles = /** @class */ (function () {
12549
12557
  * @param title_id The UUID of the game title.
12550
12558
  * @returns AxiosPromise containing { signallingServer: string }
12551
12559
  */
12552
- Titles.getMatchmakerServer = function (title_id) {
12553
- return Requests.processRoute(TitlesRoute.routes.getMatchmakerServer, {}, { title_id: title_id });
12560
+ Titles.getMatchmakerServer = function (title_id, params) {
12561
+ return Requests.processRoute(TitlesRoute.routes.getMatchmakerServer, {}, { title_id: title_id }, params // ← passes as ?sessionId=xxx via Requests.get()
12562
+ );
12563
+ };
12564
+ /**
12565
+ * Send a session heartbeat to keep the dedicated instance claimed.
12566
+ * Called every 30s during active gameplay.
12567
+ */
12568
+ Titles.matchmakerSessionHeartbeat = function (title_id, data) {
12569
+ return Requests.processRoute(TitlesRoute.routes.matchmakerSessionHeartbeat, data, { title_id: title_id });
12570
+ };
12571
+ /**
12572
+ * Release the session (starts reclaim countdown).
12573
+ * Called on beforeunload or explicit navigation away.
12574
+ */
12575
+ Titles.matchmakerSessionRelease = function (title_id, data) {
12576
+ return Requests.processRoute(TitlesRoute.routes.matchmakerSessionRelease, data, { title_id: title_id });
12554
12577
  };
12555
12578
  /**
12556
12579
  * Initiates a resumable S3 multipart upload for large files.