/** * FEC SDK — typed API client for OpenFEC (Federal Election Commission). * * Standalone — no MCP server required. Usage: * * import { searchCandidates, getCandidateFinancials } from "us-gov-open-data-mcp/sdk/fec"; * * Requires DATA_GOV_API_KEY env var. Get one at https://api.data.gov/signup/ * Docs: https://api.open.fec.gov/developers/ */ /** Fec Pagination. */ export interface FecPagination { page: number; per_page: number; count: number; pages: number; } /** Fec Candidate. */ export interface FecCandidate { candidate_id: string; name: string; party: string; party_full?: string; office: string; office_full?: string; state?: string; district?: string; election_years?: number[]; candidate_status?: string; incumbent_challenge?: string; incumbent_challenge_full?: string; has_raised_funds?: boolean; [key: string]: unknown; } /** Fec Committee. */ export interface FecCommittee { committee_id: string; name: string; committee_type: string; committee_type_full?: string; party?: string; party_full?: string; state?: string; designation?: string; designation_full?: string; filing_frequency?: string; [key: string]: unknown; } /** Fec Financial Totals. */ export interface FecFinancialTotals { cycle: number; receipts: number; disbursements: number; cash_on_hand_end_period?: number; last_cash_on_hand_end_period?: number; debts_owed_by_committee?: number; last_debts_owed_by_committee?: number; individual_contributions?: number; other_political_committee_contributions?: number; political_party_committee_contributions?: number; independent_expenditures?: number; coverage_start_date?: string; coverage_end_date?: string; committee_type?: string; committee_type_full?: string; [key: string]: unknown; } /** Fec Candidate Totals. */ export interface FecCandidateTotals { name: string; candidate_id?: string; party?: string; party_full?: string; state?: string; receipts: number; disbursements: number; cash_on_hand_end_period?: number; [key: string]: unknown; } /** Fec Search Result. */ export interface FecSearchResult { pagination: FecPagination; results: T[]; } /** Fec Disbursement. */ export interface FecDisbursement { committee_id: string; committee: { name: string; committee_id: string; party?: string; } | null; recipient_name: string; recipient_committee_id: string | null; recipient_committee: { name: string; committee_id: string; party?: string; committee_type_full?: string; } | null; disbursement_amount: number; disbursement_date: string; disbursement_description: string; recipient_state: string | null; line_number_label: string | null; memo_text: string | null; [key: string]: unknown; } /** Itemized individual contribution (Schedule A). */ export interface FecContribution { committee_id: string; committee_name: string | null; committee?: { name?: string; committee_id?: string; } | null; contributor_name: string | null; contributor_employer: string | null; contributor_occupation: string | null; contributor_city: string | null; contributor_state: string | null; contributor_zip: string | null; contribution_receipt_amount: number | null; contribution_receipt_date: string | null; receipt_type_full: string | null; is_individual: boolean | null; candidate_id: string | null; candidate_name: string | null; memo_text: string | null; [key: string]: unknown; } /** Itemized independent expenditure line item (Schedule E). */ export interface FecIndependentExpenditure { committee_id: string; committee_name: string | null; committee?: { name?: string; committee_id?: string; } | null; payee_name: string | null; expenditure_amount: number | null; expenditure_date: string | null; support_oppose_indicator: string | null; candidate_id: string | null; candidate_name: string | null; candidate_office_full: string | null; expenditure_description: string | null; category_code_full: string | null; election_type: string | null; [key: string]: unknown; } /** Independent expenditure totals for a candidate, split by support/oppose (Schedule E totals/by_candidate). */ export interface FecIETotalsByCandidate { candidate_id: string; cycle: number; support_oppose_indicator: string | null; total: number; [key: string]: unknown; } /** FEC candidate status codes. */ export declare const CANDIDATE_STATUS: { readonly C: "Current candidate"; readonly F: "Future candidate"; readonly N: "Not yet a candidate"; readonly P: "Prior candidate"; }; /** FEC committee type codes. */ export declare const COMMITTEE_TYPES: { readonly P: "Presidential"; readonly H: "House"; readonly S: "Senate"; readonly N: "PAC - Nonqualified"; readonly Q: "PAC - Qualified"; readonly X: "Party - Nonqualified"; readonly Y: "Party - Qualified"; readonly I: "Independent Expenditor"; readonly O: "Super PAC"; }; /** FEC office name codes. */ export declare const OFFICE_NAMES: { readonly H: "House"; readonly S: "Senate"; readonly P: "President"; }; /** Search for federal election candidates by name, state, party, office, or election year. */ export declare function searchCandidates(opts?: { name?: string; state?: string; party?: string; office?: string; election_year?: number; page?: number; per_page?: number; }): Promise>; /** Search for political committees (PACs, campaign committees, party committees). */ export declare function searchCommittees(opts?: { name?: string; state?: string; committee_type?: string; cycle?: number; page?: number; per_page?: number; }): Promise>; /** Get financial summary for a candidate. */ export declare function getCandidateFinancials(candidateId: string, cycle?: number): Promise; /** Get financial totals for a committee (PAC, campaign, party). */ export declare function getCommitteeFinancials(committeeId: string, cycle?: number): Promise; /** Get top candidates ranked by total money raised for a given office and cycle. */ export declare function getTopCandidates(opts: { office: string; election_year: number; state?: string; per_page?: number; }): Promise>; /** Get itemized disbursements (Schedule B) for a committee — shows exactly who received money. */ export declare function getCommitteeDisbursements(opts: { committee_id: string; cycle?: number; recipient_name?: string; per_page?: number; sort?: string; }): Promise>; /** * Get itemized individual contributions (Schedule A) — who donated, their * employer/occupation, amount, and date. Filter by recipient committee and/or * contributor attributes. The full dataset is ~123M records, so a filter * (committee_id or contributor_name) is strongly recommended. */ export declare function getIndividualContributions(opts: { committee_id?: string; contributor_name?: string; contributor_employer?: string; contributor_occupation?: string; contributor_state?: string; cycle?: number; min_amount?: number; max_amount?: number; per_page?: number; sort?: string; }): Promise>; /** * Get itemized independent expenditures (Schedule E) — outside spending (Super * PACs, etc.) for or against a candidate. Filter by candidate, spending * committee, and/or support/oppose indicator. */ export declare function getIndependentExpenditures(opts: { candidate_id?: string; committee_id?: string; support_oppose?: string; cycle?: number; per_page?: number; sort?: string; }): Promise>; /** * Get total independent expenditures for a candidate, split into supporting vs. * opposing (Schedule E totals/by_candidate). Returns exact aggregate totals * (2-3 rows: S, O, and occasionally an unspecified row) — no pagination needed. */ export declare function getOutsideSpendingTotals(opts: { candidate_id: string; cycle?: number; election_full?: boolean; }): Promise; /** Clear cached responses. */ export declare function clearCache(): void; //# sourceMappingURL=sdk.d.ts.map