UNPKG

imessage-ts

Version:

TypeScript library for interacting with iMessage on macOS - send messages, monitor chats, and automate responses

37 lines 989 B
import { EventEmitter } from 'events'; import { Database } from '../database/database'; /** * Service to watch for new messages and changes in the iMessage database */ export declare class MessageWatcher extends EventEmitter { private database; private messageRepository; private conversationRepository; private isWatching; private watchInterval; private lastCheckedDate; private knownMessageIds; private catchUpOnStart; constructor(database: Database, catchUpOnStart?: boolean); /** * Start watching for new messages */ start(): void; /** * Stop watching for new messages */ stop(): void; /** * Check for new messages periodically */ private watchMessages; /** * Check for new messages since the last check */ private checkForNewMessages; /** * Process new messages and emit events */ private processNewMessages; } //# sourceMappingURL=message-watcher.d.ts.map