glitch-javascript-sdk 1.5.9 → 1.6.1

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
@@ -19814,6 +19814,10 @@ var CommunitiesRoute = /** @class */ (function () {
19814
19814
  url: '/communities/{community_id}/newsletters/{newsletter_id}/reports/campaign',
19815
19815
  method: HTTP_METHODS.GET
19816
19816
  },
19817
+ newsletterSubscriberTrend: {
19818
+ url: '/communities/{community_id}/newsletters/{newsletter_id}/reports/subscriber_trend',
19819
+ method: HTTP_METHODS.GET
19820
+ },
19817
19821
  // Campaigns
19818
19822
  listCampaigns: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns', method: HTTP_METHODS.GET },
19819
19823
  createCampaign: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns', method: HTTP_METHODS.POST },
@@ -20548,6 +20552,17 @@ var Communities = /** @class */ (function () {
20548
20552
  Communities.newsletterCampaignReports = function (community_id, newsletter_id, params) {
20549
20553
  return Requests.processRoute(CommunitiesRoute.routes.newsletterCampaignReports, undefined, { community_id: community_id, newsletter_id: newsletter_id }, params);
20550
20554
  };
20555
+ /**
20556
+ * Retrieves daily subscriber trend data for the specified newsletter.
20557
+ *
20558
+ * @param community_id The UUID of the community
20559
+ * @param newsletter_id The UUID of the newsletter
20560
+ * @param params Optional date-range filter (start_date, end_date, etc.)
20561
+ */
20562
+ Communities.newsletterSubscriberTrend = function (community_id, newsletter_id, params) {
20563
+ return Requests.processRoute(CommunitiesRoute.routes.newsletterSubscriberTrend, undefined, // no body data
20564
+ { community_id: community_id, newsletter_id: newsletter_id }, params);
20565
+ };
20551
20566
  return Communities;
20552
20567
  }());
20553
20568
 
@@ -22760,6 +22775,9 @@ var TitlesRoute = /** @class */ (function () {
22760
22775
  updateMediaOrder: { url: '/titles/{title_id}/updateMediaOrder', method: HTTP_METHODS.POST },
22761
22776
  importWishlist: { url: '/titles/{title_id}/wishlist/import', method: HTTP_METHODS.POST },
22762
22777
  getWishlist: { url: '/titles/{title_id}/wishlist', method: HTTP_METHODS.GET },
22778
+ createToken: { url: '/titles/{title_id}/tokens', method: HTTP_METHODS.POST },
22779
+ listTokens: { url: '/titles/{title_id}/tokens', method: HTTP_METHODS.GET },
22780
+ revokeToken: { url: '/titles/{title_id}/tokens/{token_id}', method: HTTP_METHODS.DELETE },
22763
22781
  };
22764
22782
  return TitlesRoute;
22765
22783
  }());
@@ -22978,6 +22996,25 @@ var Titles = /** @class */ (function () {
22978
22996
  TitlesRoute.routes.getWishlist.url.replace('{title_id}', title_id);
22979
22997
  return Requests.processRoute(TitlesRoute.routes.getWishlist, {}, { title_id: title_id }, params);
22980
22998
  };
22999
+ /**
23000
+ * Create a new API token for a title.
23001
+ * Returns { full_token: string, token: TitleToken }.
23002
+ */
23003
+ Titles.createTitleToken = function (title_id, data) {
23004
+ return Requests.processRoute(TitlesRoute.routes.createToken, data, { title_id: title_id });
23005
+ };
23006
+ /**
23007
+ * List all tokens for a title.
23008
+ */
23009
+ Titles.listTitleTokens = function (title_id) {
23010
+ return Requests.processRoute(TitlesRoute.routes.listTokens, {}, { title_id: title_id });
23011
+ };
23012
+ /**
23013
+ * Revoke a specific token by ID.
23014
+ */
23015
+ Titles.revokeTitleToken = function (title_id, token_id) {
23016
+ return Requests.processRoute(TitlesRoute.routes.revokeToken, {}, { title_id: title_id, token_id: token_id });
23017
+ };
22981
23018
  return Titles;
22982
23019
  }());
22983
23020