glitch-javascript-sdk 3.1.2 → 3.1.4

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/index.d.ts CHANGED
@@ -2315,14 +2315,24 @@ declare class Users {
2315
2315
  static suggestSmartTrim<T>(id: string): AxiosPromise<Response<T>>;
2316
2316
  /**
2317
2317
  * Share a library item to social media as User Generated Content (UGC).
2318
+ * This uses the player media share route, not the developer/scheduler post route.
2318
2319
  *
2319
2320
  * @param id The UUID of the UserMedia record.
2320
- * @param data { platform: string, title?: string, content: string }
2321
+ * @param data Player post payload, including platform/channel/schedule options.
2321
2322
  */
2322
2323
  static shareMedia<T>(id: string, data: {
2323
2324
  platform: string;
2325
+ social_platform?: string;
2324
2326
  title?: string;
2325
2327
  content: string;
2328
+ status?: 'pending' | 'scheduled' | string;
2329
+ scheduled_at?: string;
2330
+ main_channel_id?: string;
2331
+ sub_channel_id?: string;
2332
+ token?: string;
2333
+ track_links?: boolean;
2334
+ media_type?: string;
2335
+ [key: string]: any;
2326
2336
  }): AxiosPromise<Response<T>>;
2327
2337
  /**
2328
2338
  * List all gifts purchased by the current user.
@@ -4599,10 +4609,12 @@ declare class Titles {
4599
4609
  * @param params
4600
4610
  * - window: number (hours, default 24)
4601
4611
  * - limit: number (default 10)
4612
+ * - is_nsfw: 1 for adult titles only, 0 for safe titles only
4602
4613
  */
4603
4614
  static getCommunityActivity<T>(params?: {
4604
4615
  window?: number;
4605
4616
  limit?: number;
4617
+ is_nsfw?: number | boolean;
4606
4618
  }): AxiosPromise<Response<T>>;
4607
4619
  /**
4608
4620
  * Get games trending on social media.
@@ -4611,11 +4623,13 @@ declare class Titles {
4611
4623
  * - type: 'influencer' (campaigns) or 'organic' (non-paid)
4612
4624
  * - window: number (hours, default 168)
4613
4625
  * - limit: number (default 10)
4626
+ * - is_nsfw: 1 for adult titles only, 0 for safe titles only
4614
4627
  */
4615
4628
  static getSocialTrending<T>(params: {
4616
4629
  type: 'influencer' | 'organic';
4617
4630
  window?: number;
4618
4631
  limit?: number;
4632
+ is_nsfw?: number | boolean;
4619
4633
  }): AxiosPromise<Response<T>>;
4620
4634
  /**
4621
4635
  * Get a personalized discovery queue of games.
@@ -4623,10 +4637,12 @@ declare class Titles {
4623
4637
  * @param params
4624
4638
  * - limit: number (default 12)
4625
4639
  * - device_id: string (highly recommended for guest tracking)
4640
+ * - is_nsfw: 1 for adult titles only, 0 for safe titles only
4626
4641
  */
4627
4642
  static getDiscoveryQueue<T>(params?: {
4628
4643
  limit?: number;
4629
4644
  device_id?: string;
4645
+ is_nsfw?: number | boolean;
4630
4646
  }): AxiosPromise<Response<T>>;
4631
4647
  /**
4632
4648
  * Get a curated, playable feed for the Swipe interface.
@@ -4638,6 +4654,7 @@ declare class Titles {
4638
4654
  * - seed?: number (For consistent randomization)
4639
4655
  * - genres?: string[] (Filter by genre names)
4640
4656
  * - models?: string[] (premium, rental, subscription, free)
4657
+ * - is_nsfw?: 1 | 0 (1 for adult titles only, 0 for safe titles only)
4641
4658
  * - excluded_ids?: string[] (UUIDs to skip)
4642
4659
  * - page?: number
4643
4660
  * - per_page?: number
@@ -7064,6 +7081,11 @@ declare class Scheduler {
7064
7081
  * @param params { is_personalized: boolean }
7065
7082
  */
7066
7083
  static getTikTokTrendingKeywords<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
7084
+ /**
7085
+ * Get recommended search keywords on TikTok.
7086
+ * @param params { is_personalized: boolean }
7087
+ */
7088
+ static getTikTokRecommendedKeywords<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
7067
7089
  }
7068
7090
 
7069
7091
  declare class Funnel {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "3.1.2",
3
+ "version": "3.1.4",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -882,6 +882,14 @@ class Scheduler {
882
882
  return Requests.processRoute(SchedulerRoute.routes.getTikTokTrendingKeywords, {}, { scheduler_id }, params);
883
883
  }
884
884
 
885
+ /**
886
+ * Get recommended search keywords on TikTok.
887
+ * @param params { is_personalized: boolean }
888
+ */
889
+ public static getTikTokRecommendedKeywords<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
890
+ return Requests.processRoute(SchedulerRoute.routes.getTikTokRecommendedKeywords, {}, { scheduler_id }, params);
891
+ }
892
+
885
893
  }
886
894
 
887
895
  export default Scheduler;
