@lcap/asl
Version:
NetEase Application Specific Language
45 lines (44 loc) • 1.44 kB
TypeScript
import { LEVEL_ENUM, Vertex, Service, Entity, Interface, Process, Structure } from '..';
export interface Category {
level: LEVEL_ENUM.category;
name: string;
categoryInterfaces: Array<Interface>;
categoryStructures: Array<Structure>;
isLeaf: false;
structureExpanded: false;
interfaceExpanded: false;
}
/**
* 数据分类
*/
export declare class GlobalLogicNode extends Vertex {
/**
* 概念类型
*/
readonly level: LEVEL_ENUM;
readonly type: 'logics' | 'interfaces';
globalLogics: Array<Interface>;
entityLogics: Array<Entity>;
processLogics: Array<Process>;
interfaces: Array<Interface>;
structures: Array<Structure>;
categories: Array<Category>;
readonly service: Service;
/**
* @param source 需要合并的部分参数
*/
constructor(source?: Partial<GlobalLogicNode>);
createOrGetCatogory(category: string): Category;
addCategoryInterface(iface: Interface): void;
addCategoryStructure(sturct: Structure): void;
checkExternalInterface(category: string, name: string): {
category: Category;
interface: undefined;
};
removeCategory(categoryInstance: Category): void;
removeCategoryStructure(sturct: Structure): void;
removeInterface(itface: Interface): void;
syncEntityLogics(): void;
syncStructures(structuresOrigin: Array<Structure>): void;
}
export default GlobalLogicNode;