test(sth): 调整内容,完成通过 cookie 获取游戏账号基本数据

This commit is contained in:
BTMuli
2023-05-06 01:01:11 +08:00
parent d959ab44f5
commit 5074ce2953
19 changed files with 273 additions and 41 deletions

33
src/types/Game.d.ts vendored Normal file
View File

@@ -0,0 +1,33 @@
/**
* @file types Game.d.ts
* @description 游戏数据相关接口
* @author BTMuli<bt-muli@outlook.com>
* @since Alpha v0.2.0
*/
declare namespace BTMuli.User.Game {
/**
* @description 游戏账号
* @see TGRequest.User.byCookie.getGameAccounts
* @since Alpha v0.2.0
* @property {string} game_biz 游戏 biz例如 hk4e_cn
* @property {string} game_uid 游戏 uid
* @property {boolean} is_chosen 是否为当前选中账号
* @property {string} is_official 是否为官服账号
* @property {string} level 游戏等级
* @property {string} nickname 游戏昵称
* @property {string} region 游戏区域
* @property {string} region_name 游戏区域名称
* @returns Account
*/
export interface Account {
game_biz: string
game_uid: string
is_chosen: boolean
is_official: boolean
level: string
nickname: string
region: string
region_name: string
}
}

View File

@@ -63,4 +63,17 @@ declare namespace BTMuli.User.Response {
list: TokenItem[]
}
}
/**
* @description 获取游戏账号的响应
* @since Alpha v0.2.0
* @interface GameAccounts
* @extends {BTMuli.Genshin.Base.Response}
* @property {BTMuli.User.Game.Account[]} data.list 游戏账号
* @returns {GameAccounts}
*/
export interface GameAccounts extends BTMuli.Genshin.Base.Response {
data: {
list: BTMuli.User.Game.Account[]
}
}
}