Multi-tenant platform (182 pages, 228 API routes, ~30 modules) built on a deterministic verification core: clinical-trial claims checked against ClinicalTrials.gov registered results and raw event counts (ARR/NNT/RR+CI recomputed in code, oracle-tested), code-enforced exact-span grounding, and multi-source cross-verification. Auth/RBAC/multi-tenancy, document processing at scale (unpdf + Docling), agentic workflows, Claude Science connector, compliance/audit, billing, public API, and more. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
24 lines
802 B
TypeScript
24 lines
802 B
TypeScript
import { toCsv } from "@/lib/csvExport";
|
|
import type { RecentItem } from "./recentShared";
|
|
|
|
const CSV_COLUMNS = ["id", "claim_text", "discrepancy_type", "trust_score", "created_at"];
|
|
|
|
export function downloadCsv(items: RecentItem[]): void {
|
|
const rows = items.map((item) => ({
|
|
id: item.id,
|
|
claim_text: item.claim_text,
|
|
discrepancy_type: item.discrepancy_type,
|
|
trust_score: item.trust_score,
|
|
created_at: item.created_at,
|
|
}));
|
|
const blob = new Blob([toCsv(rows, CSV_COLUMNS)], { type: "text/csv;charset=utf-8" });
|
|
const url = URL.createObjectURL(blob);
|
|
const anchor = document.createElement("a");
|
|
anchor.href = url;
|
|
anchor.download = "papertrail-verifications.csv";
|
|
document.body.appendChild(anchor);
|
|
anchor.click();
|
|
anchor.remove();
|
|
URL.revokeObjectURL(url);
|
|
}
|