glitch-javascript-sdk 1.6.4 → 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.
@@ -581,5 +581,18 @@ declare class Communities {
581
581
  * @param params Optional date-range filter (start_date, end_date, etc.)
582
582
  */
583
583
  static newsletterSubscriberTrend<T>(community_id: string, newsletter_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
584
+ /**
585
+ * Export subscribers for a specific newsletter.
586
+ * The file is generated asynchronously on the server and
587
+ * the user is emailed a link to download the file.
588
+ *
589
+ * @param community_id The ID of the community.
590
+ * @param newsletter_id The ID of the newsletter.
591
+ * @param data Export options (format: 'csv' or 'xlsx').
592
+ * @returns Promise
593
+ */
594
+ static exportNewsletterSubscribers<T>(community_id: string, newsletter_id: string, data: {
595
+ format: 'csv' | 'xlsx';
596
+ }, params?: Record<string, any>): AxiosPromise<Response<T>>;
584
597
  }
585
598
  export default Communities;
package/dist/esm/index.js CHANGED
@@ -6634,6 +6634,10 @@ var CommunitiesRoute = /** @class */ (function () {
6634
6634
  url: '/communities/{community_id}/newsletters/{newsletter_id}/reports/subscriber_trend',
6635
6635
  method: HTTP_METHODS.GET
6636
6636
  },
6637
+ exportNewsletterSubscribers: {
6638
+ url: '/communities/{community_id}/newsletters/{newsletter_id}/subscribers/export',
6639
+ method: HTTP_METHODS.POST
6640
+ },
6637
6641
  // Campaigns
6638
6642
  listCampaigns: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns', method: HTTP_METHODS.GET },
6639
6643
  createCampaign: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns', method: HTTP_METHODS.POST },
@@ -7379,6 +7383,19 @@ var Communities = /** @class */ (function () {
7379
7383
  return Requests.processRoute(CommunitiesRoute.routes.newsletterSubscriberTrend, undefined, // no body data
7380
7384
  { community_id: community_id, newsletter_id: newsletter_id }, params);
7381
7385
  };
7386
+ /**
7387
+ * Export subscribers for a specific newsletter.
7388
+ * The file is generated asynchronously on the server and
7389
+ * the user is emailed a link to download the file.
7390
+ *
7391
+ * @param community_id The ID of the community.
7392
+ * @param newsletter_id The ID of the newsletter.
7393
+ * @param data Export options (format: 'csv' or 'xlsx').
7394
+ * @returns Promise
7395
+ */
7396
+ Communities.exportNewsletterSubscribers = function (community_id, newsletter_id, data, params) {
7397
+ return Requests.processRoute(CommunitiesRoute.routes.exportNewsletterSubscribers, data, { community_id: community_id, newsletter_id: newsletter_id }, params);
7398
+ };
7382
7399
  return Communities;
7383
7400
  }());
7384
7401