ugcinc 4.0.0 → 4.0.2

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.
@@ -275,14 +275,14 @@ function getAllNodes() {
275
275
  inputs: [
276
276
  {
277
277
  id: "url",
278
- type: (0, types_1.portType)('text'),
278
+ type: (0, types_1.portType)({ type: 'text', isArray: false }),
279
279
  required: true,
280
280
  },
281
281
  ],
282
282
  outputs: [
283
283
  {
284
284
  id: "video",
285
- type: (0, types_1.portType)('video'),
285
+ type: (0, types_1.portType)({ type: 'video', isArray: false }),
286
286
  required: true,
287
287
  },
288
288
  ],
@@ -297,7 +297,7 @@ function getAllNodes() {
297
297
  outputs: [
298
298
  {
299
299
  id: "account",
300
- type: (0, types_1.portType)('account'),
300
+ type: (0, types_1.portType)({ type: 'account', isArray: false }),
301
301
  required: true,
302
302
  },
303
303
  ],
@@ -312,7 +312,7 @@ function getAllNodes() {
312
312
  outputs: [
313
313
  {
314
314
  id: "text",
315
- type: (0, types_1.portType)('text'),
315
+ type: (0, types_1.portType)({ type: 'text', isArray: false }),
316
316
  required: true,
317
317
  },
318
318
  ],
@@ -327,14 +327,14 @@ function getAllNodes() {
327
327
  inputs: [
328
328
  {
329
329
  id: "background",
330
- type: (0, types_1.portType)('image'),
330
+ type: (0, types_1.portType)({ type: 'image', isArray: false }),
331
331
  required: true,
332
332
  },
333
333
  ],
334
334
  outputs: [
335
335
  {
336
336
  id: "output",
337
- type: (0, types_1.portType)('image'),
337
+ type: (0, types_1.portType)({ type: 'image', isArray: false }),
338
338
  required: true,
339
339
  },
340
340
  ],
@@ -349,7 +349,7 @@ function getAllNodes() {
349
349
  outputs: [
350
350
  {
351
351
  id: "output",
352
- type: (0, types_1.portType)('video'),
352
+ type: (0, types_1.portType)({ type: 'video', isArray: false }),
353
353
  required: true,
354
354
  },
355
355
  ],
@@ -373,19 +373,19 @@ function getAllNodes() {
373
373
  inputs: [
374
374
  {
375
375
  id: "media",
376
- type: [(0, types_1.portType)('video'), (0, types_1.portType)('audio')],
376
+ type: [(0, types_1.portType)({ type: 'video', isArray: false }), (0, types_1.portType)({ type: 'audio', isArray: false })],
377
377
  required: true,
378
378
  },
379
379
  ],
380
380
  outputs: [
381
381
  {
382
382
  id: "text",
383
- type: (0, types_1.portType)('text'),
383
+ type: (0, types_1.portType)({ type: 'text', isArray: false }),
384
384
  required: true,
385
385
  },
386
386
  {
387
387
  id: "segments",
388
- type: (0, types_1.portType)('object'),
388
+ type: (0, types_1.portType)({ type: 'object', isArray: false }),
389
389
  required: true,
390
390
  itemSchema: {
391
391
  text: { type: 'string' },
@@ -404,14 +404,14 @@ function getAllNodes() {
404
404
  inputs: [
405
405
  {
406
406
  id: "video",
407
- type: (0, types_1.portType)('video'),
407
+ type: (0, types_1.portType)({ type: 'video', isArray: false }),
408
408
  required: true,
409
409
  },
410
410
  ],
411
411
  outputs: [
412
412
  {
413
413
  id: "output",
414
- type: (0, types_1.portType)('video'),
414
+ type: (0, types_1.portType)({ type: 'video', isArray: false }),
415
415
  required: true,
416
416
  },
417
417
  ],
@@ -425,14 +425,14 @@ function getAllNodes() {
425
425
  inputs: [
426
426
  {
427
427
  id: "image",
428
- type: (0, types_1.portType)('image'),
428
+ type: (0, types_1.portType)({ type: 'image', isArray: false }),
429
429
  required: true,
430
430
  },
431
431
  ],
432
432
  outputs: [
433
433
  {
434
434
  id: "output",
435
- type: (0, types_1.portType)('video'),
435
+ type: (0, types_1.portType)({ type: 'video', isArray: false }),
436
436
  required: true,
437
437
  },
438
438
  ],
@@ -451,7 +451,7 @@ function getAllNodes() {
451
451
  outputs: [
452
452
  {
453
453
  id: "output",
454
- type: (0, types_1.portType)('image'),
454
+ type: (0, types_1.portType)({ type: 'image', isArray: false }),
455
455
  required: true,
456
456
  },
457
457
  ],
@@ -465,14 +465,14 @@ function getAllNodes() {
465
465
  inputs: [
466
466
  {
467
467
  id: "video",
468
- type: (0, types_1.portType)('video'),
468
+ type: (0, types_1.portType)({ type: 'video', isArray: false }),
469
469
  required: true,
470
470
  },
471
471
  ],
472
472
  outputs: [
473
473
  {
474
474
  id: "output",
475
- type: (0, types_1.portType)('video'),
475
+ type: (0, types_1.portType)({ type: 'video', isArray: false }),
476
476
  required: true,
477
477
  },
478
478
  ],
@@ -498,7 +498,7 @@ function getAllNodes() {
498
498
  inputs: [
499
499
  {
500
500
  id: "prompt",
501
- type: (0, types_1.portType)('text'),
501
+ type: (0, types_1.portType)({ type: 'text', isArray: false }),
502
502
  required: true,
503
503
  },
504
504
  // Image input is dynamically added for image-to-video models
@@ -506,7 +506,7 @@ function getAllNodes() {
506
506
  outputs: [
507
507
  {
508
508
  id: "output",
509
- type: (0, types_1.portType)('video'),
509
+ type: (0, types_1.portType)({ type: 'video', isArray: false }),
510
510
  required: true,
511
511
  },
512
512
  ],
@@ -520,7 +520,7 @@ function getAllNodes() {
520
520
  inputs: [
521
521
  {
522
522
  id: "prompt",
523
- type: (0, types_1.portType)('text'),
523
+ type: (0, types_1.portType)({ type: 'text', isArray: false }),
524
524
  required: true,
525
525
  },
526
526
  // Image input is dynamically added for edit models
@@ -528,7 +528,7 @@ function getAllNodes() {
528
528
  outputs: [
529
529
  {
530
530
  id: "output",
531
- type: (0, types_1.portType)('image'),
531
+ type: (0, types_1.portType)({ type: 'image', isArray: false }),
532
532
  required: true,
533
533
  },
534
534
  ],
@@ -554,7 +554,7 @@ function getAllNodes() {
554
554
  inputs: [
555
555
  {
556
556
  id: "array",
557
- type: [(0, types_1.portType)('image', true), (0, types_1.portType)('video', true), (0, types_1.portType)('audio', true), (0, types_1.portType)('text', true), (0, types_1.portType)('object', true)],
557
+ type: [(0, types_1.portType)({ type: 'image', isArray: true }), (0, types_1.portType)({ type: 'video', isArray: true }), (0, types_1.portType)({ type: 'audio', isArray: true }), (0, types_1.portType)({ type: 'text', isArray: true }), (0, types_1.portType)({ type: 'object', isArray: true })],
558
558
  required: true,
559
559
  },
560
560
  ],
@@ -600,14 +600,14 @@ function getAllNodes() {
600
600
  inputs: [
601
601
  {
602
602
  id: "input",
603
- type: (0, types_1.portType)('boolean'),
603
+ type: (0, types_1.portType)({ type: 'boolean', isArray: false }),
604
604
  required: true,
605
605
  },
606
606
  ],
607
607
  outputs: [
608
608
  {
609
609
  id: "output",
610
- type: (0, types_1.portType)('boolean'),
610
+ type: (0, types_1.portType)({ type: 'boolean', isArray: false }),
611
611
  required: false,
612
612
  },
613
613
  ],
@@ -635,7 +635,7 @@ function getAllNodes() {
635
635
  inputs: [
636
636
  {
637
637
  id: "key",
638
- type: (0, types_1.portType)('text'),
638
+ type: (0, types_1.portType)({ type: 'text', isArray: false }),
639
639
  required: true,
640
640
  },
641
641
  ],
@@ -653,7 +653,7 @@ function getAllNodes() {
653
653
  inputs: [
654
654
  {
655
655
  id: "value",
656
- type: [(0, types_1.portType)('image'), (0, types_1.portType)('video'), (0, types_1.portType)('audio'), (0, types_1.portType)('text'), (0, types_1.portType)('object'), (0, types_1.portType)('boolean'), (0, types_1.portType)('number')],
656
+ type: [(0, types_1.portType)({ type: 'image', isArray: false }), (0, types_1.portType)({ type: 'video', isArray: false }), (0, types_1.portType)({ type: 'audio', isArray: false }), (0, types_1.portType)({ type: 'text', isArray: false }), (0, types_1.portType)({ type: 'object', isArray: false }), (0, types_1.portType)({ type: 'boolean', isArray: false }), (0, types_1.portType)({ type: 'number', isArray: false })],
657
657
  required: true,
658
658
  },
659
659
  ],
@@ -661,7 +661,7 @@ function getAllNodes() {
661
661
  outputs: [
662
662
  {
663
663
  id: "array",
664
- type: [(0, types_1.portType)('image', true), (0, types_1.portType)('video', true), (0, types_1.portType)('audio', true), (0, types_1.portType)('text', true), (0, types_1.portType)('object', true)],
664
+ type: [(0, types_1.portType)({ type: 'image', isArray: true }), (0, types_1.portType)({ type: 'video', isArray: true }), (0, types_1.portType)({ type: 'audio', isArray: true }), (0, types_1.portType)({ type: 'text', isArray: true }), (0, types_1.portType)({ type: 'object', isArray: true })],
665
665
  required: true,
666
666
  },
667
667
  ],
@@ -676,7 +676,7 @@ function getAllNodes() {
676
676
  inputs: [
677
677
  {
678
678
  id: "array",
679
- type: [(0, types_1.portType)('image', true), (0, types_1.portType)('video', true), (0, types_1.portType)('audio', true), (0, types_1.portType)('text', true), (0, types_1.portType)('object', true)],
679
+ type: [(0, types_1.portType)({ type: 'image', isArray: true }), (0, types_1.portType)({ type: 'video', isArray: true }), (0, types_1.portType)({ type: 'audio', isArray: true }), (0, types_1.portType)({ type: 'text', isArray: true }), (0, types_1.portType)({ type: 'object', isArray: true })],
680
680
  required: true,
681
681
  },
682
682
  ],
@@ -696,17 +696,17 @@ function getAllNodes() {
696
696
  inputs: [
697
697
  {
698
698
  id: "account",
699
- type: (0, types_1.portType)('account'),
699
+ type: (0, types_1.portType)({ type: 'account', isArray: false }),
700
700
  required: true,
701
701
  },
702
702
  {
703
703
  id: "caption",
704
- type: (0, types_1.portType)('text'),
704
+ type: (0, types_1.portType)({ type: 'text', isArray: false }),
705
705
  required: false,
706
706
  },
707
707
  {
708
708
  id: "social-audio",
709
- type: (0, types_1.portType)('social_audio'),
709
+ type: (0, types_1.portType)({ type: 'social_audio', isArray: false }),
710
710
  required: false,
711
711
  },
712
712
  ],
@@ -731,7 +731,7 @@ function getAllNodes() {
731
731
  inputs: [
732
732
  {
733
733
  id: "result",
734
- type: [(0, types_1.portType)('image'), (0, types_1.portType)('video'), (0, types_1.portType)('audio'), (0, types_1.portType)('text'), (0, types_1.portType)('social_audio'), (0, types_1.portType)('account'), (0, types_1.portType)('boolean'), (0, types_1.portType)('object')],
734
+ type: [(0, types_1.portType)({ type: 'image', isArray: false }), (0, types_1.portType)({ type: 'video', isArray: false }), (0, types_1.portType)({ type: 'audio', isArray: false }), (0, types_1.portType)({ type: 'text', isArray: false }), (0, types_1.portType)({ type: 'social_audio', isArray: false }), (0, types_1.portType)({ type: 'account', isArray: false }), (0, types_1.portType)({ type: 'boolean', isArray: false }), (0, types_1.portType)({ type: 'object', isArray: false })],
735
735
  required: true,
736
736
  },
737
737
  ],
package/dist/index.d.ts CHANGED
@@ -13,7 +13,7 @@ export { RenderClient } from './render';
13
13
  export { AutomationsClient, getAllNodes, getNodeByType, getOutputSchema, areTypesCompatible } from './automations';
14
14
  export { computeInputPorts, computeOutputPorts, isInputPortRequired, extractTemplateVariables } from './ports';
15
15
  export type { ComputedPort } from './ports';
16
- export { NodeTypes, isAsyncExecutor, isEditModel, isImageToVideoModel } from './types';
16
+ export { NodeTypes, isAsyncExecutor, isEditModel, isImageToVideoModel, portType, formatPortType, isLegacyPortType, fromLegacyPortType, toLegacyPortType, normalizePortType, normalizePortTypes } from './types';
17
17
  export type { PropertySchema } from './automations';
18
18
  export { portId, isValidPortId, portIdToTitle, normalizeToPortId, PortIdSchema } from './port-id';
19
19
  export type { PortId } from './port-id';
@@ -21,4 +21,4 @@ export { MediaClient } from './media';
21
21
  export { CommentsClient } from './comments';
22
22
  export type { RenderJobResponse, RenderJobStatus, SubmitImageRenderJobParams, SubmitVideoRenderJobParams, SubmitScreenshotAnimationRenderJobParams, SubmitInstagramDmRenderJobParams, SubmitIMessageDmRenderJobParams, IgDmMessage, ImDmMessage, RenderVideoEditorConfig, } from './render';
23
23
  export type { ClientConfig, } from './base';
24
- 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, VideoEditorNodeInput, DimensionPresetKey, EditorChannel, TimeValue, DeduplicationInput, 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, ResolvedPort, ResolvedPorts, NodeControlConfig, NodeTypeEnum, WorkflowNodeDefinition, WorkflowDefinition, CanvasState, TemplateNode, AutomationTemplate, AutomationRun, NodeRun, ExecutorNode, ExecutionEdge, OutputSchemaProperty, SelectionMode, ExhaustionBehavior, SelectionConfig, SelectionState, OutputMode, NodeOutputValues, OutputInput, OutputNodeConfig, ObjectSchemaFieldLevel3, ObjectSchemaFieldLevel2, ObjectSchemaField, ManualTriggerOutput, ManualTriggerNodeConfig, TriggerIterationMode, IterationExhaustionBehavior, CollectionSelectionMode, TriggerCollectionConfig, DayOfWeek, RecurrenceMediaOutput, RecurrenceMediaConfig, RecurrenceNodeConfig, AccountNodeConfig, MediaNodeEnabledType, RecurrenceMediaEnabledType, MediaNodeOutput, MediaNodeConfig, PostSchedulingMode, PostSchedulingConfig, AutoPostMode, AutoPostInputType, AutoPostInput, AutoPostNodeConfig, SaveToMediaInput, SaveToMediaNodeConfig, DeduplicateNodeConfig, ForEachOutputProperty, ForEachInputPort, ForEachNodeConfig, RandomValueType, RandomInputPort, RandomNodeMode, RandomNodeConfig, IfLogicOperator, IfBooleanInput, IfPassthroughInput, IfNodeConfig, RandomRouteBranch, RandomRoutePassthroughInput, RandomRouteObjectField, RandomRouteNodeConfig, BranchDefinition, BranchValueConfig, BranchPassthroughInput, BranchNodeConfig, VideoImportPlatform, VideoImportQuality, VideoImportNodeConfig, AutoCaptionPreset, AutoCaptionFontWeight, AutoCaptionPosition, AutoCaptionNodeConfig, ScreenshotAnimationNodeConfig, CreateDmMessage, CreateDmNodeConfig, DestructureSelection, DestructureNodeConfig, ImageGenerationTextModel, ImageGenerationEditModel, ImageGenerationModel, ImageGenerationNodeConfig, CustomModelParamType, CustomModelInputParam, CustomModelNodeConfig, VideoGenerationTextToVideoModel, VideoGenerationImageToVideoModel, VideoGenerationModel, VideoGenerationNodeConfig, BasePortType, PortType, portType, formatPortType, LegacyPortType, isLegacyPortType, fromLegacyPortType, toLegacyPortType, normalizePortType, normalizePortTypes, LLMOutputField, LLMApiKeys, LLMNodeConfig, UserMedia, SocialAudio, Media, MediaUse, GetMediaParams, CreateSocialAudioParams, UploadMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateMediaFromUrlParams, ImportTextParams, ImportTextResponse, GetMediaUseParams, GetMediaUseResponse, FilterMediaParams, FilterMediaResponse, Comment, CommentStatus, CreateCommentParams, CreateCommentResponse, GetCommentsParams, ValidationErrorType, ValidationError, ExportedNode, ExportedConnection, ExportedTemplate, AutomationExport, ExportedExecutor, ExportedEdge, ExportedRun, AutomationRunExport, AccountData, FlowControlOutput, NodeType, ExecutorContext, NodeExecutor, ExecutorAsyncJobStatus, AsyncNodeExecutor, } from './types';
24
+ 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, VideoEditorNodeInput, DimensionPresetKey, EditorChannel, TimeValue, DeduplicationInput, 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, ResolvedPort, ResolvedPorts, NodeControlConfig, NodeTypeEnum, WorkflowNodeDefinition, WorkflowDefinition, CanvasState, TemplateNode, AutomationTemplate, AutomationRun, NodeRun, ExecutorNode, ExecutionEdge, OutputSchemaProperty, SelectionMode, ExhaustionBehavior, SelectionConfig, SelectionState, OutputMode, NodeOutputValues, OutputInput, OutputNodeConfig, ObjectSchemaFieldLevel3, ObjectSchemaFieldLevel2, ObjectSchemaField, ManualTriggerOutput, ManualTriggerNodeConfig, TriggerIterationMode, IterationExhaustionBehavior, CollectionSelectionMode, TriggerCollectionConfig, DayOfWeek, RecurrenceMediaOutput, RecurrenceMediaConfig, RecurrenceNodeConfig, AccountNodeConfig, MediaNodeEnabledType, RecurrenceMediaEnabledType, MediaNodeOutput, MediaNodeConfig, PostSchedulingMode, PostSchedulingConfig, AutoPostMode, AutoPostInputType, AutoPostInput, AutoPostNodeConfig, SaveToMediaInput, SaveToMediaNodeConfig, DeduplicateNodeConfig, ForEachOutputProperty, ForEachInputPort, ForEachNodeConfig, RandomValueType, RandomInputPort, RandomNodeMode, RandomNodeConfig, IfLogicOperator, IfBooleanInput, IfPassthroughInput, IfNodeConfig, RandomRouteBranch, RandomRoutePassthroughInput, RandomRouteObjectField, RandomRouteNodeConfig, BranchDefinition, BranchValueConfig, BranchPassthroughInput, BranchNodeConfig, VideoImportPlatform, VideoImportQuality, VideoImportNodeConfig, AutoCaptionPreset, AutoCaptionFontWeight, AutoCaptionPosition, AutoCaptionNodeConfig, ScreenshotAnimationNodeConfig, CreateDmMessage, CreateDmNodeConfig, DestructureSelection, DestructureNodeConfig, ImageGenerationTextModel, ImageGenerationEditModel, ImageGenerationModel, ImageGenerationNodeConfig, CustomModelParamType, CustomModelInputParam, CustomModelNodeConfig, VideoGenerationTextToVideoModel, VideoGenerationImageToVideoModel, VideoGenerationModel, VideoGenerationNodeConfig, BasePortType, PortType, LegacyPortType, LLMOutputField, LLMApiKeys, LLMNodeConfig, UserMedia, SocialAudio, Media, MediaUse, GetMediaParams, CreateSocialAudioParams, UploadMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateMediaFromUrlParams, ImportTextParams, ImportTextResponse, GetMediaUseParams, GetMediaUseResponse, FilterMediaParams, FilterMediaResponse, Comment, CommentStatus, CreateCommentParams, CreateCommentResponse, GetCommentsParams, ValidationErrorType, ValidationError, ExportedNode, ExportedConnection, ExportedTemplate, AutomationExport, ExportedExecutor, ExportedEdge, ExportedRun, AutomationRunExport, AccountData, FlowControlOutput, NodeType, ExecutorContext, NodeExecutor, ExecutorAsyncJobStatus, AsyncNodeExecutor, } from './types';
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Official TypeScript/JavaScript client for the UGC Inc API
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.CommentsClient = exports.MediaClient = exports.PortIdSchema = exports.normalizeToPortId = exports.portIdToTitle = exports.isValidPortId = exports.portId = exports.isImageToVideoModel = exports.isEditModel = exports.isAsyncExecutor = exports.NodeTypes = exports.extractTemplateVariables = exports.isInputPortRequired = exports.computeOutputPorts = exports.computeInputPorts = exports.areTypesCompatible = exports.getOutputSchema = exports.getNodeByType = exports.getAllNodes = exports.AutomationsClient = exports.RenderClient = exports.OrganizationClient = exports.StatsClient = exports.PostsClient = exports.TasksClient = exports.AccountsClient = exports.UGCClient = void 0;
8
+ exports.CommentsClient = exports.MediaClient = exports.PortIdSchema = exports.normalizeToPortId = exports.portIdToTitle = exports.isValidPortId = exports.portId = exports.normalizePortTypes = exports.normalizePortType = exports.toLegacyPortType = exports.fromLegacyPortType = exports.isLegacyPortType = exports.formatPortType = exports.portType = exports.isImageToVideoModel = exports.isEditModel = exports.isAsyncExecutor = exports.NodeTypes = exports.extractTemplateVariables = exports.isInputPortRequired = exports.computeOutputPorts = exports.computeInputPorts = exports.areTypesCompatible = exports.getOutputSchema = exports.getNodeByType = exports.getAllNodes = exports.AutomationsClient = exports.RenderClient = exports.OrganizationClient = exports.StatsClient = exports.PostsClient = exports.TasksClient = exports.AccountsClient = exports.UGCClient = void 0;
9
9
  var client_1 = require("./client");
10
10
  Object.defineProperty(exports, "UGCClient", { enumerable: true, get: function () { return client_1.UGCClient; } });
11
11
  var accounts_1 = require("./accounts");
@@ -36,6 +36,13 @@ Object.defineProperty(exports, "NodeTypes", { enumerable: true, get: function ()
36
36
  Object.defineProperty(exports, "isAsyncExecutor", { enumerable: true, get: function () { return types_1.isAsyncExecutor; } });
37
37
  Object.defineProperty(exports, "isEditModel", { enumerable: true, get: function () { return types_1.isEditModel; } });
38
38
  Object.defineProperty(exports, "isImageToVideoModel", { enumerable: true, get: function () { return types_1.isImageToVideoModel; } });
39
+ Object.defineProperty(exports, "portType", { enumerable: true, get: function () { return types_1.portType; } });
40
+ Object.defineProperty(exports, "formatPortType", { enumerable: true, get: function () { return types_1.formatPortType; } });
41
+ Object.defineProperty(exports, "isLegacyPortType", { enumerable: true, get: function () { return types_1.isLegacyPortType; } });
42
+ Object.defineProperty(exports, "fromLegacyPortType", { enumerable: true, get: function () { return types_1.fromLegacyPortType; } });
43
+ Object.defineProperty(exports, "toLegacyPortType", { enumerable: true, get: function () { return types_1.toLegacyPortType; } });
44
+ Object.defineProperty(exports, "normalizePortType", { enumerable: true, get: function () { return types_1.normalizePortType; } });
45
+ Object.defineProperty(exports, "normalizePortTypes", { enumerable: true, get: function () { return types_1.normalizePortTypes; } });
39
46
  var port_id_1 = require("./port-id");
40
47
  Object.defineProperty(exports, "portId", { enumerable: true, get: function () { return port_id_1.portId; } });
41
48
  Object.defineProperty(exports, "isValidPortId", { enumerable: true, get: function () { return port_id_1.isValidPortId; } });
package/dist/ports.js CHANGED
@@ -43,7 +43,7 @@ function computeInputPorts({ node }) {
43
43
  return baseInputs;
44
44
  return variables.map(variable => ({
45
45
  id: variable,
46
- type: (0, types_1.portType)('text'),
46
+ type: (0, types_1.portType)({ type: 'text', isArray: false }),
47
47
  required: false,
48
48
  }));
49
49
  }
@@ -57,7 +57,7 @@ function computeInputPorts({ node }) {
57
57
  if (editorConfig.backgroundType !== 'color') {
58
58
  dynamicInputs.push({
59
59
  id: 'background',
60
- type: (0, types_1.portType)('image'),
60
+ type: (0, types_1.portType)({ type: 'image', isArray: false }),
61
61
  required: true,
62
62
  });
63
63
  }
@@ -66,14 +66,14 @@ function computeInputPorts({ node }) {
66
66
  if (elem.type === 'image' && elem.inputId) {
67
67
  dynamicInputs.push({
68
68
  id: elem.inputId,
69
- type: (0, types_1.portType)('image'),
69
+ type: (0, types_1.portType)({ type: 'image', isArray: false }),
70
70
  required: true,
71
71
  });
72
72
  }
73
73
  else if (elem.type === 'text' && elem.textInputId) {
74
74
  dynamicInputs.push({
75
75
  id: elem.textInputId,
76
- type: (0, types_1.portType)('text'),
76
+ type: (0, types_1.portType)({ type: 'text', isArray: false }),
77
77
  required: true,
78
78
  });
79
79
  }
@@ -91,7 +91,7 @@ function computeInputPorts({ node }) {
91
91
  addedCropInputs.add(inputRef);
92
92
  dynamicInputs.push({
93
93
  id: inputRef,
94
- type: (0, types_1.portType)('text'),
94
+ type: (0, types_1.portType)({ type: 'text', isArray: false }),
95
95
  required: false,
96
96
  });
97
97
  }
@@ -109,9 +109,9 @@ function computeInputPorts({ node }) {
109
109
  channel.segments.forEach(segment => {
110
110
  if ('inputRef' in segment && segment.inputRef && !addedIds.has(segment.inputRef)) {
111
111
  addedIds.add(segment.inputRef);
112
- const inputType = segment.type === 'video' ? (0, types_1.portType)('video')
113
- : segment.type === 'audio' ? (0, types_1.portType)('audio')
114
- : (0, types_1.portType)('image');
112
+ const inputType = segment.type === 'video' ? (0, types_1.portType)({ type: 'video', isArray: false })
113
+ : segment.type === 'audio' ? (0, types_1.portType)({ type: 'audio', isArray: false })
114
+ : (0, types_1.portType)({ type: 'image', isArray: false });
115
115
  dynamicInputs.push({
116
116
  id: segment.inputRef,
117
117
  type: inputType,
@@ -122,7 +122,7 @@ function computeInputPorts({ node }) {
122
122
  addedIds.add(segment.textInputRef);
123
123
  dynamicInputs.push({
124
124
  id: segment.textInputRef,
125
- type: (0, types_1.portType)('text'),
125
+ type: (0, types_1.portType)({ type: 'text', isArray: false }),
126
126
  required: true,
127
127
  });
128
128
  }
@@ -145,7 +145,7 @@ function computeInputPorts({ node }) {
145
145
  const varType = v.variableType === 'dropdown' ? 'text' : (v.variableType ?? 'text');
146
146
  return {
147
147
  id: v.id,
148
- type: (0, types_1.portType)(varType),
148
+ type: (0, types_1.portType)({ type: varType, isArray: false }),
149
149
  required: false,
150
150
  };
151
151
  });
@@ -158,7 +158,7 @@ function computeInputPorts({ node }) {
158
158
  return baseInputs;
159
159
  return configInputs.map((input) => ({
160
160
  id: input.id,
161
- type: (0, types_1.portType)(input.type, input.isArray ?? false),
161
+ type: (0, types_1.portType)({ type: input.type, isArray: input.isArray ?? false }),
162
162
  required: false,
163
163
  }));
164
164
  }
@@ -169,14 +169,14 @@ function computeInputPorts({ node }) {
169
169
  const dynamicInputs = [];
170
170
  if (mode === 'video') {
171
171
  // Video mode: video input required
172
- dynamicInputs.push({ id: 'video', type: (0, types_1.portType)('video'), required: true });
172
+ dynamicInputs.push({ id: 'video', type: (0, types_1.portType)({ type: 'video', isArray: false }), required: true });
173
173
  }
174
174
  else {
175
175
  // Slideshow mode
176
176
  const inputType = autoPostConfig?.inputType ?? 'static';
177
177
  if (inputType === 'variable') {
178
178
  // Variable mode: single images array port
179
- dynamicInputs.push({ id: 'images', type: (0, types_1.portType)('object'), required: true });
179
+ dynamicInputs.push({ id: 'images', type: (0, types_1.portType)({ type: 'object', isArray: false }), required: true });
180
180
  }
181
181
  else {
182
182
  // Static mode: individual image inputs
@@ -186,15 +186,15 @@ function computeInputPorts({ node }) {
186
186
  { id: 'image3' },
187
187
  ];
188
188
  imageInputs.forEach((input) => {
189
- dynamicInputs.push({ id: input.id, type: (0, types_1.portType)('image'), required: true });
189
+ dynamicInputs.push({ id: input.id, type: (0, types_1.portType)({ type: 'image', isArray: false }), required: true });
190
190
  });
191
191
  }
192
192
  }
193
193
  // Add static inputs (same for both modes)
194
- dynamicInputs.push({ id: 'account', type: (0, types_1.portType)('account'), required: true }, { id: 'caption', type: (0, types_1.portType)('text'), required: false });
194
+ dynamicInputs.push({ id: 'account', type: (0, types_1.portType)({ type: 'account', isArray: false }), required: true }, { id: 'caption', type: (0, types_1.portType)({ type: 'text', isArray: false }), required: false });
195
195
  // Only add social-audio port if isVariable is true
196
196
  if (autoPostConfig?.socialAudio?.isVariable) {
197
- dynamicInputs.push({ id: 'social-audio', type: (0, types_1.portType)('audio'), required: false });
197
+ dynamicInputs.push({ id: 'social-audio', type: (0, types_1.portType)({ type: 'audio', isArray: false }), required: false });
198
198
  }
199
199
  return dynamicInputs;
200
200
  }
@@ -206,7 +206,7 @@ function computeInputPorts({ node }) {
206
206
  return baseInputs;
207
207
  return configInputs.map((input) => ({
208
208
  id: input.id,
209
- type: (0, types_1.portType)(input.type),
209
+ type: (0, types_1.portType)({ type: input.type, isArray: false }),
210
210
  required: true,
211
211
  }));
212
212
  }
@@ -220,13 +220,13 @@ function computeInputPorts({ node }) {
220
220
  const variables = extractTemplateVariables([systemPrompt]);
221
221
  variables.forEach(v => dynamicInputs.push({
222
222
  id: v,
223
- type: [(0, types_1.portType)('text'), (0, types_1.portType)('object'), (0, types_1.portType)('boolean')],
223
+ type: [(0, types_1.portType)({ type: 'text', isArray: false }), (0, types_1.portType)({ type: 'object', isArray: false }), (0, types_1.portType)({ type: 'boolean', isArray: false })],
224
224
  required: true,
225
225
  }));
226
226
  // Add image input refs
227
- llmConfig?.imageInputRefs?.forEach((ref) => dynamicInputs.push({ id: ref, type: (0, types_1.portType)('image'), required: true }));
227
+ llmConfig?.imageInputRefs?.forEach((ref) => dynamicInputs.push({ id: ref, type: (0, types_1.portType)({ type: 'image', isArray: false }), required: true }));
228
228
  // Add video input refs
229
- llmConfig?.videoInputRefs?.forEach((ref) => dynamicInputs.push({ id: ref, type: (0, types_1.portType)('video'), required: true }));
229
+ llmConfig?.videoInputRefs?.forEach((ref) => dynamicInputs.push({ id: ref, type: (0, types_1.portType)({ type: 'video', isArray: false }), required: true }));
230
230
  return dynamicInputs.length > 0 ? dynamicInputs : baseInputs;
231
231
  }
232
232
  // For-each nodes: array input + passthrough inputs
@@ -234,10 +234,10 @@ function computeInputPorts({ node }) {
234
234
  const forEachConfig = node.config?.forEachConfig;
235
235
  const inputPorts = forEachConfig?.inputPorts ?? [];
236
236
  return [
237
- { id: 'array', type: (0, types_1.portType)('object'), required: true },
237
+ { id: 'array', type: (0, types_1.portType)({ type: 'object', isArray: false }), required: true },
238
238
  ...inputPorts.map((port) => ({
239
239
  id: port.id,
240
- type: (0, types_1.portType)(port.type, port.isArray ?? false),
240
+ type: (0, types_1.portType)({ type: port.type, isArray: port.isArray ?? false }),
241
241
  required: false,
242
242
  })),
243
243
  ];
@@ -256,11 +256,11 @@ function computeInputPorts({ node }) {
256
256
  }
257
257
  // Transcript nodes: media input
258
258
  if (node.type === 'transcript') {
259
- return [{ id: 'media', type: [(0, types_1.portType)('video'), (0, types_1.portType)('audio')], required: true }];
259
+ return [{ id: 'media', type: [(0, types_1.portType)({ type: 'video', isArray: false }), (0, types_1.portType)({ type: 'audio', isArray: false })], required: true }];
260
260
  }
261
261
  // Video import nodes: url input
262
262
  if (node.type === 'video-import') {
263
- return [{ id: 'url', type: (0, types_1.portType)('text'), required: true }];
263
+ return [{ id: 'url', type: (0, types_1.portType)({ type: 'text', isArray: false }), required: true }];
264
264
  }
265
265
  // Image Generation nodes: prompt + optional image for edit models
266
266
  if (node.type === 'generate-image') {
@@ -268,10 +268,10 @@ function computeInputPorts({ node }) {
268
268
  const model = imageGenConfig?.model ?? '';
269
269
  const isEditModel = model.includes('/edit');
270
270
  const dynamicInputs = [
271
- { id: 'prompt', type: (0, types_1.portType)('text'), required: true },
271
+ { id: 'prompt', type: (0, types_1.portType)({ type: 'text', isArray: false }), required: true },
272
272
  ];
273
273
  if (isEditModel) {
274
- dynamicInputs.push({ id: 'image', type: (0, types_1.portType)('image'), required: true });
274
+ dynamicInputs.push({ id: 'image', type: (0, types_1.portType)({ type: 'image', isArray: false }), required: true });
275
275
  }
276
276
  return dynamicInputs;
277
277
  }
@@ -287,7 +287,7 @@ function computeInputPorts({ node }) {
287
287
  : 'text';
288
288
  dynamicInputs.push({
289
289
  id: param.name,
290
- type: (0, types_1.portType)(pType),
290
+ type: (0, types_1.portType)({ type: pType, isArray: false }),
291
291
  required: param.required,
292
292
  });
293
293
  }
@@ -296,7 +296,7 @@ function computeInputPorts({ node }) {
296
296
  }
297
297
  // Deduplicate nodes: video input
298
298
  if (node.type === 'deduplicate') {
299
- return [{ id: 'video', type: (0, types_1.portType)('video'), required: true }];
299
+ return [{ id: 'video', type: (0, types_1.portType)({ type: 'video', isArray: false }), required: true }];
300
300
  }
301
301
  return baseInputs;
302
302
  }
package/dist/types.d.ts CHANGED
@@ -772,7 +772,10 @@ export interface PortType {
772
772
  /**
773
773
  * Helper to create a PortType descriptor
774
774
  */
775
- export declare function portType(type: BasePortType, isArray?: boolean): PortType;
775
+ export declare function portType({ type, isArray }: {
776
+ type: BasePortType;
777
+ isArray: boolean;
778
+ }): PortType;
776
779
  /**
777
780
  * Format a PortType for display (e.g., { type: 'image', isArray: true } -> 'image[]')
778
781
  */
package/dist/types.js CHANGED
@@ -14,7 +14,7 @@ exports.isAsyncExecutor = isAsyncExecutor;
14
14
  /**
15
15
  * Helper to create a PortType descriptor
16
16
  */
17
- function portType(type, isArray = false) {
17
+ function portType({ type, isArray }) {
18
18
  return { type, isArray };
19
19
  }
20
20
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "4.0.0",
3
+ "version": "4.0.2",
4
4
  "description": "TypeScript/JavaScript client for the UGC Inc API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",