import { detectPlatform } from '../adaptor'; declare const env: any; export declare type WxApi = Extract; declare type PlatformType = ReturnType; export declare type CloudApi = PlatformType extends 'my' ? 'createCloudContext' : 'callFunction' | 'callContainer'; export declare type HackApi = WxApi | CloudApi; export interface ReqOption { aegisRequestStartTime: number; apiName: HackApi; getCurrentFrom?: () => string; } export interface HackApiCallback { apiName?: HackApi; getCurrentFrom?: () => string; onStart?: (options: RequestOption) => void; success?: (res: SucessRes, options: RequestOption, from?: string) => void; fail?: (err: FailRes, options: RequestOption, from?: string) => void; complete?: (err: SucessRes | FailRes, options: RequestOption, from?: string) => void; } export declare type HackApiCallbackOption = ReqOption & HackApiCallback; export default abstract class HackApiCore { apiName?: string; private callbacks; private isOverride; constructor(cb: U); addCallback(cb: U): void; protected prefixHandler(opts: T): T & { aegisRequestStartTime: number; }; protected onStartHandler(opts: T): void; protected successHandler(res: R, opts: T, from?: string): void; protected failHandler(res: R, opts: T, from?: string): void; protected completeHandler(res: R, opts: T, from?: string): void; protected getCurrentFormFromCallbacks(): string | undefined; private override; protected abstract defineApiProperty(): void; } export {};