import { wait } from '@logosdx/utils'; import type { HttpMethods, FetchResponse, DictAndT } from '../types.ts'; import type { CallConfig } from '../options/types.ts'; import type { FetchEngineCore, InternalReqOptions } from './types.ts'; import { FetchPromise } from './fetch-promise.ts'; /** * Handles request execution with the hook-based pipeline. * * The RequestExecutor builds normalized request options and runs them * through the 3-phase pipeline: * 1. `beforeRequest` (run) - plugins can modify args or short-circuit * 2. `execute` (pipe) - onion-wrapped execution (retry, dedupe, etc.) * 3. `afterRequest` (run) - plugins can modify or cache the response * * @template S - Instance state type * @template H - Headers type * @template P - Params type */ export declare class RequestExecutor { /** Reference to the FetchEngine instance */ engine: FetchEngineCore; constructor(engine: FetchEngineCore); /** * Get base URL from engine options. */ get baseUrl(): string; /** * Get default type from engine options. */ get defaultType(): 'json' | 'text' | 'blob' | 'arrayBuffer'; /** * Execute a request with the full lifecycle: timeout, options building, pipeline. * * This is the main entry point called by FetchEngine HTTP methods. */ execute(method: HttpMethods, path: string, payloadOrOptions?: Data | CallConfig, options?: CallConfig): FetchPromise, DictAndT

, ResHdr>; /** * Build normalized request options from method/path/options. */ makeRequestOptions(_method: HttpMethods, path: string, options: CallConfig & { payload?: unknown; controller: AbortController; attemptTimeout?: number | undefined; getTotalTimeoutFired?: (() => boolean) | undefined; }): InternalReqOptions; /** * Determine response type based on content-type header. */ determineType(response: Response): { type: 'json' | 'text' | 'blob' | 'arrayBuffer'; isJson: boolean; isRecognized: boolean; }; /** * Makes an API call using fetch and returns enhanced response object. */ makeCall(options: InternalReqOptions): Promise, DictAndT

, ResHdr>>; /** * Executes a request through the 3-phase hook pipeline. * * 1. beforeRequest (run) - plugins can modify args or short-circuit with cached response * 2. execute (pipe) - onion-wrapped execution (retry wraps dedupe wraps makeCall) * 3. afterRequest (run) - plugins can modify response or store in cache */ executeRequest(normalizedOpts: InternalReqOptions, totalTimeout: ReturnType | undefined): Promise, DictAndT

, ResHdr>>; }