export interface SendOption { url: string; method?: 'get' | 'post'; contentType?: string; data?: any; addBean?: boolean; // 发送send请求时是否需要拼接上bean from?: string; // 测速时from获取不准确,用作矫正 beanFilter?: string[]; // 不需要拼接的bean的key的数组 type?: SEND_TYPE; // 待发送的接口类型 } export enum SEND_TYPE { LOG = 'log', // 日志 SPEED = 'speed', // 接口和静态资源测速 PERFORMANCE = 'performance', // 页面测速 OFFLINE = 'offline', // 离线日志上传 WHITE_LIST = 'whiteList', // 白名单 VITALS = 'vitals', // vitals PV = 'pv', // pv CUSTOME_PV = 'customPV', // 自定义pv EVENT = 'event', // 自定义事件 CUSTOM = 'custom', // 自定义测速 SDK_ERROR = 'sdkError', // sdk报错 } export type SendSuccess = (data: any) => void; export type SendFail = (err: any) => void;