glitch-javascript-sdk 0.9.5 → 0.9.6

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
@@ -19748,7 +19748,11 @@ var CommunitiesRoute = /** @class */ (function () {
19748
19748
  updateUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.PUT },
19749
19749
  removeUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.DELETE },
19750
19750
  join: { url: '/communities/{community_id}/join', method: HTTP_METHODS.POST },
19751
- findByDomain: { url: '/communities/findByDomain/{domain}', method: HTTP_METHODS.GET }
19751
+ findByDomain: { url: '/communities/findByDomain/{domain}', method: HTTP_METHODS.GET },
19752
+ addPaymentMethod: { url: '/communities/{community_id}/payment/methods', method: HTTP_METHODS.POST },
19753
+ getPaymentMethods: { url: '/communities/{community_i}/payment/methods', method: HTTP_METHODS.GET },
19754
+ setDefaultPaymentMethod: { url: '/communities/{community_i}/payment/methods/default', method: HTTP_METHODS.POST },
19755
+ getLedger: { url: '/communities/{community_i}/payment/ledger', method: HTTP_METHODS.GET },
19752
19756
  };
19753
19757
  return CommunitiesRoute;
19754
19758
  }());
@@ -20031,6 +20035,54 @@ var Communities = /** @class */ (function () {
20031
20035
  Communities.join = function (community_id, data, params) {
20032
20036
  return Requests.processRoute(CommunitiesRoute.routes.join, data, { community_id: community_id }, params);
20033
20037
  };
20038
+ /**
20039
+ * Add a payment method to the community.
20040
+ *
20041
+ * @see https://api.glitch.fun/api/documentation#/Community%20Route/51802cc0cb758850807345918130cf3e
20042
+ *
20043
+ * @param community_id The id of the community to update.
20044
+ *
20045
+ * @returns promise
20046
+ */
20047
+ Communities.addPaymentMethod = function (community_id, data, params) {
20048
+ return Requests.processRoute(CommunitiesRoute.routes.addPaymentMethod, data, { community_id: community_id }, params);
20049
+ };
20050
+ /**
20051
+ * Sets the default payment method for the community.
20052
+ *
20053
+ * @see https://api.glitch.fun/api/documentation#/Community%20Route/dd743e8a7da3b2bebe557cbc6675380d
20054
+ *
20055
+ * @param community_id The id of the community to update.
20056
+ *
20057
+ * @returns promise
20058
+ */
20059
+ Communities.setDefaultPaymentMethod = function (community_id, data, params) {
20060
+ return Requests.processRoute(CommunitiesRoute.routes.setDefaultPaymentMethod, data, { community_id: community_id }, params);
20061
+ };
20062
+ /**
20063
+ * Get the available payment methods.
20064
+ *
20065
+ * @see https://api.glitch.fun/api/documentation#/communitys%20Route/communitysUserInviteList
20066
+ *
20067
+ * @param community_id The id of the community
20068
+ *
20069
+ * @returns promise
20070
+ */
20071
+ Communities.getPaymentMethods = function (community_id, params) {
20072
+ return Requests.processRoute(CommunitiesRoute.routes.getPaymentMethods, {}, { community_id: community_id }, params);
20073
+ };
20074
+ /**
20075
+ * Get the ledger for all transactions from the community.
20076
+ *
20077
+ * @see https://api.glitch.fun/api/documentation#/communitys%20Route/communitysUserInviteList
20078
+ *
20079
+ * @param community_id The id of the community
20080
+ *
20081
+ * @returns promise
20082
+ */
20083
+ Communities.getLedger = function (community_id, params) {
20084
+ return Requests.processRoute(CommunitiesRoute.routes.getLedger, {}, { community_id: community_id }, params);
20085
+ };
20034
20086
  return Communities;
20035
20087
  }());
20036
20088
 
@@ -20068,6 +20120,7 @@ var UserRoutes = /** @class */ (function () {
20068
20120
  addType: { url: '/users/addType', method: HTTP_METHODS.POST },
20069
20121
  removeType: { url: '/users/removeType/{type_id}', method: HTTP_METHODS.DELETE },
20070
20122
  getCampaignInvites: { url: '/users/getCampaignInvites', method: HTTP_METHODS.GET },
20123
+ getPayouts: { url: '/users/payouts', method: HTTP_METHODS.GET },
20071
20124
  };
20072
20125
  return UserRoutes;
20073
20126
  }());
