import { Resource } from '../entity';
import { MagicResourceService } from './core';
import { MagicDefinition } from './magic.provide';
import { Application } from '@midwayjs/koa';
export declare class MagicFunction implements MagicDefinition {
    type: string;
    magicResourceService: MagicResourceService;
    private logger;
    app: Application;
    private functionMap;
    private idInMappingPath;
    private idInSpec;
    init(reInit?: boolean): Promise<void>;
    /**
     * 添加函数
     * @param resource
     */
    add(resource: Resource): Promise<void>;
    /**
     * 删除函数
     * @param id
     */
    removeById(id: string): Promise<void>;
    /**
     * 获取数据源
     * @param functionPath
     */
    getFunction(functionPath: string): any;
    /**
     * 转换参数类型
     * @param dataType 参数类型
     * @private
     */
    private getDataType;
    /**
     * 生成定义
     */
    generateSpec(): string;
}
