2026-03-18 12:11:49 +08:00
|
|
|
/**
|
|
|
|
|
* 消息模块统一导出
|
2026-03-31 16:13:24 +08:00
|
|
|
*
|
|
|
|
|
* 提供向后兼容的 API 导出
|
2026-03-18 12:11:49 +08:00
|
|
|
*/
|
|
|
|
|
|
2026-03-31 16:13:24 +08:00
|
|
|
// ==================== 主管理器 ====================
|
2026-03-18 12:11:49 +08:00
|
|
|
export { messageManager, MessageManager } from './MessageManager';
|
|
|
|
|
|
2026-03-31 16:13:24 +08:00
|
|
|
// ==================== 类型导出 ====================
|
|
|
|
|
// 从 types.ts 导出所有类型
|
|
|
|
|
export type {
|
|
|
|
|
MessageEventType,
|
|
|
|
|
MessageEvent,
|
|
|
|
|
MessageSubscriber,
|
|
|
|
|
MessageManagerState,
|
|
|
|
|
ReadStateRecord,
|
|
|
|
|
MessageManagerConversationListDeps,
|
|
|
|
|
HandleNewMessageOptions,
|
|
|
|
|
IMessageStateManager,
|
|
|
|
|
IMessageDeduplication,
|
|
|
|
|
IUserCacheService,
|
|
|
|
|
IReadReceiptManager,
|
|
|
|
|
IConversationOperations,
|
|
|
|
|
IMessageSendService,
|
|
|
|
|
IMessageSyncService,
|
|
|
|
|
IWSMessageHandler,
|
|
|
|
|
} from './types';
|
2026-03-18 12:11:49 +08:00
|
|
|
|
2026-03-31 16:13:24 +08:00
|
|
|
// ==================== 常量导出 ====================
|
|
|
|
|
export {
|
|
|
|
|
READ_STATE_PROTECTION_DELAY,
|
|
|
|
|
PROCESSED_MESSAGE_ID_EXPIRY,
|
|
|
|
|
PROCESSED_MESSAGE_ID_MAX_SIZE,
|
|
|
|
|
MAX_FLUSH_ITERATIONS,
|
|
|
|
|
CONVERSATION_REFRESH_THROTTLE,
|
|
|
|
|
MIN_RECONNECT_SYNC_INTERVAL,
|
|
|
|
|
} from './constants';
|
2026-03-18 12:11:49 +08:00
|
|
|
|
2026-03-31 16:13:24 +08:00
|
|
|
// ==================== 子模块导出(可选使用)====================
|
|
|
|
|
// 状态管理器
|
|
|
|
|
export { MessageStateManager, messageStateManager } from './MessageStateManager';
|
2026-03-18 12:11:49 +08:00
|
|
|
|
2026-03-31 16:13:24 +08:00
|
|
|
// 消息去重服务
|
|
|
|
|
export { MessageDeduplication, messageDeduplication } from './MessageDeduplication';
|
|
|
|
|
|
|
|
|
|
// 用户缓存服务
|
|
|
|
|
export { UserCacheService, userCacheService } from './UserCacheService';
|
|
|
|
|
|
|
|
|
|
// 已读回执管理器
|
|
|
|
|
export { ReadReceiptManager } from './ReadReceiptManager';
|
|
|
|
|
|
|
|
|
|
// 会话操作服务
|
|
|
|
|
export { ConversationOperations } from './ConversationOperations';
|
|
|
|
|
|
|
|
|
|
// 消息发送服务
|
|
|
|
|
export { MessageSendService } from './MessageSendService';
|
|
|
|
|
|
|
|
|
|
// 消息同步服务
|
|
|
|
|
export { MessageSyncService } from './MessageSyncService';
|
|
|
|
|
|
|
|
|
|
// WebSocket 消息处理器
|
|
|
|
|
export { WSMessageHandler } from './WSMessageHandler';
|
|
|
|
|
|
|
|
|
|
// ==================== 默认导出 ====================
|
|
|
|
|
export { default } from './MessageManager';
|