glitch-javascript-sdk 2.9.0 → 2.9.2

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
@@ -21985,6 +21985,7 @@ var UserRoutes = /** @class */ (function () {
21985
21985
  resendVerificationEmail: { url: '/users/resendVerificationEmail', method: HTTP_METHODS.POST },
21986
21986
  clearInstagramAuth: { url: '/users/clearInstagramAuth', method: HTTP_METHODS.DELETE },
21987
21987
  getSubredditRules: { url: "/users/reddit/redditrules/{subreddit}", method: HTTP_METHODS.GET },
21988
+ playedGames: { url: '/users/me/played-games', method: HTTP_METHODS.GET },
21988
21989
  };
21989
21990
  return UserRoutes;
21990
21991
  }());
@@ -22468,6 +22469,13 @@ var Users = /** @class */ (function () {
22468
22469
  Users.getSubredditRules = function (subreddit, params) {
22469
22470
  return Requests.processRoute(UserRoutes.routes.getSubredditRules, undefined, { subreddit: subreddit }, params);
22470
22471
  };
22472
+ /**
22473
+ * Get a list of games the current user has played.
22474
+ * Includes playtime and last played timestamps.
22475
+ */
22476
+ Users.playedGames = function (params) {
22477
+ return Requests.processRoute(UserRoutes.routes.playedGames, undefined, undefined, params);
22478
+ };
22471
22479
  return Users;
22472
22480
  }());
22473
22481
 
@@ -24953,6 +24961,11 @@ var TitlesRoute = /** @class */ (function () {
24953
24961
  method: HTTP_METHODS.GET
24954
24962
  },
24955
24963
  updateBuildStatus: { url: '/titles/{title_id}/deployments/{build_id}/status', method: HTTP_METHODS.PUT },
24964
+ // Inside the routes object in TitlesRoute.ts
24965
+ getMatchmakerServer: {
24966
+ url: '/titles/{title_id}/matchmaker/server',
24967
+ method: HTTP_METHODS.GET
24968
+ },
24956
24969
  };
24957
24970
  return TitlesRoute;
24958
24971
  }());
@@ -25710,6 +25723,16 @@ var Titles = /** @class */ (function () {
25710
25723
  Titles.updateBuildStatus = function (title_id, build_id, status) {
25711
25724
  return Requests.processRoute(TitlesRoute.routes.updateBuildStatus, { status: status }, { title_id: title_id, build_id: build_id });
25712
25725
  };
25726
+ /**
25727
+ * Proxies a request through the backend to the matchmaker.
25728
+ * This avoids HTTPS -> HTTP mixed content blocks.
25729
+ *
25730
+ * @param title_id The UUID of the game title.
25731
+ * @returns AxiosPromise containing { signallingServer: string }
25732
+ */
25733
+ Titles.getMatchmakerServer = function (title_id) {
25734
+ return Requests.processRoute(TitlesRoute.routes.getMatchmakerServer, {}, { title_id: title_id });
25735
+ };
25713
25736
  return Titles;
25714
25737
  }());
25715
25738
 
@@ -26754,6 +26777,8 @@ var SubscriptionsRoute = /** @class */ (function () {
26754
26777
  method: HTTP_METHODS.POST
26755
26778
  },
26756
26779
  purchaseLicense: { url: '/titles/{title_id}/purchase', method: HTTP_METHODS.POST },
26780
+ listMyLicenses: { url: '/subscriptions/my-licenses', method: HTTP_METHODS.GET },
26781
+ refundLicense: { url: '/subscriptions/licenses/{license_id}/refund', method: HTTP_METHODS.POST },
26757
26782
  };
26758
26783
  return SubscriptionsRoute;
26759
26784
  }());
@@ -26869,6 +26894,18 @@ var Subscriptions = /** @class */ (function () {
26869
26894
  Subscriptions.purchaseLicense = function (title_id, data) {
26870
26895
  return Requests.processRoute(SubscriptionsRoute.routes.purchaseLicense, data, { title_id: title_id });
26871
26896
  };
26897
+ /**
26898
+ * List all game licenses (Premium/Rental) owned by the current user.
26899
+ */
26900
+ Subscriptions.listMyLicenses = function (params) {
26901
+ return Requests.processRoute(SubscriptionsRoute.routes.listMyLicenses, undefined, undefined, params);
26902
+ };
26903
+ /**
26904
+ * Request a refund for a premium purchase.
26905
+ */
26906
+ Subscriptions.refundLicense = function (license_id) {
26907
+ return Requests.processRoute(SubscriptionsRoute.routes.refundLicense, {}, { license_id: license_id });
26908
+ };
26872
26909
  return Subscriptions;
26873
26910
  }());
26874
26911