Create a data pipeline that fetches water quality reports from the EPA ECHO API (https://echo.epa.gov/). The pipeline should:
- Fetch facility-level discharge and compliance data for a given state
- Parse and normalize the response into a standard schema (facility name, lat/lng, contaminant type, violation status, date)
- Store results in a PostgreSQL table
- Handle pagination and rate limiting
- Include error handling for API downtime
Use TypeScript. Write it as a standalone module that can be imported and called with a state code parameter.