glitch-javascript-sdk 1.5.8 → 1.6.0

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
@@ -1215,6 +1215,14 @@ declare class Communities {
1215
1215
  * @returns Promise with campaign stats
1216
1216
  */
1217
1217
  static newsletterCampaignReports<T>(community_id: string, newsletter_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
1218
+ /**
1219
+ * Retrieves daily subscriber trend data for the specified newsletter.
1220
+ *
1221
+ * @param community_id The UUID of the community
1222
+ * @param newsletter_id The UUID of the newsletter
1223
+ * @param params Optional date-range filter (start_date, end_date, etc.)
1224
+ */
1225
+ static newsletterSubscriberTrend<T>(community_id: string, newsletter_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
1218
1226
  }
1219
1227
 
1220
1228
  declare class Users {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "1.5.8",
3
+ "version": "1.6.0",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -830,6 +830,26 @@ class Communities {
830
830
  );
831
831
  }
832
832
 
833
+ /**
834
+ * Retrieves daily subscriber trend data for the specified newsletter.
835
+ *
836
+ * @param community_id The UUID of the community
837
+ * @param newsletter_id The UUID of the newsletter
838
+ * @param params Optional date-range filter (start_date, end_date, etc.)
839
+ */
840
+ public static newsletterSubscriberTrend<T>(
841
+ community_id: string,
842
+ newsletter_id: string,
843
+ params?: Record<string, any>
844
+ ): AxiosPromise<Response<T>> {
845
+ return Requests.processRoute(
846
+ CommunitiesRoute.routes.newsletterSubscriberTrend,
847
+ undefined, // no body data
848
+ { community_id, newsletter_id },
849
+ params
850
+ );
851
+ }
852
+
833
853
 
834
854
 
835
855
 
@@ -54,6 +54,11 @@ class CommunitiesRoute {
54
54
  method: HTTP_METHODS.GET
55
55
  },
56
56
 
57
+ newsletterSubscriberTrend: {
58
+ url: '/communities/{community_id}/newsletters/{newsletter_id}/reports/subscriber_trend',
59
+ method: HTTP_METHODS.GET
60
+ },
61
+
57
62
  // Campaigns
58
63
  listCampaigns: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns', method: HTTP_METHODS.GET },
59
64
  createCampaign: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns', method: HTTP_METHODS.POST },