import { RequestEventType, RequestProgressEventType, RequestResponseEventType } from '../managers'; import { RequestInstance } from './request.types'; type HookName = "onBeforeSent" | "onRequestStart" | "onResponseStart" | "onUploadProgress" | "onDownloadProgress" | "onResponse" | "onRemove"; export interface RequestHooks { onBeforeSent: (cb: (eventData: RequestEventType) => void) => () => void; onRequestStart: (cb: (eventData: RequestEventType) => void) => () => void; onResponseStart: (cb: (eventData: RequestEventType) => void) => () => void; onUploadProgress: (cb: (eventData: RequestProgressEventType) => void) => () => void; onDownloadProgress: (cb: (eventData: RequestProgressEventType) => void) => () => void; onResponse: (cb: (eventData: RequestResponseEventType) => void) => () => void; onRemove: (cb: (eventData: RequestEventType) => void) => () => void; /** @internal Invoke all registered listeners for a given hook */ __emit: (name: HookName, data: any) => void; /** @internal Get a snapshot of all registered listeners (used by clone) */ __snapshot: () => Record void>>; } export declare function createRequestHooks(initial?: Record void>>): RequestHooks; export {}; //# sourceMappingURL=request.hooks.d.ts.map