( executionResult: Pick<ExecutionResult, 'success' | 'logs'> )
| 276 | } |
| 277 | |
| 278 | export const workflowHasResponseBlock = ( |
| 279 | executionResult: Pick<ExecutionResult, 'success' | 'logs'> |
| 280 | ): boolean => { |
| 281 | if (!executionResult?.logs || !Array.isArray(executionResult.logs) || !executionResult.success) { |
| 282 | return false |
| 283 | } |
| 284 | |
| 285 | const responseBlock = executionResult.logs.find( |
| 286 | (log) => log?.blockType === 'response' && log?.success |
| 287 | ) |
| 288 | |
| 289 | return responseBlock !== undefined |
| 290 | } |
| 291 | |
| 292 | export const createHttpResponseFromBlock = async ( |
| 293 | executionResult: Pick<ExecutionResult, 'output'>, |
no outgoing calls
no test coverage detected