glitch-javascript-sdk 2.4.3 → 2.4.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/index.d.ts CHANGED
@@ -3636,6 +3636,56 @@ 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>>;
3643
+ /**
3644
+ * List social media conversations.
3645
+ *
3646
+ * @see https://api.glitch.fun/api/documentation#/Social%20Messaging/listSocialConversations
3647
+ *
3648
+ * @param params Query parameters (scheduler_id, platform, page, per_page).
3649
+ * @returns promise
3650
+ */
3651
+ static listConversations<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
3652
+ /**
3653
+ * Sync conversations from external platform.
3654
+ *
3655
+ * @see https://api.glitch.fun/api/documentation#/Social%20Messaging/syncSocialConversations
3656
+ *
3657
+ * @param data Body parameters (platform, scheduler_id).
3658
+ * @returns promise
3659
+ */
3660
+ static syncConversations<T>(data: object): AxiosPromise<Response<T>>;
3661
+ /**
3662
+ * Get a specific conversation.
3663
+ *
3664
+ * @see https://api.glitch.fun/api/documentation#/Social%20Messaging/getSocialConversation
3665
+ *
3666
+ * @param conversation_id The ID of the conversation.
3667
+ * @returns promise
3668
+ */
3669
+ static getConversation<T>(conversation_id: string): AxiosPromise<Response<T>>;
3670
+ /**
3671
+ * List messages in a conversation.
3672
+ *
3673
+ * @see https://api.glitch.fun/api/documentation#/Social%20Messaging/listSocialMessages
3674
+ *
3675
+ * @param conversation_id The ID of the conversation.
3676
+ * @param params Query parameters (sync, page, per_page).
3677
+ * @returns promise
3678
+ */
3679
+ static getConversationMessages<T>(conversation_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
3680
+ /**
3681
+ * Send a Direct Message.
3682
+ *
3683
+ * @see https://api.glitch.fun/api/documentation#/Social%20Messaging/sendSocialMessage
3684
+ *
3685
+ * @param data Body parameters (message, conversation_id, recipient_id, platform, scheduler_id, media_ids).
3686
+ * @returns promise
3687
+ */
3688
+ static sendSocialMessage<T>(data: object): AxiosPromise<Response<T>>;
3639
3689
  }
3640
3690
 
3641
3691
  declare class Titles {
@@ -4057,6 +4107,7 @@ declare class Titles {
4057
4107
  * @param translationData The full translation object to be saved.
4058
4108
  */
4059
4109
  static saveLandingPageTranslation<T>(landing_page_id: string, translationData: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
4110
+ static cohorts<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
4060
4111
  /**
4061
4112
  * Get an aggregated report of ad conversion events for charting.
4062
4113
  */
@@ -4799,6 +4850,16 @@ declare class Campaigns {
4799
4850
  is_landing_page_active?: boolean;
4800
4851
  landing_page_slug?: string;
4801
4852
  }): AxiosPromise<Response<T>>;
4853
+ /**
4854
+ * Export influencer invites to CSV.
4855
+ *
4856
+ * @param campaign_id The UUID of the campaign.
4857
+ * @param data Filters for the export (stages, status).
4858
+ */
4859
+ static exportInfluencerInvites<T>(campaign_id: string, data: {
4860
+ stages?: string[];
4861
+ status?: string;
4862
+ }): AxiosPromise<Response<T>>;
4802
4863
  }
4803
4864
 
4804
4865
  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.6",
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,74 @@ 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
+ }
372
+
373
+ /**
374
+ * List social media conversations.
375
+ *
376
+ * @see https://api.glitch.fun/api/documentation#/Social%20Messaging/listSocialConversations
377
+ *
378
+ * @param params Query parameters (scheduler_id, platform, page, per_page).
379
+ * @returns promise
380
+ */
381
+ public static listConversations<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
382
+ return Requests.processRoute(SocialPostsRoute.routes.listConversations, undefined, undefined, params);
383
+ }
384
+
385
+ /**
386
+ * Sync conversations from external platform.
387
+ *
388
+ * @see https://api.glitch.fun/api/documentation#/Social%20Messaging/syncSocialConversations
389
+ *
390
+ * @param data Body parameters (platform, scheduler_id).
391
+ * @returns promise
392
+ */
393
+ public static syncConversations<T>(data: object): AxiosPromise<Response<T>> {
394
+ return Requests.processRoute(SocialPostsRoute.routes.syncConversations, data);
395
+ }
396
+
397
+ /**
398
+ * Get a specific conversation.
399
+ *
400
+ * @see https://api.glitch.fun/api/documentation#/Social%20Messaging/getSocialConversation
401
+ *
402
+ * @param conversation_id The ID of the conversation.
403
+ * @returns promise
404
+ */
405
+ public static getConversation<T>(conversation_id: string): AxiosPromise<Response<T>> {
406
+ return Requests.processRoute(SocialPostsRoute.routes.getConversation, undefined, { conversation_id });
407
+ }
408
+
409
+ /**
410
+ * List messages in a conversation.
411
+ *
412
+ * @see https://api.glitch.fun/api/documentation#/Social%20Messaging/listSocialMessages
413
+ *
414
+ * @param conversation_id The ID of the conversation.
415
+ * @param params Query parameters (sync, page, per_page).
416
+ * @returns promise
417
+ */
418
+ public static getConversationMessages<T>(conversation_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
419
+ return Requests.processRoute(SocialPostsRoute.routes.getConversationMessages, undefined, { conversation_id }, params);
420
+ }
421
+
422
+ /**
423
+ * Send a Direct Message.
424
+ *
425
+ * @see https://api.glitch.fun/api/documentation#/Social%20Messaging/sendSocialMessage
426
+ *
427
+ * @param data Body parameters (message, conversation_id, recipient_id, platform, scheduler_id, media_ids).
428
+ * @returns promise
429
+ */
430
+ public static sendSocialMessage<T>(data: object): AxiosPromise<Response<T>> {
431
+ return Requests.processRoute(SocialPostsRoute.routes.sendSocialMessage, data);
432
+ }
365
433
  }
366
434
 
367
435
  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,16 @@ 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
+
44
+ // Social Messaging (DM) Routes
45
+ listConversations: { url: '/social/conversations', method: HTTP_METHODS.GET },
46
+ syncConversations: { url: '/social/conversations/sync', method: HTTP_METHODS.POST },
47
+ getConversation: { url: '/social/conversations/{conversation_id}', method: HTTP_METHODS.GET },
48
+ getConversationMessages: { url: '/social/conversations/{conversation_id}/messages', method: HTTP_METHODS.GET },
49
+ sendSocialMessage: { url: '/social/messages', method: HTTP_METHODS.POST },
50
+
41
51
  };
42
52
 
43
53
  }
@@ -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
  }