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.
package/dist/cjs/index.js CHANGED
@@ -24969,6 +24969,14 @@ var TitlesRoute = /** @class */ (function () {
24969
24969
  url: '/titles/{title_id}/matchmaker/server',
24970
24970
  method: HTTP_METHODS.GET
24971
24971
  },
24972
+ matchmakerSessionHeartbeat: {
24973
+ url: '/titles/{title_id}/matchmaker/session/heartbeat',
24974
+ method: HTTP_METHODS.POST
24975
+ },
24976
+ matchmakerSessionRelease: {
24977
+ url: '/titles/{title_id}/matchmaker/session/release',
24978
+ method: HTTP_METHODS.POST
24979
+ },
24972
24980
  };
24973
24981
  return TitlesRoute;
24974
24982
  }());
@@ -25733,8 +25741,23 @@ var Titles = /** @class */ (function () {
25733
25741
  * @param title_id The UUID of the game title.
25734
25742
  * @returns AxiosPromise containing { signallingServer: string }
25735
25743
  */
25736
- Titles.getMatchmakerServer = function (title_id) {
25737
- return Requests.processRoute(TitlesRoute.routes.getMatchmakerServer, {}, { title_id: title_id });
25744
+ Titles.getMatchmakerServer = function (title_id, params) {
25745
+ return Requests.processRoute(TitlesRoute.routes.getMatchmakerServer, {}, { title_id: title_id }, params // ← passes as ?sessionId=xxx via Requests.get()
25746
+ );
25747
+ };
25748
+ /**
25749
+ * Send a session heartbeat to keep the dedicated instance claimed.
25750
+ * Called every 30s during active gameplay.
25751
+ */
25752
+ Titles.matchmakerSessionHeartbeat = function (title_id, data) {
25753
+ return Requests.processRoute(TitlesRoute.routes.matchmakerSessionHeartbeat, data, { title_id: title_id });
25754
+ };
25755
+ /**
25756
+ * Release the session (starts reclaim countdown).
25757
+ * Called on beforeunload or explicit navigation away.
25758
+ */
25759
+ Titles.matchmakerSessionRelease = function (title_id, data) {
25760
+ return Requests.processRoute(TitlesRoute.routes.matchmakerSessionRelease, data, { title_id: title_id });
25738
25761
  };
25739
25762
  /**
25740
25763
  * Initiates a resumable S3 multipart upload for large files.