glitch-javascript-sdk 1.5.7 → 1.5.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.
@@ -555,5 +555,23 @@ declare class Communities {
555
555
  * @returns Promise
556
556
  */
557
557
  static registerNewsletterSubscriber<T>(community_id: string, newsletter_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
558
+ /**
559
+ * Get newsletter overall reports (subscriber changes, unsubscribes, etc.).
560
+ *
561
+ * @param community_id The ID of the community.
562
+ * @param newsletter_id The ID of the newsletter.
563
+ * @param params Optional query params (start_date, end_date, etc).
564
+ * @returns Promise with aggregated data
565
+ */
566
+ static newsletterReports<T>(community_id: string, newsletter_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
567
+ /**
568
+ * Get campaign-level stats for a newsletter.
569
+ *
570
+ * @param community_id The ID of the community.
571
+ * @param newsletter_id The ID of the newsletter.
572
+ * @param params Optional query params (start_date, end_date, etc).
573
+ * @returns Promise with campaign stats
574
+ */
575
+ static newsletterCampaignReports<T>(community_id: string, newsletter_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
558
576
  }
559
577
  export default Communities;
package/dist/esm/index.js CHANGED
@@ -6622,6 +6622,14 @@ var CommunitiesRoute = /** @class */ (function () {
6622
6622
  deleteNewsletter: { url: '/communities/{community_id}/newsletters/{newsletter_id}', method: HTTP_METHODS.DELETE },
6623
6623
  importNewsletterSubscribers: { url: '/communities/{community_id}/newsletters/{newsletter_id}/subscribers/import', method: HTTP_METHODS.POST },
6624
6624
  uploadNewsletterBannerImage: { url: '/communities/{community_id}/newsletters/{newsletter_id}/uploadBannerImage', method: HTTP_METHODS.POST },
6625
+ newsletterReports: {
6626
+ url: '/communities/{community_id}/newsletters/{newsletter_id}/reports',
6627
+ method: HTTP_METHODS.GET
6628
+ },
6629
+ newsletterCampaignReports: {
6630
+ url: '/communities/{community_id}/newsletters/{newsletter_id}/reports/campaign',
6631
+ method: HTTP_METHODS.GET
6632
+ },
6625
6633
  // Campaigns
6626
6634
  listCampaigns: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns', method: HTTP_METHODS.GET },
6627
6635
  createCampaign: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns', method: HTTP_METHODS.POST },
@@ -7334,6 +7342,28 @@ var Communities = /** @class */ (function () {
7334
7342
  Communities.registerNewsletterSubscriber = function (community_id, newsletter_id, data, params) {
7335
7343
  return Requests.processRoute(CommunitiesRoute.routes.registerNewsletterSubscriber, data, { community_id: community_id, newsletter_id: newsletter_id }, params);
7336
7344
  };
7345
+ /**
7346
+ * Get newsletter overall reports (subscriber changes, unsubscribes, etc.).
7347
+ *
7348
+ * @param community_id The ID of the community.
7349
+ * @param newsletter_id The ID of the newsletter.
7350
+ * @param params Optional query params (start_date, end_date, etc).
7351
+ * @returns Promise with aggregated data
7352
+ */
7353
+ Communities.newsletterReports = function (community_id, newsletter_id, params) {
7354
+ return Requests.processRoute(CommunitiesRoute.routes.newsletterReports, undefined, { community_id: community_id, newsletter_id: newsletter_id }, params);
7355
+ };
7356
+ /**
7357
+ * Get campaign-level stats for a newsletter.
7358
+ *
7359
+ * @param community_id The ID of the community.
7360
+ * @param newsletter_id The ID of the newsletter.
7361
+ * @param params Optional query params (start_date, end_date, etc).
7362
+ * @returns Promise with campaign stats
7363
+ */
7364
+ Communities.newsletterCampaignReports = function (community_id, newsletter_id, params) {
7365
+ return Requests.processRoute(CommunitiesRoute.routes.newsletterCampaignReports, undefined, { community_id: community_id, newsletter_id: newsletter_id }, params);
7366
+ };
7337
7367
  return Communities;
7338
7368
  }());
7339
7369