/// <reference types="jest" />

export declare const ACT_ID_MAP: {
    GP: string;
};

/**
 * 为 Vue 组件添加 emits 属性
 * @param {string} filePath 组件地址
 * @param {string} [fileContent] 组件内容
 * @returns {string} 新的组件内容
 *
 * @example
 * ```ts
 * addNameForComponent('xxx.vue');
 * ```
 */
export declare function addEmitsForComponent(filePath: string, fileContent?: string): string | undefined;

export declare function addMsdkNativeCallbackListener(callback: Function): void;

/**
 * 为 Vue 组件添加、修正 name 属性
 * @param {string} filePath 组件地址
 * @param {string} componentName 组件名称
 * @returns {string} 新的组件内容
 *
 * @example
 * ```ts
 * addNameForComponent('xxx.vue', 'PressUploader');
 * ```
 */
export declare function addNameForComponent(filePath: string, componentName: string): any;

/**
 * add num and avoid float number
 * @param {number} num1 第1个数字
 * @param {number} num2 第2个数字
 * @returns {number} 结果
 * @example
 * ```ts
 * addNumber(0.1, 0.2); // 0.3
 * ```
 */
export declare function addNumber(num1: number, num2: number): number;

/**
 * 添加或更新配置
 *
 * @param {object} config 配置信息
 * @param {object} config.keyValue 配置对象
 * @param {string} config.keyValue.key 配置的key
 * @param {string} config.keyValue.value 配置的value
 * @param {number} config.valueType 配置类型，1: NUMBER, 2: STRING, 3: TEXT, 4: JSON, 5: XML, 18: 日期, 20: yaml
 * @param {object} config.secretInfo 密钥信息
 * @param {string} config.secretInfo.appId 项目Id
 * @param {string} config.secretInfo.userId 用户Id
 * @param {string} config.secretInfo.secretKey 密钥
 * @param {string} config.secretInfo.envName 配置环境
 * @param {string} config.secretInfo.groupName 配置组
 * @returns {Promise<object>} 请求Promise
 *
 * @example
 * addOrUpdateRainbowKV({
 *   keyValue: {
 *     key: 'theKey',
 *     value: 'theValue',
 *   },
 *   valueType: 2,
 *   secretInfo: {
 *     appId: 'xxx',
 *     userId: 'xxx',
 *     secretKey: 'xxx',
 *     envName: 'prod',
 *     groupName: 'xxx',
 *   }
 * }).then(() => {
 *
 * })
 */
export declare function addOrUpdateRainbowKV({ keyValue, valueType, secretInfo, }: ModifyConfigParam): Promise<object>;

/**
 * 增加配置
 *
 * @param {object} config 配置信息
 * @param {object} config.keyValue 配置对象
 * @param {string} config.keyValue.key 配置的key
 * @param {string} config.keyValue.value 配置的value
 * @param {number} config.valueType 配置类型，1: NUMBER, 2: STRING, 3: TEXT, 4: JSON, 5: XML, 18: 日期, 20: yaml
 * @param {object} config.secretInfo 密钥信息
 * @param {string} config.secretInfo.appId 项目Id
 * @param {string} config.secretInfo.userId 用户Id
 * @param {string} config.secretInfo.secretKey 密钥
 * @param {string} config.secretInfo.envName 配置环境
 * @param {string} config.secretInfo.groupName 配置组
 * @returns {Promise<object>} 请求Promise
 *
 * @example
 * addRainbowKV({
 *   keyValue: {
 *     key: 'theKey',
 *     value: 'theValue',
 *   },
 *   valueType: 2,
 *   secretInfo: {
 *     appId: 'xxx',
 *     userId: 'xxx',
 *     secretKey: 'xxx',
 *     envName: 'prod',
 *     groupName: 'xxx',
 *   }
 * }).then(() => {
 *
 * })
 */
export declare function addRainbowKV({ keyValue, valueType, secretInfo, }: ModifyConfigParam): Promise<object>;

/**
 * 为图片增加文字
 *
 * @param {Object} config 配置
 * @param {number} config.width 宽度
 * @param {number} config.height 高度
 * @param {Array<string>} config.textList 文字列表，支持多行
 * @param {string} config.imgPath 图片路径
 * @returns {string} canvas.toDataURL生成的base64图片
 *
 * @example
 *
 * ```ts
 * const imgUrl = addTextForImg({
 *   width: 300,
 *   height: 300,
 *   textList: ['第一行', '第二行'],
 *   imgPath: './test.png',
 * })
 * ```
 */
export declare function addTextForImg({ width, height, textList, imgPath, }: {
    width: number;
    height: number;
    textList: Array<string>;
    imgPath: string;
}): Promise<string>;

/**
 * 分析首页Bundle信息
 *
 * @export
 * @param config 配置
 * @param {string} config.domain 域名
 * @param {string} config.buildPath 打包路径
 * @returns {*}
 *
 * @example
 * ```ts
 * analyzeIndexBundle({
 *   domain: '',
 *   buildPath: '',
 * })
 * ```
 */
export declare function analyzeIndexBundle({ domain, buildPath }: {
    domain: string;
    buildPath: string;
}): ({
    file: string;
    size: number;
    time: number;
} | undefined)[];

export declare type AppOptionsType = {
    Vue: any;
    App: any;
    VueRouter?: any;
    Vuex?: any;
    VueLazyLoad?: any;
    routerMap?: Array<any>;
    vxModule?: Object;
    vxModuleGetter?: Object;
    beforeStart?: Function;
    i18n?: any;
    routerMode?: 'hash' | 'history';
    projectMixins?: any;
    noDependMixins?: boolean;
    loginType: string;
    loginFunction?: Function;
    uinHandler?: Function;
    SimpleVueRouter?: boolean;
    prerender?: boolean;
    notfound?: string;
    vue3Router?: {
        createRouter: Function;
        createWebHashHistory: Function;
    };
    vue3Vuex?: {
        createStore: Function;
    };
};

export declare function ApprovalRainbowReleaseTask({ secretInfo, taskId, versionName, status, rejectReason, }: {
    secretInfo: ISecretInfo_3;
    taskId: string | number;
    versionName: string;
    status?: number;
    rejectReason?: string;
}): Promise<object>;

declare const AREA_MAP: {
    readonly MAINLAND: "mainland";
    readonly OVERSEAS: "overseas";
    readonly GLOBAL: "global";
};

export declare function asyncExportTencentDoc({ accessToken, clientId, openId, fileId, exportType, }: ISecretInfo_2 & {
    fileId: string;
    exportType: number;
}): Promise<any>;

/**
 * 基本请求
 * @private
 * @param {object} config - 配置信息
 * @returns {Promise} 请求Promise
 */
export declare function baseRequestRainbow({ url, data: reqData, secretInfo, }: ReqParam): Promise<object>;

/**
 * 批量发送企业微信机器人base64图片
 * @param {object} config 配置信息
 * @param {string} config.img base64图片
 * @param {string} config.chatId 会话Id
 * @param {string} config.webhookUrl webhook地址
 * @returns {Promise<object>} 请求Promise
 * @example
 *
 * batchSendWxRobotBase64Img({
 *   img: 'xxx',
 *   chatId: 'xxx', // or ['xxx], or ['ALL'], or 'ALL'
 *   webhookUrl: 'xxx',
 * }).then(() => {
 *
 * })
 *
 */
export declare function batchSendWxRobotBase64Img({ img, chatId, webhookUrl, }: {
    img: string;
} & ISendReq): void;

export declare function batchSendWxRobotMarkdown({ content, attachments, chatId, webhookUrl, }: {
    content: string;
    attachments?: Array<object>;
} & ISendReq): void;

export declare function batchSendWxRobotMsg({ content, alias, chatId, webhookUrl, }: {
    content: string;
    alias: string | Array<string>;
} & ISendReq): void;

export declare function batchUpdateTencentSheetV3({ accessToken, clientId, openId, bookId, requests, }: ISecretInfo_2 & {
    bookId: string;
    requests: Record<string, any>;
}): Promise<any>;

/**
 * 打包并上传到服务器
 * @param {object} options 配置
 * @param {string} options.hostName 服务器名称
 * @param {string} options.hostPwd 服务器密码
 * @param {string} [options.root] 项目根目录
 * @param {string} [options.bundleName] 打包文件名称
 * @example
 *
 * await buildAndUpload({
 *   hostName: '9.9.9.9',
 *   hostPwd: 'xxxx',
 *   bundleName: 'cron-job-svr',
 * });
 *
 */
export declare function buildAndUpload({ root, bundleName, hostName, hostPwd, hostTargetDir, }: {
    root?: string;
    bundleName?: string;
    hostName: string;
    hostPwd: string;
    hostTargetDir: string;
}): Promise<any>;

/**
 * 记忆函数：缓存函数的运算结果
 * @param {Function} fn 输入函数
 * @returns {any} 函数计算结果
 *
 * @example
 * function test(a) {
 *   return a + 2
 * }
 *
 * const cachedTest = cached(test)
 *
 * cachedTest(1)
 *
 * // => 3
 *
 * cachedTest(1)
 *
 * // => 3
 */
export declare function cached(fn: Function): any;

/**
 * 添加游戏内浏览器jssdk
 * @example
 * ```ts
 * callJsBrowserAdapter();
 * ```
 */
export declare function callJsBrowserAdapter(): Promise<unknown>;

/**
 * 设置 MSDK 浏览器退出全屏，需提前加载 sdk
 * @example
 * ```ts
 * callJsReSetFullScreen();
 * ```
 */
export declare const callJsReSetFullScreen: () => void;

/**
 * 设置 MSDK 浏览器全屏，需提前加载 sdk
 * @param isFullScreen 是否全屏
 * @example
 * ```ts
 * callJsSetFullScreen();
 * callJsSetFullScreen(false);
 * ```
 */
export declare const callJsSetFullScreen: (isFullScreen?: boolean) => void;

/**
 * 横线转驼峰命名，如果第一个字符是字母，则不处理。
 * @param {string} str  输入字符串
 * @param {boolean} handleSnake  是否处理下划线，默认不处理
 * @returns {string} 处理后的字符串
 * @example
 *
 * camelize('ab-cd-ef')
 *
 * // => abCdEf
 *
 */
export declare function camelize(str?: string, handleSnake?: boolean): string;

/**
 * 字符串首位大写
 * @param {string} str 输入字符串
 * @returns {string} 处理后的字符串
 *
 * @example
 *
 * capitalize('abc')
 *
 * // => Abc
 */
export declare function capitalize(str: string): string;

/**
 * 检查 localStorage 设置，并展示vConsole
 * @example
 * ```ts
 * checkAndShowVConsole()
 * ```
 */
export declare function checkAndShowVConsole(): void;

export declare function checkExportTencentDocProgress({ accessToken, clientId, openId, fileId, operationId, }: ISecretInfo_2 & {
    fileId: string;
    operationId: string;
}): Promise<any>;

export declare function checkFileBaseMinimatch({ file, include, exclude, minimatch, }: {
    file: string;
    include: string | string[];
    exclude: string | string[];
    minimatch: Function;
}): boolean;

export declare function checkGitClean(dir: string): void;

export declare function checkJSFiles(options?: {
    whiteDir: string[];
    excludeReg: RegExp;
    log: boolean;
}): void;

export declare function checkLint({ privateToken, gitApiPrefix, workspace, mrUrl, mrId, buildUrl, repo, repoUrl, sourceBranch, targetBranch, docLink, webhookUrl, chatId, checkAll, mentionList, lintFiles, throwError, ignoreSubmodules, }: {
    privateToken: string;
    gitApiPrefix: string;
    workspace: string;
    mrUrl?: string;
    mrId?: string;
    buildUrl: string;
    repo: string;
    repoUrl?: string;
    sourceBranch?: string;
    targetBranch?: string;
    docLink: string;
    webhookUrl: string;
    chatId?: string[];
    checkAll?: boolean;
    mentionList?: string[];
    lintFiles?: string[];
    throwError?: boolean;
    ignoreSubmodules?: boolean;
}): Promise<FileMap>;

/**
 * 检查是否是node环境
 * @returns {boolean} 是否node环境
 * @example

 const res = checkNodeEnv();
 // false
 */
export declare const checkNodeEnv: () => boolean;

/**
 * 检查字符串长度
 *
 * @export
 * @param {string} str 字符串
 * @param {number} [num = 30] 长度
 * @returns {boolean}
 *
 * @example
 *
 * checkStringLength('123', 2) // true
 * checkStringLength('123', 3) // true
 * checkStringLength('123', 4) // false
 *
 *
 */
export declare function checkStringLength(str?: string, num?: number): boolean;

export declare function checkTSErrorInMrOrAll({ privateToken, gitApiPrefix, workspace, repo, repoUrl, mrId, mrUrl, sourceBranch, targetBranch, checkAll, buildUrl, docLink, mentionList, postFixList, chatId, webhookUrl, command, }: {
    privateToken: string;
    gitApiPrefix: string;
    workspace: string;
    repo: string;
    repoUrl: string;
    mrId: string;
    mrUrl: string;
    sourceBranch: string;
    targetBranch: string;
    checkAll: boolean;
    buildUrl: string;
    docLink: string;
    mentionList: string[];
    postFixList?: string[];
    chatId?: string[];
    webhookUrl: string;
    command?: string;
}): Promise<TsErrorFile[]>;

/**
 * 检查是否是ios环境
 * @returns {boolean} 是否是ios环境
 *
 * @example
 *
 * checkUAIsIOS()
 *
 * // => true
 *
 */
export declare function checkUAIsIOS(): boolean;

/**
 * 清除全部cookie
 *
 * @param {string} domain 域名
 *
 * @example
 *
 * clearAll()
 */
export declare function clearAll(domain?: String): void;

/**
 * 清除cookie
 * @param {string} key cookie键
 *
 * @example
 *
 * clearCookie('name');
 *
 */
export declare function clearCookie(name: string): void;

/**
 * 持久化存储。清理。传 key 就删除。不传清理所有过期的。
 * @param {string} [key]
 * @returns {boolean} 是否清楚成功
 */
export declare function clearPersist(key?: string): boolean;

/**
 * 清除（隐藏）上一个toast
 * @example
 * ```ts
 * Toast.clear();
 *
 * clearToast();
 * ```
 */
export declare const clearToast: () => void;

/**
 * 小程序粘贴
 *
 * @param {string} text 待复制的文本
 * @returns {Promise<void>}
 * @example
 *
 * ```ts
 * clipboardMp('stupid').then(() => {});
 * ```
 */
export declare function clipboardMp(text: string): Promise<any>;

/**
 * 复制到剪切板
 *
 * @param {string} text 待复制的文本
 * @returns {Promise<void>}
 * @example
 *
 * ```ts
 * clipboardMp('stupid').then(() => {});
 * ```
 */
export declare function clipboardWeb(text: string): Promise<void>;

/**
 * MSDK 浏览器中，关闭 webView
 * @example
 * ```ts
 * closeMsdkWebview()
 * ```
 */
export declare function closeMsdkWebview(env?: any): void;

/**
 * 关闭任务
 *
 * @param {object} config 配置信息
 * @param {string} config.taskId 任务Id
 * @param {object} config.secretInfo 密钥信息
 * @param {string} config.secretInfo.appId 项目Id
 * @param {string} config.secretInfo.userId 用户Id
 * @param {string} config.secretInfo.secretKey 密钥
 * @param {string} config.secretInfo.envName 配置环境
 * @param {string} config.secretInfo.groupName 配置组
 * @returns {Promise<object>} 请求Promise
 *
 * @example
 * closeRainbowTask({
 *   taskId: 'taskId',
 *   secretInfo: {
 *     appId: 'xxx',
 *     userId: 'xxx',
 *     secretKey: 'xxx',
 *     envName: 'prod',
 *     groupName: 'xxx',
 *   }
 * }).then(() => {
 *
 * })
 */
export declare function closeRainbowTask({ taskId, secretInfo, }: {
    taskId: string;
    secretInfo: ISecretInfo_3;
}): Promise<object>;

/**
 * 关闭 vConsole
 * @example
 * ```ts
 * closeVConsole()
 * ```
 */
export declare function closeVConsole(): void;

/**
 * 关闭 webView，包含 msdk 浏览器和其他浏览器
 * @example
 * ```ts
 * closeWebView()
 * ```
 */
export declare function closeWebView(): void;

/**
 * 对比两个对象列表
 * @param {Array<object>} list 现在数据
 * @param {Array<object>} preList 参照数据
 * @param {string} key 唯一key名称
 * @returns {Array<object>} 对比结果，增加为list的每一项增加previousValue和ratio属性
 * @example
 * const list = [
 *   {
 *     ProjectName: { name: 'ProjectName', value: '脚手架' },
 *     PagePv: { name: 'PagePv', value: 544343 },
 *     PageUv: { name: 'PageUv', value: 225275 },
 *   }
 * ]
 *
 * const preList = [
 *   {
 *     ProjectName: { name: 'ProjectName', value: '脚手架' },
 *     PagePv: { name: 'PagePv', value: 123123 },
 *     PageUv: { name: 'PageUv', value: 33333 },
 *   }
 * ]
 *
 * compareTwoList(list, preList, 'ProjectName')
 *
 * console.log(list)
 *
 * [
 *   {
 *     ProjectName: { name: 'ProjectName', value: '脚手架' },
 *     PagePv: {
 *       name: 'PagePv',
 *       value: 544343,
 *       ratio: '+342.1%',
 *       previousValue: 123123
 *     },
 *     PageUv: {
 *       name: 'PageUv',
 *       value: 225275,
 *       ratio: '+575.8%',
 *       previousValue: 33333
 *     }
 *   }
 * ]
 */
export declare function compareTwoList(list: Array<IPreData>, preList: Array<IPreData>, key: string): IPreData[];

export declare function compareTwoObj(originObj?: Record<string, any>, newObj?: Record<string, any>): {
    ADDED: Array<string>;
    UPDATED: Array<string>;
    DELETED: Array<string>;
    originObj: object;
    newObj: object;
};

/**
 * 版本比较
 * @param {string} v1 第一个版本
 * @param {string} v2 第二个版本
 * @returns 比较结果，1 前者大，-1 后者大，0 二者相同
 * @example
 * ```ts
 * compareVersion('1.1.1', '1.2.1')
 * // -1
 * ```
 */
export declare function compareVersion(v1?: string, v2?: string): 0 | 1 | -1;

/**
 * Compile a string to a template function for the path.
 * @ignore
 * @param  {string}             str
 * @param  {Object=}            options
 * @returns {!function(Object=, Object=)}
 */
declare function compile(str: string, options?: any): (data: any, options: any) => string;

export declare type ComponentMapList = Record<string, string[]>;

/**
 * 组装`url`参数，将search参数添加在后面
 * @param {string} url 输入URL
 * @param {Object} queryObj search对象
 * @returns {string} 组装后的url
 *
 * @example
 * composeUrlQuery('https://baidu.com', {
 *   name: 'mike',
 *   feel: 'cold',
 *   age: '18',
 *   from: 'test',
 * });
 * // https://baidu.com?name=mike&feel=cold&age=18&from=test
 *
 * composeUrlQuery('https://baidu.com?gender=male', {
 *   name: 'mike',
 *   feel: 'cold',
 *   age: '18',
 *   from: 'test',
 * });
 * // https://baidu.com?gender=male&name=mike&feel=cold&age=18&from=test
 *
 */
export declare function composeUrlQuery(url: string, queryObj: object): string;

declare type ConfigType = unknown;

export declare function configWx({ apiList, openTagList, getWxSignaturePromise, }: {
    apiList?: Array<string>;
    openTagList?: Array<string>;
    getWxSignaturePromise: IGetWxSignaturePromise;
}): Promise<unknown>;

export declare const consoleImage: (url: string) => void;

export declare function consoleInfo(shouldLog: boolean, ...args: any[]): void;

export declare function consoleLog(shouldLog: boolean, ...args: any[]): void;

/**
 * Dom转化为图片
 * @param {string} trigger  Dom的id
 * @param {string} imageElId  需要展示的图片的id
 *
 * @example
 * Dom2Image.convertDomToImage("app", "appImage");
 */
export declare function convertDomToImage(trigger: string, imageElId: string, callback: Function): void;

/**
 * image url转canvas
 * @param image {Image} 图片src
 * @returns canvas
 */
export declare function convertImageToCanvas(image: HTMLImageElement): ICanvas;

export declare function convertTencentFileId({ accessToken, clientId, openId, type, value, }: ISecretInfo_2 & {
    type: number;
    value: string;
}): Promise<any>;

/**
 * 拷贝目录以及子文件
 * @param {Object} src
 * @param {Object} dist
 * @param {Object} callback
 */
export declare function copyDir(src: string, dist: string, callback?: Function): void;

/**
 * 拷贝文件
 * @param {Object} from 文件来自那里
 * @param {Object} to		拷贝到那里
 */
export declare function copyFile(from: string, to: string): void;

/**
 * 创建canvas的table
 * @param {object} config 输入配置
 * @param {Array<object>} config.data 输入数据
 * @param {Array<string>} config.headers 表头列表
 * @param {Array<number>} config.cellWidthList 每一格的宽度列表
 * @param {string} config.title 标题
 * @returns {string} 图片url
 * @example
 *
 * const tableData = [
 *   {
 *     ProjectName: { name: 'ProjectName', value: 'ProjectA' },
 *     ALL_SUMMARY: {
 *       name: 'ALL_SUMMARY',
 *       value: 4987,
 *       ratio: '+26.2%',
 *       previousValue: 3953,
 *       idx: 0,
 *       lastIdx: 0,
 *       isMax: true,
 *       isMin: false,
 *       isSecondMax: false,
 *       isSecondMin: false,
 *     },
 *     ALL_FAIL: {
 *       // ...
 *     },
 *   },
 *   {
 *     ProjectName: { name: 'ProjectName', value: 'ProjectB' },
 *     // ...
 *   },
 * ];
 *
 * createCanvasTable({
 *   data: tableData,
 *   headers: getHeaders(tableData),
 *   title: `007日报 ${date}`,
 *   cellWidthList: [
 *     95,
 *     65,
 *     65,
 *     65,
 *   ],
 * });
 */
export declare function createCanvasTable({ data, headers, cellWidthList, title, }: {
    data: Array<{
        [k: string]: {
            value?: number;
            isMax?: boolean;
            isMin?: boolean;
            isSecondMax?: boolean;
            isSecondMin?: boolean;
            ratio?: string | number;
        };
    }>;
    headers: Array<string>;
    cellWidthList: Array<number>;
    title: string;
}): string;

export declare function createDevopsTemplateInstances({ projectId, templateId, host, pipelineName, pipelineParam, secretInfo, useTemplateSettings, }: ITemplateReq & {
    pipelineName: string;
    pipelineParam: Object;
    useTemplateSettings?: boolean;
}): Promise<any>;

/**
 * 创建MR
 * @param {object} options 输入配置
 * @param {string} options.projectName 项目名称
 * @param {string} options.privateToken 密钥
 * @param {string} options.sourceBranch 源分支
 * @param {string} options.targetBranch 目标分支
 * @returns {Promise<object>} 请求Promise
 * @example
 *
 * createMR({
 *   projectName: 't-comm',
 *   privateToken: 'xxxxx',
 *   sourceBranch: 'master',
 *   targetBranch: 'release',
 * }).then((resp) => {
 *
 * })
 */
export declare function createMR({ projectName, privateToken, sourceBranch, targetBranch, }: {
    projectName: string;
    privateToken: string;
    sourceBranch: string;
    targetBranch: string;
}): Promise<unknown>;

/**
 * 创建发布任务
 *
 * @param {object} config 配置信息
 * @param {string} config.versionName 版本信息
 * @param {object} config.secretInfo 密钥信息
 * @param {string} config.secretInfo.appId 项目Id
 * @param {string} config.secretInfo.userId 用户Id
 * @param {string} config.secretInfo.secretKey 密钥
 * @param {string} config.secretInfo.envName 配置环境
 * @param {string} config.secretInfo.groupName 配置组
 * @returns {Promise<object>} 请求Promise
 *
 * @example
 * createRainbowPublishJob({
 *   versionName: 'version',
 *   secretInfo: {
 *     appId: 'xxx',
 *     userId: 'xxx',
 *     secretKey: 'xxx',
 *     envName: 'prod',
 *     groupName: 'xxx',
 *   }
 * }).then(() => {
 *
 * })
 */
export declare function createRainbowPublishJob({ versionName, secretInfo, creator, approvers, type, }: {
    versionName: string;
    secretInfo: ISecretInfo_3;
    creator: string;
    approvers: string;
    type?: number;
}): Promise<object>;

export declare function createTencentDoc({ accessToken, clientId, openId, type, title, folderId, }: ISecretInfo_2 & {
    type: number;
    title: string;
    folderId?: string;
}): Promise<any>;

/**
 * canvas 实现 watermark
 * @param {object} params 参数
 * @param {HTMLElement} params.container 容器
 * @param {number} params.width 图片宽
 * @param {number} params.height 图片高
 * @param {string} params.textAlign 同 ctx.textAlign
 * @param {string} params.textBaseline 同 ctx.textBaseline
 * @param {string} params.font 同 ctx.font
 * @param {string} params.fillStyle 同 ctx.fillStyle
 * @param {string} params.content 内容
 * @param {number} params.rotate 旋转角度
 * @param {number} params.zIndex 层级
 *
 * @example
 *
 * ```ts
 * const rtx = 'pony';
 *
 * createWatcherMark({
 *   content: rtx,
 *   width: '300',
 *   height: '300',
 *   textAlign: 'center',
 *   textBaseline: 'middle',
 *   font: '25px Microsoft Yahei',
 *   fillStyle: 'rgba(184, 184, 184, 0.3)',
 *   rotate: '-50',
 *   zIndex: 1000,
 * });
 * ```
 */
export declare function createWatcherMark({ container, width, height, textAlign, textBaseline, font, fillStyle, content, rotate, zIndex, }?: {
    container?: HTMLElement | undefined;
    width?: number | undefined;
    height?: number | undefined;
    textAlign?: string | undefined;
    textBaseline?: string | undefined;
    font?: string | undefined;
    fillStyle?: string | undefined;
    content?: string | undefined;
    rotate?: number | undefined;
    zIndex?: number | undefined;
}): void;

/**
 * 每日合并
 * 1. 获取昨天有活跃的分支
 * 2. 对于每个分支，进行合并并推送
 *     - 清理 Git 环境
 *     - 切到主分支，并拉最新代码
 *     - 切到当前分支，拉最新代码
 *     - 尝试执行 git merge
 *     - 对比 merge 前后的 commit 信息是否相同，作为判断 merge 是否成功的依据
 * 3. 发送机器人消息
 *
 *
 * @export
 * @async
 * @param {object} param0 参数
 * @param {string} param0.webhookUrl 机器人地址
 * @param {string} param0.appName 项目名称
 * @param {string} param0.devRoot 项目根路径
 * @param {string} param0.baseUrl 基础请求 url
 * @param {string} param0.repoName 仓库名称
 * @param {string} param0.privateToken 密钥
 * @param {boolean} [param0.isDryRun=false] 是否演练
 * @param {string} [param0.mainBranch='develop'] 主分支
 * @param {Regexp} [param0.whiteBranchReg=/^release\|develop\|hotfix\\/.+$/] 不处理的分支正则
 * @returns {*}
 * @example
 *
 * ```ts
 * dailyMerge({
 *   webhookUrl: 'xx',
 *   appName: 'xx',
 *   devRoot: 'xx',
 *
 *   baseUrl: 'xx',
 *   repoName: 'xx',
 *   privateToken: 'xx',
 *
 *   isDryRun: false,
 * })
 * ```
 */
