glitch-javascript-sdk 2.4.5 → 2.4.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 +62 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/SocialPosts.d.ts +46 -0
- package/dist/esm/index.js +62 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +46 -0
- package/package.json +1 -1
- package/src/api/SocialPosts.ts +61 -0
- package/src/routes/SocialPostsRoute.ts +7 -0
package/dist/cjs/index.js
CHANGED
|
@@ -24138,6 +24138,12 @@ var SocialPostsRoute = /** @class */ (function () {
|
|
|
24138
24138
|
performAction: { url: '/socialposts/{post_id}/action', method: HTTP_METHODS.POST },
|
|
24139
24139
|
performCommentAction: { url: '/socialposts/comments/{comment_id}/action', method: HTTP_METHODS.POST },
|
|
24140
24140
|
creativePerformance: { url: '/socialposts/creative-performance', method: HTTP_METHODS.GET },
|
|
24141
|
+
// Social Messaging (DM) Routes
|
|
24142
|
+
listConversations: { url: '/social/conversations', method: HTTP_METHODS.GET },
|
|
24143
|
+
syncConversations: { url: '/social/conversations/sync', method: HTTP_METHODS.POST },
|
|
24144
|
+
getConversation: { url: '/social/conversations/{conversation_id}', method: HTTP_METHODS.GET },
|
|
24145
|
+
getConversationMessages: { url: '/social/conversations/{conversation_id}/messages', method: HTTP_METHODS.GET },
|
|
24146
|
+
sendSocialMessage: { url: '/social/messages', method: HTTP_METHODS.POST },
|
|
24141
24147
|
};
|
|
24142
24148
|
return SocialPostsRoute;
|
|
24143
24149
|
}());
|
|
@@ -24469,6 +24475,62 @@ var SocialPosts = /** @class */ (function () {
|
|
|
24469
24475
|
SocialPosts.creativePerformance = function (params) {
|
|
24470
24476
|
return Requests.processRoute(SocialPostsRoute.routes.creativePerformance, {}, {}, params);
|
|
24471
24477
|
};
|
|
24478
|
+
/**
|
|
24479
|
+
* List social media conversations.
|
|
24480
|
+
*
|
|
24481
|
+
* @see https://api.glitch.fun/api/documentation#/Social%20Messaging/listSocialConversations
|
|
24482
|
+
*
|
|
24483
|
+
* @param params Query parameters (scheduler_id, platform, page, per_page).
|
|
24484
|
+
* @returns promise
|
|
24485
|
+
*/
|
|
24486
|
+
SocialPosts.listConversations = function (params) {
|
|
24487
|
+
return Requests.processRoute(SocialPostsRoute.routes.listConversations, undefined, undefined, params);
|
|
24488
|
+
};
|
|
24489
|
+
/**
|
|
24490
|
+
* Sync conversations from external platform.
|
|
24491
|
+
*
|
|
24492
|
+
* @see https://api.glitch.fun/api/documentation#/Social%20Messaging/syncSocialConversations
|
|
24493
|
+
*
|
|
24494
|
+
* @param data Body parameters (platform, scheduler_id).
|
|
24495
|
+
* @returns promise
|
|
24496
|
+
*/
|
|
24497
|
+
SocialPosts.syncConversations = function (data) {
|
|
24498
|
+
return Requests.processRoute(SocialPostsRoute.routes.syncConversations, data);
|
|
24499
|
+
};
|
|
24500
|
+
/**
|
|
24501
|
+
* Get a specific conversation.
|
|
24502
|
+
*
|
|
24503
|
+
* @see https://api.glitch.fun/api/documentation#/Social%20Messaging/getSocialConversation
|
|
24504
|
+
*
|
|
24505
|
+
* @param conversation_id The ID of the conversation.
|
|
24506
|
+
* @returns promise
|
|
24507
|
+
*/
|
|
24508
|
+
SocialPosts.getConversation = function (conversation_id) {
|
|
24509
|
+
return Requests.processRoute(SocialPostsRoute.routes.getConversation, undefined, { conversation_id: conversation_id });
|
|
24510
|
+
};
|
|
24511
|
+
/**
|
|
24512
|
+
* List messages in a conversation.
|
|
24513
|
+
*
|
|
24514
|
+
* @see https://api.glitch.fun/api/documentation#/Social%20Messaging/listSocialMessages
|
|
24515
|
+
*
|
|
24516
|
+
* @param conversation_id The ID of the conversation.
|
|
24517
|
+
* @param params Query parameters (sync, page, per_page).
|
|
24518
|
+
* @returns promise
|
|
24519
|
+
*/
|
|
24520
|
+
SocialPosts.getConversationMessages = function (conversation_id, params) {
|
|
24521
|
+
return Requests.processRoute(SocialPostsRoute.routes.getConversationMessages, undefined, { conversation_id: conversation_id }, params);
|
|
24522
|
+
};
|
|
24523
|
+
/**
|
|
24524
|
+
* Send a Direct Message.
|
|
24525
|
+
*
|
|
24526
|
+
* @see https://api.glitch.fun/api/documentation#/Social%20Messaging/sendSocialMessage
|
|
24527
|
+
*
|
|
24528
|
+
* @param data Body parameters (message, conversation_id, recipient_id, platform, scheduler_id, media_ids).
|
|
24529
|
+
* @returns promise
|
|
24530
|
+
*/
|
|
24531
|
+
SocialPosts.sendSocialMessage = function (data) {
|
|
24532
|
+
return Requests.processRoute(SocialPostsRoute.routes.sendSocialMessage, data);
|
|
24533
|
+
};
|
|
24472
24534
|
return SocialPosts;
|
|
24473
24535
|
}());
|
|
24474
24536
|
|