diff --git a/web/app/components/workflow/nodes/end/mock.ts b/web/app/components/workflow/nodes/end/mock.ts new file mode 100644 index 0000000000..effe7c3182 --- /dev/null +++ b/web/app/components/workflow/nodes/end/mock.ts @@ -0,0 +1,18 @@ +import { EndVarType } from './types' +import type { EndNodeType } from './types' + +export const mockData: EndNodeType = { + title: 'Test', + desc: 'Test', + type: 'Test', + outputs: { + type: EndVarType.none, + plain_text_selector: ['test'], + structured_variables: [ + { + variable: 'test', + value_selector: ['aaa', 'name'], + }, + ], + }, +} diff --git a/web/app/components/workflow/nodes/end/types.ts b/web/app/components/workflow/nodes/end/types.ts new file mode 100644 index 0000000000..3386ed9ec6 --- /dev/null +++ b/web/app/components/workflow/nodes/end/types.ts @@ -0,0 +1,15 @@ +import type { CommonNodeType, Variable } from '@/app/components/workflow/types' + +export enum EndVarType { + none = 'none', + plainText = 'plain-text', + structured = 'structured', +} + +export type EndNodeType = CommonNodeType & { + outputs: { + type: EndVarType + plain_text_selector?: string[] + structured_variables?: Variable[] + } +}