glitch-javascript-sdk 2.8.6 → 2.8.8

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,30 @@ 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
+ },
24947
+ wishlistMe: {
24948
+ url: '/titles/{title_id}/wishlist/me',
24949
+ method: HTTP_METHODS.GET
24950
+ },
24951
+ attributionFunnel: {
24952
+ url: '/titles/{title_id}/reports/attribution-funnel',
24953
+ method: HTTP_METHODS.GET
24954
+ },
24931
24955
  };
24932
24956
  return TitlesRoute;
24933
24957
  }());
@@ -25625,6 +25649,57 @@ var Titles = /** @class */ (function () {
25625
25649
  Titles.resolveSaveConflict = function (title_id, install_id, save_id, conflict_id, choice) {
25626
25650
  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
25651
  };
25652
+ /**
25653
+ * Toggle a game on the current user's wishlist.
25654
+ * If the game is not wishlisted, it will be added. If it is, it will be removed.
25655
+ *
25656
+ * @param title_id The UUID of the title.
25657
+ * @param data Optional context: { fingerprint_id?: string, short_link_click_id?: string }
25658
+ */
25659
+ Titles.wishlistToggle = function (title_id, data) {
25660
+ return Requests.processRoute(TitlesRoute.routes.wishlistToggle, data, { title_id: title_id });
25661
+ };
25662
+ /**
25663
+ * Record a self-assigned excitement score (1-5) for a wishlisted game.
25664
+ *
25665
+ * @param title_id The UUID of the title.
25666
+ * @param data { score: number } - Must be between 1 and 5.
25667
+ */
25668
+ Titles.wishlistUpdateScore = function (title_id, data) {
25669
+ return Requests.processRoute(TitlesRoute.routes.wishlistUpdateScore, data, { title_id: title_id });
25670
+ };
25671
+ /**
25672
+ * Retrieve the current user's personal wishlist collection.
25673
+ *
25674
+ * @param params Optional pagination parameters (?page=1&per_page=25)
25675
+ */
25676
+ Titles.myWishlists = function (params) {
25677
+ return Requests.processRoute(TitlesRoute.routes.myWishlists, undefined, undefined, params);
25678
+ };
25679
+ /**
25680
+ * Get Wishlist Intelligence statistics for a title.
25681
+ * Includes funnel data and predictive revenue forecasting.
25682
+ * Note: Requires Title Administrator permissions.
25683
+ *
25684
+ * @param title_id The UUID of the title.
25685
+ */
25686
+ Titles.wishlistStats = function (title_id) {
25687
+ return Requests.processRoute(TitlesRoute.routes.wishlistStats, undefined, { title_id: title_id });
25688
+ };
25689
+ /**
25690
+ * Get the current user's specific wishlist for a title.
25691
+ * @param title_id The UUID of the title.
25692
+ */
25693
+ Titles.wishlistMe = function (title_id) {
25694
+ return Requests.processRoute(TitlesRoute.routes.wishlistMe, undefined, { title_id: title_id });
25695
+ };
25696
+ /**
25697
+ * Get the consolidated attribution funnel report.
25698
+ * @param title_id The UUID of the title.
25699
+ */
25700
+ Titles.attributionFunnel = function (title_id, params) {
25701
+ return Requests.processRoute(TitlesRoute.routes.attributionFunnel, undefined, { title_id: title_id }, params);
25702
+ };
25628
25703
  return Titles;
25629
25704
  }());
25630
25705