/** * Input validation helpers for IBGE MCP Server */ export declare const UF_CODES: Set; export declare const REGION_CODES: Set; export declare const UF_SIGLAS: Record; /** * Validates if a string is a valid IBGE code */ export declare function isValidIbgeCode(code: string): boolean; /** * Normalizes a state input to its IBGE code, accepting sigla ("SP"), name * ("São Paulo", accent/case-insensitive) or code ("35") interchangeably. * Delegates to the single UF resolver in config.ts. */ export declare function normalizeUf(input: string): number | null; /** * A user-supplied date broken into its components. */ export interface ParsedDate { day: number; month: number; year: number; } /** * Parses a user-supplied date into its components. * * The canonical, recommended format is Brazilian `DD/MM/AAAA`. For convenience * we also accept `DD-MM-AAAA` (same day-first order) and ISO `AAAA-MM-DD`. * Month-first ordering (the old `MM-DD-AAAA`) is intentionally NOT accepted — it * is ambiguous for Brazilian users and silently produced wrong results. Each * tool re-emits the parsed date in whatever its upstream API requires; see * `toIbgeApiDate` (MM-DD-AAAA). * * Returns null if the input does not match a supported format or is out of range. */ export declare function parseUserDate(input: string): ParsedDate | null; /** * Formats a parsed date as `MM-DD-AAAA` — the (month-first) format the IBGE * notícias and calendário APIs expect. Confirmed empirically against the live API. */ export declare function toIbgeApiDate(d: ParsedDate): string; /** * Validates period format for SIDRA */ export declare function isValidPeriod(period: string): boolean; /** * Validates territorial level */ export declare function isValidTerritorialLevel(level: string): boolean; /** * Parses and validates locality codes */ export declare function parseLocalidades(input: string): { valid: string[]; invalid: string[]; }; /** * Validates CNAE code format */ export declare function isValidCnaeCode(code: string): boolean; /** * Formats validation error message */ export declare function formatValidationError(field: string, value: string, expected: string): string; //# sourceMappingURL=validation.d.ts.map