glitch-javascript-sdk 2.9.7 → 2.9.9

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.
@@ -416,5 +416,54 @@ declare class Users {
416
416
  title_id?: string;
417
417
  page?: number;
418
418
  }): AxiosPromise<Response<T>>;
419
+ /**
420
+ * List the authenticated user's media library (clips, screenshots, AI generated).
421
+ *
422
+ * @param params Optional filters: { type: 'clip'|'screenshot'|'ai_generated', title_id: string }
423
+ */
424
+ static listMedia<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
425
+ /**
426
+ * Add a Media record to the user's personal library.
427
+ *
428
+ * @param data { media_id: string, type: string, title_id?: string, label?: string, studio_metadata?: object }
429
+ */
430
+ static storeMedia<T>(data: object): AxiosPromise<Response<T>>;
431
+ /**
432
+ * Retrieve details for a specific library item.
433
+ */
434
+ static viewMedia<T>(id: string): AxiosPromise<Response<T>>;
435
+ /**
436
+ * Update a library item's label or metadata.
437
+ */
438
+ static updateMedia<T>(id: string, data: object): AxiosPromise<Response<T>>;
439
+ /**
440
+ * Remove an item from the user's library (Soft Delete).
441
+ */
442
+ static deleteMedia<T>(id: string): AxiosPromise<Response<T>>;
443
+ /**
444
+ * Apply AI transformations (Style Transfer/Upscale) to a library item.
445
+ *
446
+ * @param id The UUID of the UserMedia record.
447
+ * @param data { prompt: string, tool: 'style_transfer'|'upscale' }
448
+ */
449
+ static modifyMedia<T>(id: string, data: {
450
+ prompt: string;
451
+ tool: string;
452
+ }): AxiosPromise<Response<T>>;
453
+ /**
454
+ * Get AI-generated suggestions for the best 15-second window to trim a video.
455
+ */
456
+ static suggestSmartTrim<T>(id: string): AxiosPromise<Response<T>>;
457
+ /**
458
+ * Share a library item to social media as User Generated Content (UGC).
459
+ *
460
+ * @param id The UUID of the UserMedia record.
461
+ * @param data { platform: string, title?: string, content: string }
462
+ */
463
+ static shareMedia<T>(id: string, data: {
464
+ platform: string;
465
+ title?: string;
466
+ content: string;
467
+ }): AxiosPromise<Response<T>>;
419
468
  }
420
469
  export default Users;
package/dist/esm/index.js CHANGED
@@ -8805,6 +8805,16 @@ var UserRoutes = /** @class */ (function () {
8805
8805
  userProgressionStats: { url: '/users/{user_id}/progression/stats', method: HTTP_METHODS.GET },
8806
8806
  userProgressionAchievements: { url: '/users/{user_id}/progression/achievements', method: HTTP_METHODS.GET },
8807
8807
  userProgressionHistory: { url: '/users/{user_id}/progression/history', method: HTTP_METHODS.GET },
8808
+ // --- User Media Library (Viral Clip Studio) ---
8809
+ listMedia: { url: '/users/me/media', method: HTTP_METHODS.GET },
8810
+ storeMedia: { url: '/users/me/media', method: HTTP_METHODS.POST },
8811
+ viewMedia: { url: '/users/me/media/{id}', method: HTTP_METHODS.GET },
8812
+ updateMedia: { url: '/users/me/media/{id}', method: HTTP_METHODS.PUT },
8813
+ deleteMedia: { url: '/users/me/media/{id}', method: HTTP_METHODS.DELETE },
8814
+ // AI & Social Actions
8815
+ modifyMedia: { url: '/users/me/media/{id}/modify', method: HTTP_METHODS.POST },
8816
+ suggestSmartTrim: { url: '/users/me/media/{id}/smart-trim', method: HTTP_METHODS.GET },
8817
+ shareMedia: { url: '/users/me/media/{id}/share', method: HTTP_METHODS.POST },
8808
8818
  };
8809
8819
  return UserRoutes;
8810
8820
  }());
