(path: StartBlockPath, execution: StartExecutionKind)
| 146 | } |
| 147 | |
| 148 | function supportsExecution(path: StartBlockPath, execution: StartExecutionKind): boolean { |
| 149 | if (execution === 'external') { |
| 150 | return path === StartBlockPath.EXTERNAL_TRIGGER |
| 151 | } |
| 152 | |
| 153 | if (path === StartBlockPath.UNIFIED || path === StartBlockPath.LEGACY_STARTER) { |
| 154 | return true |
| 155 | } |
| 156 | |
| 157 | if (execution === 'chat') { |
| 158 | return path === StartBlockPath.SPLIT_CHAT |
| 159 | } |
| 160 | |
| 161 | if (execution === 'api') { |
| 162 | return path === StartBlockPath.SPLIT_API || path === StartBlockPath.SPLIT_INPUT |
| 163 | } |
| 164 | |
| 165 | return ( |
| 166 | path === StartBlockPath.SPLIT_API || |
| 167 | path === StartBlockPath.SPLIT_INPUT || |
| 168 | path === StartBlockPath.SPLIT_MANUAL || |
| 169 | path === StartBlockPath.EXTERNAL_TRIGGER |
| 170 | ) |
| 171 | } |
| 172 | |
| 173 | export function resolveStartCandidates<T extends MinimalBlock>( |
| 174 | blocks: Record<string, T> | T[], |
no outgoing calls
no test coverage detected