/** * FEMA OpenFEMA SDK — typed API client for disaster declarations, grants, and assistance data. * * Standalone — no MCP server required. Usage: * * import { getDisasterDeclarations, getHousingAssistance } from "us-gov-open-data-mcp/sdk/fema"; * * No API key required. * Docs: https://www.fema.gov/about/openfema/api */ /** Disaster Declaration. */ export interface DisasterDeclaration { disasterNumber?: number; declarationDate?: string; disasterName?: string; incidentType?: string; declarationType?: string; state?: string; fipsStateCode?: string; fipsCountyCode?: string; designatedArea?: string; ihProgramDeclared?: boolean; iaProgramDeclared?: boolean; paProgramDeclared?: boolean; hmProgramDeclared?: boolean; incidentBeginDate?: string; incidentEndDate?: string; lastRefresh?: string; [key: string]: unknown; } /** Housing Assistance Record. */ export interface HousingAssistanceRecord { disasterNumber?: number; state?: string; county?: string; zipCode?: string; validRegistrations?: number; totalInspected?: number; totalDamage?: number; totalApprovedIhpAmount?: number; repairReplaceAmount?: number; rentalAmount?: number; otherNeedsAmount?: number; approvedForFemaAssistance?: number; [key: string]: unknown; } /** Public Assistance Record. */ export interface PublicAssistanceRecord { disasterNumber?: number; state?: string; applicantName?: string; county?: string; damageCategory?: string; projectAmount?: number; federalShareObligated?: number; obligatedDate?: string; projectTitle?: string; [key: string]: unknown; } /** Nfip Claim. */ export interface NfipClaim { state?: string; countyCode?: string; dateOfLoss?: string; amountPaidOnBuildingClaim?: number; amountPaidOnContentsClaim?: number; totalBuildingInsuranceCoverage?: number; floodZone?: string; yearOfLoss?: number; [key: string]: unknown; } /** Fema Region. */ export interface FemaRegion { regionNumber?: number; regionName?: string; regionAddress?: string; states?: string; [key: string]: unknown; } /** Fema List Response. */ export interface FemaListResponse { metadata?: { count?: number; skip?: number; top?: number; entityName?: string; }; [key: string]: unknown; } /** Available datasets with their OpenFEMA entity names and API versions. */ export declare const DATASETS: { readonly disaster_declarations: { readonly endpoint: "DisasterDeclarationsSummaries"; readonly version: "v2"; readonly name: "Disaster Declarations"; readonly description: "All federally declared disasters since 1953: major disasters, emergencies, fire management"; }; readonly housing_owners: { readonly endpoint: "HousingAssistanceOwners"; readonly version: "v2"; readonly name: "Housing Assistance (Owners)"; readonly description: "Individual Assistance for homeowners: inspections, damage severity, assistance amounts by county/zip"; }; readonly housing_renters: { readonly endpoint: "HousingAssistanceRenters"; readonly version: "v2"; readonly name: "Housing Assistance (Renters)"; readonly description: "Individual Assistance for renters: inspections, damage severity, assistance amounts by county/zip"; }; readonly public_assistance: { readonly endpoint: "PublicAssistanceGrantAwardActivities"; readonly version: "v2"; readonly name: "Public Assistance Awards"; readonly description: "PA project awards: applicant, county, damage category, federal share obligated"; }; readonly public_assistance_details: { readonly endpoint: "PublicAssistanceFundedProjectsDetails"; readonly version: "v2"; readonly name: "PA Funded Projects"; readonly description: "Detailed public assistance funded projects with damage categories and amounts"; }; readonly nfip_claims: { readonly endpoint: "NfipClaims"; readonly version: "v3"; readonly name: "NFIP Flood Insurance Claims"; readonly description: "National Flood Insurance Program claims: loss amounts, flood zones, damage details"; }; readonly nfip_policies: { readonly endpoint: "NfipPolicies"; readonly version: "v3"; readonly name: "NFIP Flood Insurance Policies"; readonly description: "National Flood Insurance Program policy transactions: coverage, premiums, locations"; }; readonly hazard_mitigation: { readonly endpoint: "HazardMitigationGrantProgramDisasterSummaries"; readonly version: "v3"; readonly name: "Hazard Mitigation Grants"; readonly description: "HMGP disaster-level financial summaries: obligations, project counts"; }; readonly mission_assignments: { readonly endpoint: "MissionAssignments"; readonly version: "v2"; readonly name: "Mission Assignments"; readonly description: "Work orders from FEMA to other federal agencies for disaster response (FY2013+)"; }; readonly fema_regions: { readonly endpoint: "FemaRegions"; readonly version: "v2"; readonly name: "FEMA Regions"; readonly description: "FEMA region boundaries, headquarters, and associated states"; }; readonly registrations: { readonly endpoint: "RegistrationIntakeIndividualsHouseholdPrograms"; readonly version: "v2"; readonly name: "IHP Registrations"; readonly description: "Registration and IHP data by city: call center, web, mobile registrations, eligible amounts"; }; }; /** * Search for disaster declarations. Supports OData-style filtering. */ export declare function getDisasterDeclarations(opts?: { state?: string; year?: number; incidentType?: string; declarationType?: string; top?: number; skip?: number; orderBy?: string; }): Promise; /** * Get housing assistance data for homeowners by disaster/state/county. */ export declare function getHousingAssistance(opts?: { disasterNumber?: number; state?: string; county?: string; top?: number; skip?: number; }): Promise; /** * Get Public Assistance grant award activities. */ export declare function getPublicAssistance(opts?: { disasterNumber?: number; state?: string; top?: number; skip?: number; }): Promise; /** * Get FEMA regions. */ export declare function getFemaRegions(): Promise; /** * Resolve a dataset key (nfip_claims), entity name (NfipClaims) or * versioned entity (v1/IpawsArchivedAlerts) to its API path. */ export declare function resolveDataset(dataset: string): Promise<{ path: string; entity: string; }>; /** * General-purpose query against any OpenFEMA dataset, at its current version. */ export declare function queryDataset(opts: { dataset: string; filter?: string; select?: string; orderBy?: string; top?: number; skip?: number; }): Promise; /** Clear the FEMA SDK cache. */ export declare function clearCache(): void; /** One NFIP claim, with the paid amounts summed. */ export interface NfipClaimSummary { dateOfLoss: string | null; yearOfLoss: number | null; floodEvent: string | null; state: string | null; countyFips: string | null; zip: string | null; floodZone: string | null; primaryResidence: boolean | null; buildingDamage: number | null; contentsDamage: number | null; paidBuilding: number | null; paidContents: number | null; paidIcc: number | null; /** Building + contents + increased-cost-of-compliance payments. */ totalPaid: number; buildingCoverage: number | null; contentsCoverage: number | null; waterDepthInches: number | null; } /** True when floodEventFilter() matches `input` as a whole word: it names one word, once any storm type is dropped. */ export declare function isOneWordEvent(input: string): boolean; /** * OData filter for a flood event name. OpenFEMA's contains() is * case-sensitive (and rejects tolower()), and FEMA writes names several ways, * so this drops a leading storm type and ORs the name as typed, in Title * Case, Sentence case and lower case, plus forms without spaces for names * like "2026-03-KonaStorm". * * A one-word name must match a whole word ("Earl" is not "Early summer * storms") unless `substring` is set; longer names match anywhere. A one-word * name has at most three forms, so the filter stays at 48 clauses or fewer, * well under OpenFEMA's limit (it rejects about 90). */ export declare function floodEventFilter(input: string, opts?: { substring?: boolean; }): string; /** * How a flood event name was matched: as a whole word; anywhere (names of * two or more words); or, for a one-word name that no event has as a whole * word, inside event names ("Kona" in "2026-03-KonaStorm"). */ export type FloodEventMatch = "whole word" | "anywhere" | "within names"; /** * National Flood Insurance Program claims (NfipClaims v3), filtered by * place, year and named flood event. `total` is the number of claims * matching the filters; `claims` holds up to `limit` of them. * * A one-word event name is matched as a whole word. When that finds nothing * and no event anywhere has the word, it is matched inside event names * instead, and `floodEventMatch` says so. */ export declare function getNfipClaims(opts?: { state?: string; county?: string; zip?: string; yearFrom?: number; yearTo?: number; floodEvent?: string; sortBy?: "date" | "paid"; limit?: number; }): Promise<{ total: number; claims: NfipClaimSummary[]; floodEventMatch?: FloodEventMatch; }>; //# sourceMappingURL=sdk.d.ts.map