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/index.d.ts
CHANGED
|
@@ -3686,6 +3686,15 @@ declare class SocialPosts {
|
|
|
3686
3686
|
* @returns promise
|
|
3687
3687
|
*/
|
|
3688
3688
|
static sendSocialMessage<T>(data: object): AxiosPromise<Response<T>>;
|
|
3689
|
+
/**
|
|
3690
|
+
* Reply to a high-intent TikTok comment via Direct Message.
|
|
3691
|
+
*
|
|
3692
|
+
* @param comment_id The ID of the comment.
|
|
3693
|
+
* @param data { message: string }
|
|
3694
|
+
*/
|
|
3695
|
+
static replyViaDm<T>(comment_id: string, data: {
|
|
3696
|
+
message: string;
|
|
3697
|
+
}): AxiosPromise<Response<T>>;
|
|
3689
3698
|
}
|
|
3690
3699
|
|
|
3691
3700
|
declare class Titles {
|
|
@@ -4117,6 +4126,52 @@ declare class Titles {
|
|
|
4117
4126
|
group_by: 'platform' | 'status' | 'event_type';
|
|
4118
4127
|
unique_clicks?: boolean;
|
|
4119
4128
|
}): AxiosPromise<Response<T>>;
|
|
4129
|
+
/**
|
|
4130
|
+
* Get a geographical distribution report for installs.
|
|
4131
|
+
* @param params e.g., { group_by: 'country_code', start_date: '2025-01-01' }
|
|
4132
|
+
*/
|
|
4133
|
+
static geoReport<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4134
|
+
/**
|
|
4135
|
+
* List and filter raw game events (telemetry).
|
|
4136
|
+
*/
|
|
4137
|
+
static listEvents<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4138
|
+
/**
|
|
4139
|
+
* Record a single in-game action.
|
|
4140
|
+
*/
|
|
4141
|
+
static createEvent<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
|
|
4142
|
+
/**
|
|
4143
|
+
* Record multiple events in one request (Batching).
|
|
4144
|
+
* @param data { events: Array<{game_install_id, step_key, action_key, metadata?}> }
|
|
4145
|
+
*/
|
|
4146
|
+
static bulkCreateEvents<T>(title_id: string, data: {
|
|
4147
|
+
events: object[];
|
|
4148
|
+
}): AxiosPromise<Response<T>>;
|
|
4149
|
+
/**
|
|
4150
|
+
* Get a summary of actions per step.
|
|
4151
|
+
*/
|
|
4152
|
+
static eventSummary<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4153
|
+
/**
|
|
4154
|
+
* Get all unique step and action keys used in this title.
|
|
4155
|
+
*/
|
|
4156
|
+
static eventDistinctKeys<T>(title_id: string): AxiosPromise<Response<T>>;
|
|
4157
|
+
/**
|
|
4158
|
+
* List all saved behavioral funnel definitions.
|
|
4159
|
+
*/
|
|
4160
|
+
static listBehavioralFunnels<T>(title_id: string): AxiosPromise<Response<T>>;
|
|
4161
|
+
/**
|
|
4162
|
+
* Create and save a new behavioral funnel definition.
|
|
4163
|
+
* @param data { name: string, description?: string, steps: string[] }
|
|
4164
|
+
*/
|
|
4165
|
+
static createBehavioralFunnel<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
|
|
4166
|
+
/**
|
|
4167
|
+
* Generate the drop-off report for a specific behavioral funnel.
|
|
4168
|
+
* @param params { start_date?: string, end_date?: string }
|
|
4169
|
+
*/
|
|
4170
|
+
static behavioralFunnelReport<T>(title_id: string, funnel_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4171
|
+
/**
|
|
4172
|
+
* Delete a saved behavioral funnel definition.
|
|
4173
|
+
*/
|
|
4174
|
+
static deleteBehavioralFunnel<T>(title_id: string, funnel_id: string): AxiosPromise<Response<T>>;
|
|
4120
4175
|
}
|
|
4121
4176
|
|
|
4122
4177
|
declare class Campaigns {
|
|
@@ -5645,6 +5700,13 @@ declare class Media {
|
|
|
5645
5700
|
requirement: string;
|
|
5646
5701
|
content: string;
|
|
5647
5702
|
};
|
|
5703
|
+
/**
|
|
5704
|
+
* Upload an audio file to TikTok's asset library via our Media controller.
|
|
5705
|
+
*
|
|
5706
|
+
* @param file The audio file (mp3).
|
|
5707
|
+
* @param scheduler_id The ID of the scheduler to provide OAuth context.
|
|
5708
|
+
*/
|
|
5709
|
+
static uploadTikTokMusic<T>(file: File, scheduler_id: string): AxiosPromise<Response<T>>;
|
|
5648
5710
|
}
|
|
5649
5711
|
|
|
5650
5712
|
declare class Scheduler {
|
|
@@ -6193,6 +6255,21 @@ declare class Scheduler {
|
|
|
6193
6255
|
* @returns promise
|
|
6194
6256
|
*/
|
|
6195
6257
|
static generateHashtags<T>(scheduler_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6258
|
+
/**
|
|
6259
|
+
* Get TikTok hashtag suggestions based on a keyword.
|
|
6260
|
+
*
|
|
6261
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
6262
|
+
* @param params { keyword: string }
|
|
6263
|
+
*/
|
|
6264
|
+
static getTikTokHashtags<T>(scheduler_id: string, params: {
|
|
6265
|
+
keyword: string;
|
|
6266
|
+
}): AxiosPromise<Response<T>>;
|
|
6267
|
+
/**
|
|
6268
|
+
* Get trending commercial music from TikTok's library.
|
|
6269
|
+
*
|
|
6270
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
6271
|
+
*/
|
|
6272
|
+
static getTikTokMusic<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6196
6273
|
}
|
|
6197
6274
|
|
|
6198
6275
|
declare class Funnel {
|
package/package.json
CHANGED
package/src/api/Media.ts
CHANGED
|
@@ -331,6 +331,17 @@ class Media {
|
|
|
331
331
|
content: 'Logo only, should be legible against any background'
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Upload an audio file to TikTok's asset library via our Media controller.
|
|
337
|
+
*
|
|
338
|
+
* @param file The audio file (mp3).
|
|
339
|
+
* @param scheduler_id The ID of the scheduler to provide OAuth context.
|
|
340
|
+
*/
|
|
341
|
+
public static uploadTikTokMusic<T>(file: File, scheduler_id: string): AxiosPromise<Response<T>> {
|
|
342
|
+
// We use the raw URL here as it's a specialized upload path
|
|
343
|
+
return Requests.uploadFile('/media/tiktok/music', 'audio', file, { scheduler_id });
|
|
344
|
+
}
|
|
334
345
|
}
|
|
335
346
|
|
|
336
347
|
export default Media;
|
package/src/api/Scheduler.ts
CHANGED
|
@@ -839,6 +839,25 @@ class Scheduler {
|
|
|
839
839
|
return Requests.processRoute(SchedulerRoute.routes.generateHashtags, data, { scheduler_id }, params);
|
|
840
840
|
}
|
|
841
841
|
|
|
842
|
+
/**
|
|
843
|
+
* Get TikTok hashtag suggestions based on a keyword.
|
|
844
|
+
*
|
|
845
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
846
|
+
* @param params { keyword: string }
|
|
847
|
+
*/
|
|
848
|
+
public static getTikTokHashtags<T>(scheduler_id: string, params: { keyword: string }): AxiosPromise<Response<T>> {
|
|
849
|
+
return Requests.processRoute(SchedulerRoute.routes.getTikTokHashtags, {}, { scheduler_id }, params);
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
* Get trending commercial music from TikTok's library.
|
|
854
|
+
*
|
|
855
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
856
|
+
*/
|
|
857
|
+
public static getTikTokMusic<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
858
|
+
return Requests.processRoute(SchedulerRoute.routes.getTikTokMusic, {}, { scheduler_id }, params);
|
|
859
|
+
}
|
|
860
|
+
|
|
842
861
|
}
|
|
843
862
|
|
|
844
863
|
export default Scheduler;
|
package/src/api/SocialPosts.ts
CHANGED
|
@@ -430,6 +430,16 @@ class SocialPosts {
|
|
|
430
430
|
public static sendSocialMessage<T>(data: object): AxiosPromise<Response<T>> {
|
|
431
431
|
return Requests.processRoute(SocialPostsRoute.routes.sendSocialMessage, data);
|
|
432
432
|
}
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Reply to a high-intent TikTok comment via Direct Message.
|
|
436
|
+
*
|
|
437
|
+
* @param comment_id The ID of the comment.
|
|
438
|
+
* @param data { message: string }
|
|
439
|
+
*/
|
|
440
|
+
public static replyViaDm<T>(comment_id: string, data: { message: string }): AxiosPromise<Response<T>> {
|
|
441
|
+
return Requests.processRoute(SocialPostsRoute.routes.replyViaDm, data, { comment_id });
|
|
442
|
+
}
|
|
433
443
|
}
|
|
434
444
|
|
|
435
445
|
export default SocialPosts;
|
package/src/api/Titles.ts
CHANGED
|
@@ -858,6 +858,80 @@ class Titles {
|
|
|
858
858
|
params
|
|
859
859
|
);
|
|
860
860
|
}
|
|
861
|
+
|
|
862
|
+
/**
|
|
863
|
+
* Get a geographical distribution report for installs.
|
|
864
|
+
* @param params e.g., { group_by: 'country_code', start_date: '2025-01-01' }
|
|
865
|
+
*/
|
|
866
|
+
public static geoReport<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
867
|
+
return Requests.processRoute(TitlesRoute.routes.geoReport, {}, { title_id }, params);
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
/**
|
|
871
|
+
* List and filter raw game events (telemetry).
|
|
872
|
+
*/
|
|
873
|
+
public static listEvents<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
874
|
+
return Requests.processRoute(TitlesRoute.routes.listEvents, {}, { title_id }, params);
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
/**
|
|
878
|
+
* Record a single in-game action.
|
|
879
|
+
*/
|
|
880
|
+
public static createEvent<T>(title_id: string, data: object): AxiosPromise<Response<T>> {
|
|
881
|
+
return Requests.processRoute(TitlesRoute.routes.createEvent, data, { title_id });
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
/**
|
|
885
|
+
* Record multiple events in one request (Batching).
|
|
886
|
+
* @param data { events: Array<{game_install_id, step_key, action_key, metadata?}> }
|
|
887
|
+
*/
|
|
888
|
+
public static bulkCreateEvents<T>(title_id: string, data: { events: object[] }): AxiosPromise<Response<T>> {
|
|
889
|
+
return Requests.processRoute(TitlesRoute.routes.bulkCreateEvents, data, { title_id });
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
/**
|
|
893
|
+
* Get a summary of actions per step.
|
|
894
|
+
*/
|
|
895
|
+
public static eventSummary<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
896
|
+
return Requests.processRoute(TitlesRoute.routes.eventSummary, {}, { title_id }, params);
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
/**
|
|
900
|
+
* Get all unique step and action keys used in this title.
|
|
901
|
+
*/
|
|
902
|
+
public static eventDistinctKeys<T>(title_id: string): AxiosPromise<Response<T>> {
|
|
903
|
+
return Requests.processRoute(TitlesRoute.routes.eventDistinctKeys, {}, { title_id });
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
/**
|
|
907
|
+
* List all saved behavioral funnel definitions.
|
|
908
|
+
*/
|
|
909
|
+
public static listBehavioralFunnels<T>(title_id: string): AxiosPromise<Response<T>> {
|
|
910
|
+
return Requests.processRoute(TitlesRoute.routes.listBehavioralFunnels, {}, { title_id });
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
/**
|
|
914
|
+
* Create and save a new behavioral funnel definition.
|
|
915
|
+
* @param data { name: string, description?: string, steps: string[] }
|
|
916
|
+
*/
|
|
917
|
+
public static createBehavioralFunnel<T>(title_id: string, data: object): AxiosPromise<Response<T>> {
|
|
918
|
+
return Requests.processRoute(TitlesRoute.routes.createBehavioralFunnel, data, { title_id });
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
/**
|
|
922
|
+
* Generate the drop-off report for a specific behavioral funnel.
|
|
923
|
+
* @param params { start_date?: string, end_date?: string }
|
|
924
|
+
*/
|
|
925
|
+
public static behavioralFunnelReport<T>(title_id: string, funnel_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
926
|
+
return Requests.processRoute(TitlesRoute.routes.behavioralFunnelReport, {}, { title_id, funnel_id }, params);
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
/**
|
|
930
|
+
* Delete a saved behavioral funnel definition.
|
|
931
|
+
*/
|
|
932
|
+
public static deleteBehavioralFunnel<T>(title_id: string, funnel_id: string): AxiosPromise<Response<T>> {
|
|
933
|
+
return Requests.processRoute(TitlesRoute.routes.deleteBehavioralFunnel, {}, { title_id, funnel_id });
|
|
934
|
+
}
|
|
861
935
|
}
|
|
862
936
|
|
|
863
937
|
export default Titles;
|
package/src/routes/MediaRoute.ts
CHANGED
|
@@ -11,6 +11,7 @@ class MediaRoute {
|
|
|
11
11
|
removeBackgroundAI: { url: '/media/remove-background-ai', method: HTTP_METHODS.POST },
|
|
12
12
|
createLibraryLogo: { url: '/media/create-library-logo', method: HTTP_METHODS.POST },
|
|
13
13
|
validateScreenshot: { url: '/media/validate-screenshot', method: HTTP_METHODS.POST },
|
|
14
|
+
uploadTikTokMusic: { url: '/media/tiktok/music', method: HTTP_METHODS.POST },
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
17
|
|
|
@@ -131,6 +131,9 @@ class SchedulerRoute {
|
|
|
131
131
|
method: HTTP_METHODS.POST
|
|
132
132
|
},
|
|
133
133
|
|
|
134
|
+
getTikTokHashtags: { url: '/schedulers/{scheduler_id}/tiktok/discovery/hashtags', method: HTTP_METHODS.GET },
|
|
135
|
+
getTikTokMusic: { url: '/schedulers/{scheduler_id}/tiktok/discovery/music', method: HTTP_METHODS.GET },
|
|
136
|
+
|
|
134
137
|
};
|
|
135
138
|
}
|
|
136
139
|
|
|
@@ -47,6 +47,7 @@ class SocialPostsRoute {
|
|
|
47
47
|
getConversation: { url: '/social/conversations/{conversation_id}', method: HTTP_METHODS.GET },
|
|
48
48
|
getConversationMessages: { url: '/social/conversations/{conversation_id}/messages', method: HTTP_METHODS.GET },
|
|
49
49
|
sendSocialMessage: { url: '/social/messages', method: HTTP_METHODS.POST },
|
|
50
|
+
replyViaDm: { url: '/socialposts/comments/{comment_id}/reply-via-dm', method: HTTP_METHODS.POST },
|
|
50
51
|
|
|
51
52
|
};
|
|
52
53
|
|
|
@@ -165,6 +165,21 @@ class TitlesRoute {
|
|
|
165
165
|
|
|
166
166
|
cohorts: { url: '/titles/{title_id}/installs/cohorts', method: HTTP_METHODS.GET },
|
|
167
167
|
|
|
168
|
+
geoReport: { url: '/titles/{title_id}/installs/geo-report', method: HTTP_METHODS.GET },
|
|
169
|
+
|
|
170
|
+
// Game Events (Behavioral Telemetry)
|
|
171
|
+
listEvents: { url: '/titles/{title_id}/events', method: HTTP_METHODS.GET },
|
|
172
|
+
createEvent: { url: '/titles/{title_id}/events', method: HTTP_METHODS.POST },
|
|
173
|
+
bulkCreateEvents: { url: '/titles/{title_id}/events/bulk', method: HTTP_METHODS.POST },
|
|
174
|
+
eventSummary: { url: '/titles/{title_id}/events/summary', method: HTTP_METHODS.GET },
|
|
175
|
+
eventDistinctKeys: { url: '/titles/{title_id}/events/distinct-keys', method: HTTP_METHODS.GET },
|
|
176
|
+
|
|
177
|
+
// Behavioral Funnels
|
|
178
|
+
listBehavioralFunnels: { url: '/titles/{title_id}/behavioral-funnels', method: HTTP_METHODS.GET },
|
|
179
|
+
createBehavioralFunnel: { url: '/titles/{title_id}/behavioral-funnels', method: HTTP_METHODS.POST },
|
|
180
|
+
behavioralFunnelReport: { url: '/titles/{title_id}/behavioral-funnels/{funnel_id}/report', method: HTTP_METHODS.GET },
|
|
181
|
+
deleteBehavioralFunnel: { url: '/titles/{title_id}/behavioral-funnels/{funnel_id}', method: HTTP_METHODS.DELETE },
|
|
182
|
+
|
|
168
183
|
};
|
|
169
184
|
|
|
170
185
|
}
|