UNPKG

congress-dot-gov

Version:
1,104 lines (1,087 loc) 71.5 kB
import { AmendmentSummary, AmendmentType, Amendment, AmendmentAction, AmendmentCosponsor, AmendmentText, BillSummary, BillType, Bill, BillAction, BillAmendment, BillCommittee, BillCosponsor, RelatedBill, BillSubject, BillSummaryVersion, BillText, BillTitle, Law, BoundCongressionalRecord, DailyDigestBoundCongressionalRecord, ListCommitteeMeeting, Chamber, CommitteeMeeting, ListCommitteePrint, CommitteePrint, CommitteePrintText, ListCommitteeReport, CommitteeReportType, CommitteeReport, CommitteeReportText, ListCommittee, Committee, CommitteeBill, CommitteeNomination, CommitteeCommunication, CongressSummary, Congress, CongressionalRecord, ListCRSReport, CRSReport, DailyCongressionalRecord, DailyCongressionalRecordIssue, DailyCongressionalRecordArticle, ListHearing, Hearing, ListHouseCommunication, HouseCommunicationByCongress, HouseCommunication, CommunicationTypeCode, CommunicationTypeName, ListHouseRequirement, HouseRequirement, MatchingCommunications, ListHouseRollCallVote, HouseRollCallVote, HouseRollCallMemberVote, MemberSummary, MemberDetail, SponsoredLegislation, CoSponsoredLegislation, ListNomination, Nomination, Nominee, NominationAction, NominationCommittee, NominationHearing, ListSenateCommunication, SenateCommunication, Summary, ListTreaty, Treaty, TreatyAction, TreatyCommittee } from './schemas/index.js'; export { ActionType, ActivityName, ActivityNameTypo, AmendmentActionSchema, AmendmentCosponsorSchema, AmendmentSchema, AmendmentSummarySchema, AmendmentTextSchema, AmendmentTextType, AmendmentToAmendment, AmendmentToAmendmentSchema, BillActionSchema, BillActionType, BillAmendmentSchema, BillCommitteeSchema, BillCommitteeStandardizeSchema, BillCosponsorSchema, BillSchema, BillSubjectSchema, BillSummarySchema, BillSummaryVersionSchema, BillTextSchema, BillTitleSchema, BoundCongressionalRecordSchema, CRSReportSchema, CapitalizedCongressionalRecord, ChamberCode, CoSponsoredLegislationSchema, CommitteeBillSchema, CommitteeCommunicationSchema, CommitteeMeetingSchema, CommitteeNominationSchema, CommitteePrintSchema, CommitteePrintTextSchema, CommitteeReportFormat, CommitteeReportReportType, CommitteeReportSchema, CommitteeReportTextSchema, CommitteeSchema, CommitteeType, CongressChamber, CongressSchema, CongressSummarySchema, CongressionalRecordSchema, DailyCongressionalRecordArticleSchema, DailyCongressionalRecordIssueSchema, DailyCongressionalRecordSchema, DailyDigestBoundCongressionalRecordSchema, HearingSchema, HouseAmendmentType, HouseBillType, HouseCommunicationByCongressSchema, HouseCommunicationSchema, HouseRequirementSchema, HouseRollCallMemberVoteSchema, HouseRollCallVoteSchema, IdentifiedBy, LawList, LawSchema, LawSummarySchema, LawType, ListCRSReportSchema, ListCommitteeMeetingSchema, ListCommitteePrintSchema, ListCommitteeReportSchema, ListCommitteeSchema, ListHearingSchema, ListHouseCommunicationSchema, ListHouseRequirementSchema, ListHouseRollCallVoteSchema, ListNominationSchema, ListSenateCommunicationSchema, ListTreatySchema, MatchingCommunicationsSchema, MemberDetailSchema, MemberSummarySchema, MemberType, NominationActionSchema, NominationCommitteeSchema, NominationHearingSchema, NominationSchema, NomineeSchema, OnBehalfOfSponsorAction, PartyCode, PartyName, RelatedBillSchema, SenateAmendmentType, SenateBillType, SenateCommunicationSchema, Session, SourceSystemCode, SourceSystemName, SponsoredLegislationSchema, StateCode, StateName, SummarySchema, TreatyActionSchema, TreatyCommitteeSchema, TreatySchema, VoteQuestion, VoteResult, VoteType } from './schemas/index.js'; import 'zod/v4'; import 'zod'; declare enum Format { XML = "xml", JSON = "json" } /** * Base parameters for all endpoints. * @inline */ interface BaseParams { format?: Format; } /** * Pagination parameters for all endpoints. * @inline */ interface PaginationParams extends BaseParams { offset?: number; limit?: number; } interface DateFilterParams { fromDateTime?: string | Date; toDateTime?: string | Date; } interface SortParams { sort?: 'updateDate+asc' | 'updateDate+desc'; } interface BasePaginatedResponse { pagination: { count: number; next: string; }; request: { contentType: 'application/json'; format: 'json'; }; } interface AbnormalPaginatedResponse<T> { Results: { IndexStart: number; Issues: T[]; SetSize: number; TotalCount: number; }; } interface CongressionalRecordFilterParams extends PaginationParams { y?: number; m?: number; d?: number; } type PaginatedResponse<T> = BasePaginatedResponse & T; declare enum LawTypeParam { PUBLIC = "pub", PRIVATE = "priv" } interface CongressGovConfig { apiKey: string; endpoint?: string; } interface RateLimitInfo { limit: number; remaining: number; } type Params = Partial<PaginationParams & BaseParams & DateFilterParams & SortParams>; declare class BaseClient { protected readonly apiKey: string; protected readonly baseUrl: string; protected readonly endpoint: string; constructor({ apiKey, endpoint }: CongressGovConfig); protected get<T>(endpoint: string, params: Params): Promise<T & { rateLimit: RateLimitInfo; }>; } declare class AmendmentClient extends BaseClient { constructor({ apiKey }: { apiKey: string; }); /** * Returns a list of amendments sorted by date of latest action. * @param params {PaginationParams & DateFilterParams} - Accepts pagination, date range filter, and format parameters * @returns A list of amendments sorted by date of latest action */ getAmendments(params?: PaginationParams & DateFilterParams): Promise<BasePaginatedResponse & { amendments: AmendmentSummary[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns a list of amendments filtered by the specified congress, sorted by date of latest action. * @param congress - The Congress number (e.g., 117) * @param params {PaginationParams & DateFilterParams} - Accepts pagination, date range filter, and format parameters * @returns List of amendments filtered by the specified congress, sorted by date of latest action */ getAmendmentsByCongress(congress: number, params?: PaginationParams & DateFilterParams): Promise<BasePaginatedResponse & { amendments: AmendmentSummary[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns a list of amendments filtered by the specified congress and amendment type, sorted by date of latest action. * @param congress - The Congress number (e.g., 117) * @param amendmentType - The type of amendment (samdt or hamdt) * @param params {PaginationParams & DateFilterParams} - Accepts pagination, date range filter, and format parameters * @returns List of amendments filtered by the specified congress and amendment type */ getAmendmentsByCongressAndType(congress: number, amendmentType: AmendmentType, params?: PaginationParams & DateFilterParams): Promise<BasePaginatedResponse & { amendments: AmendmentSummary[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns detailed information for a specified amendment. * @param congress - The Congress number (e.g., 117) * @param amendmentType - The type of amendment (samdt or hamdt) * @param amendmentNumber - The amendment number * @param params {BaseParams} - Accepts format parameter (json or xml) * @returns Detailed information for the specified amendment */ getAmendment(congress: number, amendmentType: AmendmentType, amendmentNumber: string, params?: BaseParams): Promise<BasePaginatedResponse & { amendment: Amendment; } & { rateLimit: RateLimitInfo; }>; /** * Returns the list of actions on a specified amendment. * @param congress - The Congress number (e.g., 117) * @param amendmentType - The type of amendment (samdt or hamdt) * @param amendmentNumber - The amendment number * @param params {PaginationParams} - Accepts pagination and format parameters * @returns List of actions on the specified amendment */ getAmendmentActions(congress: number, amendmentType: AmendmentType, amendmentNumber: string, params?: PaginationParams): Promise<BasePaginatedResponse & { actions: AmendmentAction[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns the list of cosponsors on a specified amendment. * @param congress - The Congress number (e.g., 117) * @param amendmentType - The type of amendment (samdt or hamdt) * @param amendmentNumber - The amendment number * @param params {PaginationParams} - Accepts pagination and formatparameters * @returns List of cosponsors on the specified amendment */ getAmendmentCosponsors(congress: number, amendmentType: AmendmentType, amendmentNumber: string, params?: PaginationParams): Promise<BasePaginatedResponse & { cosponsors: AmendmentCosponsor[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns the list of amendments to a specified amendment. * @param congress - The Congress number (e.g., 117) * @param amendmentType - The type of amendment (samdt or hamdt) * @param amendmentNumber - The amendment number * @param params {PaginationParams} - Accepts pagination and format parameters * @returns List of amendments to the specified amendment */ getAmendmentAmendments(congress: number, amendmentType: AmendmentType, amendmentNumber: string, params?: PaginationParams): Promise<BasePaginatedResponse & { amendments: Amendment[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns the list of text versions for a specified amendment from the 117th Congress onwards. * @param congress - The Congress number (e.g., 117) * @param amendmentType - The type of amendment (samdt or hamdt) * @param amendmentNumber - The amendment number * @param params {PaginationParams} - Accepts pagination and format parameters * @returns List of text versions for the specified amendment */ getAmendmentText(congress: number, amendmentType: AmendmentType, amendmentNumber: string, params?: PaginationParams): Promise<BasePaginatedResponse & { textVersions: AmendmentText[]; } & { rateLimit: RateLimitInfo; }>; } declare class BillClient extends BaseClient { constructor({ apiKey }: { apiKey: string; }); /** * Returns a list of bills sorted by date of latest action. * @param params {PaginationParams & DateFilterParams & SortParams} - Accepts pagination, date range filter, sort, and format parameters * @returns A list of bills sorted by date of latest action */ getBills(params?: PaginationParams & DateFilterParams & SortParams): Promise<BasePaginatedResponse & { bills: BillSummary[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns a list of bills filtered by the specified congress, sorted by date of latest action. * @param congress - The Congress number (e.g., 117) * @param params {PaginationParams & DateFilterParams & SortParams} - Accepts pagination, date range filter, sort, and format parameters * @returns Returns a list of bills filtered by the specified congress, sorted by date of latest action. */ getBillsByCongress(congress: number, params?: PaginationParams & DateFilterParams & SortParams): Promise<BasePaginatedResponse & { bills: BillSummary[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns a list of bills filtered by the specified congress and bill type, sorted by date of latest action. * @param congress - The Congress number (e.g., 117) * @param billType - The type of bill. Value can be hr, s, hjres, sjres, hconres, sconres, hres, or sres. * @param params {PaginationParams & DateFilterParams & SortParams} - Accepts pagination, date range filter, sort, and format parameters * @returns List of bills filtered by the specified congress and bill type, sorted by date of latest action. */ getBillsByCongressAndType(congress: number, billType: BillType, params?: PaginationParams & DateFilterParams & SortParams): Promise<BasePaginatedResponse & { bills: BillSummary[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns detailed information for a specified bill. * @param congress - The Congress number (e.g., 117) * @param billType - The type of bill. Value can be hr, s, hjres, sjres, hconres, sconres, hres, or sres. * @param billNumber - The bill number * @param params {BaseParams} - Accepts format parameter (json or xml) * @returns Detailed information for a specified bill. */ getBill(congress: number, billType: BillType, billNumber: string, params?: BaseParams): Promise<{ bill: Bill; } & { rateLimit: RateLimitInfo; }>; /** * Returns the list of actions on a specified bill. * @param congress - The Congress number (e.g., 117) * @param billType - The type of bill * @param billNumber - The bill number * @param params {PaginationParams} - Accepts pagination and format parameters * @returns List of actions on the specified bill */ getBillActions(congress: number, billType: BillType, billNumber: string, params?: PaginationParams & DateFilterParams & SortParams): Promise<BasePaginatedResponse & { actions: BillAction[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns the list of amendments to a specified bill. * @param congress - The Congress number (e.g., 117) * @param billType - The type of bill * @param billNumber - The bill number * @param params {PaginationParams} - Accepts pagination and format parameters * @returns List of amendments to the specified bill */ getBillAmendments(congress: number, billType: BillType, billNumber: string, params?: PaginationParams): Promise<BasePaginatedResponse & { amendments: BillAmendment[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns the list of committees associated with a specified bill. * @param congress - The Congress number (e.g., 117) * @param billType - The type of bill * @param billNumber - The bill number * @param params {PaginationParams} - Accepts pagination and format parameters * @returns List of committees associated with the specified bill */ getBillCommittees(congress: number, billType: BillType, billNumber: string, params?: PaginationParams): Promise<BasePaginatedResponse & { committees: BillCommittee[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns the list of cosponsors on a specified bill. * @param congress - The Congress number (e.g., 117) * @param billType - The type of bill * @param billNumber - The bill number * @param params {PaginationParams & DateFilterParams & SortParams} - Accepts pagination, date range filter, sort, and format parameters * @returns List of cosponsors on the specified bill */ getBillCosponsors(congress: number, billType: BillType, billNumber: string, params?: PaginationParams & DateFilterParams & SortParams): Promise<BasePaginatedResponse & { cosponsors: BillCosponsor[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns the list of related bills to a specified bill. * @param congress - The Congress number (e.g., 117) * @param billType - The type of bill * @param billNumber - The bill number * @param params {PaginationParams} - Accepts pagination and format parameters * @returns List of related bills to the specified bill */ getRelatedBills(congress: number, billType: BillType, billNumber: string, params?: PaginationParams): Promise<BasePaginatedResponse & { relatedBills: RelatedBill[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns the list of legislative subjects on a specified bill. * @param congress - The Congress number (e.g., 117) * @param billType - The type of bill * @param billNumber - The bill number * @param params {PaginationParams & DateFilterParams} - Accepts pagination, date range filter, and format parameters * @returns List of legislative subjects on the specified bill */ getBillSubjects(congress: number, billType: BillType, billNumber: string, params?: PaginationParams & DateFilterParams): Promise<BasePaginatedResponse & { subjects: BillSubject; } & { rateLimit: RateLimitInfo; }>; /** * Returns the list of summaries for a specified bill. * @param congress - The Congress number (e.g., 117) * @param billType - The type of bill * @param billNumber - The bill number * @param params {PaginationParams} - Accepts pagination and format parameters * @returns List of summaries for the specified bill */ getBillSummaries(congress: number, billType: BillType, billNumber: string, params?: PaginationParams): Promise<BasePaginatedResponse & { summaries: BillSummaryVersion[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns the list of text versions for a specified bill. * @param congress - The Congress number (e.g., 117) * @param billType - The type of bill * @param billNumber - The bill number * @param params {PaginationParams} - Accepts pagination and format parameters * @returns List of text versions for the specified bill */ getBillText(congress: number, billType: BillType, billNumber: string, params?: PaginationParams): Promise<BasePaginatedResponse & { textVersions: BillText[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns the list of titles for a specified bill. * @param congress - The Congress number (e.g., 117) * @param billType - The type of bill * @param billNumber - The bill number * @param params {PaginationParams & DateFilterParams} - Accepts pagination, date range filter, and format parameters * @returns List of titles for the specified bill */ getBillTitles(congress: number, billType: BillType, billNumber: string, params?: PaginationParams & DateFilterParams): Promise<BasePaginatedResponse & { titles: BillTitle[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns a list of laws filtered by the specified congress. * @param congress - The Congress number (e.g., 117) * @param params {PaginationParams} - Accepts pagination and format parameters * @returns List of laws for the specified congress */ getLaws(congress: number, params?: PaginationParams & DateFilterParams & SortParams): Promise<BasePaginatedResponse & { bills: Law[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns a list of laws filtered by specified congress and law type. * @param congress - The Congress number (e.g., 117) * @param lawType - The type of law (public or private) * @param params {PaginationParams} - Accepts pagination and format parameters * @returns List of laws for the specified congress and law type */ getLawsByType(congress: number, lawType: LawTypeParam, params?: PaginationParams & DateFilterParams & SortParams): Promise<BasePaginatedResponse & { bills: Law[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns a law filtered by specified congress, law type, and law number. * @param congress - The Congress number (e.g., 117) * @param lawType - The type of law (public or private) * @param lawNumber - The law number * @param params {PaginationParams} - Accepts pagination and format parameters * @returns The specified law */ getLaw(congress: number, lawType: LawTypeParam, lawNumber: string, params?: PaginationParams): Promise<{ bill: Law; } & { rateLimit: RateLimitInfo; }>; } declare class BoundCongressionalRecordClient extends BaseClient { constructor({ apiKey }: { apiKey: string; }); /** * Returns a list of bound Congressional Records sorted by most recent. * @param params {PaginationParams} - Pagination and format parameters * @returns A list of bound Congressional Records */ getRecords(params?: PaginationParams): Promise<BasePaginatedResponse & { boundCongressionalRecord: BoundCongressionalRecord[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns a list of bound Congressional Records filtered by the specified year. * @param year - The year to filter by * @param params {PaginationParams} - Pagination and format parameters * @returns A list of bound Congressional Records for the specified year */ getRecordsByYear(year: string, params?: PaginationParams): Promise<BasePaginatedResponse & { boundCongressionalRecord: BoundCongressionalRecord[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns a list of bound Congressional Records filtered by the specified year and month. * @param year - The year to filter by * @param month - The month to filter by (01-12) * @param params {PaginationParams} - Pagination and format parameters * @returns A list of bound Congressional Records for the specified year and month */ getRecordsByYearAndMonth(year: string, month: string, params?: PaginationParams): Promise<BasePaginatedResponse & { boundCongressionalRecord: BoundCongressionalRecord[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns a list of bound Congressional Records filtered by the specified year, month, and day. * @param year - The year to filter by * @param month - The month to filter by (01-12) * @param day - The day to filter by (01-31) * @param params {PaginationParams} - Pagination and format parameters * @returns A list of bound Congressional Records for the specified date */ getRecordsByDate(year: string, month: string, day: string, params?: PaginationParams): Promise<BasePaginatedResponse & { boundCongressionalRecord: DailyDigestBoundCongressionalRecord[]; } & { rateLimit: RateLimitInfo; }>; } declare class CommitteeMeetingClient extends BaseClient { constructor({ apiKey }: { apiKey: string; }); /** * Returns a list of committee meetings. * @param params {PaginationParams} - Pagination parameters * @returns A list of committee meetings */ getMeetings(params?: PaginationParams): Promise<{ committeeMeetings: ListCommitteeMeeting[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns a list of committee meetings filtered by the specified congress. * @param congress - The congress to filter by * @param params {PaginationParams} - Pagination parameters * @returns A list of committee meetings for the specified congress */ getMeetingsByCongress(congress: number, params?: PaginationParams): Promise<{ committeeMeetings: ListCommitteeMeeting[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns a list of committee meetings filtered by the specified congress and chamber. * @param congress - The congress to filter by * @param chamber - The chamber to filter by * @param params {PaginationParams} - Pagination parameters * @returns A list of committee meetings for the specified congress and chamber */ getMeetingsByCongressAndChamber(congress: number, chamber: Chamber, params?: PaginationParams): Promise<{ committeeMeetings: ListCommitteeMeeting[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns detailed information for a specified committee meeting. * @param congress - The congress of the meeting * @param chamber - The chamber of the meeting * @param eventId - The event ID of the meeting * @param params {PaginationParams} - Pagination parameters * @returns Detailed information for the specified committee meeting */ getMeeting(congress: number, chamber: Chamber, eventId: string, params?: PaginationParams): Promise<{ committeeMeeting: CommitteeMeeting; } & { rateLimit: RateLimitInfo; }>; } declare class CommitteePrintClient extends BaseClient { constructor({ apiKey }: { apiKey: string; }); /** * Returns a list of committee prints. * @param params {PaginationParams & DateFilterParams} - Accepts pagination, date range, and format parameters * @returns A list of committee prints */ getPrints(params?: PaginationParams & DateFilterParams): Promise<{ committeePrints: ListCommitteePrint[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns a list of committee prints filtered by the specified congress. * @param congress - The congress to filter by * @param params {PaginationParams & DateFilterParams} - Accepts pagination, date range, and format parameters * @returns A list of committee prints for the specified congress */ getPrintsByCongress(congress: number, params?: PaginationParams & DateFilterParams): Promise<{ committeePrints: ListCommitteePrint[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns a list of committee prints filtered by the specified congress and chamber. * @param congress - The congress to filter by * @param chamber - The chamber to filter by * @param params {PaginationParams & DateFilterParams} - Accepts pagination, date range, and format parameters * @returns A list of committee prints for the specified congress and chamber */ getPrintsByCongressAndChamber(congress: number, chamber: Chamber, params?: PaginationParams & DateFilterParams): Promise<{ committeePrints: ListCommitteePrint[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns detailed information for a specified committee print. * @param congress - The congress of the print * @param chamber - The chamber of the print * @param printNumber - The print number * @param params {BaseParams} - Accepts format parameters * @returns Detailed information for the specified committee print */ getPrint(congress: number, chamber: Chamber, printNumber: string, params?: BaseParams): Promise<{ committeePrint: CommitteePrint[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns the list of texts for a specified committee print. * @param congress - The congress of the print * @param chamber - The chamber of the print * @param jacketNumber - The jacket number * @param params {PaginationParams} - Accepts pagination and format parameters * @returns List of texts for a specified committee print. */ getPrintTexts(congress: number, chamber: Chamber, jacketNumber: string, params?: PaginationParams): Promise<{ text: CommitteePrintText[]; } & { rateLimit: RateLimitInfo; }>; } declare class CommitteeReportClient extends BaseClient { constructor({ apiKey }: { apiKey: string; }); /** * Returns a list of committee reports. * @param params {PaginationParams & DateFilterParams & { conference: boolean}} - Accepts pagination, date range, and format parameters * @returns A list of committee reports */ getReports(params?: PaginationParams & DateFilterParams & { conference?: boolean; }): Promise<BasePaginatedResponse & { reports: ListCommitteeReport[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns a list of committee reports filtered by the specified congress. * @param congress - The congress to filter by * @param params {PaginationParams & DateFilterParams & { conference: boolean}} - Accepts pagination, date range, and format parameters * @returns A list of committee reports for the specified congress */ getReportsByCongress(congress: number, params?: PaginationParams & DateFilterParams & { conference?: boolean; }): Promise<BasePaginatedResponse & { reports: ListCommitteeReport[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns a list of committee reports filtered by the specified congress and chamber. * @param congress - The congress to filter by * @param reportType - The type of the report * @param params {PaginationParams & DateFilterParams & { conference: boolean}} - Accepts pagination, date range, and format parameters * @returns A list of committee reports for the specified congress and chamber */ getReportsByCongressAndChamber(congress: number, reportType: CommitteeReportType, params?: PaginationParams & DateFilterParams & { conference?: boolean; }): Promise<BasePaginatedResponse & { reports: ListCommitteeReport[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns detailed information for a specified committee report. * @param congress - The congress of the report * @param reportType - The type of the report * @param reportNumber - The report number * @param params {BaseParams} - Accepts format parameters * @returns Detailed information for the specified committee report */ getCommitteeReports(congress: number, reportType: CommitteeReportType, reportNumber: string, params?: BaseParams): Promise<{ committeeReports: CommitteeReport[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns the list of texts for a specified committee report. * @param congress - The congress of the report * @param reportType - The type of the report * @param reportNumber - The report number * @param params {PaginationParams} - Accepts pagination and format parameters * @returns A list of report texts */ getReportTexts(congress: number, reportType: CommitteeReportType, reportNumber: string, params?: PaginationParams): Promise<BasePaginatedResponse & { text: CommitteeReportText[]; } & { rateLimit: RateLimitInfo; }>; } declare class CommitteeClient extends BaseClient { constructor({ apiKey }: { apiKey: string; }); /** * Returns a list of congressional committees. * @param params {PaginationParams} - Accepts pagination and format parameters * @returns A list of congressional committees */ getCommittees(params?: PaginationParams): Promise<BasePaginatedResponse & { committees: ListCommittee[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns a list of congressional committees filtered by the specified chamber. * @param chamber - The chamber to filter by * @param params {PaginationParams} - Accepts pagination and format parameters * @returns A list of congressional committees for the specified chamber */ getCommitteesByChamber(chamber: Chamber, params?: PaginationParams): Promise<BasePaginatedResponse & { committees: ListCommittee[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns a list of congressional committees filtered by the specified congress. * @param congress - The congress to filter by * @param params {PaginationParams} - Accepts pagination and format parameters * @returns A list of congressional committees for the specified congress */ getCommitteesByCongress(congress: number, params?: PaginationParams): Promise<BasePaginatedResponse & { committees: ListCommittee[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns a list of committees filtered by the specified congress and chamber. * @param congress - The congress to filter by * @param chamber - The chamber to filter by * @param params {PaginationParams} - Accepts pagination and format parameters * @returns A list of committees for the specified congress and chamber */ getCommitteesByCongressAndChamber(congress: number, chamber: Chamber, params?: PaginationParams): Promise<BasePaginatedResponse & { committees: ListCommittee[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns detailed information for a specified congressional committee. * @param chamber - The chamber of the committee * @param committeeCode - The committee code * @param params {PaginationParams} - Accepts pagination and format parameters * @returns Detailed information for the specified committee */ getCommittee(chamber: Chamber, committeeCode: string, params?: PaginationParams): Promise<{ committee: Committee; } & { rateLimit: RateLimitInfo; }>; /** * Returns the list of legislation associated with the specified congressional committee. * @param chamber - The chamber of the committee * @param committeeCode - The committee code * @param params {PaginationParams} - Accepts pagination and format parameters * @returns A list of bills associated with the committee */ getCommitteeBills(chamber: Chamber, committeeCode: string, params?: PaginationParams): Promise<{ pagination: { count: number; next: string; }; request: { contentType: "application/json"; format: "json"; }; 'committee-bills'?: { bills: CommitteeBill[]; }; rateLimit: RateLimitInfo; committeeBills: { bills: CommitteeBill[]; }; }>; /** * Returns the list of committee reports associated with a specified congressional committee. * @param chamber - The chamber of the committee * @param committeeCode - The committee code * @param params {PaginationParams} - Accepts pagination and format parameters * @returns A list of committee reports */ getCommitteeReports(chamber: Chamber, committeeCode: string, params?: PaginationParams): Promise<BasePaginatedResponse & { reports: ListCommitteeReport[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns the list of nominations associated with a specified congressional committee. * @param chamber - The chamber of the committee * @param committeeCode - The committee code * @param params {PaginationParams} - Accepts pagination and format parameters * @returns A list of nominations */ getCommitteeNominations(chamber: Chamber, committeeCode: string, params?: PaginationParams): Promise<BasePaginatedResponse & { nominations: CommitteeNomination[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns the list of House communications associated with a specified congressional committee. * @param chamber - The chamber of the committee * @param committeeCode - The committee code * @param params {PaginationParams} - Accepts pagination and format parameters * @returns A list of House communications */ getCommitteeHouseCommunications(chamber: Chamber, committeeCode: string, params?: PaginationParams): Promise<BasePaginatedResponse & { houseCommunications: CommitteeCommunication[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns the list of Senate communications associated with a specified congressional committee. * @param chamber - The chamber of the committee * @param committeeCode - The committee code * @param params {PaginationParams} - Accepts pagination and format parameters * @returns A list of Senate communications */ getCommitteeSenateCommunications(chamber: Chamber, committeeCode: string, params?: PaginationParams): Promise<BasePaginatedResponse & { senateCommunications: CommitteeCommunication[]; } & { rateLimit: RateLimitInfo; }>; } declare class CongressClient extends BaseClient { constructor({ apiKey }: { apiKey: string; }); /** * Returns a list of congresses and congressional sessions. * @param params {@link PaginationParams} - Pagination and format parameters * @returns A list of {@link CongressSummary congresses} and their sessions */ getCongresses(params?: PaginationParams): Promise<BasePaginatedResponse & { congresses: CongressSummary[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns detailed information for a specified congress. * @param congress - The Congress number (e.g., 117) * @param params {@link BaseParams} - Accepts format parameter (json or xml) * @returns {@link Congress Detail} information for the specified congress */ getCongress(congress: number, params?: BaseParams): Promise<{ congress: Congress; } & { rateLimit: RateLimitInfo; }>; /** * Returns detailed information for the current congress. * @param params {@link BaseParams} - Accepts format parameter (json or xml) * @returns {@link Congress Detail} information for the current congress */ getCurrentCongress(params?: BaseParams): Promise<{ congress: Congress; } & { rateLimit: RateLimitInfo; }>; } declare class CongressionalRecordClient extends BaseClient { constructor({ apiKey }: { apiKey: string; }); /** * Returns a list of congressional record issues sorted by most recent. * @param params {CongressionalRecordFilterParams} - Pagination parameters as well as y, m, d for filtering by date * @returns A list of congressional record issues */ getIssues(params?: CongressionalRecordFilterParams): Promise<PaginatedResponse<{ issues: CongressionalRecord[]; }>>; } declare class CRSReportClient extends BaseClient { constructor({ apiKey }: { apiKey: string; }); /** * Returns Congressional Research Service (CRS) report data from the API. * @param params {PaginationParams} - Pagination and format parameters * @returns A list of CRS reports */ getReports(params?: PaginationParams): Promise<{ CRSReports: ListCRSReport[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns detailed information for a specified Congressional Research Service (CRS) report. * @param reportNumber - The report number to retrieve * @param params {BaseParams} - Format parameters * @returns Detailed information for the specified CRS report */ getReport(reportNumber: string, params?: BaseParams): Promise<{ CRSReport: CRSReport; } & { rateLimit: RateLimitInfo; }>; } declare class DailyCongressionalRecordClient extends BaseClient { constructor({ apiKey }: { apiKey: string; }); /** * Returns a list of daily congressional record issues sorted by most recent. * @param params {PaginationParams} - Accepts pagination and format parameters * @returns A list of daily congressional record issues */ getRecords(params?: PaginationParams): Promise<{ dailyCongressionalRecord: DailyCongressionalRecord[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns a list of daily Congressional Records filtered by the specified volume number. * @param volumeNumber - The volume number to filter by * @param params {PaginationParams} - Acceps pagination and format parameters * @returns A list of daily congressional records for the specified volume */ getRecordsByVolume(volumeNumber: number, params?: PaginationParams): Promise<{ dailyCongressionalRecord: DailyCongressionalRecord[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns a list of daily Congressional Records filtered by the specified volume number and issue number. * @param volumeNumber - The volume number to filter by * @param issueNumber - The issue number to filter by * @param params {BaseParams} - Accepts format parameters * @returns A list of daily congressional records for the specified volume and issue */ getRecordsByVolumeAndIssue(volumeNumber: number, issueNumber: number, params?: BaseParams): Promise<{ issue: DailyCongressionalRecordIssue; } & { rateLimit: RateLimitInfo; }>; /** * Returns a list of daily Congressional Record articles filtered by the specified volume number and issue number. * @param volumeNumber - The volume number to filter by * @param issueNumber - The issue number to filter by * @param params {PaginationParams} - Accepts pagination and format parameters * @returns A list of daily congressional record articles for the specified volume and issue */ getArticles(volumeNumber: number, issueNumber: number, params?: PaginationParams): Promise<{ articles: DailyCongressionalRecordArticle[]; } & { rateLimit: RateLimitInfo; }>; } declare class HearingClient extends BaseClient { constructor({ apiKey }: { apiKey: string; }); /** * Returns a list of hearings. * @param params {PaginationParams} - Accepts pagination and format parameters * @returns A list of hearings */ getHearings(params?: PaginationParams): Promise<BasePaginatedResponse & { hearings: ListHearing[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns a list of hearings filtered by the specified congress. * @param congress - The congress to filter by * @param params {PaginationParams} - Accepts pagination and format parameters * @returns A list of hearings for the specified congress */ getHearingsByCongress(congress: number, params?: PaginationParams): Promise<BasePaginatedResponse & { hearings: ListHearing[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns a list of hearings filtered by the specified congress and chamber. * @param congress - The congress to filter by * @param chamber - The chamber to filter by * @param params {PaginationParams} - Pagination parameters * @returns A list of hearings for the specified congress and chamber */ getHearingsByCongressAndChamber(congress: number, chamber: Chamber, params?: PaginationParams): Promise<BasePaginatedResponse & { hearings: ListHearing[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns detailed information for a specified hearing. * @param congress - The congress of the hearing * @param chamber - The chamber of the hearing * @param jacketNumber - The jacket number of the hearing * @param params {BaseParams} - Accepts format parameters * @returns Detailed information for the specified hearing */ getHearing(congress: number, chamber: Chamber, jacketNumber: string, params?: BaseParams): Promise<{ hearing: Hearing; } & { rateLimit: RateLimitInfo; }>; } declare class HouseCommunicationClient extends BaseClient { constructor({ apiKey }: { apiKey: string; }); /** * Returns a list of House communications. * @param params {PaginationParams} - Accepts pagination and format parameters * @returns A list of House communications */ getCommunications(params?: PaginationParams): Promise<{ houseCommunications: ListHouseCommunication[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns a list of House communications filtered by the specified congress. * @param congress - The congress to filter by * @param params {PaginationParams} - Accepts pagination and format parameters * @returns A list of House communications for the specified congress */ getCommunicationsByCongress(congress: number, params?: PaginationParams): Promise<{ houseCommunications: HouseCommunicationByCongress[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns a list of House communications filtered by the specified congress and communication type. * @param congress - The congress to filter by * @param communicationType - The communication type to filter by * @param params {PaginationParams} - Accepts pagination and format parameters * @returns A list of House communications for the specified congress and communication type */ getCommunicationsByCongressAndType(congress: number, communicationType: string, params?: PaginationParams): Promise<{ houseCommunications: HouseCommunicationByCongress[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns detailed information for a specified House communication. * @param congress - The congress of the communication * @param communicationType - The type of the communication * @param communicationNumber - The communication number * @param params {BaseParams} - Accepts format parameter * @returns Detailed information for the specified House communication */ getCommunication(congress: number, communicationType: string, communicationNumber: string, params?: BaseParams): Promise<{ 'house-communication'?: HouseCommunication; rateLimit: RateLimitInfo; houseCommunication: { number: number; congress: number; sessionNumber: 1 | 2; updateDate: string; chamber: "House"; committees: { url: string; name: string; systemCode: string; referralDate: string; }[]; communicationType: { code: CommunicationTypeCode; name: CommunicationTypeName; }; reportNature: string; submittingAgency: string; submittingOfficial: string; abstract: string; houseDocument: { title: string; citation: string; }[]; congressionalRecordDate: string; isRulemaking: string; congressNumber?: number | undefined; legalAuthority?: string | undefined; matchingRequirements?: { number: string; url: string; }[] | undefined; }; }>; } declare class HouseRequirementClient extends BaseClient { constructor({ apiKey }: { apiKey: string; }); /** * Returns a list of House requirements. * @param params {PaginationParams} - Accepts pagination and format parameters * @returns A list of House requirements */ getRequirements(params?: PaginationParams): Promise<{ houseRequirements: PaginatedResponse<ListHouseRequirement[]>; } & { rateLimit: RateLimitInfo; }>; /** * Returns detailed information for a specified House requirement. * @param requirementNumber - The requirement number * @param params {BaseParams} - Accepts format parameter * @returns Detailed information for the specified House requirement */ getRequirement(requirementNumber: string, params?: BaseParams): Promise<{ houseRequirement: HouseRequirement; } & { rateLimit: RateLimitInfo; }>; /** * Returns a list of matching communications to a House requirement. * @param requirementNumber - The requirement number * @param params {PaginationParams} - Accepts pagination and format parameters * @returns A list of matching communications */ getMatchingCommunications(requirementNumber: string, params?: BaseParams): Promise<{ matchingCommunications: MatchingCommunications[]; } & { rateLimit: RateLimitInfo; }>; } declare class HouseVoteClient extends BaseClient { constructor({ apiKey }: { apiKey: string; }); /** * Returns House of Representatives roll call vote data from the API. This endpoint is currently in beta. * @param params {PaginationParams} - Accepts pagination and format parameters * @returns A list of House roll call votes */ getHouseRollCallVotes(params?: PaginationParams): Promise<BasePaginatedResponse & { houseRollCallVotes: ListHouseRollCallVote[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns House of Representatives roll call vote data filtered by the specified Congress. This endpoint is currently in beta. * @param congress - The congress to filter by * @param params {PaginationParams} - Accepts pagination and format parameters * @returns A list of House roll call votes for the specified congress */ getHouseRollCallVotesByCongress(congress: number, params?: PaginationParams): Promise<BasePaginatedResponse & { houseRollCallVotes: ListHouseRollCallVote[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns House of Representatives roll call vote data filtered by the specified Congress and session. This endpoint is currently in beta. * @param congress - The congress to filter by * @param session - The session to filter by * @param params {PaginationParams} - Accepts pagination and format parameters * @returns A list of House roll call votes for the specified congress and session */ getHouseRollCallVotesByCongressAndSession(congress: number, session: number, params?: PaginationParams): Promise<BasePaginatedResponse & { houseRollCallVotes: ListHouseRollCallVote[]; } & { rateLimit: RateLimitInfo; }>; /** * Returns detailed