/** * Client configuration types and helpers. */ /** * Configuration options for the CommonGrants client. * * Values can be provided directly or via environment variables: * - `CG_API_BASE_URL` - Base URL of the API * - `CG_API_TIMEOUT` - Request timeout in milliseconds * - `CG_API_PAGE_SIZE` - Default page size for list operations * - `CG_API_LIST_ITEMS_LIMIT` - Maximum items to fetch when auto-paginating */ export interface ClientConfig { /** Base URL of the API (e.g., "https://api.example.org"). Falls back to CG_API_BASE_URL env var. */ baseUrl?: string; /** Request timeout in milliseconds (default: 30000). Falls back to CG_API_TIMEOUT env var. */ timeout?: number; /** Default page size for list operations (default: 100). Falls back to CG_API_PAGE_SIZE env var. */ pageSize?: number; /** Maximum items to fetch when auto-paginating (default: 1000). Falls back to CG_API_LIST_ITEMS_LIMIT env var. */ maxItems?: number; } /** * Resolved configuration with all defaults applied. */ export interface ResolvedConfig { baseUrl: string; timeout: number; pageSize: number; maxItems: number; } /** * Resolves client config with defaults and environment variable fallbacks. * * @throws {Error} If baseUrl is not provided and CG_API_BASE_URL is not set * @throws {Error} If baseUrl is not a valid URL using http:// or https:// */ export declare function resolveConfig(config: ClientConfig): ResolvedConfig; //# sourceMappingURL=config.d.ts.map