// missionMATCH API client: the workforce readiness rollups and reads over the /api/missionmatch // namespace. Every number it returns comes from the ONE shared core (and the persisted screenMATCH // evaluations for who can support), so it always agrees with screenMATCH and slateMATCH. import { request } from '../../lib/api' import type { AdoptForecastInput, AdoptForecastResult, CandidateIntelligence, CommandCenterView, RequirementListView, SupportView, } from '../../lib/types' const NS = '/missionmatch' export const missionApi = { commandCenter: () => request(`${NS}/command-center`), adoptForecast: (recordID: string, input: AdoptForecastInput) => request(`${NS}/command-center/upcoming/${encodeURIComponent(recordID)}/adopt`, { method: 'POST', body: JSON.stringify(input), }), candidateIntelligence: (limit = 250) => request(`${NS}/candidates/intelligence?limit=${limit}`), requirements: () => request(`${NS}/requirements?limit=200`), // Who can support this mission today: read from the stored screenMATCH qualifications for a requirement. whoCanSupport: (requirementId: string) => request(`${NS}/requirements/${encodeURIComponent(requirementId)}/support`), }