ugcinc 4.1.61 → 4.1.62

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.
@@ -31,3 +31,7 @@ export default _default;
31
31
  export { IfLogicOperators };
32
32
  export type { IfLogicOperator };
33
33
  export type IfNodeConfig = typeof definition.defaults;
34
+ /**
35
+ * Apply logic operator to boolean values.
36
+ */
37
+ export declare function applyLogicOperator(values: boolean[], operator: IfLogicOperator): boolean;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IfLogicOperators = void 0;
4
+ exports.applyLogicOperator = applyLogicOperator;
4
5
  const types_1 = require("./types");
5
6
  // =============================================================================
6
7
  // Config Types
@@ -67,3 +68,28 @@ const definition = (0, types_1.defineNode)({
67
68
  },
68
69
  });
69
70
  exports.default = definition;
71
+ // =============================================================================
72
+ // Utility Functions for If Node Execution
73
+ // =============================================================================
74
+ /**
75
+ * Apply logic operator to boolean values.
76
+ */
77
+ function applyLogicOperator(values, operator) {
78
+ if (values.length === 0) {
79
+ return false;
80
+ }
81
+ switch (operator) {
82
+ case 'and':
83
+ return values.every(v => v);
84
+ case 'or':
85
+ return values.some(v => v);
86
+ case 'xor':
87
+ // XOR: true if odd number of true values
88
+ return values.filter(v => v).length % 2 === 1;
89
+ case 'nor':
90
+ // NOR: true if none are true (NOT OR)
91
+ return !values.some(v => v);
92
+ default:
93
+ return false;
94
+ }
95
+ }
package/dist/index.d.ts CHANGED
@@ -52,7 +52,7 @@ export type { ForEachNodeConfig, ForEachNodeInputs, ForEachNodeOutputs, ForEachO
52
52
  export type { GenerateImageNodeConfig, ImageGenerationTextModel, ImageGenerationEditModel, ImageGenerationModel, ImageModelProvider, ImageModelOption, AspectRatioOption, } from './automations/nodes/generate-image';
53
53
  export type { GenerateVideoNodeConfig, VideoGenerationTextToVideoModel, VideoGenerationImageToVideoModel, VideoGenerationModel, VideoModelProvider, VideoModelTier, VideoAspectRatioOption, VideoDurationOption, VideoModelOption, } from './automations/nodes/generate-video';
54
54
  export type { IfNodeConfig, IfLogicOperator, IfBooleanInput, } from './automations/nodes/if';
55
- export { IfLogicOperators } from './automations/nodes/if';
55
+ export { IfLogicOperators, applyLogicOperator } from './automations/nodes/if';
56
56
  export type { LLMNodeConfig, LLMProvider, LLMApiKeys, } from './automations/nodes/llm';
57
57
  export { LLMProviders } from './automations/nodes/llm';
58
58
  export type { ManualTriggerNodeConfig } from './automations/nodes/manual-trigger';
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.extractWorkflowConfig = exports.generateNodeName = exports.shuffleNodePreview = exports.getPreviewValue = exports.removePreviewForConnection = exports.updatePreviewMapForConnection = exports.computePreviewMap = exports.computeAllNodePreviews = exports.resolveNodePreview = exports.getWorkflowOutputSchema = exports.hasMissingTerminalError = exports.hasMissingTriggerError = exports.getPortErrorsForNode = exports.getErrorNodeIds = exports.validateWorkflow = exports.checkCrossContextViolation = exports.getForEachContext = exports.getConnectedSource = exports.cleanupStaleConnections = exports.removeNodeConnections = exports.removeConnection = exports.addConnection = exports.deriveConnections = exports.createNode = exports.getOutputSchema = exports.getNodeByType = exports.getAllNodes = exports.getInputPreviewValue = exports.computeAllNodePortsWithPreviews = exports.computeAllNodePorts = exports.computePortsWithPreviews = exports.computePortsForNode = exports.areTypesCompatible = exports.submitIMessageDmRenderJob = exports.submitInstagramDmRenderJob = exports.submitAutoCaptionRenderJob = exports.submitScreenshotAnimationRenderJob = exports.submitDeduplicationJob = exports.getRenderJobStatus = exports.submitVideoRenderJob = exports.submitImageRenderJob = exports.CommentsClient = exports.MediaClient = exports.AutomationsClient = exports.OrganizationClient = exports.StatsClient = exports.PostsClient = exports.TasksClient = exports.AccountsClient = exports.UGCClient = void 0;
9
- exports.prepareVideoComposerInput = exports.LLMProviders = exports.IfLogicOperators = exports.resolvePath = exports.indexExpressionToIndexes = exports.resolveUnknownPath = exports.getOutputTypeFromCategory = exports.parseOpenAPIOutputPath = exports.parseOpenAPIInputs = exports.mapOpenAPIType = exports.nodeConfigToCaptionStyle = exports.prepareImageComposerInput = exports.processTemplate = exports.extractTemplateVariables = exports.PortIdSchema = exports.normalizeToPortId = exports.portIdToTitle = exports.isValidPortId = exports.portId = exports.selectFromPool = exports.getModelDurations = exports.getModelAspectRatios = exports.ALL_VIDEO_MODELS = exports.isImageToVideoModel = exports.IMAGE_ASPECT_RATIOS = exports.ALL_IMAGE_MODELS = exports.isEditModel = exports.getNodeDefinition = exports.isPortType = exports.formatPortType = exports.isAsyncExecutor = exports.internalNodeTypes = exports.nodeDefinitions = void 0;
9
+ exports.prepareVideoComposerInput = exports.LLMProviders = exports.applyLogicOperator = exports.IfLogicOperators = exports.resolvePath = exports.indexExpressionToIndexes = exports.resolveUnknownPath = exports.getOutputTypeFromCategory = exports.parseOpenAPIOutputPath = exports.parseOpenAPIInputs = exports.mapOpenAPIType = exports.nodeConfigToCaptionStyle = exports.prepareImageComposerInput = exports.processTemplate = exports.extractTemplateVariables = exports.PortIdSchema = exports.normalizeToPortId = exports.portIdToTitle = exports.isValidPortId = exports.portId = exports.selectFromPool = exports.getModelDurations = exports.getModelAspectRatios = exports.ALL_VIDEO_MODELS = exports.isImageToVideoModel = exports.IMAGE_ASPECT_RATIOS = exports.ALL_IMAGE_MODELS = exports.isEditModel = exports.getNodeDefinition = exports.isPortType = exports.formatPortType = exports.isAsyncExecutor = exports.internalNodeTypes = exports.nodeDefinitions = void 0;
10
10
  // =============================================================================
11
11
  // Client Exports
12
12
  // =============================================================================
@@ -135,6 +135,7 @@ Object.defineProperty(exports, "indexExpressionToIndexes", { enumerable: true, g
135
135
  Object.defineProperty(exports, "resolvePath", { enumerable: true, get: function () { return destructure_1.resolvePath; } });
136
136
  var if_1 = require("./automations/nodes/if");
137
137
  Object.defineProperty(exports, "IfLogicOperators", { enumerable: true, get: function () { return if_1.IfLogicOperators; } });
138
+ Object.defineProperty(exports, "applyLogicOperator", { enumerable: true, get: function () { return if_1.applyLogicOperator; } });
138
139
  var llm_1 = require("./automations/nodes/llm");
139
140
  Object.defineProperty(exports, "LLMProviders", { enumerable: true, get: function () { return llm_1.LLMProviders; } });
140
141
  var video_composer_1 = require("./automations/nodes/video-composer");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "4.1.61",
3
+ "version": "4.1.62",
4
4
  "description": "TypeScript/JavaScript client for the UGC Inc API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",