import { type HttpClientConfig } from './options.js'; import type { HttpClientOptions } from './options.js'; import { type Gql } from './gql/plugin.js'; import { type Ws } from './ws.js'; import { type Restful } from './restful.js'; /** HTTP client 插件 */ export type HttpClientPlugin = (client: HttpClient) => HttpClient & TExtends; /** HTTP client */ export declare class HttpClient { /** 创建 HTTP 配置 */ static createConfig(options?: HttpClientOptions): HttpClientConfig; constructor(options?: HttpClientOptions); /** 已加载的插件 */ protected readonly _plugins: Set>; /** 已加载的插件 */ get plugins(): ReadonlyArray>; /** 加载插件 */ use(plugin: HttpClientPlugin): this & T; /** 配置 */ readonly config: HttpClientConfig; private __gql?; /** * 发送 gql 请求 * * 可预期的异常包括 `RequestError` `RequestResponseError` 和 `GraphqlError` */ get gql(): Gql; private __restful?; /** * 发送 restful 请求 * * 可预期的异常包括 `RequestError` 和 `RequestResponseError` */ get restful(): Restful; private __ws?; /** 创建 WebSocket */ get ws(): Ws; } export { type RequestResponse, RequestError, RequestResponseError } from './request.js'; export type { HttpClientOptions, HttpFetcher, HttpClientConfig } from './options.js'; export * from './gql/index.js'; export type { Gql } from './gql/plugin.js'; export { type RestfulResponse, type Restful } from './restful.js'; export { type Ws } from './ws.js'; //# sourceMappingURL=index.d.ts.map