import { Translator } from 'src/type';
/**
 * MD5加密算法
 * @param str 加密的字符
 * @returns
 */
export declare function md5(str: string): string;
/**
 * sha256加密算法
 * @param str 加密的字符
 * @returns
 */
export declare function sha256(str: string): string;
/**
 * 将对象转换成URL
 * @param obj
 * @returns
 */
export declare function getURLStringFromObj(obj: Record<string, unknown>): string;
/**
 * 根据错误码抛出错误提示信息
 * @param errorCode 错误码
 * @param errorCodeTipMap 内置错误码与提示信息的映射
 * @param translatorName 翻译平台的名称
 * @param docUrl 错误码参考文档的url
 * @param errorMsg 接口默认返回的错误信息
 */
export declare function throwErrorByErrorCode(errorCode: string, errorCodeTipMap: Record<string | number, string>, translatorName: string, docUrl: string, errorMsg?: string): void;
/**
 * 从翻译结果中收集翻译信息，并输出翻译正确的内容
 */
export declare function collectRes(props: {
    from: string;
    to: string;
    texts: string[];
    srcDistMap: Record<string, string>;
    success: Record<string, string>;
    error: Record<string, string>;
    textErrorMsg: Record<string, string[]>;
    translatorName: string;
}): void;
/**
 * 处理翻译失败的结果，并输出错误信息
 * @param e 翻译时的捕获的异常信息
 * @param errorCode 错误码
 * @param exitCodes 结束任务的错误码列表
 * @param texts 需要翻译的文本内容
 * @param error 翻译失败对象
 */
export declare function handleTranslateFail(e: any, errorCode: string, exitCodes: Array<string | number>, texts: string[], error: Record<string, string>): void;
export declare function getTranslatorName(translator: Translator): string;
