glitch-javascript-sdk 2.9.3 → 2.9.5

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
@@ -21986,6 +21986,9 @@ var UserRoutes = /** @class */ (function () {
21986
21986
  clearInstagramAuth: { url: '/users/clearInstagramAuth', method: HTTP_METHODS.DELETE },
21987
21987
  getSubredditRules: { url: "/users/reddit/redditrules/{subreddit}", method: HTTP_METHODS.GET },
21988
21988
  playedGames: { url: '/users/me/played-games', method: HTTP_METHODS.GET },
21989
+ userProgressionStats: { url: '/users/{user_id}/progression/stats', method: HTTP_METHODS.GET },
21990
+ userProgressionAchievements: { url: '/users/{user_id}/progression/achievements', method: HTTP_METHODS.GET },
21991
+ userProgressionHistory: { url: '/users/{user_id}/progression/history', method: HTTP_METHODS.GET },
21989
21992
  };
21990
21993
  return UserRoutes;
21991
21994
  }());
@@ -22476,6 +22479,24 @@ var Users = /** @class */ (function () {
22476
22479
  Users.playedGames = function (params) {
22477
22480
  return Requests.processRoute(UserRoutes.routes.playedGames, undefined, undefined, params);
22478
22481
  };
22482
+ /**
22483
+ * Get all stats for a user, optionally filtered by title_id.
22484
+ */
22485
+ Users.getProgressionStats = function (user_id, params) {
22486
+ return Requests.processRoute(UserRoutes.routes.userProgressionStats, undefined, { user_id: user_id }, params);
22487
+ };
22488
+ /**
22489
+ * Get all achievements for a user.
22490
+ */
22491
+ Users.getProgressionAchievements = function (user_id, params) {
22492
+ return Requests.processRoute(UserRoutes.routes.userProgressionAchievements, undefined, { user_id: user_id }, params);
22493
+ };
22494
+ /**
22495
+ * Get the raw gameplay history (Run Records) for a user.
22496
+ */
22497
+ Users.getProgressionHistory = function (user_id, params) {
22498
+ return Requests.processRoute(UserRoutes.routes.userProgressionHistory, undefined, { user_id: user_id }, params);
22499
+ };
22479
22500
  return Users;
22480
22501
  }());
22481
22502
 
@@ -24969,6 +24990,29 @@ var TitlesRoute = /** @class */ (function () {
24969
24990
  url: '/titles/{title_id}/matchmaker/server',
24970
24991
  method: HTTP_METHODS.GET
24971
24992
  },
24993
+ matchmakerSessionHeartbeat: {
24994
+ url: '/titles/{title_id}/matchmaker/session/heartbeat',
24995
+ method: HTTP_METHODS.POST
24996
+ },
24997
+ matchmakerSessionRelease: {
24998
+ url: '/titles/{title_id}/matchmaker/session/release',
24999
+ method: HTTP_METHODS.POST
25000
+ },
25001
+ // --- Title Progression Definitions (Developer API) ---
25002
+ progressionStatsList: { url: '/titles/{title_id}/progression/stats', method: HTTP_METHODS.GET },
25003
+ progressionStatsStore: { url: '/titles/{title_id}/progression/stats', method: HTTP_METHODS.POST },
25004
+ progressionStatsDelete: { url: '/titles/{title_id}/progression/stats/{id}', method: HTTP_METHODS.DELETE },
25005
+ progressionAchievementsList: { url: '/titles/{title_id}/progression/achievements', method: HTTP_METHODS.GET },
25006
+ progressionAchievementsStore: { url: '/titles/{title_id}/progression/achievements', method: HTTP_METHODS.POST },
25007
+ progressionLeaderboardsList: { url: '/titles/{title_id}/progression/leaderboards', method: HTTP_METHODS.GET },
25008
+ progressionLeaderboardsStore: { url: '/titles/{title_id}/progression/leaderboards', method: HTTP_METHODS.POST },
25009
+ progressionSeasonsList: { url: '/titles/{title_id}/progression/seasons', method: HTTP_METHODS.GET },
25010
+ progressionSeasonsStore: { url: '/titles/{title_id}/progression/seasons', method: HTTP_METHODS.POST },
25011
+ // --- In-Game Progression (Client API) ---
25012
+ progressionSubmit: { url: '/titles/{title_id}/installs/{install_id}/submit', method: HTTP_METHODS.POST },
25013
+ progressionPlayerStats: { url: '/titles/{title_id}/installs/{install_id}/stats', method: HTTP_METHODS.GET },
25014
+ progressionPlayerAchievements: { url: '/titles/{title_id}/installs/{install_id}/achievements', method: HTTP_METHODS.GET },
25015
+ progressionLeaderboardView: { url: '/titles/{title_id}/leaderboards/{api_key}', method: HTTP_METHODS.GET },
24972
25016
  };
24973
25017
  return TitlesRoute;
24974
25018
  }());
