import { SwaggerJson, GuardConfig, String2StringMap } from './consts';
/**
 * @description 对 swagger 返回做安全检测
 * 前提:
 *  - http method + url 唯一
 *  - 后端变更 http method、url 必须周知前端
 */
declare type API = SwaggerJson['paths']['a']['get'];
export declare const dangerousOperationIdReg: RegExp;
export declare const defaultPrefixReg: RegExp;
export declare const defaultBadParamsReg: RegExp;
export interface HttpMethodUrl2APIMap {
    [url: string]: API;
}
/**
 *
 * @param swagger json
 * @param savedMethodUrl2OperationIdMap  http method + url : oldOperationId 安全映射，用以校正风险 swagger
 */
export declare function operationIdGuard(swagger: SwaggerJson, config?: GuardConfig): {
    errors: string[];
    warnings: string[];
    suggestions: (string | String2StringMap)[];
} | {
    errors: string[];
    warnings: string[];
    suggestions: (string | {
        guardConfig: {
            methodUrl2OperationIdMap: String2StringMap;
        };
    })[];
};
export declare const InstableTagsReg: RegExp;
export declare const validTagsReg: RegExp;
export declare const validDefinitionReg: RegExp;
export declare function strictModeGuard(swagger: SwaggerJson, config: GuardConfig): Promise<{
    errors: string[];
    warnings: string[];
}>;
export {};
