@botonic/plugin-flow-builder
Version:
Use Flow Builder to show your contents
37 lines (30 loc) • 792 B
text/typescript
import { HtBaseNode, HtNodeLink } from './common'
import { HtNodeWithContentType } from './node-types'
export enum HtArgumentType {
BOOLEAN = 'boolean',
NUMBER = 'number',
STRING = 'string',
JSON = 'json',
}
export interface HtFunctionArgument {
type: HtArgumentType
name: string
value: string
}
export interface HtFunctionArgumentLocale {
locale: string
values: HtFunctionArgument[]
}
export interface HtFunctionResult {
result: string | boolean | number
target?: HtNodeLink
}
export type HtFunctionArguments = HtFunctionArgumentLocale | HtFunctionArgument
export interface HtFunctionNode extends HtBaseNode {
type: HtNodeWithContentType.FUNCTION
content: {
action: string
arguments: HtFunctionArguments[]
result_mapping: HtFunctionResult[]
}
}