import { AxiosInstance } from 'axios'; type MockBundleData = { enable: boolean; data: unknown; delay?: number; status?: number; isBinary?: boolean; }; type MockInterceptorOptions = { mockData: Record; enabled?: boolean | (() => boolean); onMockHit?: (url: string, method: string, mock: MockBundleData) => void; onBypass?: (url: string, method: string, reason: string) => void; }; type MockEnabledState = boolean | undefined; declare global { interface Window { __MOCK_ENABLED__?: MockEnabledState; } } declare class MockInterceptor { private options; constructor(options: MockInterceptorOptions); private normalizeUrlPath; /** * Check if mock is enabled */ isEnabled(): boolean; /** * Find matching mock data for the request * Supports both formats: * - "GET /api/v1/asset/xxx" (HTTP method + URL) * - "/api/v1/asset/xxx/get.js" (File path format from automock plugin) */ private findMock; /** * Determine if request should be mocked */ shouldMock(url: string, method: string, baseURL?: string): boolean; /** * Get mock data for request */ getMock(url: string, method: string, baseURL?: string): MockBundleData | null; /** * Setup axios interceptor */ setupAxios(axiosInstance: AxiosInstance): void; } /** * Create mock interceptor instance */ declare function createMockInterceptor(options: MockInterceptorOptions): MockInterceptor; /** * Load mock data from bundled JSON file */ declare function loadMockData(): Promise>; declare function initMockInterceptor(axiosInstance?: AxiosInstance): Promise; declare function setMockEnabled(enabled: boolean): void; declare function isMockEnabled(): boolean; type HttpInstance = { constructor: { axiosInstance: AxiosInstance; }; }; declare function registerHttpInstance(http: HttpInstance): void; declare function initMockInterceptorForPureHttp(): Promise; export { type MockBundleData, type MockInterceptorOptions, createMockInterceptor, initMockInterceptor, initMockInterceptorForPureHttp, isMockEnabled, loadMockData, registerHttpInstance, setMockEnabled };