🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

infomance

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

infomance - npm Package Compare versions

Comparing version
1.0.0
to
1.1.0
+21
LICENSE
MIT License
Copyright (c) 2026 Infomance
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+415
-1

@@ -258,2 +258,151 @@ interface Pagination {

type ExportFormat = 'json' | 'csv' | 'xlsx';
/** Supported countries for European data */
type EuropeanCountry = 'pt' | 'fr' | 'de' | 'nl' | 'it' | 'es' | 'be' | 'at';
/** GeoJSON Feature for geographic data */
interface GeoJSONFeature {
type: 'Feature';
properties: Record<string, unknown>;
geometry: {
type: string;
coordinates: unknown;
};
}
/** GeoJSON FeatureCollection */
interface GeoJSONFeatureCollection {
type: 'FeatureCollection';
features: GeoJSONFeature[];
}
interface PortugalMunicipality {
dicofre: string;
name: string;
distrito: string;
region: 'Continental' | 'Açores' | 'Madeira';
area_km2?: number;
population?: number;
}
interface PortugalMunicipalityParams {
distrito?: string;
region?: 'continental' | 'acores' | 'madeira';
simplify?: number;
limit?: number;
offset?: number;
}
interface FranceCommune {
code_insee: string;
nom: string;
code_departement: string;
code_region: string;
population?: number;
area_km2?: number;
}
interface FranceCommuneParams {
departement?: string;
region?: string;
limit?: number;
offset?: number;
}
interface GermanyGemeinde {
ags: string;
ars: string;
name: string;
bundesland: string;
kreis?: string;
population?: number;
area_km2?: number;
}
interface GermanyGemeindeParams {
bundesland?: string;
kreis?: string;
limit?: number;
offset?: number;
}
interface NetherlandsGemeente {
statcode: string;
statnaam: string;
province?: string;
population?: number;
area_km2?: number;
}
interface NetherlandsGemeenteParams {
province?: string;
limit?: number;
offset?: number;
}
interface ItalyComune {
pro_com: string;
comune: string;
provincia?: string;
regione?: string;
population?: number;
area_km2?: number;
}
interface ItalyComuneParams {
regione?: string;
provincia?: string;
limit?: number;
offset?: number;
}
interface SpainMunicipio {
codigo_ine: string;
nombre: string;
provincia?: string;
comunidad_autonoma?: string;
population?: number;
area_km2?: number;
}
interface SpainMunicipioParams {
comunidad?: string;
provincia?: string;
limit?: number;
offset?: number;
}
/** EU Country from /api/v1/eu/countries */
interface EUCountry {
code: string;
name: string;
lau_count: number;
population?: number;
area_km2?: number;
}
/** EU LAU Municipality from /api/v1/eu/lau */
interface EULAUMunicipality {
lau_id: string;
name: string;
country_code: string;
nuts3_code?: string;
population?: number;
population_density?: number;
area_km2?: number;
gdp_per_capita?: number;
unemployment_rate?: number;
data_completeness?: number;
}
/** EU NUTS Region from /api/v1/eu/nuts */
interface EUNUTSRegion {
code: string;
name: string;
level: number;
country_code: string;
parent_code?: string;
lau_count?: number;
population?: number;
area_km2?: number;
}
/** Parameters for listing EU LAU municipalities */
interface EULAUParams {
country?: string;
nuts3?: string;
min_population?: number;
max_population?: number;
limit?: number;
offset?: number;
}
/** Parameters for listing EU NUTS regions */
interface EUNUTSParams {
country?: string;
level?: number;
parent?: string;
limit?: number;
offset?: number;
}

@@ -847,4 +996,269 @@ /**

exportToExcel(path: string, params?: Record<string, unknown>, options?: RequestOptions): Promise<Blob>;
/**
* Lists Portuguese municipalities with boundaries.
*
* Returns all 308 Portuguese municipalities (Continental + Açores + Madeira)
* as GeoJSON FeatureCollection for choropleth maps.
*
* @param params - Filter parameters
* @param params.distrito - Filter by district (Lisboa, Porto, Faro, etc.)
* @param params.region - Filter by region (continental, acores, madeira)
* @param params.simplify - Geometry simplification tolerance (0.001-0.1)
* @param params.limit - Maximum results (default: 310)
* @param params.offset - Pagination offset
* @param options - Request options
* @returns GeoJSON FeatureCollection with municipality boundaries
*
* @example
* ```typescript
* // Get all Portuguese municipalities
* const municipalities = await client.getPortugalMunicipalities();
*
* // Get only Lisbon district
* const lisbon = await client.getPortugalMunicipalities({ distrito: 'Lisboa' });
* ```
*/
getPortugalMunicipalities(params?: PortugalMunicipalityParams, options?: RequestOptions): Promise<GeoJSONFeatureCollection>;
/**
* Gets a single Portuguese municipality by DICOFRE code.
*
* @param dicofre - DICOFRE municipality code (e.g., "0806" for Odemira)
* @param options - Request options
* @returns GeoJSON Feature with municipality boundary and properties
* @throws {NotFoundError} If the municipality is not found
*
* @example
* ```typescript
* const odemira = await client.getPortugalMunicipality('0806');
* console.log(odemira.properties.name);
* ```
*/
getPortugalMunicipality(dicofre: string, options?: RequestOptions): Promise<GeoJSONFeature>;
/**
* Gets Portuguese district boundaries.
*
* Returns all 18 Portuguese districts as GeoJSON FeatureCollection.
*
* @param options - Request options
* @returns GeoJSON FeatureCollection with district boundaries
*/
getPortugalDistricts(options?: RequestOptions): Promise<GeoJSONFeatureCollection>;
/**
* Lists French communes with boundaries.
*
* Returns French municipalities as GeoJSON FeatureCollection.
* France has ~35,000 communes across 101 départements and 18 régions.
*
* @param params - Filter parameters
* @param params.departement - Filter by département code (75, 13, etc.)
* @param params.region - Filter by région code
* @param params.limit - Maximum results
* @param params.offset - Pagination offset
* @param options - Request options
* @returns GeoJSON FeatureCollection with commune boundaries
*
* @example
* ```typescript
* // Get communes in Paris département
* const paris = await client.getFranceCommunes({ departement: '75' });
* ```
*/
getFranceCommunes(params?: FranceCommuneParams, options?: RequestOptions): Promise<GeoJSONFeatureCollection>;
/**
* Gets a single French commune by INSEE code.
*
* @param codeInsee - INSEE commune code (e.g., "75056" for Paris)
* @param options - Request options
* @returns GeoJSON Feature with commune boundary
*/
getFranceCommune(codeInsee: string, options?: RequestOptions): Promise<GeoJSONFeature>;
/**
* Lists German municipalities (Gemeinden) with boundaries.
*
* Returns German municipalities as GeoJSON FeatureCollection.
* Germany has ~11,000 Gemeinden across 401 Kreise and 16 Bundesländer.
*
* @param params - Filter parameters
* @param params.bundesland - Filter by federal state (Bayern, Sachsen, etc.)
* @param params.kreis - Filter by district
* @param params.limit - Maximum results
* @param params.offset - Pagination offset
* @param options - Request options
* @returns GeoJSON FeatureCollection with Gemeinde boundaries
*/
getGermanyGemeinden(params?: GermanyGemeindeParams, options?: RequestOptions): Promise<GeoJSONFeatureCollection>;
/**
* Gets a single German municipality by AGS code.
*
* @param ags - Amtlicher Gemeindeschlüssel (8 digits)
* @param options - Request options
* @returns GeoJSON Feature with Gemeinde boundary
*/
getGermanyGemeinde(ags: string, options?: RequestOptions): Promise<GeoJSONFeature>;
/**
* Lists Dutch municipalities (Gemeenten) with boundaries.
*
* Returns Dutch municipalities as GeoJSON FeatureCollection.
* Netherlands has 342 gemeenten across 12 provinces.
*
* @param params - Filter parameters
* @param params.province - Filter by province
* @param params.limit - Maximum results
* @param params.offset - Pagination offset
* @param options - Request options
* @returns GeoJSON FeatureCollection with Gemeente boundaries
*/
getNetherlandsGemeenten(params?: NetherlandsGemeenteParams, options?: RequestOptions): Promise<GeoJSONFeatureCollection>;
/**
* Gets a single Dutch municipality by CBS code.
*
* @param statcode - CBS gemeentecode
* @param options - Request options
* @returns GeoJSON Feature with Gemeente boundary
*/
getNetherlandsGemeente(statcode: string, options?: RequestOptions): Promise<GeoJSONFeature>;
/**
* Lists Italian municipalities (Comuni) with boundaries.
*
* Returns Italian municipalities as GeoJSON FeatureCollection.
* Italy has ~8,000 comuni across 107 province and 20 regioni.
*
* @param params - Filter parameters
* @param params.regione - Filter by region
* @param params.provincia - Filter by province
* @param params.limit - Maximum results
* @param params.offset - Pagination offset
* @param options - Request options
* @returns GeoJSON FeatureCollection with Comune boundaries
*/
getItalyComuni(params?: ItalyComuneParams, options?: RequestOptions): Promise<GeoJSONFeatureCollection>;
/**
* Gets a single Italian municipality by ISTAT code.
*
* @param proCom - ISTAT comune code
* @param options - Request options
* @returns GeoJSON Feature with Comune boundary
*/
getItalyComune(proCom: string, options?: RequestOptions): Promise<GeoJSONFeature>;
/**
* Lists Spanish municipalities (Municipios) with boundaries.
*
* Returns Spanish municipalities as GeoJSON FeatureCollection.
* Spain has ~8,000 municipios across 52 provinces and 17 comunidades autónomas.
*
* @param params - Filter parameters
* @param params.comunidad - Filter by autonomous community
* @param params.provincia - Filter by province
* @param params.limit - Maximum results
* @param params.offset - Pagination offset
* @param options - Request options
* @returns GeoJSON FeatureCollection with Municipio boundaries
*/
getSpainMunicipios(params?: SpainMunicipioParams, options?: RequestOptions): Promise<GeoJSONFeatureCollection>;
/**
* Gets a single Spanish municipality by INE code.
*
* @param codigoIne - INE municipio code
* @param options - Request options
* @returns GeoJSON Feature with Municipio boundary
*/
getSpainMunicipio(codigoIne: string, options?: RequestOptions): Promise<GeoJSONFeature>;
/**
* Lists all EU countries with LAU coverage.
*
* Returns summary information for all 34 EU/EEA countries
* including LAU municipality counts.
*
* @param options - Request options
* @returns Array of EU countries with LAU counts
*
* @example
* ```typescript
* const countries = await client.getEUCountries();
* console.log(countries.length); // 34
* countries.forEach(c => console.log(`${c.name}: ${c.lau_count} LAUs`));
* ```
*/
getEUCountries(options?: RequestOptions): Promise<EUCountry[]>;
/**
* Lists EU LAU municipalities with optional filtering.
*
* Returns municipalities (Local Administrative Units) across
* all EU/EEA countries. Use filters to narrow results by country,
* NUTS3 region, or population range.
*
* @param params - Filter and pagination parameters
* @param params.country - Filter by country code (e.g., "PT", "DE", "FR")
* @param params.nuts3 - Filter by NUTS3 region code
* @param params.min_population - Minimum population filter
* @param params.max_population - Maximum population filter
* @param params.limit - Maximum results (default: 100)
* @param params.offset - Pagination offset
* @param options - Request options
* @returns Paginated list of LAU municipalities
*
* @example
* ```typescript
* // List Portuguese municipalities
* const portugal = await client.getEULAU({ country: 'PT', limit: 100 });
* console.log(`Found ${portugal.items.length} Portuguese LAUs`);
*
* // Filter by population
* const largeCities = await client.getEULAU({
* country: 'DE',
* min_population: 500000
* });
* ```
*/
getEULAU(params?: EULAUParams, options?: RequestOptions): Promise<ListResponse<EULAUMunicipality>>;
/**
* Gets a single EU LAU municipality by ID.
*
* @param lauId - The LAU ID (e.g., "PT_030875" for Lisboa, "DE_05315000" for Köln)
* @param options - Request options
* @returns LAU municipality details
* @throws {NotFoundError} If the LAU ID is not found
*
* @example
* ```typescript
* const lisbon = await client.getEULAUById('PT_030875');
* console.log(lisbon.name); // "Lisboa"
* console.log(lisbon.population); // 545923
* console.log(lisbon.country_code); // "PT"
* ```
*/
getEULAUById(lauId: string, options?: RequestOptions): Promise<EULAUMunicipality>;
/**
* Lists EU NUTS regions with optional filtering.
*
* Returns NUTS (Nomenclature of Territorial Units for Statistics)
* regions at any level (0-3). Use to understand the administrative
* hierarchy of EU countries.
*
* @param params - Filter and pagination parameters
* @param params.country - Filter by country code
* @param params.level - Filter by NUTS level (0=country, 1=major region, 2=region, 3=province)
* @param params.parent - Filter by parent NUTS code
* @param params.limit - Maximum results
* @param params.offset - Pagination offset
* @param options - Request options
* @returns Paginated list of NUTS regions
*
* @example
* ```typescript
* // Get all NUTS3 regions in Germany
* const germanyNuts3 = await client.getEUNUTS({
* country: 'DE',
* level: 3
* });
*
* // Get regions under a specific parent
* const subRegions = await client.getEUNUTS({
* parent: 'DEA' // North Rhine-Westphalia
* });
* ```
*/
getEUNUTS(params?: EUNUTSParams, options?: RequestOptions): Promise<ListResponse<EUNUTSRegion>>;
}
export { type AgroMunicipality, type AgroTimeseries, AuthenticationError, type ComexMunicipality, type ComexOverview, type ComexProduct, type ConsolidatedCity, type CrimeOverview, type CrimeStats, DEFAULT_RETRY_CONFIG, type EconomicData, type EmissionsData, type EmploymentData, type ExportFormat, ForbiddenError, type HealthEstablishment, type HealthStats, type IDEBScore, type IndicatorsMunicipality, InfomanceClient, type InfomanceClientConfig, InfomanceError, type InfrastructureData, type LandUseData, type ListResponse, type Logger, type Municipality, type MunicipalityIndicators, NetworkError, NotFoundError, type OverviewResponse, type POI, type POISearchParams, type Pagination, type RankingEntry, type RankingParams, RateLimitError, type RateLimitInfo, type RequestOptions, type RetryConfig, type School, ServerError, type SicorByCategory, type SicorOverview, type SicorState, type StateFilter, TimeoutError, ValidationError, type YearFilter, calculateBackoffDelay, InfomanceClient as default, isRetryableNetworkError, isRetryableStatus };
export { type AgroMunicipality, type AgroTimeseries, AuthenticationError, type ComexMunicipality, type ComexOverview, type ComexProduct, type ConsolidatedCity, type CrimeOverview, type CrimeStats, DEFAULT_RETRY_CONFIG, type EUCountry, type EULAUMunicipality, type EULAUParams, type EUNUTSParams, type EUNUTSRegion, type EconomicData, type EmissionsData, type EmploymentData, type EuropeanCountry, type ExportFormat, ForbiddenError, type FranceCommune, type FranceCommuneParams, type GeoJSONFeature, type GeoJSONFeatureCollection, type GermanyGemeinde, type GermanyGemeindeParams, type HealthEstablishment, type HealthStats, type IDEBScore, type IndicatorsMunicipality, InfomanceClient, type InfomanceClientConfig, InfomanceError, type InfrastructureData, type ItalyComune, type ItalyComuneParams, type LandUseData, type ListResponse, type Logger, type Municipality, type MunicipalityIndicators, type NetherlandsGemeente, type NetherlandsGemeenteParams, NetworkError, NotFoundError, type OverviewResponse, type POI, type POISearchParams, type Pagination, type PortugalMunicipality, type PortugalMunicipalityParams, type RankingEntry, type RankingParams, RateLimitError, type RateLimitInfo, type RequestOptions, type RetryConfig, type School, ServerError, type SicorByCategory, type SicorOverview, type SicorState, type SpainMunicipio, type SpainMunicipioParams, type StateFilter, TimeoutError, ValidationError, type YearFilter, calculateBackoffDelay, InfomanceClient as default, isRetryableNetworkError, isRetryableStatus };