export declare function dailyMerge({ webhookUrl, appName, devRoot, baseUrl, repoName, privateToken, isDryRun, mainBranch, whiteBranchReg, }: {
    webhookUrl: string;
    appName: string;
    devRoot: string;
    baseUrl: string;
    repoName: string;
    privateToken: string;
    isDryRun?: boolean;
    mainBranch?: string;
    whiteBranchReg?: RegExp;
}): Promise<void>;

/**
 * 将日期格式化
 * @param {Date} date
 * @param {string} format
 * @returns {string} 格式化后的日期字符串
 * @example
 *
 * const date = new Date('2020-11-27 8:23:24');
 *
 * const res = dateFormat(date, 'yyyy-MM-dd hh:mm:ss')
 *
 * // 2020-11-27 08:23:24
 */
export declare function dateFormat(date: string | number | Date, fmt: string): string;

/**
 * 防抖，场景：搜索
 *
 * 触发事件后在 n 秒内函数只能执行一次，如果
 * 在 n 秒内又触发了事件，则会重新计算函数执行时间
 *
 * @param {Function} fn 主函数
 * @param {number} time 间隔时间，单位 `ms`
 * @param {boolean} immediate 是否立即执行，默认 `false`
 * @returns 闭包函数
 *
 * @example
 *
 * ```ts
 * function count() {
 *  console.log('xxxxx')
 * }
 * window.onscroll = debounce(count, 500)
 *
 * window.onscroll = debounce(count, 500, true)
 * ```
 */
export declare function debounce(fn: Function, time: number, immediate?: boolean): (...args: Array<any>) => any;

/**
 * 不用生成中间函数的防抖
 *
 * @example
 * ```ts
 * debounceRun(func, args, {
 *   funcKey: 'funcKey',
 *   wait: 500, // 默认 500
 *   throttle: false, // 是否是节流，默认 false
 *   immediate: true, // 是否立即执行，默认 true
 * })
 * ``
 */
export declare const debounceRun: (func: Function, args?: any[], options?: {
    funcKey?: any;
    wait?: number | undefined;
    throttle?: boolean | undefined;
    immediate?: boolean | undefined;
    debug?: boolean | undefined;
}) => void;

export declare const decode: (str: string) => string;

/**
 * 将字符串解码，与`encodeUrlParam`相对
 * @param {string} obj 输入字符串
 * @returns {object} 对象
 * @example
 *
 * decodeUrlParam('%7B%22a%22%3A1%7D')
 *
 * // { a: 1 }
 *
 */
export declare function decodeUrlParam(str: string): object;

/**
 * 深度赋值
 * @param keyStr 以点拼接的 key，比如 foo.bar
 * @param target 目标对象
 * @param value 目标值
 * @example
 * ```ts
 * const obj = { a: { b: 1 } };
 * deepSet('a.c', obj, 2);
 *
 * console.log(obj);
 * // { a: { b: 1, c: 2 } }
 * ```
 */
export declare function deepSet(keyStr: string, target: Record<string, any>, value: unknown): void;

export declare function deleteCOSEmptyFolder({ secretId, secretKey, bucket, region, prefix, }: {
    secretId: string;
    secretKey: string;
    bucket: string;
    region: string;
    prefix: string;
}): Promise<unknown>;

export declare function deleteCOSLongAgoObject({ secretId, secretKey, bucket, region, prefix, keepNumber, }: {
    secretId: string;
    secretKey: string;
    bucket: string;
    region: string;
    prefix: string;
    keepNumber?: number;
}): Promise<unknown>;

export declare function deleteCOSMultipleObject({ secretId, secretKey, keys, bucket, region, }: {
    secretId: string;
    secretKey: string;
    bucket: string;
    region: string;
    keys: Array<string>;
}): Promise<unknown>;

/**
 * 删除目录
 * @param {Object} path
 */
export declare function deleteFolder(tPath: string): void;

export declare function deleteFolderRecursive(path: string, options?: {
    deleteFile: boolean;
    log: boolean;
}): void;

/**
 * 删除一个项目
 * @param {object} options 输入配置
 * @param {string} options.id 项目id
 * @param {string} options.privateToken 密钥
 * @returns {Promise<Array<object>>} 请求Promise
 * @example
 *
 * deleteTGitProject({
 *   id: '123'
 *   privateToken: 'xxxxx',
 * }).then((resp) => {
 *
 * })
 */
export declare function deleteTGitProject({ id, privateToken, }: {
    id: number | string;
    privateToken: string;
}): Promise<Array<object>>;

declare enum DEVICE_TYPE {
    PC = "PC",
    MOBILE_HOR = "MOBILE_HORPC",
    MOBILE_VERT = "MOBILE_VERT"
}

/**
 * 隐藏loading toast
 * @example
 * ```ts
 * Toast.dismissLoading();
 * ```
 */
export declare const dismissLoading: () => void;

declare namespace drag {
    export {
        dragElement,
        DRAG_TYPE
    }
}

declare enum DRAG_TYPE {
    DOT_TO_DOT = "DOT_TO_DOT",
    STEPS = "STEPS"
}

declare function dragElement({ page, source, target, mode, reverse, stepUnit, }: {
    page: any;
    source: any;
    target: any;
    mode?: DRAG_TYPE;
    reverse?: boolean;
    stepUnit?: number;
}): Promise<void>;

export declare const e2e: {
    autoScroll(element: HTMLAnchorElement, page: any, bottomTimes?: number): Promise<void>;
    dragElement({ page, source, target, mode, reverse, stepUnit, }: {
        page: any;
        source: any;
        target: any;
        mode?: drag.DRAG_TYPE | undefined;
        reverse?: boolean | undefined;
        stepUnit?: number | undefined;
    }): Promise<void>;
    DRAG_TYPE: typeof drag.DRAG_TYPE;
    waitEle(element: HTMLSelectElement, page: any, timeout?: number): Promise<any>;
    clickBtn(btn: any): Promise<boolean>;
    findAndClick(element: HTMLSelectElement, page: any, timeout?: number): Promise<any>;
    justWait(time: number): Promise<unknown>;
    closeBlankPage(browser: any): Promise<void>;
    getRect(element: HTMLSelectElement, page: any): Promise<any>;
    getInnerText(element: HTMLSelectElement, page: any): Promise<any>;
    findListItemAndClick({ page, element, innerText, }: {
        page: any;
        element: HTMLSelectElement;
        innerText: string;
    }): Promise<void>;
    getHref(page: any): Promise<any>;
    initBrowser({ puppeteer, args, headless, devtools, }: {
        puppeteer: any;
        args?: string[] | undefined;
        headless?: boolean | undefined;
        devtools?: boolean | undefined;
    }): Promise<any>;
    getNewPage(browser: any, device: page.DEVICE_TYPE): Promise<any>;
    openOrFindPage(browser: any, href: string, device: page.DEVICE_TYPE): Promise<any>;
    setUserAgent(useragent: string, page: any): Promise<void>;
    setSessionStorage(key: string, value: string, page: any): Promise<void>;
    setRoute(page: any, route?: string): Promise<void>;
    DEVICE_TYPE: typeof page.DEVICE_TYPE;
};

export declare const encode: (str: string) => string;

/**
 * 将对象字符串化
 * @param {object} obj 输入对象
 * @returns {string} 字符串
 * @example
 *
 * encodeUrlParam({a: 1})
 *
 * // '%7B%22a%22%3A1%7D'
 *
 */
export declare function encodeUrlParam(obj: object): string;

declare const ERROR_MAP: {
    BRANCH_EXIST: string;
    SAME_CONFIG: string;
};

export declare class EventBus {
    private events;
    constructor();
    emit(eventName: string, ...args: Array<any>): void;
    on(eventName: string, fn: any): void;
    off(eventName: string, fn: any): void;
}

/**
 * excel 转 json
 * @param {object} params 参数
 * @returns jsonData
 * @example
 *
 * const options = {
 *   header: ['id', 'name', 'age'], // 可选：自定义表头
 *   range: 1,                      // 可选：跳过第一行（标题行）
 *   defval: null,                  // 可选：空单元格的默认值
 *   raw: false,                    // 可选：是否保留原始数据格式
 * };
 *
 * excelToJson({
 *   filePath: CONFIG.xlsxPath,
 *   sheetIndex: 1,
 *   options,
 * });
 *
 * // [
 * //   { id: 1, name: '2', age: '3' },
 * //   { id: 1, name: '2', age: '3' }
 * // ];
 *
 */
export declare function excelToJson({ filePath, sheetIndex, options, }: {
    filePath: string;
    sheetIndex?: number;
    options?: Record<string, any>;
}): any;

/**
 * nodejs 中调用 child_process.execSync 执行命令，
 * 这个方法会对输出结果截断，只返回第一行内容
 * @param {string} command 命令
 * @param {string} root 执行命令的目录
 * @param {string | object} stdio 结果输出，默认为 pipe
 * @returns {string} 命令执行结果
 */
export declare function execCommand(command: string, root?: string, options?: string | {
    stdio?: string;
    line?: number;
}): string;

export declare function execCommandInTarget(command: string, targetProject: string): void;

export declare function exportTencentDoc({ accessToken, clientId, openId, fileId, exportType, waitTime, }: ISecretInfo_2 & {
    fileId: string;
    exportType: number;
    waitTime?: number;
}): Promise<string | undefined>;

/**
 * 将属性混合到目标对象中
 * @param {object} to 目标对象
 * @param {object} from 原始对象
 * @returns 处理后的对象
 *
 * @example
 * const a = { name: 'lee' }
 * const b = { age: 3 }
 * extend(a, b)
 *
 * console.log(a)
 *
 * // => { name: 'lee', age: 3 }
 */
export declare function extend(to: Record<string, any>, from: Record<string, any>): object;

/**
 * 拼接额外参数
 * @param {string} url 地址
 * @param {string} removeKeyArr 待添加的参数对象
 * @returns 重新拼接的地址
 * @example
 * const url1 = extendUrlParams('http://www.test.com?a=1&b=2&c=3#/detail?d=4', { e: 5 }); // 'http://www.test.com/#/detail?a=1&b=2&c=3&d=4&e=5'
 */
export declare function extendUrlParams(url?: string, extParamsObj?: {}, forceHistoryMode?: boolean): string;

/**
 * 提取 Vue 组件的 class
 * @param {obj} params 参数
 * @param {string} params.filePath 源文件地址
 * @param {string} [params.targetFilePath] 输出文件地址
 * @param {Regexp} [params.extractRegexp] 提取正则
 *
 * ```ts
 * extractClass({
 *   filePath: 'xxx.vue',
 * })
 * ```
 */
export declare function extractClass({ filePath, targetFilePath, extractRegexp, }: {
    filePath: string;
    targetFilePath?: string;
    extractRegexp?: RegExp;
}): void;

/**
 * 提取 Vue 组件的 event
 * @param {obj} params 参数
 * @param {string} params.filePath 源文件地址
 * @param {string} [params.targetFilePath] 输出文件地址
 * @param {Regexp} [params.extractRegexp] 提取正则
 *
 * ```ts
 * extractEvent({
 *   filePath: 'xxx.vue',
 * })
 * ```
 */
export declare function extractEvent({ filePath, targetFilePath, extractRegexp, }: {
    filePath: string;
    targetFilePath?: string;
    extractRegexp?: RegExp;
}): void;

/**
 * 提取 Vue 组件的 props
 * @param {obj} params 参数
 * @param {string} params.filePath 源文件地址
 * @param {string} [params.targetFilePath] 输出文件地址
 * @param {Regexp} [params.extractRegexp] 提取正则
 *
 * ```ts
 * extractProps({
 *   filePath: 'xxx.vue',
 * })
 * ```
 */
export declare function extractProps({ filePath, targetFilePath, extractRegexp, }: {
    filePath: string;
    targetFilePath?: string;
    extractRegexp?: RegExp;
}): void;

export declare function fetchLatestOneRainbowData({ secretInfo, appName, key, valueType, }: {
    secretInfo: {
        appId: string;
        groupName: string;
        envName: string;
    };
    appName: string;
    key: string;
    valueType?: RainbowKeyValueType;
}): Promise<{
    config: Array<IRemoteConfig>;
    originConfig: ILocalConfig;
    equal: boolean;
}>;

export declare function fetchLatestRainbowData({ secretInfo, appName, }: {
    secretInfo: ISecretInfo_5;
    appName: string;
}): Promise<{
    config: Array<IRemoteConfig>;
    originConfig: ILocalConfig;
    equal: boolean;
}>;

/**
 * 拉取七彩石配置
 * @param {String} key 七彩石的key
 * @param {object} secretInfo 密钥信息
 * @param {string} secretInfo.appId 项目Id
 * @param {string} secretInfo.envName 环境
 * @param {string} secretInfo.groupName 组名称
 * @returns {Promise<object>} 请求Promise
 *
 * @example
 *
 * fetchRainbowConfig('test', {
 *   appId: 'xx',
 *   envName: 'prod',
 *   groupName: 'robot',
 * }).then((resp) => {
 *   console.log(resp)
 * });
 *
 */
export declare function fetchRainbowConfig(key: string, secretInfo: Partial<ISecretInfo_3>, options?: {
    sdk: any;
    initOptions?: Record<string, any>;
    isFetchGroup?: boolean;
    tryJsonParse?: boolean;
}): Promise<any>;

export declare function fetchRainbowConfigFromSdk({ secretInfo, sdk, initOptions, key, isFetchGroup, tryJsonParse, rainbow, }: {
    secretInfo: ISecretInfo_3;
    sdk: any;
    key: string;
    initOptions?: Record<string, any>;
    isFetchGroup?: boolean;
    tryJsonParse?: boolean;
    rainbow?: any;
}): Promise<unknown>;

/**
 * 获取天气信息
 * @returns {Promise<Array>} 天气数据
 * @example
 *
 * fetchWeatherData().then(content => {
 *   console.log(content)
 * })
 */
export declare function fetchWeatherData<T extends Array<object>>(): Promise<T>;

export declare type FileMap = {
    [k: string]: {
        reg: RegExp;
        lintKeyword: string;
        outputFileName: string;
        outputFile?: string;
        isStyle?: boolean;
        isVue?: boolean;
        total?: number;
        errorFiles?: JSErrorFile[];
    };
};

export declare interface FilterParams {
    url: string;
    limit: number;
    keepKey: string[];
    forceHistoryMode?: boolean | undefined;
}

/**
 * 根据地址长度，进行过滤地址参数，允许指定保留特定参数
 * @param {object} [params={ limit: 1024 }] 参数
 * @param {number} params.url 待过滤地址，默认当前页面地址
 * @param {number} params.limit 参数长度限制
 * @param {array}  params.keepKey 指定保留的参数，比如业务参数、框架参数（登录态、统计上报等）
 */
export declare function filterUrlParams(params?: FilterParams): string;

/**
 * 根据路由表，找到 path 对应的 路由名称
 * @param {string} path 路由路径
 * @param {array} routes 路由表
 * @returns {object} 匹配到的路由信息
 *
 * @example
 * ```ts
 * const { name, params, meta, path } = findRouteName(rawPath, ALL_ROUTES) || {};
 *
 * console.log('name', name);
 * ```
 */
export declare function findRouteName(path: string, routes: Array<IRoute>): {
    name: string | undefined;
    params: {
        [x: string]: any;
    };
    path: string | undefined;
    meta: IMeta;
} | undefined;

declare type Flat<T extends any[]> = T extends [infer F, ...infer R] ? F extends any[] ? [...Flat<F>, ...Flat<R>] : [F, ...Flat<R>] : [];

/**
 * 递归拉平数组
 * @param list 数组
 * @returns 数组
 *
 * @example
 *
 * flat([[[1, 2, 3], 4], 5])
 *
 * // [1, 2, 3, 4, 5]
 */
export declare function flat<T extends any[]>(list: T[]): Flat<T>;

/**
 * 拉平数组，不会递归处理
 * @param {Array<Object>} list - 对象数组
 * @param {string} key - 对象的key
 * @returns {object} 拉平后的对象
 *
 * @example
 *
 * const list = [{id: 1, name: 'a'}, {id: 2, name: 'b'}]
 *
 * flatten(list, 'id')
 *
 * // {1: {id: 1, name: 'a'}, 2: {id: 2, name: 'b'}}
 *
 */
export declare function flatten<K extends keyof any, T extends keyof any>(list: Array<Record<K, T>>, key: string): Record<T, Record<K, T>>;

/**
 * 拉平之前数据
 * @param {Array<Object>} preDataList 之前的数据，作为对照
 * @param {string} key 主键
 * @returns {Object} preDataMap
 *
 * @example
 * const data = [{
 *   ProjectName: { name: 'ProjectName', value: '研发平台' },
 *   PagePv: { name: 'PagePv', value: 152 },
 *   PageUv: { name: 'PageUv', value: 7 },
 *   Score: { name: 'Score', value: 93.92 },
 *   PageDuration: { name: 'PageDuration', value: 1281.58 },
 *   PageError: { name: 'PageError', value: 2 },
 * }];
 *
 * flattenPreData(data, 'ProjectName');
 *
 * // 输出
 * {
 *   研发平台: {
 *     ProjectName: '研发平台',
 *     PagePv: 152,
 *     PageUv: 7,
 *     Score: 93.92,
 *     PageDuration: 1281.58,
 *     PageError: 2,
 *   },
 * };
 */
export declare function flattenPreData(preDataList: Array<IPreData>, key: string): {
    [valueOfPrimaryKey: string]: {
        [key: string]: ValueType;
    };
};

export declare function flattenSubPackages(result: IUploadResult): Record<string, any>;

export declare function flattenUsingComponentMap(rawMap: Record<string, any>): ComponentMapList;

/**
 * 格式化 bite 单位，最多保留2位小数，最大单位为BB
 * @param number size bite 单位
 * @returns 格式化的字符
 * @example
 *
 * formatBite(1)
 * // 1B
 *
 * formatBite(100)
 * // 100B
 *
 * formatBite(1000)
 * // 1000B
 *
 * formatBite(10000)
 * // 9.77KB
 *
 * formatBite(100000)
 * // 97.66KB
 *
 * formatBite(1000000)
 * // 976.56KB
 *
 * formatBite(10000000)
 * // 9.54MB
 */
export declare function formatBite(size: number): string;

/**
 * 根据传入的参数，移除原来的所有参数，根据传入的 keepParamsObj 进行重新拼接地址，以 hash 模式返回
 * @param {string} url 地址
 * @param {object} keepParamsObj 参数对象
 * @returns 只有传入参数的地址
 * @example
 * const url1 = formatUrlParams('http://www.test.com?a=1&b=2&c=3', { e: 5 }); // http://www.test.com/#/?e=5
 * const url2 = formatUrlParams('http://www.test.com?a=1&b=2&c=3#/detail?d=4', { f: 5 }); // http://www.test.com/#/detail?f=5
 */
export declare function formatUrlParams(url?: string, keepParamsObj?: Record<string, string | number>, forceHistoryMode?: boolean): string;

/**
 * 获取自定义事件图片并发送
 * @param {object} options 配置信息
 * @returns {string} 图片url
 * @example
 *
 * const requestMultiImgDate = Date.now() - 1 * 24 * 60 * 60 * 1000;
 *
 * const tamGroupIdList = [1, 2, 3];
 *
 * const eventProjectMap = {
 *   62659: {
 *     name: 'aaaaa',
 *   },
 *   57706: {
 *     name: 'bbbbb',
 *     extraProjectId: 66379,
 *   },
 * };
 *
 * const eventMap = {
 *   WX_SUC: {
 *     // 总和
 *     type: 'SUMMARY',
 *     target: ['ENTER_GAME_WX_SUC', 'LAUNCH_GAME_SUC_WX'],
 *   },
 *   WX_FAIL: {
 *     // 总和
 *     type: 'SUMMARY',
 *     target: ['ENTER_GAME_WX_FAIL', 'LAUNCH_GAME_FAIL_WX'],
 *   },
 * };
 *
 * const eventTableHeaderMap = {
 *   ProjectName: {
 *     name: '项目名称',
 *     tableWidth: 95,
 *   },
 *   ALL_SUMMARY: {
 *     name: '拉起总数',
 *     tableWidth: 65,
 *   },
 * };
 *
 * genCustomEventImgAndSendRobot({
 *   date: requestLaunchGameDate,
 *   secretInfo: {
 *     getPwdCode,
 *     encrypt,
 *     apiKey: process.env.AEGIS_APP_KEY,
 *     loginName: 'lee',
 *   },
 *   projectIdMap: eventProjectMap,
 *   eventMap,
 *   tableHeaderMap: eventTableHeaderMap,
 *   webhookUrl: tamRobotWebhook,
 *   chatId: tamRobotChatId,
 * });
 *
 */
export declare function genCustomEventImgAndSendRobot({ date, projectIdMap, env, secretInfo, eventMap, tableHeaderMap, webhookUrl, chatId, }: {
    date: number;
    projectIdMap: Array<string>;
    env: string;
    secretInfo: SecretInfoType;
    eventMap: {};
    tableHeaderMap: {};
    webhookUrl: string;
    chatId: string;
}): Promise<void>;

/**
 * 生成 CSV 文件内容，可以用于 fs.writeFileSync 输出
 *
 * 第一行为表头
 * @param {Array<Array<string>>} dataList 二维数据列表
 * @returns 生成的字符串
 * @example
 *
 * ```ts
 * generateCSV([['a','b'], ['1', '2']]);
 * ```
 */
export declare function generateCSV(dataList: Array<Array<string>>): string;

/**
 * 生成 CSV 所需数据，可用于传递给 generateCSV 方法
 *
 * @param {Array<Record<string, string | number | boolean>>} list 数据列表
 * @param {Record<string, string>} headMap 数据项的 key 和表头标题的映射关系
 * @returns 二维数组，第一行是表头
 *
 * @example
 * ```ts
 * generateCSVData([
 *   {
 *     file: 'a.js',
 *     size: 88,
 *   },
 *  {
 *     file: 'b.js',
 *     size: 66,
 *   }
 * ], { file: '文件名称', size: '文件大小' })
 *
 *
 * // [['文件名称', '文件大小'], ['a.js', 88], ['b.js', 66]]
 * ```
 */
export declare function generateCSVData(list: Array<Record<string, string | number | boolean>>, headMap: Record<string, string>): any[][];

export declare function genIterativeComponentMap(usingComponentsMap: IterativeComponentMap): void;

/**
 * 生成多个图片并发送机器人
 * @param {object} options 配置
 *
 * @example
 *
 * const requestMultiImgDate = Date.now() - 1 * 24 * 60 * 60 * 1000;
 *
 * const tamGroupIdList = [1, 2, 3];
 *
 * const summaryScoreTableHeaderMap = {
 *   ProjectName: {
 *     name: '项目名称',
 *     tableWidth: 95,
 *   },
 *   PagePv: {
 *     name: 'PV',
 *     tableWidth: 65,
 *   },
 * };
 *
 * const eventProjectMap = {
 *   62659: {
 *     name: 'aaaaa',
 *   },
 *   57706: {
 *     name: 'bbbbb',
 *     extraProjectId: 66379,
 *   },
 * };
 *
 * const eventMap = {
 *   WX_SUC: {
 *     // 总和
 *     type: 'SUMMARY',
 *     target: ['ENTER_GAME_WX_SUC', 'LAUNCH_GAME_SUC_WX'],
 *   },
 *   WX_FAIL: {
 *     // 总和
 *     type: 'SUMMARY',
 *     target: ['ENTER_GAME_WX_FAIL', 'LAUNCH_GAME_FAIL_WX'],
 *   },
 * };
 *
 * const eventTableHeaderMap = {
 *   ProjectName: {
 *     name: '项目名称',
 *     tableWidth: 95,
 *   },
 *   ALL_SUMMARY: {
 *     name: '拉起总数',
 *     tableWidth: 65,
 *   },
 * };
 *
 * await genMultiImgAndSendRobot({
 *   date: requestMultiImgDate,
 *   secretInfo: {
 *     getPwdCode,
 *     encrypt,
 *     apiKey: process.env.AEGIS_APP_KEY,
 *     loginName: 'lee',
 *   },
 *   webhookUrl: tamRobotWebhook,
 *   chatId: tamRobotChatId,
 *
 *   groupIdList: tamGroupIdList,
 *   eventProjectIdMap: eventProjectMap,
 *   tableHeaderMap: summaryScoreTableHeaderMap,
 *
 *   eventMap,
 *   eventTableHeaderMap,
 * });
 *
 *
 */
export declare function genMultiImgAndSendRobot({ date, groupIdList, secretInfo, extraDataMap, ignoreProjectIdList, tableHeaderMap, webhookUrl, chatId, env, eventMap, eventProjectIdMap, eventTableHeaderMap, }: {
    date: number;
    groupIdList: Array<number>;
    secretInfo: SecretInfoType;
    extraDataMap?: Record<string, any>;
    ignoreProjectIdList?: Array<string | number>;
    tableHeaderMap?: Record<string, any>;
    webhookUrl: string;
    chatId: string;
    env?: string;
    eventMap: Record<string, any>;
    eventProjectIdMap: Record<string, any>;
    eventTableHeaderMap: Record<string, any>;
}): Promise<{
    data: ScoreInfoType[];
    projectIdList: number[];
} | undefined>;

export declare function genQueryToStr(query?: Record<string, string | number>): string;

/**
 * 请求签名Header生成
 * @private
 * @param {object} signInfo 密钥信息
 */
export declare function genRainbowHeaderSignature(signInfo: {
    appID?: string;
    appId?: string;
    userID?: string;
    userId?: string;
    secretKey: string;
    signMethod?: ISignMethod;
}): {
    rainbow_sgn_type?: undefined;
    rainbow_version?: undefined;
    rainbow_app_id?: undefined;
    rainbow_user_id?: undefined;
    rainbow_timestamp?: undefined;
    rainbow_nonce?: undefined;
    rainbow_sgn_method?: undefined;
    rainbow_sgn_body?: undefined;
    rainbow_signature?: undefined;
} | {
    rainbow_sgn_type: string;
    rainbow_version: string;
    rainbow_app_id: string | undefined;
    rainbow_user_id: string | undefined;
    rainbow_timestamp: string;
    rainbow_nonce: string;
    rainbow_sgn_method: ISignMethod;
    rainbow_sgn_body: string;
    rainbow_signature: any;
};

export declare function genRobotMessage(list: Array<string | Array<MessageType>>, separator?: string, labelSeparator?: string): string;

