import type { StreamStatus } from '../types.js'; export interface ImMessage { id: string; threadId: string; senderId: string; senderType: 'user' | 'bot'; content: string; msgType: string; attachments?: ImAttachment[]; createTime: string; } export interface ImAttachment { type: 'image' | 'file'; path: string; name: string; } export interface ImUser { id: string; identifier: string; } export interface ImCard { payload: unknown; } export interface ImCardAction { actionType: string; threadId: string; operatorId?: string; value?: Record; } export interface ImEventHandler { onNewTopic(msg: ImMessage, chatId: string, chatType: 'group' | 'p2p'): Promise; onThreadReply(msg: ImMessage, threadId: string): Promise; onCardAction(action: ImCardAction): Promise; } export interface ImCardBuilder { buildSessionCard(opts: { sessionId: string; rootMessageId: string; terminalUrl: string; title: string; }): ImCard; buildStreamingCard(opts: { sessionId: string; rootMessageId: string; terminalUrl: string; title: string; content: string; status: StreamStatus; }): ImCard; buildRepoSelectCard(opts: { projects: Array<{ name: string; path: string; description: string; }>; currentCwd: string; rootMessageId: string; }): ImCard; } export interface ImAdapter { start(handler: ImEventHandler): Promise; stop(): Promise; cards: ImCardBuilder; sendMessage(threadId: string, content: string, format: 'text' | 'rich'): Promise; replyMessage(messageId: string, content: string, format: 'text' | 'rich'): Promise; updateMessage(messageId: string, content: string): Promise; sendCard(threadId: string, card: ImCard): Promise; updateCard(messageId: string, card: ImCard): Promise; resolveUsers(identifiers: string[]): Promise; sendDirectMessage(userId: string, content: string): Promise; downloadAttachment(messageId: string, resourceKey: string): Promise; getThreadMessages(threadId: string, limit: number): Promise; /** Add a reaction emoji to a message. Returns the reaction ID. */ addReaction(messageId: string, emojiType: string): Promise; /** Remove a reaction by its reaction ID (not emoji type). */ removeReaction(messageId: string, reactionId: string): Promise; getBotUserId(): string | undefined; } //# sourceMappingURL=types.d.ts.map