@@ -258,2 +258,151 @@ interface Pagination {

type ExportFormat = 'json' | 'csv' | 'xlsx';
/** Supported countries for European data */
type EuropeanCountry = 'pt' | 'fr' | 'de' | 'nl' | 'it' | 'es' | 'be' | 'at';
/** GeoJSON Feature for geographic data */
interface GeoJSONFeature {
type: 'Feature';
properties: Record<string, unknown>;
geometry: {
type: string;
coordinates: unknown;
};
}
/** GeoJSON FeatureCollection */
interface GeoJSONFeatureCollection {
type: 'FeatureCollection';
features: GeoJSONFeature[];
}
interface PortugalMunicipality {
dicofre: string;
name: string;
distrito: string;
region: 'Continental' | 'Açores' | 'Madeira';
area_km2?: number;
population?: number;
}
interface PortugalMunicipalityParams {
distrito?: string;
region?: 'continental' | 'acores' | 'madeira';
simplify?: number;
limit?: number;
offset?: number;
}
interface FranceCommune {
code_insee: string;
nom: string;
code_departement: string;
code_region: string;
population?: number;
area_km2?: number;
}
interface FranceCommuneParams {
departement?: string;
region?: string;
limit?: number;
offset?: number;
}
interface GermanyGemeinde {
ags: string;
ars: string;
name: string;
bundesland: string;
kreis?: string;
population?: number;
area_km2?: number;
}
interface GermanyGemeindeParams {
bundesland?: string;
kreis?: string;
limit?: number;
offset?: number;
}
interface NetherlandsGemeente {
statcode: string;
statnaam: string;
province?: string;
population?: number;
area_km2?: number;
}
interface NetherlandsGemeenteParams {
province?: string;
limit?: number;
offset?: number;
}
interface ItalyComune {
pro_com: string;
comune: string;
provincia?: string;
regione?: string;
population?: number;
area_km2?: number;
}
interface ItalyComuneParams {
regione?: string;
provincia?: string;
limit?: number;
offset?: number;
}
interface SpainMunicipio {
codigo_ine: string;
nombre: string;
provincia?: string;
comunidad_autonoma?: string;
population?: number;
area_km2?: number;
}
interface SpainMunicipioParams {
comunidad?: string;
provincia?: string;
limit?: number;
offset?: number;
}
/** EU Country from /api/v1/eu/countries */
interface EUCountry {
code: string;
name: string;
lau_count: number;
population?: number;
area_km2?: number;
}
/** EU LAU Municipality from /api/v1/eu/lau */
interface EULAUMunicipality {
lau_id: string;
name: string;
country_code: string;
nuts3_code?: string;
population?: number;
population_density?: number;
area_km2?: number;
gdp_per_capita?: number;
unemployment_rate?: number;
data_completeness?: number;
}
/** EU NUTS Region from /api/v1/eu/nuts */
interface EUNUTSRegion {
code: string;
name: string;
level: number;
country_code: string;
parent_code?: string;
lau_count?: number;
population?: number;
area_km2?: number;
}
/** Parameters for listing EU LAU municipalities */
interface EULAUParams {
country?: string;
nuts3?: string;
min_population?: number;
max_population?: number;
limit?: number;
offset?: number;
}
/** Parameters for listing EU NUTS regions */
interface EUNUTSParams {
country?: string;
level?: number;
parent?: string;
limit?: number;
offset?: number;
}

@@ -847,4 +996,269 @@ /**

exportToExcel(path: string, params?: Record<string, unknown>, options?: RequestOptions): Promise<Blob>;
/**
* Lists Portuguese municipalities with boundaries.
*
* Returns all 308 Portuguese municipalities (Continental + Açores + Madeira)
* as GeoJSON FeatureCollection for choropleth maps.
*
* @param params - Filter parameters
* @param params.distrito - Filter by district (Lisboa, Porto, Faro, etc.)
* @param params.region - Filter by region (continental, acores, madeira)
* @param params.simplify - Geometry simplification tolerance (0.001-0.1)
* @param params.limit - Maximum results (default: 310)
* @param params.offset - Pagination offset
* @param options - Request options
* @returns GeoJSON FeatureCollection with municipality boundaries
*
* @example
* ```typescript
* // Get all Portuguese municipalities
* const municipalities = await client.getPortugalMunicipalities();
*
* // Get only Lisbon district
* const lisbon = await client.getPortugalMunicipalities({ distrito: 'Lisboa' });
* ```
*/
getPortugalMunicipalities(params?: PortugalMunicipalityParams, options?: RequestOptions): Promise<GeoJSONFeatureCollection>;
/**
* Gets a single Portuguese municipality by DICOFRE code.
*
* @param dicofre - DICOFRE municipality code (e.g., "0806" for Odemira)
* @param options - Request options
* @returns GeoJSON Feature with municipality boundary and properties
* @throws {NotFoundError} If the municipality is not found
*
* @example
* ```typescript
* const odemira = await client.getPortugalMunicipality('0806');
* console.log(odemira.properties.name);
* ```
*/
getPortugalMunicipality(dicofre: string, options?: RequestOptions): Promise<GeoJSONFeature>;
/**
* Gets Portuguese district boundaries.
*
* Returns all 18 Portuguese districts as GeoJSON FeatureCollection.
*
* @param options - Request options
* @returns GeoJSON FeatureCollection with district boundaries
*/
getPortugalDistricts(options?: RequestOptions): Promise<GeoJSONFeatureCollection>;
/**
* Lists French communes with boundaries.
*
* Returns French municipalities as GeoJSON FeatureCollection.
* France has ~35,000 communes across 101 départements and 18 régions.
*
* @param params - Filter parameters
* @param params.departement - Filter by département code (75, 13, etc.)
* @param params.region - Filter by région code
* @param params.limit - Maximum results
* @param params.offset - Pagination offset
* @param options - Request options
* @returns GeoJSON FeatureCollection with commune boundaries
*
* @example
* ```typescript
* // Get communes in Paris département
* const paris = await client.getFranceCommunes({ departement: '75' });
* ```
*/
getFranceCommunes(params?: FranceCommuneParams, options?: RequestOptions): Promise<GeoJSONFeatureCollection>;
/**
* Gets a single French commune by INSEE code.
*
* @param codeInsee - INSEE commune code (e.g., "75056" for Paris)
* @param options - Request options
* @returns GeoJSON Feature with commune boundary
*/
getFranceCommune(codeInsee: string, options?: RequestOptions): Promise<GeoJSONFeature>;
/**
* Lists German municipalities (Gemeinden) with boundaries.
*
* Returns German municipalities as GeoJSON FeatureCollection.
* Germany has ~11,000 Gemeinden across 401 Kreise and 16 Bundesländer.
*
* @param params - Filter parameters
* @param params.bundesland - Filter by federal state (Bayern, Sachsen, etc.)
* @param params.kreis - Filter by district
* @param params.limit - Maximum results
* @param params.offset - Pagination offset
* @param options - Request options
* @returns GeoJSON FeatureCollection with Gemeinde boundaries
*/
getGermanyGemeinden(params?: GermanyGemeindeParams, options?: RequestOptions): Promise<GeoJSONFeatureCollection>;
/**
* Gets a single German municipality by AGS code.
*
* @param ags - Amtlicher Gemeindeschlüssel (8 digits)
* @param options - Request options
* @returns GeoJSON Feature with Gemeinde boundary
*/
getGermanyGemeinde(ags: string, options?: RequestOptions): Promise<GeoJSONFeature>;
/**
* Lists Dutch municipalities (Gemeenten) with boundaries.
*
* Returns Dutch municipalities as GeoJSON FeatureCollection.
* Netherlands has 342 gemeenten across 12 provinces.
*
* @param params - Filter parameters
* @param params.province - Filter by province
* @param params.limit - Maximum results
* @param params.offset - Pagination offset
* @param options - Request options
* @returns GeoJSON FeatureCollection with Gemeente boundaries
*/
getNetherlandsGemeenten(params?: NetherlandsGemeenteParams, options?: RequestOptions): Promise<GeoJSONFeatureCollection>;
/**
* Gets a single Dutch municipality by CBS code.
*
* @param statcode - CBS gemeentecode
* @param options - Request options
* @returns GeoJSON Feature with Gemeente boundary
*/
getNetherlandsGemeente(statcode: string, options?: RequestOptions): Promise<GeoJSONFeature>;
/**
* Lists Italian municipalities (Comuni) with boundaries.
*
* Returns Italian municipalities as GeoJSON FeatureCollection.
* Italy has ~8,000 comuni across 107 province and 20 regioni.
*
* @param params - Filter parameters
* @param params.regione - Filter by region
* @param params.provincia - Filter by province
* @param params.limit - Maximum results
* @param params.offset - Pagination offset
* @param options - Request options
* @returns GeoJSON FeatureCollection with Comune boundaries
*/
getItalyComuni(params?: ItalyComuneParams, options?: RequestOptions): Promise<GeoJSONFeatureCollection>;
/**
* Gets a single Italian municipality by ISTAT code.
*
* @param proCom - ISTAT comune code
* @param options - Request options
* @returns GeoJSON Feature with Comune boundary
*/
getItalyComune(proCom: string, options?: RequestOptions): Promise<GeoJSONFeature>;
/**
* Lists Spanish municipalities (Municipios) with boundaries.
*
* Returns Spanish municipalities as GeoJSON FeatureCollection.
* Spain has ~8,000 municipios across 52 provinces and 17 comunidades autónomas.
*
* @param params - Filter parameters
* @param params.comunidad - Filter by autonomous community
* @param params.provincia - Filter by province
* @param params.limit - Maximum results
* @param params.offset - Pagination offset
* @param options - Request options
* @returns GeoJSON FeatureCollection with Municipio boundaries
*/
getSpainMunicipios(params?: SpainMunicipioParams, options?: RequestOptions): Promise<GeoJSONFeatureCollection>;
/**
* Gets a single Spanish municipality by INE code.
*
* @param codigoIne - INE municipio code
* @param options - Request options
* @returns GeoJSON Feature with Municipio boundary
*/
getSpainMunicipio(codigoIne: string, options?: RequestOptions): Promise<GeoJSONFeature>;
/**
* Lists all EU countries with LAU coverage.
*
* Returns summary information for all 34 EU/EEA countries
* including LAU municipality counts.
*
* @param options - Request options
* @returns Array of EU countries with LAU counts
*
* @example
* ```typescript
* const countries = await client.getEUCountries();
* console.log(countries.length); // 34
* countries.forEach(c => console.log(`${c.name}: ${c.lau_count} LAUs`));
* ```
*/
getEUCountries(options?: RequestOptions): Promise<EUCountry[]>;
/**
* Lists EU LAU municipalities with optional filtering.
*
* Returns municipalities (Local Administrative Units) across
* all EU/EEA countries. Use filters to narrow results by country,
* NUTS3 region, or population range.
*
* @param params - Filter and pagination parameters
* @param params.country - Filter by country code (e.g., "PT", "DE", "FR")
* @param params.nuts3 - Filter by NUTS3 region code
* @param params.min_population - Minimum population filter
* @param params.max_population - Maximum population filter
* @param params.limit - Maximum results (default: 100)
* @param params.offset - Pagination offset
* @param options - Request options
* @returns Paginated list of LAU municipalities
*
* @example
* ```typescript
* // List Portuguese municipalities
* const portugal = await client.getEULAU({ country: 'PT', limit: 100 });
* console.log(`Found ${portugal.items.length} Portuguese LAUs`);
*
* // Filter by population
* const largeCities = await client.getEULAU({
* country: 'DE',
* min_population: 500000
* });
* ```
*/
getEULAU(params?: EULAUParams, options?: RequestOptions): Promise<ListResponse<EULAUMunicipality>>;
/**
* Gets a single EU LAU municipality by ID.
*
* @param lauId - The LAU ID (e.g., "PT_030875" for Lisboa, "DE_05315000" for Köln)
* @param options - Request options
* @returns LAU municipality details
* @throws {NotFoundError} If the LAU ID is not found
*
* @example
* ```typescript
* const lisbon = await client.getEULAUById('PT_030875');
* console.log(lisbon.name); // "Lisboa"
* console.log(lisbon.population); // 545923
* console.log(lisbon.country_code); // "PT"
* ```
*/
getEULAUById(lauId: string, options?: RequestOptions): Promise<EULAUMunicipality>;
/**
* Lists EU NUTS regions with optional filtering.
*
* Returns NUTS (Nomenclature of Territorial Units for Statistics)
* regions at any level (0-3). Use to understand the administrative
* hierarchy of EU countries.
*
* @param params - Filter and pagination parameters
* @param params.country - Filter by country code
* @param params.level - Filter by NUTS level (0=country, 1=major region, 2=region, 3=province)
* @param params.parent - Filter by parent NUTS code
* @param params.limit - Maximum results
* @param params.offset - Pagination offset
* @param options - Request options
* @returns Paginated list of NUTS regions
*
* @example
* ```typescript
* // Get all NUTS3 regions in Germany
* const germanyNuts3 = await client.getEUNUTS({
* country: 'DE',
* level: 3
* });
*
* // Get regions under a specific parent
* const subRegions = await client.getEUNUTS({
* parent: 'DEA' // North Rhine-Westphalia
* });
* ```
*/
getEUNUTS(params?: EUNUTSParams, options?: RequestOptions): Promise<ListResponse<EUNUTSRegion>>;
}
export { type AgroMunicipality, type AgroTimeseries, AuthenticationError, type ComexMunicipality, type ComexOverview, type ComexProduct, type ConsolidatedCity, type CrimeOverview, type CrimeStats, DEFAULT_RETRY_CONFIG, type EconomicData, type EmissionsData, type EmploymentData, type ExportFormat, ForbiddenError, type HealthEstablishment, type HealthStats, type IDEBScore, type IndicatorsMunicipality, InfomanceClient, type InfomanceClientConfig, InfomanceError, type InfrastructureData, type LandUseData, type ListResponse, type Logger, type Municipality, type MunicipalityIndicators, NetworkError, NotFoundError, type OverviewResponse, type POI, type POISearchParams, type Pagination, type RankingEntry, type RankingParams, RateLimitError, type RateLimitInfo, type RequestOptions, type RetryConfig, type School, ServerError, type SicorByCategory, type SicorOverview, type SicorState, type StateFilter, TimeoutError, ValidationError, type YearFilter, calculateBackoffDelay, InfomanceClient as default, isRetryableNetworkError, isRetryableStatus };
export { type AgroMunicipality, type AgroTimeseries, AuthenticationError, type ComexMunicipality, type ComexOverview, type ComexProduct, type ConsolidatedCity, type CrimeOverview, type CrimeStats, DEFAULT_RETRY_CONFIG, type EUCountry, type EULAUMunicipality, type EULAUParams, type EUNUTSParams, type EUNUTSRegion, type EconomicData, type EmissionsData, type EmploymentData, type EuropeanCountry, type ExportFormat, ForbiddenError, type FranceCommune, type FranceCommuneParams, type GeoJSONFeature, type GeoJSONFeatureCollection, type GermanyGemeinde, type GermanyGemeindeParams, type HealthEstablishment, type HealthStats, type IDEBScore, type IndicatorsMunicipality, InfomanceClient, type InfomanceClientConfig, InfomanceError, type InfrastructureData, type ItalyComune, type ItalyComuneParams, type LandUseData, type ListResponse, type Logger, type Municipality, type MunicipalityIndicators, type NetherlandsGemeente, type NetherlandsGemeenteParams, NetworkError, NotFoundError, type OverviewResponse, type POI, type POISearchParams, type Pagination, type PortugalMunicipality, type PortugalMunicipalityParams, type RankingEntry, type RankingParams, RateLimitError, type RateLimitInfo, type RequestOptions, type RetryConfig, type School, ServerError, type SicorByCategory, type SicorOverview, type SicorState, type SpainMunicipio, type SpainMunicipioParams, type StateFilter, TimeoutError, ValidationError, type YearFilter, calculateBackoffDelay, InfomanceClient as default, isRetryableNetworkError, isRetryableStatus };

