glitch-javascript-sdk 2.4.3 → 2.4.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/index.d.ts CHANGED
@@ -3636,6 +3636,10 @@ declare class SocialPosts {
3636
3636
  * @returns promise
3637
3637
  */
3638
3638
  static performCommentAction<T>(comment_id: string, action: 'like' | 'unlike' | 'repost' | 'unrepost' | 'vote_up' | 'vote_down' | 'unvote'): AxiosPromise<Response<T>>;
3639
+ /**
3640
+ * Get ad creative performance matrix.
3641
+ */
3642
+ static creativePerformance<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
3639
3643
  }
3640
3644
 
3641
3645
  declare class Titles {
@@ -4057,6 +4061,7 @@ declare class Titles {
4057
4061
  * @param translationData The full translation object to be saved.
4058
4062
  */
4059
4063
  static saveLandingPageTranslation<T>(landing_page_id: string, translationData: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
4064
+ static cohorts<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
4060
4065
  /**
4061
4066
  * Get an aggregated report of ad conversion events for charting.
4062
4067
  */
@@ -4799,6 +4804,16 @@ declare class Campaigns {
4799
4804
  is_landing_page_active?: boolean;
4800
4805
  landing_page_slug?: string;
4801
4806
  }): AxiosPromise<Response<T>>;
4807
+ /**
4808
+ * Export influencer invites to CSV.
4809
+ *
4810
+ * @param campaign_id The UUID of the campaign.
4811
+ * @param data Filters for the export (stages, status).
4812
+ */
4813
+ static exportInfluencerInvites<T>(campaign_id: string, data: {
4814
+ stages?: string[];
4815
+ status?: string;
4816
+ }): AxiosPromise<Response<T>>;
4802
4817
  }
4803
4818
 
4804
4819
  declare class Subscriptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "2.4.3",
3
+ "version": "2.4.5",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -1035,6 +1035,16 @@ class Campaigns {
1035
1035
  );
1036
1036
  }
1037
1037
 
1038
+ /**
1039
+ * Export influencer invites to CSV.
1040
+ *
1041
+ * @param campaign_id The UUID of the campaign.
1042
+ * @param data Filters for the export (stages, status).
1043
+ */
1044
+ public static exportInfluencerInvites<T>(campaign_id: string, data: { stages?: string[], status?: string }): AxiosPromise<Response<T>> {
1045
+ return Requests.processRoute(CampaignsRoute.routes.exportInfluencerInvites, data, { campaign_id: campaign_id });
1046
+ }
1047
+
1038
1048
  }
1039
1049
 
1040
1050
  export default Campaigns;
@@ -362,6 +362,13 @@ class SocialPosts {
362
362
  public static performCommentAction<T>(comment_id: string, action: 'like' | 'unlike' | 'repost' | 'unrepost' | 'vote_up' | 'vote_down' | 'unvote'): AxiosPromise<Response<T>> {
363
363
  return Requests.processRoute(SocialPostsRoute.routes.performCommentAction, { action }, { comment_id });
364
364
  }
365
+
366
+ /**
367
+ * Get ad creative performance matrix.
368
+ */
369
+ public static creativePerformance<T>(params: Record<string, any>): AxiosPromise<Response<T>> {
370
+ return Requests.processRoute(SocialPostsRoute.routes.creativePerformance, {}, {}, params);
371
+ }
365
372
  }
366
373
 
367
374
  export default SocialPosts;
package/src/api/Titles.ts CHANGED
@@ -835,6 +835,10 @@ class Titles {
835
835
  return Requests.processRoute(TitlesRoute.routes.saveLandingPageTranslation, translationData, { landing_page_id }, params);
836
836
  }
837
837
 
838
+ public static cohorts<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
839
+ return Requests.processRoute(TitlesRoute.routes.cohorts, {}, { title_id }, params);
840
+ }
841
+
838
842
  /**
839
843
  * Get an aggregated report of ad conversion events for charting.
840
844
  */
@@ -94,6 +94,10 @@ class CampaignsRoute {
94
94
  url: '/campaigns/{campaign_id}/influencers/{user_id}/landing-page',
95
95
  method: HTTP_METHODS.PUT
96
96
  },
97
+ exportInfluencerInvites: {
98
+ url: '/campaigns/{campaign_id}/influencers/invites/export',
99
+ method: HTTP_METHODS.POST
100
+ },
97
101
 
98
102
 
99
103
  };
@@ -38,6 +38,9 @@ class SocialPostsRoute {
38
38
 
39
39
  performAction: { url: '/socialposts/{post_id}/action', method: HTTP_METHODS.POST },
40
40
  performCommentAction: { url: '/socialposts/comments/{comment_id}/action', method: HTTP_METHODS.POST },
41
+
42
+ creativePerformance: { url: '/socialposts/creative-performance', method: HTTP_METHODS.GET },
43
+
41
44
  };
42
45
 
43
46
  }
@@ -163,6 +163,8 @@ class TitlesRoute {
163
163
  generateLandingPageAiContent: { url: '/landing-pages/{landing_page_id}/generate-ai-content', method: HTTP_METHODS.POST },
164
164
  saveLandingPageTranslation: { url: '/landing-pages/{landing_page_id}/translations', method: HTTP_METHODS.POST },
165
165
 
166
+ cohorts: { url: '/titles/{title_id}/installs/cohorts', method: HTTP_METHODS.GET },
167
+
166
168
  };
167
169
 
168
170
  }