From 6d7e8a3c9bcff327dd7c2051a6a8a728ea3e29fb Mon Sep 17 00:00:00 2001 From: Emir Karabeg Date: Thu, 16 Jan 2025 11:37:50 -0800 Subject: [PATCH] Finalized output type structure --- blocks/configs/api.ts | 4 +--- blocks/configs/conditional.ts | 4 +--- blocks/types/block.ts | 4 ++-- 3 files changed, 4 insertions(+), 8 deletions(-) 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