voip.ms Messages: Signal-style desktop SMS client
Electron + React app that imports the full voip.ms SMS history into a local SQLite/FTS5 database, polls for new messages, sends SMS, resolves names/photos from GNOME EDS address books, and supports global and per-chat search with jump-to-message. Data lives in ~/Documents/voipms-desktop-data (covered by Deja Dup) with daily consistent snapshots. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
// The typed bridge exposed to the renderer as window.api.
|
||||
import type { ContactInfo, Conversation, Credentials, Did, Message, SearchHit, Settings, SyncStatus } from './types'
|
||||
|
||||
export interface AppState {
|
||||
configured: boolean
|
||||
username?: string
|
||||
settings: Settings
|
||||
dataDir: string
|
||||
dids: Did[]
|
||||
keyringBackend: string
|
||||
}
|
||||
|
||||
export interface Api {
|
||||
getState(): Promise<AppState>
|
||||
testCredentials(creds: Credentials): Promise<Did[]>
|
||||
saveSetup(creds: Credentials, settings: Settings): Promise<void>
|
||||
updateSettings(settings: Settings): Promise<void>
|
||||
signOut(): Promise<void>
|
||||
|
||||
listContacts(): Promise<ContactInfo[]>
|
||||
listConversations(): Promise<Conversation[]>
|
||||
getMessages(did: string, contact: string): Promise<Message[]>
|
||||
markRead(did: string, contact: string): Promise<void>
|
||||
search(query: string, scope?: { did: string; contact: string }): Promise<SearchHit[]>
|
||||
send(did: string, contact: string, text: string): Promise<void>
|
||||
deleteFailed(id: number): Promise<void>
|
||||
retryFailed(id: number): Promise<void>
|
||||
|
||||
syncStatus(): Promise<SyncStatus>
|
||||
pollNow(): Promise<void>
|
||||
openDataFolder(): Promise<void>
|
||||
snapshotNow(): Promise<string>
|
||||
chooseDataDir(): Promise<string | undefined>
|
||||
|
||||
onMessages(cb: (msgs: Message[]) => void): () => void
|
||||
onConversationsChanged(cb: () => void): () => void
|
||||
onSyncStatus(cb: (s: SyncStatus) => void): () => void
|
||||
onContactsChanged(cb: () => void): () => void
|
||||
}
|
||||
Reference in New Issue
Block a user