export declare function genRUMPerfImgAndSend({ secretId, secretKey, id, startTime, endTime, type, title, chatId, webhookUrl, }: {
    secretId: string;
    secretKey: string;
    id: string | number;
    startTime: number;
    endTime: number;
    type?: string;
    title?: string;
    chatId: string;
    webhookUrl: string;
}): Promise<void>;

/**
 * 获取jsAPI签名
 *
 * 校验地址：https://mp.weixin.qq.com/debug/cgi-bin/sandbox?t=jsapisign
 *
 * 文档地址：https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/JS-SDK.html
 * @param {string} ticket 票据
 * @param {string} url 当前url，不包括#之后的部分
 * @returns signature
 */
export declare function genSignature(ticket: string, url: string): {
    timestamp: number;
    nonceStr: any;
    signature: any;
    url: string;
};

/**
 * 生成TAM汇总数据并发送到机器人
 * @param {object} options 配置
 * @param {string} options.date 日期，yyyyMMdd格式
 * @param {Array<number>} options.groupIdList groupId列表
 *
 * @param {object} options.secretInfo 密钥信息
 * @param {string} options.secretInfo.apiKey apiKey
 * @param {string} options.secretInfo.loginName loginName
 * @param {Function} options.secretInfo.getPwdCode getPwdCode
 * @param {Function} options.secretInfo.encrypt encrypt
 *
 * @param {object} options.extraDataMap 额外数据Map
 * @param {object} options.ignoreProjectIdList 忽略的projectIdList
 * @param {object} options.tableHeaderMap 表格头部Map
 *
 * @param {object} options.webhookUrl 机器人回调地址
 * @param {object} options.chatId 会话Id
 *
 * @example
 * const requestSummaryScoreDate = Date.now() - 1 * 24 * 60 * 60 * 1000;
 *
 * const tamGroupIdList = [1, 2, 3];
 *
 * const summaryScoreTableHeaderMap = {
 *   ProjectName: {
 *     name: '项目名称',
 *     tableWidth: 95,
 *   },
 *   PagePv: {
 *     name: 'PV',
 *     tableWidth: 65,
 *   },
 * };
 *
 * await genSummaryDataAndSendRobot({
 *   date: requestSummaryScoreDate,
 *   groupIdList: tamGroupIdList,
 *   secretInfo: {
 *     getPwdCode,
 *     encrypt,
 *     apiKey: process.env.AEGIS_APP_KEY,
 *     loginName: 'lee',
 *   },
 *   webhookUrl: tamRobotWebhook,
 *   chatId: tamRobotChatId,
 *   tableHeaderMap: summaryScoreTableHeaderMap,
 * });
 */
export declare function genSummaryDataAndSendRobot({ date, groupIdList, secretInfo, extraDataMap, ignoreProjectIdList, tableHeaderMap, webhookUrl, chatId, rumSecretList, }: {
    date: number;
    groupIdList: Array<number>;
    secretInfo: SecretInfoType;
    extraDataMap?: {};
    ignoreProjectIdList?: Array<string>;
    tableHeaderMap?: {};
    webhookUrl: string;
    chatId: string;
    rumSecretList?: Array<IRumSecretItem>;
}): Promise<{
    data: ScoreInfoType[];
    projectIdList: number[];
} | undefined>;

/**
 * 生成 v-console
 * 有几种情况：
 * 1. 不显示
 * 2. 立即显示
 * 3. 异步判断后，确定是否显示
 * @param params 参数
 * @example
 *
 * ```ts
 * genVConsole({
 *   immediateShow: isShowVConsole === 'true'
 *     || isTestEnv()
 *     || noDelay === V_CONSOLE_NO_DELAY.VALUE,
 *   hide: isShowVConsole === 'false' || !!UserInfo.tipUid(),
 *   asyncConfirmFunc: checkIsDevList,
 * });
 * ```
 */
export declare function genVConsole({ immediateShow, hide, vConsoleConfig, asyncConfirmFunc, }: {
    immediateShow?: boolean;
    hide?: boolean;
    vConsoleConfig?: Record<string, any>;
    asyncConfirmFunc?: Function;
}): void;

/**
 * 自动生成version，核心是利用 standard-version 命令
 * @param {object} config 配置信息
 * @param {string} config.root 项目根路径
 * @returns {boolean} 是否执行了 standard-version
 * @example
 *
 * genVersion({
 *   root: process.cwd()
 * })
 *
 */
export declare function genVersion({ root, forceGenVersion, }: {
    root: string;
    forceGenVersion?: boolean;
}): boolean;

/**
 * 运行standard-version，并且发送changelog到机器人
 * @param {object} options 配置
 * @param {object} config.appInfo package.json信息
 * @param {string} config.root 项目根路径
 * @param {string} config.changeLogFilePath changelog文件地址
 * @param {string} config.webhookUrl 机器人hook地址
 * @param {string} config.chatId 会话id
 */
export declare function genVersionAndSendChangeLog({ root, changeLogFilePath, webhookUrl, chatId, forceGenVersion, pushRemote, }: {
    root?: string;
    changeLogFilePath?: string;
    webhookUrl: string;
    chatId?: string;
    forceGenVersion?: boolean;
    pushRemote?: boolean;
}): Promise<unknown>;

/**
 * 生成版本信息，可以用来发送到群聊中
 * @param {object} config 配置信息
 * @param {string} config.readmeFilePath changelog文件地址
 * @param {object} config.appInfo package.json信息
 * @returns {string} 版本信息
 * @example
 *
 * const appInfo = require(`${rootPath}/package.json`);
 * const readmeFilePath = `${rootPath}/CHANGELOG.md`;
 *
 * const content = genVersionTip({
 *   readmeFilePath,
 *   appInfo,
 * });
 */
export declare function genVersionTip({ readmeFilePath, appInfo, showNpmLink, }: {
    showNpmLink?: boolean;
    readmeFilePath: string;
    appInfo: IAppInfo;
}): string;

export declare function get(source: Record<string, any>, path: string, defaultValue?: any): any;

/**
 * 获取累积宽度
 * @param {Array<number>} cellWidthList - 宽度列表
 * @param {number} idx - 当前idx
 * @returns {number} 累计宽度
 *
 * @example
 *
 * getAccCellWidth([20, 10, 20, 10], 1)
 *
 * // 30
 */
export declare function getAccCellWidth(cellWidthList: Array<number>, idx: number): number;

export declare function getAccessToken({ appId, appSecret, }: {
    appId: string;
    appSecret: string;
}): Promise<unknown>;

export declare function getAllDevopsTemplateInstances(reqParam: ITemplateReq & {
    page?: number | undefined;
    pageSize?: number | undefined;
}): Promise<IRemoteInstances>;

/**
 * 获取所有 git 仓库
 *
 * @export
 * @param {string} root 根路径
 * @returns {array} 路径列表
 * @example
 * ```ts
 * getAllGitRepo('/root/yang');
 *
 * [
 *   {
 *     root: '/root',
 *     origin: 'git@git.address',
 *   }
 * ]
 * ```
 */
export declare function getAllGitRepo(root: string): {
    root: string;
    origin: string;
}[];

/**
 * 获取全部流水线列表
 * @param {object} params 配置信息
 * @param {string} params.projectId 项目ID
 * @param {object} params.secretInfo 密钥信息
 * @param {string} params.host 请求域名
 * @param {number} params.page 第几页
 * @param {number} params.pageSize 每页数据量
 * @param {Array} list 结果列表，可不传，用于迭代
 * @returns 流水线列表
 */
export declare function getAllPipelineList(args: Parameters<typeof getPipelineList>[0], list?: Array<any>): Promise<any>;

/**
 * 获取某个token名下所有项目
 * @param {string} privateToken 密钥
 * @param {string} search 搜索内容
 * @returns {Array<object>} 项目列表
 * @example
 *
 * const projects = await getAllProjects('xxxxx');
 *
 * console.log(projects)
 */
export declare function getAllProjects(privateToken: string, search?: string): Promise<Array<object>>;

export declare function getAPITicket(accessToken: string): Promise<unknown>;

/**
 * 根据省份城市转化为`id`数组
 * @param {string} provinceStr
 * @param {string} cityStr
 * @returns {Array} 包含省份、城市ID的数组
 *
 * @example
 * const res =  getAreaCode('山东', '德州');
 * // ['37', '14']
 */
export declare function getAreaCode(provinceStr?: string, cityStr?: string): any;

/**
 * 获取城市列表，默认不包含`全省`选项
 * @param {object} [data] 原始数据
 * @param {array} [areaArray = []] 结果列表
 * @param {boolean} [allProvFlag = false] 是否包含`全省`选项
 * @returns {Array} 城市列表
 * @example
 *
 * const res = getAreaData();
 * // [
 * //   {
 * //     text: '北京',
 * //     code: '11',
 * //     children: [{
 * //       text: '北京',
 * //       code: '0',
 * //     }],
 * //   },
 * //   {
 * //     text: '天津',
 * //     code: '12',
 * //     children: [{
 * //       text: '天津',
 * //       code: '0',
 * //     }],
 * //   },
 * //   {
 * //     text: '河北',
 * //     code: '13',
 * //     {
 * //       text: '石家庄',
 * //       code: '1',
 * //     },
 * //     {
 * //       text: '唐山',
 * //       code: '2',
 * //     },
 * //       // ...
 * //     ],
 * //   },
 * //   // ...
 * // ];
 *
 */
export declare function getAreaData(data?: {
    provData: {
        11: string;
        12: string;
        13: string;
        14: string;
        15: string;
        21: string;
        /**
         * 获取如下格式的城市列表，包含`全国`、`全省`选项
         * @returns {Array} 城市列表
         * @example
         *
         * const res = getAreaDataAll();
         * // [
         * //   {
         * //     text: '全国',
         * //     code: '0',
         * //     children: [{
         * //       text: '不限',
         * //       code: '0',
         * //     }],
         * //   },
         * //   {
         * //     text: '北京',
         * //     code: '11',
         * //     children: [{
         * //       text: '北京',
         * //       code: '0',
         * //     }],
         * //   },
         * //   {
         * //     text: '天津',
         * //     code: '12',
         * //     children: [{
         * //       text: '天津',
         * //       code: '0',
         * //     }],
         * //   },
         * //   {
         * //     text: '河北',
         * //     code: '13',
         * //     children: [{
         * //       text: '全省',
         * //       code: '0',
         * //     },
         * //     {
         * //       text: '石家庄',
         * //       code: '1',
         * //     },
         * //     {
         * //       text: '唐山',
         * //       code: '2',
         * //     },
         * //       // ...
         * //     ],
         * //   },
         * //   // ...
         * // ];
         *
         */
        22: string;
        23: string;
        31: string;
        32: string;
        33: string;
        34: string;
        35: string;
        36: string;
        37: string;
        41: string;
        42: string;
        43: string;
        44: string;
        45: string;
        46: string;
        50: string;
        51: string;
        52: string;
        53: string;
        54: string;
        61: string;
        62: string;
        63: string;
        64: string;
        65: string;
        71: string;
        81: string;
        82: string;
    };
    cityData: {
        11: string[];
        12: string[];
        13: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
        };
        14: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
            12: string;
        };
        15: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            22: string;
            25: string;
            29: string;
            30: string;
        };
        21: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
            12: string;
            13: string;
            14: string;
        };
        22: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            24: string;
            25: string;
        };
        23: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
            12: string;
            27: string;
        };
        31: string[];
        32: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
            12: string;
            13: string;
        };
        33: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
        };
        34: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            10: string;
            11: string;
            12: string;
            13: string;
            14: string;
            15: string;
            16: string;
            17: string;
            18: string;
        };
        35: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
        };
        36: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
        };
        37: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
            12: string;
            13: string;
            14: string;
            15: string;
            16: string;
            17: string;
        };
        41: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
            12: string;
            13: string;
            14: string;
            15: string;
            16: string;
            17: string;
            18: string;
            19: string;
        };
        42: {
            1: string;
            2: string;
            3: string;
            5: string; /**
            * 根据省份城市转化为`id`数组
            * @param {string} provinceStr
            * @param {string} cityStr
            * @returns {Array} 包含省份、城市ID的数组
            *
            * @example
            * const res =  getAreaCode('山东', '德州');
            * // ['37', '14']
            */
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
            12: string;
            13: string;
            28: string;
            94: string;
            95: string;
            96: string;
            A21: string;
        };
        43: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
            12: string;
            13: string;
            31: string;
        };
        44: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            12: string;
            13: string;
            14: string;
            15: string;
            16: string;
            17: string;
            18: string;
            19: string;
            20: string;
            51: string;
            52: string;
            53: string;
        };
        45: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
            12: string;
            13: string;
            14: string;
        };
        46: {
            1: string;
            2: string;
            91: string;
            92: string;
            93: string;
            95: string;
            96: string;
            97: string;
            A25: string;
            A26: string;
            A27: string;
            A28: string;
            A30: string;
            A31: string;
            A33: string;
            A34: string;
            A35: string;
            A36: string;
            A37: string;
            A38: string;
            A39: string;
        };
        50: string[];
        51: {
            1: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
            13: string;
            14: string;
            15: string;
            16: string;
            17: string;
            18: string;
            19: string;
            20: string;
            32: string;
            33: string;
            34: string;
        };
        52: {
            1: string;
            2: string;
            3: string;
            4: string;
            22: string;
            /**
             * 根据`id`获取省份名字
             * @param {string | number} provinceId
             * @returns {string} 省份名字
             *
             * @example
             * const res =  getProvName(37)
             * // 山东
             *
             * const res2 =  getCityName(11)
             * // 北京
             */
            23: string;
            24: string;
            26: string;
            27: string;
            31: string;
            32: string;
            33: string;
            34: string;
            35: string;
            36: string;
            37: string;
        };
        53: {
            1: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            23: string;
            25: string;
            26: string;
            28: string;
            29: string;
            31: string;
            33: string;
            34: string;
        };
        54: {
            1: string;
            21: string;
            22: string;
            23: string;
            24: string;
            25: string;
            26: string;
        };
        61: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
        };
        62: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
            12: string;
            29: string;
            30: string;
        };
        63: {
            1: string;
            21: string;
            22: string;
            23: string;
            25: string;
            26: string;
            27: string;
            28: string;
        };
        64: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
        };
        65: {
            1: string;
            2: string;
            21: string;
            22: string;
            23: string;
            27: string;
            28: string;
            29: string;
            30: string;
            31: string;
            32: string;
            40: string;
            42: string;
            43: string;
            91: string;
            92: string;
            93: string;
            94: string;
        };
        71: string[];
        81: string[];
        82: string[];
    };
}, areaArray?: Array<ProvType>, allProvFlag?: boolean): ProvType[];

/**
 * 获取如下格式的城市列表，包含`全国`、`全省`选项
 * @returns {Array} 城市列表
 * @example
 *
 * const res = getAreaDataAll();
 * // [
 * //   {
 * //     text: '全国',
 * //     code: '0',
 * //     children: [{
 * //       text: '不限',
 * //       code: '0',
 * //     }],
 * //   },
 * //   {
 * //     text: '北京',
 * //     code: '11',
 * //     children: [{
 * //       text: '北京',
 * //       code: '0',
 * //     }],
 * //   },
 * //   {
 * //     text: '天津',
 * //     code: '12',
 * //     children: [{
 * //       text: '天津',
 * //       code: '0',
 * //     }],
 * //   },
 * //   {
 * //     text: '河北',
 * //     code: '13',
 * //     children: [{
 * //       text: '全省',
 * //       code: '0',
 * //     },
 * //     {
 * //       text: '石家庄',
 * //       code: '1',
 * //     },
 * //     {
 * //       text: '唐山',
 * //       code: '2',
 * //     },
 * //       // ...
 * //     ],
 * //   },
 * //   // ...
 * // ];
 *
 */
export declare function getAreaDataAll(): ProvType[];

/**
 * 根据`id`将省份城市转化为字符串数组
 * @param {string | number} provinceId
 * @param {string | number} cityId
 * @returns {Array} 包含省份、城市名字的数组
 *
 * @example
 * const res =  getProvName(37, 14)
 * // ['山东', '德州']
 *
 * const res2 =  getCityName(11)
 * // ['北京', '北京']
 */
export declare function getAreaName(provinceId: string | number, cityId?: number): string[];

/**
 * 获取审核人
 * @param params 参数
 * @returns 审核人
 *
 * @example
 * ```ts
 * getAuditorFromRainbowConfig({
 *   rainbowConfig: { "pmd-mobile/match/*": "gg", "pmd-mobile/convert-cross": "gg" },
 *   checkKeyList: [ 'pmd-mobile/match/gp/gp-hor', 'pmd-mobile/match/gp' ],
 *   minimatch: require('minimatch'),
 *   minimatchKey: 'pmd-mobile/match/gp',
 * })
 * ```
 */
export declare function getAuditorFromRainbowConfig({ rainbowConfig, checkKeyList, minimatch, minimatchKey, }: {
    rainbowConfig: Record<string, string>;
    checkKeyList: string[];
    minimatch: Function;
    minimatchKey: string;
}): string;

export declare function getAvailableDiskSize(options?: {
    mockLog: string;
}): number;

/**
 * 获取图片，并转 base64
 *
 * @param url 图片链接
 * @returns 获取结果
 * @example
 * ```ts
 * getBase64FromUrl(imgUrl).then(consoleImage);
 * ```
 */
export declare function getBase64FromUrl(url: string): Promise<unknown>;

/**
 * 获取仓库的分支列表
 * @param {object} options 输入配置
 * @param {string} options.projectName 项目名称
 * @param {string} options.privateToken 密钥
 * @param {string} options.baseUrl baseUrl
 * @returns {Promise<Array<object>>} 请求Promise
 * @example
 *
 * getBranchesByProjectName({
 *   projectName: 't-comm',
 *   privateToken: 'xxxxx',
 * }).then((resp) => {
 *
 * })
 */
export declare function getBranchesByProjectName({ projectName, privateToken, baseUrl }: {
    projectName: string;
    privateToken: string;
    baseUrl: string;
}): Promise<Array<object>>;

/**
 * 获取tGit上某分支生命周期
 * @param {object} options 输入配置
 * @param {string} options.projectName 项目名称
 * @param {string} options.branchName 分支名称
 * @param {string} options.privateToken 密钥
 * @returns {Promise<object>} 请求Promise
 * @example
 *
 * getBranchLifeCycle({
 *   projectName: 't-comm',
 *   branchName: 'master',
 *   privateToken: 'xxxxx',
 * }).then((resp) => {
 *
 * })
 */
export declare function getBranchLifeCycle({ projectName, branchName, privateToken }: {
    projectName: string;
    branchName: string;
    privateToken: string;
}): Promise<object>;

export declare function getBundleBuildDesc({ root, env, }: {
    root: string;
    env?: string;
}): string;

export declare function getBundleVersion(root: string): any;

/**
 * 获取 cdn 链接
 * @param {string} url 图片地址
 * @returns 新的地址
 */
export declare function getCdnUrl(url?: string): string;

/**
 * 根据`id`获取城市名字
 * @param {string | number} provinceId
 * @param {string | number} cityId
 * @returns {string} 城市名字
 *
 * @example
 * const res =  getCityName(37, 14)
 * // 德州
 *
 * const res2 =  getCityName(11)
 * // 北京
 */
export declare function getCityName(provinceId: number | string, cityId?: number | string): string;

/**
 * 统计组件数目、wxml大小、wxss大小、js大小等
 * @param dist
 * @returns result
 *
 * @example
 * ```ts
 * getComponentInfo('./dist/dev/mp-weixin')
 * ```
 */
export declare function getComponentInfo(dist: string, config?: {
    wxmlPostfix: string;
    wxssPostfix: string;
    vendorNames: string[];
}): {
    componentTotal: number;
    wxsstTotal: number;
    jsTotal: number;
    wxmlSizeTotal: number;
    wxssSizeTotal: number;
    jsSizeTotal: number;
    vendorJsSize: number;
};

/**
 * 获取压缩后的图片
 * @param {string} url 图片地址
 * @param {number} [imageWidth=0] 宽度
 * @param {number} [imageHeight=0] 高度
 * @returns 新的 url 地址
 */
export declare function getCompressImgUrl(url: string | {
    width?: number;
    height?: number;
    url?: string;
    replace?: Function;
}, imageWidth?: number, imageHeight?: number): string;

/**
 * 获取config
 * @param {string} name
 * @return {*}  {*}
 *
 * @example
 * getConfig('login.loginType')
 * getConfig('game')
 */
export declare function getConfig(name?: string): any;

/**
 * 获取cookie
 * @param {string} key cookie键值
 * @returns {string} cookie值
 *
 * @example
 *
 * const res = getCookie('name')
 *
 * // => mike
 *
 */
export declare function getCookie(key: string): string;

export declare function getCOSBucketList({ secretId, secretKey, bucket, region, prefix, }: {
    secretId: string;
    secretKey: string;
    bucket: string;
    region: string;
    prefix: string;
}): Promise<Array<ICosMeta>>;

export declare function getCosUrlLink({ bucket, region, dir, fileName, }: {
    bucket: string;
    region: string;
    dir: string;
    fileName: string;
}): string;

/**
 * 倒计时（eg:距开赛1天）
 * @param {string} time  剩余时间
 * @param {SECOND | MINUTE | HOUR | DAY } [maxUnit]  最大单位
 * @returns {object} 剩余时间的描述对象
 * @example
 *
 * getCountDownObj(100)
 * // { day: 0, hour: 0, minute: 1, second: 40 }
 *
 * getCountDownObj(1*24*60*60+200)
 * // { day: 1, hour: 0, minute: 3, second: 20 }
 *
 * getCountDownObj(1 * 24 * 60 * 60 + 2 * 60 * 60 + 1 * 60 + 11, 'HOUR')
 * // 结果 =>
 * {
 *   fHour: '26',
 *   fMinute: '01',
 *   fSecond: '11',
 *   hour: 26,
 *   minute: 1,
 *   second: 11,
 * }
 */
export declare function getCountDownObj(time: number | string, maxUnit?: string): {
    day?: Number;
    hour?: Number;
    minute?: Number;
    second?: Number;
    fDay?: String;
    fHour?: String;
    fMinute?: String;
    fSecond?: String;
};

export declare function getCurrentProjectUseGray(fullSubProjectName: string, globalGrayPublishConfig: IGlobalGrayPublishConfig): {
    fullSubProjectName: string;
    packageName: string;
    parsedBranch: string;
    cookieId: string;
}[];

/**
 * 获取几天前的终止时间戳
 * @param {boolean} n 几天前
 * @param {string} unit 返回时间戳的单位，默认是s(秒)
 * @param {string} endFlag 以什么单位作为结束时间，默认分钟，即23时59分0秒0毫秒
 * @returns {number} 时间戳
 */
export declare function getDayEndTimeStamp(n?: number, unit?: string, endFlag?: string): number;

/**
 * 获取几天前的起始时间戳
 * @param {boolean} n 几天前
 * @returns {number} 时间戳
 */
export declare function getDayStartTimestamp(n?: number, unit?: string): number;

export declare function getDBYEndTimeStamp(unit?: string, endFlag?: string): number;

export declare function getDBYStartTimeStamp(unit?: string): number;

/**
 * 获取依赖列表
 * @param dir 目录
 * @returns dependenciesList
 */
export declare function getDeps(dir: string): string[];

export declare function getDevopsTemplateInstances({ projectId, templateId, host, secretInfo, page, pageSize, }: ITemplateReq & {
    page?: number;
    pageSize?: number;
}): Promise<any>;

export declare function getE2ERobotChatId({ chatIdMap, start, isFailed, isSendAll, isOnlyMe, shouldSendSuccess, }: {
    chatIdMap: {
        ALL: Array<string>;
        ONLY_ME: Array<string>;
        FAIL: Array<string>;
        SUCCESS: Array<string>;
    };
    start: number;
    isFailed?: boolean;
    isSendAll?: boolean;
    isOnlyMe?: boolean;
    shouldSendSuccess?: (number: number) => boolean;
}): string[];

export declare function getE2ETestRobotMessage(data: {
    start: number | string | Date;
    duration: number;
    passes: number;
    tests: number;
    bkStartType: keyof typeof TRIGGER_MAP;
    projectLink?: string;
    checkUrl?: string;
    name?: string;
    comment?: string;
    fileList?: Array<{
        file: string;
        tests: number;
        passes: number;
        link: string;
        testList: ITestList;
    }>;
}, notificationList?: never[]): {
    message: string;
    start: string | number | Date;
    hasFailed: boolean;
};

/**
 * 获取useragent类型
 * @returns {object} useragent的map
 * @example
 *
 * getEnvUAType()
 *
 * // =>
 * {
 *   isWeixin: false,
 *   isWorkWeixin: false,
 *   isQQ: false,
 *   isPvpApp: false,
 *   isTipApp: false,
 *   isAndroid: false,
 *   isIos: true,
 *   isIOS: true,
 *   isMsdk: false,
 *   isMsdkV5: false,
 *   isSlugSdk: false,
 *   isInGame: false,
 *   isGHelper: false,
 *   isGHelper20004: false,
 *   isMiniProgram: false,
 *   isLolApp: false,
 *   isWindowsPhone: false,
 *   isSymbian: false,
 *   isPc: true,
 * };
 *
 */
export declare function getEnvUAType(): IEnv;

export declare function getEnvVariableMap(filepath: string): Record<string, any>;

export declare function getESLintImportOrderRule(): {
    'import/order': (string | {
        groups: string[];
        'newlines-between': string;
        alphabetize: {
            order: string;
            caseInsensitive: boolean;
        };
        pathGroups: {
            pattern: string;
            group: string;
            position: string;
        }[];
        pathGroupsExcludedImportTypes: string[];
    })[];
};

export declare function getESLintImportSettings(options?: {
    aliasMap: Array<[string, string]>;
}): {
    'import/resolver': {
        node: {
            extensions: string[];
        };
        alias: {
            map: string[][];
            extensions: string[];
        };
    };
    'import/ignore': string[];
};

export declare function getFileName(file: string): string;

export declare function getFlattenedDeps(deps: IDeps): Record<string, any>;

/**
 * 获取组件全称
 * @param name 组件名称
 * @param prefix 前缀
 * @returns 全称
 * @example
 * ```ts
 * getFullCompName('swiper-item', 'press-')
 * getFullCompName('press-swiper-item', 'press-')
 *
 * // press-swiper-item
 * ```
 */
export declare function getFullCompName(name?: string, prefix?: string): string;

/**
 * 获取当前用户
 * @param isPriorGit - 是否优先使用git用户信息
 * @returns user
 */
export declare function getGitAuthor(isPriorGit?: boolean, root?: string, useCache?: boolean): string;

export declare function getGitCodeLink({ domain, repo, branch, localFile, line, }: {
    domain: string;
    repo: string;
    branch: string;
    localFile: string;
    line: string;
}): string;

