ugcinc 2.17.0 → 2.18.0

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
@@ -13,4 +13,4 @@ export { RenderClient } from './render';
13
13
  export { AutomationsClient, getAllNodes, getNodeByType } from './automations';
14
14
  export { MediaClient } from './media';
15
15
  export type { ClientConfig, } from './base';
16
- export type { SuccessResponse, ErrorResponse, ApiResponse, Account, AccountStat, AccountTask, EditProfileInfo, Task, TaskType, Post, PostType, PostStat, ApiKey, EditorConfig, VideoEditorConfig, ImageEditorConfig, EditorChannel, TimeValue, BaseSegmentProps, VisualSegmentProps, EditorSegment, VideoSegment, AudioSegment, ImageSegment, TextSegment, StaticSegment, RenderJobSubmit, RenderVideoRequest, RenderImageRequest, RenderJobResponse, RenderJobStatus, GetAccountsParams, GetAccountStatsParams, GetAccountStatusParams, UpdateAccountInfoParams, UpdateAccountSocialParams, GetTasksParams, GetPostsParams, CreateSlideshowParams, GetPostStatsParams, GetPostStatusParams, CreateVideoParams, RefreshStatsParams, RefreshStatsResponse, RefreshStatsError, MediaType, NodePort, NodeControlConfig, NodeTypeEnum, WorkflowNodeDefinition, WorkflowDefinition, CanvasState, AutomationTemplate, AutomationRun, NodeRun, OutputSchemaProperty, SelectionMode, ExhaustionBehavior, SelectionConfig, SelectionState, OutputMode, UserMedia, SocialAudio, Media, GetMediaParams, UploadMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, } from './types';
16
+ export type { SuccessResponse, ErrorResponse, ApiResponse, Account, AccountStat, AccountTask, EditProfileInfo, Task, TaskType, Post, PostType, PostStat, ApiKey, EditorConfig, VideoEditorConfig, ImageEditorConfig, EditorChannel, TimeValue, BaseSegmentProps, VisualSegmentProps, EditorSegment, VideoSegment, AudioSegment, ImageSegment, TextSegment, StaticSegment, RenderJobSubmit, RenderVideoRequest, RenderImageRequest, RenderJobResponse, RenderJobStatus, GetAccountsParams, GetAccountStatsParams, GetAccountStatusParams, UpdateAccountInfoParams, UpdateAccountSocialParams, GetTasksParams, GetPostsParams, CreateSlideshowParams, GetPostStatsParams, GetPostStatusParams, CreateVideoParams, RefreshStatsParams, RefreshStatsResponse, RefreshStatsError, MediaType, NodePort, NodeControlConfig, NodeTypeEnum, WorkflowNodeDefinition, WorkflowDefinition, CanvasState, AutomationTemplate, AutomationRun, NodeRun, OutputSchemaProperty, SelectionMode, ExhaustionBehavior, SelectionConfig, SelectionState, OutputMode, UserMedia, SocialAudio, Media, GetMediaParams, UploadMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, CreateMediaFromUrlParams, } from './types';
package/dist/media.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { BaseClient } from './base';
2
- import type { Media, UserMedia, SocialAudio, GetMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, ApiResponse } from './types';
2
+ import type { Media, UserMedia, SocialAudio, GetMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, CreateMediaFromUrlParams, ApiResponse } from './types';
3
3
  /**
4
4
  * Client for managing media files
5
5
  */
@@ -10,7 +10,13 @@ export declare class MediaClient extends BaseClient {
10
10
  */
11
11
  getMedia(params?: GetMediaParams): Promise<ApiResponse<Media[]>>;
12
12
  /**
13
- * Upload media files
13
+ * Create media from URL(s)
14
+ * Downloads files from the provided URLs and uploads them to storage
15
+ * Supports both single url and multiple urls
16
+ */
17
+ create(params: CreateMediaFromUrlParams): Promise<ApiResponse<UploadMediaResponse>>;
18
+ /**
19
+ * Upload media files directly
14
20
  * Supports uploading multiple files at once
15
21
  * Files are uploaded to Vercel Blob storage
16
22
  */
package/dist/media.js CHANGED
@@ -14,7 +14,15 @@ class MediaClient extends base_1.BaseClient {
14
14
  return this.post('/media', params ?? {});
15
15
  }
16
16
  /**
17
- * Upload media files
17
+ * Create media from URL(s)
18
+ * Downloads files from the provided URLs and uploads them to storage
19
+ * Supports both single url and multiple urls
20
+ */
21
+ async create(params) {
22
+ return this.post('/media/create', params);
23
+ }
24
+ /**
25
+ * Upload media files directly
18
26
  * Supports uploading multiple files at once
19
27
  * Files are uploaded to Vercel Blob storage
20
28
  */
package/dist/types.d.ts CHANGED
@@ -702,4 +702,9 @@ export interface CreateSocialAudioParams {
702
702
  url: string;
703
703
  tag?: string;
704
704
  }
705
+ export interface CreateMediaFromUrlParams {
706
+ url?: string;
707
+ urls?: string[];
708
+ tag?: string;
709
+ }
705
710
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "2.17.0",
3
+ "version": "2.18.0",
4
4
  "description": "TypeScript/JavaScript client for the UGC Inc API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",