/// import { RealtimeLog } from "./module/realtime-log"; import type limitObj from "../../index"; import { LocalLog } from "./module/local-log"; interface IOptions { open: 1 | 0 | true | false; disableWeData: 1 | 0 | true | false; errCodes: { codeKey: string; errCode: string | number; }[]; httpCodes: { statusCode: number; }[]; bisDomains: string[]; restfulApis: string[]; ignore: string[]; } export default class ReportErrorLogPlugin { name: string; core: typeof limitObj; options: IOptions; defaultOptions: IOptions; hadReportSystemInfo: boolean; hadReportLaunchPage: boolean; memoryWarngings: { level?: WechatMiniprogram.OnMemoryWarningCallbackResult['level']; route?: string; }[]; realtimeLog: RealtimeLog; localLog: LocalLog; constructor({ core, options }: { core: any; options: any; }); install({ core }: { core: any; }): (string | ReportErrorLogPlugin)[]; setOptions(options: IOptions): void; onInit(): void; addCoreMethods(): void; onUpdateOptions(): void; isOpen(): boolean; isDisableWeData(): boolean; isStrIgnore(string?: string): boolean; reportWeData(eventName: any, eventData: any): void; reportSystemInfo(): void; onPageTapEvent(event: any): void; onPageRouteEvent(res: any): void; onMemoryWarning(): void; reportRealtimeMemoryWarnging(): void; onError(): void; /** * 请求发起前触发 */ onBeforeRequest({ request }: { request: any; }): Promise; checkIsHitStatusCode(statusCode: any): boolean; checkIsHitBisCode(data: any): boolean; getBisCode(data: any): string | null; getUsefulProfile(profile: any): { domainLookup: number; connect: number; SSLconnection: number; request: number; response: number; rtt: any; estimate_nettype: any; httpRttEstimate: any; transportRttEstimate: any; downstreamThroughputKbpsEstimate: any; throughputKbps: any; peerIP: any; socketReused: any; sendBytesCount: any; receivedBytedCount: any; protocol: any; }; isUrlInDomains(url: string): boolean; /** * 请求成功后触发 */ onRequestSuccess({ request, response, costTime }: { request: any; response: any; costTime: any; }): Promise<{ request: any; response: any; }>; /** * 请求失败时触发,一般是由于用户网络弱,导致请求超时 */ onRequestFail({ request, error, costTime }: { request: any; error: any; costTime: any; }): Promise; /** * 写入缓存/命中缓存/被动限流/主动限流时触发 */ globalHandler(type: any, params: any): void; } export {};