glitch-javascript-sdk 2.4.6 → 2.4.8
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 +116 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Media.d.ts +7 -0
- package/dist/esm/api/Scheduler.d.ts +15 -0
- package/dist/esm/api/SocialPosts.d.ts +9 -0
- package/dist/esm/api/Titles.d.ts +46 -0
- package/dist/esm/index.js +116 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +77 -0
- package/package.json +1 -1
- package/src/api/Media.ts +11 -0
- package/src/api/Scheduler.ts +19 -0
- package/src/api/SocialPosts.ts +10 -0
- package/src/api/Titles.ts +74 -0
- package/src/routes/MediaRoute.ts +1 -0
- package/src/routes/SchedulerRoute.ts +3 -0
- package/src/routes/SocialPostsRoute.ts +1 -0
- package/src/routes/TitlesRoute.ts +15 -0
package/dist/esm/api/Media.d.ts
CHANGED
|
@@ -214,5 +214,12 @@ declare class Media {
|
|
|
214
214
|
requirement: string;
|
|
215
215
|
content: string;
|
|
216
216
|
};
|
|
217
|
+
/**
|
|
218
|
+
* Upload an audio file to TikTok's asset library via our Media controller.
|
|
219
|
+
*
|
|
220
|
+
* @param file The audio file (mp3).
|
|
221
|
+
* @param scheduler_id The ID of the scheduler to provide OAuth context.
|
|
222
|
+
*/
|
|
223
|
+
static uploadTikTokMusic<T>(file: File, scheduler_id: string): AxiosPromise<Response<T>>;
|
|
217
224
|
}
|
|
218
225
|
export default Media;
|
|
@@ -546,5 +546,20 @@ declare class Scheduler {
|
|
|
546
546
|
* @returns promise
|
|
547
547
|
*/
|
|
548
548
|
static generateHashtags<T>(scheduler_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
549
|
+
/**
|
|
550
|
+
* Get TikTok hashtag suggestions based on a keyword.
|
|
551
|
+
*
|
|
552
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
553
|
+
* @param params { keyword: string }
|
|
554
|
+
*/
|
|
555
|
+
static getTikTokHashtags<T>(scheduler_id: string, params: {
|
|
556
|
+
keyword: string;
|
|
557
|
+
}): AxiosPromise<Response<T>>;
|
|
558
|
+
/**
|
|
559
|
+
* Get trending commercial music from TikTok's library.
|
|
560
|
+
*
|
|
561
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
562
|
+
*/
|
|
563
|
+
static getTikTokMusic<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
549
564
|
}
|
|
550
565
|
export default Scheduler;
|
|
@@ -309,5 +309,14 @@ declare class SocialPosts {
|
|
|
309
309
|
* @returns promise
|
|
310
310
|
*/
|
|
311
311
|
static sendSocialMessage<T>(data: object): AxiosPromise<Response<T>>;
|
|
312
|
+
/**
|
|
313
|
+
* Reply to a high-intent TikTok comment via Direct Message.
|
|
314
|
+
*
|
|
315
|
+
* @param comment_id The ID of the comment.
|
|
316
|
+
* @param data { message: string }
|
|
317
|
+
*/
|
|
318
|
+
static replyViaDm<T>(comment_id: string, data: {
|
|
319
|
+
message: string;
|
|
320
|
+
}): AxiosPromise<Response<T>>;
|
|
312
321
|
}
|
|
313
322
|
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
|
@@ -10960,6 +10960,7 @@ var SocialPostsRoute = /** @class */ (function () {
|
|
|
10960
10960
|
getConversation: { url: '/social/conversations/{conversation_id}', method: HTTP_METHODS.GET },
|
|
10961
10961
|
getConversationMessages: { url: '/social/conversations/{conversation_id}/messages', method: HTTP_METHODS.GET },
|
|
10962
10962
|
sendSocialMessage: { url: '/social/messages', method: HTTP_METHODS.POST },
|
|
10963
|
+
replyViaDm: { url: '/socialposts/comments/{comment_id}/reply-via-dm', method: HTTP_METHODS.POST },
|
|
10963
10964
|
};
|
|
10964
10965
|
return SocialPostsRoute;
|
|
10965
10966
|
}());
|
|
@@ -11347,6 +11348,15 @@ var SocialPosts = /** @class */ (function () {
|
|
|
11347
11348
|
SocialPosts.sendSocialMessage = function (data) {
|
|
11348
11349
|
return Requests.processRoute(SocialPostsRoute.routes.sendSocialMessage, data);
|
|
11349
11350
|
};
|
|
11351
|
+
/**
|
|
11352
|
+
* Reply to a high-intent TikTok comment via Direct Message.
|
|
11353
|
+
*
|
|
11354
|
+
* @param comment_id The ID of the comment.
|
|
11355
|
+
* @param data { message: string }
|
|
11356
|
+
*/
|
|
11357
|
+
SocialPosts.replyViaDm = function (comment_id, data) {
|
|
11358
|
+
return Requests.processRoute(SocialPostsRoute.routes.replyViaDm, data, { comment_id: comment_id });
|
|
11359
|
+
};
|
|
11350
11360
|
return SocialPosts;
|
|
11351
11361
|
}());
|
|
11352
11362
|
|
|
@@ -11501,6 +11511,18 @@ var TitlesRoute = /** @class */ (function () {
|
|
|
11501
11511
|
generateLandingPageAiContent: { url: '/landing-pages/{landing_page_id}/generate-ai-content', method: HTTP_METHODS.POST },
|
|
11502
11512
|
saveLandingPageTranslation: { url: '/landing-pages/{landing_page_id}/translations', method: HTTP_METHODS.POST },
|
|
11503
11513
|
cohorts: { url: '/titles/{title_id}/installs/cohorts', method: HTTP_METHODS.GET },
|
|
11514
|
+
geoReport: { url: '/titles/{title_id}/installs/geo-report', method: HTTP_METHODS.GET },
|
|
11515
|
+
// Game Events (Behavioral Telemetry)
|
|
11516
|
+
listEvents: { url: '/titles/{title_id}/events', method: HTTP_METHODS.GET },
|
|
11517
|
+
createEvent: { url: '/titles/{title_id}/events', method: HTTP_METHODS.POST },
|
|
11518
|
+
bulkCreateEvents: { url: '/titles/{title_id}/events/bulk', method: HTTP_METHODS.POST },
|
|
11519
|
+
eventSummary: { url: '/titles/{title_id}/events/summary', method: HTTP_METHODS.GET },
|
|
11520
|
+
eventDistinctKeys: { url: '/titles/{title_id}/events/distinct-keys', method: HTTP_METHODS.GET },
|
|
11521
|
+
// Behavioral Funnels
|
|
11522
|
+
listBehavioralFunnels: { url: '/titles/{title_id}/behavioral-funnels', method: HTTP_METHODS.GET },
|
|
11523
|
+
createBehavioralFunnel: { url: '/titles/{title_id}/behavioral-funnels', method: HTTP_METHODS.POST },
|
|
11524
|
+
behavioralFunnelReport: { url: '/titles/{title_id}/behavioral-funnels/{funnel_id}/report', method: HTTP_METHODS.GET },
|
|
11525
|
+
deleteBehavioralFunnel: { url: '/titles/{title_id}/behavioral-funnels/{funnel_id}', method: HTTP_METHODS.DELETE },
|
|
11504
11526
|
};
|
|
11505
11527
|
return TitlesRoute;
|
|
11506
11528
|
}());
|
|
@@ -12056,6 +12078,70 @@ var Titles = /** @class */ (function () {
|
|
|
12056
12078
|
Titles.getAdConversionEventsReport = function (title_id, params) {
|
|
12057
12079
|
return Requests.processRoute(TitlesRoute.routes.getAdConversionEventsReport, {}, { title_id: title_id }, params);
|
|
12058
12080
|
};
|
|
12081
|
+
/**
|
|
12082
|
+
* Get a geographical distribution report for installs.
|
|
12083
|
+
* @param params e.g., { group_by: 'country_code', start_date: '2025-01-01' }
|
|
12084
|
+
*/
|
|
12085
|
+
Titles.geoReport = function (title_id, params) {
|
|
12086
|
+
return Requests.processRoute(TitlesRoute.routes.geoReport, {}, { title_id: title_id }, params);
|
|
12087
|
+
};
|
|
12088
|
+
/**
|
|
12089
|
+
* List and filter raw game events (telemetry).
|
|
12090
|
+
*/
|
|
12091
|
+
Titles.listEvents = function (title_id, params) {
|
|
12092
|
+
return Requests.processRoute(TitlesRoute.routes.listEvents, {}, { title_id: title_id }, params);
|
|
12093
|
+
};
|
|
12094
|
+
/**
|
|
12095
|
+
* Record a single in-game action.
|
|
12096
|
+
*/
|
|
12097
|
+
Titles.createEvent = function (title_id, data) {
|
|
12098
|
+
return Requests.processRoute(TitlesRoute.routes.createEvent, data, { title_id: title_id });
|
|
12099
|
+
};
|
|
12100
|
+
/**
|
|
12101
|
+
* Record multiple events in one request (Batching).
|
|
12102
|
+
* @param data { events: Array<{game_install_id, step_key, action_key, metadata?}> }
|
|
12103
|
+
*/
|
|
12104
|
+
Titles.bulkCreateEvents = function (title_id, data) {
|
|
12105
|
+
return Requests.processRoute(TitlesRoute.routes.bulkCreateEvents, data, { title_id: title_id });
|
|
12106
|
+
};
|
|
12107
|
+
/**
|
|
12108
|
+
* Get a summary of actions per step.
|
|
12109
|
+
*/
|
|
12110
|
+
Titles.eventSummary = function (title_id, params) {
|
|
12111
|
+
return Requests.processRoute(TitlesRoute.routes.eventSummary, {}, { title_id: title_id }, params);
|
|
12112
|
+
};
|
|
12113
|
+
/**
|
|
12114
|
+
* Get all unique step and action keys used in this title.
|
|
12115
|
+
*/
|
|
12116
|
+
Titles.eventDistinctKeys = function (title_id) {
|
|
12117
|
+
return Requests.processRoute(TitlesRoute.routes.eventDistinctKeys, {}, { title_id: title_id });
|
|
12118
|
+
};
|
|
12119
|
+
/**
|
|
12120
|
+
* List all saved behavioral funnel definitions.
|
|
12121
|
+
*/
|
|
12122
|
+
Titles.listBehavioralFunnels = function (title_id) {
|
|
12123
|
+
return Requests.processRoute(TitlesRoute.routes.listBehavioralFunnels, {}, { title_id: title_id });
|
|
12124
|
+
};
|
|
12125
|
+
/**
|
|
12126
|
+
* Create and save a new behavioral funnel definition.
|
|
12127
|
+
* @param data { name: string, description?: string, steps: string[] }
|
|
12128
|
+
*/
|
|
12129
|
+
Titles.createBehavioralFunnel = function (title_id, data) {
|
|
12130
|
+
return Requests.processRoute(TitlesRoute.routes.createBehavioralFunnel, data, { title_id: title_id });
|
|
12131
|
+
};
|
|
12132
|
+
/**
|
|
12133
|
+
* Generate the drop-off report for a specific behavioral funnel.
|
|
12134
|
+
* @param params { start_date?: string, end_date?: string }
|
|
12135
|
+
*/
|
|
12136
|
+
Titles.behavioralFunnelReport = function (title_id, funnel_id, params) {
|
|
12137
|
+
return Requests.processRoute(TitlesRoute.routes.behavioralFunnelReport, {}, { title_id: title_id, funnel_id: funnel_id }, params);
|
|
12138
|
+
};
|
|
12139
|
+
/**
|
|
12140
|
+
* Delete a saved behavioral funnel definition.
|
|
12141
|
+
*/
|
|
12142
|
+
Titles.deleteBehavioralFunnel = function (title_id, funnel_id) {
|
|
12143
|
+
return Requests.processRoute(TitlesRoute.routes.deleteBehavioralFunnel, {}, { title_id: title_id, funnel_id: funnel_id });
|
|
12144
|
+
};
|
|
12059
12145
|
return Titles;
|
|
12060
12146
|
}());
|
|
12061
12147
|
|
|
@@ -13933,6 +14019,7 @@ var MediaRoute = /** @class */ (function () {
|
|
|
13933
14019
|
removeBackgroundAI: { url: '/media/remove-background-ai', method: HTTP_METHODS.POST },
|
|
13934
14020
|
createLibraryLogo: { url: '/media/create-library-logo', method: HTTP_METHODS.POST },
|
|
13935
14021
|
validateScreenshot: { url: '/media/validate-screenshot', method: HTTP_METHODS.POST },
|
|
14022
|
+
uploadTikTokMusic: { url: '/media/tiktok/music', method: HTTP_METHODS.POST },
|
|
13936
14023
|
};
|
|
13937
14024
|
return MediaRoute;
|
|
13938
14025
|
}());
|
|
@@ -14153,6 +14240,16 @@ var Media = /** @class */ (function () {
|
|
|
14153
14240
|
content: 'Logo only, should be legible against any background'
|
|
14154
14241
|
};
|
|
14155
14242
|
};
|
|
14243
|
+
/**
|
|
14244
|
+
* Upload an audio file to TikTok's asset library via our Media controller.
|
|
14245
|
+
*
|
|
14246
|
+
* @param file The audio file (mp3).
|
|
14247
|
+
* @param scheduler_id The ID of the scheduler to provide OAuth context.
|
|
14248
|
+
*/
|
|
14249
|
+
Media.uploadTikTokMusic = function (file, scheduler_id) {
|
|
14250
|
+
// We use the raw URL here as it's a specialized upload path
|
|
14251
|
+
return Requests.uploadFile('/media/tiktok/music', 'audio', file, { scheduler_id: scheduler_id });
|
|
14252
|
+
};
|
|
14156
14253
|
return Media;
|
|
14157
14254
|
}());
|
|
14158
14255
|
|
|
@@ -14273,6 +14370,8 @@ var SchedulerRoute = /** @class */ (function () {
|
|
|
14273
14370
|
url: '/schedulers/{scheduler_id}/generateHashtags',
|
|
14274
14371
|
method: HTTP_METHODS.POST
|
|
14275
14372
|
},
|
|
14373
|
+
getTikTokHashtags: { url: '/schedulers/{scheduler_id}/tiktok/discovery/hashtags', method: HTTP_METHODS.GET },
|
|
14374
|
+
getTikTokMusic: { url: '/schedulers/{scheduler_id}/tiktok/discovery/music', method: HTTP_METHODS.GET },
|
|
14276
14375
|
};
|
|
14277
14376
|
return SchedulerRoute;
|
|
14278
14377
|
}());
|
|
@@ -14963,6 +15062,23 @@ var Scheduler = /** @class */ (function () {
|
|
|
14963
15062
|
Scheduler.generateHashtags = function (scheduler_id, data, params) {
|
|
14964
15063
|
return Requests.processRoute(SchedulerRoute.routes.generateHashtags, data, { scheduler_id: scheduler_id }, params);
|
|
14965
15064
|
};
|
|
15065
|
+
/**
|
|
15066
|
+
* Get TikTok hashtag suggestions based on a keyword.
|
|
15067
|
+
*
|
|
15068
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
15069
|
+
* @param params { keyword: string }
|
|
15070
|
+
*/
|
|
15071
|
+
Scheduler.getTikTokHashtags = function (scheduler_id, params) {
|
|
15072
|
+
return Requests.processRoute(SchedulerRoute.routes.getTikTokHashtags, {}, { scheduler_id: scheduler_id }, params);
|
|
15073
|
+
};
|
|
15074
|
+
/**
|
|
15075
|
+
* Get trending commercial music from TikTok's library.
|
|
15076
|
+
*
|
|
15077
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
15078
|
+
*/
|
|
15079
|
+
Scheduler.getTikTokMusic = function (scheduler_id, params) {
|
|
15080
|
+
return Requests.processRoute(SchedulerRoute.routes.getTikTokMusic, {}, { scheduler_id: scheduler_id }, params);
|
|
15081
|
+
};
|
|
14966
15082
|
return Scheduler;
|
|
14967
15083
|
}());
|
|
14968
15084
|
|