glitch-javascript-sdk 2.1.3 → 2.1.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.
- package/dist/cjs/index.js +33 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Scheduler.d.ts +16 -0
- package/dist/esm/api/SocialPosts.d.ts +8 -0
- package/dist/esm/index.js +33 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +24 -0
- package/package.json +1 -1
- package/src/api/Scheduler.ts +22 -0
- package/src/api/SocialPosts.ts +11 -0
- package/src/routes/SchedulerRoute.ts +3 -0
- package/src/routes/SocialPostsRoute.ts +2 -0
|
@@ -496,5 +496,21 @@ declare class Scheduler {
|
|
|
496
496
|
* @returns promise
|
|
497
497
|
*/
|
|
498
498
|
static generateRedditContent<T>(scheduler_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
499
|
+
/**
|
|
500
|
+
* Get all posts and comments for a scheduler.
|
|
501
|
+
*
|
|
502
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
503
|
+
* @param params Optional query parameters for filtering and sorting.
|
|
504
|
+
* @returns promise
|
|
505
|
+
*/
|
|
506
|
+
static getSchedulerPostsWithComments<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
507
|
+
/**
|
|
508
|
+
* Sync all comments for all posts in a scheduler.
|
|
509
|
+
*
|
|
510
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
511
|
+
* @param params Optional query parameters (e.g., limit_per_post).
|
|
512
|
+
* @returns promise
|
|
513
|
+
*/
|
|
514
|
+
static syncAllSchedulerComments<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
499
515
|
}
|
|
500
516
|
export default Scheduler;
|
|
@@ -203,5 +203,13 @@ declare class SocialPosts {
|
|
|
203
203
|
* @returns A promise
|
|
204
204
|
*/
|
|
205
205
|
static updateCommentMetrics<T>(comment_id: string): AxiosPromise<Response<T>>;
|
|
206
|
+
/**
|
|
207
|
+
* Create a new top-level comment on a post.
|
|
208
|
+
*
|
|
209
|
+
* @param post_id The ID of the social media post to comment on.
|
|
210
|
+
* @param data The content of the comment.
|
|
211
|
+
* @returns A promise
|
|
212
|
+
*/
|
|
213
|
+
static createComment<T>(post_id: string, data: object): AxiosPromise<Response<T>>;
|
|
206
214
|
}
|
|
207
215
|
export default SocialPosts;
|
package/dist/esm/index.js
CHANGED
|
@@ -10946,6 +10946,7 @@ var SocialPostsRoute = /** @class */ (function () {
|
|
|
10946
10946
|
markCommentForResponse: { url: '/socialposts/comments/{comment_id}/mark-for-response', method: HTTP_METHODS.PUT },
|
|
10947
10947
|
getCommentThread: { url: '/socialposts/comments/{comment_id}/thread', method: HTTP_METHODS.GET },
|
|
10948
10948
|
updateCommentMetrics: { url: '/socialposts/comments/{comment_id}/update-metrics', method: HTTP_METHODS.PUT },
|
|
10949
|
+
createComment: { url: '/socialposts/{post_id}/comments', method: HTTP_METHODS.POST },
|
|
10949
10950
|
};
|
|
10950
10951
|
return SocialPostsRoute;
|
|
10951
10952
|
}());
|
|
@@ -11201,6 +11202,16 @@ var SocialPosts = /** @class */ (function () {
|
|
|
11201
11202
|
SocialPosts.updateCommentMetrics = function (comment_id) {
|
|
11202
11203
|
return Requests.processRoute(SocialPostsRoute.routes.updateCommentMetrics, undefined, { comment_id: comment_id });
|
|
11203
11204
|
};
|
|
11205
|
+
/**
|
|
11206
|
+
* Create a new top-level comment on a post.
|
|
11207
|
+
*
|
|
11208
|
+
* @param post_id The ID of the social media post to comment on.
|
|
11209
|
+
* @param data The content of the comment.
|
|
11210
|
+
* @returns A promise
|
|
11211
|
+
*/
|
|
11212
|
+
SocialPosts.createComment = function (post_id, data) {
|
|
11213
|
+
return Requests.processRoute(SocialPostsRoute.routes.createComment, data, { post_id: post_id });
|
|
11214
|
+
};
|
|
11204
11215
|
return SocialPosts;
|
|
11205
11216
|
}());
|
|
11206
11217
|
|
|
@@ -13815,6 +13826,8 @@ var SchedulerRoute = /** @class */ (function () {
|
|
|
13815
13826
|
getDestination: { url: '/schedulers/{scheduler_id}/updates/{update_id}/destinations/{destination_id}', method: HTTP_METHODS.GET },
|
|
13816
13827
|
updateDestination: { url: '/schedulers/{scheduler_id}/updates/{update_id}/destinations/{destination_id}', method: HTTP_METHODS.PUT },
|
|
13817
13828
|
deleteDestination: { url: '/schedulers/{scheduler_id}/updates/{update_id}/destinations/{destination_id}', method: HTTP_METHODS.DELETE },
|
|
13829
|
+
getSchedulerPostsWithComments: { url: '/schedulers/{scheduler_id}/posts-with-comments', method: HTTP_METHODS.GET },
|
|
13830
|
+
syncAllSchedulerComments: { url: '/schedulers/{scheduler_id}/sync-all-comments', method: HTTP_METHODS.POST },
|
|
13818
13831
|
};
|
|
13819
13832
|
return SchedulerRoute;
|
|
13820
13833
|
}());
|
|
@@ -14448,6 +14461,26 @@ var Scheduler = /** @class */ (function () {
|
|
|
14448
14461
|
Scheduler.generateRedditContent = function (scheduler_id, data, params) {
|
|
14449
14462
|
return Requests.processRoute(SchedulerRoute.routes.generateRedditContent, data, { scheduler_id: scheduler_id }, params);
|
|
14450
14463
|
};
|
|
14464
|
+
/**
|
|
14465
|
+
* Get all posts and comments for a scheduler.
|
|
14466
|
+
*
|
|
14467
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
14468
|
+
* @param params Optional query parameters for filtering and sorting.
|
|
14469
|
+
* @returns promise
|
|
14470
|
+
*/
|
|
14471
|
+
Scheduler.getSchedulerPostsWithComments = function (scheduler_id, params) {
|
|
14472
|
+
return Requests.processRoute(SchedulerRoute.routes.getSchedulerPostsWithComments, {}, { scheduler_id: scheduler_id }, params);
|
|
14473
|
+
};
|
|
14474
|
+
/**
|
|
14475
|
+
* Sync all comments for all posts in a scheduler.
|
|
14476
|
+
*
|
|
14477
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
14478
|
+
* @param params Optional query parameters (e.g., limit_per_post).
|
|
14479
|
+
* @returns promise
|
|
14480
|
+
*/
|
|
14481
|
+
Scheduler.syncAllSchedulerComments = function (scheduler_id, params) {
|
|
14482
|
+
return Requests.processRoute(SchedulerRoute.routes.syncAllSchedulerComments, {}, { scheduler_id: scheduler_id }, params);
|
|
14483
|
+
};
|
|
14451
14484
|
return Scheduler;
|
|
14452
14485
|
}());
|
|
14453
14486
|
|