/** * Weixin Plugin Type Definitions * Types for Weixin personal account integration */ // ==================== Weixin Types ==================== export interface WeixinConfig { enabled: boolean; debug?: boolean; } export interface WeixinGatewayStatus { connected: boolean; startedAt: number | null; lastError: string | null; accountId: string | null; lastInboundAt: number | null; lastOutboundAt: number | null; } // ==================== Common IM Types (reused from main project) ==================== export interface IMMessage { platform: string; messageId: string; conversationId: string; senderId: string; senderName?: string; groupName?: string; content: string; chatType: 'direct' | 'group'; chatSubType?: string; timestamp: number; attachments?: IMMediaAttachment[]; mediaGroupId?: string; } export interface IMMediaAttachment { type: 'image' | 'video' | 'audio' | 'voice' | 'document' | 'sticker'; localPath: string; mimeType: string; fileName?: string; fileSize?: number; width?: number; height?: number; duration?: number; } // ==================== Default Values ==================== export const DEFAULT_WEIXIN_CONFIG: WeixinConfig = { enabled: false, debug: true, }; export const DEFAULT_WEIXIN_STATUS: WeixinGatewayStatus = { connected: false, startedAt: null, lastError: null, accountId: null, lastInboundAt: null, lastOutboundAt: null, };