// Mirrors the CHECK constraints in schema.ts so views can use these unions without re-narrowing. type WikiThemeMode = "reader" | "enforce"; type WikiThemeName = "light" | "dark"; export interface WikiRow { slug: string; did: string; name: string; visibility: string; language: string; description: string; theme_mode: WikiThemeMode; theme: WikiThemeName; sidebar: string | null; home_slug: string | null; at_uri: string; created_at: string; updated_at: string; } export interface NoteRow { slug: string; wiki_at_uri: string; wiki_slug: string; title: string; did: string; at_uri: string; created_at: string; } export interface CurrentNoteRow { note_at_uri: string; content: string; latest_revision_uri: string; updated_at: string; } export interface BacklinkRow { source_note_uri: string; target_note_slug: string; wiki_slug: string; } export interface SnapshotRow { id: number; note_at_uri: string; revision_at_uri: string; content: string; created_at: string; } export interface BlobRow { cid: string; revision_at_uri: string; mime_type: string; storage_key: string; created_at: string; } export interface MembershipRow { id: number; wiki_at_uri: string; wiki_slug: string; did: string; role: string; at_uri: string; created_at: string; } export interface RequestRow { id: number; wiki_at_uri: string; wiki_slug: string; did: string; at_uri: string; created_at: string; } export interface DraftRow { note_at_uri: string; wiki_at_uri: string; // Serialized Y.Doc (Y.encodeStateAsUpdate) — bun:sqlite returns BLOBs as Uint8Array. yjs_state: Uint8Array; last_modifier_did: string | null; last_modified: string; }