mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 13:00:56 +03:00
add custom tool
This commit is contained in:
@@ -2,7 +2,18 @@
|
||||
* Types
|
||||
*/
|
||||
|
||||
export type NodeParamsType = 'options' | 'string' | 'number' | 'boolean' | 'password' | 'json' | 'code' | 'date' | 'file' | 'folder'
|
||||
export type NodeParamsType =
|
||||
| 'asyncOptions'
|
||||
| 'options'
|
||||
| 'string'
|
||||
| 'number'
|
||||
| 'boolean'
|
||||
| 'password'
|
||||
| 'json'
|
||||
| 'code'
|
||||
| 'date'
|
||||
| 'file'
|
||||
| 'folder'
|
||||
|
||||
export type CommonType = string | number | boolean | undefined | null
|
||||
|
||||
@@ -16,6 +27,10 @@ export interface ICommonObject {
|
||||
[key: string]: any | CommonType | ICommonObject | CommonType[] | ICommonObject[]
|
||||
}
|
||||
|
||||
export type IDatabaseEntity = {
|
||||
[key: string]: any
|
||||
}
|
||||
|
||||
export interface IAttachment {
|
||||
content: string
|
||||
contentType: string
|
||||
@@ -50,6 +65,7 @@ export interface INodeParams {
|
||||
placeholder?: string
|
||||
fileType?: string
|
||||
additionalParams?: boolean
|
||||
loadMethod?: string
|
||||
}
|
||||
|
||||
export interface INodeExecutionData {
|
||||
@@ -74,6 +90,9 @@ export interface INodeProperties {
|
||||
export interface INode extends INodeProperties {
|
||||
inputs?: INodeParams[]
|
||||
output?: INodeOutputsValue[]
|
||||
loadMethods?: {
|
||||
[key: string]: (nodeData: INodeData, options?: ICommonObject) => Promise<INodeOptionsValue[]>
|
||||
}
|
||||
init?(nodeData: INodeData, input: string, options?: ICommonObject): Promise<any>
|
||||
run?(nodeData: INodeData, input: string, options?: ICommonObject): Promise<string | ICommonObject>
|
||||
}
|
||||
@@ -83,6 +102,7 @@ export interface INodeData extends INodeProperties {
|
||||
inputs?: ICommonObject
|
||||
outputs?: ICommonObject
|
||||
instance?: any
|
||||
loadMethod?: string // method to load async options
|
||||
}
|
||||
|
||||
export interface IMessage {
|
||||
|
||||
Reference in New Issue
Block a user