Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/missionmatch / frontend/src/tools/recruitmatch/taskApi.ts |
| Date | Not specified in source |
| Repository | Janady13/missionmatch |
| Revision | 720d47fae476b0d38477ae4401697d372b1ea2bc |
| Branch | feature/opportunity-to-outcome |
| Path or archive member | frontend/src/tools/recruitmatch/taskApi.ts |
| Original SHA-256 | 825faad8cfa7647deb2d03cf9345c4873cc85b0306d77e014a174b7b01be875c |
| Git blob SHA | b69f2a3ae2650eb1fdfe509c9c31cec0706fae32 |
| Reading-copy SHA-256 | 825faad8cfa7647deb2d03cf9345c4873cc85b0306d77e014a174b7b01be875c |
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/taskApi.ts | feature/opportunity-to-outcome | 720d47fae476b0d38477ae4401697d372b1ea2bc | Open original |
| Janady13/missionmatch / frontend/src/tools/recruitmatch/taskApi.ts | feature/aioe-upgrade | 2178e7298d0e5d9af83afa12402fd587f0ba6ed8 | Open original |
Recovered source transcript
Download complete source text ↓30 lines · 1.4 KB
import { request } from '../../lib/api'
import type { RTask, RTaskList, RTaskQueue } from '../../lib/types'
const NS = '/recruiting'
const body = (v: unknown) => ({ body: JSON.stringify(v) })
export const taskApi = {
queue: (assignee?: string, includeClosed?: boolean) => {
const s = new URLSearchParams()
if (assignee) s.set('assignee', assignee)
if (includeClosed) s.set('include_closed', 'true')
const qs = s.toString()
return request<RTaskQueue>(`${NS}/tasks/queue${qs ? `?${qs}` : ''}`)
},
list: (p: { candidate_id?: string; requisition_id?: string; application_id?: string }) => {
const s = new URLSearchParams()
if (p.candidate_id) s.set('candidate_id', p.candidate_id)
if (p.requisition_id) s.set('requisition_id', p.requisition_id)
if (p.application_id) s.set('application_id', p.application_id)
const qs = s.toString()
return request<RTaskList>(`${NS}/tasks${qs ? `?${qs}` : ''}`)
},
create: (v: Record<string, unknown>) => request<RTask>(`${NS}/tasks`, { method: 'POST', ...body(v) }),
// completed_at is absent by design: the database stamps it from the status, so reopening clears it.
update: (id: string, v: Record<string, unknown>) =>
request<RTask>(`${NS}/tasks/${encodeURIComponent(id)}`, { method: 'PATCH', ...body(v) }),
setTimeZone: (time_zone: string) =>
request<{ time_zone: string }>(`${NS}/time-zone`, { method: 'POST', ...body({ time_zone }) }),
}