/**
 * 获取提交信息
 * @param {string} root 根路径
 * @param {boolean} mergeCommit 是否包含 merge 的提交
 * @param {boolean} splitMessage 是否去掉提交信息的前缀
 * @returns {Object} 提交对象
 *
 * @example
 * ```ts
 * getGitCommitInfo()
 * {
 *   author: 'novlan1',
 *   message: ' 优化一部分文档',
 *   hash: '0cb71f9',
 *   date: '2022-10-02 10:34:31 +0800',
 *   timeStamp: '1664678071',
 *   branch: 'master'
 * }
 * ```
 */
export declare function getGitCommitInfo(root?: string, mergeCommit?: boolean, splitMessage?: boolean, useCache?: boolean): IGitCommitInfo;

/**
 * 获取提交信息
 * @param {string} root 根路径
 * @param {boolean} mergeCommit 是否包含 merge 的提交
 * @param {boolean} splitMessage 是否去掉提交信息的前缀
 * @returns {string} 提交信息
 *
 * @example
 * ```ts
 * getGitCommitMessage()
 * // '优化一部分文档'
 * ```
 */
export declare function getGitCommitMessage(root?: string, mergeCommit?: boolean, splitMessage?: boolean, useCache?: boolean): string;

/**
 * 获取tag到head的提交数目
 * @param {string} tag git标签
 * @returns {string} tag至今的提交数目
 */
export declare function getGitCommitsBeforeTag(tag: string, root?: string): string;

/**
 * 获取当前分支
 * @returns {string} 分支名称
 *
 * @example
 *
 * getGitCurBranch()
 *
 * // => master
 */
export declare function getGitCurBranch(root?: string, useCache?: boolean): string;

/**
 * 获取最新tag
 * @returns {string} 最新tag
 */
export declare function getGitLastTag(root?: string): string;

export declare function getGitMRLink({ domain, repo, id, }: {
    domain: string;
    repo: string;
    id?: string;
}): string;

/**
 * 获取打标签的时间
 * @private
 * @param {string} tag git标签
 * @returns {string} 标签时间
 */
export declare function getGitTagTime(tag: string, root?: string): string;

/**
 * 小程序下，获取对应的 H5 路由信息
 * @param {Object} route 路由信息
 * @returns H5 Url
 * @example
 * ```ts
 * getH5CurrentUrl(this.$route);
 * ```
 */
export declare function getH5CurrentUrl(route: {
    name?: string;
    meta?: {
        rawPath?: Array<string>;
    };
    params: Record<string, string>;
}): string;

export declare function getHistoryModeConfigDiff({ secretInfo, appName, key, }: {
    secretInfo: ISecretInfo_4;
    appName: string;
    key: string;
}): Promise<{
    equal: boolean;
    addedMap: IAddedMap;
    deletedMap: IAddedMap;
}>;

export declare function getHistoryModeConfigDiffAndSendRobot({ secretInfo, appName, key, chatId, webhookUrl, mentions, }: {
    secretInfo: ISecretInfo_4;
    appName: string;
    key: string;
    chatId?: string | string[];
    webhookUrl?: string;
    mentions?: Array<string>;
}): Promise<{
    message: string;
    equal: true;
    addedMap: IAddedMap;
    deletedMap: IAddedMap;
} | {
    message: string;
    equal: false;
    addedMap: IAddedMap;
    deletedMap: IAddedMap;
}>;

/**
 * 将图片地址由 http 替换为 https 协议
 * @param url 图片地址
 * @returns 新的地址
 */
export declare const getHttpsUrl: (url: string) => string;

/**
 * 获取 i18n token
 *
 * @export
 * @param {string} appId appId
 * @param {string} appKey appKey
 * @returns {Promise<string>} token
 * @example
 * ```ts
 * getI18nToken('appId', 'appKey').then(token => {
 *   console.log('token', token)
 * })
 * ```
 */
export declare function getI18nToken(appId: string, appKey: string): Promise<unknown>;

export declare function getImageName({ projectName, subProjectName, branch, }: {
    projectName: string;
    subProjectName: string;
    branch: string;
}): string;

/**
 * 获取图片md5
 * @param {object} options 配置信息
 * @param {string} options.savePath 本地图片地址，建议绝对路径
 * @returns {Promise<string>} 图片md5值
 *
 * @example
 * getImgMd5({
 *  savePath: '/test.png'
 * }).then(md5 => {
 *   console.log(md5)
 * })
 * ```
 */
export declare function getImgMd5({ savePath }: {
    savePath: string;
}): Promise<string>;

export declare function getInnerBundleBuildDesc({ env, branch, author, message, }: {
    env: string;
    branch: string;
    author: string;
    message: string;
}): string;

/**
 * 获取ip地址
 * @returns 字符串，形如 x.x.x.x
 *
 * @example
 * ```ts
 * getIPAddress() // 10.10.10.10
 * ```
 */
export declare function getIPAddress(): string;

/**
 *
 * 获取ip的字符串
 * @returns 字符串，形如 x_x_x_x
 *
 * @example
 * ```ts
 * getIPAddressStr() // 10_10_10_10
 * ```
 */
export declare function getIPAddressStr(): string;

export declare function getJsonFromLog(file: string): {};

export declare function getJsonFromSheet(dataPath: string): any;

/**
 * 获取对象的value列表，并输出大对象形式
 * @param {Array<any>} data
 * @returns {Object} 处理后的对象
 *
 * @example
 *
 * const data = [
 * {
 *   Project: 'x',
 *   Request: 1,
 *   Score: 'a'
 * },
 * {
 *   Project: 'y',
 *   Request: 2,
 *   Score: 'b'
 * }]
 *
 * getKeyValuesMap(data)
 *
 * // 结果为:
 * {
 *   Project: ['x', 'y'],
 *   Request: [1, 2],
 *   Score: ['a', 'b'],
 * }
 *
 * // 也支持参数为带value属性的对象数组，如：
 *
 * const data = [
 * {
 *   Project: {
 *     value: 'x'
 *   }
 * },{
 *   Project: {
 *     value: 'y'
 *   }
 * }]
 *
 * // 结果为：
 * {
 *   Project: ['x', 'y']
 * }
 */
export declare function getKeyValuesMap(data?: Array<{
    [k: string]: ValueType | {
        value: ValueType;
    };
}>): Record<string, Array<ValueType>>;

/**
 * 匹配正则，获取匹配到的列表
 * @param {string} content 输入内容
 * @param {RegExp} reg 正则
 * @returns 匹配列表
 *
 * @example
 * ```ts
 * getMatchListFromReg(content, /emit\('([^',]+)'/g);
 *
 * // ['start', 'end']
 * ```
 */
export declare function getMatchListFromReg(content: string, reg: RegExp): string[];

/**
 * 给对象数组的每一项，添加isMax、isMin、、isSecondMax、isSecondMin、idx、lastIdx等属性
 * @param {Array<object>} data 原始数据
 * @param {Array<string>} reverseScoreKeys - 逆序的key列表
 * @returns {Object} 处理后的数据
 *
 * @example
 * const data = [{
 *   ProjectName: { name: 'ProjectName', value: '麻将赛事' },
 *   PagePv: { name: 'PagePv', value: 2877 },
 * }, {
 *   ProjectName: { name: 'ProjectName', value: '斗地主赛事' },
 *   PagePv: { name: 'PagePv', value: 7 },
 * },
 * // ...
 * ];
 *
 * getMaxAndMinIdx(data, [])
 *
 * // =>
 *   [{
 *     ProjectName: { name: 'ProjectName', value: '麻将赛事' },
 *     PagePv: {
 *       name: 'PagePv',
 *       value: 2877,
 *       idx: 6,
 *       lastIdx: 6,
 *       isMax: false,
 *       isMin: false,
 *       isSecondMax: false,
 *       isSecondMin: false,
 *     },
 *   }];
 *
 */
export declare function getMaxAndMinIdx(data?: Array<Record<string, any>>, reverseScoreKeys?: Array<string>): any[];

/**
 * 获取 rtx 拼接的提及字符串
 * @param rawStr 原始字符串，比如 `foo,bar`
 * @returns 处理后的字符串，比如 <@foo><@bar>
 */
export declare function getMentionRtx(rawStr?: string): string;

/**
 * 获取一个月有多少天
 * 原理：new Date()第2个参数默认为1，就是每个月的1号，把它设置为0时，
 * new Date()会返回上一个月的最后一天，然后通过getDate()方法得到天数
 * @param {string} year 年份
 * @param {string} month 月份
 * @returns {number} 天数
 *
 * @example
 * getMonthDay(2022, 2) // 28
 *
 * getMonthDay(2022, 3) // 31
 *
 * getMonthDay(2022, 4) // 30
 */
export declare function getMonthDay(year: number, month: number): number;

/**
 * 获取一个月有多少天
 *
 * 原理：把每月的天数写在数组中，再判断时闰年还是平年确定2月分的天数
 * @param {string} year 年份
 * @param {string} month 月份
 * @returns {number} 天数
 *
 * @example
 * getMonthDay2(2022, 2)
 * // 28
 *
 * getMonthDay2(2022, 3)
 * // 31
 *
 * getMonthDay2(2022, 4)
 * // 30
 */
export declare function getMonthDay2(year: number, month: number): number;

/**
 * 摩斯密码的 Vue mixin，方便实用
 * @param {array} pwd 密钥
 * @param {Function} cb 回到函数
 * @returns 换入内容
 * @example
 * ```ts
 * getMorsePwdMixin([1, 1, 1, 1, 1], function () {
 *   if (isInIFrame()) return;
 *   this.onShowLaunchApp();
 * }),
 * ```
 */
export declare const getMorsePwdMixin: (pwd: number[], cb: Function) => any;

/**
 * 获取MR列表
 * @param {object} options 输入配置
 * @param {string} options.projectName 项目名称
 * @param {string} options.privateToken 密钥
 * @returns {Promise<object>} 请求Promise
 * @example
 *
 * getMrList({
 *   projectName: 't-comm',
 *   privateToken: 'xxxxx',
 * }).then((resp) => {
 *
 * })
 */
export declare function getMrList({ projectName, privateToken }: {
    projectName: string;
    privateToken: string;
}): Promise<object>;

/**
 * msdk 浏览器全屏方法，点击外链时可全屏，返回时退出全屏
 * @example
 * ```ts
 * mixins: [getMsdkFullScreen()],
 * ```
 */
export declare function getMsdkFullScreen(): {
    onShow(): void;
    methods: {
        callJsReSetFullScreen(): void;
    };
};

declare function getNewPage(browser: IBrowser, device: DEVICE_TYPE): Promise<any>;

export declare function getNowBySecond(): number;

/**
 * 获取分支详情
 * @param {object} options 输入配置
 * @param {string} options.projectName 项目名称
 * @param {string} options.branchName 分支名称
 * @param {string} options.privateToken 密钥
 * @returns {Promise<object>} 请求Promise
 * @example
 *
 * getOneBranchDetail({
 *   projectName: 't-comm',
 *   branchName: 'master',
 *   privateToken: 'xxxxx',
 * }).then((resp) => {
 *
 * })
 */
export declare function getOneBranchDetail({ projectName, branchName, privateToken }: {
    projectName: string;
    branchName: string;
    privateToken: string;
}): Promise<object>;

/**
 * 获取commit详情
 * @param {object} options 输入配置
 * @param {string} options.projectName 项目名称
 * @param {string} options.commitId 提交hash
 * @param {string} options.privateToken 密钥
 * @returns {Promise<object>} 请求Promise
 * @example
 *
 * getOneCommitDetail({
 *   projectName: 't-comm',
 *   commitId: 'aaaa',
 *   privateToken: 'xxxxx',
 * }).then((resp) => {
 *
 * })
 */
export declare function getOneCommitDetail({ projectName, commitId, privateToken }: {
    projectName: string;
    commitId: string;
    privateToken: string;
}): Promise<object>;

/**
 * 获取MR的一条评论
 * @param {object} options 输入配置
 * @param {string} options.projectName 项目名称
 * @param {string} options.privateToken 密钥
 * @param {string} options.mrId 某次MR的Id
 * @returns {Promise<object>} 请求Promise
 * @example
 *
 * getOneMrComments({
 *   projectName: 't-comm',
 *   privateToken: 'xxxxx',
 *   mrId: '1'
 * }).then((resp) => {
 *
 * })
 */
export declare function getOneMrComments({ mrId, projectName, privateToken }: {
    projectName: string;
    mrId: string;
    privateToken: string;
}): Promise<object>;

/**
 * 通过搜索获取一个项目信息
 * @param {object} options 输入配置
 * @param {string} options.search 搜索内容
 * @param {string} options.page 起始页码
 * @param {string} options.privateToken 密钥
 * @returns {Promise<Array<object>>} 请求Promise
 * @example
 *
 * getOneProjectBySearch({
 *   search: 't-comm',
 *   page: 1,
 *   privateToken: 'xxxxx',
 * }).then((resp) => {
 *
 * })
 */
export declare function getOneProjectBySearch({ search, privateToken, page, }: {
    search: string;
    privateToken: string;
    page?: number;
}): Promise<Array<object>>;

/**
 * 获取仓库详情
 * @param {object} options 输入配置
 * @param {string} options.projectName 项目名称
 * @param {string} options.privateToken 密钥
 * @returns {Promise<object>} 请求Promise
 * @example
 * getOneProjectDetail({
 *   projectName: 't-comm',
 *   privateToken: 'xxxxx',
 * }).then((resp) => {
 *
 * })
 */
export declare function getOneProjectDetail({ projectName, privateToken, baseUrl, }: {
    projectName: string;
    privateToken: string;
    baseUrl?: string;
}): Promise<unknown>;

export declare function getOpenLocationUrl({ lat, lng, name, address, }: Pick<OpenLocation, 'lat' | 'lng' | 'name' | 'address'>): string;

export declare function getPagesJsonCondition(componentConfig: Array<{
    list: Array<{
        name: string;
    }>;
}>): {
    current: number;
    list: {
        name: any;
        path: string;
    }[];
};

/**
 * 统计页面总数、分包数目等
 * @param dist
 * @returns result
 *
 * @example
 * ```ts
 * getPageTotal('./dist/dev/mp-weixin')
 * ```
 */
export declare function getPageTotal(dist: string): {
    pageTotal: number;
    subPackageTotal: number;
};

/**
 * 获取占比
 * @param {number} summary 总数据
 * @param {number} part 部分数据
 * @returns {number} 比例
 * @example
 * getRatio(0, 1)
 * // 0
 *
 * getRatio(1, 0)
 * // 0
 *
 * getRatio(1, 1)
 * // 100
 *
 * getRatio(1, .5)
 * // 50
 */
export declare function getPartRatio(summary: number, part: number): number;

/**
 * 读取持久化存储
 * @param {string} key
 * @returns {string} key对应的值
 */
export declare function getPersist(key: string): any;

/**
 * 获取流水线列表
 * @param {object} params 配置信息
 * @param {string} params.projectId 项目ID
 * @param {object} params.secretInfo 密钥信息
 * @param {string} params.host 请求域名
 * @param {number} params.page 第几页
 * @param {number} params.pageSize 每页数据量
 * @returns 流水线列表
 */
export declare function getPipelineList({ projectId, secretInfo, host, page, pageSize, }: {
    projectId: string;
    secretInfo: ISecretInfo;
    host: string;
    page?: number;
    pageSize?: number;
}): Promise<any>;

/**
 * 获取预发布版本标签，比如 alpha, beta
 * @param {string} version 版本号
 * @returns 标签
 * @example
 * ```ts
 * getPreReleaseTag('1.2.2-beta.0')
 * // beta
 * ```
 */
export declare function getPreReleaseTag(version: string): string;

/**
 * 生成 alpha、beta 等这些预发布的版本
 * @param key 关键词
 * @returns 生成的版本
 */
export declare function getPreReleaseVersion(key?: string): string | undefined;

/**
 * 获取相对上次的比例，会给输入的对象数组的每一项增加 ratio、previousValue 属性
 * @param {Array<Object>} data - 输入数据
 * @param {Object} preDataMap - 上次数据的map
 * @param {string} uniqKey - 唯一键
 *
 * @example
 * const data = [{
 *   Project: { value: 'mj-match', name: 'Project' },
 *   Request: {
 *     value: 854,
 *     name: 'Request',
 *     idx: 19,
 *     lastIdx: 19,
 *     isMax: false,
 *     isMin: false,
 *     isSecondMax: false,
 *     isSecondMin: true,
 *   },
 * }];
 *
 * const preDataMap = {
 *   'mj-match': {
 *     Project: 'mj-match',
 *     Request: 4,
 *     Score: 91.81,
 *     FirstLoadTime: 178,
 *     WholePageTime: 1035,
 *     ParseDomTime: 484,
 *     DNSLinkTime: 0,
 *     DOMTime: 414,
 *     TCP: 0,
 *     HTTP: 275,
 *     BackEnd: 60,
 *     CGIFailNum: 0,
 *     ErrorLogNum: 0,
 *     CGIRequestNum: 83,
 *   },
 * };
 *
 * getPreviousRatio(data, preDataMap);
 *
 * // data会变成：
 * [{
 *   Project: { value: 'mj-match', name: 'Project' },
 *   Request: {
 *     value: 854,
 *     name: 'Request',
 *     idx: 19,
 *     lastIdx: 19,
 *     isMax: false,
 *     isMin: false,
 *     isSecondMax: false,
 *     isSecondMin: true,
 *
 *     previousValue: 4, // 新增属性
 *     ratio: "+999+%" // 新增属性
 *   },
 * }];
 */
export declare function getPreviousRatio(data?: Array<any>, preDataMap?: Record<string, any>, uniqKey?: string): void;

/**
 * 根据 groupId 获取项目列表
 * @ignore
 * @param {object} options 配置
 * @param {number} options.groupId 小组Id
 * @param {object} options.secretInfo 密钥信息
 * @param {string} options.secretInfo.apiKey apiKey
 * @param {string} options.secretInfo.loginName loginName
 * @param {Function} options.secretInfo.getPwdCode getPwdCode
 * @param {Function} options.secretInfo.encrypt encrypt
 * @returns {Promise<array<object>>} 项目列表
 * @example
 * getProjectByGroupId({
 *   groupId: 1,
 *   secretInfo: {
 *     apiKey: '',
 *     loginName: '',
 *     getPwdCode() {},
 *     encrypt() {},
 *   }
 * }).then(resp => {
 *   console.log(resp)
 * })
 * [
 *   {
 *     ID: 56564,
 *     ProjectName: 'name',
 *     ProjectDesc: 'desc',
 *     ProjectKey: 'xxx',
 *     ProjectType: 'web',
 *     GroupId: 123,
 *     GroupName: 'xxx',
 *     GroupKey: 'xxx',
 *     InstanceID: 'rum-xxx',
 *     Url: '*.qq.com',
 *     CodePath: '',
 *     Rate: '100',
 *     CreateUser: 'xxx',
 *     EnableUrlGroup: true,
 *     KafkaHost: '',
 *     KafkaTopic: '',
 *     KafkaVersion: '',
 *     SaslUserName: '',
 *     SaslPassword: '',
 *     SaslMechanism: '',
 *     IsFollow: false,
 *     CreateTime: '2021-10-01T11:34:32+08:00',
 *   },
 *   {
 *     ID: 12345,
 *     // ...
 *   },
 * ];
 *
 */
export declare function getProjectByGroupId({ groupId, secretInfo, }: {
    groupId: number;
    secretInfo: SecretInfoType;
}): Promise<any>;

/**
 * 获取默认分支
 * @param {object} options 输入配置
 * @param {string} options.projectName 项目名称
 * @param {string} options.privateToken 密钥
 * @returns {Promise<string>} 请求Promise
 * @example
 *
 * getProjectDefaultBranch({
 *   projectName: 't-comm',
 *   privateToken: 'xxxxx',
 * }).then((branch) => {
 *  console.log('branch: ', branch)
 * })
 */
export declare function getProjectDefaultBranch({ projectName, privateToken }: {
    projectName: string;
    privateToken: string;
}): Promise<string>;

/**
 * 根据`id`获取省份名字
 * @param {string | number} provinceId
 * @returns {string} 省份名字
 *
 * @example
 * const res =  getProvName(37)
 * // 山东
 *
 * const res2 =  getCityName(11)
 * // 北京
 */
export declare function getProvName(provinceId: string | number): string;

export declare function getPublishBashPath(): string;

export declare function getPublishEnvValue(key: string): string;

export declare function getPublishModuleName(dir?: string): string;

export declare function getPublishRootDir(): string;

/**
 * 获取组件简称
 * @param name 组件名称
 * @param prefix 前缀
 * @returns 简称
 * ```ts
 * getPureCompName('press-swiper-item', 'press-')
 * getPureCompName('swiper-item', 'press-') // swiper-item
 * ```
 */
export declare function getPureCompName(name?: string, prefix?: string): string;

/**
 * url参数变对象
 * @param {string} url 输入URL
 * @returns {Object} search对象
 *
 * @example
 *
 * const res = getQueryObj('https://igame.qq.com?name=mike&age=18&feel=cold&from=China');
 *
 * console.log(res);
 * {
 *   name: 'mike',
 *   age: '18',
 *   feel: "cold",
 *   from: 'China',
 * }
 *
 */
export declare function getQueryObj(url: string): Record<string, string>;

export declare function getRandomNumber(min: number, max: number): number;

/**
 * 获取随机字符串
 * @param {number} length 字符串长度，默认 32
 * @returns {string} 字符串
 * @example
 * ```ts
 * randomString()
 *
 * randomString(16)
 * ```
 */
export declare const getRandomString: typeof randomString;

/**
 * A引用B时，拿引用路径
 * @param pathA 路径A
 * @param pathB 路径B
 * @returns 相对路径
 * @example
 * ```ts
 * getRelativePath('a', 'b');
 *
 * // './b'
 * ```
 */
export declare function getRelativePath(pathA: string, pathB: string): string;

export declare function getRobotWebhookUrl(key: string): string;

/**
 * 路由离开前记住缓存，返回后不刷新页面
 *
 * 比如创建赛事页面，如果前往查看规则，返回后，希望保留之前的表单
 *
 * 注意，用了这个 mixin，就不要用 onShow 了，而是用 mounted，
 * 否则可能会重复触发刷新
 *
 * @param {string} config.refresh 刷新方法
 * @returns 返回对象，包含 beforeRouteLeave 和 activated 方法
 */
export declare function getRouteLeaveCache({ refresh, }: {
    refresh?: string;
}): {
    activated(): void;
    mounted(): void;
    methods: {
        _jumpToCacheRoute(): void;
    };
};

/**
 * 根据路由跳转时的参数，提取 path 和其他参数
 * @param route $router.push 或者 $router.replace 的参数
 * @returns 解析结果
 */
export declare function getRouterFuncPath(route: any): {
    path: any;
    other: any;
};

/**
 * 获取rtx信息
 * @private
 */
export declare function getRtxInfo(): Promise<unknown>;

export declare function getRUMAllProject({ secretId, secretKey, }: {
    secretId: string;
    secretKey: string;
}): Promise<any>;

export declare function getRUMPerformance({ secretId, secretKey, id, startTime, endTime, type, }: {
    secretId: string;
    secretKey: string;
    id: string | number;
    startTime: string | number;
    endTime: string | number;
    type: string;
}): Promise<any>;

export declare function getRUMScores({ secretId, secretKey, startTime, endTime, }: {
    secretId: string;
    secretKey: string;
    startTime: string;
    endTime: string;
}): Promise<Array<ScoreInfoType>>;

export declare function getSomeDayEndTimeStamp(date: string | number | Date, unit?: string): number;

export declare function getSomeDayStartTimeStamp(date: string | number | Date, unit?: string): number;

export declare function getStylelintLinebreaksRules(value?: string): {
    linebreaks?: undefined;
} | {
    linebreaks: string;
};

export declare function getStylelintVendorPrefixRules(): {
    'selector-no-vendor-prefix': null;
    'value-no-vendor-prefix': null;
    'property-no-vendor-prefix': null;
    'at-rule-no-vendor-prefix': null;
    'media-feature-name-no-vendor-prefix': null;
};

export declare function getSubmodulePathList(file?: string): string[];

/**
 * 根据项目id获取分数信息
 * @ignore
 * @param {object} options 参数
 * @param {Array<number>} options.projectIdList 项目Id列表
 * @param {string} options.date 日期，yyyyMMdd格式
 * @param {object} options.secretInfo 密钥信息
 * @param {string} options.secretInfo.apiKey apiKey
 * @param {string} options.secretInfo.loginName loginName
 * @param {Function} options.secretInfo.getPwdCode getPwdCode
 * @param {Function} options.secretInfo.encrypt encrypt
 * @returns {Promise<Array<object>>} 分数信息
 * @example
 * getTAMScoreInfoByProjectId({
 *   projectId: 123123,
 *   date: 20210106
 *   secretInfo: {
 *     apiKey: '',
 *     loginName: '',
 *     getPwdCode() {},
 *     encrypt() {},
 *   }
 * }).then((data) => {
 *   console.log(data)
 * })
 *
 * [
 *   {
 *     ProjectName: '社区',
 *     PagePv: 99,
 *     PageError: 0,
 *     PageDuration: 1409.8333,
 *     StaticFail: 8,
 *     CreateTime: '',
 *     ProjectId: 123123,
 *     PageUv: 23,
 *     ApiNum: 521,
 *     ApiFail: 78,
 *     ApiDuration: 1813.3333,
 *     StaticNum: 1494,
 *     StaticDuration: 103.75,
 *     Score: 80.9167,
 *     CreateUser: 'lee',
 *     GroupName: 'aGroup',
 *   },
 * ]
 *
 */
export declare function getTAMScoreInfoByProjectId({ projectId, startDate, secretInfo, }: {
    projectId: number;
    startDate: string;
    secretInfo: SecretInfoType;
}): Promise<Array<any>>;

/**
 * 根据 groupIdList 获取汇总数据
 * @ignore
 * @param {object} options 配置
 * @param {string} options.date 日期，yyyyMMdd格式
 * @param {Array<number>} options.groupIdList groupId列表
 * @param {object} options.secretInfo 密钥信息
 * @param {string} options.secretInfo.apiKey apiKey
 * @param {string} options.secretInfo.loginName loginName
 * @param {Function} options.secretInfo.getPwdCode getPwdCode
 * @param {Function} options.secretInfo.encrypt encrypt
 * @returns {Promise<({ data: object, projectIdList: Array<number> })>} 汇总数据
 * @example
 * getTAMSummaryScoreByGroupIdList({
 *   groupIdList: [1,2,3],
 *   date: '20210106',
 *   secretInfo: {
 *     apiKey: '',
 *     loginName: '',
 *     getPwdCode() {},
 *     encrypt() {},
 *   }
 * }).then(resp => {
 *   console.log(resp)
 * })
 *
 * {
 *   data:
 *   [
 *     {
 *       ProjectName: '社区',
 *       PagePv: 99,
 *       PageError: 0,
 *       PageDuration: 1409.8333,
 *       StaticFail: 8,
 *       CreateTime: '',
 *       ProjectId: 123123,
 *       PageUv: 23,
 *       ApiNum: 521,
 *       ApiFail: 78,
 *       ApiDuration: 1813.3333,
 *       StaticNum: 1494,
 *       StaticDuration: 103.75,
 *       Score: 80.9167,
 *       CreateUser: 'lee',
 *       GroupName: 'aGroup',
 *     },
 *     {
 *       ProjectId: 123,
 *       // ...
 *     },
 *   ],
 *   projectIdList: [
 *     123123,
 *     123,
 *   ],
 * };
 *
 */
