import { request } from '../../lib/api' import type { RReport } from '../../lib/types' export const reportApi = { get: (period: string, since: string) => request(`/recruiting/reports?period=${encodeURIComponent(period)}&since=${encodeURIComponent(since)}`), // The export URL is opened directly rather than fetched, so the browser handles the download and the // Content-Disposition filename the server chose. The session cookie rides along. exportUrl: (kind: string, period: string, since: string) => `/api/recruiting/reports/export?kind=${encodeURIComponent(kind)}&period=${encodeURIComponent(period)}&since=${encodeURIComponent(since)}`, }