Files
knowai/types/user/base.ts
tobegold574 a0c907beed feat(api): 添加热门卡片与榜单接口及实现
- 新增热门帖子、热门作者、榜单接口及实现
- 新增api-documentation,更好的ai协作
- 修复types没有导出的问题

BREAKING CHANGES: 1.0.0->1.1.0(latest)
2025-11-18 22:29:40 +08:00

53 lines
926 B
TypeScript

import { NotificationType } from './enum';
// 最小用户信息
export interface User{
id: string;
username: string;
}
// 认证
export interface LoginRequest{
username: string;
password: string;
}
export interface LoginResponse{
user: User;
sessionId: string;
}
export interface RegisterRequest {
username: string;
email: string;
password: string;
}
export interface RegisterResponse {
user: User;
sessionId: string;
}
export interface ChangePasswordRequest { // 暂时用不到
oldPassword: string;
newPassword: string;
}
export interface RefreshTokenRequest {
sessionId: string;
}
export interface RefreshTokenResponse {
sessionId: string;
}
// 用户通知
export interface UserNotification { // 暂时用不到
id: string;
userId: string;
type: NotificationType;
content: string;
isRead: boolean;
createdAt: Date;
}