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 CHANGED
@@ -24144,6 +24144,7 @@ var SocialPostsRoute = /** @class */ (function () {
24144
24144
  getConversation: { url: '/social/conversations/{conversation_id}', method: HTTP_METHODS.GET },
24145
24145
  getConversationMessages: { url: '/social/conversations/{conversation_id}/messages', method: HTTP_METHODS.GET },
24146
24146
  sendSocialMessage: { url: '/social/messages', method: HTTP_METHODS.POST },
24147
+ replyViaDm: { url: '/socialposts/comments/{comment_id}/reply-via-dm', method: HTTP_METHODS.POST },
24147
24148
  };
24148
24149
  return SocialPostsRoute;
24149
24150
  }());
@@ -24531,6 +24532,15 @@ var SocialPosts = /** @class */ (function () {
24531
24532
  SocialPosts.sendSocialMessage = function (data) {
24532
24533
  return Requests.processRoute(SocialPostsRoute.routes.sendSocialMessage, data);
24533
24534
  };
24535
+ /**
24536
+ * Reply to a high-intent TikTok comment via Direct Message.
24537
+ *
24538
+ * @param comment_id The ID of the comment.
24539
+ * @param data { message: string }
24540
+ */
24541
+ SocialPosts.replyViaDm = function (comment_id, data) {
24542
+ return Requests.processRoute(SocialPostsRoute.routes.replyViaDm, data, { comment_id: comment_id });
24543
+ };
24534
24544
  return SocialPosts;
24535
24545
  }());
24536
24546
 
@@ -24685,6 +24695,18 @@ var TitlesRoute = /** @class */ (function () {
24685
24695
  generateLandingPageAiContent: { url: '/landing-pages/{landing_page_id}/generate-ai-content', method: HTTP_METHODS.POST },
24686
24696
  saveLandingPageTranslation: { url: '/landing-pages/{landing_page_id}/translations', method: HTTP_METHODS.POST },
24687
24697
  cohorts: { url: '/titles/{title_id}/installs/cohorts', method: HTTP_METHODS.GET },
24698
+ geoReport: { url: '/titles/{title_id}/installs/geo-report', method: HTTP_METHODS.GET },
24699
+ // Game Events (Behavioral Telemetry)
24700
+ listEvents: { url: '/titles/{title_id}/events', method: HTTP_METHODS.GET },
24701
+ createEvent: { url: '/titles/{title_id}/events', method: HTTP_METHODS.POST },
24702
+ bulkCreateEvents: { url: '/titles/{title_id}/events/bulk', method: HTTP_METHODS.POST },
24703
+ eventSummary: { url: '/titles/{title_id}/events/summary', method: HTTP_METHODS.GET },
24704
+ eventDistinctKeys: { url: '/titles/{title_id}/events/distinct-keys', method: HTTP_METHODS.GET },
24705
+ // Behavioral Funnels
24706
+ listBehavioralFunnels: { url: '/titles/{title_id}/behavioral-funnels', method: HTTP_METHODS.GET },
24707
+ createBehavioralFunnel: { url: '/titles/{title_id}/behavioral-funnels', method: HTTP_METHODS.POST },
24708
+ behavioralFunnelReport: { url: '/titles/{title_id}/behavioral-funnels/{funnel_id}/report', method: HTTP_METHODS.GET },
24709
+ deleteBehavioralFunnel: { url: '/titles/{title_id}/behavioral-funnels/{funnel_id}', method: HTTP_METHODS.DELETE },
24688
24710
  };
24689
24711
  return TitlesRoute;
24690
24712
  }());
