UNPKG

ws-dottie

Version:

Your friendly TypeScript companion for Washington State transportation APIs - WSDOT and WSF data with smart caching and React Query integration

25 lines 1.14 kB
/** * @fileoverview Core Fetching Logic * * This module provides the core fetching orchestration logic that coordinates * URL building, transport selection, and logging. It eliminates duplication * between the four main fetch functions. */ import type { Endpoint, FetchStrategy, LoggingMode } from "../../types"; /** * Core fetch routine that handles URL building, transport selection, and logging * * This function provides the shared orchestration logic used by all four * fetch functions. It handles URL building, request execution, response * parsing, and logging. * * @template TInput - The input parameters type * @template TOutput - The output response type * @param endpoint - The API endpoint to call * @param params - Optional input parameters * @param logMode - Logging verbosity level * @param strategy - Fetch strategy to use * @returns Promise resolving to the response data */ export declare const fetchCore: <TInput = never, TOutput = unknown>(endpoint: Endpoint<TInput, TOutput>, params?: TInput, logMode?: LoggingMode, strategy?: FetchStrategy) => Promise<unknown>; //# sourceMappingURL=fetchCore.d.ts.map