glitch-javascript-sdk 0.9.2 → 0.9.5

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
@@ -20043,6 +20043,7 @@ var UserRoutes = /** @class */ (function () {
20043
20043
  follow: { url: '/users/{user_id}/follow', method: HTTP_METHODS.POST },
20044
20044
  profile: { url: '/users/{user_id}/profile', method: HTTP_METHODS.GET },
20045
20045
  me: { url: '/users/me', method: HTTP_METHODS.GET },
20046
+ syncInfluencer: { url: '/users/syncInfluencer', method: HTTP_METHODS.POST },
20046
20047
  oneTimeToken: { url: '/users/oneTimeToken', method: HTTP_METHODS.GET },
20047
20048
  uploadAvatar: { url: '/users/uploadAvatarImage', method: HTTP_METHODS.POST },
20048
20049
  uploadBanner: { url: '/users/uploadBannerImage', method: HTTP_METHODS.POST },
@@ -20066,6 +20067,7 @@ var UserRoutes = /** @class */ (function () {
20066
20067
  removeGenre: { url: '/users/removeGenre/{genre_id}', method: HTTP_METHODS.DELETE },
20067
20068
  addType: { url: '/users/addType', method: HTTP_METHODS.POST },
20068
20069
  removeType: { url: '/users/removeType/{type_id}', method: HTTP_METHODS.DELETE },
20070
+ getCampaignInvites: { url: '/users/getCampaignInvites', method: HTTP_METHODS.GET },
20069
20071
  };
20070
20072
  return UserRoutes;
20071
20073
  }());
@@ -20108,6 +20110,32 @@ var Users = /** @class */ (function () {
20108
20110
  Users.me = function (params) {
20109
20111
  return Requests.processRoute(UserRoutes.routes.me, {}, undefined, params);
20110
20112
  };
20113
+ /**
20114
+ * Gets the campaigns the users has been invited too.
20115
+ *
20116
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/showMe
20117
+ *
20118
+ * @param user_id The id of the user to update.
20119
+ * @param data The data to update.
20120
+ *
20121
+ * @returns promise
20122
+ */
20123
+ Users.getCampaignInvites = function (params) {
20124
+ return Requests.processRoute(UserRoutes.routes.getCampaignInvites, {}, undefined, params);
20125
+ };
20126
+ /**
20127
+ * Sync the current influencer's information.
20128
+ *
20129
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/showMe
20130
+ *
20131
+ * @param user_id The id of the user to update.
20132
+ * @param data The data to update.
20133
+ *
20134
+ * @returns promise
20135
+ */
20136
+ Users.syncInfluencer = function (params) {
20137
+ return Requests.processRoute(UserRoutes.routes.syncInfluencer, {}, undefined, params);
20138
+ };
20111
20139
  /**
20112
20140
  * Will follow and unfollow a user. If the user is not being following, it will follow the user. If they are following, it will unfollow the user. The current JWT is used for the follower.
20113
20141
  *
@@ -22166,6 +22194,13 @@ var CampaignsRoute = /** @class */ (function () {
22166
22194
  removeEthnicity: { url: '/campaigns/{campaign_id}/removeEthnicity/{ethnicity_id}', method: HTTP_METHODS.DELETE },
22167
22195
  addType: { url: '/campaigns/{campaign_id}/addType', method: HTTP_METHODS.POST },
22168
22196
  removeType: { url: '/campaigns/{campaign_id}/removeType/{type_id}', method: HTTP_METHODS.DELETE },
22197
+ inviteInfluencer: { url: '/campaigns/{campaign_id}/influencers/invites', method: HTTP_METHODS.POST },
22198
+ viewInfluencerInvite: { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}', method: HTTP_METHODS.GET },
22199
+ listInfluencerInvites: { url: '/campaigns/{campaign_id}/influencers/invites', method: HTTP_METHODS.GET },
22200
+ sendInfluencerInvite: { url: '/campaigns/{campaign_id}/influencers/invites', method: HTTP_METHODS.POST },
22201
+ acceptInfluencerInvite: { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}/accept', method: HTTP_METHODS.POST },
22202
+ declineInfluencernInvite: { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}/decline', method: HTTP_METHODS.POST },
22203
+ widthdrawInfluencerInvite: { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}/withdraw', method: HTTP_METHODS.POST },
22169
22204
  };
22170
22205
  return CampaignsRoute;
22171
22206
  }());
@@ -22514,6 +22549,80 @@ var Campaigns = /** @class */ (function () {
22514
22549
  Campaigns.removeType = function (campaign_id, type_id, params) {
22515
22550
  return Requests.processRoute(CampaignsRoute.routes.removeType, undefined, { campaign_id: campaign_id, type_id: type_id }, params);
22516
22551
  };
22552
+ /**
22553
+ * Get a list of influencer invites that have been sent for this campaign.
22554
+ *
22555
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/getInfluencerInvites
22556
+ *
22557
+ * @param campaign_id The id fo the campaign to retrieve.
22558
+ *
22559
+ * @returns promise
22560
+ */
22561
+ Campaigns.listInfluencerInvites = function (campaign_id, params) {
22562
+ return Requests.processRoute(CampaignsRoute.routes.listInfluencerInvites, {}, { campaign_id: campaign_id }, params);
22563
+ };
22564
+ /**
22565
+ * Invites an influencer to join this campaign.
22566
+ *
22567
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/inviteInfluencer
22568
+ *
22569
+ * @param campaign_id The id fo the campaign to retrieve.
22570
+ *
22571
+ * @returns promise
22572
+ */
22573
+ Campaigns.sendInfluencerInvite = function (campaign_id, data, params) {
22574
+ return Requests.processRoute(CampaignsRoute.routes.sendInfluencerInvite, data, { campaign_id: campaign_id }, params);
22575
+ };
22576
+ /**
22577
+ * Invites an influencer to join this campaign.
22578
+ *
22579
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/getInfluencerInvite
22580
+ *
22581
+ * @param campaign_id The id fo the campaign to retrieve.
22582
+ *
22583
+ * @returns promise
22584
+ */
22585
+ Campaigns.viewInfluencerInvite = function (campaign_id, influencer_id, token, params) {
22586
+ // Ensure params is defined and includes the token
22587
+ var updatedParams = __assign(__assign({}, params), { token: token });
22588
+ return Requests.processRoute(CampaignsRoute.routes.viewInfluencerInvite, {}, { campaign_id: campaign_id, influencer_id: influencer_id }, updatedParams);
22589
+ };
22590
+ /**
22591
+ * The route for an influencer to accept an invite.
22592
+ *
22593
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/acceptInfluencerInvite
22594
+ *
22595
+ * @param campaign_id The id fo the campaign to retrieve.
22596
+ *
22597
+ * @returns promise
22598
+ */
22599
+ Campaigns.acceptInfluencerInvite = function (campaign_id, influencer_id, data, params) {
22600
+ return Requests.processRoute(CampaignsRoute.routes.acceptInfluencerInvite, data, { campaign_id: campaign_id, influencer_id: influencer_id }, params);
22601
+ };
22602
+ /**
22603
+ * The route for an influencer to decline an invite.
22604
+ *
22605
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/delinceInfluencerInvite
22606
+ *
22607
+ * @param campaign_id The id fo the campaign to retrieve.
22608
+ *
22609
+ * @returns promise
22610
+ */
22611
+ Campaigns.declineInfluencernInvite = function (campaign_id, influencer_id, data, params) {
22612
+ return Requests.processRoute(CampaignsRoute.routes.declineInfluencernInvite, data, { campaign_id: campaign_id, influencer_id: influencer_id }, params);
22613
+ };
22614
+ /**
22615
+ * The route for an influencer to decline an invite.
22616
+ *
22617
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/withdrawInfluencerInvite
22618
+ *
22619
+ * @param campaign_id The id fo the campaign to retrieve.
22620
+ *
22621
+ * @returns promise
22622
+ */
22623
+ Campaigns.widthdrawInfluencerInvite = function (campaign_id, influencer_id, data, params) {
22624
+ return Requests.processRoute(CampaignsRoute.routes.widthdrawInfluencerInvite, data, { campaign_id: campaign_id, influencer_id: influencer_id }, params);
22625
+ };
22517
22626
  return Campaigns;
22518
22627
  }());
22519
22628