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.
@@ -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/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
 
@@ -14009,6 +14019,7 @@ var MediaRoute = /** @class */ (function () {
14009
14019
  removeBackgroundAI: { url: '/media/remove-background-ai', method: HTTP_METHODS.POST },
14010
14020
  createLibraryLogo: { url: '/media/create-library-logo', method: HTTP_METHODS.POST },
14011
14021
  validateScreenshot: { url: '/media/validate-screenshot', method: HTTP_METHODS.POST },
14022
+ uploadTikTokMusic: { url: '/media/tiktok/music', method: HTTP_METHODS.POST },
14012
14023
  };
14013
14024
  return MediaRoute;
14014
14025
  }());
@@ -14229,6 +14240,16 @@ var Media = /** @class */ (function () {
14229
14240
  content: 'Logo only, should be legible against any background'
14230
14241
  };
14231
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
+ };
14232
14253
  return Media;
14233
14254
  }());
14234
14255
 
@@ -14349,6 +14370,8 @@ var SchedulerRoute = /** @class */ (function () {
14349
14370
  url: '/schedulers/{scheduler_id}/generateHashtags',
14350
14371
  method: HTTP_METHODS.POST
14351
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 },
14352
14375
  };
14353
14376
  return SchedulerRoute;
14354
14377
  }());
@@ -15039,6 +15062,23 @@ var Scheduler = /** @class */ (function () {
15039
15062
  Scheduler.generateHashtags = function (scheduler_id, data, params) {
15040
15063
  return Requests.processRoute(SchedulerRoute.routes.generateHashtags, data, { scheduler_id: scheduler_id }, params);
15041
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
+ };
15042
15082
  return Scheduler;
15043
15083
  }());
15044
15084