glitch-javascript-sdk 2.4.3 → 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 +86 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Campaigns.d.ts +10 -0
- package/dist/esm/api/SocialPosts.d.ts +50 -0
- package/dist/esm/api/Titles.d.ts +1 -0
- package/dist/esm/index.js +86 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +61 -0
- package/package.json +1 -1
- package/src/api/Campaigns.ts +10 -0
- package/src/api/SocialPosts.ts +68 -0
- package/src/api/Titles.ts +4 -0
- package/src/routes/CampaignsRoute.ts +4 -0
- package/src/routes/SocialPostsRoute.ts +10 -0
- package/src/routes/TitlesRoute.ts +2 -0
|
@@ -731,5 +731,15 @@ declare class Campaigns {
|
|
|
731
731
|
is_landing_page_active?: boolean;
|
|
732
732
|
landing_page_slug?: string;
|
|
733
733
|
}): AxiosPromise<Response<T>>;
|
|
734
|
+
/**
|
|
735
|
+
* Export influencer invites to CSV.
|
|
736
|
+
*
|
|
737
|
+
* @param campaign_id The UUID of the campaign.
|
|
738
|
+
* @param data Filters for the export (stages, status).
|
|
739
|
+
*/
|
|
740
|
+
static exportInfluencerInvites<T>(campaign_id: string, data: {
|
|
741
|
+
stages?: string[];
|
|
742
|
+
status?: string;
|
|
743
|
+
}): AxiosPromise<Response<T>>;
|
|
734
744
|
}
|
|
735
745
|
export default Campaigns;
|
|
@@ -259,5 +259,55 @@ declare class SocialPosts {
|
|
|
259
259
|
* @returns promise
|
|
260
260
|
*/
|
|
261
261
|
static performCommentAction<T>(comment_id: string, action: 'like' | 'unlike' | 'repost' | 'unrepost' | 'vote_up' | 'vote_down' | 'unvote'): AxiosPromise<Response<T>>;
|
|
262
|
+
/**
|
|
263
|
+
* Get ad creative performance matrix.
|
|
264
|
+
*/
|
|
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>>;
|
|
262
312
|
}
|
|
263
313
|
export default SocialPosts;
|
package/dist/esm/api/Titles.d.ts
CHANGED
|
@@ -419,6 +419,7 @@ declare class Titles {
|
|
|
419
419
|
* @param translationData The full translation object to be saved.
|
|
420
420
|
*/
|
|
421
421
|
static saveLandingPageTranslation<T>(landing_page_id: string, translationData: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
422
|
+
static cohorts<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
422
423
|
/**
|
|
423
424
|
* Get an aggregated report of ad conversion events for charting.
|
|
424
425
|
*/
|
package/dist/esm/index.js
CHANGED
|
@@ -10953,6 +10953,13 @@ var SocialPostsRoute = /** @class */ (function () {
|
|
|
10953
10953
|
syncHistory: { url: '/social/sync-history/{platform}', method: HTTP_METHODS.POST },
|
|
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
|
+
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 },
|
|
10956
10963
|
};
|
|
10957
10964
|
return SocialPostsRoute;
|
|
10958
10965
|
}());
|
|
@@ -11278,6 +11285,68 @@ var SocialPosts = /** @class */ (function () {
|
|
|
11278
11285
|
SocialPosts.performCommentAction = function (comment_id, action) {
|
|
11279
11286
|
return Requests.processRoute(SocialPostsRoute.routes.performCommentAction, { action: action }, { comment_id: comment_id });
|
|
11280
11287
|
};
|
|
11288
|
+
/**
|
|
11289
|
+
* Get ad creative performance matrix.
|
|
11290
|
+
*/
|
|
11291
|
+
SocialPosts.creativePerformance = function (params) {
|
|
11292
|
+
return Requests.processRoute(SocialPostsRoute.routes.creativePerformance, {}, {}, params);
|
|
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
|
+
};
|
|
11281
11350
|
return SocialPosts;
|
|
11282
11351
|
}());
|
|
11283
11352
|
|
|
@@ -11431,6 +11500,7 @@ var TitlesRoute = /** @class */ (function () {
|
|
|
11431
11500
|
translateLandingPage: { url: '/landing-pages/{landing_page_id}/translate', method: HTTP_METHODS.POST },
|
|
11432
11501
|
generateLandingPageAiContent: { url: '/landing-pages/{landing_page_id}/generate-ai-content', method: HTTP_METHODS.POST },
|
|
11433
11502
|
saveLandingPageTranslation: { url: '/landing-pages/{landing_page_id}/translations', method: HTTP_METHODS.POST },
|
|
11503
|
+
cohorts: { url: '/titles/{title_id}/installs/cohorts', method: HTTP_METHODS.GET },
|
|
11434
11504
|
};
|
|
11435
11505
|
return TitlesRoute;
|
|
11436
11506
|
}());
|
|
@@ -11977,6 +12047,9 @@ var Titles = /** @class */ (function () {
|
|
|
11977
12047
|
Titles.saveLandingPageTranslation = function (landing_page_id, translationData, params) {
|
|
11978
12048
|
return Requests.processRoute(TitlesRoute.routes.saveLandingPageTranslation, translationData, { landing_page_id: landing_page_id }, params);
|
|
11979
12049
|
};
|
|
12050
|
+
Titles.cohorts = function (title_id, params) {
|
|
12051
|
+
return Requests.processRoute(TitlesRoute.routes.cohorts, {}, { title_id: title_id }, params);
|
|
12052
|
+
};
|
|
11980
12053
|
/**
|
|
11981
12054
|
* Get an aggregated report of ad conversion events for charting.
|
|
11982
12055
|
*/
|
|
@@ -12080,6 +12153,10 @@ var CampaignsRoute = /** @class */ (function () {
|
|
|
12080
12153
|
url: '/campaigns/{campaign_id}/influencers/{user_id}/landing-page',
|
|
12081
12154
|
method: HTTP_METHODS.PUT
|
|
12082
12155
|
},
|
|
12156
|
+
exportInfluencerInvites: {
|
|
12157
|
+
url: '/campaigns/{campaign_id}/influencers/invites/export',
|
|
12158
|
+
method: HTTP_METHODS.POST
|
|
12159
|
+
},
|
|
12083
12160
|
};
|
|
12084
12161
|
return CampaignsRoute;
|
|
12085
12162
|
}());
|
|
@@ -12961,6 +13038,15 @@ var Campaigns = /** @class */ (function () {
|
|
|
12961
13038
|
Campaigns.updateInfluencerLandingPage = function (campaign_id, user_id, data) {
|
|
12962
13039
|
return Requests.processRoute(CampaignsRoute.routes.updateInfluencerLandingPage, data, { campaign_id: campaign_id, user_id: user_id });
|
|
12963
13040
|
};
|
|
13041
|
+
/**
|
|
13042
|
+
* Export influencer invites to CSV.
|
|
13043
|
+
*
|
|
13044
|
+
* @param campaign_id The UUID of the campaign.
|
|
13045
|
+
* @param data Filters for the export (stages, status).
|
|
13046
|
+
*/
|
|
13047
|
+
Campaigns.exportInfluencerInvites = function (campaign_id, data) {
|
|
13048
|
+
return Requests.processRoute(CampaignsRoute.routes.exportInfluencerInvites, data, { campaign_id: campaign_id });
|
|
13049
|
+
};
|
|
12964
13050
|
return Campaigns;
|
|
12965
13051
|
}());
|
|
12966
13052
|
|