// TypeScript mirrors of the Go API DTOs (internal/modules/matching). Scores are strings (decimal). export type Band = 'green' | 'yellow' | 'red' // ReadinessState is the per category state (a score bucket). MissionStatusCode is the overall mission // readiness verdict, a distinct code space the backend emits as ready | review | recruiting; the two // were conflated under one type, which hid review and recruiting and wrongly admitted partial and gap. export type ReadinessState = 'ready' | 'partial' | 'gap' export type MissionStatusCode = 'ready' | 'review' | 'recruiting' export interface ComponentView { component: string weight: string raw: string weighted: string rationale: string } export interface MatchedSkillView { required_skill: string candidate_skill?: string similarity: string exact: boolean matched: boolean } export interface MatchResultView { candidate_id: string requirement_id: string total_score: string band: Band band_label: string components: Record explanation: string gap_summary: string[] matched_skills: MatchedSkillView[] trace: ComponentView[] } export interface ReadinessCategory { name: string score: string weight: string state: ReadinessState } export interface MissionReadiness { status: string status_code: MissionStatusCode score: string band: Band categories: ReadinessCategory[] } export interface BattleCard { strengths: string[] gaps: string[] } export interface ClearanceIntel { current: string status: string sci_eligible: boolean ci_poly_eligible: boolean full_scope_poly: boolean expired: boolean investigation_age_months?: number expires_at?: string reinvestigation_due_at?: string recent_classified_support: boolean provenance: string provenance_label: string verified: boolean verified_at?: string } export interface RequirementArea { area: string met: boolean } export interface RiskArea { severity: 'warning' | 'info' message: string } export interface ContractReadiness { areas: RequirementArea[] risks: RiskArea[] } export interface WinImpact { level: string level_code: 'high' | 'medium' | 'low' staffing_strength: string reasons: string[] } export interface NextStep { action: string reason: string } export interface ScreenView { match: MatchResultView mission_readiness: MissionReadiness battle_card: BattleCard clearance_intelligence: ClearanceIntel contract_readiness: ContractReadiness win_impact: WinImpact next_steps: NextStep[] } export interface CandidateListView { id: string full_name: string clearance_level: string clearance_status: string years_experience: number location?: string available: boolean } export interface RequirementListView { id: string title: string required_level: string customer_agency?: string key_personnel: boolean } export interface SlateMemberView { candidate_id: string rank: number total_score: string band: Band band_label: string explanation: string gap_summary: string[] } export interface SlateResult { slate_id: string requirement_id: string name: string members: SlateMemberView[] } // AEDT adverse impact report (the four fifths analysis). Every figure is computed from recorded // outcomes joined to consented demographics by the compliance role; nothing is fabricated. export interface ImpactRow { group: string considered: number selected: number rate: string impact_ratio: string flagged: boolean } export interface AnalysisSection { stage: string total_n: number unknown_count: number no_demographics_count: number by_gender: ImpactRow[] by_race_ethnicity: ImpactRow[] intersectional: ImpactRow[] } export interface AdverseImpactReport { generated_at: string data_from: string data_to: string source: string method: string selection: AnalysisSection screening: AnalysisSection } export interface OpportunityFitView { requirement_id: string title: string customer_agency?: string score: string band: Band status: string } // ---------- Mission Check (W1) ---------- // The Mission Check advisory recommendation. DO NOT SUBMIT is a derived label on the Red band. export type MissionRecommendation = 'SUBMIT' | 'REVIEW' | 'DO NOT SUBMIT' export interface MissionCheckFitRow extends OpportunityFitView { recommendation: MissionRecommendation recommendation_reason: string } // ParsedCandidate is what the extractor read from the resume, surfaced so the user can review and Save it. export interface ParsedCandidate { full_name: string clearance_level: string clearance_poly: string clearance_status: string years_experience: number location: string skills: string[] certifications: string[] customer_experience: string[] } // ParsedRequirement is what the JD parsed to, so the Mode B requirement panel reflects what was scored. export interface ParsedRequirement { title: string required_level: string customer_agency: string key_personnel: boolean } // Mode A: the resume scored against every open opportunity, ranked. export interface MissionCheckModeAResult { rows: MissionCheckFitRow[] candidate: ParsedCandidate assumptions: string[] data_categories: string[] } // Mode B: the resume scored against one pasted job description. view is the exact ScreenView /screen returns. export interface MissionCheckModeBResult { view: ScreenView recommendation: MissionRecommendation recommendation_reason: string candidate: ParsedCandidate requirement: ParsedRequirement assumptions: string[] data_categories: string[] } // SaveCandidateRequest is the reviewed, structured candidate the user chose to persist from a result. // Clearance fields are DB codes; clearance is a self reported indicator the user confirmed, not verified. export interface SaveCandidateRequest { full_name: string clearance_level: string clearance_poly: string clearance_status: string years_experience: number location: string remote: boolean relocatable: boolean available: boolean skills: string[] certifications: string[] customer_experience: string[] } export interface RankedCandidateView { candidate_id: string full_name: string clearance_level: string clearance_status: string years_experience: number location?: string available: boolean score: string band: Band status: string } // ---- SAM.gov Contract Opportunities (cached federal opportunity feed) ---- export interface SamPOC { type?: string fullName?: string title?: string email?: string phone?: string fax?: string } export interface SamOpportunity { notice_id: string title: string solicitation_number: string department: string sub_agency: string full_agency_path: string naics_code: string psc_code: string set_aside_code: string set_aside: string type: string posted_date: string response_deadline: string active: boolean place_of_performance: { city: string; state: string; zip: string } ui_link: string description_url: string resource_links: string[] point_of_contact: SamPOC[] source: string synced_at: string } export interface OpportunityFilters { naics?: string[] set_aside?: string[] state?: string[] department?: string[] sub_agency?: string[] q?: string active_only?: boolean limit?: number } // ---- USASpending federal awards (incumbent intel + Galapagos past performance) ---- export interface FederalAward { award_uid: string award_id: string recipient_name: string recipient_uei: string award_amount: string awarding_agency: string awarding_sub_agency: string pop_start_date: string pop_end_date: string naics_code: string naics_description: string description: string is_galapagos: boolean source: string synced_at: string } // ---- BLS OEWS regional wage baseline ---- export interface WageArea { area: string area_name: string annual_mean: string annual_median: string } export interface WageBaseline { occupation_code: string occupation_title: string role: string year: string areas: WageArea[] source: string synced_at: string } // ---- External candidate sourcing (People Data Labs) ---- export interface ExternalCandidate { id: string full_name: string email: string headline: string location: string years_experience: number available: boolean external_id: string source: string clearance: string created_at: string } export interface SourcingLogEntry { id: string candidate_id: string external_id: string source: string provider: string legal_basis: string collected_at: string } // ---- Candidate workforce intelligence (computed, never hardcoded) ---- export interface IntelClearance { level: string status: string sci_eligible: boolean sci_known: boolean investigation_year?: string provenance: string verified: boolean available: boolean } export interface IntelReadiness { score: string band: Band status: string } export interface IntelProposal { value: string // YES or REVIEW reason: string } export interface IntelWinImpact { level: string // HIGH, MEDIUM, LOW basis: string } export interface IntelBestFit { requirement_id: string name: string customer_agency?: string score: string band: Band } export interface CandidateIntelligence { id: string full_name: string source: string // seed or external headline?: string years_experience: number location?: string available: boolean clearance: IntelClearance mission_readiness: IntelReadiness proposal_ready: IntelProposal win_impact: IntelWinImpact best_fit: IntelBestFit labor_category_coverage: string[] } // ---- Workforce Command Center ---- export interface CCBanner { total_cleared_workforce: number available_candidates: number proposal_ready_candidates: number active_requirements: number staffing_gaps: number high_risk_opportunities: number } export interface CCDriver { key: string; label: string; pct: string; state: ReadinessState; weight: string } export interface CCMissionReadiness { score: string band: Band status: string drivers: CCDriver[] availability_req_coverage: string flags: string[] } export interface CCOpportunity { opportunity_id: string name: string customer_agency?: string solicitation_number?: string due_date?: string value: string | null readiness_score: string total_requirements: number covered_requirements: number headcount_needed: number headcount_covered: number key_personnel_open: number staffing_risk: string staffing_risk_code: 'high' | 'medium' | 'low' } export interface CCGap { labor_category: string required_level: string required_level_label: string unmet: number blocks_key_personnel: boolean impacted_opportunities: string[] value_at_risk: string | null priced_opportunities: number unpriced_opportunities: number total_opportunities: number value_representative: boolean value_basis: string impact_modeled_pct: string impact_modeled_label: string headline: string recommendation: string } export interface CCLevelCount { level: string; label: string; total: number; available: number } export interface CCPolyCount { poly: string; label: string; total: number; available: number } export interface CCExpiryAlert { candidate_id: string full_name: string clearance_level: string days_until_expiry: number severity: 'critical' | 'warning' | 'info' } export interface CCClearanceIntel { inventory_by_level: CCLevelCount[] inventory_by_poly: CCPolyCount[] availability_windows: { now: number; d30: number; d60: number; d90: number } expiring: { expired: number due_30: number due_60: number due_90: number reinvestigation_overdue: number alerts: CCExpiryAlert[] } } export interface CCLcatCoverage { labor_category: string; filled: number; demanded: number; coverage: string; color: Band } export interface CCOppRef { opportunity_id: string; name: string } export interface CCProposalReadiness { ready: number at_risk: number key_personnel_missing: number labor_categories_missing: number ready_opportunities: CCOppRef[] at_risk_opportunities: CCOppRef[] key_personnel_missing_opportunities: CCOppRef[] labor_categories_missing_opportunities: CCOppRef[] } export interface CCWinCandidate { candidate_id: string full_name: string clearance_level: string poly: string years_experience: number } export interface CCHeatMetro { metro: string; total: number; available: number; cleared: number } export interface CCRecommendation { severity: 'high' | 'medium' | 'low' message: string action_target: string related_ids: string[] source_ref: string } export interface CCLaunch { product: string; action: string; label: string; route: string } // CCUpcomingOpportunity is one planning stage forecast surfaced beside the current readiness. It never // changes the current numbers. available_cleared_in_state is a real bench count; the comparable // requirement coverage is the engine backed eligibility of the org's similar requirements; fit_note // states honestly that a bare forecast has no precise match score. export interface CCUpcomingOpportunity { record_id: string title: string agency: string naics?: string place_of_performance?: string state?: string set_aside?: string estimated_value: string | null estimated_award_date?: string incumbent_name?: string planning_note: string available_cleared_in_state: number comparable_requirements: number comparable_covered: number fit_note: string adoptable: boolean } // CCIncumbentRef is one incumbent and award context row from the contract award feed. export interface CCIncumbentRef { record_id: string incumbent: string incumbent_uei?: string agency: string naics?: string value: string | null value_source?: string award_date?: string source: string } // AdoptForecastInput turns a forecast into a real requirement the engine scores. export interface AdoptForecastInput { required_level: string required_poly: string required_years: number key_personnel: boolean skills: string[] } export interface AdoptForecastResult { requirement_id: string title: string } export interface CommandCenterView { as_of: string organization_id: string generated_at: string meta: { empty: boolean; notes: string[] } banner: CCBanner mission_readiness: CCMissionReadiness active_opportunities: CCOpportunity[] staffing_gaps: CCGap[] clearance_intelligence: CCClearanceIntel labor_category_coverage: CCLcatCoverage[] proposal_readiness: CCProposalReadiness win_impact: { high_impact_count: number; top: CCWinCandidate[] } heat_map: CCHeatMetro[] upcoming_opportunities: CCUpcomingOpportunity[] incumbent_landscape: CCIncumbentRef[] ai_recommendations: CCRecommendation[] action_center: { suggested_requirement_id: string | null suggested_opportunity_id: string | null open_opportunities_without_slate: number requirements_unscreened: number launch: CCLaunch[] } }