@@ -20123,6 +20176,19 @@ var Users = /** @class */ (function () {
20123
20176
  Users.getCampaignInvites = function (params) {
20124
20177
  return Requests.processRoute(UserRoutes.routes.getCampaignInvites, {}, undefined, params);
20125
20178
  };
20179
+ /**
20180
+ * Gets payouts from past campaings
20181
+ *
20182
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/showMe
20183
+ *
20184
+ * @param user_id The id of the user to update.
20185
+ * @param data The data to update.
20186
+ *
20187
+ * @returns promise
20188
+ */
20189
+ Users.getPayouts = function (params) {
20190
+ return Requests.processRoute(UserRoutes.routes.getPayouts, {}, undefined, params);
20191
+ };
20126
20192
  /**
20127
20193
  * Sync the current influencer's information.
20128
20194
  *
@@ -22201,6 +22267,9 @@ var CampaignsRoute = /** @class */ (function () {
22201
22267
  acceptInfluencerInvite: { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}/accept', method: HTTP_METHODS.POST },
22202
22268
  declineInfluencernInvite: { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}/decline', method: HTTP_METHODS.POST },
22203
22269
  widthdrawInfluencerInvite: { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}/withdraw', method: HTTP_METHODS.POST },
22270
+ acceptInfluencerRequest: { url: '/campaigns/{campaign_id}/influencers/{user_id}/accept', method: HTTP_METHODS.POST },
22271
+ declineInfluencernRequest: { url: '/campaigns/{campaign_id}/influencers/{user_id}/deny', method: HTTP_METHODS.POST },
22272
+ reviewInfluencerRequest: { url: '/campaigns/{campaign_id}/influencers/{user_id}/review', method: HTTP_METHODS.POST },
22204
22273
  };
22205
22274
  return CampaignsRoute;
22206
22275
  }());
@@ -22623,6 +22692,42 @@ var Campaigns = /** @class */ (function () {
22623
22692
  Campaigns.widthdrawInfluencerInvite = function (campaign_id, influencer_id, data, params) {
22624
22693
  return Requests.processRoute(CampaignsRoute.routes.widthdrawInfluencerInvite, data, { campaign_id: campaign_id, influencer_id: influencer_id }, params);
22625
22694
  };
22695
+ /**
22696
+ * The route to accept an influnecers request to join the campaign.
22697
+ *
22698
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/acceptInfluencer
22699
+ *
22700
+ * @param campaign_id The id fo the campaign to retrieve.
22701
+ *
22702
+ * @returns promise
22703
+ */
22704
+ Campaigns.acceptInfluencerRequest = function (campaign_id, user_id, data, params) {
22705
+ return Requests.processRoute(CampaignsRoute.routes.acceptInfluencerRequest, data, { campaign_id: campaign_id, user_id: user_id }, params);
22706
+ };
22707
+ /**
22708
+ * The route to deny an influencer request to join the campaign.
22709
+ *
22710
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/denyInfluencer
22711
+ *
22712
+ * @param campaign_id The id fo the campaign to retrieve.
22713
+ *
22714
+ * @returns promise
22715
+ */
22716
+ Campaigns.declineInfluencernRequest = function (campaign_id, user_id, data, params) {
22717
+ return Requests.processRoute(CampaignsRoute.routes.declineInfluencernRequest, data, { campaign_id: campaign_id, user_id: user_id }, params);
22718
+ };
22719
+ /**
22720
+ * The route the route to mark the influencers request as in review.
22721
+ *
22722
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/reviewInfluencer
22723
+ *
22724
+ * @param campaign_id The id fo the campaign to retrieve.
22725
+ *
22726
+ * @returns promise
22727
+ */
22728
+ Campaigns.reviewInfluencerRequest = function (campaign_id, user_id, data, params) {
22729
+ return Requests.processRoute(CampaignsRoute.routes.reviewInfluencerRequest, data, { campaign_id: campaign_id, user_id: user_id }, params);
22730
+ };
22626
22731
  return Campaigns;
22627
22732
  }());
22628
22733