ws-dottie
Version:
Your friendly TypeScript companion for Washington State transportation APIs - WSDOT and WSF data with smart caching and React Query integration
28 lines • 1.23 kB
TypeScript
/**
* @fileoverview Parameter Processing for WS-Dottie CLI
*
* This module provides parameter processing utilities for the CLI tool,
* including JSON parsing with date coercion and default value application.
* Validation is handled by the fetching layer, not here.
*/
import type { Endpoint } from "../shared/types";
import type { CliParams } from "./types";
/**
* Processes parameters from command line input
*
* This function handles the parameter processing workflow:
* 1. Parses JSON parameters (no special date coercion needed)
* 2. Applies default values from endpoint sample parameters
*
* Note: Parameter validation is handled by the fetching layer,
* not in the CLI. This keeps concerns properly separated.
*
* @template I - The input parameters type for the endpoint
* @template O - The output response type for the endpoint
* @param params - JSON string of parameters from command line
* @param endpoint - Endpoint definition containing defaults
* @returns Processed parameters object ready for API calls
* @throws Error if parameters are invalid JSON
*/
export declare const processParameters: <I, O>(params: string, endpoint: Endpoint<I, O>) => CliParams;
//# sourceMappingURL=validation.d.ts.map