package/src/api/Titles.ts CHANGED
@@ -1226,8 +1226,9 @@ class Titles {
1226
1226
  * @param params
1227
1227
  * - window: number (hours, default 24)
1228
1228
  * - limit: number (default 10)
1229
+ * - is_nsfw: 1 for adult titles only, 0 for safe titles only
1229
1230
  */
1230
- public static getCommunityActivity<T>(params?: { window?: number, limit?: number }): AxiosPromise<Response<T>> {
1231
+ public static getCommunityActivity<T>(params?: { window?: number, limit?: number, is_nsfw?: number | boolean }): AxiosPromise<Response<T>> {
1231
1232
  return Requests.processRoute(TitlesRoute.routes.communityActivity, {}, {}, params);
1232
1233
  }
1233
1234
 
@@ -1238,8 +1239,9 @@ class Titles {
1238
1239
  * - type: 'influencer' (campaigns) or 'organic' (non-paid)
1239
1240
  * - window: number (hours, default 168)
1240
1241
  * - limit: number (default 10)
1242
+ * - is_nsfw: 1 for adult titles only, 0 for safe titles only
1241
1243
  */
1242
- public static getSocialTrending<T>(params: { type: 'influencer' | 'organic', window?: number, limit?: number }): AxiosPromise<Response<T>> {
1244
+ public static getSocialTrending<T>(params: { type: 'influencer' | 'organic', window?: number, limit?: number, is_nsfw?: number | boolean }): AxiosPromise<Response<T>> {
1243
1245
  return Requests.processRoute(TitlesRoute.routes.socialTrending, {}, {}, params);
1244
1246
  }
1245
1247
 
@@ -1249,8 +1251,9 @@ class Titles {
1249
1251
  * @param params
1250
1252
  * - limit: number (default 12)
1251
1253
  * - device_id: string (highly recommended for guest tracking)
1254
+ * - is_nsfw: 1 for adult titles only, 0 for safe titles only
1252
1255
  */
1253
- public static getDiscoveryQueue<T>(params?: { limit?: number, device_id?: string }): AxiosPromise<Response<T>> {
1256
+ public static getDiscoveryQueue<T>(params?: { limit?: number, device_id?: string, is_nsfw?: number | boolean }): AxiosPromise<Response<T>> {
1254
1257
  return Requests.processRoute(TitlesRoute.routes.discoveryQueue, {}, {}, params);
1255
1258
  }
1256
1259
 
@@ -1264,6 +1267,7 @@ class Titles {
1264
1267
  * - seed?: number (For consistent randomization)
1265
1268
  * - genres?: string[] (Filter by genre names)
1266
1269
  * - models?: string[] (premium, rental, subscription, free)
1270
+ * - is_nsfw?: 1 | 0 (1 for adult titles only, 0 for safe titles only)
1267
1271
  * - excluded_ids?: string[] (UUIDs to skip)
1268
1272
  * - page?: number
1269
1273
  * - per_page?: number
@@ -1316,4 +1320,4 @@ class Titles {
1316
1320
  }
1317
1321
  }
1318
1322
 
1319
- export default Titles;
1323
+ export default Titles;
package/src/api/Users.ts CHANGED
@@ -651,11 +651,25 @@ class Users {
651
651
 
652
652
  /**
653
653
  * Share a library item to social media as User Generated Content (UGC).
654
- *
654
+ * This uses the player media share route, not the developer/scheduler post route.
655
+ *
655
656
  * @param id The UUID of the UserMedia record.
656
- * @param data { platform: string, title?: string, content: string }
657
- */
658
- public static shareMedia<T>(id: string, data: { platform: string, title?: string, content: string }): AxiosPromise<Response<T>> {
657
+ * @param data Player post payload, including platform/channel/schedule options.
658
+ */
659
+ public static shareMedia<T>(id: string, data: {
660
+ platform: string,
661
+ social_platform?: string,
662
+ title?: string,
663
+ content: string,
664
+ status?: 'pending' | 'scheduled' | string,
665
+ scheduled_at?: string,
666
+ main_channel_id?: string,
667
+ sub_channel_id?: string,
668
+ token?: string,
669
+ track_links?: boolean,
670
+ media_type?: string,
671
+ [key: string]: any
672
+ }): AxiosPromise<Response<T>> {
659
673
  return Requests.processRoute(UserRoutes.routes.shareMedia, data, { id });
660
674
  }
661
675
 
@@ -137,6 +137,7 @@ class SchedulerRoute {
137
137
  getTikTokTrendingHashtags: { url: '/schedulers/{scheduler_id}/tiktok/discovery/hashtags/trending', method: HTTP_METHODS.GET },
138
138
  getTikTokHashtagDetail: { url: '/schedulers/{scheduler_id}/tiktok/discovery/hashtags/detail', method: HTTP_METHODS.GET },
139
139
  getTikTokTrendingKeywords: { url: '/schedulers/{scheduler_id}/tiktok/discovery/search-keywords', method: HTTP_METHODS.GET },
140
+ getTikTokRecommendedKeywords: { url: '/schedulers/{scheduler_id}/tiktok/discovery/search-keywords/recommend', method: HTTP_METHODS.GET },
140
141
 
141
142
  };
142
143
  }