export declare function getTAMSummaryScoreByGroupIdList({ date, groupIdList, secretInfo, }: {
    date: string;
    groupIdList: Array<number>;
    secretInfo: SecretInfoType;
}): Promise<({
    data: Array<ScoreInfoType>;
    projectIdList: Array<number>;
})>;

/**
 * 用于获取用户信息，同时也可以用来校验 AccessToken 的有效性。
 */
export declare function getTencentDocUserInfo({ accessToken, }: {
    accessToken: string;
}): Promise<any>;

/**
 * 获取千分位分隔符
 * @param {string | number} value 输入数字
 * @returns {string} 处理后的数字
 *
 * @example
 *
 * getThousandSeparator('123123123')
 *
 * // => 123,123,123
 *
 * getThousandSeparator('12312312')
 *
 * // => 12,312,312
 */
export declare function getThousandSeparator(value: number | string): string;

/**
 * 获取千分位分隔符，处理数字之间有空格的情况
 * @param {string | number} value 输入数字
 * @returns {string} 处理后的数字
 *
 * @example
 * getThousandSeparator2('12345678 123456789')
 *
 * // => 12,345,678 123,456,789
 *
 */
export declare function getThousandSeparator2(value: number | string): string;

/**
 * 获取某个时间戳距离今天的时间
 * @param {number} timestamp
 * @returns {string} 距离今天的时间描述
 * @example
 *
 * const date = new Date('2020-11-27 8:23:24').getTime();
 * getTimeAgo(date);
 * // 1个月前
 *
 * const date2 = new Date('2021-11-27 8:23:24').getTime();
 * getTimeAgo(date2);
 * // 10个月后
 */
export declare function getTimeAgo(timestamp: number): string;

/**
 * 功能：获取多久之前，若间隔超过一天，返回时刻描述
 * @param {number} timestamp 时间戳
 * @param {string} format 时间格式
 * @returns {string} 距离今天的时间描述或者时刻描述
 * @example
 *
 * getTimeAgoOrDate(Date.now() - 60 * 60 * 24 * 1 * 1000);
 * // 1天前
 *
 * const date = new Date('2018-07-13 17:54:01').getTime();
 * getTimeAgoOrDate(date);
 * // 7月13日17时54分
 */
export declare function getTimeAgoOrDate(time: string | number, format: string): string | null;

export declare function getTodayEndTimeStamp(unit?: string, endFlag?: string): number;

export declare function getTodayStartTimestamp(unit?: string): number;

export declare function getTSErrorFiles(options?: GetTSErrorFilesProps): TsErrorFile[];

declare type GetTSErrorFilesProps = {
    command?: string;
    root?: string;
};

export declare function getUniRouteName({ isNavigateBack, routerParams, }: {
    isNavigateBack?: boolean;
    routerParams?: Array<any>;
}): {
    from: string;
    to: string;
};

/**
 * 获取相对于过去数据的比例
 * @param {number} value 当前数据
 * @param {number} preValue 之前数据
 * @returns {string} 比例
 *
 * @example
 *
 * getUnitPreviousRatio(1, 0)
 * // +999+%
 */
export declare function getUnitPreviousRatio(value: number, preValue: number): string;

/**
 * 获取 Url 参数
 * @param {string} paraName 参数 key
 * @param {string} search url search 部分
 * @returns paraValue
 *
 * @example
 * ```ts
 * getUrlPara('gender', '?gender=male&name=mike&feel=cold&age=18&from=test')
 * // male
 *
 * getUrlPara('age', '?gender=male&name=mike&feel=cold&age=18&from=test')
 * // 18
 * ```
 */
export declare function getUrlPara(paraName: string, search?: string): string;

export declare function getUserComponentDemo(): {
    avatar: string;
    nick: string;
};

export declare function getValidPort(port: number): Promise<unknown>;

export declare const getVisibilityChangeMixin: (showCallback?: Function, hiddenCallback?: Function) => {
    mounted(): void;
    destroyed(): void;
    methods: {
        _watchVisibleChange(): void;
    };
};

/**
 * 获取 vue-lazyload 插件参数
 * @param options 选项
 * @returns 插件参数
 */
export declare function getVLazyOptions(options?: {
    loadingImg?: string;
    errorImg?: string;
}): {
    preLoad: number;
    attempt: number;
    filter: {
        loading(listener: any): void;
        error(listener: any): void;
        https(listener: any): void;
        compress(listener: any): void;
        cdn(listener: any): void;
        stopBeforeLoad(listener: any): void;
    };
    adapter: {
        error(listener: any): void;
    };
};

/**
 * 获取深圳天气信息，可用于通过机器人发送到群聊
 * @returns {object} 天气信息和是否有变化
 * @example
 *
 * getWeatherRobotContent().then(resp => {
 *   const { content, isSame } = resp
 *
 *   console.log(content)
 *   // ## 深圳当前正在生效的预警如下
 *   // ...
 *
 *   console.log(isSame)
 *   // false
 * })
 */
export declare function getWeatherRobotContent(): Promise<{
    content: string;
    isSame: boolean;
}>;

export declare function getYesterdayEndTimeStamp(unit?: string, endFlag?: string): number;

export declare function getYesterdayStartTimeStamp(unit?: string): number;

/**
 *
 * GID 映射表
 *
 * |  名称  |  游戏  |
 * |  ---  |  ---  |
 * |  GAME_LIFE  |  游戏人生  |
 * |  GAME_PVP  |  王者荣耀  |
 * |  GAME_GP  |  和平精英  |
 * |  GAME_HLDDZ  |  欢乐斗地主  |
 * |  GAME_MAJIANG  |  欢乐麻将  |
 * |  GAME_LOLM  |  英雄联盟手游  |
 * |  GAME_NBA  |  最强 NBA  |
 * |  GAME_SJJQ  |    神角技巧  |
 * |  GAME_LMJX  |  黎明觉醒  |
 * |  GAME_TY  |  天涯明月刀手游  |
 * |  GAME_TLBB  |  天龙八部手游  |
 * |  GAME_CF  |  穿越火线  |
 * |  GAME_LOL  |  英雄联盟  |
 * |  GAME_CFM  |  穿越火线-枪战王者  |
 * |  GAME_X5M  |  QQ炫舞手游  |
 * |  GAME_TXGD  |  腾讯掼蛋  |
 * |  GAME_SHANHAI  |  妄想山海  |
 * |  GAME_JCC  |  金铲铲之战  |
 */
export declare const GID_MAP: {
    readonly GAME_LIFE: 100;
    readonly GAME_PVP: 331;
    readonly GAME_GP: 411;
    readonly GAME_HLDDZ: 323;
    readonly GAME_MAJIANG: 304;
    readonly GAME_LOLM: 425;
    readonly GAME_NBA: 406;
    readonly GAME_SJJQ: 460;
    readonly GAME_LMJX: 428;
    readonly GAME_TY: 281;
    readonly GAME_TLBB: 396;
    readonly GAME_CF: 2;
    readonly GAME_LOL: 26;
    readonly GAME_CFM: 333;
    readonly GAME_X5M: 507;
    readonly GAME_TXGD: 508;
    readonly GAME_SHANHAI: 429;
    readonly GAME_JCC: 461;
};

export declare const globalEBus: EventBus;

export declare const GRAY_PUBLISH_OPERATION: {
    FIRST_GRAY_PUBLISH: string;
    UPDATE_GRAY_PERCENT: string;
    PUBLISH_ALL_GRAY: string;
    RECALL_ALL_GRAY: string;
};

export declare const GRAY_PUBLISH_TITLE_MAP: {
    [x: string]: string;
};

/**
 * 处理图片尺寸，即去掉单位 px/rem，将 string 类型转为 number 类型
 * rem 单位的话，会将数值乘以根元素的 fontSize，以获取对应的 px 值
 * @param {Number | String} size 输入单位
 * @returns {Number} 处理后的数值
 *
 * @example
 *
 * handleImgUnit(3)
 * // 3
 *
 * handleImgUnit('10')
 * // 10
 *
 * handleImgUnit('30px')
 * // 30
 *
 * handleImgUnit('5rem')
 * // 250
 *
 * document.documentElement.style.fontSize = '10px';
 * handleImgUnit('5rem')
 * // 50
 */
export declare const handleImgUnit: (size: string | number) => string | number | undefined;

export declare const hsl2hsv: (hue: number, sat: number, light: number) => {
    h: number;
    s: number;
    v: number;
};

export declare const hsv2hsl: (hue: number, sat: number, val: number) => number[];

/**
 * Converts an HSV color value to RGB.
 * *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100].
 * *Returns:* { r, g, b } in the set [0, 255]
 */
export declare function hsv2rgb(h: number, s: number, v: number): {
    r: number;
    g: number;
    b: number;
};

/**
 * 驼峰命名转横线命名：拆分字符串，使用 - 相连，并且转换为小写
 * @param {string} str 输入字符串
 * @returns {string} 处理后的字符串
 *
 * @example
 *
 * hyphenate('abCd')
 *
 * // => ab-cd
 *
 */
export declare function hyphenate(str: string): string;

declare type IAddedMap = Record<string, Array<string>>;

declare interface IAppInfo {
    name: string;
    version: string;
    homepage?: string;
    bugs?: {
        url: string;
    };
    repository?: {
        url: string;
    };
}

declare type IBaseLaunchParams = {
    context?: any;
    qrCodeLib?: any;
    dialogHandler?: any;
    otherDialogParams?: Record<string, any>;
    launchParams?: Record<string, any>;
    wxJSLink?: string;
    env?: Record<string, boolean>;
};

declare type IBrowser = any;

declare interface ICanvas extends HTMLCanvasElement {
    dpi: number;
}

declare interface ICosInfo {
    secretId: string;
    secretKey: string;
    bucket: string;
    region: string;
    dir: string;
}

declare interface ICosMeta {
    Key: string;
    LastModified: Date | string;
}

declare type IDeps = Record<string, Array<string>>;

declare type IEnv = {
    isWeixin: boolean;
    isWorkWeixin: boolean;
    isQQ: boolean;
    isPvpApp: boolean;
    isTipApp: boolean;
    isAndroid: boolean;
    isIos: boolean;
    isIOS: boolean;
    isMsdk: boolean;
    isMsdkX: boolean;
    isMsdkV5: boolean;
    isSlugSdk: boolean;
    isInGame: boolean;
    isGHelper: boolean;
    isGHelper20004: boolean;
    isMiniProgram: boolean;
    isLolApp: boolean;
    isWindowsPhone: boolean;
    isSymbian: boolean;
    isPc: boolean;
};

declare type IGetMiniProgramOpenLink = (params?: any) => Promise<{
    open_link?: string;
}>;

export declare type IGetWxSignaturePromise = () => Promise<{
    wxappid?: string;
    timestamp?: string;
    noncestr?: string;
    signature?: string;
}>;

export declare type IGitCommitInfo = {
    author: string;
    message: string;
    hash: string;
    date: string;
    timeStamp: string;
    branch: string;
};

export declare type IGlobalGrayPublishConfig = Record<string, Record<string, string>>;

declare type IHumpObject = Record<string, any> | Array<any>;

export declare type IImportItem = string | Array<string> | {
    sourceName?: string;
    sourceType?: IImportType;
    targetName?: string;
    targetType?: IImportType;
};

export declare enum IImportType {
    ImportSpecifier = "ImportSpecifier",
    ImportDefaultSpecifier = "ImportDefaultSpecifier",
    importNamespaceSpecifier = "ImportNamespaceSpecifier",
    FAKE = "FAKE"
}

declare type IJSDocOptions = {
    docsPath?: string;
    author?: string;
    extraCss?: string;
    extraScript?: string;
    navHandler?: Function;
    isHandleNav?: boolean;
};

declare type ILaunchAppParams = {
    isUseSchemeParams?: boolean;
    appid?: string;
    weixinScheme?: string;
    browserAppScheme?: string;
    browserApkScheme?: string;
    qqAppScheme?: string;
    qqAppPackageName?: string;
    openMarket?: boolean;
    appMarketUrl?: string;
    apkMarketUrl?: string;
    needRedirect?: boolean;
    redirectUrl?: string;
    failTips?: string;
    failCallback?: Function | null;
    successCallback?: Function | null;
    pageUrl?: string;
    schemeMap?: Record<string, any>;
    Toast?: {
        showLoading: (str: string) => void;
        dismissLoading: () => void;
    };
    Dialog?: {
        showTipsDialog: (str: string) => void;
    };
};

declare type ILocalConfig = Array<{
    key: string;
    value: string;
}>;

declare type IMeta = {
    rawPath?: Array<string>;
};

declare interface IMorsePwd {
    pwd: Array<number>;
    cb: Function;
    quiet?: boolean;
    holdTime?: number;
    envType: 'H5' | 'h5' | 'mp' | 'MP';
    selector?: keyof HTMLElementTagNameMap;
}

export declare function importI18nDict({ projectId, moduleCode, versionCode, accessToken, data, }: {
    projectId: string;
    moduleCode?: string;
    versionCode?: string;
    accessToken: string;
    data: object;
}): Promise<unknown>;

declare function initBrowser({ puppeteer, args, headless, devtools, }: {
    puppeteer: any;
    args?: Array<string>;
    headless?: boolean;
    devtools?: boolean;
}): Promise<any>;

/**
 * 初始化config
 * @param {ConfigType} config
 */
export declare function initConfig(config: ConfigType): void;

export declare function initCustomDialog({ title, content, confirmText, cancelText, styleId, dialogId, }: {
    title: string;
    content: string;
    confirmText?: string;
    cancelText?: string;
    styleId?: string;
    dialogId?: string;
}): void;

export declare function initCustomDom({ styleId, styleContent, dialogId, dialogContent, }: {
    styleId: string;
    styleContent: string;
    dialogId: string;
    dialogContent: string;
}): void;

/**
 * 挂载唯一的eBus，不同实例用不同的
 * @param app Vue3 应用实例
 */
export declare const initDiffVue3EBus: (app: any) => any;

export declare function initEnv(): IEnv;

/**
 * 挂载统一的eBus，所有实例共用一个
 * @param app Vue3 应用实例
 */
export declare const initGlobalVue3EBus: (app: any) => any;

export declare function initShare(params?: IShareObject): void;

export declare function initShareMp(shareInfo: {
    title?: string;
    mpPath?: string;
    path?: string;
    imageUrl?: string;
    icon?: string;
    mpImageUrl?: string;
}): void;

/**
 * 同步最新版本的更新日志
 * @param {object} params 参数
 * @param {string} params.changelogPath 源 change-log路径
 * @param {string} params.docChangelogPath 文档 change-log 路径
 * @param {string} params.packageJsonPath package.json 路径
 *
 * @example
 * ```ts
 * const DOC_CHANGE_LOG_PATH = './docs/CHANGELOG.md';
 * const SOURCE_CHANGE_LOG_PATH = './CHANGELOG.md';
 *
 * insertDocChangeLog({
 *   changelogPath: SOURCE_CHANGE_LOG_PATH,
 *   docChangeLog: DOC_CHANGE_LOG_PATH,
 *   packageJsonPath: './package.json',
 * });
 * ```
 */
export declare function insertDocChangeLog({ changelogPath, docChangelogPath, packageJsonPath, }: {
    changelogPath: string;
    docChangelogPath: string;
    packageJsonPath: string;
}): void;

export declare function insertHtml({ id, content, }: {
    id: string;
    content: string;
}): void;

export declare function insertStyle({ id, content, }: {
    id: string;
    content: string;
}): void;

declare type IOptions = Record<keyof typeof TIP_MAP, string>;

declare type IPage = any;

export declare type IParsedConfigItem = {
    source: string;
    target: string;
    sourceName: string;
    sourceType: IImportType;
    targetName: string;
    targetType: IImportType;
};

declare type IPostFileOptions = {
    host: string;
    port: string;
    path: string;
    method?: string;
};

declare interface IPreData {
    [key: string]: {
        name: string;
        value: ValueType;
    };
}

declare type IPublishOptions = IPostFileOptions & {
    publishEnv?: string;
    publishTargetDir?: string;
    fileTar?: string;
    fileDir?: string;
};

declare type IRemoteConfig = {
    key: string;
    value: string;
    valueType: RainbowKeyValueType;
};

declare type IRemoteInstances = Array<{
    templateId: string;
    versionName: string;
    version: number;
    pipelineId: string;
    pipelineName: string;
    updateTime: number;
    hasPermission: boolean;
    status: string;
}>;

export declare type IReplaceConfig = {
    importedList: Array<IImportItem>;
    source: string | Array<string>;
    target: string;
};

declare interface IRequest {
    (): Promise<any>;
    resolve?: (...args: any) => any;
    reject?: (...args: any) => any;
}

declare interface IRequestInfo {
    bgName: string;
    centerName: string;
    groupName: string;
}

declare type IRoute = {
    name?: string;
    path?: string;
    meta?: IMeta;
};

declare interface IRumSecretItem {
    rumSecretId: string;
    rumSecretKey: string;
}

/**
 * 判断是否数组
 * @param {Array} arg
 * @returns {Boolean}
 */
export declare function isArray(arg: string): boolean;

/**
 * 判断数据是不是时间对象
 * @param {any} value - 输入数据
 * @returns {boolean} 是否是时间对象
 *
 * @example
 *
 * isDate(1)
 *
 * // => false
 *
 * isDate(new Date())
 *
 * // => true
 */
export declare function isDate(value: any): boolean;

export declare function isDef(value: any): boolean;

export declare function isDirectory(filePath?: string): boolean;

declare interface ISearchInfo {
    prefix: string;
}

declare interface ISecretInfo {
    appCode: string;
    appSecret: string;
    devopsUid: string;
}

declare interface ISecretInfo_2 {
    accessToken: string;
    clientId: string;
    openId: string;
}

declare interface ISecretInfo_3 {
    appID?: string;
    appId?: string;
    userID?: string;
    userId?: string;
    secretKey: string;
    envName: string;
    groupName: string;
}

declare interface ISecretInfo_4 {
    appId: string;
    groupName: string;
    envName: string;
}

declare interface ISecretInfo_5 {
    appID: string;
    userID: string;
    secretKey: string;
    groupName: string;
    envName: string;
}

/**
 * 判断是否合法的邮箱号码
 * @param {String} email 待检测的邮箱号码
 */
export declare function isEmail(email: string): boolean;

declare interface ISendReq {
    chatId: string | Array<string>;
    webhookUrl: string;
}

/**
 * 判断是否外部资源
 * @param {string} path
 * @returns {Boolean}
 */
export declare function isExternal(path: string): boolean;

/**
 * 判断数据是不是函数
 * @param {any} value - 输入数据
 * @returns {boolean} 是否是函数
 *
 * @example
 *
 * isFunction(1)
 *
 * // => false
 *
 * isFunction(()=>{})
 *
 * // => true
 */
export declare function isFunction(value: any): boolean;

declare type IShareObject = {
    title?: string;
    desc?: string;
    icon?: string;
    link?: string;
    type?: string | number | null;
    path?: string | null;
    miniprogram_link?: string | null;
    forceHistoryMode?: boolean | null;
    appId?: string;
    isWzydShare?: boolean;
    wzydShareText?: string;
    callback?: () => any;
    getWxSignaturePromise?: IGetWxSignaturePromise;
    getMiniProgramOpenLink?: IGetMiniProgramOpenLink;
    tipInvoke?: Function;
    pvpInvoke?: Function;
    showTypeInGame?: Array<number>;
};

/**
 * 判断是否合法的身份证号
 * 除了基本的格式校验外，还检查了第18位是否合法，方法如下：
 * - 逆序排列，放到数组 list 中
 * - x/X 代表数字10
 * - 遍历 list，累加 `item * ((2 ** index) % 11)`，item 为list的每一位，index为下标值
 * - 将上一步的累加和余11，判断是否等于1
 *
 * @param {string} idCard 输入字符串
 * @example
 * isIdCard('123')
 * // false
 *
 * isIdCard('34052419800101001X')
 * // true
 */
export declare function isIdCard(idCard: string | number): boolean;

declare type ISignMethod = 'sha256' | 'sha1';

export declare function isImageUrl(url: any): boolean;

export declare function isInCronExpression(cronExpression: string): boolean;

/**
 * Checks if `value` is a valid array-like index.
 *
 * @param {*} value The value to check.
 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
 */
export declare function isIndex(value: any, length?: number): boolean;

/**
 * 判断数组是否全部相等
 * @param {Array<number | string>} list - 数组
 * @returns {Boolean} 是否全部相等
 *
 * @example
 * isListAllEqual([0, 0, 0])
 *
 * // true
 *
 * isListAllEqual([0, 0, 2])
 *
 * // false
 */
export declare function isListAllEqual(list?: Array<number | string>): boolean;

/**
 * 判断是否合法的手机号
 * @param {String} phone 待检测的手机号
 */
export declare function isMobile(phone: string): boolean;

export declare function isNumber(value: any): boolean;

export declare function isObj(x: any): boolean;

export declare function isObject(val: any): boolean;

export declare const isObjectEqual: (obj1: any, obj2: any) => boolean;

export declare function isPlainObject(val: any): boolean;

export declare function isPromise(val: any): boolean;

/**
 * 判断是否合法的QQ号码
 * @param {String} qq 待检测的qq号
 */
export declare function isQQNumber(qq: any): boolean;

/**
 * 判断数据是不是正则对象
 * @param {any} value - 输入数据
 * @returns {boolean} 是否是正则对象
 *
 * @example
 *
 * isRegExp(1)
 *
 * // => false
 *
 * isRegExp(/\d/)
 *
 * // => true
 */
export declare function isRegExp(value: any): boolean;

/**
 * 判断是否是同一天
 * @param {number} date1 时间戳
 * @param {number} date2 时间戳
 * @returns 是否相同
 * @example
 * ```ts
 * isSameDay(1702613769418, 1702613769419) // true
 * ```
 */
export declare function isSameDay(date1: number, date2: number): boolean;

/**
 * 判断两个日期是否属于同一周
 *
 * 原理：把两个日期均转换到周一，比较转换后的两日期是否相同。
 *
 * @param {number} date1 第1个时间戳
 * @param {number} date2 第2个时间戳
 * @returns {boolean} 是否是同一周
 * @example
 *
 * isSameWeek(1601308800000, 1601395200000)
 *
 * // true
 *
 * isSameWeek(1601308800000, 1601913600000)
 *
 * // false
 */
export declare function isSameWeek(date1: number, date2: number): boolean;

/**
 * 判断是否字符串
 * @param {string} str
 * @returns {Boolean}
 */
export declare function isString(str: any): boolean;

/**
 * 判断当前浏览器是否支持 webp
 * @returns {Promise<boolean> }是否支持
 */
export declare const isSupportedWebp: () => () => any;

/**
 * 判断是否合法的电话号码
 * @param {String} tel 待检测的电话号码
 */
export declare function isTel(tel: string): boolean;

export declare function isVideoUrl(url: any): boolean;

export declare function isWindows(): boolean;

declare interface ITemplateReq {
    projectId: string;
    templateId: string;
    host: string;
    secretInfo: ISecretInfo;
}

export declare type IterativeComponentMap = Record<string, Record<string, any>>;

declare type ITestList = Array<{
    fail: number;
    title: string;
    err: {
        estack?: string;
    };
}>;

export declare type IUploaderOptions = {
    requestHashUrl?: string | Function;
    uploadFileKey?: string;
    uploadUrlPrefix?: string;
};

declare interface IUploadResult {
    subPackageInfo: Array<{
        name: string;
        size: number;
    }>;
}

export declare class JsDocHandler {
    /**
     * 初始化并运行
     * @static
     * @param {object} options 配置
     * @param {string} [options.docsPath] 文档所在目录位置，默认为`./docs`
     * @param {string} [options.author] 作者，默认为空
     * @param {string} [options.extraCss] 额外插入的css，默认为`.nav-separator`的一些样式
     * @param {string} [options.navHandler] 处理API所在文件的方法
     * @param {boolean} [options.isHandleNav] 是否处理导航栏，即插入文件名进行分隔，默认为false
     * @returns {object} JsDocHandler实例
     * @example
     *
     * JsDocHandler.init({
     *   author: 'novlan1',
     *   docsPath: './docs',
     *   extraCss: '.some-class{}',
     *   navHandler(nav) {
     *
     *   }
     * })
     *
     */
    static init(options: IJSDocOptions): JsDocHandler;
    extraCss: string;
    extraScript: string;
    author: string;
    docsPath: string;
    navHandler: Function;
    isHandleNav: boolean;
    fs: any;
    path: any;
    /**
     * 处理jsdoc的脚本
     * 1. 增加导航栏的分隔符
     * 2. 增加css
     * 3. 处理footer
     * @constructor
     * @param {object} options 配置
     * @param {string} [options.docsPath] 文档所在目录位置，默认为`./docs`
     * @param {string} [options.author] 作者，默认为空
     * @param {string} [options.extraCss] 额外插入的css，默认为`.nav-separator`的一些样式
     * @param {string} [options.extraScript] 额外插入的script
     * @param {Function} [options.navHandler] 处理API所在文件的方法
     * @param {boolean} [options.isHandleNav] 是否处理导航栏，即插入文件名进行分隔，默认为false
     */
    constructor(options?: IJSDocOptions);
    run(): void;
    getPath(): any;
    getFs(): any;
    getGlobalSourceMap(): Record<string, string>;
    /**
     * 获取sourceMap，形如：
     * ```ts
     * {
     *   NUMBER_CHI_MAP: 'base/number/number.ts',
     *   parseFunction: 'base/function/function.ts',
     *   flatten: 'base/list/list.ts',
     * }
     * ```
     * @private
     * @param {string} content
     * @returns {object} sourceMap
     */
    getSourceMap(file: string): Record<string, string>;
    handleEveryHtml(sourceMap: Record<string, string>, author: string): void;
    parseSourceMap(sourceMap: Record<string, any>): Record<string, string>;
    getParsedHtml(content: string, sourceMap: Record<string, string>, author: string): any;
    appendCSS(extra: string): void;
    finished(): void;
}

export declare type JSErrorFile = Record<string, any>;

/**
 * json 转 excel
 * @param {object} params 参数
 * @example { workbook, worksheet }
 *
 * const jsonData = [
 *   { id: 1, name: '2', age: '3' },
 *   { id: 1, name: '2', age: '3' },
 * ];
 *
 * jsonToExcel({
 *   jsonData,
 *   outputPath: CONFIG.outputFilePath,
 *   options: {
 *     header: ['id', 'name', 'age'],  // 可选：自定义表头顺序
 *     skipHeader: false,              // 可选：是否跳过表头行
 *   },
 *   sheetName: 'addedData',
 * });
 */
