ws-dottie
Version:
Your friendly TypeScript companion for Washington State transportation APIs - WSDOT and WSF data with smart caching and React Query integration
32 lines • 1.53 kB
TypeScript
/**
* @fileoverview API Request Execution for WS-Dottie CLI
*
* This module handles the execution of API requests with different fetch strategies
* based on CLI options. It provides a single function that uses the new fetchDottie
* function with appropriate options based on the --jsonp and --no-validation flags.
*/
import type { Endpoint } from "../shared/types";
import type { CliOptions } from "./types";
/**
* Executes API requests using the new fetchDottie function with CLI options
*
* This function uses the unified fetchDottie function with options derived from
* the --jsonp and --no-validation flags, providing a single interface that can
* handle all fetch strategies.
*
* @template I - The input parameters type for the endpoint
* @template O - The output response type for the endpoint
* @param endpoint - Endpoint definition with schemas and configuration
* @param params - Parameters to send with the request
* @param options - CLI options including transport and validation flags
* @returns Promise resolving to API response data
*/
export declare const executeApiRequest: <I, O>(endpoint: Endpoint<I, O>, params: I, options: CliOptions) => Promise<unknown>;
/**
* Gets a human-readable description of the fetch strategy based on options
*
* @param options - CLI options containing transport and validation flags
* @returns String description of the strategy being used
*/
export declare const getStrategyDescription: (options: CliOptions) => string;
//# sourceMappingURL=execution.d.ts.map