From 265f7b42e40951bd5d9b7dd067909cb0365071d1 Mon Sep 17 00:00:00 2001 From: "Ray.Hao" <1490493387@qq.com> Date: Fri, 12 Dec 2025 14:10:10 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E4=B8=BA=20auth=20=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E6=B7=BB=E5=8A=A0=E8=AF=A6=E7=BB=86=E6=B3=A8?= =?UTF-8?q?=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 为每个字段添加 JSDoc 注释说明 - 为每个接口添加描述性注释 - 提高代码可读性和可维护性 --- src/types/api/auth.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/types/api/auth.ts b/src/types/api/auth.ts index 00777d82..908e4854 100644 --- a/src/types/api/auth.ts +++ b/src/types/api/auth.ts @@ -2,23 +2,44 @@ * 认证相关类型定义 */ +/** + * 登录请求参数 + */ export interface LoginRequest { + /** 用户名 */ username: string; + /** 密码 */ password: string; + /** 验证码缓存key */ captchaId?: string; + /** 验证码 */ captchaCode?: string; + /** 记住我 */ rememberMe?: boolean; + /** 租户ID */ tenantId?: number; } +/** + * 登录响应 + */ export interface LoginResult { + /** 访问令牌 */ accessToken: string; + /** 刷新令牌 */ refreshToken: string; + /** 令牌类型 */ tokenType: string; + /** 过期时间(单位:秒) */ expiresIn: number; } +/** + * 验证码响应 + */ export interface CaptchaInfo { + /** 验证码缓存key */ captchaId: string; + /** 验证码图片Base64 */ captchaBase64: string; }