ugcinc 2.99.1 → 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.
@@ -113,7 +113,7 @@ function getAllNodes() {
113
113
  {
114
114
  type: "media",
115
115
  label: "Media",
116
- description: "Import images, videos, and audio files",
116
+ description: "Use saved media",
117
117
  category: "Sources",
118
118
  nodeCategory: "source",
119
119
  inputs: [],
@@ -122,7 +122,7 @@ function getAllNodes() {
122
122
  {
123
123
  type: "text",
124
124
  label: "Text",
125
- description: "Create text with templated variables",
125
+ description: "Use text collections",
126
126
  category: "Sources",
127
127
  nodeCategory: "source",
128
128
  inputs: [], // Dynamic inputs based on template variables
@@ -220,7 +220,7 @@ function getAllNodes() {
220
220
  {
221
221
  type: "image-editor",
222
222
  label: "Image Template",
223
- description: "Edit and transform images",
223
+ description: "Create templated images",
224
224
  category: "Generation",
225
225
  nodeCategory: "generator",
226
226
  inputs: [
@@ -243,7 +243,7 @@ function getAllNodes() {
243
243
  {
244
244
  type: "video-editor",
245
245
  label: "Video Template",
246
- description: "Edit and transform videos",
246
+ description: "Create templated videos",
247
247
  category: "Generation",
248
248
  nodeCategory: "generator",
249
249
  inputs: [], // Dynamic inputs based on segments in editor config
@@ -259,7 +259,7 @@ function getAllNodes() {
259
259
  {
260
260
  type: "workflow",
261
261
  label: "Sub-Agent",
262
- description: "Embed another workflow as a sub-agent",
262
+ description: "Embed other agents",
263
263
  category: "Generation",
264
264
  nodeCategory: "generator",
265
265
  // Inputs and outputs are dynamic based on the embedded workflow
@@ -270,8 +270,8 @@ function getAllNodes() {
270
270
  {
271
271
  type: "image-generation",
272
272
  label: "Image Generation",
273
- description: "Generate images using AI models",
274
- category: "AI",
273
+ description: "Generate images with AI",
274
+ category: "AI Generation",
275
275
  nodeCategory: "generator",
276
276
  inputs: [
277
277
  {
@@ -291,11 +291,35 @@ 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",
297
- description: "Generate text using Large Language Models",
298
- category: "AI",
321
+ description: "Generate LLM output",
322
+ category: "AI Generation",
299
323
  nodeCategory: "generator",
300
324
  // Dynamic inputs: extracted from systemPrompt {{variables}} + media refs
301
325
  inputs: [],
@@ -306,7 +330,7 @@ function getAllNodes() {
306
330
  {
307
331
  type: "manual-trigger",
308
332
  label: "Manual Trigger",
309
- description: "Define inputs required when manually running this automation",
333
+ description: "Trigger manually",
310
334
  category: "Triggers",
311
335
  nodeCategory: "trigger",
312
336
  inputs: [],
@@ -317,7 +341,7 @@ function getAllNodes() {
317
341
  {
318
342
  type: "recurrence",
319
343
  label: "Recurring",
320
- description: "Schedule recurring automation runs",
344
+ description: "Run continuously",
321
345
  category: "Triggers",
322
346
  nodeCategory: "trigger",
323
347
  inputs: [],
@@ -328,7 +352,7 @@ function getAllNodes() {
328
352
  {
329
353
  type: "post-video",
330
354
  label: "Post Video",
331
- description: "Post a video to social media",
355
+ description: "Publish a video post",
332
356
  category: "Output",
333
357
  nodeCategory: "terminal",
334
358
  inputs: [
@@ -368,7 +392,7 @@ function getAllNodes() {
368
392
  {
369
393
  type: "post-slideshow",
370
394
  label: "Post Slideshow",
371
- description: "Post a slideshow to social media",
395
+ description: "Publish a slideshow post",
372
396
  category: "Output",
373
397
  nodeCategory: "terminal",
374
398
  // Dynamic inputs based on postSlideshowConfig.inputs
@@ -413,7 +437,7 @@ function getAllNodes() {
413
437
  {
414
438
  type: "output",
415
439
  label: "Output",
416
- description: "Final output of the automation",
440
+ description: "Pass through outputs",
417
441
  category: "Output",
418
442
  nodeCategory: "terminal",
419
443
  inputs: [
@@ -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.1",
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.4.0"
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.4.0"
29
+ "ugcinc-render": "^1.6.1"
30
30
  },
31
31
  "files": [
32
32
  "dist",