import { Context } from '@midwayjs/koa';
import { Resource } from '../../entity/Resource';
import { OutputValidation, ValidateOptions } from '../joi.router';
/**
 * 动态API异步方法
 * @param script
 * @return {*}
 * @constructor
 */
export declare const ApiDefinition: (script: string) => Function;
/**
 * 接口处理器
 * @param ctx 上下文
 * @param apiDefinition 执行脚本
 * @constructor
 */
export declare const ApiHandler: (ctx: Context, apiDefinition: Function) => Promise<void>;
/**
 * 生成校验参数
 * @param resource 资源
 */
export declare const generateValidate: (resource: Resource) => ValidateOptions;
/**
 * 生成返回定义
 * @param resource 资源
 */
export declare const generateOutput: (resource: Resource) => OutputValidation;
