glitch-javascript-sdk 1.2.0 → 1.2.2

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/index.d.ts CHANGED
@@ -980,6 +980,16 @@ declare class Communities {
980
980
  * @returns promise
981
981
  */
982
982
  static deleteEmailTemplate<T>(community_id: string, template_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
983
+ /**
984
+ * Populates an email template for the community that will replace the platholders with the data provided.
985
+ *
986
+ * @see https://api.glitch.fun/api/documentation#/Community%20Route/newCommunityResourceStorage
987
+ *
988
+ * @param data The data to be passed when creating a community.
989
+ *
990
+ * @returns Promise
991
+ */
992
+ static populateEmailTemplate<T>(community_id: string, template_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
983
993
  }
984
994
 
985
995
  declare class Users {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -475,6 +475,20 @@ class Communities {
475
475
 
476
476
  return Requests.processRoute(CommunitiesRoute.routes.deleteEmailTemplate, {}, {community_id : community_id, template_id : template_id});
477
477
  }
478
+
479
+ /**
480
+ * Populates an email template for the community that will replace the platholders with the data provided.
481
+ *
482
+ * @see https://api.glitch.fun/api/documentation#/Community%20Route/newCommunityResourceStorage
483
+ *
484
+ * @param data The data to be passed when creating a community.
485
+ *
486
+ * @returns Promise
487
+ */
488
+ public static populateEmailTemplate<T>(community_id : string, template_id : string, data : object, params?: Record<string, any>) : AxiosPromise<Response<T>> {
489
+
490
+ return Requests.processRoute(CommunitiesRoute.routes.populateEmailTemplate, data, {community_id : community_id, template_id : template_id}, params);
491
+ }
478
492
 
479
493
 
480
494
 
@@ -35,7 +35,7 @@ class CommunitiesRoute {
35
35
  viewEmailTemplate : { url: '/communities/{community_id}/emails/templates/{template_id}', method: HTTP_METHODS.GET },
36
36
  updateEmailTemplate :{ url: '/communities/{community_id}/emails/templates/{template_id}', method: HTTP_METHODS.PUT },
37
37
  deleteEmailTemplate : { url: '/communities/{community_id}/emails/templates/{template_id}', method: HTTP_METHODS.DELETE },
38
-
38
+ populateEmailTemplate: { url: '/communities/{community_id}/emails/templates/{template_id}/populate', method: HTTP_METHODS.POST },
39
39
  };
40
40
 
41
41
  }