/**
 * 服务导出
 * 统一导出所有API服务
 */

// API 客户端
export { api, SSE_URL, TOKEN_KEY, REFRESH_TOKEN_KEY } from './api';
export type { ApiResponse, PaginatedData, ApiError } from './api';

// 认证服务
export { authService } from './authService';
export { resolveAuthApiError } from './authService';
export type { 
  LoginRequest, 
  RegisterRequest, 
  SendEmailCodeRequest,
  ResetPasswordRequest,
  VerifyCurrentUserEmailRequest,
  AuthResponse, 
  RefreshTokenResponse,
  UpdateUserRequest,
  BlockedUserListResponse,
  BlockStatusResponse,
} from './authService';

// 帖子服务
export { postService } from './postService';

// 评论服务
export { commentService } from './commentService';

// 消息服务
export { messageService } from './messageService';

// 通知服务
export { notificationService } from './notificationService';

// 文件上传服务
export { uploadService } from './uploadService';
export type { UploadResponse } from './uploadService';

// 推送服务
export { pushService, registerDevice, getDevices, unregisterDevice, updateDeviceToken, getPushRecords } from './pushService';

// 投票服务
export { voteService } from './voteService';
export { channelService } from './channelService';
export type { ChannelItem } from './channelService';

// SSE 实时服务
export { sseService } from './sseService';
export type {
  WSMessage,
  WSMessageType,
  WSChatMessage,
  WSReadMessage,
  WSTypingMessage,
  WSRecallMessage,
  WSNotificationMessage,
  WSAnnouncementMessage,
  WSGroupChatMessage,
  WSGroupTypingMessage,
  GroupNoticeType,
  WSGroupNoticeMessage,
  WSGroupMentionMessage,
  WSGroupReadMessage,
  WSGroupRecallMessage
} from './sseService';

// 系统通知服务
export { systemNotificationService, getNotificationTitle } from './systemNotificationService';
export type { AppNotificationType } from './systemNotificationService';

// 群组服务
export { groupService } from './groupService';
export type {
  GroupResponse,
  GroupMemberResponse,
  GroupAnnouncementResponse,
  GroupListResponse,
  GroupMemberListResponse,
  GroupAnnouncementListResponse,
  CreateGroupRequest,
  InviteMembersRequest,
  TransferOwnerRequest,
  SetRoleRequest,
  SetNicknameRequest,
  SetMuteAllRequest,
  SetJoinTypeRequest,
  CreateAnnouncementRequest,
} from './groupService';

// 课表服务
export { scheduleService } from './scheduleService';
export type { CreateScheduleCourseRequest } from './scheduleService';

// 后台保活服务
export {
  backgroundService,
  initBackgroundService,
  stopBackgroundService,
  triggerVibration,
  vibrateOnMessage,
  setVibrationConfig,
  getVibrationConfig,
  setVibrationEnabled,
  checkBackgroundStatus,
} from './backgroundService';

// 统一提示/弹窗服务
export { showPrompt } from './promptService';
export { showConfirm } from './dialogService';

// APK 更新检查服务
export { apkUpdateService, checkForAPKUpdate, manualCheckForUpdate } from './apkUpdateService';
export type { APKVersionInfo, VersionCheckResult } from './apkUpdateService';
