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.
package/dist/cjs/index.js CHANGED
@@ -19806,6 +19806,14 @@ var CommunitiesRoute = /** @class */ (function () {
19806
19806
  deleteNewsletter: { url: '/communities/{community_id}/newsletters/{newsletter_id}', method: HTTP_METHODS.DELETE },
19807
19807
  importNewsletterSubscribers: { url: '/communities/{community_id}/newsletters/{newsletter_id}/subscribers/import', method: HTTP_METHODS.POST },
19808
19808
  uploadNewsletterBannerImage: { url: '/communities/{community_id}/newsletters/{newsletter_id}/uploadBannerImage', method: HTTP_METHODS.POST },
19809
+ newsletterReports: {
19810
+ url: '/communities/{community_id}/newsletters/{newsletter_id}/reports',
19811
+ method: HTTP_METHODS.GET
19812
+ },
19813
+ newsletterCampaignReports: {
19814
+ url: '/communities/{community_id}/newsletters/{newsletter_id}/reports/campaign',
19815
+ method: HTTP_METHODS.GET
19816
+ },
19809
19817
  // Campaigns
19810
19818
  listCampaigns: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns', method: HTTP_METHODS.GET },
19811
19819
  createCampaign: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns', method: HTTP_METHODS.POST },
@@ -20518,6 +20526,28 @@ var Communities = /** @class */ (function () {
20518
20526
  Communities.registerNewsletterSubscriber = function (community_id, newsletter_id, data, params) {
20519
20527
  return Requests.processRoute(CommunitiesRoute.routes.registerNewsletterSubscriber, data, { community_id: community_id, newsletter_id: newsletter_id }, params);
20520
20528
  };
20529
+ /**
20530
+ * Get newsletter overall reports (subscriber changes, unsubscribes, etc.).
20531
+ *
20532
+ * @param community_id The ID of the community.
20533
+ * @param newsletter_id The ID of the newsletter.
20534
+ * @param params Optional query params (start_date, end_date, etc).
20535
+ * @returns Promise with aggregated data
20536
+ */
20537
+ Communities.newsletterReports = function (community_id, newsletter_id, params) {
20538
+ return Requests.processRoute(CommunitiesRoute.routes.newsletterReports, undefined, { community_id: community_id, newsletter_id: newsletter_id }, params);
20539
+ };
20540
+ /**
20541
+ * Get campaign-level stats for a newsletter.
20542
+ *
20543
+ * @param community_id The ID of the community.
20544
+ * @param newsletter_id The ID of the newsletter.
20545
+ * @param params Optional query params (start_date, end_date, etc).
20546
+ * @returns Promise with campaign stats
20547
+ */
20548
+ Communities.newsletterCampaignReports = function (community_id, newsletter_id, params) {
20549
+ return Requests.processRoute(CommunitiesRoute.routes.newsletterCampaignReports, undefined, { community_id: community_id, newsletter_id: newsletter_id }, params);
20550
+ };
20521
20551
  return Communities;
20522
20552
  }());
20523
20553