glitch-javascript-sdk 2.8.6 → 2.8.7

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
@@ -24928,6 +24928,22 @@ var TitlesRoute = /** @class */ (function () {
24928
24928
  listSaves: { url: '/titles/{title_id}/installs/{install_id}/saves', method: HTTP_METHODS.GET },
24929
24929
  storeSave: { url: '/titles/{title_id}/installs/{install_id}/saves', method: HTTP_METHODS.POST },
24930
24930
  resolveSaveConflict: { url: '/titles/{title_id}/installs/{install_id}/saves/{save_id}/resolve', method: HTTP_METHODS.POST },
24931
+ wishlistToggle: {
24932
+ url: '/titles/{title_id}/wishlist',
24933
+ method: HTTP_METHODS.POST
24934
+ },
24935
+ wishlistUpdateScore: {
24936
+ url: '/titles/{title_id}/wishlist/score',
24937
+ method: HTTP_METHODS.POST
24938
+ },
24939
+ wishlistStats: {
24940
+ url: '/titles/{title_id}/wishlist/stats',
24941
+ method: HTTP_METHODS.GET
24942
+ },
24943
+ myWishlists: {
24944
+ url: '/users/me/wishlists',
24945
+ method: HTTP_METHODS.GET
24946
+ },
24931
24947
  };
24932
24948
  return TitlesRoute;
24933
24949
  }());
@@ -25625,6 +25641,43 @@ var Titles = /** @class */ (function () {
25625
25641
  Titles.resolveSaveConflict = function (title_id, install_id, save_id, conflict_id, choice) {
25626
25642
  return Requests.processRoute(TitlesRoute.routes.resolveSaveConflict, { conflict_id: conflict_id, choice: choice }, { title_id: title_id, install_id: install_id, save_id: save_id });
25627
25643
  };
25644
+ /**
25645
+ * Toggle a game on the current user's wishlist.
25646
+ * If the game is not wishlisted, it will be added. If it is, it will be removed.
25647
+ *
25648
+ * @param title_id The UUID of the title.
25649
+ * @param data Optional context: { fingerprint_id?: string, short_link_click_id?: string }
25650
+ */
25651
+ Titles.wishlistToggle = function (title_id, data) {
25652
+ return Requests.processRoute(TitlesRoute.routes.wishlistToggle, data, { title_id: title_id });
25653
+ };
25654
+ /**
25655
+ * Record a self-assigned excitement score (1-5) for a wishlisted game.
25656
+ *
25657
+ * @param title_id The UUID of the title.
25658
+ * @param data { score: number } - Must be between 1 and 5.
25659
+ */
25660
+ Titles.wishlistUpdateScore = function (title_id, data) {
25661
+ return Requests.processRoute(TitlesRoute.routes.wishlistUpdateScore, data, { title_id: title_id });
25662
+ };
25663
+ /**
25664
+ * Retrieve the current user's personal wishlist collection.
25665
+ *
25666
+ * @param params Optional pagination parameters (?page=1&per_page=25)
25667
+ */
25668
+ Titles.myWishlists = function (params) {
25669
+ return Requests.processRoute(TitlesRoute.routes.myWishlists, undefined, undefined, params);
25670
+ };
25671
+ /**
25672
+ * Get Wishlist Intelligence statistics for a title.
25673
+ * Includes funnel data and predictive revenue forecasting.
25674
+ * Note: Requires Title Administrator permissions.
25675
+ *
25676
+ * @param title_id The UUID of the title.
25677
+ */
25678
+ Titles.wishlistStats = function (title_id) {
25679
+ return Requests.processRoute(TitlesRoute.routes.wishlistStats, undefined, { title_id: title_id });
25680
+ };
25628
25681
  return Titles;
25629
25682
  }());
25630
25683