Files
knowai/types/user/base.d.ts
tobegold574 6a81b7bb13
Some checks reported errors
continuous-integration/drone/push Build was killed
feat(image): 新建 knowai-core:1.0.0 镜像并完成推送
- 搭建 api、auth、utils 等逻辑模块
- 通过 tsc、eslint、vitest 测试验证

BREAKING CHANGE: 新镜像分支
2025-11-10 20:20:25 +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;
}