Initial frontend repository commit.
Include app source and update .gitignore to exclude local release artifacts and signing files. Made-with: Cursor
This commit is contained in:
106
src/services/index.ts
Normal file
106
src/services/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
/**
|
||||
* 服务导出
|
||||
* 统一导出所有API服务
|
||||
*/
|
||||
|
||||
// API 客户端
|
||||
export { api, WS_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';
|
||||
|
||||
// WebSocket 服务
|
||||
export { websocketService } from './websocketService';
|
||||
export type {
|
||||
WSMessage,
|
||||
WSMessageType,
|
||||
WSChatMessage,
|
||||
WSReadMessage,
|
||||
WSTypingMessage,
|
||||
WSRecallMessage,
|
||||
WSNotificationMessage,
|
||||
WSAnnouncementMessage,
|
||||
WSGroupChatMessage,
|
||||
WSGroupTypingMessage,
|
||||
GroupNoticeType,
|
||||
WSGroupNoticeMessage,
|
||||
WSGroupMentionMessage,
|
||||
WSGroupReadMessage,
|
||||
WSGroupRecallMessage
|
||||
} from './websocketService';
|
||||
|
||||
// 系统通知服务
|
||||
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 {
|
||||
backgroundService,
|
||||
initBackgroundService,
|
||||
stopBackgroundService,
|
||||
triggerVibration,
|
||||
vibrateOnMessage,
|
||||
setVibrationConfig,
|
||||
getVibrationConfig,
|
||||
setVibrationEnabled,
|
||||
checkBackgroundStatus,
|
||||
} from './backgroundService';
|
||||
|
||||
// 统一提示/弹窗服务
|
||||
export { showPrompt } from './promptService';
|
||||
export { showConfirm } from './dialogService';
|
||||
Reference in New Issue
Block a user