Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/missionmatch / frontend/src/tools/screenmatch/api.ts |
| Date | Not specified in source |
| Repository | Janady13/missionmatch |
| Revision | 720d47fae476b0d38477ae4401697d372b1ea2bc |
| Branch | feature/opportunity-to-outcome |
| Path or archive member | frontend/src/tools/screenmatch/api.ts |
| Original SHA-256 | d6b24a88e118e4c5cca250972d4c0530946304a3829ac1c4403542ff28b9e29b |
| Git blob SHA | 63c6377a2200f0bad2e03ebc03a3ec87c06609e3 |
| Reading-copy SHA-256 | d6b24a88e118e4c5cca250972d4c0530946304a3829ac1c4403542ff28b9e29b |
Every recorded occurrence
These 2 records contain identical original source bytes. Their paths and revisions remain part of the archive.
| Original record | Branch or archive | Revision / identifier | Original location |
|---|---|---|---|
| Janady13/missionmatch / frontend/src/tools/screenmatch/api.ts | feature/opportunity-to-outcome | 720d47fae476b0d38477ae4401697d372b1ea2bc | Open original |
| Janady13/missionmatch / frontend/src/tools/screenmatch/api.ts | feature/aioe-upgrade | 2178e7298d0e5d9af83afa12402fd587f0ba6ed8 | Open original |
Recovered source transcript
Download complete source text ↓47 lines · 2.5 KB
// screenMATCH API client: every call targets the /api/screenmatch namespace over the ONE shared
// scoring core, so a candidate qualified here shows the same numbers as in slateMATCH and missionMATCH.
// It reuses the shared request helper (session cookie, CSRF, error handling); only the paths differ, so
// this module could later be extracted with its client intact.
import { request } from '../../lib/api'
import type {
AioeStatus,
CandidateListView,
OpportunityFitView,
OutcomeInput,
RankedCandidateView,
RequirementListView,
ScreenView,
TermView,
} from '../../lib/types'
const NS = '/screenmatch'
export const screenApi = {
requirements: () => request<RequirementListView[]>(`${NS}/requirements?limit=200`),
requirement: (id: string) => request<RequirementListView>(`${NS}/requirements/${encodeURIComponent(id)}`),
candidate: (id: string) => request<CandidateListView>(`${NS}/candidates/${encodeURIComponent(id)}`),
// POST /screen is the full explainable qualification; the server persists it as the latest evaluation.
screen: (candidate_id: string, requirement_id: string) =>
request<ScreenView>(`${NS}/screen`, {
method: 'POST',
body: JSON.stringify({ candidate_id, requirement_id }),
}),
// Screen the whole pool against one requirement (the Candidate Screening Queue), ranked best first.
rankCandidates: (requirementId: string) =>
request<RankedCandidateView[]>(`${NS}/requirements/${encodeURIComponent(requirementId)}/candidates`),
opportunities: (candidateId: string) =>
request<OpportunityFitView[]>(`${NS}/candidates/${encodeURIComponent(candidateId)}/opportunities?limit=10`),
// The closed loop: one click screening outcomes feed the optimization engine (flat namespace).
recordOutcome: (o: OutcomeInput) =>
request<{ id: string; occurredAt: string }>('/outcomes', { method: 'POST', body: JSON.stringify(o) }),
// The acronym and term expansion layer (global GovCon seed plus tenant additions).
aliases: () => request<{ terms: TermView[] }>('/aliases'),
addAlias: (alias: string, expansion: string) =>
request<TermView>('/aliases', { method: 'POST', body: JSON.stringify({ alias, expansion }) }),
deleteAlias: (id: string) => request<void>(`/aliases/${encodeURIComponent(id)}`, { method: 'DELETE' }),
// Admin proof the engine is alive.
aioeStatus: () => request<AioeStatus>('/aioe/status'),
// Human promotion of a pending candidate weight profile (ends shadow mode for the tenant).
aioePromote: () => request<{ promotedVersion: number; message: string }>('/aioe/promote', { method: 'POST' }),
}