import { Plugin } from 'vite'; export { MockBundleData as ClientMockBundleData, MockInterceptorOptions, createMockInterceptor, initMockInterceptor, initMockInterceptorForPureHttp, isMockEnabled, loadMockData, registerHttpInstance, setMockEnabled } from './client/index.js'; import 'axios'; interface InspectorOptions { route?: string; enableToggle?: boolean; } interface AutomockPluginOptions { /** Directory for mock files, default "mock". */ mockDir?: string; /** API path prefix handled by automock, default "/api". */ apiPrefix?: string; /** Rewrite request path before proxying to proxyBaseUrl. */ pathRewrite?: (path: string) => string; /** Real backend base URL. Required only when automock proxy/capture is used. */ proxyBaseUrl?: string; inspector?: boolean | InspectorOptions; /** Client-side production mock switch. Default false; "auto" enables outside production mode. */ productionMock?: boolean | 'auto'; /** Global switch, default true. When false, middleware passes through all requests without proxy/capture. */ enabled?: boolean; /** Whether to proxy unmatched requests to proxyBaseUrl, default true. */ proxy?: boolean; /** Whether to capture and save JSON proxy responses as mock files, default true. */ capture?: boolean; } interface MockFileConfig { enable: boolean; data: unknown; delay: number; status: number; [key: string]: unknown; } interface MockFileInfo { config: MockFileConfig; serializable: boolean; hasDynamicData: boolean; headerComment?: string; description?: string; dataText: string; isBinary?: boolean; } declare function saveMockData(url: string, method: string, data: Buffer | string, rootDir: string, statusCode?: number, contentType?: string): Promise; declare function buildMockIndex(mockDir: string): Promise>; declare function parseMockModule(filePath: string): Promise; declare function writeMockFile(filePath: string, mockInfo: Pick): Promise; interface MockBundleData { enable: boolean; data: unknown; delay: number; status: number; isBinary?: boolean; } interface MockBundle { [key: string]: MockBundleData; } interface BundleOptions { mockDir: string; includeDisabled?: boolean; log?: boolean; } declare function bundleMockFiles(options: BundleOptions): Promise; declare function writeMockBundle(bundle: MockBundle, outputPath: string): void; interface AutomockWithBundleOptions extends AutomockPluginOptions { bundleMockData?: boolean; bundleOutputPath?: string; } declare function automock(options?: AutomockWithBundleOptions): Plugin; export { type AutomockPluginOptions, type AutomockWithBundleOptions, type InspectorOptions, type MockBundle, type MockBundleData, automock, buildMockIndex, bundleMockFiles, parseMockModule, saveMockData, writeMockBundle, writeMockFile };