Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/missionmatch / frontend/src/tools/recruitmatch/assignmentApi.ts |
| Date | Not specified in source |
| Repository | Janady13/missionmatch |
| Revision | 720d47fae476b0d38477ae4401697d372b1ea2bc |
| Branch | feature/opportunity-to-outcome |
| Path or archive member | frontend/src/tools/recruitmatch/assignmentApi.ts |
| Original SHA-256 | aef901ebad571cacb9879b2ec7d0a2ec772cc0ec2d6e9cff184b521fad8f1c75 |
| Git blob SHA | 16a1d6b7e423aec62a434388dc20924a1d5dfae1 |
| Reading-copy SHA-256 | aef901ebad571cacb9879b2ec7d0a2ec772cc0ec2d6e9cff184b521fad8f1c75 |
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/recruitmatch/assignmentApi.ts | feature/opportunity-to-outcome | 720d47fae476b0d38477ae4401697d372b1ea2bc | Open original |
| Janady13/missionmatch / frontend/src/tools/recruitmatch/assignmentApi.ts | feature/aioe-upgrade | 2178e7298d0e5d9af83afa12402fd587f0ba6ed8 | Open original |
Recovered source transcript
Download complete source text ↓26 lines · 1.7 KB
import { request } from '../../lib/api'
import type { RAssignment, RInterview, ROffer, RPlacement, RPlacementList } from '../../lib/types'
const NS = '/recruiting'
const body = (v: unknown) => ({ body: JSON.stringify(v) })
export const assignmentApi = {
get: (appId: string) => request<RAssignment>(`${NS}/applications/${encodeURIComponent(appId)}/assignment`),
scheduleInterview: (appId: string, v: Record<string, unknown>) =>
request<RInterview>(`${NS}/applications/${encodeURIComponent(appId)}/interviews`, { method: 'POST', ...body(v) }),
updateInterview: (id: string, v: Record<string, unknown>) =>
request<RInterview>(`${NS}/interviews/${encodeURIComponent(id)}`, { method: 'PATCH', ...body(v) }),
extendOffer: (appId: string, v: Record<string, unknown>) =>
request<ROffer>(`${NS}/applications/${encodeURIComponent(appId)}/offers`, { method: 'POST', ...body(v) }),
respondToOffer: (id: string, v: { expected_status: string; status: string; decline_reason?: string }) =>
request<ROffer>(`${NS}/offers/${encodeURIComponent(id)}/status`, { method: 'POST', ...body(v) }),
// Creating a placement moves the application to placed in the same transaction, so a full requisition
// is refused here rather than discovered in a report later.
createPlacement: (appId: string, v: Record<string, unknown>) =>
request<RPlacement>(`${NS}/applications/${encodeURIComponent(appId)}/placement`, { method: 'POST', ...body(v) }),
endPlacement: (id: string, v: Record<string, unknown>) =>
request<RPlacement>(`${NS}/placements/${encodeURIComponent(id)}/end`, { method: 'POST', ...body(v) }),
placements: (status?: string) =>
request<RPlacementList>(`${NS}/placements${status ? `?status=${encodeURIComponent(status)}` : ''}`),
}