glitch-javascript-sdk 3.1.2 → 3.1.3

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.
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.3",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
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