diff --git a/blocks/configs/api.ts b/blocks/configs/api.ts index fe90658c34..fffbd1b42c 100644 --- a/blocks/configs/api.ts +++ b/blocks/configs/api.ts @@ -11,9 +11,7 @@ export const ApiBlock: BlockConfig = { category: 'basic', }, workflow: { - outputType: { - default: 'json' - }, + outputType: 'json', subBlocks: [ { title: 'URL', diff --git a/blocks/configs/conditional.ts b/blocks/configs/conditional.ts index 8a2e6be6dc..aec538a120 100644 --- a/blocks/configs/conditional.ts +++ b/blocks/configs/conditional.ts @@ -11,9 +11,7 @@ export const ConditionalBlock: BlockConfig = { category: 'basic', }, workflow: { - outputType: { - default: 'boolean' - }, + outputType: 'boolean', subBlocks: [ { title: 'Condition Type', diff --git a/blocks/types/block.ts b/blocks/types/block.ts index 66039a1d12..9e7f00653e 100644 --- a/blocks/types/block.ts +++ b/blocks/types/block.ts @@ -22,9 +22,9 @@ export interface SubBlockConfig { password?: boolean } -export interface OutputTypeConfig { +export type OutputTypeConfig = OutputType | { default: OutputType - dependsOn?: { + dependsOn: { subBlockId: string condition: { whenEmpty: OutputType