/** * Centralized configuration for IBGE MCP Server * Contains all constants, mappings, and endpoint definitions */ /** Default per-request timeout in milliseconds (upstream APIs are usually fast). */ export declare const DEFAULT_REQUEST_TIMEOUT_MS = 30000; /** * Effective request timeout, overridable at startup via the * `IBGE_MCP_TIMEOUT_MS` environment variable. Invalid or non-positive values * fall back to the default. Used as the default `timeoutMs` for every fetch. */ export declare const REQUEST_TIMEOUT_MS: number; export declare const API_ENDPOINTS: { readonly IBGE: { readonly LOCALIDADES: "https://servicodados.ibge.gov.br/api/v1/localidades"; readonly NOMES: "https://servicodados.ibge.gov.br/api/v2/censos/nomes"; readonly AGREGADOS: "https://servicodados.ibge.gov.br/api/v3/agregados"; readonly MALHAS: "https://servicodados.ibge.gov.br/api/v3/malhas"; readonly NOTICIAS: "https://servicodados.ibge.gov.br/api/v3/noticias"; readonly POPULACAO: "https://servicodados.ibge.gov.br/api/v1/projecoes/populacao"; readonly CNAE: "https://servicodados.ibge.gov.br/api/v2/cnae"; readonly CALENDARIO: "https://servicodados.ibge.gov.br/api/v3/calendario"; readonly PAISES: "https://servicodados.ibge.gov.br/api/v1/paises"; readonly PESQUISAS: "https://servicodados.ibge.gov.br/api/v1/pesquisas"; }; readonly SIDRA: "https://apisidra.ibge.gov.br/values"; }; /** * Brazilian states (UF) codes * Maps state abbreviation to IBGE code */ export declare const UF_CODES: Record; /** * Reverse mapping: IBGE code to state abbreviation */ export declare const UF_SIGLAS: Record; /** * State names by abbreviation */ export declare const UF_NAMES: Record; /** * Region codes */ export declare const REGION_CODES: Record; /** * Region names */ export declare const REGION_NAMES: Record; /** * States by region */ export declare const STATES_BY_REGION: Record; /** * SIDRA territorial level codes */ export declare const TERRITORIAL_LEVELS: { readonly BRASIL: "1"; readonly REGIAO: "2"; readonly UF: "3"; readonly MUNICIPIO: "6"; readonly REGIAO_METROPOLITANA: "7"; readonly MESORREGIAO: "8"; readonly MICRORREGIAO: "9"; readonly DISTRITO: "10"; readonly SUBDISTRITO: "11"; readonly RM_RIDE: "13"; readonly RIDE: "14"; readonly AGLOMERACAO_URBANA: "15"; readonly REGIAO_IMEDIATA: "17"; readonly REGIAO_INTERMEDIARIA: "18"; readonly MACRORREGIAO_SAUDE: "105"; readonly REGIAO_SAUDE: "106"; readonly AGLOMERADO_SUBNORMAL: "114"; readonly AMAZONIA_LEGAL: "127"; readonly SEMIARIDO: "128"; }; /** * Territorial level names (for display) */ export declare const TERRITORIAL_LEVEL_NAMES: Record; /** * Short, agent-facing label for each territorial level code. Used to build the * standardized `nivel_territorial` descriptions and error suggestions so the * naming stays consistent across every tool (Brasil/Região/UF/Município ...). */ export declare const TERRITORIAL_LEVEL_LABELS: Record; /** All SIDRA territorial level codes, in canonical order. */ export declare const ALL_TERRITORIAL_LEVELS: string[]; /** * Builds the standardized `nivel_territorial` field description from the level * codes a tool supports, e.g. ["1","2","3","6"] -> * "Nível territorial (código N): 1=Brasil, 2=Região, 3=UF, 6=Município". */ export declare function territorialLevelHint(codes: string[]): string; /** * Builds a "código (Label)" list for error suggestions, e.g. * "1 (Brasil), 2 (Região), 3 (UF), 6 (Município)". */ export declare function territorialLevelList(codes: string[]): string; export declare const BIOME_CODES: Record; export declare const BIOME_NAMES: Record; /** * Commonly used SIDRA table codes with descriptions */ export declare const SIDRA_TABLES: { readonly POPULACAO_ESTIMATIVA: "6579"; readonly POPULACAO_CENSO_2022: "9514"; readonly POPULACAO_CENSOS_HISTORICO: "200"; readonly PIB_CORRENTE: "6706"; readonly PIB_PER_CAPITA: "5938"; readonly AREA_TERRITORIAL: "1705"; readonly DENSIDADE_DEMOGRAFICA: "1712"; readonly TAXA_DESOCUPACAO: "4714"; readonly RENDIMENTO_MEDIO: "6381"; readonly IPCA_MENSAL: "1737"; readonly IPCA_ACUMULADO: "1736"; readonly ALFABETIZACAO: "4312"; readonly DOMICILIOS: "4311"; }; /** * Regex patterns for validation */ export declare const VALIDATION_PATTERNS: { readonly IBGE_CODE_MUNICIPIO: RegExp; readonly IBGE_CODE_UF: RegExp; readonly IBGE_CODE_REGIAO: RegExp; readonly IBGE_CODE_DISTRITO: RegExp; readonly DATE_BR: RegExp; readonly DATE_IBGE: RegExp; readonly DATE_ISO: RegExp; readonly CNAE_CODE: RegExp; }; export declare const DEFAULTS: { readonly PAGINATION: { readonly PAGE: 1; readonly PAGE_SIZE: 20; readonly MAX_PAGE_SIZE: 100; }; readonly CACHE_TTL: { readonly STATIC: number; readonly MEDIUM: 60; readonly SHORT: 15; readonly REALTIME: 1; }; readonly QUALITY: { readonly MESH_QUALITY: "4"; readonly MESH_RESOLUTION: "0"; }; }; /** * Check if a string is a valid UF code */ export declare function isValidUf(uf: string): boolean; /** * Get UF code from abbreviation */ export declare function getUfCode(uf: string): number | undefined; /** * Get UF abbreviation from code */ export declare function getUfSigla(code: number): string | undefined; /** * Normalizes free text for matching: lowercased, trimmed, internal whitespace * collapsed, and accents stripped (e.g. "São Paulo " -> "sao paulo"). */ export declare function normalizeText(text: string): string; /** * Normalized state name -> sigla (e.g. "sao paulo" -> "SP"). */ export declare const UF_NAME_TO_SIGLA: Record; export interface ResolvedUf { code: number; sigla: string; nome: string; } /** * Resolves a state (UF) from any of its three forms, interchangeably: * - sigla: "SP" / "sp" * - nome: "São Paulo" / "sao paulo" (accent- and case-insensitive) * - código: "35" / 35 * * Single source of truth for UF input resolution — tools should accept all * three forms by routing user input through this helper. Returns null if the * input matches none of them. */ export declare function resolveUf(input: string | number): ResolvedUf | null; /** * Get region code from state abbreviation */ export declare function getRegionFromUf(uf: string): number | undefined; /** * Validate IBGE code by length */ export declare function validateIbgeCode(code: string): { valid: boolean; type?: "regiao" | "uf" | "municipio" | "distrito"; message?: string; }; //# sourceMappingURL=config.d.ts.map