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.
@@ -573,5 +573,13 @@ declare class Communities {
573
573
  * @returns Promise with campaign stats
574
574
  */
575
575
  static newsletterCampaignReports<T>(community_id: string, newsletter_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
576
+ /**
577
+ * Retrieves daily subscriber trend data for the specified newsletter.
578
+ *
579
+ * @param community_id The UUID of the community
580
+ * @param newsletter_id The UUID of the newsletter
581
+ * @param params Optional date-range filter (start_date, end_date, etc.)
582
+ */
583
+ static newsletterSubscriberTrend<T>(community_id: string, newsletter_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
576
584
  }
577
585
  export default Communities;
@@ -173,5 +173,20 @@ declare class Titles {
173
173
  * @returns AxiosPromise
174
174
  */
175
175
  static getWishlist<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
176
+ /**
177
+ * Create a new API token for a title.
178
+ * Returns { full_token: string, token: TitleToken }.
179
+ */
180
+ static createTitleToken<T>(title_id: string, data?: {
181
+ expires_at?: string;
182
+ }): AxiosPromise<Response<T>>;
183
+ /**
184
+ * List all tokens for a title.
185
+ */
186
+ static listTitleTokens<T>(title_id: string): AxiosPromise<Response<T>>;
187
+ /**
188
+ * Revoke a specific token by ID.
189
+ */
190
+ static revokeTitleToken<T>(title_id: string, token_id: string): AxiosPromise<Response<T>>;
176
191
  }
177
192
  export default Titles;
package/dist/esm/index.js CHANGED
@@ -6630,6 +6630,10 @@ var CommunitiesRoute = /** @class */ (function () {
6630
6630
  url: '/communities/{community_id}/newsletters/{newsletter_id}/reports/campaign',
6631
6631
  method: HTTP_METHODS.GET
6632
6632
  },
6633
+ newsletterSubscriberTrend: {
6634
+ url: '/communities/{community_id}/newsletters/{newsletter_id}/reports/subscriber_trend',
6635
+ method: HTTP_METHODS.GET
6636
+ },
6633
6637
  // Campaigns
6634
6638
  listCampaigns: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns', method: HTTP_METHODS.GET },
6635
6639
  createCampaign: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns', method: HTTP_METHODS.POST },
@@ -7364,6 +7368,17 @@ var Communities = /** @class */ (function () {
7364
7368
  Communities.newsletterCampaignReports = function (community_id, newsletter_id, params) {
7365
7369
  return Requests.processRoute(CommunitiesRoute.routes.newsletterCampaignReports, undefined, { community_id: community_id, newsletter_id: newsletter_id }, params);
7366
7370
  };
7371
+ /**
7372
+ * Retrieves daily subscriber trend data for the specified newsletter.
7373
+ *
7374
+ * @param community_id The UUID of the community
7375
+ * @param newsletter_id The UUID of the newsletter
7376
+ * @param params Optional date-range filter (start_date, end_date, etc.)
7377
+ */
7378
+ Communities.newsletterSubscriberTrend = function (community_id, newsletter_id, params) {
7379
+ return Requests.processRoute(CommunitiesRoute.routes.newsletterSubscriberTrend, undefined, // no body data
7380
+ { community_id: community_id, newsletter_id: newsletter_id }, params);
7381
+ };
7367
7382
  return Communities;
7368
7383
  }());
7369
7384
 
@@ -9576,6 +9591,9 @@ var TitlesRoute = /** @class */ (function () {
9576
9591
  updateMediaOrder: { url: '/titles/{title_id}/updateMediaOrder', method: HTTP_METHODS.POST },
9577
9592
  importWishlist: { url: '/titles/{title_id}/wishlist/import', method: HTTP_METHODS.POST },
9578
9593
  getWishlist: { url: '/titles/{title_id}/wishlist', method: HTTP_METHODS.GET },
9594
+ createToken: { url: '/titles/{title_id}/tokens', method: HTTP_METHODS.POST },
9595
+ listTokens: { url: '/titles/{title_id}/tokens', method: HTTP_METHODS.GET },
9596
+ revokeToken: { url: '/titles/{title_id}/tokens/{token_id}', method: HTTP_METHODS.DELETE },
9579
9597
  };
9580
9598
  return TitlesRoute;
9581
9599
  }());
@@ -9794,6 +9812,25 @@ var Titles = /** @class */ (function () {
9794
9812
  TitlesRoute.routes.getWishlist.url.replace('{title_id}', title_id);
9795
9813
  return Requests.processRoute(TitlesRoute.routes.getWishlist, {}, { title_id: title_id }, params);
9796
9814
  };
9815
+ /**
9816
+ * Create a new API token for a title.
9817
+ * Returns { full_token: string, token: TitleToken }.
9818
+ */
9819
+ Titles.createTitleToken = function (title_id, data) {
9820
+ return Requests.processRoute(TitlesRoute.routes.createToken, data, { title_id: title_id });
9821
+ };
9822
+ /**
9823
+ * List all tokens for a title.
9824
+ */
9825
+ Titles.listTitleTokens = function (title_id) {
9826
+ return Requests.processRoute(TitlesRoute.routes.listTokens, {}, { title_id: title_id });
9827
+ };
9828
+ /**
9829
+ * Revoke a specific token by ID.
9830
+ */
9831
+ Titles.revokeTitleToken = function (title_id, token_id) {
9832
+ return Requests.processRoute(TitlesRoute.routes.revokeToken, {}, { title_id: title_id, token_id: token_id });
9833
+ };
9797
9834
  return Titles;
9798
9835
  }());
9799
9836