@@ -9313,6 +9323,64 @@ var Users = /** @class */ (function () {
9313
9323
  Users.getProgressionHistory = function (user_id, params) {
9314
9324
  return Requests.processRoute(UserRoutes.routes.userProgressionHistory, undefined, { user_id: user_id }, params);
9315
9325
  };
9326
+ /**
9327
+ * List the authenticated user's media library (clips, screenshots, AI generated).
9328
+ *
9329
+ * @param params Optional filters: { type: 'clip'|'screenshot'|'ai_generated', title_id: string }
9330
+ */
9331
+ Users.listMedia = function (params) {
9332
+ return Requests.processRoute(UserRoutes.routes.listMedia, undefined, undefined, params);
9333
+ };
9334
+ /**
9335
+ * Add a Media record to the user's personal library.
9336
+ *
9337
+ * @param data { media_id: string, type: string, title_id?: string, label?: string, studio_metadata?: object }
9338
+ */
9339
+ Users.storeMedia = function (data) {
9340
+ return Requests.processRoute(UserRoutes.routes.storeMedia, data);
9341
+ };
9342
+ /**
9343
+ * Retrieve details for a specific library item.
9344
+ */
9345
+ Users.viewMedia = function (id) {
9346
+ return Requests.processRoute(UserRoutes.routes.viewMedia, undefined, { id: id });
9347
+ };
9348
+ /**
9349
+ * Update a library item's label or metadata.
9350
+ */
9351
+ Users.updateMedia = function (id, data) {
9352
+ return Requests.processRoute(UserRoutes.routes.updateMedia, data, { id: id });
9353
+ };
9354
+ /**
9355
+ * Remove an item from the user's library (Soft Delete).
9356
+ */
9357
+ Users.deleteMedia = function (id) {
9358
+ return Requests.processRoute(UserRoutes.routes.deleteMedia, undefined, { id: id });
9359
+ };
9360
+ /**
9361
+ * Apply AI transformations (Style Transfer/Upscale) to a library item.
9362
+ *
9363
+ * @param id The UUID of the UserMedia record.
9364
+ * @param data { prompt: string, tool: 'style_transfer'|'upscale' }
9365
+ */
9366
+ Users.modifyMedia = function (id, data) {
9367
+ return Requests.processRoute(UserRoutes.routes.modifyMedia, data, { id: id });
9368
+ };
9369
+ /**
9370
+ * Get AI-generated suggestions for the best 15-second window to trim a video.
9371
+ */
9372
+ Users.suggestSmartTrim = function (id) {
9373
+ return Requests.processRoute(UserRoutes.routes.suggestSmartTrim, undefined, { id: id });
9374
+ };
9375
+ /**
9376
+ * Share a library item to social media as User Generated Content (UGC).
9377
+ *
9378
+ * @param id The UUID of the UserMedia record.
9379
+ * @param data { platform: string, title?: string, content: string }
9380
+ */
9381
+ Users.shareMedia = function (id, data) {
9382
+ return Requests.processRoute(UserRoutes.routes.shareMedia, data, { id: id });
9383
+ };
9316
9384
  return Users;
9317
9385
  }());
9318
9386
 
@@ -11835,6 +11903,7 @@ var TitlesRoute = /** @class */ (function () {
11835
11903
  progressionLeaderboardView: { url: '/titles/{title_id}/leaderboards/{api_key}', method: HTTP_METHODS.GET },
11836
11904
  communityActivity: { url: '/titles/activity/trending', method: HTTP_METHODS.GET },
11837
11905
  socialTrending: { url: '/titles/activity/social', method: HTTP_METHODS.GET },
11906
+ discoveryQueue: { url: '/titles/discovery/queue', method: HTTP_METHODS.GET },
11838
11907
  };
11839
11908
  return TitlesRoute;
11840
11909
  }());