ugcinc 2.68.0 → 2.69.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.
@@ -190,23 +190,11 @@ function getAllNodes() {
190
190
  type: "llm",
191
191
  label: "LLM",
192
192
  description: "Process input with a Large Language Model",
193
- category: "Input",
194
- inputs: [
195
- {
196
- id: "prompt",
197
- title: "prompt",
198
- type: "text",
199
- required: true,
200
- },
201
- ],
202
- outputs: [
203
- {
204
- id: "response",
205
- title: "response",
206
- type: "text",
207
- required: true,
208
- },
209
- ],
193
+ category: "AI",
194
+ // Dynamic inputs: extracted from systemPrompt {{variables}} + media refs
195
+ inputs: [],
196
+ // Dynamic outputs: based on outputFields config
197
+ outputs: [],
210
198
  },
211
199
  {
212
200
  type: "output",
package/dist/index.d.ts CHANGED
@@ -15,4 +15,4 @@ export { MediaClient } from './media';
15
15
  export { CommentsClient } from './comments';
16
16
  export type { RenderJobResponse, RenderJobStatus, SubmitImageRenderJobParams, SubmitVideoRenderJobParams, RenderVideoEditorConfig, } from './render';
17
17
  export type { ClientConfig, } from './base';
18
- export type { SuccessResponse, ErrorResponse, ApiResponse, Account, AccountStat, AccountTask, EditProfileInfo, Task, TaskType, Post, PostType, PostStat, ApiKey, EditorConfig, VideoEditorNodeConfig, VideoEditorChannel, VideoEditorSegment, VideoEditorVideoSegment, VideoEditorAudioSegment, VideoEditorImageSegment, VideoEditorTextSegment, TimeMode, SegmentTimelinePosition, ImageEditorNodeConfig, ImageEditorElement, ImageEditorNodeInput, ImageEditorNodeOutput, DimensionPresetKey, EditorChannel, TimeValue, BaseSegmentProps, VisualSegmentProps, EditorSegment, VideoSegment, AudioSegment, ImageSegment, TextSegment, StaticSegment, PositionAnchor, RelativePositionConfig, GetAccountsParams, GetAccountStatsParams, GetAccountStatusParams, UpdateAccountInfoParams, UpdateAccountSocialParams, GetTasksParams, GetPostsParams, CreateSlideshowParams, GetPostStatsParams, GetPostStatusParams, CreateVideoParams, RefreshStatsParams, RefreshStatsResponse, RefreshStatsError, DailyAggregatedStat, GetDailyAggregatedStatsParams, DailyPostStat, GetDailyPostStatsParams, TopAccount, GetTopAccountsParams, TopPost, GetTopPostsParams, MediaType, NodePort, NodeControlConfig, NodeTypeEnum, WorkflowNodeDefinition, WorkflowDefinition, CanvasState, AutomationTemplate, AutomationRun, NodeRun, OutputSchemaProperty, SelectionMode, ExhaustionBehavior, SelectionConfig, SelectionState, OutputMode, OutputInput, OutputNodeConfig, UserMedia, SocialAudio, Media, GetMediaParams, UploadMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, CreateMediaFromUrlParams, Comment, CreateCommentParams, CreateCommentResponse, GetCommentStatusParams, CommentStatusResponse, GetCommentsParams, } from './types';
18
+ export type { SuccessResponse, ErrorResponse, ApiResponse, Account, AccountStat, AccountTask, EditProfileInfo, Task, TaskType, Post, PostType, PostStat, ApiKey, EditorConfig, VideoEditorNodeConfig, VideoEditorChannel, VideoEditorSegment, VideoEditorVideoSegment, VideoEditorAudioSegment, VideoEditorImageSegment, VideoEditorTextSegment, TimeMode, SegmentTimelinePosition, ImageEditorNodeConfig, ImageEditorElement, ImageEditorNodeInput, ImageEditorNodeOutput, DimensionPresetKey, EditorChannel, TimeValue, BaseSegmentProps, VisualSegmentProps, EditorSegment, VideoSegment, AudioSegment, ImageSegment, TextSegment, StaticSegment, PositionAnchor, RelativePositionConfig, GetAccountsParams, GetAccountStatsParams, GetAccountStatusParams, UpdateAccountInfoParams, UpdateAccountSocialParams, GetTasksParams, GetPostsParams, CreateSlideshowParams, GetPostStatsParams, GetPostStatusParams, CreateVideoParams, RefreshStatsParams, RefreshStatsResponse, RefreshStatsError, DailyAggregatedStat, GetDailyAggregatedStatsParams, DailyPostStat, GetDailyPostStatsParams, TopAccount, GetTopAccountsParams, TopPost, GetTopPostsParams, MediaType, NodePort, NodeControlConfig, NodeTypeEnum, WorkflowNodeDefinition, WorkflowDefinition, CanvasState, AutomationTemplate, AutomationRun, NodeRun, OutputSchemaProperty, SelectionMode, ExhaustionBehavior, SelectionConfig, SelectionState, OutputMode, OutputInput, OutputNodeConfig, LLMOutputField, LLMNodeConfig, UserMedia, SocialAudio, Media, GetMediaParams, UploadMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, CreateMediaFromUrlParams, ImportTextParams, ImportTextResponse, Comment, CreateCommentParams, CreateCommentResponse, GetCommentStatusParams, CommentStatusResponse, GetCommentsParams, } 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, GetSocialAudioParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, CreateMediaFromUrlParams, GetUploadTokenParams, UploadTokenResponse, ApiResponse } from './types';
2
+ import type { Media, UserMedia, SocialAudio, GetMediaParams, GetSocialAudioParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, CreateMediaFromUrlParams, GetUploadTokenParams, UploadTokenResponse, ImportTextParams, ImportTextResponse, ApiResponse } from './types';
3
3
  /**
4
4
  * Client for managing media files
5
5
  */
