glitch-javascript-sdk 1.1.8 → 1.2.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.
package/dist/cjs/index.js CHANGED
@@ -19760,6 +19760,11 @@ var CommunitiesRoute = /** @class */ (function () {
19760
19760
  clearDocusignAuth: { url: '/communities/{community_id}/clearDocusignAuth', method: HTTP_METHODS.DELETE },
19761
19761
  clearHellosignAuth: { url: '/communities/{community_id}/clearHellosignAuth', method: HTTP_METHODS.DELETE },
19762
19762
  clearSimplesignAuth: { url: '/communities/{community_id}/clearSimplesignAuth', method: HTTP_METHODS.DELETE },
19763
+ listEmailTemplates: { url: '/communities/{community_id}/emails/templates', method: HTTP_METHODS.GET },
19764
+ createEmailTemplate: { url: '/communities/{community_id}/emails/templates', method: HTTP_METHODS.POST },
19765
+ viewEmailTemplate: { url: '/communities/{community_id}/emails/templates/{template_id}', method: HTTP_METHODS.GET },
19766
+ updateEmailTemplate: { url: '/communities/{community_id}/emails/templates/{template_id}', method: HTTP_METHODS.PUT },
19767
+ deleteEmailTemplate: { url: '/communities/{community_id}/emails/templates/{template_id}', method: HTTP_METHODS.DELETE },
19763
19768
  };
19764
19769
  return CommunitiesRoute;
19765
19770
  }());
@@ -20120,6 +20125,64 @@ var Communities = /** @class */ (function () {
20120
20125
  Communities.clearHellosignAuth = function (community_id) {
20121
20126
  return Requests.processRoute(CommunitiesRoute.routes.clearHellosignAuth, {}, { community_id: community_id });
20122
20127
  };
20128
+ /**
20129
+ * List all the saved email templates for the community.
20130
+ *
20131
+ * @see https://api.glitch.fun/api/documentation#/Community%20Route/resourceCommunityList
20132
+ *
20133
+ * @returns promise
20134
+ */
20135
+ Communities.listEmailTemplates = function (community_id, params) {
20136
+ return Requests.processRoute(CommunitiesRoute.routes.listEmailTemplates, undefined, { community_id: community_id }, params);
20137
+ };
20138
+ /**
20139
+ * Create a new email template for the community
20140
+ *
20141
+ * @see https://api.glitch.fun/api/documentation#/Community%20Route/newCommunityResourceStorage
20142
+ *
20143
+ * @param data The data to be passed when creating a community.
20144
+ *
20145
+ * @returns Promise
20146
+ */
20147
+ Communities.createEmailTemplate = function (community_id, data, params) {
20148
+ return Requests.processRoute(CommunitiesRoute.routes.createEmailTemplate, data, { community_id: community_id }, params);
20149
+ };
20150
+ /**
20151
+ * Update an email template for the community.
20152
+ *
20153
+ * @see https://api.glitch.fun/api/documentation#/Community%20Route/updateCommunityStorage
20154
+ *
20155
+ * @param community_id The id of the community to update.
20156
+ * @param data The data to update.
20157
+ *
20158
+ * @returns promise
20159
+ */
20160
+ Communities.updateEmailTemplate = function (community_id, template_id, data, params) {
20161
+ return Requests.processRoute(CommunitiesRoute.routes.updateEmailTemplate, data, { community_id: community_id, template_id: template_id }, params);
20162
+ };
20163
+ /**
20164
+ * Retrieve a single email template for the community.
20165
+ *
20166
+ * @see https://api.glitch.fun/api/documentation#/Community%20Route/showCommunityStorage
20167
+ *
20168
+ * @param community_id The id fo the community to retrieve.
20169
+ *
20170
+ * @returns promise
20171
+ */
20172
+ Communities.viewEmailTemplate = function (community_id, template_id, params) {
20173
+ return Requests.processRoute(CommunitiesRoute.routes.viewEmailTemplate, {}, { community_id: community_id, template_id: template_id }, params);
20174
+ };
20175
+ /**
20176
+ * Deletes an email template for the community.
20177
+ *
20178
+ * @see https://api.glitch.fun/api/documentation#/Community%20Route/destoryCommunityStorage
20179
+ *
20180
+ * @param community_id The id of the community to delete.
20181
+ * @returns promise
20182
+ */
20183
+ Communities.deleteEmailTemplate = function (community_id, template_id, params) {
20184
+ return Requests.processRoute(CommunitiesRoute.routes.deleteEmailTemplate, {}, { community_id: community_id, template_id: template_id });
20185
+ };
20123
20186
  return Communities;
20124
20187
  }());
20125
20188
 
@@ -23295,6 +23358,7 @@ var InfluencerRoutes = /** @class */ (function () {
23295
23358
  function InfluencerRoutes() {
23296
23359
  }
23297
23360
  InfluencerRoutes.routes = {
23361
+ addInfluencer: { url: '/influencers', method: HTTP_METHODS.POST },
23298
23362
  listInfluencers: { url: '/influencers', method: HTTP_METHODS.GET },
23299
23363
  viewInfluencer: { url: '/influencers/{influencer_id}', method: HTTP_METHODS.GET },
23300
23364
  generateProfile: { url: '/influencers/{influencer_id}/generateProfile', method: HTTP_METHODS.POST },
@@ -23303,6 +23367,7 @@ var InfluencerRoutes = /** @class */ (function () {
23303
23367
  createNote: { url: '/influencers/{influencer_id}/notes', method: HTTP_METHODS.POST },
23304
23368
  updateNote: { url: '/influencers/{influencer_id}/notes/{note_id}', method: HTTP_METHODS.PUT },
23305
23369
  deleteNote: { url: '/influencers/{influencer_id}/notes/{note_id}', method: HTTP_METHODS.DELETE },
23370
+ listContracts: { url: '/influencers/contracts', method: HTTP_METHODS.GET },
23306
23371
  };
23307
23372
  return InfluencerRoutes;
23308
23373
  }());
@@ -23310,6 +23375,16 @@ var InfluencerRoutes = /** @class */ (function () {
23310
23375
  var Influencers = /** @class */ (function () {
23311
23376
  function Influencers() {
23312
23377
  }
23378
+ /**
23379
+ * Add a new influencer to the platform.
23380
+ *
23381
+ * @see https://api.glitch.fun/api/documentation#/Influencers/createInfluencersNotes
23382
+ *
23383
+ * @returns promise
23384
+ */
23385
+ Influencers.addInfluencer = function (data, params) {
23386
+ return Requests.processRoute(InfluencerRoutes.routes.addInfluencer, data, {}, params);
23387
+ };
23313
23388
  /**
23314
23389
  * Get a list of influencers available on he platform.
23315
23390
  *
@@ -23390,6 +23465,16 @@ var Influencers = /** @class */ (function () {
23390
23465
  Influencers.deleteNote = function (influencer_id, note_id, data, params) {
23391
23466
  return Requests.processRoute(InfluencerRoutes.routes.deleteNote, data, { influencer_id: influencer_id, note_id: note_id }, params);
23392
23467
  };
23468
+ /**
23469
+ * Get a list of contracts associated with an influencer.
23470
+ *
23471
+ * @see https://api.glitch.fun/api/documentation#/Influencers/getInfluencers
23472
+ *
23473
+ * @returns promise
23474
+ */
23475
+ Influencers.listContracts = function (params) {
23476
+ return Requests.processRoute(InfluencerRoutes.routes.listContracts, undefined, undefined, params);
23477
+ };
23393
23478
  return Influencers;
23394
23479
  }());
23395
23480