ugcinc 2.99.2 → 2.99.3
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/render.d.ts +12 -1
- package/dist/render.js +54 -0
- 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/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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ugcinc",
|
|
3
|
-
"version": "2.99.
|
|
3
|
+
"version": "2.99.3",
|
|
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",
|