glitch-javascript-sdk 2.1.3 → 2.1.4

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
@@ -5780,6 +5780,22 @@ declare class Scheduler {
5780
5780
  * @returns promise
5781
5781
  */
5782
5782
  static generateRedditContent<T>(scheduler_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
5783
+ /**
5784
+ * Get all posts and comments for a scheduler.
5785
+ *
5786
+ * @param scheduler_id The ID of the promotion schedule.
5787
+ * @param params Optional query parameters for filtering and sorting.
5788
+ * @returns promise
5789
+ */
5790
+ static getSchedulerPostsWithComments<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
5791
+ /**
5792
+ * Sync all comments for all posts in a scheduler.
5793
+ *
5794
+ * @param scheduler_id The ID of the promotion schedule.
5795
+ * @param params Optional query parameters (e.g., limit_per_post).
5796
+ * @returns promise
5797
+ */
5798
+ static syncAllSchedulerComments<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
5783
5799
  }
5784
5800
 
5785
5801
  declare class Funnel {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -777,6 +777,28 @@ class Scheduler {
777
777
  return Requests.processRoute(SchedulerRoute.routes.generateRedditContent, data, { scheduler_id }, params);
778
778
  }
779
779
 
780
+ /**
781
+ * Get all posts and comments for a scheduler.
782
+ *
783
+ * @param scheduler_id The ID of the promotion schedule.
784
+ * @param params Optional query parameters for filtering and sorting.
785
+ * @returns promise
786
+ */
787
+ public static getSchedulerPostsWithComments<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
788
+ return Requests.processRoute(SchedulerRoute.routes.getSchedulerPostsWithComments, {}, { scheduler_id }, params);
789
+ }
790
+
791
+ /**
792
+ * Sync all comments for all posts in a scheduler.
793
+ *
794
+ * @param scheduler_id The ID of the promotion schedule.
795
+ * @param params Optional query parameters (e.g., limit_per_post).
796
+ * @returns promise
797
+ */
798
+ public static syncAllSchedulerComments<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
799
+ return Requests.processRoute(SchedulerRoute.routes.syncAllSchedulerComments, {}, { scheduler_id }, params);
800
+ }
801
+
780
802
  }
781
803
 
782
804
  export default Scheduler;
@@ -119,6 +119,9 @@ class SchedulerRoute {
119
119
  updateDestination: { url: '/schedulers/{scheduler_id}/updates/{update_id}/destinations/{destination_id}', method: HTTP_METHODS.PUT },
120
120
  deleteDestination: { url: '/schedulers/{scheduler_id}/updates/{update_id}/destinations/{destination_id}', method: HTTP_METHODS.DELETE },
121
121
 
122
+ getSchedulerPostsWithComments: { url: '/schedulers/{scheduler_id}/posts-with-comments', method: HTTP_METHODS.GET },
123
+ syncAllSchedulerComments: { url: '/schedulers/{scheduler_id}/sync-all-comments', method: HTTP_METHODS.POST },
124
+
122
125
  };
123
126
  }
124
127