@@ -992,2 +992,346 @@ "use strict";

}
// ============================================
// European Geo API - Portugal
// ============================================
/**
* Lists Portuguese municipalities with boundaries.
*
* Returns all 308 Portuguese municipalities (Continental + Açores + Madeira)
* as GeoJSON FeatureCollection for choropleth maps.
*
* @param params - Filter parameters
* @param params.distrito - Filter by district (Lisboa, Porto, Faro, etc.)
* @param params.region - Filter by region (continental, acores, madeira)
* @param params.simplify - Geometry simplification tolerance (0.001-0.1)
* @param params.limit - Maximum results (default: 310)
* @param params.offset - Pagination offset
* @param options - Request options
* @returns GeoJSON FeatureCollection with municipality boundaries
*
* @example
* ```typescript
* // Get all Portuguese municipalities
* const municipalities = await client.getPortugalMunicipalities();
*
* // Get only Lisbon district
* const lisbon = await client.getPortugalMunicipalities({ distrito: 'Lisboa' });
* ```
*/
async getPortugalMunicipalities(params, options) {
return this.request(
`/api/v1/geo/pt/municipalities${this.buildQuery(params || {})}`,
options
);
}
/**
* Gets a single Portuguese municipality by DICOFRE code.
*
* @param dicofre - DICOFRE municipality code (e.g., "0806" for Odemira)
* @param options - Request options
* @returns GeoJSON Feature with municipality boundary and properties
* @throws {NotFoundError} If the municipality is not found
*
* @example
* ```typescript
* const odemira = await client.getPortugalMunicipality('0806');
* console.log(odemira.properties.name);
* ```
*/
async getPortugalMunicipality(dicofre, options) {
return this.request(`/api/v1/geo/pt/municipalities/${dicofre}`, options);
}
/**
* Gets Portuguese district boundaries.
*
* Returns all 18 Portuguese districts as GeoJSON FeatureCollection.
*
* @param options - Request options
* @returns GeoJSON FeatureCollection with district boundaries
*/
async getPortugalDistricts(options) {
return this.request("/api/v1/geo/pt/districts", options);
}
// ============================================
// European Geo API - France
// ============================================
/**
* Lists French communes with boundaries.
*
* Returns French municipalities as GeoJSON FeatureCollection.
* France has ~35,000 communes across 101 départements and 18 régions.
*
* @param params - Filter parameters
* @param params.departement - Filter by département code (75, 13, etc.)
* @param params.region - Filter by région code
* @param params.limit - Maximum results
* @param params.offset - Pagination offset
* @param options - Request options
* @returns GeoJSON FeatureCollection with commune boundaries
*
* @example
* ```typescript
* // Get communes in Paris département
* const paris = await client.getFranceCommunes({ departement: '75' });
* ```
*/
async getFranceCommunes(params, options) {
return this.request(
`/api/v1/geo/fr/communes${this.buildQuery(params || {})}`,
options
);
}
/**
* Gets a single French commune by INSEE code.
*
* @param codeInsee - INSEE commune code (e.g., "75056" for Paris)
* @param options - Request options
* @returns GeoJSON Feature with commune boundary
*/
async getFranceCommune(codeInsee, options) {
return this.request(`/api/v1/geo/fr/communes/${codeInsee}`, options);
}
// ============================================
// European Geo API - Germany
// ============================================
/**
* Lists German municipalities (Gemeinden) with boundaries.
*
* Returns German municipalities as GeoJSON FeatureCollection.
* Germany has ~11,000 Gemeinden across 401 Kreise and 16 Bundesländer.
*
* @param params - Filter parameters
* @param params.bundesland - Filter by federal state (Bayern, Sachsen, etc.)
* @param params.kreis - Filter by district
* @param params.limit - Maximum results
* @param params.offset - Pagination offset
* @param options - Request options
* @returns GeoJSON FeatureCollection with Gemeinde boundaries
*/
async getGermanyGemeinden(params, options) {
return this.request(
`/api/v1/geo/de/gemeinden${this.buildQuery(params || {})}`,
options
);
}
/**
* Gets a single German municipality by AGS code.
*
* @param ags - Amtlicher Gemeindeschlüssel (8 digits)
* @param options - Request options
* @returns GeoJSON Feature with Gemeinde boundary
*/
async getGermanyGemeinde(ags, options) {
return this.request(`/api/v1/geo/de/gemeinden/${ags}`, options);
}
// ============================================
// European Geo API - Netherlands
// ============================================
/**
* Lists Dutch municipalities (Gemeenten) with boundaries.
*
* Returns Dutch municipalities as GeoJSON FeatureCollection.
* Netherlands has 342 gemeenten across 12 provinces.
*
* @param params - Filter parameters
* @param params.province - Filter by province
* @param params.limit - Maximum results
* @param params.offset - Pagination offset
* @param options - Request options
* @returns GeoJSON FeatureCollection with Gemeente boundaries
*/
async getNetherlandsGemeenten(params, options) {
return this.request(
`/api/v1/geo/nl/gemeenten${this.buildQuery(params || {})}`,
options
);
}
/**
* Gets a single Dutch municipality by CBS code.
*
* @param statcode - CBS gemeentecode
* @param options - Request options
* @returns GeoJSON Feature with Gemeente boundary
*/
async getNetherlandsGemeente(statcode, options) {
return this.request(`/api/v1/geo/nl/gemeenten/${statcode}`, options);
}
// ============================================
// European Geo API - Italy
// ============================================
/**
* Lists Italian municipalities (Comuni) with boundaries.
*
* Returns Italian municipalities as GeoJSON FeatureCollection.
* Italy has ~8,000 comuni across 107 province and 20 regioni.
*
* @param params - Filter parameters
* @param params.regione - Filter by region
* @param params.provincia - Filter by province
* @param params.limit - Maximum results
* @param params.offset - Pagination offset
* @param options - Request options
* @returns GeoJSON FeatureCollection with Comune boundaries
*/
async getItalyComuni(params, options) {
return this.request(
`/api/v1/geo/it/comuni${this.buildQuery(params || {})}`,
options
);
}
/**
* Gets a single Italian municipality by ISTAT code.
*
* @param proCom - ISTAT comune code
* @param options - Request options
* @returns GeoJSON Feature with Comune boundary
*/
async getItalyComune(proCom, options) {
return this.request(`/api/v1/geo/it/comuni/${proCom}`, options);
}
// ============================================
// European Geo API - Spain
// ============================================
/**
* Lists Spanish municipalities (Municipios) with boundaries.
*
* Returns Spanish municipalities as GeoJSON FeatureCollection.
* Spain has ~8,000 municipios across 52 provinces and 17 comunidades autónomas.
*
* @param params - Filter parameters
* @param params.comunidad - Filter by autonomous community
* @param params.provincia - Filter by province
* @param params.limit - Maximum results
* @param params.offset - Pagination offset
* @param options - Request options
* @returns GeoJSON FeatureCollection with Municipio boundaries
*/
async getSpainMunicipios(params, options) {
return this.request(
`/api/v1/geo/es/municipios${this.buildQuery(params || {})}`,
options
);
}
/**
* Gets a single Spanish municipality by INE code.
*
* @param codigoIne - INE municipio code
* @param options - Request options
* @returns GeoJSON Feature with Municipio boundary
*/
async getSpainMunicipio(codigoIne, options) {
return this.request(`/api/v1/geo/es/municipios/${codigoIne}`, options);
}
// ============================================
// Unified EU API (BFF endpoints)
// ============================================
/**
* Lists all EU countries with LAU coverage.
*
* Returns summary information for all 34 EU/EEA countries
* including LAU municipality counts.
*
* @param options - Request options
* @returns Array of EU countries with LAU counts
*
* @example
* ```typescript
* const countries = await client.getEUCountries();
* console.log(countries.length); // 34
* countries.forEach(c => console.log(`${c.name}: ${c.lau_count} LAUs`));
* ```
*/
async getEUCountries(options) {
return this.request("/api/v1/eu/countries", options);
}
/**
* Lists EU LAU municipalities with optional filtering.
*
* Returns municipalities (Local Administrative Units) across
* all EU/EEA countries. Use filters to narrow results by country,
* NUTS3 region, or population range.
*
* @param params - Filter and pagination parameters
* @param params.country - Filter by country code (e.g., "PT", "DE", "FR")
* @param params.nuts3 - Filter by NUTS3 region code
* @param params.min_population - Minimum population filter
* @param params.max_population - Maximum population filter
* @param params.limit - Maximum results (default: 100)
* @param params.offset - Pagination offset
* @param options - Request options
* @returns Paginated list of LAU municipalities
*
* @example
* ```typescript
* // List Portuguese municipalities
* const portugal = await client.getEULAU({ country: 'PT', limit: 100 });
* console.log(`Found ${portugal.items.length} Portuguese LAUs`);
*
* // Filter by population
* const largeCities = await client.getEULAU({
* country: 'DE',
* min_population: 500000
* });
* ```
*/
async getEULAU(params, options) {
return this.request(
`/api/v1/eu/lau${this.buildQuery(params || {})}`,
options
);
}
/**
* Gets a single EU LAU municipality by ID.
*
* @param lauId - The LAU ID (e.g., "PT_030875" for Lisboa, "DE_05315000" for Köln)
* @param options - Request options
* @returns LAU municipality details
* @throws {NotFoundError} If the LAU ID is not found
*
* @example
* ```typescript
* const lisbon = await client.getEULAUById('PT_030875');
* console.log(lisbon.name); // "Lisboa"
* console.log(lisbon.population); // 545923
* console.log(lisbon.country_code); // "PT"
* ```
*/
async getEULAUById(lauId, options) {
return this.request(`/api/v1/eu/lau/${lauId}`, options);
}
/**
* Lists EU NUTS regions with optional filtering.
*
* Returns NUTS (Nomenclature of Territorial Units for Statistics)
* regions at any level (0-3). Use to understand the administrative
* hierarchy of EU countries.
*
* @param params - Filter and pagination parameters
* @param params.country - Filter by country code
* @param params.level - Filter by NUTS level (0=country, 1=major region, 2=region, 3=province)
* @param params.parent - Filter by parent NUTS code
* @param params.limit - Maximum results
* @param params.offset - Pagination offset
* @param options - Request options
* @returns Paginated list of NUTS regions
*
* @example
* ```typescript
* // Get all NUTS3 regions in Germany
* const germanyNuts3 = await client.getEUNUTS({
* country: 'DE',
* level: 3
* });
*
* // Get regions under a specific parent
* const subRegions = await client.getEUNUTS({
* parent: 'DEA' // North Rhine-Westphalia
* });
* ```
*/
async getEUNUTS(params, options) {
return this.request(
`/api/v1/eu/nuts${this.buildQuery(params || {})}`,
options
);
}
};

