declare enum SendType { overflow = 1, unload = 2, timeout = 3 } interface Option { timeout?: number; maxCache?: number; startUrl?: string; isRecordCurrent?: boolean; reportUrl: string; getToken?: () => string; isThird?: boolean; isLayout?: () => boolean; } interface RecordingData { resolutionType: number; gmtDuration: number; gmtEnd: number; gmtStart: number; menuId: string; menuPath?: string; menuUrl: string; productId: string; trackId: string; } /** * 路由信息,两种 url * 1. hash 模式 * http://localhost:8080/layout/usercenter/#/role/index * 2. history 模式 * http://localhost:8080/layout/usercenter/role/index * * 例如:组态项目 * productId: 'configuration' * menuId: '工业组态页面-xxx' */ export interface Route { productId: string; menuId: string; menuUrl: string; menuPath?: string; } export declare enum DataType { Boolean = "boolean", String = "string", Function = "function" } export declare function getDataType(value: any): string; export declare function isBoolean(value: any): boolean; export declare function isFunction(value: any): boolean; export declare function isString(value: any): boolean; export declare function isEmptyString(value: any): boolean; export declare class QbeeAccessReport { instanceId: string; timeout: number; private msec; maxCache: number; startUrl: string; reportUrl: string; isRecordCurrent: boolean; reportQueue: RecordingData[]; uvReportQueue: any; timer: any; private getToken?; private isThird; private lastUv; private lastRecord; constructor(option: Option); private init; setConfig(option: Option): void; isLayout(): boolean; private startRecording; handleLastPvReport(record: RecordingData): RecordingData[]; sendReport(sendType: SendType): Promise<{ status: true; msg: string; }>; resetSend(): void; private uuid; /** * 获取 location.search 参数 * @param defaultValue 默认值 */ getSearchParams(defaultValue?: { productId?: string; menuId?: string; }): { productId: string; menuId: string; dialogMsg: boolean; }; /** * 有 layout 的应用调用 * @param ev */ pushReportQueue(ev: { target: { location: Location; }; }): void; /** * 第三方应用调用 * @param route */ thirdPushReportQueue(route: Route): void; private handlerReportQueue; private hasProductAndMenu; private getResolutionType; paramsHandle(parsingPathArr: string[], locationData: Location): Route; private urlHandle; exitSendReport(): void; } export {};