import { LEVEL_ENUM, Logic, Schema, BaseVariable, ActionOptions } from '..'; /** * 逻辑局部变量 */ export declare class Variable extends BaseVariable { /** * 概念类型 */ readonly level: LEVEL_ENUM; /** * 默认值 * 按 JSON string 处理 * - string: 666 -> '666' * - string: true -> 'true' * - number: 666 -> 666 * - boolean: true -> true */ readonly defaultValue: string; /** * @param source 需要合并的部分参数 */ constructor(source?: Partial); /** * 添加逻辑局部变量 */ create(none?: void, actionOptions?: ActionOptions): Promise; /** * 删除逻辑局部变量 */ delete(none?: void, actionOptions?: ActionOptions): Promise; /** * 修改逻辑局部变量 */ update(none?: void, actionOptions?: ActionOptions, then?: () => Promise): Promise; /** * 设置逻辑局部变量名称 * @param name 名称 */ setName(name: string): Promise; /** * 设置逻辑局部变量描述 * @param description 描述 */ setDescription(description: string): Promise; /** * 查找schema 顶点被引用的逻辑顶点列表 */ getSchemaUsage(): Promise; /** * 设置逻辑局部变量的数据类型 */ setDataType(schema: Schema): Promise; /** * 设置逻辑局部变量是否为列表 * @param isArray */ setAsList(isArray: boolean): Promise; /** * 设置逻辑局部变量的默认值 */ setDefaultValue(defaultValue: string): Promise; /** * 设置逻辑局部变量是否必须 * @param required 必须 */ setRequired(required: boolean): Promise; /** * 从后端 JSON 生成规范的 Variable 对象 */ static from(source: any, logic: Logic): Variable; } export default Variable;