glitch-javascript-sdk 2.9.5 → 2.9.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
@@ -4469,6 +4469,42 @@ declare class Titles {
4469
4469
  * @param params Optional filters like { around_me: true, install_id: 'uuid', season_id: 'uuid' }
4470
4470
  */
4471
4471
  static getProgressionLeaderboard<T>(title_id: string, api_key: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
4472
+ static getTechnicalEventSummary<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
4473
+ /**
4474
+ * Get games ranked by community activity (active players).
4475
+ *
4476
+ * @param params
4477
+ * - window: number (hours, default 24)
4478
+ * - limit: number (default 10)
4479
+ */
4480
+ static getCommunityActivity<T>(params?: {
4481
+ window?: number;
4482
+ limit?: number;
4483
+ }): AxiosPromise<Response<T>>;
4484
+ /**
4485
+ * Get games trending on social media.
4486
+ *
4487
+ * @param params
4488
+ * - type: 'influencer' (campaigns) or 'organic' (non-paid)
4489
+ * - window: number (hours, default 168)
4490
+ * - limit: number (default 10)
4491
+ */
4492
+ static getSocialTrending<T>(params: {
4493
+ type: 'influencer' | 'organic';
4494
+ window?: number;
4495
+ limit?: number;
4496
+ }): AxiosPromise<Response<T>>;
4497
+ /**
4498
+ * Get a personalized discovery queue of games.
4499
+ *
4500
+ * @param params
4501
+ * - limit: number (default 12)
4502
+ * - device_id: string (highly recommended for guest tracking)
4503
+ */
4504
+ static getDiscoveryQueue<T>(params?: {
4505
+ limit?: number;
4506
+ device_id?: string;
4507
+ }): AxiosPromise<Response<T>>;
4472
4508
  }
4473
4509
 
4474
4510
  declare class Campaigns {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "2.9.5",
3
+ "version": "2.9.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
@@ -1154,7 +1154,7 @@ class Titles {
1154
1154
  return Requests.processRoute(TitlesRoute.routes.completeMultipartUpload, data, { title_id });
1155
1155
  }
1156
1156
 
1157
- // --- Developer Definition Methods ---
1157
+ // --- Developer Definition Methods ---
1158
1158
 
1159
1159
  public static listProgressionStats<T>(title_id: string): AxiosPromise<Response<T>> {
1160
1160
  return Requests.processRoute(TitlesRoute.routes.progressionStatsList, undefined, { title_id });
@@ -1215,6 +1215,44 @@ class Titles {
1215
1215
  public static getProgressionLeaderboard<T>(title_id: string, api_key: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
1216
1216
  return Requests.processRoute(TitlesRoute.routes.progressionLeaderboardView, undefined, { title_id, api_key }, params);
1217
1217
  }
1218
+
1219
+ public static getTechnicalEventSummary<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
1220
+ return Requests.processRoute(TitlesRoute.routes.getTechnicalEventSummary, {}, { title_id }, params);
1221
+ }
1222
+
1223
+ /**
1224
+ * Get games ranked by community activity (active players).
1225
+ *
1226
+ * @param params
1227
+ * - window: number (hours, default 24)
1228
+ * - limit: number (default 10)
1229
+ */
1230
+ public static getCommunityActivity<T>(params?: { window?: number, limit?: number }): AxiosPromise<Response<T>> {
1231
+ return Requests.processRoute(TitlesRoute.routes.communityActivity, {}, {}, params);
1232
+ }
1233
+
1234
+ /**
1235
+ * Get games trending on social media.
1236
+ *
1237
+ * @param params
1238
+ * - type: 'influencer' (campaigns) or 'organic' (non-paid)
1239
+ * - window: number (hours, default 168)
1240
+ * - limit: number (default 10)
1241
+ */
1242
+ public static getSocialTrending<T>(params: { type: 'influencer' | 'organic', window?: number, limit?: number }): AxiosPromise<Response<T>> {
1243
+ return Requests.processRoute(TitlesRoute.routes.socialTrending, {}, {}, params);
1244
+ }
1245
+
1246
+ /**
1247
+ * Get a personalized discovery queue of games.
1248
+ *
1249
+ * @param params
1250
+ * - limit: number (default 12)
1251
+ * - device_id: string (highly recommended for guest tracking)
1252
+ */
1253
+ public static getDiscoveryQueue<T>(params?: { limit?: number, device_id?: string }): AxiosPromise<Response<T>> {
1254
+ return Requests.processRoute(TitlesRoute.routes.discoveryQueue, {}, {}, params);
1255
+ }
1218
1256
  }
1219
1257
 
1220
1258
  export default Titles;
@@ -252,6 +252,11 @@ class TitlesRoute {
252
252
  method: HTTP_METHODS.POST
253
253
  },
254
254
 
255
+ getTechnicalEventSummary: {
256
+ url: '/titles/{title_id}/analytics/events-summary',
257
+ method: HTTP_METHODS.GET
258
+ },
259
+
255
260
 
256
261
  // --- Title Progression Definitions (Developer API) ---
257
262
  progressionStatsList: { url: '/titles/{title_id}/progression/stats', method: HTTP_METHODS.GET },
@@ -273,6 +278,9 @@ class TitlesRoute {
273
278
  progressionPlayerAchievements: { url: '/titles/{title_id}/installs/{install_id}/achievements', method: HTTP_METHODS.GET },
274
279
  progressionLeaderboardView: { url: '/titles/{title_id}/leaderboards/{api_key}', method: HTTP_METHODS.GET },
275
280
 
281
+ communityActivity: { url: '/titles/activity/trending', method: HTTP_METHODS.GET },
282
+ socialTrending: { url: '/titles/activity/social', method: HTTP_METHODS.GET },
283
+
276
284
 
277
285
  };
278
286