export declare function jsonToExcel({ jsonData, outputPath, options, sheetName, overwrite, }: {
    jsonData: Array<Record<string, string>>;
    outputPath: string;
    options?: Record<string, any>;
    sheetName?: string;
    overwrite?: boolean;
}): {
    workbook: any;
    worksheet: any;
};

/**
 * 除保留参数外，一律移除
 * @param {string} url 地址
 * @param {string} removeKeyArr 待保留的参数名集合
 * @returns 重新拼接的地址
 * @example
 * const url = keepUrlParams('http://www.test.com?a=1&b=2&c=3#/detail?d=4', ['a', 'd']); // 'http://www.test.com/#/detail?a=1&d=4'
 */
export declare function keepUrlParams(url: string | undefined, keepKeyArr: string[], forceHistoryMode?: boolean): string;

/**
 * @description 兼容微信、手Q、手机原生浏览器、游戏内环境的唤起第三方 APP 方法。用于替代 launch 方法，优化传参以及底层实现。
 * @param {Object} args 必须，参数对象
 * @param {String} args.appid              必须，用于微信内拉起，微信开放平台的 appID，向游戏公众号管理者索取。
 * @param {String} args.weixinScheme       必须，用于微信内拉起，目标 App 的 URL Scheme
 * @param {String} args.browserAppScheme   必须，用于 iOS 原生浏览器拉起，目标 App 的 URL Scheme
 * @param {String} args.browserApkScheme   必须，用于 Android 原生浏览器拉起，目标 App 的 URL Scheme
 * @param {String} args.qqAppScheme        必须，用于 iOS + 手 Q 内拉起，目标 App 的 URL Scheme
 * @param {String} args.qqAppPackageName   必须，用于 Android + 手 Q 内拉起，目标 App 的安卓包名，例如 com.tencent.tmgp.sgame
 * @param {Boolean} args.isUseSchemeParams  可选，默认 false，scheme 是否携带参数，用于手Q内判断切换拉起方式
 * @param {Boolean} args.openMarket         可选，默认 false，若跳转失败，拉起应用下载地址
 * @param {String} args.appMarketUrl       可选，默认空，Appstore 下载地址，例如 https://itunes.apple.com/cn/app/id989673964
 * @param {String} args.apkMarketUrl       可选，默认空，安卓应用下载地址，例如 market://details?id=com.tencent.tmgp.sgame
 * @param {Boolean} args.needRedirect       可选，默认 false，若不跳转下载，是否跳转其他地址
 * @param {String} args.redirectUrl        可选，默认空，跳转其他地址，例如某官网地址
 * @param {String} args.failTips           可选，默认空，若不跳转下载 or 其他地址，而是开启拉起失败提示，该处填写提示内容
 * @param {Function} args.successCallback    可选，默认空，拉起成功回调
 * @param {Function} args.failCallback       可选，默认空，拉起失败回调
 */
export declare function launchApp(args?: ILaunchAppParams): void;

/**
 * 拉起 DDZ
 * @param {object} params 拉起参数
 * @param {string} params.seriesId series id
 * @param {string} params.gameId game id
 * @param {string} params.uin uin
 * @param {object} [params.context] 上下文，可传入组件实例 this
 * @param {object} [params.qrCodeLib] qrcode
 * @param {object} [params.dialogHandler] 弹窗 handler
 * @param {object} [params.otherDialogParams] 弹窗的其他参数
 * @param {string} [params.wxJSLink] wx js link
 * @param {object} [params.env] 环境对象
 * @returns Promise<boolean | number>
 *
 * @example
 * ```ts
 * launchDDZGameRoom({
 *   seriesId: '12',
 *   gameId: '123',
 *   uin: '222',
 * })
 * ```
 */
export declare const launchDDZGameRoom: ({ seriesId, gameId, uin, context, qrCodeLib, dialogHandler, otherDialogParams, wxJSLink, env, }: {
    gameId: string;
    seriesId: string;
    uin: string;
} & IBaseLaunchParams) => Promise<unknown>;

/**
 * 拉起 GN
 * @param {object} params 拉起参数
 * @param {string} params.roomId 房间 Id
 * @param {string} params.roomPwd 房间 Pwd
 * @param {object} [params.context] 上下文，可传入组件实例 this
 * @param {object} [params.qrCodeLib] qrcode
 * @param {object} [params.dialogHandler] 弹窗 handler
 * @param {object} [params.otherDialogParams] 弹窗的其他参数
 * @param {string} [params.wxJSLink] wx js link
 * @param {object} [params.env] 环境对象
 * @returns Promise<boolean | number>
 *
 * @example
 * ```ts
 * launchGNGameRoom({
 *   roomId: '12',
 *   roomPwd: '123'
 * })
 * ```
 */
export declare function launchGNGameRoom({ roomId, roomPwd, context, qrCodeLib, dialogHandler, otherDialogParams, wxJSLink, env, }: IBaseLaunchParams & {
    roomId: string;
    roomPwd: string;
}): Promise<unknown>;

/**
 * 拉起 GP
 * @param {object} params 拉起参数
 * @param {string} params.roomId 房间 Id
 * @param {string} params.roomPwd 房间 Pwd
 * @param {string} params.source 来源
 * @param {string} [params.wxJSLink] wx js link
 * @param {object} [params.env] 环境对象
 * @param {object} [params.useGPHelperSchemePrefix] 是否使用特殊 scheme
 * @param {object} [params.justLaunchGame] 是否仅拉起 app，不进入房间
 * @returns Promise<boolean | number>
 *
 * @example
 * ```ts
 * launchGPGameRoom({
 *   roomId: '12',
 *   roomPwd: '123'
 * })
 * ```
 */
export declare function launchGPGameRoom({ roomId, roomPwd, source, wxJSLink, env, useGPHelperSchemePrefix, useTrialSchemePrefix, justLaunchGame, }: {
    roomId: string;
    roomPwd: string;
    source?: string | number;
    wxJSLink?: string;
    env?: Record<string, boolean>;
    useGPHelperSchemePrefix?: boolean;
    useTrialSchemePrefix?: boolean;
    justLaunchGame?: boolean;
}): Promise<unknown>;

export declare function launchMiniProgramInGame({ appId, path, type, isWxMp, }: {
    appId?: string | undefined;
    path?: string | undefined;
    type?: number | undefined;
    isWxMp?: boolean | undefined;
}): void;

/**
 * 拉起 MJ
 * @param {object} params 拉起参数
 * @param {string} params.seriesId series id
 * @param {string} params.gameId game id
 * @param {string} params.uin uin
 * @param {object} [params.context] 上下文，可传入组件实例 this
 * @param {object} [params.qrCodeLib] qrcode
 * @param {object} [params.dialogHandler] 弹窗 handler
 * @param {object} [params.otherDialogParams] 弹窗的其他参数
 * @param {string} [params.wxJSLink] wx js link
 * @param {object} [params.env] 环境对象
 * @returns Promise<boolean | number>
 *
 * @example
 * ```ts
 * launchMJGameRoom({
 *   seriesId: '12',
 *   gameId: '123',
 *   uin: '222',
 * })
 * ```
 */
export declare function launchMJGameRoom({ seriesId, gameId, uin, context, qrCodeLib, dialogHandler, otherDialogParams, wxJSLink, env, }: IBaseLaunchParams & {
    gameId: string;
    seriesId: string;
    uin: string;
}): Promise<unknown>;

/**
 * 动态加载CSS
 * @param {string} url CSS链接
 * @example
 *
 * loadCSS('xxx.css')
 */
export declare function loadCSS(url: string): void;

/**
 * 加载样式代码块，会将样式代码包裹在 style 标签内，并加载到当前页面中
 * @param {string} code 样式代码
 * @param {string} className 类名
 *
 * @example
 *
 * ```ts
 * loadCssCode(
 *   '.press__cover { color: red; }',
 *   'load-css-code'
 * );
 * ```
 */
export declare function loadCssCode(code: string, className: string): void;

/**
 * 用 dotenv-expand 加载环境变量
 * @param file 文件路径，默认 .env.local
 * @param param 参数
 *
 * @example
 * ```ts
 * loadEnv();
 *
 * loadEnv('.env');
 *
 * loadEnv('.env.local', {
 *   debug: false, // 是否打印日志，默认 true
 * });
 * ```
 */
export declare function loadDotenv(file?: string, options?: {
    debug?: boolean;
}): void;

/**
 * 以 Callback 的方式加载 js 文件
 * @param {String}          src  js文件路径
 * @param {Function|Object} callback  加载回调
 * @param {String}          charset  指定js的字符集
 * @param {Object}          context Callback context
 */
export declare const loader: (src: string, callback: any, charset?: string, context?: null) => void;

/**
 * 以 Promise 或者 Callback 的方式加载 js 文件，取决于是否传递 Callback
 * @param {string}  url  js文件路径
 * @param {function}  [cb]  回调
 * @returns {Promise<number>} promise
 */
export declare const loaderUnity: (source: string, cb: Function, ...args: Array<any>) => void | Promise<unknown>;

/**
 * 以 Promise 的方式加载 js 文件
 * @param {string}  url  js文件路径
 * @returns {Promise<number>} promise
 */
export declare function loadJS(url: string): Promise<unknown>;

/**
 * 加载多个样式文件，并在加载前移除具有相同类名的文件
 * @param {array} urls 外链地址列表
 * @param {string} urlClass 外链类名
 *
 * @example
 *
 * ```ts
 * loadStyles(['https://a.com/b.css'], 'load-style');
 * ```
 */
export declare function loadStyles(urls: Array<string>, urlClass: string): void;

/**
 * 加载 vConsole
 * @param {Object} [options = {}] vConsole 选项
 * @param {Array<string>} [plugins = []] 插件列表
 * @returns {Promise<Object>} vConsole 实例
 *
 * @example
 * ```ts
 * loadVConsole()
 * ```
 */
export declare function loadVConsole(options?: Record<string, any>, plugins?: Array<Function>): Promise<unknown>;

export declare function localPublish(options: IPublishOptions): Promise<void>;

export declare function log(content: string, ...args: string[]): void;

/**
 * 通过 intl 登录
 * @param {Options} options 参数
 * @example
 *
 * ```ts
 * function loginIntl() {
 *   const checkLoginAPI = res => new Promise((resolve, reject) => {
 *     getScheList({
 *       query: {
 *         ...INTL_CONFIG.extraQueryObject,
 *         appid: INTL_CONFIG.gameID,
 *         channelid: res.channel_info?.channelId,
 *       },
 *     }).then((res) => {
 *       resolve(res);
 *     })
 *       .catch((err) => {
 *         reject(err);
 *       });
 *   });
 *
 *   return loginByIntl({
 *     cookieDomain: COOKIE_DOMAIN,
 *     env: INTL_CONFIG.env,
 *     gameID: INTL_CONFIG.gameID,
 *     appID: INTL_CONFIG.appID,
 *     webID: INTL_CONFIG.webID,
 *     checkLoginAPI,
 *   });
 * }
 *
 * ```
 */
export declare function loginByIntl(options: Options): Promise<unknown>;

/**
 * 首字母小写
 * @param {string} str 输入字符串
 * @returns {string} 输出字符串
 * @example
 *
 * lowerInitial('GroupId')
 *
 * // groupId
 */
export declare function lowerInitial(str: string): string;

export declare function matchParams(rawPath?: string, params?: Record<string, string>): string;

export declare const merge: (object: any, ...sources: any) => any;

/**
 * 绘制多张图
 * @param {object} config 输入参数
 * @param {Array<string>} config.imgs base64图片列表
 * @returns {string} 图片url
 *
 * @example
 *
 * mergeMultiCanvasPic({
 *   imgs: [img, img2, img3],
 * })
 */
export declare function mergeMultiCanvasPic({ imgs, }: {
    imgs: Array<string>;
}): Promise<string>;

declare type MessageType = string | {
    content: string;
    link?: string;
    label?: string;
    isTitle?: boolean;
};

export declare function mkDirsSync(dirname: string): true | undefined;

declare interface ModifyConfigParam {
    keyValue: {
        key: string;
        value: string;
    };
    valueType: ValueType_2;
    secretInfo: ISecretInfo_3;
}

export declare class MorsePwd {
    /**
     * 初始化
     * @static
     * @param {Object} options 选项
     * @param {Array<number>} options.pwd 密码
     * @param {Function} options.cb 成功回调
     * @param {Boolean} options.quiet 是否安静模式（不打印日志）
     * @param {number} options.holdTime 等待多久后就恢复原位
     * @param {'H5' | 'h5' | 'mp' | 'MP'} options.envType 环境类型
     * @param {String} options.selector h5模式下的选择器
     *
     * @example <caption>小程序环境</caption>
     * <template>
     *   <div
     *     class="tip-match-header"
     *     /@longpress="onLongPressWrap"
     *     /@click.stop="onClickWrap"
     *   >
     * </template>
     *
     * <script>
     * export default {
     *   data() {
     *     return {
     *       morsePwd: null,
     *     };
     *   },
     *   mounted() {
     *     this.morsePwd = MorsePwd.init({
     *       pwd: [1, 1, 1, 2, 2, 2, 1, 1, 1],
     *       cb: () => {
     *         this.showToast('hhh');
     *       },
     *       envType: 'MP',
     *     });
     *   },
     *   beforeDestroy() {
     *     this.morsePwd.clear();
     *   },
     *   methods: {
     *     onLongPressWrap() {
     *       this.morsePwd.longPress();
     *     },
     *     onClickWrap() {
     *       this.morsePwd.click();
     *     },
     *   }
     * }
     * </script>
     * @example <caption>H5环境</caption>
     * <script>
     * export default {
     *   data() {
     *     return {
     *       morsePwd: null,
     *     };
     *   },
     *   mounted() {
     *     this.morsePwd = MorsePwd.init({
     *       pwd: [1, 1, 1, 2, 2, 2, 1, 1, 1],
     *       cb: () => {
     *         this.showToast('xxx');
     *       },
     *       selector: '#app',
     *       envType: 'H5',
     *     });
     *   },
     *   beforeDestroy() {
     *     this.morsePwd.clear();
     *   },
     * }
     * </script>
     *
     * @returns {Object} MorsePwd实例
     */
    static init(options: IMorsePwd): MorsePwd;
    pwd: Array<number>;
    cb: Function;
    holdTime: number;
    quiet: Boolean;
    selector?: keyof HTMLElementTagNameMap;
    envType?: 'H5' | 'h5' | 'mp' | 'MP';
    clickCode: number;
    longPressCode: number;
    curIdx: number;
    holdTimer: any;
    h5Dom: any;
    longPressTimer: any;
    isLongTouch: Boolean;
    /**
     * 摩斯密码初始化
     * @constructor
     * @param {Object} options 选项
     * @param {Array<number>} options.pwd 密码
     * @param {Function} options.cb 成功回调
     * @param {Boolean} options.quiet 是否安静模式（不打印日志）
     * @param {number} options.holdTime 等待多久后就恢复原位
     * @param {'H5' | 'h5' | 'mp' | 'MP'} options.envType 环境类型
     * @param {String} options.selector h5模式下的选择器
     */
    constructor(options: IMorsePwd);
    bindEvent(): void;
    onTouchStart(): void;
    onTouchEnd(): void;
    onTouchMove(): void;
    /**
     * 清除监听事件
     * @example
     * beforeDestroy() {
     *   this.morsePwd.clear();
     * }
     */
    clear(): void;
    operation(type: number): void;
    reset(): void;
    click(): void;
    suc(): void;
    longPress(): void;
    log(...args: Array<unknown>): void;
}

export declare const morsePwdMixin: (pwd: number[], cb: Function) => any;

export declare class MpCI {
    ciLib: any;
    options: OptionsType;
    projectCI: any;
    savePreviewPath: any;
    appId: string;
    appName: string;
    type: string;
    root: string;
    ignores: Array<string>;
    pkgFile: string;
    env: string;
    robotNumber: number;
    webhookUrl?: string;
    chatId?: string;
    buildSetting: any;
    projectPath: string;
    privateKeyPath: string;
    cosInfo: any;
    commitInfo: any;
    buildDesc: string;
    buildTime?: string;
    version: string;
    previewResult: IUploadResult;
    errorLink?: string;
    pagePath?: string;
    searchQuery?: string;
    tryTimesMap: {
        UPLOAD: number;
        PREVIEW: number;
    };
    /**
     * 小程序自动化构建工具
     * @param {object} options 选项
     *
     * @example
     *
     * const { MpCI, fetchRainbowConfig } = require('t-comm');
     *
     * const env = "${env}"
     * const branch = "${branch}"
     *
     * const root = "${WORKSPACE}";
     *
     * async function getCIConfig() {
     *   let res = {};
     *   const str = await fetchRainbowConfig('mp_ci', {
     *     appId: '',
     *     envName: 'x',
     *     groupName: 'x',
     *   });
     *   try {
     *     res = JSON.parse(str);
     *   } catch (err) {}
     *   return res;
     * }
     *
     * function getRobot(config = {}) {
     *   return config?.robotMap?.[branch]?.[env] || 1;
     * }
     *
     * async function main() {
     *   const config = await getCIConfig();
     *   console.log('config: \n', config, typeof config);
     *   const {
     *     appName,
     *     appId,
     *     webhookUrl,
     *     chatId,
     *     cosInfo,
     *   } = config;
     *
     *   const ci = new MpCI({
     *     appName,
     *     appId,
     *     root,
     *     env,
     *     robotNumber: getRobot(config),
     *
     *     webhookUrl,
     *     chatId,
     *
     *     cosInfo,
     *   });
     *
     *   await ci.upload();
     *   await ci.preview();
     *   await ci.sendRobotMsg();
     * }
     *
     * main();
     */
    constructor(options: OptionsType);
    validateOptions(): void;
    initBaseInfo(): void;
    init(): void;
    getBuildTime(): void;
    /**
     * 上传
     */
    upload(): Promise<void>;
    tryUpload(): Promise<void>;
    preview(): Promise<void>;
    /**
     * 预览
     */
    tryPreview(): Promise<void>;
    /**
     * 上传预览图片到COS
     */
    uploadPreviewImg(previewResult: IUploadResult): Promise<void>;
    getCosKey(): string;
    getCOSFilePath(): string;
    /**
     * 发送机器人消息
     */
    sendRobotMsg(hasImg?: boolean): Promise<void>;
    uploadAndPreview(): Promise<void>;
    uploadFiles(files: Array<{
        key: string;
        path: string;
    }>): Promise<void>;
}

export declare function mpUploadAndReport({ branch, env, root, rainbowConfigKey, rainbowAppId, rainbowEnvName, rainbowGroupName, rdHost, bkStartType, bkBuildUrl, bkStartUserName, bkPipelineId, commitInfo, version, buildDesc, }: Record<string, any>): Promise<void>;

export declare function mpUploadAndReportByOptions(options: Record<string, any>): Promise<void>;

export declare function nodeGet(): any;

export declare function nodePost(): any;

export declare function nodePut(): any;

/**
 * 格式化路径
 * @param path 文件路径，或目录路径
 * @returns 格式化后的路径
 * @example
 * ```ts
 * normalizePath('xxx/xxx/xxx');
 *
 * normalizePath('xxx\\xxx\\xxx');
 * ```
 */
export declare const normalizePath: (path: string) => string;

export declare function npmInstallTip({ packageName, packageLink, packagePostfix, packagePostfixEn, feedbackList, }: {
    packageName: string;
    packageLink: string;
    packagePostfix: string;
    packagePostfixEn: string;
    feedbackList: Array<string>;
}): void;

/**
 *
 * 阿拉伯数字和中文数字映射表，0 - 32
 * @type {object}
 * @example
 *
 * console.log(NUMBER_CHI_MAP[1]);
 * // '一'
 *
 * console.log(NUMBER_CHI_MAP[2]);
 * // '二'
 */
export declare const NUMBER_CHI_MAP: {
    0: string;
    1: string;
    2: string;
    3: string;
    4: string;
    5: string;
    6: string;
    7: string;
    8: string;
    9: string;
    10: string;
    11: string;
    12: string;
    13: string;
    14: string;
    15: string;
    16: string;
    17: string;
    18: string;
    19: string;
    20: string;
    21: string;
    22: string;
    23: string;
    24: string;
    25: string;
    26: string;
    27: string;
    28: string;
    29: string;
    30: string;
    31: string;
    32: string;
};

/**
 * 去掉对象中的某些属性
 * @param {any} obj 对象
 * @param {Array<string>} fields 要去除的属性列表
 * @returns 处理后的对象
 * @example
 * ```ts
 * omit({ a: 1, b: 2, c: 3 }, ['a'])
 * // { b: 2, c: 3 }
 * ```
 */
export declare function omit<T extends object, K extends keyof T>(obj: T, fields: K[] | readonly K[]): Omit<T, K>;

export declare function OneClickReleaseRainbowTask({ secretInfo, versionName, creator, updators, approvers, type, description, }: {
    secretInfo: ISecretInfo_3;
    versionName: string;
    creator: string;
    updators: string;
    approvers: string;
    type?: number;
    description?: string;
}): Promise<object>;

export declare interface OpenLocation {
    lat?: string;
    lng?: string;
    name?: string;
    address?: string;
    scale?: number;
    context?: any;
    route?: string;
}

/**
 * 打开地图，查看位置
 * @param param 参数
 * @returns 查看Promise
 * @example
 * ```ts
 * openLocationInH5({
 *   lat,
 *   lng,
 *   name,
 *   address,
 *
 *   context: this,
 *   route: '/map'
 * });
 * ```
 */
export declare function openLocationInH5({ lat, lng, name, address, route, context, }: OpenLocation): Promise<number>;

/**
 * 打开地图，查看位置
 * @param param 参数
 * @returns 查看Promise
 * @example
 * ```ts
 * openLocationInMp({
 *   lat,
 *   lng,
 *   name,
 *   address,
 * });
 * ```
 */
export declare function openLocationInMp({ lat, lng, name, address, scale, }: OpenLocation): Promise<unknown>;

declare function openOrFindPage(browser: any, href: string, device: DEVICE_TYPE): Promise<any>;

/**
 * 打开自定义的分享UI组件
 */
export declare function openShareUI(): void;

export declare function openShareUIMp(text?: string, duration?: number): void;

export declare function optimizeRobotContent({ content, maxLen, concatFn, }: {
    content?: string | undefined;
    maxLen?: number | undefined;
    concatFn?: ((more: number | string) => string) | undefined;
}): string;

declare interface Options {
    env: string;
    gameID: number;
    appID: string;
    webID: string;
    cookieDomain: string;
    checkLoginAPI: (userInfo: UserInfo) => Promise<any>;
    loginDomSelector?: string;
}

declare type OptionsType = {
    ci?: any;
    appId: string;
    appName?: string;
    robotNumber: number;
    projectPath?: string;
    privateKeyPath?: string;
    ignores?: Array<string>;
    type?: string;
    root?: string;
    env?: string;
    buildSetting?: object;
    buildDesc?: string;
    version?: string;
    commitInfo?: Partial<IGitCommitInfo>;
    webhookUrl?: string;
    chatId?: string;
    cosInfo?: object;
    errorLink?: string;
    pagePath?: string;
    searchQuery?: string;
};

/**
 * 数字左侧加 0，直到满足长度要求
 * @param {string | number} num 当前数字
 * @param {number} [targetLength=2] 目标长度
 * @returns {string} 新的字符串
 * @example
 * ```ts
 * padZero(1, 3); // 001
 * ```
 */
export declare function padZero(num: number | string, targetLength?: number): string;

declare namespace page {
    export {
        initBrowser,
        getNewPage,
        openOrFindPage,
        setUserAgent,
        setSessionStorage,
        setRoute,
        DEVICE_TYPE
    }
}

/**
 * Parse a string for the raw tokens.
 * @ignore
 * @param  {string}  str
 * @param  {Object=} options
 * @returns {!Array}
 */
declare function parse(str: string, options?: any): (string | {
    name: string | number;
    prefix: string;
    delimiter: any;
    optional: boolean;
    repeat: boolean;
    partial: boolean;
    pattern: string;
})[];

export declare function parseChangeLog({ changelogStr, targetVersion, }: {
    changelogStr: string;
    targetVersion: string;
}): string;

export declare function parseColorToHSV(value: string): {
    h: number;
    s: number;
    v: number;
    alpha: number;
};

/**
 * 解析带注释的 json 文件
 * @param content 原始文件内容
 * @returns json数据
 */
export declare function parseCommentJson(content: string): Record<string, any>;

export declare function parseComponentPath(filePath: string, relativePath: string): string;

export declare function parseEslintAndSendRobot({ mrId, mrUrl, lintReportFile, repoConfig, robotInfo, }: {
    mrId: string | number;
    mrUrl: string;
    lintReportFile: string;
    repoConfig: RepoConfigType;
    robotInfo: {
        webhookUrl: string;
        chatId: string;
    };
}): void;

/**
 * 将字符串转为函数
 * @param {string} func 字符串
 * @returns {Function} 字符串对应的函数
 *
 * @example
 *
 * parseFunction('()=>console.log(1)')
 *
 * // ()=>console.log(1)
 */
export declare function parseFunction(func: any): any;

export declare function parseGrayPublishConfig(config?: Record<string, Record<string, Record<string, Record<string, string>>>>): IGlobalGrayPublishConfig;

export declare const parseHexChannel: (hex: any) => number;

export declare function parseHSLString(value: string): {
    h: number;
    s: number;
    v: number;
    alpha: number;
};

export declare function parseHSVString(value: string): {
    h: number;
    s: number;
    v: number;
    alpha: number;
};

export declare function parseMochaAwesomeResult(report: {
    results: Array<{
        suites: Array<{
            tests: Array<{
                duration: number;
                pass: number;
                fail: number;
                pending: number;
            }>;
        }>;
        file: string;
    }>;
}): {
    [k: string]: {
        duration: number;
        passes: number;
        failures: number;
        pending: number;
        tests: number;
        files: {
            [k: string]: {
                duration: number;
                passes: number;
                failures: number;
                pending: number;
                tests: number;
                testList: Array<{}>;
            };
        };
    };
};

/**
 * 解析替换配置
 *
 * @param {Array<IReplaceConfig>} configList 配置列表
 * @returns {array} 处理后的配置列表
 *
 * @example
 * ```ts
 * parseReplaceConfig([{
 *   source: '',
 *   target: '',
 * }])
 * ```
 */
export declare function parseReplaceConfig(configList: Array<IReplaceConfig>): {
    source: string;
    target: string;
    sourceName: string;
    sourceType: IImportType;
    targetName: string;
    targetType: IImportType;
}[];

export declare function parseRGBBracket(value: string): {
    h: number;
    s: number;
    v: number;
    alpha: number;
};

export declare function parseRGBHex(value: any): {
    r: number;
    g: number;
    b: number;
    alpha: number;
};

export declare function parseRobotMessage(info: MessageType, labelSeparator?: string): string;

