UNPKG

@tachybase/module-workflow

Version:

A powerful BPM tool that provides foundational support for business automation, with the capability to extend unlimited triggers and nodes.

50 lines (49 loc) 1.47 kB
import { SchemaInitializerItemType } from '@tachybase/client'; import { ISchema } from '@tachybase/schema'; import { PluginWorkflow } from '../../Plugin'; import { UseVariableOptions, VariableOption } from '../../variable'; export type NodeAvailableContext = { engine: PluginWorkflow; workflow: object; upstream: object; branchIndex: number; }; export declare enum BuiltinGroupType { CONTROL = "control", COLLECTION = "collection", EXTENDED = "extended", MANUAL = "manual", ADVANCED = "advanced" } export type GroupType = BuiltinGroupType | string; export declare abstract class Instruction { title: string; type: string; group: GroupType; icon: string; color: string; isHot?: boolean; description?: string; options?: { label: string; value: any; key: string; }[]; fieldset: { [key: string]: ISchema; }; view?: ISchema; scope?: { [key: string]: any; }; components?: { [key: string]: any; }; Component?(props: any): JSX.Element; useVariables?(node: any, options?: UseVariableOptions): VariableOption; useScopeVariables?(node: any, options?: any): VariableOption[]; useCurrentFormVariables?(node: any, options?: any): VariableOption[]; useInitializers?(node: any): SchemaInitializerItemType | null; isAvailable?(ctx: NodeAvailableContext): boolean; end?: boolean | ((node: any) => boolean); }