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.
@@ -531,5 +531,46 @@ declare class Titles {
531
531
  * Resolve a conflict.
532
532
  */
533
533
  static resolveSaveConflict<T>(title_id: string, install_id: string, save_id: string, conflict_id: string, choice: 'keep_server' | 'use_client'): AxiosPromise<Response<T>>;
534
+ /**
535
+ * Toggle a game on the current user's wishlist.
536
+ * If the game is not wishlisted, it will be added. If it is, it will be removed.
537
+ *
538
+ * @param title_id The UUID of the title.
539
+ * @param data Optional context: { fingerprint_id?: string, short_link_click_id?: string }
540
+ */
541
+ static wishlistToggle<T>(title_id: string, data?: object): AxiosPromise<Response<T>>;
542
+ /**
543
+ * Record a self-assigned excitement score (1-5) for a wishlisted game.
544
+ *
545
+ * @param title_id The UUID of the title.
546
+ * @param data { score: number } - Must be between 1 and 5.
547
+ */
548
+ static wishlistUpdateScore<T>(title_id: string, data: {
549
+ score: number;
550
+ }): AxiosPromise<Response<T>>;
551
+ /**
552
+ * Retrieve the current user's personal wishlist collection.
553
+ *
554
+ * @param params Optional pagination parameters (?page=1&per_page=25)
555
+ */
556
+ static myWishlists<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
557
+ /**
558
+ * Get Wishlist Intelligence statistics for a title.
559
+ * Includes funnel data and predictive revenue forecasting.
560
+ * Note: Requires Title Administrator permissions.
561
+ *
562
+ * @param title_id The UUID of the title.
563
+ */
564
+ static wishlistStats<T>(title_id: string): AxiosPromise<Response<T>>;
565
+ /**
566
+ * Get the current user's specific wishlist for a title.
567
+ * @param title_id The UUID of the title.
568
+ */
569
+ static wishlistMe<T>(title_id: string): AxiosPromise<Response<T>>;
570
+ /**
571
+ * Get the consolidated attribution funnel report.
572
+ * @param title_id The UUID of the title.
573
+ */
574
+ static attributionFunnel<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
534
575
  }
535
576
  export default Titles;
package/dist/esm/index.js CHANGED
@@ -11744,6 +11744,30 @@ var TitlesRoute = /** @class */ (function () {
11744
11744
  listSaves: { url: '/titles/{title_id}/installs/{install_id}/saves', method: HTTP_METHODS.GET },
11745
11745
  storeSave: { url: '/titles/{title_id}/installs/{install_id}/saves', method: HTTP_METHODS.POST },
11746
11746
  resolveSaveConflict: { url: '/titles/{title_id}/installs/{install_id}/saves/{save_id}/resolve', method: HTTP_METHODS.POST },
11747
+ wishlistToggle: {
11748
+ url: '/titles/{title_id}/wishlist',
11749
+ method: HTTP_METHODS.POST
11750
+ },
11751
+ wishlistUpdateScore: {
11752
+ url: '/titles/{title_id}/wishlist/score',
11753
+ method: HTTP_METHODS.POST
11754
+ },
11755
+ wishlistStats: {
11756
+ url: '/titles/{title_id}/wishlist/stats',
11757
+ method: HTTP_METHODS.GET
11758
+ },
11759
+ myWishlists: {
11760
+ url: '/users/me/wishlists',
11761
+ method: HTTP_METHODS.GET
11762
+ },
11763
+ wishlistMe: {
11764
+ url: '/titles/{title_id}/wishlist/me',
11765
+ method: HTTP_METHODS.GET
11766
+ },
11767
+ attributionFunnel: {
11768
+ url: '/titles/{title_id}/reports/attribution-funnel',
11769
+ method: HTTP_METHODS.GET
11770
+ },
11747
11771
  };
11748
11772
  return TitlesRoute;
11749
11773
  }());
@@ -12441,6 +12465,57 @@ var Titles = /** @class */ (function () {
12441
12465
  Titles.resolveSaveConflict = function (title_id, install_id, save_id, conflict_id, choice) {
12442
12466
  return Requests.processRoute(TitlesRoute.routes.resolveSaveConflict, { conflict_id: conflict_id, choice: choice }, { title_id: title_id, install_id: install_id, save_id: save_id });
12443
12467
  };
12468
+ /**
12469
+ * Toggle a game on the current user's wishlist.
12470
+ * If the game is not wishlisted, it will be added. If it is, it will be removed.
12471
+ *
12472
+ * @param title_id The UUID of the title.
12473
+ * @param data Optional context: { fingerprint_id?: string, short_link_click_id?: string }
12474
+ */
12475
+ Titles.wishlistToggle = function (title_id, data) {
12476
+ return Requests.processRoute(TitlesRoute.routes.wishlistToggle, data, { title_id: title_id });
12477
+ };
12478
+ /**
12479
+ * Record a self-assigned excitement score (1-5) for a wishlisted game.
12480
+ *
12481
+ * @param title_id The UUID of the title.
12482
+ * @param data { score: number } - Must be between 1 and 5.
12483
+ */
12484
+ Titles.wishlistUpdateScore = function (title_id, data) {
12485
+ return Requests.processRoute(TitlesRoute.routes.wishlistUpdateScore, data, { title_id: title_id });
12486
+ };
12487
+ /**
12488
+ * Retrieve the current user's personal wishlist collection.
12489
+ *
12490
+ * @param params Optional pagination parameters (?page=1&per_page=25)
12491
+ */
12492
+ Titles.myWishlists = function (params) {
12493
+ return Requests.processRoute(TitlesRoute.routes.myWishlists, undefined, undefined, params);
12494
+ };
12495
+ /**
12496
+ * Get Wishlist Intelligence statistics for a title.
12497
+ * Includes funnel data and predictive revenue forecasting.
12498
+ * Note: Requires Title Administrator permissions.
12499
+ *
12500
+ * @param title_id The UUID of the title.
12501
+ */
12502
+ Titles.wishlistStats = function (title_id) {
12503
+ return Requests.processRoute(TitlesRoute.routes.wishlistStats, undefined, { title_id: title_id });
12504
+ };
12505
+ /**
12506
+ * Get the current user's specific wishlist for a title.
12507
+ * @param title_id The UUID of the title.
12508
+ */
12509
+ Titles.wishlistMe = function (title_id) {
12510
+ return Requests.processRoute(TitlesRoute.routes.wishlistMe, undefined, { title_id: title_id });
12511
+ };
12512
+ /**
12513
+ * Get the consolidated attribution funnel report.
12514
+ * @param title_id The UUID of the title.
12515
+ */
12516
+ Titles.attributionFunnel = function (title_id, params) {
12517
+ return Requests.processRoute(TitlesRoute.routes.attributionFunnel, undefined, { title_id: title_id }, params);
12518
+ };
12444
12519
  return Titles;
12445
12520
  }());
12446
12521