import { TranslatorState, TranslatorGenerator } from '@lcap/nasl-translator'; import Logic from './Logic__'; import type View from './View__'; import type BusinessComponent from './BusinessComponent__'; import { GetCode, Range } from './utils/quick-info'; import type { ElementToVueOptions } from './ViewElement__'; import type { TypeParam } from './TypeParam__'; import * as types from './utils/types'; import LogicItem from './LogicItem__'; import type TypeAnnotation from './TypeAnnotation__'; import type Argument from './Argument__'; import type BindAttribute from './BindAttribute__'; /** * 调用逻辑 */ export declare class CallLogic extends LogicItem { /** 类名 */ static readonly ConceptName: string; /** * 是否为抽象类 * 抽象类不能产生 concept: string */ static isAbstract: boolean; /** 继承链 */ static readonly inheritanceChain: string[]; /** * 产品概念 */ readonly concept: 'CallLogic' | 'CallConnector'; /** * 唯一标识 */ uuid?: string; /** * calleeNamespace * @warning @error 这个不符合 NASL 定义,实际中可空 */ calleeNamespace: string; /** * calleeName */ calleeName: string; /** * shortcut */ shortcut?: boolean; /** * handleError */ handleError?: boolean; /** * 类型参数 */ typeArguments?: Array; /** * 实际参数 */ arguments: Array; /** * 验证规则 */ validation?: BindAttribute; /** * 是否被折叠 */ isAdvancedSettingFolded?: boolean; /** * @param source 需要合并的部分参数 */ constructor(source?: Partial); static from(source: any, parentNode?: any, parentKey?: string): CallLogic; /** * 设置验证规则 */ setValidation(validation: BindAttribute): void; /** * 设置是否被折叠 */ setIsAdvancedSettingFolded(isAdvancedSettingFolded: boolean): void; /** * 插入类型标注 * @internal * @param typeAnnotationOptions 类型标注参数 */ _insertTypeAnnotationAt(typeAnnotationOptions: Partial, index: number): TypeAnnotation; /** * 插入类型标注 * @internal * @param typeAnnotation 已有的类型标注实例 */ _insertTypeAnnotationAt(typeAnnotation: TypeAnnotation, index: number): TypeAnnotation; /** * 插入类型标注 * @param typeAnnotationOptions 类型标注参数 */ insertTypeAnnotationAt(typeAnnotationOptions: Partial, index: number): TypeAnnotation; /** * 插入类型标注 * @param typeAnnotation 已有的类型标注实例 */ insertTypeAnnotationAt(typeAnnotation: TypeAnnotation, index: number): TypeAnnotation; /** * 添加类型标注 * @internal * @param typeAnnotationOptions 类型标注参数 */ _addTypeAnnotation(typeAnnotationOptions: Partial): TypeAnnotation; /** * 添加类型标注 * @internal * @param typeAnnotation 已有的类型标注实例 */ _addTypeAnnotation(typeAnnotation: TypeAnnotation): TypeAnnotation; /** * 添加类型标注 * @param typeAnnotationOptions 类型标注参数 */ addTypeAnnotation(typeAnnotationOptions: Partial): TypeAnnotation; /** * 添加类型标注 * @param typeAnnotation 已有的类型标注实例 */ addTypeAnnotation(typeAnnotation: TypeAnnotation): TypeAnnotation; /** * 插入实际参数 * @internal * @param argumentOptions 实际参数参数 */ _insertArgumentAt(argumentOptions: Partial, index: number): Argument; /** * 插入实际参数 * @internal * @param argument 已有的实际参数实例 */ _insertArgumentAt(argument: Argument, index: number): Argument; /** * 插入实际参数 * @param argumentOptions 实际参数参数 */ insertArgumentAt(argumentOptions: Partial, index: number): Argument; /** * 插入实际参数 * @param argument 已有的实际参数实例 */ insertArgumentAt(argument: Argument, index: number): Argument; /** * 添加实际参数 * @internal * @param argumentOptions 实际参数参数 */ _addArgument(argumentOptions: Partial): Argument; /** * 添加实际参数 * @internal * @param argument 已有的实际参数实例 */ _addArgument(argument: Argument): Argument; /** * 添加实际参数 * @param argumentOptions 实际参数参数 */ addArgument(argumentOptions: Partial): Argument; /** * 添加实际参数 * @param argument 已有的实际参数实例 */ addArgument(argument: Argument): Argument; /** * 删除类型标注 * @param typeAnnotation 已有的类型标注实例 */ removeTypeAnnotation(typeAnnotation: TypeAnnotation): void; /** * 删除实际参数 * @param argument 已有的实际参数实例 */ removeArgument(argument: Argument): void; name?: string; get tsCalleeNamespace(): string; get calleewholeKey(): string; get calleeKey(): string; /** * 设置argment 触发别的地方的更新 */ setArgumentName({ argument }: { argument: Argument[]; }): void; /** * 设置setCalleeName */ setCalleeName(calleeName: string): void; /** * 设置calleeNamespace */ setCalleeNamespace(calleeNamespace: string): void; errorMessage?: types.LogicItemNode; setErrorMessage(errorMessage: types.LogicItemNode): void; /** * 设置 handleError */ setHandleError(handleError: boolean): void; _setCallee(logic: Logic): void; setCallee(logic: Logic, argument?: Argument): void; addCalleeArg(logic: Logic): void; deleteCalleeArg(argIndex: number): void; toVue(options?: ElementToVueOptions): string; toUI(state?: TranslatorState, hideDetails?: boolean): string; get isViewLogic(): boolean; get isFrontendLibrary(): boolean; get isComponentLogic(): boolean; /** * 是否属于新流程逻辑 */ get isProcessV2Logic(): boolean; /** * 对应的流程 */ get correspondingProcessV2(): import("./ProcessV2__").ProcessV2; getToStringMessage(context?: string): string; toJS(state?: TranslatorState, options?: { config: { connectionName: string; }; }): string; toBrief(): string; get useValidation(): boolean; get useIife(): boolean; get isSpecificProcessLogic(): boolean; get isProcessLibrarySystemLogic(): boolean; shouldCheckErrorMessage(): boolean; toEmbeddedTS(state?: import("@lcap/nasl-types/out/translator").TranslatorState): TranslatorGenerator; toNaturalTS(state?: import("@lcap/nasl-types/out/translator").TranslatorState): string; toTextualNASL(state?: import("@lcap/nasl-types/out/translator").TranslatorState): string; get likeComponent(): View | BusinessComponent; getCallNode(): Logic | undefined; private getElementTagByLogic; getCallNodeUsingCache(frontNdCache: Map, serverNdCache: Map, processNdCache: Map, viewLike: View | BusinessComponent): ['front' | 'server' | 'process', Logic | undefined]; /** 获取类型标注时的偏移量 */ getQuickInfoOffset(range: Range, getCode: GetCode): { line: number; offset: number; }; /** * 是否允许验证规则 * - 当前元素在前端,但是调用的函数在后端 */ enableValidation(): boolean; get completeArguments(): Argument[]; __TypeArguments?: Array; /** * 获取 例如依赖库 等的 完整 声明的类型参数 */ get completeTypeParams(): TypeParam[]; /** * 获取需要用户手动选择的参数列表 * 如果没有声明参数但是本身有泛型参数列表,也直接输出出来 */ get needCompleteTypeArguments(): TypeAnnotation[]; /** * 获取需要用户手动选择的参数列表 的原始范型参数 */ get needCompleteTypeArgumentGenerics(): TypeParam[]; static isSystem(node: CallLogic): boolean; static getDefaultOptions(): {}; } export default CallLogic; //# sourceMappingURL=CallLogic__.d.ts.map