- Fetch bill actions from Congress.gov and populate the action timeline - Add nightly batch task and beat schedule for active bill actions - Add admin reprocess endpoint for per-bill debugging - Add BriefPanel with "What Changed" view and version history - Add External API Health section with per-source latency testing - Redesign Manual Controls as health panel with status dots and descriptions - Add Resume Analysis task for stalled LLM jobs - Add Backfill Dates & Links task for bills with null metadata - Fix LLM provider/model DB overrides being ignored (env vars used instead) - Fix Gemini 404: gemini-1.5-pro deprecated → gemini-2.0-flash - Fix Anthropic models list: use REST API directly (SDK too old for .models) - Replace test-LLM full analysis with lightweight ping (max_tokens=20) - Add has_document field to BillDetail; show "No bill text published" state - Fix "Introduced: —" showing for bills with null introduced_date - Add bills_missing_sponsor and bills_missing_metadata to admin stats - Add GovInfo health check using /collections endpoint (fixes 500 from /packages) Authored-By: Jack Levy
164 lines
3.2 KiB
TypeScript
164 lines
3.2 KiB
TypeScript
export interface MemberTerm {
|
|
congress?: number;
|
|
chamber?: string;
|
|
partyName?: string;
|
|
stateCode?: string;
|
|
stateName?: string;
|
|
startYear?: number;
|
|
endYear?: number;
|
|
district?: number;
|
|
}
|
|
|
|
export interface MemberLeadership {
|
|
type?: string;
|
|
congress?: number;
|
|
current?: boolean;
|
|
}
|
|
|
|
export interface MemberTrendScore {
|
|
score_date: string;
|
|
newsapi_count: number;
|
|
gnews_count: number;
|
|
gtrends_score: number;
|
|
composite_score: number;
|
|
}
|
|
|
|
export interface MemberNewsArticle {
|
|
id: number;
|
|
source?: string;
|
|
headline?: string;
|
|
url?: string;
|
|
published_at?: string;
|
|
relevance_score?: number;
|
|
}
|
|
|
|
export interface Member {
|
|
bioguide_id: string;
|
|
name: string;
|
|
first_name?: string;
|
|
last_name?: string;
|
|
party?: string;
|
|
state?: string;
|
|
chamber?: string;
|
|
district?: string;
|
|
photo_url?: string;
|
|
official_url?: string;
|
|
congress_url?: string;
|
|
birth_year?: string;
|
|
address?: string;
|
|
phone?: string;
|
|
terms_json?: MemberTerm[];
|
|
leadership_json?: MemberLeadership[];
|
|
sponsored_count?: number;
|
|
cosponsored_count?: number;
|
|
latest_trend?: MemberTrendScore;
|
|
}
|
|
|
|
export interface CitedPoint {
|
|
text: string;
|
|
citation: string;
|
|
quote: string;
|
|
}
|
|
|
|
export interface BriefSchema {
|
|
id: number;
|
|
brief_type?: string;
|
|
summary?: string;
|
|
key_points?: (string | CitedPoint)[];
|
|
risks?: (string | CitedPoint)[];
|
|
deadlines?: { date: string | null; description: string }[];
|
|
topic_tags?: string[];
|
|
llm_provider?: string;
|
|
llm_model?: string;
|
|
govinfo_url?: string;
|
|
created_at?: string;
|
|
}
|
|
|
|
export interface TrendScore {
|
|
score_date: string;
|
|
newsapi_count: number;
|
|
gnews_count: number;
|
|
gtrends_score: number;
|
|
composite_score: number;
|
|
}
|
|
|
|
export interface BillAction {
|
|
id: number;
|
|
action_date?: string;
|
|
action_text?: string;
|
|
action_type?: string;
|
|
chamber?: string;
|
|
}
|
|
|
|
export interface NewsArticle {
|
|
id: number;
|
|
source?: string;
|
|
headline?: string;
|
|
url?: string;
|
|
published_at?: string;
|
|
relevance_score?: number;
|
|
}
|
|
|
|
export interface Bill {
|
|
bill_id: string;
|
|
congress_number: number;
|
|
bill_type: string;
|
|
bill_number: number;
|
|
title?: string;
|
|
short_title?: string;
|
|
introduced_date?: string;
|
|
latest_action_date?: string;
|
|
latest_action_text?: string;
|
|
status?: string;
|
|
chamber?: string;
|
|
congress_url?: string;
|
|
sponsor?: Member;
|
|
latest_brief?: BriefSchema;
|
|
latest_trend?: TrendScore;
|
|
updated_at?: string;
|
|
}
|
|
|
|
export interface BillDetail extends Bill {
|
|
actions: BillAction[];
|
|
news_articles: NewsArticle[];
|
|
trend_scores: TrendScore[];
|
|
briefs: BriefSchema[];
|
|
has_document: boolean;
|
|
}
|
|
|
|
export interface PaginatedResponse<T> {
|
|
items: T[];
|
|
total: number;
|
|
page: number;
|
|
per_page: number;
|
|
pages: number;
|
|
}
|
|
|
|
export interface Follow {
|
|
id: number;
|
|
follow_type: "bill" | "member" | "topic";
|
|
follow_value: string;
|
|
created_at: string;
|
|
}
|
|
|
|
export interface DashboardData {
|
|
feed: Bill[];
|
|
trending: Bill[];
|
|
follows: { bills: number; members: number; topics: number };
|
|
}
|
|
|
|
export interface SettingsData {
|
|
llm_provider: string;
|
|
llm_model: string;
|
|
congress_poll_interval_minutes: number;
|
|
newsapi_enabled: boolean;
|
|
pytrends_enabled: boolean;
|
|
}
|
|
|
|
export interface NotificationSettings {
|
|
ntfy_topic_url: string;
|
|
ntfy_token: string;
|
|
ntfy_enabled: boolean;
|
|
rss_token: string | null;
|
|
}
|