glitch-javascript-sdk 1.6.3 → 1.6.5

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
@@ -1223,6 +1223,19 @@ declare class Communities {
1223
1223
  * @param params Optional date-range filter (start_date, end_date, etc.)
1224
1224
  */
1225
1225
  static newsletterSubscriberTrend<T>(community_id: string, newsletter_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
1226
+ /**
1227
+ * Export subscribers for a specific newsletter.
1228
+ * The file is generated asynchronously on the server and
1229
+ * the user is emailed a link to download the file.
1230
+ *
1231
+ * @param community_id The ID of the community.
1232
+ * @param newsletter_id The ID of the newsletter.
1233
+ * @param data Export options (format: 'csv' or 'xlsx').
1234
+ * @returns Promise
1235
+ */
1236
+ static exportNewsletterSubscribers<T>(community_id: string, newsletter_id: string, data: {
1237
+ format: 'csv' | 'xlsx';
1238
+ }, params?: Record<string, any>): AxiosPromise<Response<T>>;
1226
1239
  }
1227
1240
 
1228
1241
  declare class Users {
@@ -4434,6 +4447,15 @@ declare class Funnel {
4434
4447
  * @returns Promise with yearly funnel metrics data
4435
4448
  */
4436
4449
  static yearly<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
4450
+ /**
4451
+ * Get gamified funnel metrics with recommended targets, scores, and ranks.
4452
+ *
4453
+ * @see https://api.glitch.fun/api/documentation#/Funnel%20Metrics/get_funnels_gamify
4454
+ *
4455
+ * @param params Query parameters (title_id, community_id, start_date, end_date)
4456
+ * @returns Promise with the gamified funnel data
4457
+ */
4458
+ static gamify<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
4437
4459
  }
4438
4460
 
4439
4461
  declare class SocialStats {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "1.6.3",
3
+ "version": "1.6.5",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -850,7 +850,29 @@ class Communities {
850
850
  );
851
851
  }
852
852
 
853
-
853
+ /**
854
+ * Export subscribers for a specific newsletter.
855
+ * The file is generated asynchronously on the server and
856
+ * the user is emailed a link to download the file.
857
+ *
858
+ * @param community_id The ID of the community.
859
+ * @param newsletter_id The ID of the newsletter.
860
+ * @param data Export options (format: 'csv' or 'xlsx').
861
+ * @returns Promise
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
+ }
854
876
 
855
877
 
856
878
  }
package/src/api/Funnel.ts CHANGED
@@ -87,6 +87,19 @@ class Funnel {
87
87
  public static yearly<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
88
88
  return Requests.processRoute(FunnelRoutes.routes.yearly, undefined, undefined, params);
89
89
  }
90
+
91
+ /**
92
+ * Get gamified funnel metrics with recommended targets, scores, and ranks.
93
+ *
94
+ * @see https://api.glitch.fun/api/documentation#/Funnel%20Metrics/get_funnels_gamify
95
+ *
96
+ * @param params Query parameters (title_id, community_id, start_date, end_date)
97
+ * @returns Promise with the gamified funnel data
98
+ */
99
+ public static gamify<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
100
+ return Requests.processRoute(FunnelRoutes.routes.gamify, undefined, undefined, params);
101
+ }
102
+
90
103
  }
91
104
 
92
105
  export default Funnel;
@@ -59,6 +59,11 @@ class CommunitiesRoute {
59
59
  method: HTTP_METHODS.GET
60
60
  },
61
61
 
62
+ exportNewsletterSubscribers: {
63
+ url: '/communities/{community_id}/newsletters/{newsletter_id}/subscribers/export',
64
+ method: HTTP_METHODS.POST
65
+ },
66
+
62
67
  // Campaigns
63
68
  listCampaigns: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns', method: HTTP_METHODS.GET },
64
69
  createCampaign: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns', method: HTTP_METHODS.POST },
@@ -12,6 +12,7 @@ class FunnelRoutes {
12
12
  daily: { url: '/funnels/daily', method: HTTP_METHODS.GET },
13
13
  monthly: { url: '/funnels/monthly', method: HTTP_METHODS.GET },
14
14
  yearly: { url: '/funnels/yearly', method: HTTP_METHODS.GET },
15
+ gamify: { url: '/funnels/gamify', method: HTTP_METHODS.GET },
15
16
  };
16
17
  }
17
18