// The live collection of the documents module (umbrella TS6.1). The live server announces a change of // `documents_document` -- the job takes an upload, reads it, fails it -- as `{ entity: "documents.document", id }`, // ids only; a reader reads the document back through `documents.document.getMany`, so the procedure's // permission and the repository's tenant wall decide what a member sees. The project's list is a read of // the files and the rows together (an upload is `queued` before it has a row), so the pages keep it with // `useRead` live on this entity rather than as rows of the collection. `pnpm kit check` refuses a // collection without its batch-get procedure. import type { ModuleCollection } from "@conusai-kit/core" export const DOCUMENT_COLLECTION = { entity: "documents.document", table: "documents_document", key: "documentId", scopeLevel: "project", read: "documents.document.read", list: "documents.document.list", getMany: "documents.document.getMany", } as const satisfies ModuleCollection export const DOCUMENTS_COLLECTIONS: readonly ModuleCollection[] = [DOCUMENT_COLLECTION]