/**
 * 功能和上面的dateFormat/timeStampFormat类型，只是参数time可以接收多种类型，且参数cFormat用的是{y}形式
 * @param {(Object|string|number)} time 输入日期
 * @param {string} cFormat 时间格式
 * @returns {string | null} 格式化后的日期字符串
 * @example
 *
 * const date = new Date('2020-11-27 8:23:24');
 *
 * const res = parseTime(date, 'yyyy-MM-dd hh:mm:ss')
 *
 * // 2020-11-27 08:23:24
 */
export declare function parseTime(time: Date | number, cFormat: string): string | null;

/**
 * 用大驼峰，即 PascalCase 格式，来格式化字符串
 * @param str 字符串
 * @returns PascalCase 的字符串
 *
 * @example
 * ```ts
 * pascalCase('ab-cd')
 * // AbCd
 *
 * pascalCase('ab_cd')
 * // AbCd
 * ```
 */
export declare function pascalCase(str?: string): string;

declare type Path = (string | number | symbol)[];

/**
 * Normalize the given path string, returning a regular expression.
 *
 * An empty array can be passed in for the keys, which will hold the
 * placeholder key descriptions. For example, using `/user/:id`, `keys` will
 * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
 * @ignore
 * @param  {(string|RegExp|Array)} path
 * @param  {Array=}                keys
 * @param  {Object=}               options
 * @returns {!RegExp}
 */
export declare function pathToRegexp(path: string | RegExp | Array<any>, keys?: Array<any>, options?: any): any;

export declare namespace pathToRegexp {
    var parse: parse;
    var compile: compile;
    var tokensToFunction: tokensToFunction;
    var tokensToRegExp: tokensToRegExp;
}

export declare class PollingRequest {
    maxRequest: number;
    maxPollingTime: number;
    timeInterval: number;
    timer: any;
    /**
     * 轮询
     * @constructor
     * @param {number} [maxPollingTime=10] 最大轮询次数
     * @param {number} [timeInterval=2000] 轮询间隔
     * @example
     *
     * ```ts
     * const polling = new PollingRequest(10);
     * const cb = () => {
     *   this.onGetTeamList(true);
     * };
     * polling.polling(cb);
     * ```
     */
    constructor(maxPollingTime?: number, timeInterval?: number);
    /**
     * 重置，即取消轮询
     */
    reset(): void;
    /**
     * 开始轮询
     * @param {function} func 轮询方法
     */
    polling(func: Function): void;
}

declare type ProvType = {
    text?: String;
    code?: String | Number;
    children?: Array<ProvTypeChild>;
};

declare type ProvTypeChild = {
    text: String;
    code: String | Number;
};

export declare const PUBLISH_ENV_MAP: {
    readonly PROD: "prod";
    readonly TEST: "test";
    readonly DEV_CLOUD: "devcloud";
};

/**
 * 发布任务
 *
 * @param {object} config 配置信息
 * @param {string} config.taskId 任务Id
 * @param {object} config.secretInfo 密钥信息
 * @param {string} config.secretInfo.appId 项目Id
 * @param {string} config.secretInfo.userId 用户Id
 * @param {string} config.secretInfo.secretKey 密钥
 * @param {string} config.secretInfo.envName 配置环境
 * @param {string} config.secretInfo.groupName 配置组
 * @returns {Promise<object>} 请求Promise
 *
 * @example
 * publishRainbowTask({
 *   taskId: 'taskId',
 *   secretInfo: {
 *     appId: 'xxx',
 *     userId: 'xxx',
 *     secretKey: 'xxx',
 *     envName: 'prod',
 *     groupName: 'xxx',
 *   }
 * }).then(() => {
 *
 * })
 */
export declare function publishRainbowTask({ taskId, secretInfo, }: {
    taskId: string;
    secretInfo: ISecretInfo_3;
}): Promise<object>;

export declare function pushUrlCache({ secretId, secretKey, area, urls, }: {
    secretId: string;
    secretKey: string;
    area?: (typeof AREA_MAP)[keyof typeof AREA_MAP];
    urls: Array<string>;
}): Promise<any>;

/**
 * 查询分组配置
 * @param {object} config 配置信息
 * @param {object} config.secretInfo 密钥信息
 * @param {string} config.secretInfo.appId 项目Id
 * @param {string} config.secretInfo.userId 用户Id
 * @param {string} config.secretInfo.secretKey 密钥
 * @param {string} config.secretInfo.envName 配置环境
 * @param {string} config.secretInfo.groupName 配置组
 * @returns {Promise<Array<object>>} 分组配置
 *
 * @example
 * queryGroupInfo({
 *   secretInfo: {
 *     appId: 'xxx',
 *     userId: 'xxx',
 *     secretKey: 'xxx',
 *     envName: 'prod',
 *     groupName: 'xxx',
 *   }
 * }).then(() => {
 *
 * })
 */
export declare function queryGroupInfo({ secretInfo }: {
    secretInfo: ISecretInfo_3;
}): Promise<Array<{
    key: string;
    value: string;
    value_type: RainbowKeyValueType;
}>>;

declare const RAINBOW_VALUE_TYPE_MAP: {
    1: {
        type: string;
        ext: string;
    };
    2: {
        type: string;
        ext: string;
    };
    3: {
        type: string;
        ext: string;
    };
    4: {
        type: string;
        ext: string;
    };
    5: {
        type: string;
        ext: string;
    };
    18: {
        type: string;
        ext: string;
    };
    20: {
        type: string;
        ext: string;
    };
};

declare type RainbowKeyValueType = keyof typeof RAINBOW_VALUE_TYPE_MAP;

/**
 * 在区间内获取随机整数
 * @param {number} min 最小值
 * @param {number} max 最大值
 * @returns 随机数
 *
 * @example
 * ```ts
 * random(0, 19) // 1
 * ```
 */
export declare function random(min: number, max: number): number;

/**
 * 获取随机字符串
 * @param {number} length 字符串长度，默认 32
 * @returns {string} 字符串
 * @example
 * ```ts
 * randomString()
 *
 * randomString(16)
 * ```
 */
export declare function randomString(e?: number): string;

/**
 * 根据边界值修正数字
 * @param {number} num 待处理的数字
 * @param {number} min 边界最小值
 * @param {number} max 边界最大值
 * @returns {number} 处理结果
 * @example
 * ```ts
 * range(12, 1, 2); // 2
 * ```
 */
export declare function range(num: number, min: number, max: number): number;

export declare const RAW_CITY_DATA: {
    provData: {
        11: string;
        12: string;
        13: string;
        14: string;
        15: string;
        21: string;
        22: string;
        23: string;
        31: string;
        32: string;
        33: string;
        34: string;
        35: string;
        36: string;
        37: string;
        41: string;
        42: string;
        43: string;
        44: string;
        45: string;
        46: string;
        50: string;
        51: string;
        52: string;
        53: string;
        54: string;
        61: string;
        62: string;
        63: string;
        64: string;
        65: string;
        71: string;
        81: string;
        82: string;
    };
    cityData: {
        11: string[];
        12: string[];
        13: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
        };
        14: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
            12: string;
        };
        15: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            22: string;
            25: string;
            29: string;
            30: string;
        };
        21: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
            12: string;
            13: string;
            14: string;
        };
        22: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            24: string;
            25: string;
        };
        23: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
            12: string;
            27: string;
        };
        31: string[];
        32: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
            12: string;
            13: string;
        };
        33: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
        };
        34: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            10: string;
            11: string;
            12: string;
            13: string;
            14: string;
            15: string;
            16: string;
            17: string;
            18: string;
        };
        35: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
        };
        36: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
        };
        37: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
            12: string;
            13: string;
            14: string;
            15: string;
            16: string;
            17: string;
        };
        41: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
            12: string;
            13: string;
            14: string;
            15: string;
            16: string;
            17: string;
            18: string;
            19: string;
        };
        42: {
            1: string;
            2: string;
            3: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
            12: string;
            13: string;
            28: string;
            94: string;
            95: string;
            96: string;
            A21: string;
        };
        43: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
            12: string;
            13: string;
            31: string;
        };
        44: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            12: string;
            13: string;
            14: string;
            15: string;
            16: string;
            17: string;
            18: string;
            19: string;
            20: string;
            51: string;
            52: string;
            53: string;
        };
        45: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
            12: string;
            13: string;
            14: string;
        };
        46: {
            1: string;
            2: string;
            91: string;
            92: string;
            93: string;
            95: string;
            96: string;
            97: string;
            A25: string;
            A26: string;
            A27: string;
            A28: string;
            A30: string;
            A31: string;
            A33: string;
            A34: string;
            A35: string;
            A36: string;
            A37: string;
            A38: string;
            A39: string;
        };
        50: string[];
        51: {
            1: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
            13: string;
            14: string;
            15: string;
            16: string;
            17: string;
            18: string;
            19: string;
            20: string;
            32: string;
            33: string;
            34: string;
        };
        52: {
            1: string;
            2: string;
            3: string;
            4: string;
            22: string;
            23: string;
            24: string;
            26: string;
            27: string;
            31: string;
            32: string;
            33: string;
            34: string;
            35: string;
            36: string;
            37: string;
        };
        53: {
            1: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            23: string;
            25: string;
            26: string;
            28: string;
            29: string;
            31: string;
            33: string;
            34: string;
        };
        54: {
            1: string;
            21: string;
            22: string;
            23: string;
            24: string;
            25: string;
            26: string;
        };
        61: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
        };
        62: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
            6: string;
            7: string;
            8: string;
            9: string;
            10: string;
            11: string;
            12: string;
            29: string;
            30: string;
        };
        63: {
            1: string;
            21: string;
            22: string;
            23: string;
            25: string;
            26: string;
            27: string;
            28: string;
        };
        64: {
            1: string;
            2: string;
            3: string;
            4: string;
            5: string;
        };
        65: {
            1: string;
            2: string;
            21: string;
            22: string;
            23: string;
            27: string;
            28: string;
            29: string;
            30: string;
            31: string;
            32: string;
            40: string;
            42: string;
            43: string;
            91: string;
            92: string;
            93: string;
            94: string;
        };
        71: string[];
        81: string[];
        82: string[];
    };
};

/**
 * 获取带注释的 json 文件内容
 * @param file 文件路径
 * @returns json数据
 */
export declare function readCommentJson(file: string): Record<string, any>;

/**
 * 读取文件中环境变量的值，支持：
 * - NPM_TOKEN=xxx
 * - NPM_TOKEN = xxx
 * @param {string} key 环境变量的key
 * @param {string} filepath 保存环境变量的文件路径
 * @returns {string} 环境变量的值
 */
export declare function readEnvVariable(key: string, filepath: string): string;

/**
 * 读取文件
 * @param {string} file 文件地址
 * @param {boolean} [isJson] 是否需要 json 反序列化
 * @returns {any} 文件内容
 * @example
 * ```ts
 * readFileSync('b.txt', false);
 *
 * readFileSync('b.json', true);
 * ```
 */
export declare function readFileSync(file: string, isJson?: boolean): any;

export declare function readJson(content: string, file: string): Record<string, any>;

export declare function refreshTencentDocToken({ clientId, clientSecret, refreshToken, }: {
    clientId: string;
    clientSecret: string;
    refreshToken: string;
}): Promise<any>;

/**
 * 移除CSS
 *
 * @param {string} href - CSS链接
 *
 * @example
 *
 * removeCss('https://xxx.css')
 */
export declare function removeCss(href: string): void;

/**
 *移除第一个和最后一个反斜杠
 *
 * @export
 * @param {string} [str=''] 输入字符串
 * @returns {string} 字符串
 *
 * @example
 * ```ts
 * removeFirstAndLastSlash('/abc/')
 *
 * 'abc'
 * ```
 */
export declare function removeFirstAndLastSlash(str?: string): string;

/**
 * 移除第一个反斜杠
 *
 * @export
 * @param {string} [str=''] 输入字符串
 * @returns {string} 字符串
 * @example
 * ```ts
 * removeFirstSlash('/abc/ddd/')
 *
 * 'abc/ddd/'
 * ```
 */
export declare function removeFirstSlash(str?: string): string;

/**
 * 移除最后一个反斜杠
 *
 * @export
 * @param {string} [str=''] 输入字符串
 * @returns {string} 字符串
 *
 * @example
 * ```ts
 * removeLastSlash('/abc/')
 *
 * '/abc'
 * ```
 */
export declare function removeLastSlash(str?: string): string;

export declare function removeMsdkNativeCallbackListener(callback: Function): void;

/**
 * @export removeUrlParams
 * @description 移除参数
 * @param {string} url 地址
 * @param {string} removeKeyArr 待移除的参数名集合
 * @returns 重新拼接的地址
 * @example
 * const url = removeUrlParams('http://www.test.com/#/detail?a=1&b=2&c=3', ['a', 'b']); // 'http://www.test.com/#/detail?c=3'
 * const url2 = removeUrlParams('http://www.test.com?d=4&f=6#/detail?a=1&b=2&c=3', ['a', 'd']); // 'http://www.test.com/#/detail?b=2&c=3&f=6'
 */
export declare function removeUrlParams(url: string | undefined, removeKeyArr: string[], forceHistoryMode?: boolean): string;

/**
 * 替换文件的 rem 单位，转为 px
 * @param {string} filePath 文件路径
 * @example
 * ```ts
 * remToPxInFile('xxx.vue');
 * ```
 */
export declare function remToPxInFile(filePath: string): void;

/**
 * polyfill for replaceAll
 *
 * @export
 *
 * @example
 *
 * replaceAllPolyfill()
 */
export declare function replaceAllPolyfill(): void;

export declare function replaceContent({ replaceList, targetProject, }: {
    replaceList: ReplaceContentOption[];
    targetProject: string;
}): void;

export declare type ReplaceContentOption = {
    list?: Array<[string, string]>;
    from?: string;
    to?: string;
    dirList: string | string[];
};

export declare function replaceContentSimple({ replaceList, }: {
    replaceList: ReplaceContentSimpleOption[];
}): void;

export declare type ReplaceContentSimpleOption = {
    list?: Array<[string | RegExp, string]>;
    from?: string | RegExp;
    to?: string;
    dirList: string | string[];
};

/**
 * 替换引用
 *
 * @param {string} content 输入内容
 * @param {Array<IParsedConfigItem>} parsedConfigList 替换配置
 * @param {string} keyword 提前返回关键词
 * @returns {string} 处理后的内容
 *
 * @example
 * ```ts
 * replaceDependencies('', [], '@tx/pmd-vue')
 * ```
 */
export declare function replaceDependencies(content: string, parsedConfigList: Array<IParsedConfigItem>, keyword: string): any;

declare type RepoConfigType = {
    domain: string;
    repo: string;
    branch: string;
};

declare enum ReportPlatform {
    NOT_KNOWN = 0,
    H5 = 1,
    MP = 2
}

/**
 * 上报数据到研发平台
 * @param {object} param 参数
 * @param {object} param.data 上报数据
 * @param {string} param.host 请求域名
 * @param {ReportType} param.type 上报类型
 * @param {ReportPlatform} param.platform 上报平台
 * @returns 上报结果
 */
export declare function reportToRdPlatform({ data, host, type, platform, }: {
    data: any;
    host: any;
    type?: ReportType;
    platform?: ReportPlatform;
}): Promise<any>;

declare enum ReportType {
    PERFORMANCE = 1,
    BUNDLE = 2,
    AUTO_TEST = 3,
    BUNDLE_MP = 4
}

declare interface ReqParam {
    url: string;
    data: object;
    secretInfo: ISecretInfo_3;
}

/**
 * 提取链接参数，兼容hash模式和history模式，以及拼接异常情况
 * @param {string} [url=''] 地址
 * @param {string} [key=''] 可选，若不为空，则提取返回该key对应的参数值
 * @returns 地址参数对象，或者是指定参数值
 * @example
 * const url = 'https://igame.qq.com?name=mike&age=18#/index?from=china&home=china'
 * const params = resolveUrlParams(url); // { from: 'china', home: 'china', name: 'mike', age: 18 }
 * const paramsAge =  resolveUrlParams(url, 'age'); // 18
 */
export declare function resolveUrlParams(url?: string, key?: string): string | Record<string, string> | undefined;

/**
 * Converts an RGB color value to HSV
 * *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1].
 * *Returns:* { h, s, v } in [0,1]
 */
export declare function rgb2hsv(r: number, g: number, b: number): {
    h: number;
    s: number;
    v: number;
};

export declare const rgbToHex: ({ r, g, b }: {
    r: number;
    g: number;
    b: number;
}) => string;

/**
 * 递归删除空目录
 * @param path 路径
 * @param level 层级
 */
export declare function rmEmptyDir(tPath: string, level?: number): void;

export declare const rmFirstAndLastSlash: typeof removeFirstAndLastSlash;

/**
 * 加了 try-catch 的 JSON.parse
 * @param data 传入数据
 * @param defaultValue 默认值，不传则为 空对象
 * @returns 解析后的数据
 *
 * @example
 *
 * ```ts
 * safeJsonParse(data)
 *
 * safeJsonParse(data, {})
 *
 * safeJsonParse(data, [])
 * ```
 */
export declare function safeJsonParse(data: string, defaultValue?: {}): {};

/**
 * node环境下，保存base64图片到文件
 * @param {object} config 输入配置
 * @param {string} config.imgUrl base64图片Url
 * @param {string} config.savePath 保存路径，最好是绝对路径
 * @returns {Promise<string>} 去掉前缀的base64图片地址
 *
 * @example
 *
 * saveBase64ImgToFile({
 *   imgUrl: 'xx',
 *   savePath: '/test.png'
 * }).then((base64Data) => {
 *   console.log(base64Data)
 * })
 *
 */
export declare function saveBase64ImgToFile({ imgUrl, savePath }: {
    imgUrl: string;
    savePath: string;
}): Promise<string>;

export declare function saveJsonToLog(content: object, file: string, needLog?: boolean): void;

export declare function saveJsonToLogMore(content: any, file: string, options?: {
    needLog?: boolean;
    max?: number;
}): void;

/**
 * 小程序下保存图片
 * @param {string} url 图片地址
 * @param {object} options 提示选项
 * @example
 * ```ts
 * saveMpImage('https://xxx.png');
 * ```
 */
export declare function saveMpImage(url: string, options?: Partial<IOptions>): void;

/**
 * 写入持久化存储localStorage。仅用于浏览器端，value里不能有循环引用
 * @param {string} key 键
 * @param {string} value 值
 * @param {number} expireMsec 过期时间，单位毫秒
 * @returns {boolean} 是否存储成功
 *
 * @example
 * const res = savePersist('name', 'mike', 30 * 86400 * 1000); // true
 * const name = getPersist('name'); // mike
 *
 * clearPersist('name'); // true
 * const name2 = getPersist('name'); // undefined
 */
export declare function savePersist(key: string, value: string, expireMsec?: number): boolean;

/**
 * node环境下，保存网络图片到本地
 * @param {object} config 输入配置
 * @param {string} config.imgUrl 网络图片地址
 * @param {string} config.savePath 本地图片保存路径，建议绝对路径
 * @returns {Promise<object>} 请求Promise
 *
 * @example
 *
 * saveRemoteImgToLocal({
 *   imgUrl: 'xx',
 *   savePath: './test.png'
 * }).then(() => {
 *
 * })
 */
export declare function saveRemoteImgToLocal({ imgUrl, savePath }: {
    imgUrl: string;
    savePath: string;
}): Promise<object>;

export declare class Scheduler {
    pendingState: Array<IRequest>;
    doingJobs: number;
    maxConcurrency: number;
    /**
     * 异步任务调度器，同一时间只能执行 n 个任务
     * @param {number} [maxConcurrency] 最多同时执行的任务数目，默认为 2
     *
     * @example
     * ```ts
     * let scheduler;
     *
     * export async function login({
     *   userId,
     *   userSig,
     *   tim,
     * }: {
     *   userId: string;
     *   userSig: string;
     *   tim: IChatSDK;
     * }) {
     *   if (!scheduler) {
     *     scheduler = new Scheduler(1);
     *   }
     *
     *   return await scheduler.add(innerLogin.bind(null, {
     *     userId,
     *     userSig,
     *     tim,
     *   }));
     * }
     * ```
     */
    constructor(maxConcurrency?: number);
    add(promiseCreator: IRequest): Promise<any>;
    unshift(promiseCreator: IRequest): Promise<any>;
    doJob: () => void;
}

declare type ScoreInfoType = {
    ProjectId: number;
    ProjectName: string;
    PagePv: number;
    PageUv: number;
    PageDuration: number;
    PageError: number;
    ApiNum: number;
    ApiFail: number;
    ApiDuration: number;
    StaticNum: number;
    StaticFail: number;
    StaticDuration: number;
    Score: number;
    GroupName: string;
    CreateUser: string;
    CreateTime: string;
    [k: string]: string | number;
};

export declare type SCSSErrorFile = Record<string, any>;

declare type SecretInfoType = {
    apiKey: string;
    loginName: string;
    rumSecretId: string;
    rumSecretKey: string;
    getPwdCode: Function;
    encrypt: Function;
};

/**
 * 请求开源治理数据并发送
 * @param options 配置信息
 */
export declare function sendOpenSourceReport({ date, chatId, webhookUrl, requestInfo, searchInfo, maxShowLinkNum, whiteList, filterOrgPath, }: {
    date: string | number | Date;
    chatId: string;
    webhookUrl: string;
    requestInfo: IRequestInfo;
    searchInfo: ISearchInfo;
    maxShowLinkNum?: number;
    whiteList?: Array<string>;
    filterOrgPath?: string;
}): Promise<void>;

/**
 * 获取超时的流水线列表，并发送机器人消息
 * @param {object} params 参数
 * @param {object} params.params 获取流水线列表参数
 * @param {string} params.pipelineHost 流水线 host 地址
 * @param {string} params.webhookUrl 回调地址
 * @param {string} params.chatId 会话id
 */
export declare function sendOverTimePipelineMessage({ params, pipelineHost, webhookUrl, chatId, overTimeConfigList, mentionList, }: {
    params: any;
    pipelineHost: string;
    webhookUrl: string;
    chatId: Array<string>;
    overTimeConfigList?: Array<{
        label: string;
        value: number;
    }>;
    mentionList: string[];
}): Promise<any[] | undefined>;

/**
 * MSDK 浏览器中，向原生发送数据
 * @param {string} data 发送的数据
 * ```ts
 * sendToMsdkNative('123')
 * ```
 */
export declare function sendToMsdkNative(data?: string): void;

declare const SendToRobotTypeMap: {
    readonly NO_SEND: 0;
    readonly SEND_CHANGE: 1;
    readonly SEND_ALL: 2;
};

/**
 * 获取天气信息并发送
 * @param {object} options 配置
 * @param {string} options.webhookUrl 机器人hook地址
 * @param {string} [options.chatId] 会话Id
 * @param {string} [options.force] 是否在和之前获取数据相同时，也发送
 * @returns {Promise<Object>} 请求Promise
 */
export declare function sendWeatherRobotMsg({ webhookUrl, chatId, force, }: {
    webhookUrl: string;
    chatId: string | string[];
    force?: boolean;
}): Promise<void>;

/**
 * 发送企业微信机器人base64图片，其实就是先保存到本地，然后生成md5，最后发送
 * @param {object} config 配置信息
 * @param {string} config.img base64图片
 * @param {string} config.chatId 会话Id
 * @param {string} config.webhookUrl webhook地址
 * @returns {Promise<object>} 请求Promise
 * @example
 *
 * sendWxRobotBase64Img({
 *   img: 'xxx',
 *   chatId: 'xxx',
 *   webhookUrl: 'xxx',
 * }).then(() => {
 *
 * })
 *
 */
export declare function sendWxRobotBase64Img({ img, chatId, webhookUrl, }: {
    img: string;
    chatId: string;
    webhookUrl: string;
}): Promise<object>;

/**
 * 给机器人发送图片
 * @param {Object} config 配置参数
 * @param {string} config.webhookUrl 钩子链接
 * @param {string} config.chatId 会话id
 * @param {string} config.content 内容
 * @param {string} config.md5Val md5内容
 * @returns {Promise<object>} 请求Promise
 *
 * @example
 *
 * sendWxRobotImg({
 *   webhookUrl: 'xxx',
 *   chatId: 'xxx',
 *   content: 'xxx',
 *   md5Val: 'xxx'
 * }).then(() => {
 *
 * })
 */
export declare function sendWxRobotImg({ webhookUrl, chatId, content, md5Val }: {
    webhookUrl: string;
    content: string;
    md5Val: string;
    chatId?: string;
}): Promise<object>;

/**
 * 给机器人发送Markdown消息
 * @param {Object} config 配置内容
 * @param {string} config.webhookUrl - 钩子链接
 * @param {string} config.chatId - 会话id
 * @param {string} config.content - 内容
 * @param {Array<object>} config.attachments - 附加内容
 * @returns {Promise<object>} 请求Promise
 * @example
 *
 * sendWxRobotMarkdown({
 *   webhookUrl: 'xxx',
 *   chatId: 'xxx',
 *   content: 'xxx',
 *   attachments: []
 * }).then(() => {
 *
 * })
 */
export declare function sendWxRobotMarkdown({ webhookUrl, chatId, content, attachments, }: {
    webhookUrl: string;
    content: string;
    chatId?: string;
    attachments?: Array<object>;
}): Promise<object>;

/**
 * 给机器人发送普通消息
 * @param {Object} config 配置内容
 * @param {string} config.webhookUrl - 钩子链接
 * @param {string} config.chatId - 会话id
 * @param {string} config.alias - 别名
 * @param {string} config.content - 内容
 * @returns {Promise<object>} Promise
 *
 * @example
 *
 * sendWxRobotMsg({
 *   webhookUrl: 'xxx',
 *   chatId: 'xxx',
 *   content: 'xxx',
 *   alias: 'xxx',
 * }).then(() => {
 *
 * })
 */
export declare function sendWxRobotMsg({ webhookUrl, chatId, alias, content }: {
    webhookUrl: string;
    content: string;
    chatId?: string;
    alias?: string | Array<string>;
}): Promise<object>;

export declare function set<Entity = any, Output = Entity, Value = any>(entity: Entity, paths: Path, value: Value, removeIfUndefined?: boolean): Output;

/**
 * 设置config
 *
 * @param {string} name
 * @param {*} value
 *
 * @example
 * setConfig('login.loginType','WXPC')
 */
export declare function setConfig(name: string, value: unknown): void;

/**
 * 设置cookie
 * @param {string} key cookie键值
 * @param {string} value cookie值
 * @param {number} [hours] 过期时间，单位小时
 *
 * @example
 *
 * setCookie('name', 'mike')
 */
export declare function setCookie(name: string, value: string, Hours?: number): void;

export declare function setHtmlResponsiveFontsize(): void;

declare function setRoute(page: IPage, route?: string): Promise<void>;

declare function setSessionStorage(key: string, value: string, page: IPage): Promise<void>;

declare function setUserAgent(useragent: string, page: IPage): Promise<void>;

/**
 * 设置对象深层属性的值（类似 Lodash 的 _.set）
 * @param obj 目标对象
 * @param path 属性路径（字符串或数组，如 'a.b.c' 或 ['a', 'b', 'c']）
 * @param value 要设置的值
 * @returns 修改后的对象
 */