@@ -994,0 +1338,0 @@ // Annotate the CommonJS export names for ESM import in node:

@@ -952,2 +952,346 @@ // src/errors.ts

}
// ============================================
// European Geo API - Portugal
// ============================================
/**
* Lists Portuguese municipalities with boundaries.
*
* Returns all 308 Portuguese municipalities (Continental + Açores + Madeira)
* as GeoJSON FeatureCollection for choropleth maps.
*
* @param params - Filter parameters
* @param params.distrito - Filter by district (Lisboa, Porto, Faro, etc.)
* @param params.region - Filter by region (continental, acores, madeira)
* @param params.simplify - Geometry simplification tolerance (0.001-0.1)
* @param params.limit - Maximum results (default: 310)
* @param params.offset - Pagination offset
* @param options - Request options
* @returns GeoJSON FeatureCollection with municipality boundaries
*
* @example
* ```typescript
* // Get all Portuguese municipalities
* const municipalities = await client.getPortugalMunicipalities();
*
* // Get only Lisbon district
* const lisbon = await client.getPortugalMunicipalities({ distrito: 'Lisboa' });
* ```
*/
async getPortugalMunicipalities(params, options) {
return this.request(
`/api/v1/geo/pt/municipalities${this.buildQuery(params || {})}`,
options
);
}
/**
* Gets a single Portuguese municipality by DICOFRE code.
*
* @param dicofre - DICOFRE municipality code (e.g., "0806" for Odemira)
* @param options - Request options
* @returns GeoJSON Feature with municipality boundary and properties
* @throws {NotFoundError} If the municipality is not found
*
* @example
* ```typescript
* const odemira = await client.getPortugalMunicipality('0806');
* console.log(odemira.properties.name);
* ```
*/
async getPortugalMunicipality(dicofre, options) {
return this.request(`/api/v1/geo/pt/municipalities/${dicofre}`, options);
}
/**
* Gets Portuguese district boundaries.
*
* Returns all 18 Portuguese districts as GeoJSON FeatureCollection.
*
* @param options - Request options
* @returns GeoJSON FeatureCollection with district boundaries
*/
async getPortugalDistricts(options) {
return this.request("/api/v1/geo/pt/districts", options);
}
// ============================================
// European Geo API - France
// ============================================
/**
* Lists French communes with boundaries.
*
* Returns French municipalities as GeoJSON FeatureCollection.
* France has ~35,000 communes across 101 départements and 18 régions.
*
* @param params - Filter parameters
* @param params.departement - Filter by département code (75, 13, etc.)
* @param params.region - Filter by région code
* @param params.limit - Maximum results
* @param params.offset - Pagination offset
* @param options - Request options
* @returns GeoJSON FeatureCollection with commune boundaries
*
* @example
* ```typescript
* // Get communes in Paris département
* const paris = await client.getFranceCommunes({ departement: '75' });
* ```
*/
async getFranceCommunes(params, options) {
return this.request(
`/api/v1/geo/fr/communes${this.buildQuery(params || {})}`,
options
);
}
/**
* Gets a single French commune by INSEE code.
*
* @param codeInsee - INSEE commune code (e.g., "75056" for Paris)
* @param options - Request options
* @returns GeoJSON Feature with commune boundary
*/
async getFranceCommune(codeInsee, options) {
return this.request(`/api/v1/geo/fr/communes/${codeInsee}`, options);
}
// ============================================
// European Geo API - Germany
// ============================================
/**
* Lists German municipalities (Gemeinden) with boundaries.
*
* Returns German municipalities as GeoJSON FeatureCollection.
* Germany has ~11,000 Gemeinden across 401 Kreise and 16 Bundesländer.
*
* @param params - Filter parameters
* @param params.bundesland - Filter by federal state (Bayern, Sachsen, etc.)
* @param params.kreis - Filter by district
* @param params.limit - Maximum results
* @param params.offset - Pagination offset
* @param options - Request options
* @returns GeoJSON FeatureCollection with Gemeinde boundaries
*/
async getGermanyGemeinden(params, options) {
return this.request(
`/api/v1/geo/de/gemeinden${this.buildQuery(params || {})}`,
options
);
}
/**
* Gets a single German municipality by AGS code.
*
* @param ags - Amtlicher Gemeindeschlüssel (8 digits)
* @param options - Request options
* @returns GeoJSON Feature with Gemeinde boundary
*/
async getGermanyGemeinde(ags, options) {
return this.request(`/api/v1/geo/de/gemeinden/${ags}`, options);
}
// ============================================
// European Geo API - Netherlands
// ============================================
/**
* Lists Dutch municipalities (Gemeenten) with boundaries.
*
* Returns Dutch municipalities as GeoJSON FeatureCollection.
* Netherlands has 342 gemeenten across 12 provinces.
*
* @param params - Filter parameters
* @param params.province - Filter by province
* @param params.limit - Maximum results
* @param params.offset - Pagination offset
* @param options - Request options
* @returns GeoJSON FeatureCollection with Gemeente boundaries
*/
async getNetherlandsGemeenten(params, options) {
return this.request(
`/api/v1/geo/nl/gemeenten${this.buildQuery(params || {})}`,
options
);
}
/**
* Gets a single Dutch municipality by CBS code.
*
* @param statcode - CBS gemeentecode
* @param options - Request options
* @returns GeoJSON Feature with Gemeente boundary
*/
async getNetherlandsGemeente(statcode, options) {
return this.request(`/api/v1/geo/nl/gemeenten/${statcode}`, options);
}
// ============================================
// European Geo API - Italy
// ============================================
/**
* Lists Italian municipalities (Comuni) with boundaries.
*
* Returns Italian municipalities as GeoJSON FeatureCollection.
* Italy has ~8,000 comuni across 107 province and 20 regioni.
*
* @param params - Filter parameters
* @param params.regione - Filter by region
* @param params.provincia - Filter by province
* @param params.limit - Maximum results
* @param params.offset - Pagination offset
* @param options - Request options
* @returns GeoJSON FeatureCollection with Comune boundaries
*/
async getItalyComuni(params, options) {
return this.request(
`/api/v1/geo/it/comuni${this.buildQuery(params || {})}`,
options
);
}
/**
* Gets a single Italian municipality by ISTAT code.
*
* @param proCom - ISTAT comune code
* @param options - Request options
* @returns GeoJSON Feature with Comune boundary
*/
async getItalyComune(proCom, options) {
return this.request(`/api/v1/geo/it/comuni/${proCom}`, options);
}
// ============================================
// European Geo API - Spain
// ============================================
/**
* Lists Spanish municipalities (Municipios) with boundaries.
*
* Returns Spanish municipalities as GeoJSON FeatureCollection.
* Spain has ~8,000 municipios across 52 provinces and 17 comunidades autónomas.
*
* @param params - Filter parameters
* @param params.comunidad - Filter by autonomous community
* @param params.provincia - Filter by province
* @param params.limit - Maximum results
* @param params.offset - Pagination offset
* @param options - Request options
* @returns GeoJSON FeatureCollection with Municipio boundaries
*/
async getSpainMunicipios(params, options) {
return this.request(
`/api/v1/geo/es/municipios${this.buildQuery(params || {})}`,
options
);
}
/**
* Gets a single Spanish municipality by INE code.
*
* @param codigoIne - INE municipio code
* @param options - Request options
* @returns GeoJSON Feature with Municipio boundary
*/
async getSpainMunicipio(codigoIne, options) {
return this.request(`/api/v1/geo/es/municipios/${codigoIne}`, options);
}
// ============================================
// Unified EU API (BFF endpoints)
// ============================================
/**
* Lists all EU countries with LAU coverage.
*
* Returns summary information for all 34 EU/EEA countries
* including LAU municipality counts.
*
* @param options - Request options
* @returns Array of EU countries with LAU counts
*
* @example
* ```typescript
* const countries = await client.getEUCountries();
* console.log(countries.length); // 34
* countries.forEach(c => console.log(`${c.name}: ${c.lau_count} LAUs`));
* ```
*/
async getEUCountries(options) {
return this.request("/api/v1/eu/countries", options);
}
/**
* Lists EU LAU municipalities with optional filtering.
*
* Returns municipalities (Local Administrative Units) across
* all EU/EEA countries. Use filters to narrow results by country,
* NUTS3 region, or population range.
*
* @param params - Filter and pagination parameters
* @param params.country - Filter by country code (e.g., "PT", "DE", "FR")
* @param params.nuts3 - Filter by NUTS3 region code
* @param params.min_population - Minimum population filter
* @param params.max_population - Maximum population filter
* @param params.limit - Maximum results (default: 100)
* @param params.offset - Pagination offset
* @param options - Request options
* @returns Paginated list of LAU municipalities
*
* @example
* ```typescript
* // List Portuguese municipalities
* const portugal = await client.getEULAU({ country: 'PT', limit: 100 });
* console.log(`Found ${portugal.items.length} Portuguese LAUs`);
*
* // Filter by population
* const largeCities = await client.getEULAU({
* country: 'DE',
* min_population: 500000
* });
* ```
*/
async getEULAU(params, options) {
return this.request(
`/api/v1/eu/lau${this.buildQuery(params || {})}`,
options
);
}
/**
* Gets a single EU LAU municipality by ID.
*
* @param lauId - The LAU ID (e.g., "PT_030875" for Lisboa, "DE_05315000" for Köln)
* @param options - Request options
* @returns LAU municipality details
* @throws {NotFoundError} If the LAU ID is not found
*
* @example
* ```typescript
* const lisbon = await client.getEULAUById('PT_030875');
* console.log(lisbon.name); // "Lisboa"
* console.log(lisbon.population); // 545923
* console.log(lisbon.country_code); // "PT"
* ```
*/
async getEULAUById(lauId, options) {
return this.request(`/api/v1/eu/lau/${lauId}`, options);
}
/**
* Lists EU NUTS regions with optional filtering.
*
* Returns NUTS (Nomenclature of Territorial Units for Statistics)
* regions at any level (0-3). Use to understand the administrative
* hierarchy of EU countries.
*
* @param params - Filter and pagination parameters
* @param params.country - Filter by country code
* @param params.level - Filter by NUTS level (0=country, 1=major region, 2=region, 3=province)
* @param params.parent - Filter by parent NUTS code
* @param params.limit - Maximum results
* @param params.offset - Pagination offset
* @param options - Request options
* @returns Paginated list of NUTS regions
*
* @example
* ```typescript
* // Get all NUTS3 regions in Germany
* const germanyNuts3 = await client.getEUNUTS({
* country: 'DE',
* level: 3
* });
*
* // Get regions under a specific parent
* const subRegions = await client.getEUNUTS({
* parent: 'DEA' // North Rhine-Westphalia
* });
* ```
*/
async getEUNUTS(params, options) {
return this.request(
`/api/v1/eu/nuts${this.buildQuery(params || {})}`,
options
);
}
};

