feat: end node typs and mock

This commit is contained in:
Joel 2024-02-21 18:38:52 +08:00
parent 3341077587
commit dbf3b7ad6d
2 changed files with 33 additions and 0 deletions

View File

@ -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'],
},
],
},
}

View File

@ -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[]
}
}