MCPcopy Index your code
hub / github.com/simstudioai/sim / applyInputFormatFields

Function applyInputFormatFields

apps/sim/lib/workflows/blocks/block-outputs.ts:147–162  ·  view source on GitHub ↗
(
  inputFormat: InputFormatField[],
  outputs: OutputDefinition
)

Source from the content-addressed store, hash-verified

145}
146
147function applyInputFormatFields(
148 inputFormat: InputFormatField[],
149 outputs: OutputDefinition
150): OutputDefinition {
151 for (const field of inputFormat) {
152 const fieldName = field?.name?.trim()
153 if (!fieldName) continue
154
155 outputs[fieldName] = {
156 type: (field?.type || 'any') as any,
157 description: `Field from input format`,
158 }
159 }
160
161 return outputs
162}
163
164function hasInputFormat(blockConfig: BlockConfig): boolean {
165 return blockConfig.subBlocks?.some((sb) => sb.type === 'input-format') || false

Callers 3

getUnifiedStartOutputsFunction · 0.85
getLegacyStarterOutputsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected