glitch-javascript-sdk 1.6.7 → 1.6.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/index.d.ts CHANGED
@@ -2975,6 +2975,28 @@ declare class Titles {
2975
2975
  * - page?: number, per_page?: number
2976
2976
  */
2977
2977
  static search<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
2978
+ /**
2979
+ * List game installs for a specific title.
2980
+ */
2981
+ static listInstalls<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
2982
+ /**
2983
+ * View a single game install record.
2984
+ */
2985
+ static viewInstall<T>(title_id: string, install_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
2986
+ /**
2987
+ * Create a new game install record.
2988
+ */
2989
+ static createInstall<T>(title_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
2990
+ /**
2991
+ * List retention events for a specific title.
2992
+ */
2993
+ static listRetentions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
2994
+ /**
2995
+ * Get a summary report of retention events for a specific title.
2996
+ */
2997
+ static retentionSummary<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
2998
+ static activeRetentions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
2999
+ static retentionAnalysis<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
2978
3000
  }
2979
3001
 
2980
3002
  declare class Campaigns {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "1.6.7",
3
+ "version": "1.6.8",
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
@@ -318,6 +318,49 @@ class Titles {
318
318
  return Requests.processRoute(TitlesRoute.routes.search, {}, undefined, params);
319
319
  }
320
320
 
321
+ /**
322
+ * List game installs for a specific title.
323
+ */
324
+ public static listInstalls<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
325
+ return Requests.processRoute(TitlesRoute.routes.listInstalls, {}, { title_id: title_id }, params);
326
+ }
327
+
328
+ /**
329
+ * View a single game install record.
330
+ */
331
+ public static viewInstall<T>(title_id: string, install_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
332
+ return Requests.processRoute(TitlesRoute.routes.viewInstall, {}, { title_id: title_id, install_id: install_id }, params);
333
+ }
334
+
335
+ /**
336
+ * Create a new game install record.
337
+ */
338
+ public static createInstall<T>(title_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
339
+ return Requests.processRoute(TitlesRoute.routes.createInstall, data, { title_id: title_id }, params);
340
+ }
341
+
342
+ /**
343
+ * List retention events for a specific title.
344
+ */
345
+ public static listRetentions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
346
+ return Requests.processRoute(TitlesRoute.routes.listRetentions, {}, { title_id: title_id }, params);
347
+ }
348
+
349
+ /**
350
+ * Get a summary report of retention events for a specific title.
351
+ */
352
+ public static retentionSummary<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
353
+ return Requests.processRoute(TitlesRoute.routes.retentionSummary, {}, { title_id: title_id }, params);
354
+ }
355
+
356
+ public static activeRetentions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
357
+ return Requests.processRoute(TitlesRoute.routes.activeRetentions, {}, { title_id }, params);
358
+ }
359
+
360
+ public static retentionAnalysis<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
361
+ return Requests.processRoute(TitlesRoute.routes.retentionAnalysis, {}, { title_id }, params);
362
+ }
363
+
321
364
  }
322
365
 
323
366
  export default Titles;
@@ -24,6 +24,13 @@ class TitlesRoute {
24
24
  listTokens: { url: '/titles/{title_id}/tokens', method: HTTP_METHODS.GET },
25
25
  revokeToken: { url: '/titles/{title_id}/tokens/{token_id}', method: HTTP_METHODS.DELETE },
26
26
  search: { url: '/titles/search', method: HTTP_METHODS.GET },
27
+ listInstalls: { url: '/titles/{title_id}/installs', method: HTTP_METHODS.GET },
28
+ viewInstall: { url: '/titles/{title_id}/installs/{install_id}', method: HTTP_METHODS.GET },
29
+ createInstall: { url: '/titles/{title_id}/installs', method: HTTP_METHODS.POST },
30
+ listRetentions: { url: '/titles/{title_id}/retentions', method: HTTP_METHODS.GET },
31
+ retentionSummary: { url: '/titles/{title_id}/retentions/summary', method: HTTP_METHODS.GET },
32
+ activeRetentions: { url: '/titles/{title_id}/retentions/active', method: HTTP_METHODS.GET },
33
+ retentionAnalysis: { url: '/titles/{title_id}/retentions/analysis', method: HTTP_METHODS.GET },
27
34
  };
28
35
 
29
36
  }