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.
package/dist/cjs/index.js CHANGED
@@ -24134,6 +24134,8 @@ var SocialPostsRoute = /** @class */ (function () {
24134
24134
  getPostAttribution: { url: '/socialposts/{post_id}/attribution', method: HTTP_METHODS.GET },
24135
24135
  getSocialPostAttributionReport: { url: '/reports/fingerprinting/social-post-attribution', method: HTTP_METHODS.GET },
24136
24136
  getLinkSummary: { url: '/socialposts/{post_id}/link-summary', method: HTTP_METHODS.GET },
24137
+ syncHistory: { url: '/social/sync-history/{platform}', method: HTTP_METHODS.POST },
24138
+ performAction: { url: '/socialposts/{post_id}/action', method: HTTP_METHODS.POST },
24137
24139
  };
24138
24140
  return SocialPostsRoute;
24139
24141
  }());
@@ -24427,6 +24429,28 @@ var SocialPosts = /** @class */ (function () {
24427
24429
  SocialPosts.getLinkSummary = function (post_id) {
24428
24430
  return Requests.processRoute(SocialPostsRoute.routes.getLinkSummary, undefined, { post_id: post_id });
24429
24431
  };
24432
+ /**
24433
+ * Trigger a historical sync for a specific platform for the current user.
24434
+ *
24435
+ * @see https://api.glitch.fun/api/documentation#/Social%20Media%20Posts/syncHistory
24436
+ *
24437
+ * @param platform The platform to sync (e.g., 'twitter', 'youtube', 'bluesky').
24438
+ *
24439
+ * @returns promise
24440
+ */
24441
+ SocialPosts.syncHistory = function (platform, params) {
24442
+ return Requests.processRoute(SocialPostsRoute.routes.syncHistory, {}, { platform: platform }, params);
24443
+ };
24444
+ /**
24445
+ * Perform a social action (Like, Repost, Vote) on a post.
24446
+ *
24447
+ * @param post_id The ID of the social media post.
24448
+ * @param action The action to perform.
24449
+ * @returns promise
24450
+ */
24451
+ SocialPosts.performAction = function (post_id, action) {
24452
+ return Requests.processRoute(SocialPostsRoute.routes.performAction, { action: action }, { post_id: post_id });
24453
+ };
24430
24454
  return SocialPosts;
24431
24455
  }());
24432
24456
 
@@ -27272,6 +27296,7 @@ var SchedulerRoute = /** @class */ (function () {
27272
27296
  getSchedulerPostsWithComments: { url: '/schedulers/{scheduler_id}/posts-with-comments', method: HTTP_METHODS.GET },
27273
27297
  syncAllSchedulerComments: { url: '/schedulers/{scheduler_id}/sync-all-comments', method: HTTP_METHODS.POST },
27274
27298
  getConversionActions: { url: '/schedulers/{scheduler_id}/conversion-actions', method: HTTP_METHODS.GET },
27299
+ syncHistory: { url: '/schedulers/{scheduler_id}/sync-history/{platform}', method: HTTP_METHODS.POST },
27275
27300
  };
27276
27301
  return SchedulerRoute;
27277
27302
  }());
@@ -27938,6 +27963,19 @@ var Scheduler = /** @class */ (function () {
27938
27963
  Scheduler.getConversionActions = function (scheduler_id, params) {
27939
27964
  return Requests.processRoute(SchedulerRoute.routes.getConversionActions, {}, { scheduler_id: scheduler_id }, params);
27940
27965
  };
27966
+ /**
27967
+ * Trigger a historical sync for a specific platform on a scheduler.
27968
+ *
27969
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/syncHistory
27970
+ *
27971
+ * @param scheduler_id The ID of the promotion schedule.
27972
+ * @param platform The platform to sync (e.g., 'twitter', 'youtube', 'bluesky').
27973
+ *
27974
+ * @returns promise
27975
+ */
27976
+ Scheduler.syncHistory = function (scheduler_id, platform, params) {
27977
+ return Requests.processRoute(SchedulerRoute.routes.syncHistory, {}, { scheduler_id: scheduler_id, platform: platform }, params);
27978
+ };
27941
27979
  return Scheduler;
27942
27980
  }());
27943
27981