@@ -25733,8 +25777,23 @@ var Titles = /** @class */ (function () {
25733
25777
  * @param title_id The UUID of the game title.
25734
25778
  * @returns AxiosPromise containing { signallingServer: string }
25735
25779
  */
25736
- Titles.getMatchmakerServer = function (title_id) {
25737
- return Requests.processRoute(TitlesRoute.routes.getMatchmakerServer, {}, { title_id: title_id });
25780
+ Titles.getMatchmakerServer = function (title_id, params) {
25781
+ return Requests.processRoute(TitlesRoute.routes.getMatchmakerServer, {}, { title_id: title_id }, params // ← passes as ?sessionId=xxx via Requests.get()
25782
+ );
25783
+ };
25784
+ /**
25785
+ * Send a session heartbeat to keep the dedicated instance claimed.
25786
+ * Called every 30s during active gameplay.
25787
+ */
25788
+ Titles.matchmakerSessionHeartbeat = function (title_id, data) {
25789
+ return Requests.processRoute(TitlesRoute.routes.matchmakerSessionHeartbeat, data, { title_id: title_id });
25790
+ };
25791
+ /**
25792
+ * Release the session (starts reclaim countdown).
25793
+ * Called on beforeunload or explicit navigation away.
25794
+ */
25795
+ Titles.matchmakerSessionRelease = function (title_id, data) {
25796
+ return Requests.processRoute(TitlesRoute.routes.matchmakerSessionRelease, data, { title_id: title_id });
25738
25797
  };
25739
25798
  /**
25740
25799
  * Initiates a resumable S3 multipart upload for large files.
@@ -25754,6 +25813,54 @@ var Titles = /** @class */ (function () {
25754
25813
  Titles.completeMultipartUpload = function (title_id, data) {
25755
25814
  return Requests.processRoute(TitlesRoute.routes.completeMultipartUpload, data, { title_id: title_id });
25756
25815
  };
25816
+ // --- Developer Definition Methods ---
25817
+ Titles.listProgressionStats = function (title_id) {
25818
+ return Requests.processRoute(TitlesRoute.routes.progressionStatsList, undefined, { title_id: title_id });
25819
+ };
25820
+ Titles.createProgressionStat = function (title_id, data) {
25821
+ return Requests.processRoute(TitlesRoute.routes.progressionStatsStore, data, { title_id: title_id });
25822
+ };
25823
+ Titles.deleteProgressionStat = function (title_id, id) {
25824
+ return Requests.processRoute(TitlesRoute.routes.progressionStatsDelete, undefined, { title_id: title_id, id: id });
25825
+ };
25826
+ Titles.listProgressionAchievements = function (title_id) {
25827
+ return Requests.processRoute(TitlesRoute.routes.progressionAchievementsList, undefined, { title_id: title_id });
25828
+ };
25829
+ Titles.createProgressionAchievement = function (title_id, data) {
25830
+ return Requests.processRoute(TitlesRoute.routes.progressionAchievementsStore, data, { title_id: title_id });
25831
+ };
25832
+ Titles.listProgressionLeaderboards = function (title_id) {
25833
+ return Requests.processRoute(TitlesRoute.routes.progressionLeaderboardsList, undefined, { title_id: title_id });
25834
+ };
25835
+ Titles.createProgressionLeaderboard = function (title_id, data) {
25836
+ return Requests.processRoute(TitlesRoute.routes.progressionLeaderboardsStore, data, { title_id: title_id });
25837
+ };
25838
+ Titles.listProgressionSeasons = function (title_id) {
25839
+ return Requests.processRoute(TitlesRoute.routes.progressionSeasonsList, undefined, { title_id: title_id });
25840
+ };
25841
+ Titles.createProgressionSeason = function (title_id, data) {
25842
+ return Requests.processRoute(TitlesRoute.routes.progressionSeasonsStore, data, { title_id: title_id });
25843
+ };
25844
+ /**
25845
+ * Submit a gameplay run. Updates stats and scores using the install_id for privacy.
25846
+ * @param data { idempotency_key: string, payload: { stats: {}, scores: {} } }
25847
+ */
25848
+ Titles.submitProgressionRun = function (title_id, install_id, data) {
25849
+ return Requests.processRoute(TitlesRoute.routes.progressionSubmit, data, { title_id: title_id, install_id: install_id });
25850
+ };
25851
+ Titles.getProgressionPlayerStats = function (title_id, install_id) {
25852
+ return Requests.processRoute(TitlesRoute.routes.progressionPlayerStats, undefined, { title_id: title_id, install_id: install_id });
25853
+ };
25854
+ Titles.getProgressionPlayerAchievements = function (title_id, install_id) {
25855
+ return Requests.processRoute(TitlesRoute.routes.progressionPlayerAchievements, undefined, { title_id: title_id, install_id: install_id });
25856
+ };
25857
+ /**
25858
+ * View leaderboard rankings.
25859
+ * @param params Optional filters like { around_me: true, install_id: 'uuid', season_id: 'uuid' }
25860
+ */
25861
+ Titles.getProgressionLeaderboard = function (title_id, api_key, params) {
25862
+ return Requests.processRoute(TitlesRoute.routes.progressionLeaderboardView, undefined, { title_id: title_id, api_key: api_key }, params);
25863
+ };
25757
25864
  return Titles;
25758
25865
  }());
25759
25866