import { type ErrorResponse } from '@scalar/helpers/errors/normalize-error'; import type { HttpMethod } from '@scalar/helpers/http/http-methods'; import type { ClientPlugin } from '@scalar/oas-utils/helpers'; import type { RequestPayload } from '@scalar/workspace-store/request-example'; /** A single set of populated values for a sent request */ export type ResponseInstance = Omit & { /** Store headers as an object to match what we had with axios */ headers: Record; /** Keys of headers which set cookies */ cookieHeaderKeys: string[]; /** Time in ms the request took */ duration: number; /** The response status */ status: number; /** The response status text */ statusText: string; /** The response method */ method: HttpMethod; /** The request path */ path: string; } & ({ /** The response data */ data: string | Blob; /** The response size in bytes */ size: number; } | { /** A stream reader for a streamable response body */ reader: ReadableStreamDefaultReader; }); /** Custom fetch function signature compatible with the global fetch API */ export type CustomFetch = typeof fetch; /** * Execute the built fetch request and return a structured response. * * This function handles the complete request lifecycle including plugin hooks, * response processing, streaming detection, and error handling. It supports both * standard responses and server-sent event streams. * * @param request - The request built by the buildRequest helper * @param operation - The OpenAPI operation being executed * @param plugins - Array of client plugins to execute hooks * @param isUsingProxy - Whether the request is being proxied for header handling * @returns A tuple with either an error or the response data */ export declare const sendRequest: ({ isUsingProxy, requestPayload, plugins, customFetch, }: { isUsingProxy: boolean; requestPayload: RequestPayload; /** Registered client plugins for custom content type handling */ plugins?: ClientPlugin[]; /** Optional custom fetch implementation, overrides the global fetch */ customFetch?: CustomFetch; }) => Promise>; //# sourceMappingURL=send-request.d.ts.map