Add feature to be able to chain prompt values

This commit is contained in:
Henry
2023-04-16 23:17:08 +01:00
parent 0681a34408
commit 4b9c39cf54
25 changed files with 1496 additions and 246 deletions
+13 -13
View File
@@ -2,18 +2,7 @@
* Types
*/
export type NodeParamsType =
| 'asyncOptions'
| 'options'
| 'string'
| 'number'
| 'boolean'
| 'password'
| 'json'
| 'code'
| 'date'
| 'file'
| 'folder'
export type NodeParamsType = 'options' | 'string' | 'number' | 'boolean' | 'password' | 'json' | 'code' | 'date' | 'file' | 'folder'
export type CommonType = string | number | boolean | undefined | null
@@ -40,6 +29,13 @@ export interface INodeOptionsValue {
description?: string
}
export interface INodeOutputsValue {
label: string
name: string
type: string
description?: string
}
export interface INodeParams {
label: string
name: string
@@ -50,6 +46,7 @@ export interface INodeParams {
optional?: boolean | INodeDisplay
rows?: number
list?: boolean
acceptVariable?: boolean
placeholder?: string
fileType?: string
}
@@ -75,12 +72,15 @@ export interface INodeProperties {
export interface INode extends INodeProperties {
inputs?: INodeParams[]
getInstance?(nodeData: INodeData): Promise<string>
output?: INodeOutputsValue[]
init?(nodeData: INodeData, input: string, options?: ICommonObject): Promise<any>
run?(nodeData: INodeData, input: string, options?: ICommonObject): Promise<string>
}
export interface INodeData extends INodeProperties {
id: string
inputs?: ICommonObject
outputs?: ICommonObject
instance?: any
}