@lcap/nasl
Version:
NetEase Application Specific Language
159 lines • 5.88 kB
TypeScript
import { App, View, Logic, BaseNode, Frontend, Module, Structure, Connection, Connector } from '../../concepts';
import { TranslatorState } from '../../translator';
import * as nasl from '../../index';
export interface Snippet {
description: string;
code: string;
codeWithDetail?: string;
namespace?: string;
}
export interface SnippetBlock {
namespace: string;
data: Snippet[];
}
export declare const wrapTSBlock: (code: string) => string;
export declare function getReferenceStructures(referenceStructures: {
typeNamespace: string;
typeName: string;
}[], structures: Structure[]): {
typeNamespace: string;
typeName: string;
}[];
export declare function getLogicWithStructuresCode(logic: Logic, type: string, desc: {
description: string;
codeStr: string;
}, namespace: string): string;
export declare function getNaslCore(logicType: string): {
code: string;
naslCore: string;
};
export declare function getNaslUtil(): {
code: string;
naslUtil: string;
};
export declare const getNaslUI: (app: App, frontendType: 'pc' | 'h5', material: {
basicMaterials: 'pc' | 'h5' | {
json: any;
tsDeclaration: string;
allNodesAPI: any;
};
extensionMaterials: 'pc' | 'h5' | {
name: string;
title: string;
description: string;
tsDescription: string;
}[];
}, notUseBasicMaterial?: boolean) => {
naslUI: any;
allNodesAPI: {};
};
export declare const getNaslUICode: (naslUI: any, codeType: 'detail' | 'short', requiredIndexes?: string[]) => {
requiredIndexesName: any;
code: string;
};
export declare const getNaslUIOld: () => {
code: string;
naslUI: string;
};
export declare function getNaslOQL(): {
code: string;
naslOql: string;
};
export declare function getEnums(app: App, state: TranslatorState, restParams?: any): {
namespace: string;
enums: {
namespace: string;
data: nasl.Snippet[];
};
};
export declare const getEnumsCode: (enums: any) => string;
export declare function getEntities(app: App, state: TranslatorState): {
entities: nasl.SnippetBlock[];
};
export declare const getEntitiesCode: (entities: any) => string;
export declare function getStructures(app: App, state: TranslatorState): {
structures: {
namespace: string;
data: nasl.Snippet[];
};
};
export declare const getStructuresCode: (structures: any) => string;
export declare function getLogics(app: App, currentNode: BaseNode, state: TranslatorState, restParams?: any): {
appLogics: {
namespace: string;
data: nasl.Snippet[];
};
};
export declare const getLogicsCode: (appLogics: any, codeType: 'detail' | 'short', requiredIndexes?: string[]) => string;
export declare function getModuleInterfaces(modules: Module[], state: TranslatorState, restParams?: any): {
interfaceDependencies: {
name: string;
structures: SnippetBlock;
logics: SnippetBlock;
}[];
};
export declare const getModuleInterfacesCode: (interfaceDependencies: any, codeType: 'detail' | 'short', requiredIndexes?: string[]) => string;
export declare function getConnections(modules: Connection[], state: TranslatorState, restParams?: any): {
connections: {
name: string;
structures: SnippetBlock;
logics: SnippetBlock;
}[];
};
export declare function getConnectors(app: any, modules: Connector[], state: TranslatorState, restParams?: any): {
connectors: {
name: string;
connections: string;
structures: SnippetBlock;
logics: SnippetBlock[];
}[];
};
export declare const getConnectorsCode: (connections: any, codeType: 'detail' | 'short', requiredIndexes?: string[]) => string;
export declare function getDependencies(modules: Module[], state: TranslatorState, logicType: any, frontendType: 'pc' | 'h5', restParams?: any): {
dependencies: {
name: string;
structures: SnippetBlock;
logics: SnippetBlock;
}[];
};
export declare const getDependenciesCode: (dependencies: any, codeType: 'detail' | 'short', requiredIndexes?: string[]) => string;
export declare function getFrontendVariables(frontend: Frontend, state: TranslatorState): {
namespace: string;
frontendVariables: {
namespace: string;
data: nasl.Snippet[];
};
};
export declare function getServerVariables(app: App, state: TranslatorState): {
namespace: string;
backendVariables: {
namespace: string;
data: nasl.Snippet[];
};
};
export declare const getVariablesCode: (variables: any) => string;
export declare function getChildrenViews(view: View, currentNode: BaseNode, convertChildren: boolean, prefix: string): nasl.Snippet[];
export declare function getFrontendViews(frontend: Frontend, state: TranslatorState, currentNode: BaseNode, convertChildren: boolean): {
code: string;
views: {
namespace: string;
data: nasl.Snippet[];
};
};
export declare const getFrontendViewsCode: (views: any) => string;
export declare function getCurrentLogicCode(logic: Logic, focusedNodePath: string, restParams: any, state?: TranslatorState): string;
export declare function getCurrentNodeContext(currentNode: BaseNode, focusedNodePath?: string, experimental?: boolean, restParams?: any): {
code: string;
currentNodeContext: string;
currentView: string;
currentLogic: string;
};
export declare function getCurrentNodeContextForUI(currentNode: BaseNode, typeMap?: any): {
code: string;
currentNodeContext: string;
};
export declare function removeUnnecessary(componentDeclaration: string, requiredIndexesName: string[], codeType: string): string;
export declare function getCurrentComponentDeclaration(activeDesignerNode: any, allNodesAPI: any): {
componentDeclaration: string;
};
//# sourceMappingURL=index.d.ts.map