import { EVENTTYPES } from "../common/constant"; import { TransportData } from "../core/transportData"; import { Breadcrumb } from "../core/breadcrumb"; import { Logger } from "./logger"; import { Options } from "../core/options"; export interface MitoSupport { logger: Logger; breadcrumb: Breadcrumb; transportData: TransportData; replaceFlag: { [key in EVENTTYPES]?: boolean; }; record?: any[]; options?: Options; } interface Chrome { app: Record; csi: () => void; loadTimes: () => void; runtime: Record; } interface MITOGlobal { console?: Console; chrome?: Chrome; __AAX_MITO__?: MitoSupport; } export declare type GlobalInterface = MITOGlobal & Window; export declare const isNodeEnv: boolean; export declare const isBrowserEnv: boolean; /** * 获取全局变量 * * ../returns Global scope object */ export declare function getGlobal(): MITOGlobal & Window & T; declare const _global: MITOGlobal & Window; declare const _support: MitoSupport; export { _global, _support }; export declare function setFlag(replaceType: EVENTTYPES, isSet: boolean): void; export declare function getFlag(replaceType: EVENTTYPES): boolean; /** * 获取全部变量__MITO__的引用地址 * * ../returns global variable of AAX_MITO */ export declare function getGlobalMitoSupport(): MitoSupport; export declare function supportsHistory(): boolean; /** * 当前用户的 UUID, 基于以下参数: * - 创建时间 (in millisecond) * - 随机数 (around 1000~10000000) * E.g: 169e68f80c9-1b4104 */ export declare function generateUUID(): string; export declare function ajaxPost(url: string, params: any): Promise;