export interface DeviceStatus { signalStrength: number; carrier: string; mode: '短信' | '电话' | '语音' | '余额查询'; } export interface SmsItem { id: string; phone: string; content: string; taskId: string; status: 'pending' | 'success' | 'failed'; createdAt: string; updatedAt: string; } export interface SmsResponse { data: { list: SmsItem[]; status: DeviceStatus; }; } // 短信接口配置 export interface SmsConfig { apiUrl: string; username: string; encryptedPassword: string; // 加密存储的密码 timeout?: number; // 超时时间(毫秒) maxRetries?: number; // 最大重试次数 enableMock?: boolean; // 是否启用模拟模式 } // API请求/响应类型 export interface SmsApiRequest { phone: string; content: string; signName?: string; templateCode?: string; username?: string; // 认证用户名 password?: string; // 认证密码 } export interface SmsApiResponse { success: boolean; code: string; message?: string; data?: { taskId: string; serialNumbers?: string[]; }; } // 错误类型 export interface SmsError { code: string; message: string; timestamp: string; stack?: string; } // 性能指标 export interface SmsMetrics { requestCount: number; successCount: number; failureCount: number; averageLatency: number; lastRequestTime?: string; }