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
|
@@ -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/api/Titles.d.ts
CHANGED
|
@@ -429,5 +429,51 @@ declare class Titles {
|
|
|
429
429
|
group_by: 'platform' | 'status' | 'event_type';
|
|
430
430
|
unique_clicks?: boolean;
|
|
431
431
|
}): AxiosPromise<Response<T>>;
|
|
432
|
+
/**
|
|
433
|
+
* Get a geographical distribution report for installs.
|
|
434
|
+
* @param params e.g., { group_by: 'country_code', start_date: '2025-01-01' }
|
|
435
|
+
*/
|
|
436
|
+
static geoReport<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
437
|
+
/**
|
|
438
|
+
* List and filter raw game events (telemetry).
|
|
439
|
+
*/
|
|
440
|
+
static listEvents<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
441
|
+
/**
|
|
442
|
+
* Record a single in-game action.
|
|
443
|
+
*/
|
|
444
|
+
static createEvent<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
|
|
445
|
+
/**
|
|
446
|
+
* Record multiple events in one request (Batching).
|
|
447
|
+
* @param data { events: Array<{game_install_id, step_key, action_key, metadata?}> }
|
|
448
|
+
*/
|
|
449
|
+
static bulkCreateEvents<T>(title_id: string, data: {
|
|
450
|
+
events: object[];
|
|
451
|
+
}): AxiosPromise<Response<T>>;
|
|
452
|
+
/**
|
|
453
|
+
* Get a summary of actions per step.
|
|
454
|
+
*/
|
|
455
|
+
static eventSummary<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
456
|
+
/**
|
|
457
|
+
* Get all unique step and action keys used in this title.
|
|
458
|
+
*/
|
|
459
|
+
static eventDistinctKeys<T>(title_id: string): AxiosPromise<Response<T>>;
|
|
460
|
+
/**
|
|
461
|
+
* List all saved behavioral funnel definitions.
|
|
462
|
+
*/
|
|
463
|
+
static listBehavioralFunnels<T>(title_id: string): AxiosPromise<Response<T>>;
|
|
464
|
+
/**
|
|
465
|
+
* Create and save a new behavioral funnel definition.
|
|
466
|
+
* @param data { name: string, description?: string, steps: string[] }
|
|
467
|
+
*/
|
|
468
|
+
static createBehavioralFunnel<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
|
|
469
|
+
/**
|
|
470
|
+
* Generate the drop-off report for a specific behavioral funnel.
|
|
471
|
+
* @param params { start_date?: string, end_date?: string }
|
|
472
|
+
*/
|
|
473
|
+
static behavioralFunnelReport<T>(title_id: string, funnel_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
474
|
+
/**
|
|
475
|
+
* Delete a saved behavioral funnel definition.
|
|
476
|
+
*/
|
|
477
|
+
static deleteBehavioralFunnel<T>(title_id: string, funnel_id: string): AxiosPromise<Response<T>>;
|
|
432
478
|
}
|
|
433
479
|
export default Titles;
|
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
|
|
|
@@ -11439,6 +11501,18 @@ var TitlesRoute = /** @class */ (function () {
|
|
|
11439
11501
|
generateLandingPageAiContent: { url: '/landing-pages/{landing_page_id}/generate-ai-content', method: HTTP_METHODS.POST },
|
|
11440
11502
|
saveLandingPageTranslation: { url: '/landing-pages/{landing_page_id}/translations', method: HTTP_METHODS.POST },
|
|
11441
11503
|
cohorts: { url: '/titles/{title_id}/installs/cohorts', method: HTTP_METHODS.GET },
|
|
11504
|
+
geoReport: { url: '/titles/{title_id}/installs/geo-report', method: HTTP_METHODS.GET },
|
|
11505
|
+
// Game Events (Behavioral Telemetry)
|
|
11506
|
+
listEvents: { url: '/titles/{title_id}/events', method: HTTP_METHODS.GET },
|
|
11507
|
+
createEvent: { url: '/titles/{title_id}/events', method: HTTP_METHODS.POST },
|
|
11508
|
+
bulkCreateEvents: { url: '/titles/{title_id}/events/bulk', method: HTTP_METHODS.POST },
|
|
11509
|
+
eventSummary: { url: '/titles/{title_id}/events/summary', method: HTTP_METHODS.GET },
|
|
11510
|
+
eventDistinctKeys: { url: '/titles/{title_id}/events/distinct-keys', method: HTTP_METHODS.GET },
|
|
11511
|
+
// Behavioral Funnels
|
|
11512
|
+
listBehavioralFunnels: { url: '/titles/{title_id}/behavioral-funnels', method: HTTP_METHODS.GET },
|
|
11513
|
+
createBehavioralFunnel: { url: '/titles/{title_id}/behavioral-funnels', method: HTTP_METHODS.POST },
|
|
11514
|
+
behavioralFunnelReport: { url: '/titles/{title_id}/behavioral-funnels/{funnel_id}/report', method: HTTP_METHODS.GET },
|
|
11515
|
+
deleteBehavioralFunnel: { url: '/titles/{title_id}/behavioral-funnels/{funnel_id}', method: HTTP_METHODS.DELETE },
|
|
11442
11516
|
};
|
|
11443
11517
|
return TitlesRoute;
|
|
11444
11518
|
}());
|
|
@@ -11994,6 +12068,70 @@ var Titles = /** @class */ (function () {
|
|
|
11994
12068
|
Titles.getAdConversionEventsReport = function (title_id, params) {
|
|
11995
12069
|
return Requests.processRoute(TitlesRoute.routes.getAdConversionEventsReport, {}, { title_id: title_id }, params);
|
|
11996
12070
|
};
|
|
12071
|
+
/**
|
|
12072
|
+
* Get a geographical distribution report for installs.
|
|
12073
|
+
* @param params e.g., { group_by: 'country_code', start_date: '2025-01-01' }
|
|
12074
|
+
*/
|
|
12075
|
+
Titles.geoReport = function (title_id, params) {
|
|
12076
|
+
return Requests.processRoute(TitlesRoute.routes.geoReport, {}, { title_id: title_id }, params);
|
|
12077
|
+
};
|
|
12078
|
+
/**
|
|
12079
|
+
* List and filter raw game events (telemetry).
|
|
12080
|
+
*/
|
|
12081
|
+
Titles.listEvents = function (title_id, params) {
|
|
12082
|
+
return Requests.processRoute(TitlesRoute.routes.listEvents, {}, { title_id: title_id }, params);
|
|
12083
|
+
};
|
|
12084
|
+
/**
|
|
12085
|
+
* Record a single in-game action.
|
|
12086
|
+
*/
|
|
12087
|
+
Titles.createEvent = function (title_id, data) {
|
|
12088
|
+
return Requests.processRoute(TitlesRoute.routes.createEvent, data, { title_id: title_id });
|
|
12089
|
+
};
|
|
12090
|
+
/**
|
|
12091
|
+
* Record multiple events in one request (Batching).
|
|
12092
|
+
* @param data { events: Array<{game_install_id, step_key, action_key, metadata?}> }
|
|
12093
|
+
*/
|
|
12094
|
+
Titles.bulkCreateEvents = function (title_id, data) {
|
|
12095
|
+
return Requests.processRoute(TitlesRoute.routes.bulkCreateEvents, data, { title_id: title_id });
|
|
12096
|
+
};
|
|
12097
|
+
/**
|
|
12098
|
+
* Get a summary of actions per step.
|
|
12099
|
+
*/
|
|
12100
|
+
Titles.eventSummary = function (title_id, params) {
|
|
12101
|
+
return Requests.processRoute(TitlesRoute.routes.eventSummary, {}, { title_id: title_id }, params);
|
|
12102
|
+
};
|
|
12103
|
+
/**
|
|
12104
|
+
* Get all unique step and action keys used in this title.
|
|
12105
|
+
*/
|
|
12106
|
+
Titles.eventDistinctKeys = function (title_id) {
|
|
12107
|
+
return Requests.processRoute(TitlesRoute.routes.eventDistinctKeys, {}, { title_id: title_id });
|
|
12108
|
+
};
|
|
12109
|
+
/**
|
|
12110
|
+
* List all saved behavioral funnel definitions.
|
|
12111
|
+
*/
|
|
12112
|
+
Titles.listBehavioralFunnels = function (title_id) {
|
|
12113
|
+
return Requests.processRoute(TitlesRoute.routes.listBehavioralFunnels, {}, { title_id: title_id });
|
|
12114
|
+
};
|
|
12115
|
+
/**
|
|
12116
|
+
* Create and save a new behavioral funnel definition.
|
|
12117
|
+
* @param data { name: string, description?: string, steps: string[] }
|
|
12118
|
+
*/
|
|
12119
|
+
Titles.createBehavioralFunnel = function (title_id, data) {
|
|
12120
|
+
return Requests.processRoute(TitlesRoute.routes.createBehavioralFunnel, data, { title_id: title_id });
|
|
12121
|
+
};
|
|
12122
|
+
/**
|
|
12123
|
+
* Generate the drop-off report for a specific behavioral funnel.
|
|
12124
|
+
* @param params { start_date?: string, end_date?: string }
|
|
12125
|
+
*/
|
|
12126
|
+
Titles.behavioralFunnelReport = function (title_id, funnel_id, params) {
|
|
12127
|
+
return Requests.processRoute(TitlesRoute.routes.behavioralFunnelReport, {}, { title_id: title_id, funnel_id: funnel_id }, params);
|
|
12128
|
+
};
|
|
12129
|
+
/**
|
|
12130
|
+
* Delete a saved behavioral funnel definition.
|
|
12131
|
+
*/
|
|
12132
|
+
Titles.deleteBehavioralFunnel = function (title_id, funnel_id) {
|
|
12133
|
+
return Requests.processRoute(TitlesRoute.routes.deleteBehavioralFunnel, {}, { title_id: title_id, funnel_id: funnel_id });
|
|
12134
|
+
};
|
|
11997
12135
|
return Titles;
|
|
11998
12136
|
}());
|
|
11999
12137
|
|