export declare type RequestMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' | 'PATCH' | string;
export declare type ResourceType = 'api' | 'function' | 'scheduleTask' | 'datasource' | 'interceptor' | string;
export declare type ResourceDefinition = ApiDefinitionType | DataSourceDefinitionType | FunctionDefinitionType | InterceptorDefinitionType | ScheduleTaskDefinitionType | any;
export interface MagicPath {
    id?: string | number;
    key: string;
    value: string;
    dataType: 'String' | 'Number' | 'Boolean' | 'Date' | 'Object' | 'Array' | 'Any' | 'File' | 'Files' | string;
    defaultValue?: string;
    validateType: 0 | 1 | 2 | number;
    expression: string;
    error: string;
    description: string;
}
export interface MagicParameter extends MagicPath {
    required: boolean;
}
export declare type MagicHeader = MagicParameter;
export interface MagicBodyDefinitionNode extends MagicParameter {
    children: MagicBodyDefinitionNode[];
}
export declare type DataRequestType = 'json' | 'xml';
export declare type DataResponseType = 'json' | 'xml' | 'file' | 'image';
export interface MagicRequestBodyDefinition extends MagicBodyDefinitionNode {
    json: string;
    requestType: DataRequestType;
}
export interface MagicResponseBodyDefinition extends MagicBodyDefinitionNode {
    json: string;
    responseType: DataResponseType;
    headers: {
        key: string;
        value: string;
        description: string;
    }[];
}
export interface ApiOptions {
    key: string;
    value: string;
    description: string;
}
/**
 * 函数定义
 */
export interface FunctionDefinitionType {
    parameters?: MagicParameter[];
}
/**
 * 拦截器定义
 */
export interface InterceptorDefinitionType {
    sort: number;
}
/**
 * 定时任务定义
 */
export interface ScheduleTaskDefinitionType {
    cron: string;
}
/**
 * API定义
 */
export interface ApiDefinitionType {
    options: ApiOptions[];
    parameters?: MagicParameter[];
    paths?: MagicPath[];
    headers?: MagicHeader[];
    requestBodyDefinition?: MagicRequestBodyDefinition;
    responseBodyDefinition?: MagicResponseBodyDefinition;
}
/**
 * 数据源定义
 */
export interface DataSourceDefinitionType {
    /**
     * 方言类型
     */
    dialect: string;
    /**
     * 用户名
     */
    username: string;
    /**
     * 密码
     */
    password: string;
    /**
     * 数据库
     */
    database: string;
    /**
     * 连接地址
     */
    host: string;
    /**
     * 端口
     */
    port: number;
    /**
     * 打印日志
     */
    logging: boolean;
    /**
     * 数据库选项
     */
    options: any;
}