@@ -954,0 +1298,0 @@ export {

+3
-3
{
"name": "infomance",
"version": "1.0.0",
"version": "1.1.0",
"description": "SDK oficial para a Infomance API - Dados socioeconômicos de municípios brasileiros",

@@ -41,7 +41,7 @@ "main": "dist/index.js",

"type": "git",
"url": "https://github.com/infomance/infomance-js"
"url": "https://github.com/inf0m4nce/sdk-js"
},
"homepage": "https://infomance.com.br/docs",
"bugs": {
"url": "https://github.com/infomance/infomance-js/issues"
"url": "https://github.com/inf0m4nce/sdk-js/issues"
},

@@ -48,0 +48,0 @@ "devDependencies": {

@@ -0,15 +1,34 @@

<div align="center">
# Infomance SDK
TypeScript SDK for the Infomance API - Brazilian municipalities socioeconomic and geospatial data.
**TypeScript/JavaScript SDK for the Infomance API**
## Installation
*SDK TypeScript/JavaScript para a API Infomance*
[![npm version](https://img.shields.io/npm/v/infomance.svg?style=flat-square)](https://www.npmjs.com/package/infomance)
[![npm downloads](https://img.shields.io/npm/dm/infomance.svg?style=flat-square)](https://www.npmjs.com/package/infomance)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](https://opensource.org/licenses/MIT)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.3+-blue?style=flat-square&logo=typescript)](https://www.typescriptlang.org/)
[Documentation](https://api.infomance.com.br/docs) · [NPM Package](https://www.npmjs.com/package/infomance) · [Report Bug](https://github.com/inf0m4nce/sdk-js/issues)
</div>
---
Brazilian municipalities socioeconomic and geospatial data.
Dados socioeconômicos e geoespaciais de municípios brasileiros.
## Installation / Instalação
```bash
npm install @infomance/sdk
npm install infomance
```
## Quick Start
## Quick Start / Início Rápido
```typescript
import { InfomanceClient } from '@infomance/sdk';
import { InfomanceClient } from 'infomance';

@@ -209,3 +228,3 @@ const client = new InfomanceClient({

```typescript
import { InfomanceClient, InfomanceError } from '@infomance/sdk';
import { InfomanceClient, InfomanceError } from 'infomance';

@@ -245,3 +264,3 @@ try {

// ... and more
} from '@infomance/sdk';
} from 'infomance';
```

@@ -258,3 +277,3 @@

```typescript
import { InfomanceClient } from '@infomance/sdk';
import { InfomanceClient } from 'infomance';

@@ -261,0 +280,0 @@ const apiKey = process.env.INFOMANCE_API_KEY;