/** * `GET /api/v1/projects/:projectId/interactive/docs/:doc/checks?version=` — the ONE checks read of * a document (DES-artifact-editor-plugins §4, §5.8, §7.6; EP-C2). * * Every verdict behind it is a wicked-ledger row stamped with the crew run that produced it: the * rows the interactive-review seam records in the document's review root (`review-ledger.ts`), * read here as canonical JSON, read-only, exactly as the seam read them back before it announced * them. There is no second verdict store, and nothing here writes. * * Per reviewer the answer is the newest verdict AT OR BELOW the version asked for (every version * when the query names none): a newer review replaces an older one, and an older one stays visible * — "on version N" — until then. A ledger that cannot be read is a 500 naming why, never an empty * list pretending the document was never reviewed. * * `demo-review` is not served here: a demo run is not bound to a document any more (demos are made * by the `demo` preset), and its reviewer's verdict already reads from `GET /runs/:id/demo` * (`DemoView.review`). */ import type { FastifyInstance } from 'fastify'; import type { DocCheck, DocReviewerId } from 'wicked-crew-api-types'; import { type CoreAdapter } from '../core/adapter.js'; import { type DocReviewLedgerRow } from '../qe/ledger.js'; /** A recorded review verdict as the checks panel shows it. */ export declare function docCheckOf(row: DocReviewLedgerRow & { reviewer: DocReviewerId; }): DocCheck; /** * Per reviewer, the verdict of the HIGHEST version at or below `version` (any version when `null`), * newest first within a version; in the reviewers' display order. */ export declare function newestPerReviewer(rows: readonly DocReviewLedgerRow[], version: number | null): DocCheck[]; export interface DocChecksDeps { /** Where every document's review root lives (`/_reviews`), read at request time. */ reviewsDir: () => string; log?: (msg: string) => void; } export declare function registerInteractiveDocChecks(app: FastifyInstance, adapter: CoreAdapter, deps: DocChecksDeps): void; //# sourceMappingURL=doc-checks-routes.d.ts.map