glitch-javascript-sdk 2.3.4 → 2.3.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.
@@ -526,5 +526,16 @@ declare class Scheduler {
526
526
  platform: string;
527
527
  account_id?: string;
528
528
  }): AxiosPromise<Response<T>>;
529
+ /**
530
+ * Trigger a historical sync for a specific platform on a scheduler.
531
+ *
532
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/syncHistory
533
+ *
534
+ * @param scheduler_id The ID of the promotion schedule.
535
+ * @param platform The platform to sync (e.g., 'twitter', 'youtube', 'bluesky').
536
+ *
537
+ * @returns promise
538
+ */
539
+ static syncHistory<T>(scheduler_id: string, platform: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
529
540
  }
530
541
  export default Scheduler;
@@ -233,5 +233,23 @@ declare class SocialPosts {
233
233
  * @returns A promise
234
234
  */
235
235
  static getLinkSummary<T>(post_id: string): AxiosPromise<Response<T>>;
236
+ /**
237
+ * Trigger a historical sync for a specific platform for the current user.
238
+ *
239
+ * @see https://api.glitch.fun/api/documentation#/Social%20Media%20Posts/syncHistory
240
+ *
241
+ * @param platform The platform to sync (e.g., 'twitter', 'youtube', 'bluesky').
242
+ *
243
+ * @returns promise
244
+ */
245
+ static syncHistory<T>(platform: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
246
+ /**
247
+ * Perform a social action (Like, Repost, Vote) on a post.
248
+ *
249
+ * @param post_id The ID of the social media post.
250
+ * @param action The action to perform.
251
+ * @returns promise
252
+ */
253
+ static performAction<T>(post_id: string, action: 'like' | 'unlike' | 'repost' | 'unrepost' | 'vote_up' | 'vote_down' | 'unvote'): AxiosPromise<Response<T>>;
236
254
  }
237
255
  export default SocialPosts;
package/dist/esm/index.js CHANGED
@@ -10950,6 +10950,8 @@ var SocialPostsRoute = /** @class */ (function () {
10950
10950
  getPostAttribution: { url: '/socialposts/{post_id}/attribution', method: HTTP_METHODS.GET },
10951
10951
  getSocialPostAttributionReport: { url: '/reports/fingerprinting/social-post-attribution', method: HTTP_METHODS.GET },
10952
10952
  getLinkSummary: { url: '/socialposts/{post_id}/link-summary', method: HTTP_METHODS.GET },
10953
+ syncHistory: { url: '/social/sync-history/{platform}', method: HTTP_METHODS.POST },
10954
+ performAction: { url: '/socialposts/{post_id}/action', method: HTTP_METHODS.POST },
10953
10955
  };
10954
10956
  return SocialPostsRoute;
10955
10957
  }());
@@ -11243,6 +11245,28 @@ var SocialPosts = /** @class */ (function () {
11243
11245
  SocialPosts.getLinkSummary = function (post_id) {
11244
11246
  return Requests.processRoute(SocialPostsRoute.routes.getLinkSummary, undefined, { post_id: post_id });
11245
11247
  };
11248
+ /**
11249
+ * Trigger a historical sync for a specific platform for the current user.
11250
+ *
11251
+ * @see https://api.glitch.fun/api/documentation#/Social%20Media%20Posts/syncHistory
11252
+ *
11253
+ * @param platform The platform to sync (e.g., 'twitter', 'youtube', 'bluesky').
11254
+ *
11255
+ * @returns promise
11256
+ */
11257
+ SocialPosts.syncHistory = function (platform, params) {
11258
+ return Requests.processRoute(SocialPostsRoute.routes.syncHistory, {}, { platform: platform }, params);
11259
+ };
11260
+ /**
11261
+ * Perform a social action (Like, Repost, Vote) on a post.
11262
+ *
11263
+ * @param post_id The ID of the social media post.
11264
+ * @param action The action to perform.
11265
+ * @returns promise
11266
+ */
11267
+ SocialPosts.performAction = function (post_id, action) {
11268
+ return Requests.processRoute(SocialPostsRoute.routes.performAction, { action: action }, { post_id: post_id });
11269
+ };
11246
11270
  return SocialPosts;
11247
11271
  }());
11248
11272
 
@@ -14088,6 +14112,7 @@ var SchedulerRoute = /** @class */ (function () {
14088
14112
  getSchedulerPostsWithComments: { url: '/schedulers/{scheduler_id}/posts-with-comments', method: HTTP_METHODS.GET },
14089
14113
  syncAllSchedulerComments: { url: '/schedulers/{scheduler_id}/sync-all-comments', method: HTTP_METHODS.POST },
14090
14114
  getConversionActions: { url: '/schedulers/{scheduler_id}/conversion-actions', method: HTTP_METHODS.GET },
14115
+ syncHistory: { url: '/schedulers/{scheduler_id}/sync-history/{platform}', method: HTTP_METHODS.POST },
14091
14116
  };
14092
14117
  return SchedulerRoute;
14093
14118
  }());
@@ -14754,6 +14779,19 @@ var Scheduler = /** @class */ (function () {
14754
14779
  Scheduler.getConversionActions = function (scheduler_id, params) {
14755
14780
  return Requests.processRoute(SchedulerRoute.routes.getConversionActions, {}, { scheduler_id: scheduler_id }, params);
14756
14781
  };
14782
+ /**
14783
+ * Trigger a historical sync for a specific platform on a scheduler.
14784
+ *
14785
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/syncHistory
14786
+ *
14787
+ * @param scheduler_id The ID of the promotion schedule.
14788
+ * @param platform The platform to sync (e.g., 'twitter', 'youtube', 'bluesky').
14789
+ *
14790
+ * @returns promise
14791
+ */
14792
+ Scheduler.syncHistory = function (scheduler_id, platform, params) {
14793
+ return Requests.processRoute(SchedulerRoute.routes.syncHistory, {}, { scheduler_id: scheduler_id, platform: platform }, params);
14794
+ };
14757
14795
  return Scheduler;
14758
14796
  }());
14759
14797