添加 gt 获取 st,ckt 相关请求

This commit is contained in:
BTMuli
2023-09-03 23:08:23 +08:00
parent 733ef716e2
commit 4f6f065645
6 changed files with 164 additions and 9 deletions

View File

@@ -2,7 +2,7 @@
* @file types BBS Account.d.ts
* @description BBS 账户相关类型定义文件
* @author BTMuli<bt-muli@outlook.com>
* @since Alpha v0.1.5
* @since Beta v0.3.0
*/
declare namespace TGApp.BBS.Account {
@@ -41,4 +41,45 @@ declare namespace TGApp.BBS.Account {
rebind_mobile_time: string;
links: unknown[];
}
/**
* @description 通过 gameToken 获取 stoken 返回的用户信息
* @interface getStokenByGameTokenInfo
* @since Beta v0.3.0
* @property {string} aid 账号 id
* @property {string} mid mid
* @property {string} account_name 账号名称
* @property {string} email 邮箱
* @property {number} is_email_verify 是否验证邮箱 // 0 未验证 1 已验证
* @property {string} area_code 手机区号 // '+86'
* @property {string} mobile 手机号 // 部分明文,中间隐藏
* @property {string} safe_area_code 安全手机区号
* @property {string} safe_mobile 安全手机号
* @property {string} realname 真实姓名 // 最后一位明文,其他隐藏
* @property {string} identity_code 身份证号 // 头尾三位明文,其他隐藏
* @property {string} rebind_area_code 重新绑定手机区号
* @property {string} rebind_mobile 重新绑定手机号
* @property {string} rebind_mobile_time 重新绑定手机时间
* @property {unknown[]} links 账号绑定信息
* @property {string} country 国家
* @return getStokenByGameTokenInfo
*/
export interface getStokenByGameTokenInfo {
aid: string;
mid: string;
account_name: string;
email: string;
is_email_verify: number;
area_code: string;
mobile: string;
safe_area_code: string;
safe_mobile: string;
realname: string;
identity_code: string;
rebind_area_code: string;
rebind_mobile: string;
rebind_mobile_time: string;
links: unknown[];
country: string;
}
}

View File

@@ -2,8 +2,8 @@
* @file types BBS Tokens.d.ts
* @description BBS 返回数据类型定义文件
* @todo 视情况看看要不要拆分
* @author BTMuli<bt-muli@outlook.com>
* @since Alpha v0.1.5
* @author BTMuli< bt-muli@outlook.com>
* @since Beta v0.3.0
*/
declare namespace TGApp.BBS.Response {
@@ -100,4 +100,53 @@ declare namespace TGApp.BBS.Response {
need_realperson: boolean;
};
}
/**
* @description 通过 gameToken 获取 stoken 的返回类型
* @interface getStokenByGameToken
* @since Beta v0.3.0
* @extends Base
* @property {getStokenByGameTokenData} data - 返回数据
* @return getStokenByGameToken
*/
export interface getStokenByGameToken extends Base {
data: getStokenByGameTokenData;
}
/**
* @description 通过 gameToken 获取 stoken 的返回类型数据
* @interface getStokenByGameTokenData
* @since Beta v0.3.0
* @property {number} token.token_type - token 类型
* @property {string} token.token - token 值
* @property {TGApp.BBS.Account.getStokenByGameTokenInfo} user_info - 用户信息
* @property {unknown} realname_info - 实名信息 // todo: 未知类型
* @property {boolean} need_realperson - 是否需要实名认证
* @return getStokenByGameToken
*/
export interface getStokenByGameTokenData {
token: {
token_type: number;
token: string;
};
user_info: TGApp.BBS.Account.getStokenByGameTokenInfo;
realname_info: unknown;
need_realperson: boolean;
}
/**
* @description 通过 gameToken 获取 cookie_token 的返回类型
* @interface getCookieTokenByGameToken
* @since Beta v0.3.0
* @extends Base
* @property {string} data.uid - 用户 uid
* @property {string} data.cookie_token - cookie_token 值
* @return getCookieTokenByGameToken
*/
export interface getCookieTokenByGameToken extends Base {
data: {
uid: string;
cookie_token: string;
};
}
}