From ecb7be69c291f512043edc437a39003e57d0288a Mon Sep 17 00:00:00 2001 From: Tobi Lutke Date: Fri, 12 Dec 2025 16:44:43 -0500 Subject: [PATCH] Add updateDocument() to Store type and factory Expose the new updateDocument() helper through the Store interface for use by consumers. Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- store.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/store.ts b/store.ts index 99ddee8..68ccb68 100644 --- a/store.ts +++ b/store.ts @@ -636,6 +636,7 @@ export type Store = { insertDocument: (collectionId: number, path: string, title: string, hash: string, createdAt: string, modifiedAt: string) => void; findActiveDocument: (collectionId: number, path: string) => { id: number; hash: string; title: string } | null; updateDocumentTitle: (documentId: number, title: string, modifiedAt: string) => void; + updateDocument: (documentId: number, title: string, hash: string, modifiedAt: string) => void; deactivateDocument: (collectionId: number, path: string) => void; getActiveDocumentPaths: (collectionId: number) => string[]; @@ -721,6 +722,7 @@ export function createStore(dbPath?: string): Store { insertDocument: (collectionId: number, path: string, title: string, hash: string, createdAt: string, modifiedAt: string) => insertDocument(db, collectionId, path, title, hash, createdAt, modifiedAt), findActiveDocument: (collectionId: number, path: string) => findActiveDocument(db, collectionId, path), updateDocumentTitle: (documentId: number, title: string, modifiedAt: string) => updateDocumentTitle(db, documentId, title, modifiedAt), + updateDocument: (documentId: number, title: string, hash: string, modifiedAt: string) => updateDocument(db, documentId, title, hash, modifiedAt), deactivateDocument: (collectionId: number, path: string) => deactivateDocument(db, collectionId, path), getActiveDocumentPaths: (collectionId: number) => getActiveDocumentPaths(db, collectionId),