glitch-javascript-sdk 1.7.4 → 1.7.6

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
@@ -1236,6 +1236,17 @@ declare class Communities {
1236
1236
  static exportNewsletterSubscribers<T>(community_id: string, newsletter_id: string, data: {
1237
1237
  format: 'csv' | 'xlsx';
1238
1238
  }, params?: Record<string, any>): AxiosPromise<Response<T>>;
1239
+ /**
1240
+ * Import game installs from a game title installations to a newsletter
1241
+ *
1242
+ * @param community_id The ID of the community.
1243
+ * @param newsletter_id The ID of the newsletter.
1244
+ * @param data Export options (format: 'csv' or 'xlsx').
1245
+ * @returns Promise
1246
+ */
1247
+ static importGameInstalls<T>(community_id: string, newsletter_id: string, data: {
1248
+ format: 'csv' | 'xlsx';
1249
+ }, params?: Record<string, any>): AxiosPromise<Response<T>>;
1239
1250
  }
1240
1251
 
1241
1252
  declare class Users {
@@ -3008,6 +3019,7 @@ declare class Titles {
3008
3019
  * Optionally filter by platform/device_type/OS/version and group by one dimension.
3009
3020
  */
3010
3021
  static sessionsAverage<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
3022
+ static sessionsHistogram<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
3011
3023
  }
3012
3024
 
3013
3025
  declare class Campaigns {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "1.7.4",
3
+ "version": "1.7.6",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -860,19 +860,41 @@ class Communities {
860
860
  * @param data Export options (format: 'csv' or 'xlsx').
861
861
  * @returns Promise
862
862
  */
863
- public static exportNewsletterSubscribers<T>(
864
- community_id: string,
865
- newsletter_id: string,
866
- data: { format: 'csv' | 'xlsx' },
867
- params?: Record<string, any>
868
- ): AxiosPromise<Response<T>> {
869
- return Requests.processRoute(
870
- CommunitiesRoute.routes.exportNewsletterSubscribers,
871
- data,
872
- { community_id, newsletter_id },
873
- params
874
- );
875
- }
863
+ public static exportNewsletterSubscribers<T>(
864
+ community_id: string,
865
+ newsletter_id: string,
866
+ data: { format: 'csv' | 'xlsx' },
867
+ params?: Record<string, any>
868
+ ): AxiosPromise<Response<T>> {
869
+ return Requests.processRoute(
870
+ CommunitiesRoute.routes.exportNewsletterSubscribers,
871
+ data,
872
+ { community_id, newsletter_id },
873
+ params
874
+ );
875
+ }
876
+
877
+ /**
878
+ * Import game installs from a game title installations to a newsletter
879
+ *
880
+ * @param community_id The ID of the community.
881
+ * @param newsletter_id The ID of the newsletter.
882
+ * @param data Export options (format: 'csv' or 'xlsx').
883
+ * @returns Promise
884
+ */
885
+ public static importGameInstalls<T>(
886
+ community_id: string,
887
+ newsletter_id: string,
888
+ data: { format: 'csv' | 'xlsx' },
889
+ params?: Record<string, any>
890
+ ): AxiosPromise<Response<T>> {
891
+ return Requests.processRoute(
892
+ CommunitiesRoute.routes.importGameInstalls,
893
+ data,
894
+ { community_id, newsletter_id },
895
+ params
896
+ );
897
+ }
876
898
 
877
899
 
878
900
  }
package/src/api/Titles.ts CHANGED
@@ -397,6 +397,19 @@ class Titles {
397
397
  );
398
398
  }
399
399
 
400
+ public static sessionsHistogram<T>(
401
+ title_id: string,
402
+ params?: Record<string, any>
403
+ ): AxiosPromise<Response<T>> {
404
+ return Requests.processRoute(
405
+ TitlesRoute.routes.sessionsHistogram,
406
+ {},
407
+ { title_id },
408
+ params
409
+ );
410
+ }
411
+
412
+
400
413
  }
401
414
 
402
415
  export default Titles;
@@ -63,6 +63,10 @@ class CommunitiesRoute {
63
63
  url: '/communities/{community_id}/newsletters/{newsletter_id}/subscribers/export',
64
64
  method: HTTP_METHODS.POST
65
65
  },
66
+ importGameInstalls: {
67
+ url: '/communities/{community_id}/newsletters/{newsletter_id}/import_game_installs',
68
+ method: HTTP_METHODS.POST
69
+ },
66
70
 
67
71
  // Campaigns
68
72
  listCampaigns: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns', method: HTTP_METHODS.GET },
@@ -40,6 +40,10 @@ class TitlesRoute {
40
40
  url: '/titles/{title_id}/installs/sessions/average',
41
41
  method: HTTP_METHODS.GET
42
42
  },
43
+ sessionsHistogram: {
44
+ url: '/titles/{title_id}/sessions/histogram',
45
+ method: HTTP_METHODS.GET
46
+ },
43
47
  };
44
48
 
45
49
  }