ugcinc 2.67.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/stats.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { BaseClient } from './base';
2
- import type { AccountStat, PostStat, GetAccountStatsParams, GetPostStatsParams, RefreshStatsParams, RefreshStatsResponse, DailyAggregatedStat, GetDailyAggregatedStatsParams, DailyPostStat, GetDailyPostStatsParams, TopAccount, GetTopAccountsParams, TopPost, GetTopPostsParams, ApiResponse } from './types';
2
+ import type { AccountStat, PostStat, GetAccountStatsParams, GetPostStatsParams, RefreshStatsParams, RefreshStatsResponse, DailyAggregatedStat, GetDailyAggregatedStatsParams, DailyAccountStat, GetDailyAccountStatsParams, DailyPostStat, GetDailyPostStatsParams, TopAccount, GetTopAccountsParams, TopPost, GetTopPostsParams, ApiResponse } from './types';
3
3
  /**
4
4
  * Client for managing statistics
5
5
  */
@@ -74,6 +74,16 @@ export declare class StatsClient extends BaseClient {
74
74
  * ```
75
75
  */
76
76
  getDailyAggregated(params: GetDailyAggregatedStatsParams): Promise<ApiResponse<DailyAggregatedStat[]>>;
77
+ /**
78
+ * Get daily account statistics for all accounts in an org
79
+ *
80
+ * Returns per-account daily changes (deltas) for followers, following, views, likes.
81
+ * Perfect for granular local filtering in dashboard charts.
82
+ *
83
+ * @param params - Date range and filter parameters (startDate and endDate required)
84
+ * @returns Array of daily account statistics
85
+ */
86
+ getDailyAccountStats(params: GetDailyAccountStatsParams): Promise<ApiResponse<DailyAccountStat[]>>;
77
87
  /**
78
88
  * Get daily post statistics for chart tooltips
79
89
  *
package/dist/stats.js CHANGED
@@ -82,6 +82,18 @@ class StatsClient extends base_1.BaseClient {
82
82
  async getDailyAggregated(params) {
83
83
  return this.post('/stats/aggregated/daily', params);
84
84
  }
85
+ /**
86
+ * Get daily account statistics for all accounts in an org
87
+ *
88
+ * Returns per-account daily changes (deltas) for followers, following, views, likes.
89
+ * Perfect for granular local filtering in dashboard charts.
90
+ *
91
+ * @param params - Date range and filter parameters (startDate and endDate required)
92
+ * @returns Array of daily account statistics
93
+ */
94
+ async getDailyAccountStats(params) {
95
+ return this.post('/stats/granular/daily-accounts', params);
96
+ }
85
97
  /**
86
98
  * Get daily post statistics for chart tooltips
87
99
  *
package/dist/types.d.ts CHANGED
@@ -253,6 +253,22 @@ export interface GetDailyAggregatedStatsParams {
253
253
  org_group?: string;
254
254
  user_group?: string;
255
255
  }
256
+ export interface DailyAccountStat {
257
+ date: Date | string;
258
+ account_id: string;
259
+ followers: number;
260
+ following: number;
261
+ views: number;
262
+ likes: number;
263
+ }
264
+ export interface GetDailyAccountStatsParams {
265
+ startDate: string;
266
+ endDate: string;
267
+ accountIds?: string[];
268
+ tag?: string;
269
+ org_group?: string;
270
+ user_group?: string;
271
+ }
256
272
  export interface DailyPostStat {
257
273
  date: Date | string;
258
274
  post_id: string;
@@ -702,6 +718,33 @@ export interface OutputSchemaProperty {
702
718
  items?: 'string' | 'number' | 'boolean';
703
719
  properties?: Record<string, OutputSchemaProperty>;
704
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
+ }
705
748
  export interface WorkflowNodeDefinition {
706
749
  id: string;
707
750
  type: NodeTypeEnum;
@@ -720,6 +763,7 @@ export interface WorkflowNodeDefinition {
720
763
  textOptions?: string[];
721
764
  videoEditor?: VideoEditorNodeConfig;
722
765
  imageEditor?: ImageEditorNodeConfig;
766
+ llm?: LLMNodeConfig;
723
767
  outputSchema?: Record<string, OutputSchemaProperty>;
724
768
  provider?: 'groq' | 'openai' | 'claude' | 'gemini';
725
769
  model?: string;
@@ -794,6 +838,8 @@ export interface NodeRun {
794
838
  output_data: Record<string, unknown> | null;
795
839
  created_at: string;
796
840
  completed_at: string | null;
841
+ /** Sub-workflow node runs (only present for workflow nodes) */
842
+ subNodes?: NodeRun[];
797
843
  }
798
844
  /**
799
845
  * Media types
@@ -803,9 +849,10 @@ export interface UserMedia {
803
849
  org_id: string;
804
850
  name: string | null;
805
851
  tag: string | null;
806
- type: 'video' | 'image' | 'audio' | null;
807
- url: string;
852
+ type: 'video' | 'image' | 'audio' | 'text' | null;
853
+ url: string | null;
808
854
  preview_url: string | null;
855
+ content: string | null;
809
856
  created_at: string;
810
857
  media_type: 'user_media';
811
858
  }
@@ -863,6 +910,17 @@ export interface CreateSocialAudioParams {
863
910
  url: string;
864
911
  tag?: string;
865
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
+ }
866
924
  export interface CreateMediaFromUrlParams {
867
925
  urls: string[];
868
926
  names?: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "2.67.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",