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/index.d.ts CHANGED
@@ -4341,6 +4341,37 @@ declare class Titles {
4341
4341
  * Resolve a conflict.
4342
4342
  */
4343
4343
  static resolveSaveConflict<T>(title_id: string, install_id: string, save_id: string, conflict_id: string, choice: 'keep_server' | 'use_client'): AxiosPromise<Response<T>>;
4344
+ /**
4345
+ * Toggle a game on the current user's wishlist.
4346
+ * If the game is not wishlisted, it will be added. If it is, it will be removed.
4347
+ *
4348
+ * @param title_id The UUID of the title.
4349
+ * @param data Optional context: { fingerprint_id?: string, short_link_click_id?: string }
4350
+ */
4351
+ static wishlistToggle<T>(title_id: string, data?: object): AxiosPromise<Response<T>>;
4352
+ /**
4353
+ * Record a self-assigned excitement score (1-5) for a wishlisted game.
4354
+ *
4355
+ * @param title_id The UUID of the title.
4356
+ * @param data { score: number } - Must be between 1 and 5.
4357
+ */
4358
+ static wishlistUpdateScore<T>(title_id: string, data: {
4359
+ score: number;
4360
+ }): AxiosPromise<Response<T>>;
4361
+ /**
4362
+ * Retrieve the current user's personal wishlist collection.
4363
+ *
4364
+ * @param params Optional pagination parameters (?page=1&per_page=25)
4365
+ */
4366
+ static myWishlists<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
4367
+ /**
4368
+ * Get Wishlist Intelligence statistics for a title.
4369
+ * Includes funnel data and predictive revenue forecasting.
4370
+ * Note: Requires Title Administrator permissions.
4371
+ *
4372
+ * @param title_id The UUID of the title.
4373
+ */
4374
+ static wishlistStats<T>(title_id: string): AxiosPromise<Response<T>>;
4344
4375
  }
4345
4376
 
4346
4377
  declare class Campaigns {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "2.8.6",
3
+ "version": "2.8.7",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
package/src/api/Titles.ts CHANGED
@@ -1025,6 +1025,47 @@ class Titles {
1025
1025
  public static resolveSaveConflict<T>(title_id: string, install_id: string, save_id: string, conflict_id: string, choice: 'keep_server' | 'use_client'): AxiosPromise<Response<T>> {
1026
1026
  return Requests.processRoute(TitlesRoute.routes.resolveSaveConflict, { conflict_id, choice }, { title_id, install_id, save_id });
1027
1027
  }
1028
+
1029
+ /**
1030
+ * Toggle a game on the current user's wishlist.
1031
+ * If the game is not wishlisted, it will be added. If it is, it will be removed.
1032
+ *
1033
+ * @param title_id The UUID of the title.
1034
+ * @param data Optional context: { fingerprint_id?: string, short_link_click_id?: string }
1035
+ */
1036
+ public static wishlistToggle<T>(title_id: string, data?: object): AxiosPromise<Response<T>> {
1037
+ return Requests.processRoute(TitlesRoute.routes.wishlistToggle, data, { title_id });
1038
+ }
1039
+
1040
+ /**
1041
+ * Record a self-assigned excitement score (1-5) for a wishlisted game.
1042
+ *
1043
+ * @param title_id The UUID of the title.
1044
+ * @param data { score: number } - Must be between 1 and 5.
1045
+ */
1046
+ public static wishlistUpdateScore<T>(title_id: string, data: { score: number }): AxiosPromise<Response<T>> {
1047
+ return Requests.processRoute(TitlesRoute.routes.wishlistUpdateScore, data, { title_id });
1048
+ }
1049
+
1050
+ /**
1051
+ * Retrieve the current user's personal wishlist collection.
1052
+ *
1053
+ * @param params Optional pagination parameters (?page=1&per_page=25)
1054
+ */
1055
+ public static myWishlists<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
1056
+ return Requests.processRoute(TitlesRoute.routes.myWishlists, undefined, undefined, params);
1057
+ }
1058
+
1059
+ /**
1060
+ * Get Wishlist Intelligence statistics for a title.
1061
+ * Includes funnel data and predictive revenue forecasting.
1062
+ * Note: Requires Title Administrator permissions.
1063
+ *
1064
+ * @param title_id The UUID of the title.
1065
+ */
1066
+ public static wishlistStats<T>(title_id: string): AxiosPromise<Response<T>> {
1067
+ return Requests.processRoute(TitlesRoute.routes.wishlistStats, undefined, { title_id });
1068
+ }
1028
1069
  }
1029
1070
 
1030
1071
  export default Titles;
@@ -190,13 +190,13 @@ class TitlesRoute {
190
190
  viewDeveloperPayout: { url: '/titles/{title_id}/payouts/{payout_id}', method: HTTP_METHODS.GET },
191
191
  developerPayoutSummary: { url: '/titles/{title_id}/payouts/summary', method: HTTP_METHODS.GET },
192
192
 
193
- /**
194
- * The Aegis Handshake: Validates if a specific install/session is authorized to play.
195
- * POST /titles/{title_id}/installs/{install_id}/validate
196
- */
197
- validateInstall: {
198
- url: '/titles/{title_id}/installs/{install_id}/validate',
199
- method: HTTP_METHODS.POST
193
+ /**
194
+ * The Aegis Handshake: Validates if a specific install/session is authorized to play.
195
+ * POST /titles/{title_id}/installs/{install_id}/validate
196
+ */
197
+ validateInstall: {
198
+ url: '/titles/{title_id}/installs/{install_id}/validate',
199
+ method: HTTP_METHODS.POST
200
200
  },
201
201
 
202
202
  listBuilds: { url: '/titles/{title_id}/deployments', method: HTTP_METHODS.GET },
@@ -205,6 +205,23 @@ class TitlesRoute {
205
205
  storeSave: { url: '/titles/{title_id}/installs/{install_id}/saves', method: HTTP_METHODS.POST },
206
206
  resolveSaveConflict: { url: '/titles/{title_id}/installs/{install_id}/saves/{save_id}/resolve', method: HTTP_METHODS.POST },
207
207
 
208
+ wishlistToggle: {
209
+ url: '/titles/{title_id}/wishlist',
210
+ method: HTTP_METHODS.POST
211
+ },
212
+ wishlistUpdateScore: {
213
+ url: '/titles/{title_id}/wishlist/score',
214
+ method: HTTP_METHODS.POST
215
+ },
216
+ wishlistStats: {
217
+ url: '/titles/{title_id}/wishlist/stats',
218
+ method: HTTP_METHODS.GET
219
+ },
220
+ myWishlists: {
221
+ url: '/users/me/wishlists',
222
+ method: HTTP_METHODS.GET
223
+ },
224
+
208
225
 
209
226
  };
210
227