@@ -41,4 +41,9 @@ export declare class MediaClient extends BaseClient {
41
41
  * Extracts audio and cover image from TikTok video or music URL
42
42
  */
43
43
  createSocialAudio(params: CreateSocialAudioParams): Promise<ApiResponse<SocialAudio>>;
44
+ /**
45
+ * Import text content as media
46
+ * Creates text media entries from raw text content
47
+ */
48
+ importText(params: ImportTextParams): Promise<ApiResponse<ImportTextResponse>>;
44
49
  }
package/dist/media.js CHANGED
@@ -57,5 +57,12 @@ class MediaClient extends base_1.BaseClient {
57
57
  async createSocialAudio(params) {
58
58
  return this.post('/media/social-audio/upload', params);
59
59
  }
60
+ /**
61
+ * Import text content as media
62
+ * Creates text media entries from raw text content
63
+ */
64
+ async importText(params) {
65
+ return this.post('/media/create/text', params);
66
+ }
60
67
  }
61
68
  exports.MediaClient = MediaClient;
package/dist/types.d.ts CHANGED
@@ -718,6 +718,33 @@ export interface OutputSchemaProperty {
718
718
  items?: 'string' | 'number' | 'boolean';
719
719
  properties?: Record<string, OutputSchemaProperty>;
720
720
  }
721
+ /**
722
+ * LLM output field definition for structured outputs
723
+ */
724
+ export interface LLMOutputField {
725
+ /** Required - becomes the output port ID */
726
+ name: string;
727
+ /** Optional - guides LLM on expected content */
728
+ description?: string;
729
+ /** Output type */
730
+ type: 'string' | 'number' | 'boolean' | 'array';
731
+ /** For array types - the item type */
732
+ items?: 'string' | 'number' | 'boolean';
733
+ }
734
+ /**
735
+ * LLM Node Configuration
736
+ */
737
+ export interface LLMNodeConfig {
738
+ provider: 'groq' | 'openai' | 'claude' | 'gemini';
739
+ model: string;
740
+ temperature?: number;
741
+ maxTokens?: number;
742
+ systemPrompt: string;
743
+ outputFields: LLMOutputField[];
744
+ useStructuredOutput?: boolean;
745
+ imageInputRefs?: string[];
746
+ videoInputRefs?: string[];
747
+ }
721
748
  export interface WorkflowNodeDefinition {
722
749
  id: string;
723
750
  type: NodeTypeEnum;
@@ -736,6 +763,7 @@ export interface WorkflowNodeDefinition {
736
763
  textOptions?: string[];
737
764
  videoEditor?: VideoEditorNodeConfig;
738
765
  imageEditor?: ImageEditorNodeConfig;
766
+ llm?: LLMNodeConfig;
739
767
  outputSchema?: Record<string, OutputSchemaProperty>;
740
768
  provider?: 'groq' | 'openai' | 'claude' | 'gemini';
741
769
  model?: string;
@@ -821,9 +849,10 @@ export interface UserMedia {
821
849
  org_id: string;
822
850
  name: string | null;
823
851
  tag: string | null;
824
- type: 'video' | 'image' | 'audio' | null;
825
- url: string;
852
+ type: 'video' | 'image' | 'audio' | 'text' | null;
853
+ url: string | null;
826
854
  preview_url: string | null;
855
+ content: string | null;
827
856
  created_at: string;
828
857
  media_type: 'user_media';
829
858
  }
@@ -881,6 +910,17 @@ export interface CreateSocialAudioParams {
881
910
  url: string;
882
911
  tag?: string;
883
912
  }
913
+ export interface ImportTextParams {
914
+ texts: Array<{
915
+ content: string;
916
+ name?: string;
917
+ tag?: string;
918
+ }>;
919
+ }
920
+ export interface ImportTextResponse {
921
+ data: UserMedia[];
922
+ message: string;
923
+ }
884
924
  export interface CreateMediaFromUrlParams {
885
925
  urls: string[];
886
926
  names?: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "2.68.0",
3
+ "version": "2.69.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",