import type { DevtoolsNotifier } from './notifier'; import type { DevtoolsStorage } from './storage'; interface HookContext { baseURL: string | URL; operationID: string; oAuth2Scopes: string[] | null; securitySource?: unknown | (() => Promise); retryConfig: unknown; resolvedSecurity: unknown | null; options: unknown; } type BeforeRequestContext = HookContext; type AfterSuccessContext = HookContext; type AfterErrorContext = HookContext; export declare class DevtoolsHooks { private storage; private notifier; private pendingRuns; private readonly STALE_RUN_TIMEOUT_MS; private readonly CAPTURED_OPERATIONS; constructor(storage: DevtoolsStorage, notifier: DevtoolsNotifier); /** * Clean up pending runs that have been waiting for more than STALE_RUN_TIMEOUT_MS */ private cleanupStaleRuns; /** * Check if operation should be captured */ private shouldCapture; /** * Map operation ID to operation type */ private mapOperation; /** * BeforeRequest hook - captures request data */ beforeRequest(ctx: BeforeRequestContext, request: Request): Promise; /** * AfterSuccess hook - captures response data */ afterSuccess(ctx: AfterSuccessContext, response: Response): Promise; /** * AfterError hook - captures error data */ afterError(ctx: AfterErrorContext, response: Response | null, error: unknown): Promise<{ response: Response | null; error: unknown; }>; } export {}; //# sourceMappingURL=hooks.d.ts.map