ugcinc 2.99.2 → 2.99.4
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/automations.js +48 -0
- package/dist/index.d.ts +1 -1
- package/dist/render.d.ts +12 -1
- package/dist/render.js +54 -0
- package/dist/types.d.ts +25 -1
- package/package.json +3 -3
package/dist/automations.js
CHANGED
|
@@ -291,6 +291,30 @@ function getAllNodes() {
|
|
|
291
291
|
},
|
|
292
292
|
],
|
|
293
293
|
},
|
|
294
|
+
{
|
|
295
|
+
type: "video-generation",
|
|
296
|
+
label: "Video Generation",
|
|
297
|
+
description: "Generate videos with AI",
|
|
298
|
+
category: "AI Generation",
|
|
299
|
+
nodeCategory: "generator",
|
|
300
|
+
inputs: [
|
|
301
|
+
{
|
|
302
|
+
id: "prompt",
|
|
303
|
+
title: "Prompt",
|
|
304
|
+
type: "text",
|
|
305
|
+
required: true,
|
|
306
|
+
},
|
|
307
|
+
// Image input is dynamically added for image-to-video models
|
|
308
|
+
],
|
|
309
|
+
outputs: [
|
|
310
|
+
{
|
|
311
|
+
id: "output",
|
|
312
|
+
title: "Generated Video",
|
|
313
|
+
type: "video",
|
|
314
|
+
required: true,
|
|
315
|
+
},
|
|
316
|
+
],
|
|
317
|
+
},
|
|
294
318
|
{
|
|
295
319
|
type: "llm",
|
|
296
320
|
label: "Text Generation",
|
|
@@ -426,6 +450,30 @@ function getAllNodes() {
|
|
|
426
450
|
],
|
|
427
451
|
outputs: [],
|
|
428
452
|
},
|
|
453
|
+
// === Processing nodes ===
|
|
454
|
+
{
|
|
455
|
+
type: "deduplicate",
|
|
456
|
+
label: "Deduplicate",
|
|
457
|
+
description: "Make videos unique",
|
|
458
|
+
category: "Processing",
|
|
459
|
+
nodeCategory: "generator",
|
|
460
|
+
inputs: [
|
|
461
|
+
{
|
|
462
|
+
id: "video",
|
|
463
|
+
title: "video",
|
|
464
|
+
type: "video",
|
|
465
|
+
required: true,
|
|
466
|
+
},
|
|
467
|
+
],
|
|
468
|
+
outputs: [
|
|
469
|
+
{
|
|
470
|
+
id: "output",
|
|
471
|
+
title: "output",
|
|
472
|
+
type: "video",
|
|
473
|
+
required: true,
|
|
474
|
+
},
|
|
475
|
+
],
|
|
476
|
+
},
|
|
429
477
|
];
|
|
430
478
|
}
|
|
431
479
|
/**
|
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, PostStatus, 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, TemplateNode, AutomationTemplate, AutomationRun, NodeRun, ExecutorNode, ExecutionEdge, OutputSchemaProperty, SelectionMode, ExhaustionBehavior, SelectionConfig, SelectionState, OutputMode, NodeOutputValues, OutputInput, OutputNodeConfig, ManualTriggerOutput, ManualTriggerNodeConfig, TriggerIterationMode, IterationExhaustionBehavior, TriggerCollectionConfig, DayOfWeek, RecurrenceNodeConfig, AccountNodeConfig, MediaNodeEnabledType, MediaNodeConfig, PostVideoNodeConfig, PostSlideshowInput, PostSlideshowNodeConfig, SaveToMediaInput, SaveToMediaNodeConfig, PortType, LLMOutputField, LLMNodeConfig, UserMedia, SocialAudio, Media, GetMediaParams, UploadMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, CreateMediaFromUrlParams, ImportTextParams, ImportTextResponse, Comment, CommentStatus, CreateCommentParams, CreateCommentResponse, GetCommentsParams, } from './types';
|
|
18
|
+
export type { SuccessResponse, ErrorResponse, ApiResponse, Account, AccountStat, AccountTask, EditProfileInfo, Task, TaskType, Post, PostType, PostStatus, 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, TemplateNode, AutomationTemplate, AutomationRun, NodeRun, ExecutorNode, ExecutionEdge, OutputSchemaProperty, SelectionMode, ExhaustionBehavior, SelectionConfig, SelectionState, OutputMode, NodeOutputValues, OutputInput, OutputNodeConfig, ManualTriggerOutput, ManualTriggerNodeConfig, TriggerIterationMode, IterationExhaustionBehavior, TriggerCollectionConfig, DayOfWeek, RecurrenceNodeConfig, AccountNodeConfig, MediaNodeEnabledType, MediaNodeConfig, PostVideoNodeConfig, PostSlideshowInput, PostSlideshowNodeConfig, SaveToMediaInput, SaveToMediaNodeConfig, DeduplicateNodeConfig, VideoGenerationNodeConfig, PortType, LLMOutputField, LLMNodeConfig, UserMedia, SocialAudio, Media, GetMediaParams, UploadMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, CreateMediaFromUrlParams, ImportTextParams, ImportTextResponse, Comment, CommentStatus, CreateCommentParams, CreateCommentResponse, GetCommentsParams, } from './types';
|
package/dist/render.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ApiResponse } from './types';
|
|
2
|
-
import type { ImageEditorNodeConfig, VideoEditorNodeConfig } from 'ugcinc-render';
|
|
2
|
+
import type { ImageEditorNodeConfig, VideoEditorNodeConfig, DeduplicationInput } from 'ugcinc-render';
|
|
3
3
|
export interface RenderJobResponse {
|
|
4
4
|
job_id: string;
|
|
5
5
|
status: string;
|
|
@@ -47,6 +47,12 @@ export interface SubmitVideoRenderJobParams {
|
|
|
47
47
|
/** If true, re-encode video to H.265/HEVC codec */
|
|
48
48
|
reencodeH265?: boolean;
|
|
49
49
|
}
|
|
50
|
+
export interface SubmitDeduplicationJobParams {
|
|
51
|
+
/** URL of the video to deduplicate */
|
|
52
|
+
video_url: string;
|
|
53
|
+
/** Deduplication config - preset level ('level1'-'level5') or custom config */
|
|
54
|
+
deduplication: DeduplicationInput;
|
|
55
|
+
}
|
|
50
56
|
/**
|
|
51
57
|
* Client for rendering operations
|
|
52
58
|
* Note: This calls Modal endpoints directly, not the UGC Inc API
|
|
@@ -65,4 +71,9 @@ export declare class RenderClient {
|
|
|
65
71
|
* Get render job status from the Modal renderer
|
|
66
72
|
*/
|
|
67
73
|
getRenderJobStatus(jobId: string): Promise<ApiResponse<RenderJobStatus>>;
|
|
74
|
+
/**
|
|
75
|
+
* Submit a deduplication job to the Modal renderer
|
|
76
|
+
* Applies hash-breaking, metadata injection, and trace removal to a video
|
|
77
|
+
*/
|
|
78
|
+
submitDeduplicationJob(params: SubmitDeduplicationJobParams): Promise<ApiResponse<RenderJobResponse>>;
|
|
68
79
|
}
|
package/dist/render.js
CHANGED
|
@@ -193,5 +193,59 @@ class RenderClient {
|
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
|
+
/**
|
|
197
|
+
* Submit a deduplication job to the Modal renderer
|
|
198
|
+
* Applies hash-breaking, metadata injection, and trace removal to a video
|
|
199
|
+
*/
|
|
200
|
+
async submitDeduplicationJob(params) {
|
|
201
|
+
try {
|
|
202
|
+
const response = await fetch(RENDER_SUBMIT_URL, {
|
|
203
|
+
method: 'POST',
|
|
204
|
+
headers: {
|
|
205
|
+
'Content-Type': 'application/json',
|
|
206
|
+
},
|
|
207
|
+
body: JSON.stringify({
|
|
208
|
+
video_url: params.video_url,
|
|
209
|
+
deduplication: params.deduplication,
|
|
210
|
+
output_type: 'video',
|
|
211
|
+
})
|
|
212
|
+
});
|
|
213
|
+
const text = await response.text();
|
|
214
|
+
let data;
|
|
215
|
+
try {
|
|
216
|
+
data = JSON.parse(text);
|
|
217
|
+
}
|
|
218
|
+
catch (jsonError) {
|
|
219
|
+
console.error('[Render] JSON parse error:', text.substring(0, 200));
|
|
220
|
+
return {
|
|
221
|
+
ok: false,
|
|
222
|
+
code: response.status || 500,
|
|
223
|
+
message: `Modal endpoint error: ${text.substring(0, 100)}`,
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
if (data.status === 'error' || !response.ok) {
|
|
227
|
+
return {
|
|
228
|
+
ok: false,
|
|
229
|
+
code: response.status,
|
|
230
|
+
message: data.error ?? data.message ?? 'Failed to submit deduplication job',
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
return {
|
|
234
|
+
ok: true,
|
|
235
|
+
code: 200,
|
|
236
|
+
message: "Deduplication job submitted",
|
|
237
|
+
data,
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
catch (error) {
|
|
241
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
242
|
+
console.error('[Render] Submit deduplication error:', error);
|
|
243
|
+
return {
|
|
244
|
+
ok: false,
|
|
245
|
+
code: 500,
|
|
246
|
+
message: `Failed to submit deduplication job: ${errorMessage}`,
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
}
|
|
196
250
|
}
|
|
197
251
|
exports.RenderClient = RenderClient;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ImageEditorElement, ImageEditorNodeConfig, DimensionPresetKey, VideoEditorNodeConfig, VideoEditorChannel, VideoEditorSegment, VideoEditorVideoSegment, VideoEditorAudioSegment, VideoEditorImageSegment, VideoEditorTextSegment, TimeValue, TimeMode, SegmentTimelinePosition } from 'ugcinc-render';
|
|
1
|
+
import type { ImageEditorElement, ImageEditorNodeConfig, DimensionPresetKey, VideoEditorNodeConfig, VideoEditorChannel, VideoEditorSegment, VideoEditorVideoSegment, VideoEditorAudioSegment, VideoEditorImageSegment, VideoEditorTextSegment, TimeValue, TimeMode, SegmentTimelinePosition, DeduplicationInput } from 'ugcinc-render';
|
|
2
2
|
/**
|
|
3
3
|
* API response types
|
|
4
4
|
*/
|
|
@@ -926,6 +926,8 @@ export interface WorkflowNodeDefinition {
|
|
|
926
926
|
postVideoConfig?: PostVideoNodeConfig;
|
|
927
927
|
postSlideshowConfig?: PostSlideshowNodeConfig;
|
|
928
928
|
saveToMediaConfig?: SaveToMediaNodeConfig;
|
|
929
|
+
deduplicateConfig?: DeduplicateNodeConfig;
|
|
930
|
+
videoGeneration?: VideoGenerationNodeConfig;
|
|
929
931
|
};
|
|
930
932
|
}
|
|
931
933
|
export interface OutputInput {
|
|
@@ -1083,6 +1085,28 @@ export interface SaveToMediaNodeConfig {
|
|
|
1083
1085
|
/** If true, append run ID to make tags unique */
|
|
1084
1086
|
makeUnique?: boolean;
|
|
1085
1087
|
}
|
|
1088
|
+
/**
|
|
1089
|
+
* Deduplicate node configuration - makes videos unique for social platforms
|
|
1090
|
+
*/
|
|
1091
|
+
export interface DeduplicateNodeConfig {
|
|
1092
|
+
/** Deduplication settings - preset level or custom config */
|
|
1093
|
+
deduplication: DeduplicationInput;
|
|
1094
|
+
}
|
|
1095
|
+
/**
|
|
1096
|
+
* Video Generation node configuration - AI video generation
|
|
1097
|
+
*/
|
|
1098
|
+
export interface VideoGenerationNodeConfig {
|
|
1099
|
+
/** AI model provider */
|
|
1100
|
+
provider: 'fal';
|
|
1101
|
+
/** Model to use (e.g., 'kling', 'runway') */
|
|
1102
|
+
model: string;
|
|
1103
|
+
/** Generation mode: text-to-video or image-to-video */
|
|
1104
|
+
mode: 'text' | 'image';
|
|
1105
|
+
/** Video duration in seconds */
|
|
1106
|
+
duration?: number;
|
|
1107
|
+
/** Aspect ratio (e.g., '16:9', '9:16') */
|
|
1108
|
+
aspectRatio?: string;
|
|
1109
|
+
}
|
|
1086
1110
|
export interface CanvasState {
|
|
1087
1111
|
zoom: number;
|
|
1088
1112
|
panX: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ugcinc",
|
|
3
|
-
"version": "2.99.
|
|
3
|
+
"version": "2.99.4",
|
|
4
4
|
"description": "TypeScript/JavaScript client for the UGC Inc API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"author": "UGC Inc",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"ugcinc-render": "^1.
|
|
24
|
+
"ugcinc-render": "^1.6.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "^20.0.0",
|
|
28
28
|
"typescript": "^5.0.0",
|
|
29
|
-
"ugcinc-render": "^1.
|
|
29
|
+
"ugcinc-render": "^1.6.1"
|
|
30
30
|
},
|
|
31
31
|
"files": [
|
|
32
32
|
"dist",
|