glitch-javascript-sdk 1.0.3 → 1.0.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.
@@ -330,6 +330,16 @@ declare class Campaigns {
330
330
  * @returns promise
331
331
  */
332
332
  static viewInfluencerInvite<T>(campaign_id: string, influencer_id: string, token: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
333
+ /**
334
+ * Updates the influencer invite information.
335
+ *
336
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/updateInfluencerInvite
337
+ *
338
+ * @param campaign_id The id fo the campaign to retrieve.
339
+ *
340
+ * @returns promise
341
+ */
342
+ static updateInfluencerInvite<T>(campaign_id: string, data: object, influencer_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
333
343
  /**
334
344
  * The route for an influencer to accept an invite.
335
345
  *
@@ -17,5 +17,13 @@ declare class Influencers {
17
17
  * @returns promise
18
18
  */
19
19
  static viewInfluencer<T>(influencer_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
20
+ /**
21
+ * Generate a profile for an influencer based on their data.
22
+ *
23
+ * @see https://api.glitch.fun/api/documentation#/Influencers/generateInfluencerProfile
24
+ *
25
+ * @returns promise
26
+ */
27
+ static generateProfile<T>(influencer_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
20
28
  }
21
29
  export default Influencers;
@@ -63,6 +63,17 @@ declare class Users {
63
63
  * @returns promise
64
64
  */
65
65
  static syncInfluencer<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
66
+ /**
67
+ * Create profile data for an influencer based on their synced information and social media posts.
68
+ *
69
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/generateUserInfluencerProfile
70
+ *
71
+ * @param user_id The id of the user to update.
72
+ * @param data The data to update.
73
+ *
74
+ * @returns promise
75
+ */
76
+ static generateInfluencerProfile<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
66
77
  /**
67
78
  * 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.
68
79
  *
package/dist/esm/index.js CHANGED
@@ -6916,6 +6916,7 @@ var UserRoutes = /** @class */ (function () {
6916
6916
  profile: { url: '/users/{user_id}/profile', method: HTTP_METHODS.GET },
6917
6917
  me: { url: '/users/me', method: HTTP_METHODS.GET },
6918
6918
  syncInfluencer: { url: '/users/syncInfluencer', method: HTTP_METHODS.POST },
6919
+ generateInfluencerProfile: { url: '/users/generateInfluencerProfile', method: HTTP_METHODS.POST },
6919
6920
  oneTimeToken: { url: '/users/oneTimeToken', method: HTTP_METHODS.GET },
6920
6921
  uploadAvatar: { url: '/users/uploadAvatarImage', method: HTTP_METHODS.POST },
6921
6922
  uploadBanner: { url: '/users/uploadBannerImage', method: HTTP_METHODS.POST },
@@ -7022,6 +7023,19 @@ var Users = /** @class */ (function () {
7022
7023
  Users.syncInfluencer = function (params) {
7023
7024
  return Requests.processRoute(UserRoutes.routes.syncInfluencer, {}, undefined, params);
7024
7025
  };
7026
+ /**
7027
+ * Create profile data for an influencer based on their synced information and social media posts.
7028
+ *
7029
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/generateUserInfluencerProfile
7030
+ *
7031
+ * @param user_id The id of the user to update.
7032
+ * @param data The data to update.
7033
+ *
7034
+ * @returns promise
7035
+ */
7036
+ Users.generateInfluencerProfile = function (params) {
7037
+ return Requests.processRoute(UserRoutes.routes.generateInfluencerProfile, {}, undefined, params);
7038
+ };
7025
7039
  /**
7026
7040
  * 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.
7027
7041
  *
@@ -9084,6 +9098,7 @@ var CampaignsRoute = /** @class */ (function () {
9084
9098
  removeType: { url: '/campaigns/{campaign_id}/removeType/{type_id}', method: HTTP_METHODS.DELETE },
9085
9099
  inviteInfluencer: { url: '/campaigns/{campaign_id}/influencers/invites', method: HTTP_METHODS.POST },
9086
9100
  viewInfluencerInvite: { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}', method: HTTP_METHODS.GET },
9101
+ updateInfluencerInvite: { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}', method: HTTP_METHODS.PUT },
9087
9102
  listInfluencerInvites: { url: '/campaigns/{campaign_id}/influencers/invites', method: HTTP_METHODS.GET },
9088
9103
  sendInfluencerInvite: { url: '/campaigns/{campaign_id}/influencers/invites', method: HTTP_METHODS.POST },
9089
9104
  acceptInfluencerInvite: { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}/accept', method: HTTP_METHODS.POST },
@@ -9498,6 +9513,18 @@ var Campaigns = /** @class */ (function () {
9498
9513
  var updatedParams = __assign(__assign({}, params), { token: token });
9499
9514
  return Requests.processRoute(CampaignsRoute.routes.viewInfluencerInvite, {}, { campaign_id: campaign_id, influencer_id: influencer_id }, updatedParams);
9500
9515
  };
9516
+ /**
9517
+ * Updates the influencer invite information.
9518
+ *
9519
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/updateInfluencerInvite
9520
+ *
9521
+ * @param campaign_id The id fo the campaign to retrieve.
9522
+ *
9523
+ * @returns promise
9524
+ */
9525
+ Campaigns.updateInfluencerInvite = function (campaign_id, data, influencer_id, params) {
9526
+ return Requests.processRoute(CampaignsRoute.routes.updateInfluencerInvite, data, { campaign_id: campaign_id, influencer_id: influencer_id }, params);
9527
+ };
9501
9528
  /**
9502
9529
  * The route for an influencer to accept an invite.
9503
9530
  *
@@ -9837,6 +9864,7 @@ var InfluencerRoutes = /** @class */ (function () {
9837
9864
  InfluencerRoutes.routes = {
9838
9865
  listInfluencers: { url: '/influencers', method: HTTP_METHODS.GET },
9839
9866
  viewInfluencer: { url: '/influencers/{influencer_id}', method: HTTP_METHODS.GET },
9867
+ generateProfile: { url: '/influencers/{influencer_id}/generateProfile', method: HTTP_METHODS.POST },
9840
9868
  };
9841
9869
  return InfluencerRoutes;
9842
9870
  }());
@@ -9864,6 +9892,16 @@ var Influencers = /** @class */ (function () {
9864
9892
  Influencers.viewInfluencer = function (influencer_id, params) {
9865
9893
  return Requests.processRoute(InfluencerRoutes.routes.viewInfluencer, undefined, { influencer_id: influencer_id }, params);
9866
9894
  };
9895
+ /**
9896
+ * Generate a profile for an influencer based on their data.
9897
+ *
9898
+ * @see https://api.glitch.fun/api/documentation#/Influencers/generateInfluencerProfile
9899
+ *
9900
+ * @returns promise
9901
+ */
9902
+ Influencers.generateProfile = function (influencer_id, params) {
9903
+ return Requests.processRoute(InfluencerRoutes.routes.generateProfile, undefined, { influencer_id: influencer_id }, params);
9904
+ };
9867
9905
  return Influencers;
9868
9906
  }());
9869
9907