/** * This file is part of the NocoBase (R) project. * Copyright (c) 2020-2024 NocoBase Co., Ltd. * Authors: NocoBase Team. * * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. * For more information, please refer to: https://www.nocobase.com/agreement. */ import type { FlowDefinitionOptions, StepDefinition } from './types'; import { IFlowRepository } from './flow-registry/BaseFlowRegistry'; export declare class FlowDefinition { protected flowRegistry: IFlowRepository; _steps: Map; protected options: Omit; constructor(options: FlowDefinitionOptions, flowRegistry: IFlowRepository); get model(): import(".").FlowModel; get key(): string; get title(): string; set title(title: string); get sort(): number; get on(): import("./types").FlowEvent>; set on(on: import("./types").FlowEvent>); get defaultParams(): Record | ((ctx: import("./flowContext").FlowModelContext) => { [stepKey: string]: { [paramKey: string]: any; }; } | Promise<{ [stepKey: string]: { [paramKey: string]: any; }; }>); get manual(): boolean; set manual(manual: boolean); get steps(): Record>>; getSortedSteps(): [string, FlowStep][]; setOptions(flowOptions: Omit): void; getSteps(): Map; mapSteps(callback: (step: FlowStep) => any): any[]; getStep(stepKey: string): FlowStep; addStep(stepKey: string, flowStep: Omit): FlowStep; setStep(stepKey: string, flowStep: StepDefinition): FlowStep; hasStep(stepKey: string): boolean; moveStep(sourceStepKey: string, targetStepKey: string): void; removeStep(stepKey: string): void; saveStep(step: FlowStep): Promise; destroyStep(stepKey: string): Promise; save(): Promise; destroy(): Promise; remove(): void; toData(): any; serialize(): any; } export declare class FlowStep { protected flowDef: FlowDefinition; protected options: StepDefinition; constructor(options: StepDefinition, flowDef: FlowDefinition); setOptions(stepOptions: Omit): void; get key(): string; get flowKey(): string; get title(): string; set title(title: string); get uiSchema(): Record; const?: any; multipleOf?: number; maximum?: number; exclusiveMaximum?: number; minimum?: number; exclusiveMinimum?: number; maxLength?: number; minLength?: number; pattern?: string | RegExp; maxItems?: number; minItems?: number; uniqueItems?: boolean; maxProperties?: number; minProperties?: number; required?: string | boolean | string[]; format?: string; $ref?: string; $namespace?: string; definitions?: import("@formily/json-schema").SchemaProperties; properties?: import("@formily/json-schema").SchemaProperties; items?: import("@formily/json-schema").SchemaItems; additionalItems?: import("@formily/json-schema").Stringify; patternProperties?: import("@formily/json-schema").SchemaProperties; additionalProperties?: import("@formily/json-schema").Stringify; "x-value"?: any; "x-index"?: number; "x-pattern"?: any; "x-display"?: any; "x-validator"?: any; "x-decorator"?: any; "x-decorator-props"?: any; "x-component"?: any; "x-component-props"?: any; "x-reactions"?: import("@formily/json-schema").SchemaReactions; "x-content"?: any; "x-data"?: any; "x-visible"?: boolean; "x-hidden"?: boolean; "x-disabled"?: boolean; "x-editable"?: boolean; "x-read-only"?: boolean; "x-read-pretty"?: boolean; "x-compile-omitted"?: string[]; }>> | ((ctx: import("./flowContext").FlowRuntimeContext, any>) => Record; const?: any; multipleOf?: number; maximum?: number; exclusiveMaximum?: number; minimum?: number; exclusiveMinimum?: number; maxLength?: number; minLength?: number; pattern?: string | RegExp; maxItems?: number; minItems?: number; uniqueItems?: boolean; maxProperties?: number; minProperties?: number; required?: string | boolean | string[]; format?: string; $ref?: string; $namespace?: string; definitions?: import("@formily/json-schema").SchemaProperties; properties?: import("@formily/json-schema").SchemaProperties; items?: import("@formily/json-schema").SchemaItems; additionalItems?: import("@formily/json-schema").Stringify; patternProperties?: import("@formily/json-schema").SchemaProperties; additionalProperties?: import("@formily/json-schema").Stringify; "x-value"?: any; "x-index"?: number; "x-pattern"?: any; "x-display"?: any; "x-validator"?: any; "x-decorator"?: any; "x-decorator-props"?: any; "x-component"?: any; "x-component-props"?: any; "x-reactions"?: import("@formily/json-schema").SchemaReactions; "x-content"?: any; "x-data"?: any; "x-visible"?: boolean; "x-hidden"?: boolean; "x-disabled"?: boolean; "x-editable"?: boolean; "x-read-only"?: boolean; "x-read-pretty"?: boolean; "x-compile-omitted"?: string[]; }>> | Promise; const?: any; multipleOf?: number; maximum?: number; exclusiveMaximum?: number; minimum?: number; exclusiveMinimum?: number; maxLength?: number; minLength?: number; pattern?: string | RegExp; maxItems?: number; minItems?: number; uniqueItems?: boolean; maxProperties?: number; minProperties?: number; required?: string | boolean | string[]; format?: string; $ref?: string; $namespace?: string; definitions?: import("@formily/json-schema").SchemaProperties; properties?: import("@formily/json-schema").SchemaProperties; items?: import("@formily/json-schema").SchemaItems; additionalItems?: import("@formily/json-schema").Stringify; patternProperties?: import("@formily/json-schema").SchemaProperties; additionalProperties?: import("@formily/json-schema").Stringify; "x-value"?: any; "x-index"?: number; "x-pattern"?: any; "x-display"?: any; "x-validator"?: any; "x-decorator"?: any; "x-decorator-props"?: any; "x-component"?: any; "x-component-props"?: any; "x-reactions"?: import("@formily/json-schema").SchemaReactions; "x-content"?: any; "x-data"?: any; "x-visible"?: boolean; "x-hidden"?: boolean; "x-disabled"?: boolean; "x-editable"?: boolean; "x-read-only"?: boolean; "x-read-pretty"?: boolean; "x-compile-omitted"?: string[]; }>>>); get defaultParams(): Record; set defaultParams(params: Record); get use(): string; save(): Promise; remove(): Promise; destroy(): Promise; serialize(): { flowKey: string; key?: string; isAwait?: boolean; use?: string; sort?: number; preset?: boolean; uiMode?: import("./types").StepUIMode | ((ctx: import("./flowContext").FlowRuntimeContext, any>) => import("./types").StepUIMode | Promise); title?: string; uiSchema?: Record; const?: any; multipleOf?: number; maximum?: number; exclusiveMaximum?: number; minimum?: number; exclusiveMinimum?: number; maxLength?: number; minLength?: number; pattern?: string | RegExp; maxItems?: number; minItems?: number; uniqueItems?: boolean; maxProperties?: number; minProperties?: number; required?: string | boolean | string[]; format?: string; $ref?: string; $namespace?: string; definitions?: import("@formily/json-schema").SchemaProperties; properties?: import("@formily/json-schema").SchemaProperties; items?: import("@formily/json-schema").SchemaItems; additionalItems?: import("@formily/json-schema").Stringify; patternProperties?: import("@formily/json-schema").SchemaProperties; additionalProperties?: import("@formily/json-schema").Stringify; "x-value"?: any; "x-index"?: number; "x-pattern"?: any; "x-display"?: any; "x-validator"?: any; "x-decorator"?: any; "x-decorator-props"?: any; "x-component"?: any; "x-component-props"?: any; "x-reactions"?: import("@formily/json-schema").SchemaReactions; "x-content"?: any; "x-data"?: any; "x-visible"?: boolean; "x-hidden"?: boolean; "x-disabled"?: boolean; "x-editable"?: boolean; "x-read-only"?: boolean; "x-read-pretty"?: boolean; "x-compile-omitted"?: string[]; }>> | ((ctx: import("./flowContext").FlowRuntimeContext, any>) => Record; const?: any; multipleOf?: number; maximum?: number; exclusiveMaximum?: number; minimum?: number; exclusiveMinimum?: number; maxLength?: number; minLength?: number; pattern?: string | RegExp; maxItems?: number; minItems?: number; uniqueItems?: boolean; maxProperties?: number; minProperties?: number; required?: string | boolean | string[]; format?: string; $ref?: string; $namespace?: string; definitions?: import("@formily/json-schema").SchemaProperties; properties?: import("@formily/json-schema").SchemaProperties; items?: import("@formily/json-schema").SchemaItems; additionalItems?: import("@formily/json-schema").Stringify; patternProperties?: import("@formily/json-schema").SchemaProperties; additionalProperties?: import("@formily/json-schema").Stringify; "x-value"?: any; "x-index"?: number; "x-pattern"?: any; "x-display"?: any; "x-validator"?: any; "x-decorator"?: any; "x-decorator-props"?: any; "x-component"?: any; "x-component-props"?: any; "x-reactions"?: import("@formily/json-schema").SchemaReactions; "x-content"?: any; "x-data"?: any; "x-visible"?: boolean; "x-hidden"?: boolean; "x-disabled"?: boolean; "x-editable"?: boolean; "x-read-only"?: boolean; "x-read-pretty"?: boolean; "x-compile-omitted"?: string[]; }>> | Promise; const?: any; multipleOf?: number; maximum?: number; exclusiveMaximum?: number; minimum?: number; exclusiveMinimum?: number; maxLength?: number; minLength?: number; pattern?: string | RegExp; maxItems?: number; minItems?: number; uniqueItems?: boolean; maxProperties?: number; minProperties?: number; required?: string | boolean | string[]; format?: string; $ref?: string; $namespace?: string; definitions?: import("@formily/json-schema").SchemaProperties; properties?: import("@formily/json-schema").SchemaProperties; items?: import("@formily/json-schema").SchemaItems; additionalItems?: import("@formily/json-schema").Stringify; patternProperties?: import("@formily/json-schema").SchemaProperties; additionalProperties?: import("@formily/json-schema").Stringify; "x-value"?: any; "x-index"?: number; "x-pattern"?: any; "x-display"?: any; "x-validator"?: any; "x-decorator"?: any; "x-decorator-props"?: any; "x-component"?: any; "x-component-props"?: any; "x-reactions"?: import("@formily/json-schema").SchemaReactions; "x-content"?: any; "x-data"?: any; "x-visible"?: boolean; "x-hidden"?: boolean; "x-disabled"?: boolean; "x-editable"?: boolean; "x-read-only"?: boolean; "x-read-pretty"?: boolean; "x-compile-omitted"?: string[]; }>>>); defaultParams?: Record | ((ctx: import("./flowContext").FlowRuntimeContext, any>) => Record | Promise>); handler?: (ctx: import("./flowContext").FlowRuntimeContext, any>, params: any) => any; beforeParamsSave?: (ctx: import("./flowContext").FlowSettingsContext>, params: any, previousParams: any) => void | Promise; afterParamsSave?: (ctx: import("./flowContext").FlowSettingsContext>, params: any, previousParams: any) => void | Promise; useRawParams?: boolean | ((ctx: import("./flowContext").FlowRuntimeContext, any>) => boolean | Promise); scene?: import("./types").ActionScene | import("./types").ActionScene[]; paramsRequired?: boolean; hideInSettings?: boolean | ((ctx: import("./flowContext").FlowRuntimeContext, any>) => boolean | Promise); disabledInSettings?: boolean | ((ctx: import("./flowContext").FlowRuntimeContext, any>) => boolean | Promise); disabledReasonInSettings?: string | ((ctx: import("./flowContext").FlowRuntimeContext, any>) => string | Promise); defineProperties?: Record | ((ctx: import("./flowContext").FlowRuntimeContext, any>) => Record | Promise>); defineMethods?: Record, any>, ...args: any[]) => any> | ((ctx: import("./flowContext").FlowRuntimeContext, any>) => Record, any>, ...args: any[]) => any> | Promise, any>, ...args: any[]) => any>>); }; }