- Added trashed (boolean) and trashedAt (timestamp) to TypeScript VaultEntry - Added 'trash' filter to SidebarSelection union type - Added trashed/trashed_at fields to Rust VaultEntry struct and Frontmatter parser - Added 3 trashed mock entries for visual testing (recently trashed, 30+ days old, and dropped experiment) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
46 lines
1.2 KiB
TypeScript
46 lines
1.2 KiB
TypeScript
export interface VaultEntry {
|
|
path: string
|
|
filename: string
|
|
title: string
|
|
isA: string | null
|
|
aliases: string[]
|
|
belongsTo: string[]
|
|
relatedTo: string[]
|
|
status: string | null
|
|
owner: string | null
|
|
cadence: string | null
|
|
archived: boolean
|
|
trashed: boolean
|
|
trashedAt: number | null
|
|
modifiedAt: number | null
|
|
createdAt: number | null
|
|
fileSize: number
|
|
snippet: string
|
|
/** Generic relationship fields: any frontmatter key whose value contains wikilinks. */
|
|
relationships: Record<string, string[]>
|
|
/** Phosphor icon name (kebab-case) for Type entries, e.g. "cooking-pot" */
|
|
icon: string | null
|
|
/** Accent color key for Type entries: "red" | "purple" | "blue" | "green" | "yellow" | "orange" */
|
|
color: string | null
|
|
}
|
|
|
|
export interface GitCommit {
|
|
hash: string
|
|
shortHash: string
|
|
message: string
|
|
author: string
|
|
date: number // unix timestamp
|
|
}
|
|
|
|
export interface ModifiedFile {
|
|
path: string
|
|
relativePath: string
|
|
status: 'modified' | 'added' | 'deleted' | 'untracked' | 'renamed'
|
|
}
|
|
|
|
export type SidebarSelection =
|
|
| { kind: 'filter'; filter: 'all' | 'favorites' | 'archived' | 'trash' }
|
|
| { kind: 'sectionGroup'; type: string }
|
|
| { kind: 'entity'; entry: VaultEntry }
|
|
| { kind: 'topic'; entry: VaultEntry }
|