export declare function setWithString<T extends object>(obj: T, path: string | Array<string | number>, value: any): T;

/**
 * 是否应该执行 standard-version
 * 返回0，不执行
 * 返回1，执行--first-release
 * 返回2，执行--release-as patch
 * @private
 * @param {string} [] 命令执行目录
 * @returns {number} 是否应该执行 standard-version
 */
export declare function shouldGenVersion(root?: string, forceGenVersion?: boolean): number;

/**
 * 显示失败样式 Toast(toast带！样式)
 * @param text  文案
 * @param duration  显示时间，默认2秒
 * @example
 * ```ts
 * Toast.showFail('文本', 3000);
 * ```
 */
export declare const showFail: (text?: string, duration?: number) => void;

/**
 * 函数式调用组件
 * @param {Object} vueInstance 页面Vue实例（一般为页面this）
 * @param {Object} dialogComponent 弹窗组件，支持静态导入import Dialog from '..'和动态导入const Dialog = () => import('...')两种形式
 * @param {Object} dialogOptions 弹窗参数Object
 * @returns Promise 回调组件实例
 *
 * @example
 * ```ts
 * function showDateTimePicker(this: any, {
 *   onConfirm,
 *   currentDate,
 * }) {
 *   showFunctionalComponent(
 *     this, () => import('src/local-component/ui/gp-match-horz/date-picker'),
 *     {
 *       currentDate,
 *       minDate: new Date(new Date().getTime() + 30 * 60 * 1000),
 *       onClickConfirm: (date) => {
 *         const dateNumber =  Math.floor(date.getTime());
 *         onConfirm(date, dateNumber);
 *       },
 *     },
 *   );
 * }
 * ```
 */
export declare function showFunctionalComponent(vueInstance: any, dialogComponent: any, dialogOptions: Record<string, any>): Promise<unknown>;

/**
 * @description 根据弹窗队列（dialogList）依次弹出
 * @param {object} context Vue 页面 Vue实例上下文（一般为页面this、window.app、new Vue() 等）
 * @param {array} dialogList 弹窗列表
 * @param {Object} dialogComponent 弹窗组件，支持静态导入 import Dialog from '..' 和动态导入 const Dialog = () => import('...') 两种形式
 */
export declare function showFunctionalComponentQueue(context: any, dialogList: Array<any>, dialogComponent: any): void;

/**
 * 显示loading Toast
 * @param {string | object} options 配置，传递字符串时候为message
 * @param {string} options.message 内容
 * @param {number} options.duration 展示时长(ms)，值为 0 时，toast 不会消失
 * @param {boolean} options.forbidClick 是否禁止背景点击
 * @param {string} options.selector 自定义选择器
 * @example
 * ```ts
 * Toast.showLoading('文本');
 *
 * Toast.showLoading({
 *   message: '文本',
 *   zIndex: 1000,
 * });
 * ```
 */
export declare const showLoading: (options?: {}) => void;

/**
 * 显示成功样式Toast（toast带√样式）
 * @param text  文案
 * @param duration  显示时间，默认2秒
 * @example
 * ```ts
 * Toast.showSuccess('文本', 3000);
 * ```
 */
export declare const showSuccess: (text?: string, duration?: number) => void;

/**
 * 显示普通Toast
 * @param text  文案
 * @param duration  显示时间，默认2秒
 * @example
 * ```ts
 * Toast.show('文本', 3000);
 * ```
 */
export declare const showToast: (text?: string, duration?: number) => void;

/**
 * 展示 vConsole
 * @example
 * ```ts
 * showVConsole()
 * ```
 */
export declare function showVConsole(): void;

/**
 * 打乱数组顺序
 *
 * @param {Array<any>} array - 数组
 * @returns {Array<any>} 乱序后的数组
 *
 * @example
 *
 * shuffle([1, 2, 3, 4, 5])
 *
 * // [3, 2, 1, 4, 5]
 *
 */
export declare function shuffle<T>(array: Array<T>): Array<T>;

/**
 * 简单的摩斯密码，只有点击
 * @param param {object} 参数
 *
 * @example
 * ```ts
 * simpleMorse({
 *   target: 5, // 目标值
 *   callback: () => console.log('test'),
 *   timeout: 300, // 超时取消
 *   debug: false,
 * })
 * ```
 */
export declare function simpleMorse({ target, callback, timeout, debug, }: {
    callback?: Function;
    target?: number;
    timeout?: number;
    debug?: boolean;
}): void;

/**
 * 等待一段时间
 * @func
 * @param {number} ms 毫秒
 * @returns Promise
 * @example
 *
 * async function main() {
 *   await sleep(2000)
 *
 *   // 等待2秒后才会打印
 *   console.log('hello')
 * }
 *
 * main()
 */
export declare const sleep: (ms: number) => Promise<unknown>;

export declare function sliceObject<T>(info: Record<string, T>, max: number): Record<string, T>;

export declare function sortByStr(list: Array<string | Record<string, string>>, key?: string, reverse?: boolean): void;

export declare function sortObjectByKey<T extends string | number, F>(obj: Record<T, F>): Record<T, F>;

export declare function splitLongList(list: Array<string>, threshold?: number, max?: number): string[][];

/**
 * Vue项目初始化
 * @param {object} options 业务自定义配置
 * @param {object} options.App 业务App.vue对象
 * @param {Array<object>} [options.routerMap]  业务路由配置表
 * @param {Function} [options.beforeStart]  钩子函数，业务自定义
 * @param {boolean} [options.i18n] 支持国际化
 * @returns {object} 返回 { router, store }
 */
export declare function startApp(options: AppOptionsType): {
    router: any;
    store: any;
} | undefined;

/**
 * 启动流水线
 * @param {object} params 配置信息
 * @param {string} params.projectId 项目ID
 * @param {string} params.pipelineId 流水线ID
 * @param {object} params.secretInfo 密钥信息
 * @param {string} params.host 请求域名
 * @param {object} params.data 请求数据
 */
export declare function startDevopsPipeline({ projectId, pipelineId, secretInfo, host, data, }: {
    projectId: string;
    pipelineId: string;
    secretInfo: ISecretInfo;
    host: string;
    data: Object;
}): Promise<any>;

/**
 * 启动流水线
 *
 * @param {object} config 配置信息
 * @param {string} config.buildId 流水线构建Id
 * @param {object} config.data 携带的数据
 * @returns Promise
 *
 * @example
 *
 * ```ts
 * startPipeline({
 *   buildId,
 *   data: {}
 * }).then(() => {
 *
 * })
 * ```
 */
export declare function startPipeline({ buildId, data, }: {
    buildId: string;
    data: Record<string, any>;
}): Promise<unknown>;

/**
 * 启动 uni-app 项目
 * @param options 参数
 *
 * @example
 * ```ts
 * startUniProject();
 *
 * startUniProject({
 *   debug: false, // 默认为 true，会打印参数
 * })
 * ```
 */
export declare function startUniProject(options?: {
    debug?: boolean;
}): void;

/**
 * 统计组件个数
 * @example
 * statisticsComponent('dist/build/mp-weixin');
 */
export declare function statisticsComponent(dir: string): number;

/**
 * 统计页面个数
 * @example
 * statisticsPages('dist/build/mp-weixin/app.json')
 */
export declare function statisticsPages(pagesJsonPath: string): any;

/**
 * 节流
 *
 * 连续触发事件但是在 n 秒中只执行一次函数
 * @param {Function} fn 主函数
 * @param {number} time 间隔时间，单位 `ms`
 * @returns 闭包函数
 *
 * @example
 *
 * ```ts
 * function count() {
 *  console.log('xxxxx')
 * }
 * window.onscroll = throttle(count, 500)
 * ```
 */
export declare function throttle(fn: Function, time: number): (...args: Array<any>) => void;

/**
 * 将时间戳格式化
 * @param {number} timestamp
 * @param {string} fmt
 * @param {string} [defaultVal]
 * @returns {string} 格式化后的日期字符串
 * @example
 *
 * const stamp = new Date('2020-11-27 8:23:24').getTime();
 *
 * const res = timeStampFormat(stamp, 'yyyy-MM-dd hh:mm:ss')
 *
 * // 2020-11-27 08:23:24
 */
export declare function timeStampFormat(timestamp: number, fmt: string, defaultVal?: string, whitePrefix?: string): string;

/**
 * 压缩图片，会依次执行 getHttpsUrl, getCdnUrl, getCompressImgUrl
 * @param {string} url 图片地址
 * @param {number} [imageWidth=0] 宽度
 * @param {number} [imageHeight=0] 高度
 * @returns 新的 url 地址
 */
export declare const tinyImage: (url: string, imageWidth?: number, imageHeight?: number) => string;

declare const TIP_MAP: {
    saveImage: string;
    saveImageSuccess: string;
    saveImageFail: string;
    saveImageFailOfAuth: string;
    authConfirmContent: string;
    authConfirmFailToast: string;
};

/**
 * 将每个单词的首字母转换为大写
 * @param {string} str 输入字符串
 * @returns {string} 处理后的字符串
 *
 * @example
 *
 * titleize('my name is yang')
 *
 * // My Name Is Yang
 *
 * titleize('foo-bar')
 *
 * // Foo-Bar
 */
export declare function titleize(str: string): string;

/**
 * Toast 对象
 * @example
 * ```ts
 * Toast.show('文本')
 * ```
 */
export declare const Toast: {
    show: (text?: string, duration?: number) => void;
    showToast: (text?: string, duration?: number) => void;
    showSuccess: (text?: string, duration?: number) => void;
    showFail: (text?: string, duration?: number) => void;
    clear: () => void;
    clearToast: () => void;
    showLoading: (options?: {}) => void;
    dismissLoading: () => void;
};

/**
 * 切换展示 vConsole
 * @returns 是否展示
 * @example
 * ```ts
 * toggleVConsole()
 * ```
 */
export declare function toggleVConsole(): boolean;

/**
 * 将对象中的key由下划线专为驼峰
 *
 * @param {object} obj - 对象
 * @returns {object} 转化后的对象
 *
 * @example
 * const obj = {
 *   a_a: 'a',
 *   b_b: [
 *     {
 *       bb_b: 'b',
 *     },
 *   ],
 *   c: {
 *     dd_d: 'd',
 *     e: {
 *       ee_e: 'e',
 *     },
 *   },
 * };
 *
 * toHumpObj(obj);
 * // { aA: 'a', bB: [ { bbB: 'b' } ], c: { ddD: 'd', e: { eeE: 'e' } } }
 */
export declare function toHumpObj(obj: IHumpObject, cache?: WeakMap<object, any>): object;

/**
 * Expose a method for transforming tokens into the path function.
 * @ignore
 */
declare function tokensToFunction(tokens: Array<any>): (data: any, options: any) => string;

/**
 * Expose a function for taking tokens and returning a RegExp.
 * @ignore
 * @param  {!Array}  tokens
 * @param  {Array=}  keys
 * @param  {Object=} options
 * @returns {!RegExp}
 */
declare function tokensToRegExp(tokens: Array<any>, keys?: Array<any>, options?: any): RegExp;

/**
 * 将函数转成 Promise
 * @param {function} promiseLike 任意函数，可以为 Promise
 * @returns Promise 函数
 * @example
 * ```
 * const bar = () => 1;
 * toPromise(bar()).then(res => console.log(res)); // 1

 * function foo() {
 *   return new Promise(resolve => setTimeout(() => resolve(2), 1000));
 * }
 * toPromise(foo()).then(res => console.log(res)); // 2
 *
 * ```
 */
export declare function toPromise(promiseLike: any): any;

/**
 * 获取字符串的 unicode
 *
 * @param {string} str - 字符串
 * @returns {string} data
 *
 * @example
 *
 * toUnicode('ABC')
 *
 * // -> '\\u0041\\u0042\\u0043'
 *
 *
 */
export declare function toUnicode(str: string): unknown;

/**
 * 获取字符串指定下标的 unicode
 *
 * @param {string} str - 字符串
 * @param {number} index - unicode 的下标
 * @returns {string} data
 *
 * @example
 *
 * unicodeAt('ABC', 1)
 *
 * // -> '\\u0042'
 *
 */
export declare function toUnicodeAt(str: string, index?: number): string;

export declare function transformGitToSSH(link?: string): string;

/**
 * 转化 rem 单位
 * @param {string} content 输入内容
 * @param {number} factor 转化比例，默认 100
 * @param {string} unit 转化单位，默认 rpx
 * @returns {string} 转化后的结果
 *
 * @example
 * ```ts
 * transFormRem('1.22rem')
 * // 122rpx
 *
 * transFormRem('1.22rem', 50, 'px')
 * // 61px
 *
 * transFormRem('.21rem', 50, 'px')
 * // 10.50px
 * ```
 */
export declare function transFormRem(content: string, factor?: number, unit?: string): string;

/**
 * 递归遍历文件夹，并执行某操作
 * @param {Function} cb 回调参数
 * @param {String} path 文件夹或文件路径
 */
export declare function traverseFolder(cb: Function, tPath: string): void;

export declare function traverseResp(data: Record<string, any>, cb?: typeof updateChildId): void;

export declare const TRIGGER_MAP: {
    MANUAL: string;
    TIME_TRIGGER: string;
    WEB_HOOK: string;
    SERVICE: string;
    PIPELINE: string;
    REMOTE: string;
};

declare type TsErrorFile = {
    file: string;
    line: number;
    column: number;
    code: string;
    message: string;
};

/**
 * node环境下，本地图片转为base64
 * @param {string} savePath 本地图片保存路径
 * @returns {string} base64图片地址
 *
 * @example
 *
 * const base64str = turnLocalImg2Base64('/temp.png')
 *
 */
export declare function turnLocalImg2Base64(imgPath: string): string;

/**
 * 拦截路由
 *
 * @example
 * ```ts
 * uniHookRouter({
 *   navigateToHooks: [
 *     () => console.log('1')
 *   ],
 *    navigateBackHooks: [
 *      () => console.log('2')
 *    ],
 *    redirectToHooks: [
 *      () => console.log('3')
 *    ],
 *    debug: true,
 * })
 * ```
 */
export declare function uniHookRouter({ navigateToHooks, navigateBackHooks, redirectToHooks, tryUniInterCeptor, debug, }: {
    navigateToHooks?: Array<Function>;
    navigateBackHooks?: Array<Function>;
    redirectToHooks?: Array<Function>;
    tryUniInterCeptor?: boolean;
    debug?: boolean;
}): void;

declare function updateChildId(data: {
    child_id_new?: number | string;
    child_id?: number | string;
}): void;

export declare function updateDevopsMpCIPipeline({ isWxCI, forceUpdate, onlyCollectNoUsedPipeline, devopsConfig, templateIdMap, rainbowGroupSecretInfo, }: Record<string, any>): Promise<void>;

export declare function updateDevopsTemplateInstances({ projectId, templateId, pipelineId, host, pipelineName, pipelineParam, useTemplateSettings, secretInfo, }: ITemplateReq & {
    pipelineId: string;
    pipelineName: string;
    pipelineParam: Object;
    useTemplateSettings?: boolean;
}): Promise<any>;

export declare function updateManager(): void;

export declare function updateMpCIRainbowConfig({ rainbowConfig, branch, originBranch, testRobot, releaseRobot, robot, env, useMpQQ, }: {
    rainbowConfig: Record<string, any>;
    branch: string;
    originBranch?: string;
    testRobot?: number;
    releaseRobot?: number;
    robot?: number;
    env?: string;
    useMpQQ?: boolean;
    errorMap?: typeof ERROR_MAP;
}): {
    error: string;
} | {
    newRainbowConfig: Record<string, any>;
    rainbowKey: string;
};

export declare function updateQQMpResultToSheet({ result, accessToken, clientId, openId, bookId, sheetId, startRow, startColumn, }: ISecretInfo_2 & {
    result: Record<string, any>;
    bookId: string;
    sheetId: string;
    startRow: number;
    startColumn?: number;
}): Promise<any>;

export declare function updateQQMpResultToSheetV0({ accessToken, clientId, openId, bookId, sheetId, startRow, qqMpQRCodePath, result, }: ISecretInfo_2 & {
    bookId: string;
    sheetId: string;
    startRow: number;
    startColumn?: number;
    qqMpQRCodePath: string;
    result: Record<string, any>;
}): Promise<any>;

/**
 * 修改配置
 * @param {object} config 配置信息
 * @param {object} config.keyValue 配置对象
 * @param {string} config.keyValue.key 配置的key
 * @param {string} config.keyValue.value 配置的value
 * @param {number} config.valueType 配置类型，1: NUMBER, 2: STRING, 3: TEXT, 4: JSON, 5: XML, 18: 日期, 20: yaml
 * @param {object} config.secretInfo 密钥信息
 * @param {string} config.secretInfo.appId 项目Id
 * @param {string} config.secretInfo.userId 用户Id
 * @param {string} config.secretInfo.secretKey 密钥
 * @param {string} config.secretInfo.envName 配置环境
 * @param {string} config.secretInfo.groupName 配置组
 * @returns {Promise<object>} 请求Promise
 *
 * @example
 * updateRainbowKV({
 *   keyValue: {
 *     key: 'theKey',
 *     value: 'theValue',
 *   },
 *   valueType: 2,
 *   secretInfo: {
 *     appId: 'xxx',
 *     userId: 'xxx',
 *     secretKey: 'xxx',
 *     envName: 'prod',
 *     groupName: 'xxx',
 *   }
 * }).then(() => {
 *
 * })
 */
export declare function updateRainbowKV({ keyValue, valueType, secretInfo, }: ModifyConfigParam): Promise<object>;

/**
 * 更新或新增值并发布
 * @param {object} config 配置信息
 * @param {string} config.key 配置key
 * @param {string} config.value 配置value
 * @param {number} config.valueType 配置类型，1: NUMBER, 2: STRING, 3: TEXT, 4: JSON, 5: XML, 18: 日期, 20: yaml
 * @param {object} config.secretInfo 密钥信息
 * @param {string} config.secretInfo.appId 项目Id
 * @param {string} config.secretInfo.userId 用户Id
 * @param {string} config.secretInfo.secretKey 密钥
 * @param {string} config.secretInfo.envName 配置环境
 * @param {string} config.secretInfo.groupName 配置组
 * @returns {Promise<object>} 请求Promise
 *
 * @example
 * updateRainbowKVAndPublish({
 *   key: 'key',
 *   value: 'value',
 *   valueType: 2,
 *   secretInfo: {
 *     appId: 'xxx',
 *     userId: 'xxx',
 *     secretKey: 'xxx',
 *     envName: 'prod',
 *     groupName: 'xxx',
 *   }
 * }).then(() => {
 *
 * })
 */
export declare function updateRainbowKVAndPublish({ key, value, valueType, secretInfo, creator, approvers, }: {
    key: string;
    value: string;
    valueType: RainbowKeyValueType;
    secretInfo: ISecretInfo_3;
    creator: string;
    approvers: string;
}): Promise<any>;

export declare function updateTencentSheet({ accessToken, clientId, openId, bookId, range, values, }: ISecretInfo_2 & {
    bookId: string;
    range: string;
    values: Array<{}>;
}): Promise<any>;

export declare function updateTencentSheetImage({ accessToken, clientId, openId, bookId, insertImages, }: ISecretInfo_2 & {
    bookId: string;
    insertImages: any;
}): Promise<any>;

/**
 * COS上传
 * @param {object} config 配置信息
 * @param {Array<object>} config.files 文件列表
 * @param {string} config.files.key 文件key
 * @param {string} config.files.path 文件路径
 * @param {string} config.secretId COS secretId
 * @param {string} config.secretKey COS secretKey
 * @param {string} config.bucket COS bucket
 * @param {string} config.region COS region
 * @returns {Promise<object>} 请求Promise
 *
 * @example
 *
 * uploadCOSFile({
 *   files: [{
 *     key: 'key1',
 *     path: 'path1',
 *   }, {
 *     key: 'key2',
 *     path: 'path2',
 *   }],
 *   secretId: 'xxx',
 *   secretKey: 'xxx',
 *   bucket: 'xxx',
 *   region: 'xxx',
 * })
 */
export declare function uploadCOSFile({ files, secretId, secretKey, bucket, region, }: {
    files: Array<{
        key: string;
        path: string;
    }>;
    secretId: string;
    secretKey: string;
    bucket: string;
    region: string;
}): Promise<unknown>;

export declare function uploadCOSStreamFile({ file, key, secretId, secretKey, bucket, region, }: {
    secretId: string;
    secretKey: string;
    bucket: string;
    region: string;
    file: {
        path: string;
        size: number;
    };
    key: string;
}): Promise<unknown>;

/**
 * 上传文件
 *
 * 上传的本质：
 *
 * 1. 小程序上传文件是先用 chooseFile 获取一个文件，可以得到
 * 一个临时路径，然后用 uploadFile 上传该临时路径
 *
 * 2. H5 是 input 获取文件，然后用 FormData 上传 File 对象
 * @param {File} file 文件
 * @returns {Promise<{url: string}>} 上传结果
 *
 * @example
 * ```ts
 * import { uploadFile, UploadManager } from 't-comm/lib/uploader'
 *
 * uploadFile(file).then(() => {})
 *
 * // 可以通过 UploadManager 设置上传参数
 * UploadManager.setConfig({
 *   requestHashUrl: `https://${location.hostname}/pvp/share/getsharecfg.php`,
 *   uploadFileKey: 'upload_pic_input',
 *   uploadUrlPrefix: 'https://igame.qq.com/external/uploadpic.php?_hash=',
 * })
 *
 * // 可以通过 UploadManager.getInstance().updateHashCode 主动更新 hashCode
 * UploadManager.getInstance().updateHashCode();
 * ```
 */
export declare function uploadFile(file: File): Promise<unknown>;

export declare class UploadManager {
    static uploadManager: UploadManager;
    static getInstance(): UploadManager;
    static setConfig(options: IUploaderOptions): void;
    hash: string;
    timestamp: number;
    isRequesting: boolean;
    options: IUploaderOptions;
    constructor();
    updateHashCode(): Promise<unknown>;
    requestUpload(file: File): Promise<{
        url: string;
    }>;
}

export declare function uploadTencentDocImage({ accessToken, clientId, openId, image, }: ISecretInfo_2 & {
    image: string;
}): Promise<any>;

/**
 * 解决图片跨域问题，将网络图片URL转为base64 URL。
 * @param {string} src 网络图片URL
 * @returns {Promise} Promise对象返回base64 URL
 *
 * @example
 * Dom2Image.urlToBase64("http://test.com/image.png").then(url=>{});
 */
export declare function urlToBase64(src: string): Promise<string>;

declare interface UserInfo {
    openid: string;
    token: string;
    channel_info?: {
        channelId: number;
    };
}

/**
 * vConsole 当前展示状态
 */
export declare const V_CONSOLE_STATE: {
    show: boolean;
};

/**
 * 判断是否字母字符串
 * @param {string} str
 * @returns {Boolean}
 */
export declare function validAlphabets(str: string): boolean;

export declare function validateMoreIdCard(str: string): boolean;

/**
 * 判断是否合法邮箱地址
 * @param {string} email
 * @returns {Boolean}
 */
export declare function validEmail(email: string): boolean;

/**
 * 判断是否小写
 * @param {string} str
 * @returns {Boolean}
 */
export declare function validLowerCase(str: string): boolean;

/**
 * 判断是否大写
 * @param {string} str
 * @returns {Boolean}
 */
export declare function validUpperCase(str: string): boolean;

/**
 * 判断是否URL
 * @param {string} url
 * @returns {Boolean}
 */
export declare function validURL(url: string): boolean;

declare type ValueType = string | number;

declare enum ValueType_2 {
    NUMBER = 1,
    STRING = 2,
    TEXT = 3,
    JSON = 4,
    XML = 5,
    DATE = 18,
    YAML = 20
}

export declare const version: any;

/**
 * 监听rainbow，同步到cos，并发送到机器人
 * @param {object} options 配置
 * @param {object} options.rainbowSecretInfo 七彩石密钥信息
 * @param {object} options.cosInfo 腾讯云信息
 * @param {string} options.appName 七彩石项目名称
 *
 * @param {string} options.webhookUrl 机器人回调
 * @param {string} options.chatId 会话id
 * @param {0|1|2} options.sendToRobotType 发送机器人类型，0 不发送，1 发送变化的部分，2 全部发送
 *
 * @example
 *
 * await watchRainbowToCosAndSendRobot({
 *   rainbowSecretInfo: {
 *     appID: RAINBOW_OPEN_APP_ID,
 *     userID: RAINBOW_OPEN_YGW_USER_ID,
 *     secretKey: RAINBOW_OPEN_YGW_SECRET_KEY,
 *     envName: 'Default',
 *     groupName: 'group',
 *   },
 *   appName: 'configApp',
 *   cosInfo: {
 *     secretId,
 *     secretKey,
 *     bucket: 'bucket',
 *     region: 'ap-guangzhou',
 *     dir: 'rb',
 *   },
 *   webhookUrl: 'xxx',
 *   chatId: 'xxx',
 *   sendToRobotType: 1,
 * });
 *
 */
export declare function watchRainbowToCosAndSendRobot({ rainbowSecretInfo: secretInfo, cosInfo, appName, webhookUrl, chatId, sendToRobotType, }: {
    rainbowSecretInfo: ISecretInfo_5;
    cosInfo: ICosInfo;
    appName: string;
    webhookUrl: string;
    chatId: string;
    sendToRobotType?: (typeof SendToRobotTypeMap)[keyof typeof SendToRobotTypeMap];
}): Promise<void>;

export declare function writeEnvAndPrivateKey({ branch, env, root, rainbowConfigKey, rainbowAppId, rainbowEnvName, rainbowGroupName, }: Record<'branch' | 'env' | 'rainbowConfigKey' | 'rainbowAppId' | 'rainbowEnvName' | 'rainbowGroupName' | 'root', string>): Promise<void>;

export declare function writeEnvAndPrivateKeyByOptions(options: any): Promise<void>;

export declare function writeEnvFromRainbow({ envPath, rainbowAppId, rainbowUserId, rainbowSecretKey, rainbowKey, envName, groupName, sdk, }: {
    envPath: string;
    rainbowAppId: string;
    rainbowUserId?: string;
    rainbowSecretKey?: string;
    rainbowKey: string;
    envName: string;
    groupName: string;
    sdk: any;
}): Promise<boolean>;

/**
 * 将 .env.local 中 NPM_TOKEN 的值写入到 .npmrc 中
 */
export declare function writeEnvTokenToNpmRC(): void;

/**
 * 写入文件
 * @param {string} file 文件地址
 * @param {any} data 文件数据
 * @param {boolean} [isJson] 是否需要 json 序列化
 * @example
 * ```ts
 * writeFileSync('a', 'b.txt', false);
 *
 * writeFileSync({ a: 1 }, 'b.json', true);
 * ```
 */
export declare function writeFileSync(file: string, data: any, isJson?: boolean): void;

export { }
