/**
 * 请求库主入口
 * 
 * 提供企业级、可扩展、类型安全的 HTTP 请求能力
 */ // 导出核心类型
export { RequestError, RequestErrorType, RequestErrorCode } from "./types";
// 导出请求客户端
export { RequestClient } from "./core/RequestClient";
export { adapterRegistry } from "./adapter/RequestAdapter";
export { fetchAdapter, kyAdapter, axiosAdapter } from "./adapter";
// undiciAdapter 使用懒加载，避免在未使用时触发依赖检查
export async function undiciAdapter() {
    const { undiciAdapter: adapter } = await import("./adapter");
    return adapter();
}
export { PluginManager, PluginLifecycleStage, PluginPriority } from "./plugin/RequestPlugin";
// 导出企业级插件
export { createCachePlugin, createRetryPlugin, createValidationPlugin, createMonitoringPlugin, createQueuePlugin } from "./plugin";
export { MonitoringEventType } from "./plugin";
// 导出运行时工具
export { createRequestContext, updateRequestContext, completeRequestContext, failRequestContext, cancelRequestContext } from "./runtime/RequestContext";
/**
 * 创建请求客户端实例
 * 
 * @param config - 请求客户端配置
 * @returns 请求客户端实例
 * 
 * @example
 * ```typescript
 * import { createRequestClient } from '@vlian/framework/request';
 * 
 * const client = createRequestClient({
 *   baseURL: 'https://api.example.com',
 *   defaultTimeout: 5000,
 *   plugins: [
 *     createCachePlugin(),
 *     createRetryPlugin(),
 *   ],
 * });
 * 
 * const response = await client.get<User>('/user/1');
 * ```
 */ export async function createRequestClient(config) {
    const { RequestClient } = await import("./core/RequestClient");
    const client = new RequestClient(config);
    await client.initialize();
    return client;
}

//# sourceMappingURL=index.js.map