import { scopeFrom, scopeOf } from "@/lib/research/corpus"; import { fail, ok } from "../_respond"; export const dynamic = "force-dynamic"; // GET ?source=&channels=a,b&from=YYYY-MM-DD&to=&states=&media=&posts=1 // -> ScopeSummary (lib/research/types.ts) // // What the scope holds, BEFORE a search runs: its channels, its videos, the // upload-date span (the summaries index), the transcript vs captions share as // far as a search has counted it, and how many curated aliases the source // ships. Nothing is scanned. export async function GET(request: Request) { try { return ok(await scopeOf(scopeFrom(new URL(request.url).searchParams))); } catch (e) { return fail(e); } }