You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.5 KiB
38 lines
1.5 KiB
import Core, { Config, CoreApiConfig, SendOption, SendSuccess, SendFail, TraceType } from "../../core/src";
|
|
import { RequestSchedule } from './util/request-schedule';
|
|
import { SetDataConfig } from './interface';
|
|
declare type MpApiConfig = {
|
|
apiDetail?: boolean;
|
|
injectTraceHeader?: TraceType;
|
|
injectTraceUrls?: Array<string | RegExp>;
|
|
injectTraceIgnoreUrls?: Array<string | RegExp>;
|
|
ignoreHackReg?: RegExp;
|
|
} & CoreApiConfig;
|
|
export interface MpConfig extends Config {
|
|
reportApiSpeed?: boolean;
|
|
reportLoadPackageSpeed?: boolean;
|
|
setDataReportUrl?: string;
|
|
beforeReportSpeed?: Function;
|
|
onBeforeRequest?: Function;
|
|
offlineLog?: boolean;
|
|
offlineLogExp?: number;
|
|
offlineLogLimit?: number;
|
|
enableHttp2?: boolean;
|
|
setDataReportConfig?: SetDataConfig;
|
|
api?: MpApiConfig;
|
|
}
|
|
export default class Aegis extends Core {
|
|
static sessionID: string;
|
|
static asyncPluginIndex: number;
|
|
requestSchedule: RequestSchedule;
|
|
originRequest: <T extends string | Record<string, any> | ArrayBuffer = string | Record<string, any> | ArrayBuffer>(option: WechatMiniprogram.RequestOption<T>) => WechatMiniprogram.RequestTask;
|
|
speedLogPipeline: import("../../core/src").Pipeline<any, any>;
|
|
constructor(config: MpConfig);
|
|
get getBean(): string;
|
|
initRequestSchedule(): void;
|
|
request: (options: SendOption, success?: SendSuccess | undefined, fail?: SendFail | undefined) => void;
|
|
private sendRequest;
|
|
uploadLogs(params?: any, conds?: any): void;
|
|
reportPv(id: number): void;
|
|
}
|
|
export {};
|
|
|