glitch-javascript-sdk 2.3.4 → 2.3.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.
@@ -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,15 @@ 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>>;
236
246
  }
237
247
  export default SocialPosts;
package/dist/esm/index.js CHANGED
@@ -10950,6 +10950,7 @@ 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 },
10953
10954
  };
10954
10955
  return SocialPostsRoute;
10955
10956
  }());
@@ -11243,6 +11244,18 @@ var SocialPosts = /** @class */ (function () {
11243
11244
  SocialPosts.getLinkSummary = function (post_id) {
11244
11245
  return Requests.processRoute(SocialPostsRoute.routes.getLinkSummary, undefined, { post_id: post_id });
11245
11246
  };
11247
+ /**
11248
+ * Trigger a historical sync for a specific platform for the current user.
11249
+ *
11250
+ * @see https://api.glitch.fun/api/documentation#/Social%20Media%20Posts/syncHistory
11251
+ *
11252
+ * @param platform The platform to sync (e.g., 'twitter', 'youtube', 'bluesky').
11253
+ *
11254
+ * @returns promise
11255
+ */
11256
+ SocialPosts.syncHistory = function (platform, params) {
11257
+ return Requests.processRoute(SocialPostsRoute.routes.syncHistory, {}, { platform: platform }, params);
11258
+ };
11246
11259
  return SocialPosts;
11247
11260
  }());
11248
11261
 
@@ -14088,6 +14101,7 @@ var SchedulerRoute = /** @class */ (function () {
14088
14101
  getSchedulerPostsWithComments: { url: '/schedulers/{scheduler_id}/posts-with-comments', method: HTTP_METHODS.GET },
14089
14102
  syncAllSchedulerComments: { url: '/schedulers/{scheduler_id}/sync-all-comments', method: HTTP_METHODS.POST },
14090
14103
  getConversionActions: { url: '/schedulers/{scheduler_id}/conversion-actions', method: HTTP_METHODS.GET },
14104
+ syncHistory: { url: '/schedulers/{scheduler_id}/sync-history/{platform}', method: HTTP_METHODS.POST },
14091
14105
  };
14092
14106
  return SchedulerRoute;
14093
14107
  }());
@@ -14754,6 +14768,19 @@ var Scheduler = /** @class */ (function () {
14754
14768
  Scheduler.getConversionActions = function (scheduler_id, params) {
14755
14769
  return Requests.processRoute(SchedulerRoute.routes.getConversionActions, {}, { scheduler_id: scheduler_id }, params);
14756
14770
  };
14771
+ /**
14772
+ * Trigger a historical sync for a specific platform on a scheduler.
14773
+ *
14774
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/syncHistory
14775
+ *
14776
+ * @param scheduler_id The ID of the promotion schedule.
14777
+ * @param platform The platform to sync (e.g., 'twitter', 'youtube', 'bluesky').
14778
+ *
14779
+ * @returns promise
14780
+ */
14781
+ Scheduler.syncHistory = function (scheduler_id, platform, params) {
14782
+ return Requests.processRoute(SchedulerRoute.routes.syncHistory, {}, { scheduler_id: scheduler_id, platform: platform }, params);
14783
+ };
14757
14784
  return Scheduler;
14758
14785
  }());
14759
14786