/** * EPA SDK — typed API client for EPA Envirofacts (DMAP) and ECHO (Enforcement & Compliance) APIs. * * Standalone — no MCP server required. Usage: * * import { searchFacilities, getUVIndex, getToxicReleases } from "us-gov-open-data-mcp/sdk/epa"; * * const facilities = await searchFacilities({ state: "NY", mediaType: "air", majorOnly: true }); * const uv = await getUVIndex({ zip: "10001" }); * const tri = await getToxicReleases({ state: "TX" }); * const ghg = await getGreenhouseGasEmissions({ state: "CA" }); * const water = await getDrinkingWaterSystems({ state: "NY" }); * * No API key required. For air quality data (AQS), see the epa-aqs module. * Docs: * Envirofacts (DMAP): https://www.epa.gov/enviro/web-services * ECHO: https://echo.epa.gov/tools/web-services */ /** ECHO Facility record (from air_rest_services or cwa_rest_services). */ export interface EchoFacility { AIRName?: string; CWPName?: string; SourceID?: string; RegistryID?: string; AIRStreet?: string; CWPStreet?: string; AIRCity?: string; CWPCity?: string; AIRState?: string; CWPState?: string; AIRZip?: string; CWPZip?: string; AIRCounty?: string; CWPCounty?: string; FacLat?: string; FacLong?: string; FacSICCodes?: string; AIRNAICS?: string; AIRStatus?: string; AIRClassification?: string; AIRComplStatus?: string; AIRHpvStatus?: string; AIRQtrsWithViol?: string; AIRRecentViolCnt?: string; AIRLastViolDate?: string; AIREvalCnt?: string; AIRLastEvalDate?: string; TRIIDs?: string; GHGIDs?: string; [key: string]: unknown; } /** ECHO Search Result (from get_facilities). */ export interface EchoSearchResult { Results: { Message: string; QueryRows?: string; QueryID?: string; TotalPenalties?: string; SVRows?: string; CVRows?: string; Facilities?: EchoFacility[]; [key: string]: unknown; }; } /** ECHO Facility Detail (from dfr_rest_services.get_dfr). */ export interface EchoFacilityDetail { Results: { Message?: string; RegistryID?: string; Reports?: Record; Permits?: Record[]; EnforcementComplianceSummaries?: Record; NAICS?: Record[]; SIC?: Record[]; [key: string]: unknown; }; } /** UV index forecast data. */ export interface UVForecast { ZIP?: string; CITY?: string; STATE?: string; DATE_TIME?: string; UV_INDEX?: number; UV_ALERT?: number; ORDER?: number; [key: string]: unknown; } /** TRI (Toxics Release Inventory) facility record. */ export interface TRIFacility { TRI_FACILITY_ID?: string; FACILITY_NAME?: string; STREET_ADDRESS?: string; CITY_NAME?: string; COUNTY_NAME?: string; STATE_ABBR?: string; ZIP_CODE?: string; LATITUDE?: number; LONGITUDE?: number; CHEMICAL_NAME?: string; SRS_CAS_NUMBER?: string; INDUSTRY_SECTOR?: string; REPORTING_YEAR?: number; [key: string]: unknown; } /** GHG (Greenhouse Gas) emitter record. */ export interface GHGEmitter { FACILITY_NAME?: string; FACILITY_ID?: number; STATE?: string; CITY?: string; ZIP?: string; LATITUDE?: number; LONGITUDE?: number; SECTOR?: string; SUBSECTOR?: string; YEAR?: number; CO2E_EMISSION?: number; [key: string]: unknown; } /** SDWIS (Safe Drinking Water) system record. */ export interface WaterSystem { PWSID?: string; PWS_NAME?: string; STATE_CODE?: string; CITY_SERVED?: string; COUNTY_SERVED?: string; ZIP_CODE_SERVED?: string; PWS_TYPE_CODE?: string; PRIMARY_SOURCE_CODE?: string; POPULATION_SERVED_COUNT?: number; [key: string]: unknown; } /** ECHO Enforcement Case record. */ export interface EnforcementCase { CaseNumber?: string; CaseName?: string; CaseCategoryDesc?: string; CaseStatusDesc?: string; PrimaryLaw?: string; PrimarySection?: string; DateFiled?: string; SettlementDate?: string; DateClosed?: string; FedPenalty?: string; StateLocPenaltyAmt?: string; SEPCost?: string; CostRecovery?: string; TotalCompActionAmt?: string; CivilCriminalIndicator?: string; EnfOutcome?: string; Lead?: string; PrimaryNAICSCode?: string; DOJDocketNmbr?: string; CourtDocketNumber?: string; [key: string]: unknown; } /** ECHO Enforcement Case Search Result. */ export interface EnforcementCaseResult { Results: { Message: string; QueryRows?: string; QueryID?: string; Cases?: EnforcementCase[]; [key: string]: unknown; }; } /** Superfund (SEMS/CERCLA) site record from Envirofacts. */ export interface SuperfundSite { site_id?: string; epa_id?: string; name?: string; street_addr_txt?: string; city_name?: string; county_name?: string; fk_ref_state_code?: string; zip_code?: string; fk_ref_region_code?: string; npl_status_code?: string; npl_status_name?: string; non_npl_status_code?: string; non_npl_status_name?: string; federal_facility_ind?: string; primary_latitude_decimal_val?: number; primary_longitude_decimal_val?: number; congressional_district_code?: string; [key: string]: unknown; } /** ECHO RCRA Hazardous Waste Facility record. */ export interface RCRAFacility { RCRAName?: string; SourceID?: string; RCRAStreet?: string; RCRACity?: string; RCRAState?: string; RCRAZip?: string; RCRACounty?: string; RegistryID?: string; FacLat?: string; FacLong?: string; RCRALandTypeCode?: string; FacFIPSCode?: string; [key: string]: unknown; } /** ECHO media types for facility searches. */ export declare const MEDIA_TYPES: { readonly air: "Clean Air Act (CAA) facilities via ICIS-Air"; readonly water: "Clean Water Act (CWA) facilities via ICIS-NPDES"; }; /** UV Index scale descriptions. */ export declare const UV_INDEX_SCALE: { readonly "0-2": "Low — minimal danger for average person"; readonly "3-5": "Moderate — take precautions (hat, sunscreen)"; readonly "6-7": "High — protection required, reduce sun exposure"; readonly "8-10": "Very High — extra protection, avoid midday sun"; readonly "11+": "Extreme — unprotected skin can burn in minutes"; }; /** TRI industry sectors. */ export declare const TRI_SECTORS: { readonly Chemicals: "Chemical manufacturing and processing"; readonly "Metal Mining": "Metal ore mining and processing"; readonly "Electric Utilities": "Power generation and electricity"; readonly Petroleum: "Petroleum refining and distribution"; readonly "Food/Beverages/Tobacco": "Food, beverage, and tobacco products"; readonly Paper: "Pulp and paper manufacturing"; readonly "Primary Metals": "Iron, steel, aluminum smelting"; }; /** Water system types (SDWIS). */ export declare const WATER_SYSTEM_TYPES: { readonly CWS: "Community Water System (serves residents year-round)"; readonly NTNCWS: "Non-transient Non-community (serves 25+ of same people, e.g. schools)"; readonly TNCWS: "Transient Non-community (serves transient users, e.g. gas stations)"; }; /** Enforcement case types. */ export declare const CASE_TYPES: { readonly JDC: "Judicial (court) case"; readonly AFR: "Administrative formal (EPA order)"; }; /** Superfund NPL statuses. */ export declare const NPL_STATUSES: { readonly F: "Final NPL (active cleanup)"; readonly P: "Proposed NPL"; readonly D: "Deleted from NPL (cleanup completed)"; readonly N: "Not on NPL"; }; /** * Search EPA-regulated facilities via ECHO (Enforcement & Compliance History Online). * Uses the new echodata.epa.gov REST services (two-step: get_facilities for QID, then get_qid for rows). * * Example: * const air = await searchFacilities({ state: "TX", mediaType: "air", majorOnly: true }); * const water = await searchFacilities({ state: "CA", mediaType: "water" }); */ export declare function searchFacilities(opts: { state: string; mediaType?: "air" | "water"; majorOnly?: boolean; activeOnly?: boolean; responseset?: number; zip?: string; penaltyRange?: string; }): Promise; /** * Get detailed facility report from ECHO including permits, violations, and enforcement actions. * * Example: * const detail = await getFacilityDetail("110000350016"); */ export declare function getFacilityDetail(registryId: string): Promise; /** * Get UV index forecast by ZIP code or city/state from EPA Envirofacts. * * Example: * const forecast = await getUVIndex({ zip: "90210" }); * const forecast = await getUVIndex({ city: "Los Angeles", state: "CA" }); */ export declare function getUVIndex(opts: { zip?: string; city?: string; state?: string; }): Promise; /** * Get Toxics Release Inventory (TRI) facility data by state. * Returns facilities reporting chemical releases to EPA under EPCRA Section 313. * * Example: * const data = await getToxicReleases({ state: "TX" }); * const data = await getToxicReleases({ state: "CA", rows: 50 }); */ export declare function getToxicReleases(opts: { state: string; county?: string; rows?: number; }): Promise; /** * Get Greenhouse Gas (GHG) emissions data by state. * Returns large emitters reporting under EPA's Greenhouse Gas Reporting Program (GHGRP). * * Example: * const data = await getGreenhouseGasEmissions({ state: "TX" }); * const data = await getGreenhouseGasEmissions({ state: "CA", rows: 50 }); */ export declare function getGreenhouseGasEmissions(opts: { state: string; rows?: number; }): Promise; /** * Get Safe Drinking Water Information System (SDWIS) data by state. * Returns public water systems with population served, source type, and system type. * * Example: * const data = await getDrinkingWaterSystems({ state: "NY" }); * const data = await getDrinkingWaterSystems({ state: "CA", rows: 50 }); */ export declare function getDrinkingWaterSystems(opts: { state: string; rows?: number; }): Promise; /** * Search EPA enforcement cases via ECHO. * Returns civil and criminal enforcement actions with penalties, settlements, and outcomes. * * Example: * const cases = await searchEnforcementCases({ state: "TX" }); * const cases = await searchEnforcementCases({ state: "CA", law: "CAA" }); */ export declare function searchEnforcementCases(opts: { state: string; law?: string; responseset?: number; }): Promise; /** * Get Superfund (CERCLA/SEMS) sites by state from EPA Envirofacts. * Returns NPL and non-NPL contaminated sites with location and cleanup status. * * Example: * const sites = await getSuperfundSites({ state: "NJ" }); * const sites = await getSuperfundSites({ state: "TX", rows: 50 }); */ export declare function getSuperfundSites(opts: { state: string; rows?: number; }): Promise; /** * Search RCRA hazardous waste facilities via ECHO. * Returns facilities regulated under RCRA Subtitle C (generators, transporters, TSD facilities). * * Example: * const facs = await searchRCRAFacilities({ state: "TX" }); */ export declare function searchRCRAFacilities(opts: { state: string; responseset?: number; }): Promise; /** Clear cached responses from both clients. */ export declare function clearCache(): void; //# sourceMappingURL=sdk.d.ts.map