@@ -25240,6 +25262,70 @@ var Titles = /** @class */ (function () {
25240
25262
  Titles.getAdConversionEventsReport = function (title_id, params) {
25241
25263
  return Requests.processRoute(TitlesRoute.routes.getAdConversionEventsReport, {}, { title_id: title_id }, params);
25242
25264
  };
25265
+ /**
25266
+ * Get a geographical distribution report for installs.
25267
+ * @param params e.g., { group_by: 'country_code', start_date: '2025-01-01' }
25268
+ */
25269
+ Titles.geoReport = function (title_id, params) {
25270
+ return Requests.processRoute(TitlesRoute.routes.geoReport, {}, { title_id: title_id }, params);
25271
+ };
25272
+ /**
25273
+ * List and filter raw game events (telemetry).
25274
+ */
25275
+ Titles.listEvents = function (title_id, params) {
25276
+ return Requests.processRoute(TitlesRoute.routes.listEvents, {}, { title_id: title_id }, params);
25277
+ };
25278
+ /**
25279
+ * Record a single in-game action.
25280
+ */
25281
+ Titles.createEvent = function (title_id, data) {
25282
+ return Requests.processRoute(TitlesRoute.routes.createEvent, data, { title_id: title_id });
25283
+ };
25284
+ /**
25285
+ * Record multiple events in one request (Batching).
25286
+ * @param data { events: Array<{game_install_id, step_key, action_key, metadata?}> }
25287
+ */
25288
+ Titles.bulkCreateEvents = function (title_id, data) {
25289
+ return Requests.processRoute(TitlesRoute.routes.bulkCreateEvents, data, { title_id: title_id });
25290
+ };
25291
+ /**
25292
+ * Get a summary of actions per step.
25293
+ */
25294
+ Titles.eventSummary = function (title_id, params) {
25295
+ return Requests.processRoute(TitlesRoute.routes.eventSummary, {}, { title_id: title_id }, params);
25296
+ };
25297
+ /**
25298
+ * Get all unique step and action keys used in this title.
25299
+ */
25300
+ Titles.eventDistinctKeys = function (title_id) {
25301
+ return Requests.processRoute(TitlesRoute.routes.eventDistinctKeys, {}, { title_id: title_id });
25302
+ };
25303
+ /**
25304
+ * List all saved behavioral funnel definitions.
25305
+ */
25306
+ Titles.listBehavioralFunnels = function (title_id) {
25307
+ return Requests.processRoute(TitlesRoute.routes.listBehavioralFunnels, {}, { title_id: title_id });
25308
+ };
25309
+ /**
25310
+ * Create and save a new behavioral funnel definition.
25311
+ * @param data { name: string, description?: string, steps: string[] }
25312
+ */
25313
+ Titles.createBehavioralFunnel = function (title_id, data) {
25314
+ return Requests.processRoute(TitlesRoute.routes.createBehavioralFunnel, data, { title_id: title_id });
25315
+ };
25316
+ /**
25317
+ * Generate the drop-off report for a specific behavioral funnel.
25318
+ * @param params { start_date?: string, end_date?: string }
25319
+ */
25320
+ Titles.behavioralFunnelReport = function (title_id, funnel_id, params) {
25321
+ return Requests.processRoute(TitlesRoute.routes.behavioralFunnelReport, {}, { title_id: title_id, funnel_id: funnel_id }, params);
25322
+ };
25323
+ /**
25324
+ * Delete a saved behavioral funnel definition.
25325
+ */
25326
+ Titles.deleteBehavioralFunnel = function (title_id, funnel_id) {
25327
+ return Requests.processRoute(TitlesRoute.routes.deleteBehavioralFunnel, {}, { title_id: title_id, funnel_id: funnel_id });
25328
+ };
25243
25329
  return Titles;
25244
25330
  }());
25245
25331
 
@@ -27117,6 +27203,7 @@ var MediaRoute = /** @class */ (function () {
27117
27203
  removeBackgroundAI: { url: '/media/remove-background-ai', method: HTTP_METHODS.POST },
27118
27204
  createLibraryLogo: { url: '/media/create-library-logo', method: HTTP_METHODS.POST },
27119
27205
  validateScreenshot: { url: '/media/validate-screenshot', method: HTTP_METHODS.POST },
27206
+ uploadTikTokMusic: { url: '/media/tiktok/music', method: HTTP_METHODS.POST },
27120
27207
  };
27121
27208
  return MediaRoute;
27122
27209
  }());
@@ -27337,6 +27424,16 @@ var Media = /** @class */ (function () {
27337
27424
  content: 'Logo only, should be legible against any background'
27338
27425
  };
27339
27426
  };
27427
+ /**
27428
+ * Upload an audio file to TikTok's asset library via our Media controller.
27429
+ *
27430
+ * @param file The audio file (mp3).
27431
+ * @param scheduler_id The ID of the scheduler to provide OAuth context.
27432
+ */
27433
+ Media.uploadTikTokMusic = function (file, scheduler_id) {
27434
+ // We use the raw URL here as it's a specialized upload path
27435
+ return Requests.uploadFile('/media/tiktok/music', 'audio', file, { scheduler_id: scheduler_id });
27436
+ };
27340
27437
  return Media;
27341
27438
  }());
27342
27439
 
@@ -27457,6 +27554,8 @@ var SchedulerRoute = /** @class */ (function () {
27457
27554
  url: '/schedulers/{scheduler_id}/generateHashtags',
27458
27555
  method: HTTP_METHODS.POST
27459
27556
  },
27557
+ getTikTokHashtags: { url: '/schedulers/{scheduler_id}/tiktok/discovery/hashtags', method: HTTP_METHODS.GET },
27558
+ getTikTokMusic: { url: '/schedulers/{scheduler_id}/tiktok/discovery/music', method: HTTP_METHODS.GET },
27460
27559
  };
27461
27560
  return SchedulerRoute;
27462
27561
  }());
@@ -28147,6 +28246,23 @@ var Scheduler = /** @class */ (function () {
28147
28246
  Scheduler.generateHashtags = function (scheduler_id, data, params) {
28148
28247
  return Requests.processRoute(SchedulerRoute.routes.generateHashtags, data, { scheduler_id: scheduler_id }, params);
28149
28248
  };
28249
+ /**
28250
+ * Get TikTok hashtag suggestions based on a keyword.
28251
+ *
28252
+ * @param scheduler_id The ID of the promotion schedule.
28253
+ * @param params { keyword: string }
28254
+ */
28255
+ Scheduler.getTikTokHashtags = function (scheduler_id, params) {
28256
+ return Requests.processRoute(SchedulerRoute.routes.getTikTokHashtags, {}, { scheduler_id: scheduler_id }, params);
28257
+ };
28258
+ /**
28259
+ * Get trending commercial music from TikTok's library.
28260
+ *
28261
+ * @param scheduler_id The ID of the promotion schedule.
28262
+ */
28263
+ Scheduler.getTikTokMusic = function (scheduler_id, params) {
28264
+ return Requests.processRoute(SchedulerRoute.routes.getTikTokMusic, {}, { scheduler_id: scheduler_id }, params);
28265
+ };
28150
28266
  return Scheduler;
28151
28267
  }());
28152
28268