UNPKG

@botonic/plugin-flow-builder

Version:

Botonic plugin for **Hubtype Flow Builder**: run and bridge flow-driven logic from bots on the **current** line.

57 lines (56 loc) 1.65 kB
import type { HtBaseNode, HtNodeLink } from './common'; import type { HtNodeWithContentType } from './node-types'; export declare enum VariableFormat { Boolean = "boolean", Number = "number", String = "string" } export declare enum StringConditionOperator { Contains = "contains", NotContains = "notContains", EqualsTo = "equalsTo", NotEqualsTo = "notEqualsTo", StartsWith = "startsWith", NotStartsWith = "notStartsWith", EndsWith = "endsWith", NotEndsWith = "notEndsWith" } export interface HtStringCondition { operator: StringConditionOperator; value?: string; target?: HtNodeLink; } export declare enum NumberConditionOperator { EqualsTo = "equalsTo", NotEqualsTo = "notEqualsTo", GreaterThan = "greaterThan", LessThan = "lessThan", GreaterThanOrEqualTo = "greaterThanOrEqualTo", LessThanOrEqualTo = "lessThanOrEqualTo", Between = "between", NotBetween = "notBetween" } export interface HtNumberCondition { operator: NumberConditionOperator; value?: number; min?: number; max?: number; target?: HtNodeLink; } export declare enum BooleanConditionOperator { IsTruthy = "isTruthy" } export interface HtBooleanCondition { operator: BooleanConditionOperator; target?: HtNodeLink; } export type HtCondition = HtStringCondition | HtNumberCondition | HtBooleanCondition; export interface HtCustomConditionalV2Node extends HtBaseNode { type: HtNodeWithContentType.CUSTOM_CONDITION; content: { type: VariableFormat; key_path: string; conditions: HtCondition[]; default_target: HtNodeLink; }; }