glitch-javascript-sdk 1.0.8 → 1.1.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.
@@ -65,6 +65,22 @@ declare class Campaigns {
65
65
  * @returns promise
66
66
  */
67
67
  static getPosts<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
68
+ /**
69
+ * Get the associated statistics for the campaign.
70
+ *
71
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/campaignStatistics
72
+ *
73
+ * @returns promise
74
+ */
75
+ static statistics<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
76
+ /**
77
+ * Get the stream view counts for the campaign.
78
+ *
79
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/getCampaignStreamViewCounts
80
+ *
81
+ * @returns promise
82
+ */
83
+ static getStreamViewCounts<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
68
84
  /**
69
85
  * Retrieve recommended influencers for a campaign.
70
86
  *
@@ -382,5 +382,21 @@ declare class Events {
382
382
  * @returns promise
383
383
  */
384
384
  static setAIAvatarRespondToMe<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
385
+ /**
386
+ * Get the associated statistics for the campaign.
387
+ *
388
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/getStreamStatistics
389
+ *
390
+ * @returns promise
391
+ */
392
+ static statistics<T>(event_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
393
+ /**
394
+ * Get the stream view counts for the campaign.
395
+ *
396
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/getEventStreamViewCounts
397
+ *
398
+ * @returns promise
399
+ */
400
+ static getStreamViewCounts<T>(event_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
385
401
  }
386
402
  export default Events;
@@ -27,5 +27,15 @@ declare class SocialPosts {
27
27
  * @returns promise
28
28
  */
29
29
  static view<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
30
+ /**
31
+ * Dispute a post as being fraudulent.,s
32
+ *
33
+ * @see https://api.glitch.fun/api/documentation#/Social%20Media%20Posts/disputePost
34
+ *
35
+ * @param post_id The id fo the post to retrieve.
36
+ *
37
+ * @returns promise
38
+ */
39
+ static dispute<T>(post_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
30
40
  }
31
41
  export default SocialPosts;
package/dist/esm/index.js CHANGED
@@ -7362,6 +7362,8 @@ var EventsRoutes = /** @class */ (function () {
7362
7362
  setAIAccent: { url: '/events/{event_id}/setAIAccent', method: HTTP_METHODS.POST },
7363
7363
  setAIAvatarRespondToChat: { url: '/events/{event_id}/setAIAvatarRespondToChat', method: HTTP_METHODS.POST },
7364
7364
  setAIAvatarRespondToMe: { url: '/events/{event_id}/setAIAvatarRespondToMe', method: HTTP_METHODS.POST },
7365
+ statistics: { url: '/events/{event_id}/statistics', method: HTTP_METHODS.GET },
7366
+ streamViewCounts: { url: '/events/{event_id}/streamViewCounts', method: HTTP_METHODS.GET },
7365
7367
  };
7366
7368
  return EventsRoutes;
7367
7369
  }());
@@ -7841,6 +7843,26 @@ var Events = /** @class */ (function () {
7841
7843
  Events.setAIAvatarRespondToMe = function (event_id, data, params) {
7842
7844
  return Requests.processRoute(EventsRoutes.routes.setAIAvatarRespondToMe, data, { event_id: event_id }, params);
7843
7845
  };
7846
+ /**
7847
+ * Get the associated statistics for the campaign.
7848
+ *
7849
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/getStreamStatistics
7850
+ *
7851
+ * @returns promise
7852
+ */
7853
+ Events.statistics = function (event_id, params) {
7854
+ return Requests.processRoute(EventsRoutes.routes.statistics, undefined, { event_id: event_id }, params);
7855
+ };
7856
+ /**
7857
+ * Get the stream view counts for the campaign.
7858
+ *
7859
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/getEventStreamViewCounts
7860
+ *
7861
+ * @returns promise
7862
+ */
7863
+ Events.getStreamViewCounts = function (event_id, params) {
7864
+ return Requests.processRoute(EventsRoutes.routes.getStreamViewCounts, undefined, { event_id: event_id }, params);
7865
+ };
7844
7866
  return Events;
7845
7867
  }());
7846
7868
 
@@ -8832,6 +8854,7 @@ var SocialPostsRoute = /** @class */ (function () {
8832
8854
  getPosts: { url: '/socialposts', method: HTTP_METHODS.GET },
8833
8855
  createPost: { url: '/socialposts', method: HTTP_METHODS.POST },
8834
8856
  retrievePost: { url: '/socialposts/{post_id}', method: HTTP_METHODS.GET },
8857
+ dispute: { url: '/social/{post_id}/dispute', method: HTTP_METHODS.POST },
8835
8858
  };
8836
8859
  return SocialPostsRoute;
8837
8860
  }());
@@ -8871,6 +8894,18 @@ var SocialPosts = /** @class */ (function () {
8871
8894
  SocialPosts.view = function (post_id, params) {
8872
8895
  return Requests.processRoute(SocialPostsRoute.routes.retrievePost, {}, { post_id: post_id }, params);
8873
8896
  };
8897
+ /**
8898
+ * Dispute a post as being fraudulent.,s
8899
+ *
8900
+ * @see https://api.glitch.fun/api/documentation#/Social%20Media%20Posts/disputePost
8901
+ *
8902
+ * @param post_id The id fo the post to retrieve.
8903
+ *
8904
+ * @returns promise
8905
+ */
8906
+ SocialPosts.dispute = function (post_id, data, params) {
8907
+ return Requests.processRoute(SocialPostsRoute.routes.dispute, data, { post_id: post_id }, params);
8908
+ };
8874
8909
  return SocialPosts;
8875
8910
  }());
8876
8911
 
@@ -9072,6 +9107,8 @@ var CampaignsRoute = /** @class */ (function () {
9072
9107
  deleteCampaign: { url: '/campaigns/{campaign_id}', method: HTTP_METHODS.DELETE },
9073
9108
  getLedger: { url: '/campaigns/{campaign_id}/ledger', method: HTTP_METHODS.GET },
9074
9109
  getPosts: { url: '/campaigns/{campaign_id}/posts', method: HTTP_METHODS.GET },
9110
+ statistics: { url: '/campaigns/{campaign_id}/statistics', method: HTTP_METHODS.GET },
9111
+ streamViewCounts: { url: '/campaigns/{campaign_id}/streamViewCounts', method: HTTP_METHODS.GET },
9075
9112
  listCampaignLinks: { url: '/campaigns/{campaign_id}/links', method: HTTP_METHODS.GET },
9076
9113
  createCampaignLink: { url: '/campaigns/{campaign_id}/links', method: HTTP_METHODS.POST },
9077
9114
  getCampaignLink: { url: '/campaigns/{campaign_id}/links/{link_id}', method: HTTP_METHODS.GET },
@@ -9195,6 +9232,26 @@ var Campaigns = /** @class */ (function () {
9195
9232
  Campaigns.getPosts = function (campaign_id, params) {
9196
9233
  return Requests.processRoute(CampaignsRoute.routes.getPosts, undefined, { campaign_id: campaign_id }, params);
9197
9234
  };
9235
+ /**
9236
+ * Get the associated statistics for the campaign.
9237
+ *
9238
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/campaignStatistics
9239
+ *
9240
+ * @returns promise
9241
+ */
9242
+ Campaigns.statistics = function (campaign_id, params) {
9243
+ return Requests.processRoute(CampaignsRoute.routes.statistics, undefined, { campaign_id: campaign_id }, params);
9244
+ };
9245
+ /**
9246
+ * Get the stream view counts for the campaign.
9247
+ *
9248
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/getCampaignStreamViewCounts
9249
+ *
9250
+ * @returns promise
9251
+ */
9252
+ Campaigns.getStreamViewCounts = function (campaign_id, params) {
9253
+ return Requests.processRoute(CampaignsRoute.routes.getStreamViewCounts, undefined, { campaign_id: campaign_id }, params);
9254
+ };
9198
9255
  /**
9199
9256
  * Retrieve recommended influencers for a campaign.
9200
9257
  *