glitch-javascript-sdk 2.4.7 → 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
 
@@ -27193,6 +27203,7 @@ var MediaRoute = /** @class */ (function () {
27193
27203
  removeBackgroundAI: { url: '/media/remove-background-ai', method: HTTP_METHODS.POST },
27194
27204
  createLibraryLogo: { url: '/media/create-library-logo', method: HTTP_METHODS.POST },
27195
27205
  validateScreenshot: { url: '/media/validate-screenshot', method: HTTP_METHODS.POST },
27206
+ uploadTikTokMusic: { url: '/media/tiktok/music', method: HTTP_METHODS.POST },
27196
27207
  };
27197
27208
  return MediaRoute;
27198
27209
  }());
@@ -27413,6 +27424,16 @@ var Media = /** @class */ (function () {
27413
27424
  content: 'Logo only, should be legible against any background'
27414
27425
  };
27415
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
+ };
27416
27437
  return Media;
27417
27438
  }());
27418
27439
 
@@ -27533,6 +27554,8 @@ var SchedulerRoute = /** @class */ (function () {
27533
27554
  url: '/schedulers/{scheduler_id}/generateHashtags',
27534
27555
  method: HTTP_METHODS.POST
27535
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 },
27536
27559
  };
27537
27560
  return SchedulerRoute;
27538
27561
  }());
@@ -28223,6 +28246,23 @@ var Scheduler = /** @class */ (function () {
28223
28246
  Scheduler.generateHashtags = function (scheduler_id, data, params) {
28224
28247
  return Requests.processRoute(SchedulerRoute.routes.generateHashtags, data, { scheduler_id: scheduler_id }, params);
28225
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
+ };
28226
28266
  return Scheduler;
28227
28267
  }());
28228
28268