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
|
@@ -263,5 +263,51 @@ declare class SocialPosts {
|
|
|
263
263
|
* Get ad creative performance matrix.
|
|
264
264
|
*/
|
|
265
265
|
static creativePerformance<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
266
|
+
/**
|
|
267
|
+
* List social media conversations.
|
|
268
|
+
*
|
|
269
|
+
* @see https://api.glitch.fun/api/documentation#/Social%20Messaging/listSocialConversations
|
|
270
|
+
*
|
|
271
|
+
* @param params Query parameters (scheduler_id, platform, page, per_page).
|
|
272
|
+
* @returns promise
|
|
273
|
+
*/
|
|
274
|
+
static listConversations<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
275
|
+
/**
|
|
276
|
+
* Sync conversations from external platform.
|
|
277
|
+
*
|
|
278
|
+
* @see https://api.glitch.fun/api/documentation#/Social%20Messaging/syncSocialConversations
|
|
279
|
+
*
|
|
280
|
+
* @param data Body parameters (platform, scheduler_id).
|
|
281
|
+
* @returns promise
|
|
282
|
+
*/
|
|
283
|
+
static syncConversations<T>(data: object): AxiosPromise<Response<T>>;
|
|
284
|
+
/**
|
|
285
|
+
* Get a specific conversation.
|
|
286
|
+
*
|
|
287
|
+
* @see https://api.glitch.fun/api/documentation#/Social%20Messaging/getSocialConversation
|
|
288
|
+
*
|
|
289
|
+
* @param conversation_id The ID of the conversation.
|
|
290
|
+
* @returns promise
|
|
291
|
+
*/
|
|
292
|
+
static getConversation<T>(conversation_id: string): AxiosPromise<Response<T>>;
|
|
293
|
+
/**
|
|
294
|
+
* List messages in a conversation.
|
|
295
|
+
*
|
|
296
|
+
* @see https://api.glitch.fun/api/documentation#/Social%20Messaging/listSocialMessages
|
|
297
|
+
*
|
|
298
|
+
* @param conversation_id The ID of the conversation.
|
|
299
|
+
* @param params Query parameters (sync, page, per_page).
|
|
300
|
+
* @returns promise
|
|
301
|
+
*/
|
|
302
|
+
static getConversationMessages<T>(conversation_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
303
|
+
/**
|
|
304
|
+
* Send a Direct Message.
|
|
305
|
+
*
|
|
306
|
+
* @see https://api.glitch.fun/api/documentation#/Social%20Messaging/sendSocialMessage
|
|
307
|
+
*
|
|
308
|
+
* @param data Body parameters (message, conversation_id, recipient_id, platform, scheduler_id, media_ids).
|
|
309
|
+
* @returns promise
|
|
310
|
+
*/
|
|
311
|
+
static sendSocialMessage<T>(data: object): AxiosPromise<Response<T>>;
|
|
266
312
|
}
|
|
267
313
|
export default SocialPosts;
|
package/dist/esm/index.js
CHANGED
|
@@ -10954,6 +10954,12 @@ var SocialPostsRoute = /** @class */ (function () {
|
|
|
10954
10954
|
performAction: { url: '/socialposts/{post_id}/action', method: HTTP_METHODS.POST },
|
|
10955
10955
|
performCommentAction: { url: '/socialposts/comments/{comment_id}/action', method: HTTP_METHODS.POST },
|
|
10956
10956
|
creativePerformance: { url: '/socialposts/creative-performance', method: HTTP_METHODS.GET },
|
|
10957
|
+
// Social Messaging (DM) Routes
|
|
10958
|
+
listConversations: { url: '/social/conversations', method: HTTP_METHODS.GET },
|
|
10959
|
+
syncConversations: { url: '/social/conversations/sync', method: HTTP_METHODS.POST },
|
|
10960
|
+
getConversation: { url: '/social/conversations/{conversation_id}', method: HTTP_METHODS.GET },
|
|
10961
|
+
getConversationMessages: { url: '/social/conversations/{conversation_id}/messages', method: HTTP_METHODS.GET },
|
|
10962
|
+
sendSocialMessage: { url: '/social/messages', method: HTTP_METHODS.POST },
|
|
10957
10963
|
};
|
|
10958
10964
|
return SocialPostsRoute;
|
|
10959
10965
|
}());
|
|
@@ -11285,6 +11291,62 @@ var SocialPosts = /** @class */ (function () {
|
|
|
11285
11291
|
SocialPosts.creativePerformance = function (params) {
|
|
11286
11292
|
return Requests.processRoute(SocialPostsRoute.routes.creativePerformance, {}, {}, params);
|
|
11287
11293
|
};
|
|
11294
|
+
/**
|
|
11295
|
+
* List social media conversations.
|
|
11296
|
+
*
|
|
11297
|
+
* @see https://api.glitch.fun/api/documentation#/Social%20Messaging/listSocialConversations
|
|
11298
|
+
*
|
|
11299
|
+
* @param params Query parameters (scheduler_id, platform, page, per_page).
|
|
11300
|
+
* @returns promise
|
|
11301
|
+
*/
|
|
11302
|
+
SocialPosts.listConversations = function (params) {
|
|
11303
|
+
return Requests.processRoute(SocialPostsRoute.routes.listConversations, undefined, undefined, params);
|
|
11304
|
+
};
|
|
11305
|
+
/**
|
|
11306
|
+
* Sync conversations from external platform.
|
|
11307
|
+
*
|
|
11308
|
+
* @see https://api.glitch.fun/api/documentation#/Social%20Messaging/syncSocialConversations
|
|
11309
|
+
*
|
|
11310
|
+
* @param data Body parameters (platform, scheduler_id).
|
|
11311
|
+
* @returns promise
|
|
11312
|
+
*/
|
|
11313
|
+
SocialPosts.syncConversations = function (data) {
|
|
11314
|
+
return Requests.processRoute(SocialPostsRoute.routes.syncConversations, data);
|
|
11315
|
+
};
|
|
11316
|
+
/**
|
|
11317
|
+
* Get a specific conversation.
|
|
11318
|
+
*
|
|
11319
|
+
* @see https://api.glitch.fun/api/documentation#/Social%20Messaging/getSocialConversation
|
|
11320
|
+
*
|
|
11321
|
+
* @param conversation_id The ID of the conversation.
|
|
11322
|
+
* @returns promise
|
|
11323
|
+
*/
|
|
11324
|
+
SocialPosts.getConversation = function (conversation_id) {
|
|
11325
|
+
return Requests.processRoute(SocialPostsRoute.routes.getConversation, undefined, { conversation_id: conversation_id });
|
|
11326
|
+
};
|
|
11327
|
+
/**
|
|
11328
|
+
* List messages in a conversation.
|
|
11329
|
+
*
|
|
11330
|
+
* @see https://api.glitch.fun/api/documentation#/Social%20Messaging/listSocialMessages
|
|
11331
|
+
*
|
|
11332
|
+
* @param conversation_id The ID of the conversation.
|
|
11333
|
+
* @param params Query parameters (sync, page, per_page).
|
|
11334
|
+
* @returns promise
|
|
11335
|
+
*/
|
|
11336
|
+
SocialPosts.getConversationMessages = function (conversation_id, params) {
|
|
11337
|
+
return Requests.processRoute(SocialPostsRoute.routes.getConversationMessages, undefined, { conversation_id: conversation_id }, params);
|
|
11338
|
+
};
|
|
11339
|
+
/**
|
|
11340
|
+
* Send a Direct Message.
|
|
11341
|
+
*
|
|
11342
|
+
* @see https://api.glitch.fun/api/documentation#/Social%20Messaging/sendSocialMessage
|
|
11343
|
+
*
|
|
11344
|
+
* @param data Body parameters (message, conversation_id, recipient_id, platform, scheduler_id, media_ids).
|
|
11345
|
+
* @returns promise
|
|
11346
|
+
*/
|
|
11347
|
+
SocialPosts.sendSocialMessage = function (data) {
|
|
11348
|
+
return Requests.processRoute(SocialPostsRoute.routes.sendSocialMessage, data);
|
|
11349
|
+
};
|
|
11288
11350
|
return SocialPosts;
|
|
11289
11351
|
}());
|
|
11290
11352
|
|