glitch-javascript-sdk 2.4.5 → 2.4.7
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 +138 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/SocialPosts.d.ts +46 -0
- package/dist/esm/api/Titles.d.ts +46 -0
- package/dist/esm/index.js +138 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +92 -0
- package/package.json +1 -1
- package/src/api/SocialPosts.ts +61 -0
- package/src/api/Titles.ts +74 -0
- package/src/routes/SocialPostsRoute.ts +7 -0
- package/src/routes/TitlesRoute.ts +15 -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
|
|
|
@@ -24623,6 +24685,18 @@ var TitlesRoute = /** @class */ (function () {
|
|
|
24623
24685
|
generateLandingPageAiContent: { url: '/landing-pages/{landing_page_id}/generate-ai-content', method: HTTP_METHODS.POST },
|
|
24624
24686
|
saveLandingPageTranslation: { url: '/landing-pages/{landing_page_id}/translations', method: HTTP_METHODS.POST },
|
|
24625
24687
|
cohorts: { url: '/titles/{title_id}/installs/cohorts', method: HTTP_METHODS.GET },
|
|
24688
|
+
geoReport: { url: '/titles/{title_id}/installs/geo-report', method: HTTP_METHODS.GET },
|
|
24689
|
+
// Game Events (Behavioral Telemetry)
|
|
24690
|
+
listEvents: { url: '/titles/{title_id}/events', method: HTTP_METHODS.GET },
|
|
24691
|
+
createEvent: { url: '/titles/{title_id}/events', method: HTTP_METHODS.POST },
|
|
24692
|
+
bulkCreateEvents: { url: '/titles/{title_id}/events/bulk', method: HTTP_METHODS.POST },
|
|
24693
|
+
eventSummary: { url: '/titles/{title_id}/events/summary', method: HTTP_METHODS.GET },
|
|
24694
|
+
eventDistinctKeys: { url: '/titles/{title_id}/events/distinct-keys', method: HTTP_METHODS.GET },
|
|
24695
|
+
// Behavioral Funnels
|
|
24696
|
+
listBehavioralFunnels: { url: '/titles/{title_id}/behavioral-funnels', method: HTTP_METHODS.GET },
|
|
24697
|
+
createBehavioralFunnel: { url: '/titles/{title_id}/behavioral-funnels', method: HTTP_METHODS.POST },
|
|
24698
|
+
behavioralFunnelReport: { url: '/titles/{title_id}/behavioral-funnels/{funnel_id}/report', method: HTTP_METHODS.GET },
|
|
24699
|
+
deleteBehavioralFunnel: { url: '/titles/{title_id}/behavioral-funnels/{funnel_id}', method: HTTP_METHODS.DELETE },
|
|
24626
24700
|
};
|
|
24627
24701
|
return TitlesRoute;
|
|
24628
24702
|
}());
|
|
@@ -25178,6 +25252,70 @@ var Titles = /** @class */ (function () {
|
|
|
25178
25252
|
Titles.getAdConversionEventsReport = function (title_id, params) {
|
|
25179
25253
|
return Requests.processRoute(TitlesRoute.routes.getAdConversionEventsReport, {}, { title_id: title_id }, params);
|
|
25180
25254
|
};
|
|
25255
|
+
/**
|
|
25256
|
+
* Get a geographical distribution report for installs.
|
|
25257
|
+
* @param params e.g., { group_by: 'country_code', start_date: '2025-01-01' }
|
|
25258
|
+
*/
|
|
25259
|
+
Titles.geoReport = function (title_id, params) {
|
|
25260
|
+
return Requests.processRoute(TitlesRoute.routes.geoReport, {}, { title_id: title_id }, params);
|
|
25261
|
+
};
|
|
25262
|
+
/**
|
|
25263
|
+
* List and filter raw game events (telemetry).
|
|
25264
|
+
*/
|
|
25265
|
+
Titles.listEvents = function (title_id, params) {
|
|
25266
|
+
return Requests.processRoute(TitlesRoute.routes.listEvents, {}, { title_id: title_id }, params);
|
|
25267
|
+
};
|
|
25268
|
+
/**
|
|
25269
|
+
* Record a single in-game action.
|
|
25270
|
+
*/
|
|
25271
|
+
Titles.createEvent = function (title_id, data) {
|
|
25272
|
+
return Requests.processRoute(TitlesRoute.routes.createEvent, data, { title_id: title_id });
|
|
25273
|
+
};
|
|
25274
|
+
/**
|
|
25275
|
+
* Record multiple events in one request (Batching).
|
|
25276
|
+
* @param data { events: Array<{game_install_id, step_key, action_key, metadata?}> }
|
|
25277
|
+
*/
|
|
25278
|
+
Titles.bulkCreateEvents = function (title_id, data) {
|
|
25279
|
+
return Requests.processRoute(TitlesRoute.routes.bulkCreateEvents, data, { title_id: title_id });
|
|
25280
|
+
};
|
|
25281
|
+
/**
|
|
25282
|
+
* Get a summary of actions per step.
|
|
25283
|
+
*/
|
|
25284
|
+
Titles.eventSummary = function (title_id, params) {
|
|
25285
|
+
return Requests.processRoute(TitlesRoute.routes.eventSummary, {}, { title_id: title_id }, params);
|
|
25286
|
+
};
|
|
25287
|
+
/**
|
|
25288
|
+
* Get all unique step and action keys used in this title.
|
|
25289
|
+
*/
|
|
25290
|
+
Titles.eventDistinctKeys = function (title_id) {
|
|
25291
|
+
return Requests.processRoute(TitlesRoute.routes.eventDistinctKeys, {}, { title_id: title_id });
|
|
25292
|
+
};
|
|
25293
|
+
/**
|
|
25294
|
+
* List all saved behavioral funnel definitions.
|
|
25295
|
+
*/
|
|
25296
|
+
Titles.listBehavioralFunnels = function (title_id) {
|
|
25297
|
+
return Requests.processRoute(TitlesRoute.routes.listBehavioralFunnels, {}, { title_id: title_id });
|
|
25298
|
+
};
|
|
25299
|
+
/**
|
|
25300
|
+
* Create and save a new behavioral funnel definition.
|
|
25301
|
+
* @param data { name: string, description?: string, steps: string[] }
|
|
25302
|
+
*/
|
|
25303
|
+
Titles.createBehavioralFunnel = function (title_id, data) {
|
|
25304
|
+
return Requests.processRoute(TitlesRoute.routes.createBehavioralFunnel, data, { title_id: title_id });
|
|
25305
|
+
};
|
|
25306
|
+
/**
|
|
25307
|
+
* Generate the drop-off report for a specific behavioral funnel.
|
|
25308
|
+
* @param params { start_date?: string, end_date?: string }
|
|
25309
|
+
*/
|
|
25310
|
+
Titles.behavioralFunnelReport = function (title_id, funnel_id, params) {
|
|
25311
|
+
return Requests.processRoute(TitlesRoute.routes.behavioralFunnelReport, {}, { title_id: title_id, funnel_id: funnel_id }, params);
|
|
25312
|
+
};
|
|
25313
|
+
/**
|
|
25314
|
+
* Delete a saved behavioral funnel definition.
|
|
25315
|
+
*/
|
|
25316
|
+
Titles.deleteBehavioralFunnel = function (title_id, funnel_id) {
|
|
25317
|
+
return Requests.processRoute(TitlesRoute.routes.deleteBehavioralFunnel, {}, { title_id: title_id, funnel_id: funnel_id });
|
|
25318
|
+
};
|
|
25181
25319
|
return Titles;
|
|
25182
25320
|
}());
|
|
25183
25321
|
|