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

Function buildFieldsSample

apps/sim/lib/workflows/triggers/run-options.ts:145–155  ·  view source on GitHub ↗
(inputFormat: InputFormatField[])

Source from the content-addressed store, hash-verified

143}
144
145function buildFieldsSample(inputFormat: InputFormatField[]): Record<string, unknown> {
146 const sample: Record<string, unknown> = {}
147 for (const field of inputFormat) {
148 if (!field.name) continue
149 sample[field.name] =
150 field.value !== undefined && field.value !== null
151 ? coerceValue(field.type, field.value)
152 : mockValueForType(field.type, field.name)
153 }
154 return sample
155}
156
157function resolveEventTriggerId(block: TriggerBlockLike): string {
158 const selected = readSubBlockValue(block, 'selectedTriggerId')

Callers 1

buildTriggerRunOptionFunction · 0.85

Calls 2

coerceValueFunction · 0.90
mockValueForTypeFunction · 0.85

Tested by

no test coverage detected