/**
 * 请求库主入口
 * 
 * 提供企业级、可扩展、类型安全的 HTTP 请求能力
 */ // 导出核心类型
"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: Object.getOwnPropertyDescriptor(all, name).get
    });
}
_export(exports, {
    get MonitoringEventType () {
        return _plugin.MonitoringEventType;
    },
    get PluginLifecycleStage () {
        return _RequestPlugin.PluginLifecycleStage;
    },
    get PluginManager () {
        return _RequestPlugin.PluginManager;
    },
    get PluginPriority () {
        return _RequestPlugin.PluginPriority;
    },
    get RequestClient () {
        return _RequestClient.RequestClient;
    },
    get RequestError () {
        return _types.RequestError;
    },
    get RequestErrorCode () {
        return _types.RequestErrorCode;
    },
    get RequestErrorType () {
        return _types.RequestErrorType;
    },
    get adapterRegistry () {
        return _RequestAdapter.adapterRegistry;
    },
    get axiosAdapter () {
        return _adapter.axiosAdapter;
    },
    get cancelRequestContext () {
        return _RequestContext.cancelRequestContext;
    },
    get completeRequestContext () {
        return _RequestContext.completeRequestContext;
    },
    get createCachePlugin () {
        return _plugin.createCachePlugin;
    },
    get createMonitoringPlugin () {
        return _plugin.createMonitoringPlugin;
    },
    get createQueuePlugin () {
        return _plugin.createQueuePlugin;
    },
    get createRequestClient () {
        return createRequestClient;
    },
    get createRequestContext () {
        return _RequestContext.createRequestContext;
    },
    get createRetryPlugin () {
        return _plugin.createRetryPlugin;
    },
    get createValidationPlugin () {
        return _plugin.createValidationPlugin;
    },
    get failRequestContext () {
        return _RequestContext.failRequestContext;
    },
    get fetchAdapter () {
        return _adapter.fetchAdapter;
    },
    get kyAdapter () {
        return _adapter.kyAdapter;
    },
    get undiciAdapter () {
        return undiciAdapter;
    },
    get updateRequestContext () {
        return _RequestContext.updateRequestContext;
    }
});
const _types = require("./types");
const _RequestClient = require("./core/RequestClient");
const _RequestAdapter = require("./adapter/RequestAdapter");
const _adapter = require("./adapter");
const _RequestPlugin = require("./plugin/RequestPlugin");
const _plugin = require("./plugin");
const _RequestContext = require("./runtime/RequestContext");
function _getRequireWildcardCache(nodeInterop) {
    if (typeof WeakMap !== "function") return null;
    var cacheBabelInterop = new WeakMap();
    var cacheNodeInterop = new WeakMap();
    return (_getRequireWildcardCache = function(nodeInterop) {
        return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
    })(nodeInterop);
}
function _interop_require_wildcard(obj, nodeInterop) {
    if (!nodeInterop && obj && obj.__esModule) {
        return obj;
    }
    if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
        return {
            default: obj
        };
    }
    var cache = _getRequireWildcardCache(nodeInterop);
    if (cache && cache.has(obj)) {
        return cache.get(obj);
    }
    var newObj = {
        __proto__: null
    };
    var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
    for(var key in obj){
        if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
            var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
            if (desc && (desc.get || desc.set)) {
                Object.defineProperty(newObj, key, desc);
            } else {
                newObj[key] = obj[key];
            }
        }
    }
    newObj.default = obj;
    if (cache) {
        cache.set(obj, newObj);
    }
    return newObj;
}
async function undiciAdapter() {
    const { undiciAdapter: adapter } = await Promise.resolve().then(()=>/*#__PURE__*/ _interop_require_wildcard(require("./adapter")));
    return adapter();
}
async function createRequestClient(config) {
    const { RequestClient } = await Promise.resolve().then(()=>/*#__PURE__*/ _interop_require_wildcard(require("./core/RequestClient")));
    const client = new RequestClient(config);
    await client.initialize();
    return client;
}

//# sourceMappingURL=index.js.map