glitch-javascript-sdk 1.2.8 → 1.3.0

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.
@@ -355,7 +355,7 @@ declare class Communities {
355
355
  * @param params Query parameters.
356
356
  * @returns Promise
357
357
  */
358
- static listNewsletters<T>(community_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
358
+ static listNewsletters<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
359
359
  /**
360
360
  * Create a new newsletter for a community.
361
361
  *
@@ -0,0 +1,15 @@
1
+ import Response from "../util/Response";
2
+ import { AxiosPromise } from "axios";
3
+ declare class Newsletters {
4
+ /**
5
+ * Download the list of publictions, podcasts and blogs.
6
+ *
7
+ * @see https://api.glitch.fun/api/documentation#/Newsletters/downloadMarketingChecklists
8
+ *
9
+ * @param data The data to be passed when creating a team.
10
+ *
11
+ * @returns Promise
12
+ */
13
+ static downloadMarketingChecklist<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
14
+ }
15
+ export default Newsletters;
@@ -23,6 +23,7 @@ import Influencers from "./Influencers";
23
23
  import Games from "./Games";
24
24
  import Publications from "./Publications";
25
25
  import GameShows from "./GameShows";
26
+ import Newsletters from "./Newsletters";
26
27
  export { Auth };
27
28
  export { Competitions };
28
29
  export { Communities };
@@ -48,3 +49,4 @@ export { Influencers };
48
49
  export { Games };
49
50
  export { Publications };
50
51
  export { GameShows };
52
+ export { Newsletters };
@@ -23,6 +23,7 @@ import { Influencers } from "./api";
23
23
  import { Games } from "./api";
24
24
  import { Publications } from "./api";
25
25
  import { GameShows } from "./api";
26
+ import { Newsletters } from "./api";
26
27
  import Requests from "./util/Requests";
27
28
  import Parser from "./util/Parser";
28
29
  import Session from "./util/Session";
@@ -67,6 +68,7 @@ declare class Glitch {
67
68
  TipEmojis: typeof TipEmojis;
68
69
  TipPackagePurchases: typeof TipPackagePurchases;
69
70
  Publications: typeof Publications;
71
+ Newsletters: typeof Newsletters;
70
72
  };
71
73
  static util: {
72
74
  Requests: typeof Requests;
package/dist/esm/index.js CHANGED
@@ -6583,7 +6583,7 @@ var CommunitiesRoute = /** @class */ (function () {
6583
6583
  deleteEmailTemplate: { url: '/communities/{community_id}/emails/templates/{template_id}', method: HTTP_METHODS.DELETE },
6584
6584
  populateEmailTemplate: { url: '/communities/{community_id}/emails/templates/{template_id}/populate', method: HTTP_METHODS.POST },
6585
6585
  // Newsletters
6586
- listNewsletters: { url: '/communities/{community_id}/newsletters', method: HTTP_METHODS.GET },
6586
+ listNewsletters: { url: '/communities/newsletters', method: HTTP_METHODS.GET },
6587
6587
  createNewsletter: { url: '/communities/{community_id}/newsletters', method: HTTP_METHODS.POST },
6588
6588
  viewNewsletter: { url: '/communities/{community_id}/newsletters/{newsletter_id}', method: HTTP_METHODS.GET },
6589
6589
  updateNewsletter: { url: '/communities/{community_id}/newsletters/{newsletter_id}', method: HTTP_METHODS.PUT },
@@ -7044,8 +7044,8 @@ var Communities = /** @class */ (function () {
7044
7044
  * @param params Query parameters.
7045
7045
  * @returns Promise
7046
7046
  */
7047
- Communities.listNewsletters = function (community_id, params) {
7048
- return Requests.processRoute(CommunitiesRoute.routes.listNewsletters, undefined, { community_id: community_id }, params);
7047
+ Communities.listNewsletters = function (params) {
7048
+ return Requests.processRoute(CommunitiesRoute.routes.listNewsletters, undefined, undefined, params);
7049
7049
  };
7050
7050
  /**
7051
7051
  * Create a new newsletter for a community.
@@ -10907,6 +10907,33 @@ var GameShows = /** @class */ (function () {
10907
10907
  return GameShows;
10908
10908
  }());
10909
10909
 
10910
+ var NewslettersRoutes = /** @class */ (function () {
10911
+ function NewslettersRoutes() {
10912
+ }
10913
+ NewslettersRoutes.routes = {
10914
+ downloadMarketingChecklist: { url: '/newsletters/downloadMarketingChecklist', method: HTTP_METHODS.POST },
10915
+ };
10916
+ return NewslettersRoutes;
10917
+ }());
10918
+
10919
+ var Newsletters = /** @class */ (function () {
10920
+ function Newsletters() {
10921
+ }
10922
+ /**
10923
+ * Download the list of publictions, podcasts and blogs.
10924
+ *
10925
+ * @see https://api.glitch.fun/api/documentation#/Newsletters/downloadMarketingChecklists
10926
+ *
10927
+ * @param data The data to be passed when creating a team.
10928
+ *
10929
+ * @returns Promise
10930
+ */
10931
+ Newsletters.downloadMarketingChecklist = function (data, params) {
10932
+ return Requests.processRoute(NewslettersRoutes.routes.downloadMarketingChecklist, data, undefined, params);
10933
+ };
10934
+ return Newsletters;
10935
+ }());
10936
+
10910
10937
  var Parser = /** @class */ (function () {
10911
10938
  function Parser() {
10912
10939
  }
@@ -11328,7 +11355,8 @@ var Glitch = /** @class */ (function () {
11328
11355
  TipPackages: TipPackages,
11329
11356
  TipEmojis: TipEmojis,
11330
11357
  TipPackagePurchases: TipPackagePurchases,
11331
- Publications: Publications
11358
+ Publications: Publications,
11359
+ Newsletters: Newsletters
11332
11360
  };
11333
11361
  Glitch.util = {
11334
11362
  Requests: Requests,