@lcap/asl
Version:
NetEase Application Specific Language
105 lines (104 loc) • 2.33 kB
TypeScript
import { LEVEL_ENUM, Vertex, DataNode, ObjectSchema, Service, StructureProperty, ActionOptions } from '..';
/**
* 数据结构类
*/
export declare class Structure extends Vertex implements ObjectSchema {
/**
* 概念类型
*/
readonly level: LEVEL_ENUM;
/**
* Id
*/
readonly id: string;
/**
* dataTypes 中的唯一标识
*/
readonly schemaRef: string;
/**
* 名称
*/
readonly name: string;
/**
* 描述
*/
readonly description: string;
/**
* 类型
*/
readonly type: 'object';
/**
* 属性列表
*/
readonly propertyList: Array<StructureProperty>;
readonly resolvers: string;
/**
* 所属服务 Id
*/
readonly serviceId: string;
/**
* catogory Name
*/
readonly category: string;
/**
* 所属服务类型
*/
readonly serviceType: string;
/**
* 所属实体 Id
*/
readonly entityId: string;
/**
* 所属服务
*/
readonly service: Service;
/**
* 父节点
*/
readonly dataNode: DataNode;
/**
* 周边存在的名称
*/
existingNames: Array<string>;
/**
* 周边存在的名称
*/
constructor(source?: Partial<Structure>);
/**
* 按当前 id 加载数据结构数据
* @requires this.id
*/
load(): Promise<this>;
/**
* 按当前 id 加载数据结构数据
* @requires this.id
*/
loadPro(): Promise<this>;
/**
* 添加数据结构
*/
create(none?: void, actionOptions?: ActionOptions, then?: () => Promise<any>): Promise<this>;
/**
* 删除数据结构
*/
delete(none?: void, actionOptions?: ActionOptions): Promise<void>;
/**
* 修改数据结构
*/
update(none?: void, actionOptions?: ActionOptions, then?: () => Promise<any>): Promise<this>;
/**
* 设置数据结构名称
* @param name 名称
*/
setName(name: string): Promise<void>;
/**
* 设置数据结构描述
* @param description 描述
*/
setDescription(description: string): Promise<void>;
/**
* 从后端 JSON 生成规范的 Structure 对象
*/
static from(source: any, service: Service): Structure;
}
export default Structure;