import type { UserProfile } from './base'; import type { PaginationRequest } from '../common'; // 获取当前用户个人资料相关接口(不需要参数,所以没有request) export interface GetMyProfileResponse { profile: UserProfile; } // 获取他人档案相关接口 export interface GetUserProfileRequest { userId: string; } export interface GetUserProfileResponse { profile: UserProfile; } // 热门作者相关接口 export interface GetHotAuthorsRequest extends PaginationRequest { // 已继承limit字段(page字段默认不用了) } export interface GetHotAuthorsResponse { data: UserProfile[]; // 数据列表 total: number; // 总数 } // 登录注册相关接口 export interface LoginRequest { username: string; password: string; } export interface LoginResponse { user: UserProfile; sessionId: string; } export interface RegisterRequest { username: string; password: string; } export interface RegisterResponse { user: UserProfile; sessionId: string; } export interface ChangePasswordRequest { oldPassword: string; newPassword: string; } export interface ChangePasswordResponse { user: UserProfile; sessionId: string; } // 通知相关接口 export type NotificationType = 'like' | 'comment' | 'follow' | 'mention'; export interface UserNotification { id: string; type: NotificationType; content: string; isRead: boolean; createdAt: Date; } // 个人资料更新相关接口 export interface UserProfileUpdateRequest { avatar?: string; introduction?: string; level?: string; } export interface UserProfileUpdateResponse { profile: UserProfile; } // 作者榜单相关接口 export interface GetAuthorRankingRequest extends PaginationRequest { // 已继承limit字段(page字段默认不用了) } export interface GetAuthorRankingResponse { data: UserProfile[]; // 数据列表 total: number; // 总数 } // 用户搜索相关接口 export interface UserSearchRequest { keyword: string; } export interface UserSearchResponse { users: Array; total: number; }