mirror of https://github.com/langgenius/dify.git
feat: end node typs and mock
This commit is contained in:
parent
3341077587
commit
dbf3b7ad6d
|
|
@ -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'],
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
|
|
@ -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[]
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue