mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-14 09:38:13 +08:00
♻️ 类型重构完毕,开始修改数据源
This commit is contained in:
@@ -1,290 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file interface GCG.ts
|
|
||||||
* @description interface GCG.ts
|
|
||||||
* @description 分类参考:米游社卡牌图鉴
|
|
||||||
* @author BTMuli<bt-muli@outlook.com>
|
|
||||||
* @since Alpha
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description Gcg 基本卡牌类型
|
|
||||||
* @interface BaseCardType
|
|
||||||
* @since Alpha
|
|
||||||
* @property {string} characterCard 角色卡
|
|
||||||
* @property {string} actionCard 行动卡
|
|
||||||
* @property {string} monsterCard 魔物卡
|
|
||||||
* @returns {BaseCardType}
|
|
||||||
*/
|
|
||||||
export enum BaseCardType {
|
|
||||||
characterCard = "角色牌",
|
|
||||||
actionCard = "行动牌",
|
|
||||||
monsterCard = "魔物牌",
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description Gcg 基本卡牌
|
|
||||||
* @interface BaseCard
|
|
||||||
* @since Alpha
|
|
||||||
* @see BaseCardType
|
|
||||||
* @see CharacterCard
|
|
||||||
* @see ActionCard
|
|
||||||
* @see MonsterCard
|
|
||||||
* @property {string} name 卡牌名称
|
|
||||||
* @property {int} id 卡牌 ID // TODO: 用于短期外链跳转
|
|
||||||
* @property {string} type 卡牌类型
|
|
||||||
* @property icon 卡牌图标
|
|
||||||
* @property {string} icon.normal 正常图标
|
|
||||||
* @property {string} icon.special 特殊图标
|
|
||||||
* @property {unknown} info 卡牌信息
|
|
||||||
* @property {unknown} skills 卡牌技能,仅角色卡与魔物卡有
|
|
||||||
* @property {unknown} affect 卡牌效果,仅行动卡有
|
|
||||||
* @returns {BaseCard}
|
|
||||||
*/
|
|
||||||
export interface BaseCard {
|
|
||||||
name: string
|
|
||||||
id: number
|
|
||||||
type: BaseCardType
|
|
||||||
icon: { normal: string, special?: string }
|
|
||||||
info: unknown
|
|
||||||
skills?: unknown
|
|
||||||
affect?: unknown
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description Gcg 角色卡牌
|
|
||||||
* @interface CharacterCard
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @see BaseCard
|
|
||||||
* @see CharacterCardType
|
|
||||||
* @property {BTMuli.Genshin.Wiki.EnumElement} info.element 元素
|
|
||||||
* @property {BTMuli.Genshin.Wiki.EnumWeapon} info.weapon 武器
|
|
||||||
* @property {EnumCamp} info.camp 阵营
|
|
||||||
* @property {string} info.source 卡牌来源
|
|
||||||
* @property {string} info.title 卡牌标题
|
|
||||||
* @property {string} info.description 卡牌描述
|
|
||||||
* @property {string} skills[].name 技能名称
|
|
||||||
* @property {string} skills[].type 技能类型
|
|
||||||
* @property {string} skills[].description 技能描述
|
|
||||||
* @property {string} skills[].cost 技能花费
|
|
||||||
* @property {string} skills[].cost.type 花费类型
|
|
||||||
* @property {string} skills[].cost.value 花费值
|
|
||||||
* @description 当技能类型为 “召唤物” 时,会有以下属性
|
|
||||||
* @property {number} skills[].count 可用次数
|
|
||||||
* @returns {CharacterCard}
|
|
||||||
*/
|
|
||||||
export interface CharacterCard extends BaseCard {
|
|
||||||
type: BaseCardType.characterCard
|
|
||||||
info: {
|
|
||||||
element: BTMuli.Genshin.Wiki.EnumElement
|
|
||||||
weapon: BTMuli.Genshin.Wiki.EnumWeapon
|
|
||||||
camp: EnumCamp
|
|
||||||
source: string
|
|
||||||
title: string
|
|
||||||
description: string
|
|
||||||
}
|
|
||||||
skills: Array<{
|
|
||||||
name: string
|
|
||||||
type: string
|
|
||||||
description: string
|
|
||||||
cost: {
|
|
||||||
type: string
|
|
||||||
value: string
|
|
||||||
}
|
|
||||||
count?: number
|
|
||||||
}>
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description Gcg 行动卡牌
|
|
||||||
* @interface ActionCard
|
|
||||||
* @since Alpha
|
|
||||||
* @see BaseCard
|
|
||||||
* @see ActionCardType
|
|
||||||
* @property {EnumActionType} info.actionType 类型
|
|
||||||
* @property {EnumActionTag} info.actionTag 标签
|
|
||||||
* @property {EnumActionCost} info.actionCost 花费
|
|
||||||
* @property {string} info.source 卡牌来源
|
|
||||||
* @property {string} info.title 卡牌标题
|
|
||||||
* @property {string} info.description 卡牌描述
|
|
||||||
* @description 当类型为“天赋”时,可能会有以下属性
|
|
||||||
* @property {string} info.charge 充能
|
|
||||||
* @property {string} affect 卡牌效果
|
|
||||||
* @returns {ActionCard}
|
|
||||||
*/
|
|
||||||
export interface ActionCard extends BaseCard {
|
|
||||||
type: BaseCardType.actionCard
|
|
||||||
info: {
|
|
||||||
actionType: EnumActionType
|
|
||||||
actionTag: EnumActionTag
|
|
||||||
actionCost: EnumActionCost
|
|
||||||
source: string
|
|
||||||
title: string
|
|
||||||
description: string
|
|
||||||
charge?: string
|
|
||||||
}
|
|
||||||
affect: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description Gcg 魔物卡牌
|
|
||||||
* @description 与角色卡牌类似
|
|
||||||
* @interface MonsterCard
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @see BaseCard
|
|
||||||
* @see CharacterCardType
|
|
||||||
* @property {BTMuli.Genshin.Wiki.EnumElement} info.element 元素
|
|
||||||
* @property {BTMuli.Genshin.Wiki.EnumWeapon} info.weapon 武器
|
|
||||||
* @property {EnumCamp} info.camp 阵营
|
|
||||||
* @property {string} info.source 卡牌来源
|
|
||||||
* @description 无标题跟描述
|
|
||||||
* @property {string} skills[].name 技能名称
|
|
||||||
* @property {string} skills[].type 技能类型
|
|
||||||
* @property {string} skills[].description 技能描述
|
|
||||||
* @property {string} skills[].cost 技能花费
|
|
||||||
* @property {string} skills[].cost.type 花费类型
|
|
||||||
* @property {string} skills[].cost.value 花费值
|
|
||||||
* @description 当技能类型为 “召唤物” 时,会有以下属性
|
|
||||||
* @returns {MonsterCard}
|
|
||||||
*/
|
|
||||||
export interface MonsterCard extends BaseCard {
|
|
||||||
type: BaseCardType.monsterCard
|
|
||||||
info: {
|
|
||||||
element: BTMuli.Genshin.Wiki.EnumElement
|
|
||||||
weapon: BTMuli.Genshin.Wiki.EnumWeapon
|
|
||||||
camp: EnumCamp
|
|
||||||
source: string
|
|
||||||
}
|
|
||||||
skills: Array<{
|
|
||||||
name: string
|
|
||||||
type: string
|
|
||||||
description: string
|
|
||||||
cost: {
|
|
||||||
type: string
|
|
||||||
value: string
|
|
||||||
}
|
|
||||||
}>
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description Gcg 角色牌分类依据
|
|
||||||
* @interface CharacterCardType
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @see BaseCardType
|
|
||||||
* @property {BTMuli.Genshin.Wiki.EnumElement} element 元素
|
|
||||||
* @property {BTMuli.Genshin.Wiki.EnumWeapon} weapon 武器
|
|
||||||
* @property {EnumCamp} camp 阵营
|
|
||||||
* @returns {CharacterCardType}
|
|
||||||
*/
|
|
||||||
export interface CharacterCardType {
|
|
||||||
element: BTMuli.Genshin.Wiki.EnumElement
|
|
||||||
weapon: BTMuli.Genshin.Wiki.EnumWeapon
|
|
||||||
camp: EnumCamp
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description Gcg 行动牌分类依据
|
|
||||||
* @interface ActionCardType
|
|
||||||
* @since Alpha
|
|
||||||
* @see BaseCardType
|
|
||||||
* @property {EnumActionType} actionType 类型
|
|
||||||
* @property {EnumActionTag} actionTag 标签
|
|
||||||
* @property {EnumActionCost} actionCost 花费
|
|
||||||
* @returns {ActionCardType}
|
|
||||||
*/
|
|
||||||
export interface ActionCardType {
|
|
||||||
actionType: EnumActionType
|
|
||||||
actionTag: EnumActionTag
|
|
||||||
actionCost: EnumActionCost
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 角色牌阵营
|
|
||||||
* @enum {EnumCamp}
|
|
||||||
* @since Alpha
|
|
||||||
* @see CharacterCardType
|
|
||||||
* @property {string} mondstadt 蒙德
|
|
||||||
* @property {string} liyue 璃月
|
|
||||||
* @property {string} inazuma 稻妻
|
|
||||||
* @property {string} sumeru 须弥
|
|
||||||
* @property {string} fatui 愚人众
|
|
||||||
* @property {string} monster 魔物
|
|
||||||
* @returns {EnumCamp}
|
|
||||||
*/
|
|
||||||
export enum EnumCamp {
|
|
||||||
mondstadt = "蒙德",
|
|
||||||
liyue = "璃月",
|
|
||||||
inazuma = "稻妻",
|
|
||||||
sumeru = "须弥",
|
|
||||||
fatui = "愚人众",
|
|
||||||
monster = "魔物",
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 行动牌类型
|
|
||||||
* @enum EnumActionType
|
|
||||||
* @since Alpha
|
|
||||||
* @see ActionCardType
|
|
||||||
* @property {string} equipment 装备牌
|
|
||||||
* @property {string} event 事件牌
|
|
||||||
* @property {string} support 支援牌
|
|
||||||
* @returns {EnumActionType}
|
|
||||||
*/
|
|
||||||
export enum EnumActionType {
|
|
||||||
equipment = "装备牌",
|
|
||||||
event = "事件牌",
|
|
||||||
support = "支援牌",
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 行动牌标签
|
|
||||||
* @enum EnumActionTag
|
|
||||||
* @since Alpha
|
|
||||||
* @see ActionCardType
|
|
||||||
* @property {string} weapon 武器
|
|
||||||
* @property {string} artifact 圣遗物
|
|
||||||
* @property {string} talent 天赋
|
|
||||||
* @property {string} food 料理
|
|
||||||
* @property {string} item 道具
|
|
||||||
* @property {string} partner 伙伴
|
|
||||||
* @property {string} filed 场地
|
|
||||||
* @property {string} elementResonance 元素共鸣
|
|
||||||
* @property {string} other 其他标签
|
|
||||||
* @returns {EnumActionTag}
|
|
||||||
*/
|
|
||||||
export enum EnumActionTag {
|
|
||||||
weapon = "武器",
|
|
||||||
artifact = "圣遗物",
|
|
||||||
talent = "天赋",
|
|
||||||
food = "料理",
|
|
||||||
item = "道具",
|
|
||||||
partner = "伙伴",
|
|
||||||
filed = "场地",
|
|
||||||
elementResonance = "元素共鸣",
|
|
||||||
other = "其他标签",
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 行动牌花费
|
|
||||||
* @enum EnumActionCost
|
|
||||||
* @since Alpha
|
|
||||||
* @see ActionCardType
|
|
||||||
* @property {string} cost0 花费0
|
|
||||||
* @property {string} cost1 花费1
|
|
||||||
* @property {string} cost2 花费2
|
|
||||||
* @property {string} cost3 花费3
|
|
||||||
* @property {string} cost4 花费4
|
|
||||||
* @property {string} cost5 花费5
|
|
||||||
* @property {string} cost6 花费6
|
|
||||||
* @property {string} other 其他花费
|
|
||||||
* @returns {EnumActionCost}
|
|
||||||
*/
|
|
||||||
export enum EnumActionCost {
|
|
||||||
cost0 = "花费0",
|
|
||||||
cost1 = "花费1",
|
|
||||||
cost2 = "花费2",
|
|
||||||
cost3 = "花费3",
|
|
||||||
cost4 = "花费4",
|
|
||||||
cost5 = "花费5",
|
|
||||||
cost6 = "花费6",
|
|
||||||
other = "其他花费",
|
|
||||||
}
|
|
||||||
159
src/types/Achievement.d.ts
vendored
159
src/types/Achievement.d.ts
vendored
@@ -1,159 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file types Achievement.d.ts
|
|
||||||
* @author BTMuli<bt-muli@outlook.com>
|
|
||||||
* @description 成就相关类型定义
|
|
||||||
* @since Alpha v0.1.4
|
|
||||||
*/
|
|
||||||
|
|
||||||
declare namespace BTMuli.Genshin {
|
|
||||||
/**
|
|
||||||
* @description 本应用的成就类型
|
|
||||||
* @since Alpha v0.1.4
|
|
||||||
* @interface Achievement
|
|
||||||
* @property {number} id - 成就 ID
|
|
||||||
* @property {number} series - 成就系列 ID
|
|
||||||
* @property {number} order - 成就排列顺序,用于展示全部成就
|
|
||||||
* @property {string} name - 成就名称
|
|
||||||
* @property {string} description - 成就描述
|
|
||||||
* @property {number} reward - 成就奖励
|
|
||||||
* @property {string} version - 成就版本
|
|
||||||
* @return Achievement
|
|
||||||
*/
|
|
||||||
export interface Achievement {
|
|
||||||
id: number
|
|
||||||
series: number
|
|
||||||
order: number
|
|
||||||
name: string
|
|
||||||
description: string
|
|
||||||
reward: number
|
|
||||||
version: string
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @description 本应用的成就系列类型
|
|
||||||
* @since Alpha v0.1.4
|
|
||||||
* @interface AchievementSeries
|
|
||||||
* @property {number} id - 成就系列 ID
|
|
||||||
* @property {number} order - 成就系列排列顺序,用于展示全部成就系列
|
|
||||||
* @property {string} name - 成就系列名称
|
|
||||||
* @property {string} version - 成就系列版本
|
|
||||||
* @property {string} card - 成就系列对应名片
|
|
||||||
* @property {string} icon - 成就系列图标
|
|
||||||
* @return AchievementSeries
|
|
||||||
*/
|
|
||||||
export interface AchievementSeries {
|
|
||||||
id: number
|
|
||||||
order: number
|
|
||||||
name: string
|
|
||||||
version: string
|
|
||||||
card: string
|
|
||||||
icon: string
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
declare namespace TGPlugin.UIAF {
|
|
||||||
/**
|
|
||||||
* @interface BaseData
|
|
||||||
* @since Alpha v0.1.2
|
|
||||||
* @description UIAF 成就数据
|
|
||||||
* @property {UIAF_Info} info UIAF 头部信息
|
|
||||||
* @property {UIAF_Achievement[]} list UIAF 成就列表
|
|
||||||
* @return BaseData
|
|
||||||
*/
|
|
||||||
export interface BaseData {
|
|
||||||
info: Header
|
|
||||||
list: Achievement[]
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @interface Header
|
|
||||||
* @description UIAF 头部信息
|
|
||||||
* @property {string} export_app 导出的应用名称
|
|
||||||
* @property {number} export_timestamp 导出时间戳,正确时间戳得乘以 1000
|
|
||||||
* @property {string} export_app_version 导出的应用版本
|
|
||||||
* @property {string} uiaf_version UIAF 版本
|
|
||||||
* @return Header
|
|
||||||
*/
|
|
||||||
export interface Header {
|
|
||||||
export_app: string
|
|
||||||
export_timestamp: number
|
|
||||||
export_app_version: string
|
|
||||||
uiaf_version: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @interface Achievement
|
|
||||||
* @since Alpha v0.1.2
|
|
||||||
* @description UIAF 单个成就数据
|
|
||||||
* @property {number} id 成就 ID
|
|
||||||
* @property {number} timestamp 成就记录时间戳,正确时间戳得乘以 1000
|
|
||||||
* @property {number} current 成就进度
|
|
||||||
* @property {number} status 成就状态,0 为未完成,1 为已完成
|
|
||||||
* @return Achievement
|
|
||||||
*/
|
|
||||||
export interface Achievement {
|
|
||||||
id: number
|
|
||||||
timestamp: number
|
|
||||||
current: number
|
|
||||||
status: number
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
declare namespace BTMuli.SQLite {
|
|
||||||
/**
|
|
||||||
* @description 数据库-成就表
|
|
||||||
* @since Alpha v0.1.4
|
|
||||||
* @interface Achievements
|
|
||||||
* @property {number} id - 成就 ID
|
|
||||||
* @property {number} series - 成就系列 ID
|
|
||||||
* @property {number} order - 成就排列顺序,用于展示全部成就
|
|
||||||
* @property {string} name - 成就名称
|
|
||||||
* @property {string} description - 成就描述
|
|
||||||
* @property {number} reward - 成就奖励
|
|
||||||
* @property {number} isCompleted - 成就是否完成
|
|
||||||
* @property {string} completedTime - 成就完成时间
|
|
||||||
* @property {number} progress - 成就进度
|
|
||||||
* @property {string} version - 成就版本
|
|
||||||
* @property {string} updated - 数据库更新时间
|
|
||||||
* @return Achievements
|
|
||||||
*/
|
|
||||||
export interface Achievements {
|
|
||||||
id: number
|
|
||||||
series: number
|
|
||||||
order: number
|
|
||||||
name: string
|
|
||||||
description: string
|
|
||||||
reward: number
|
|
||||||
isCompleted: 0 | 1
|
|
||||||
completedTime: string
|
|
||||||
progress: number
|
|
||||||
version: string
|
|
||||||
updated: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 数据库-成就系列表
|
|
||||||
* @since Alpha v0.1.4
|
|
||||||
* @interface AchievementSeries
|
|
||||||
* @property {number} id - 成就系列 ID
|
|
||||||
* @property {number} order - 成就系列排列顺序,用于展示全部成就系列
|
|
||||||
* @property {string} name - 成就系列名称
|
|
||||||
* @property {string} version - 成就系列版本
|
|
||||||
* @property {number} totalConut - 成就系列包含的成就数
|
|
||||||
* @property {number} finCount - 成就系列已完成的成就数
|
|
||||||
* @property {string} icon - 成就系列图标
|
|
||||||
* @property {string} nameCard - 成就系列对应名片
|
|
||||||
* @property {string} updated - 数据库更新时间
|
|
||||||
* @returns AchievementSeries
|
|
||||||
*/
|
|
||||||
export interface AchievementSeries {
|
|
||||||
id: number
|
|
||||||
order: number
|
|
||||||
name: string | null
|
|
||||||
version: string | null
|
|
||||||
totalCount: number
|
|
||||||
finCount: number
|
|
||||||
icon: string
|
|
||||||
nameCard: string | null
|
|
||||||
updated: string | null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
219
src/types/Announcement.d.ts
vendored
219
src/types/Announcement.d.ts
vendored
@@ -1,219 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file core types TGAnnouncement.d.ts
|
|
||||||
* @description 类型定义,用于定义原神游戏内公告相关类型
|
|
||||||
* @author BTMuli<bt-muli@outlook.com>
|
|
||||||
* @since Alpha v0.1.2
|
|
||||||
*/
|
|
||||||
declare namespace BTMuli.Genshin {
|
|
||||||
/**
|
|
||||||
* @description 公告
|
|
||||||
* @since Alpha v0.1.2
|
|
||||||
* @interface Announcement
|
|
||||||
* @property {AnnoListItem[]} list 公告列表
|
|
||||||
* @property {number} type_id 类型 ID
|
|
||||||
* @property {string} type_label 类型标签
|
|
||||||
* @returns {Announcement}
|
|
||||||
*/
|
|
||||||
export interface Announcement {
|
|
||||||
list: ListItem[]
|
|
||||||
type_id: number
|
|
||||||
type_label: string
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @file core types TGAnnouncement.d.ts
|
|
||||||
* @description 类型定义,用于定义原神游戏内公告相关类型
|
|
||||||
* @author BTMuli<bt-muli@outlook.com>
|
|
||||||
* @since Alpha v0.1.2
|
|
||||||
*/
|
|
||||||
|
|
||||||
export namespace Announcement {
|
|
||||||
/**
|
|
||||||
* @description 原神游戏内公告列表返回
|
|
||||||
* @since Alpha v0.1.2
|
|
||||||
* @see TGApi.GameAnnoList
|
|
||||||
* @interface AnnoListResponse
|
|
||||||
* @extends TGBase.BaseResponse
|
|
||||||
* @property {AnnoListData} data 公告数据
|
|
||||||
* @returns {ListResponse}
|
|
||||||
*/
|
|
||||||
export interface ListResponse extends Base.Response {
|
|
||||||
data: ListData
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 原神游戏内公告内容返回
|
|
||||||
* @since Alpha v0.1.2
|
|
||||||
* @see TGApi.GameAnnoContent
|
|
||||||
* @interface AnnoContentResponse
|
|
||||||
* @extends Hk4eResponse
|
|
||||||
* @property {AnnoContentData} data 公告数据
|
|
||||||
* @returns {ContentResponse}
|
|
||||||
*/
|
|
||||||
export interface ContentResponse extends Hk4eResponse {
|
|
||||||
data: ContentData
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 公告列表数据
|
|
||||||
* @since Alpha v0.1.2
|
|
||||||
* @interface AnnoListData
|
|
||||||
* @property {Announcement[]} list 公告列表
|
|
||||||
* @property {number} total 公告总数
|
|
||||||
* @property {AnnoTypeList[]} type_list 公告类型列表
|
|
||||||
* @property {boolean} alert 是否有紧急公告
|
|
||||||
* @property {number} alert_id 紧急公告 ID
|
|
||||||
* @property {number} time_zone 时区
|
|
||||||
* @property {string} t 系统时间
|
|
||||||
* @property {unknown[]} pic_list 图片列表
|
|
||||||
* @property {number} pic_total 图片总数
|
|
||||||
* @property {unknown[]} pic_type_list 图片类型列表
|
|
||||||
* @property {boolean} pic_alert 是否有紧急图片
|
|
||||||
* @property {number} pic_alert_id 紧急图片 ID
|
|
||||||
* @property {unknown} static_sign 静态签名
|
|
||||||
* @returns {ListData}
|
|
||||||
*/
|
|
||||||
export interface ListData {
|
|
||||||
list: Announcement[]
|
|
||||||
total: number
|
|
||||||
type_list: TypeList[]
|
|
||||||
alert: boolean
|
|
||||||
alert_id: number
|
|
||||||
time_zone: number
|
|
||||||
t: string
|
|
||||||
pic_list: unknown[]
|
|
||||||
pic_total: number
|
|
||||||
pic_type_list: unknown[]
|
|
||||||
pic_alert: boolean
|
|
||||||
pic_alert_id: number
|
|
||||||
static_sign: unknown
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 公告内容数据
|
|
||||||
* @since Alpha v0.1.2
|
|
||||||
* @interface AnnoContentData
|
|
||||||
* @property {AnnoContentItem[]} list 公告列表
|
|
||||||
* @property {number} total 公告总数
|
|
||||||
* @property {unknown[]} pic_list 图片列表
|
|
||||||
* @property {number} pic_total 图片总数
|
|
||||||
* @returns {ContentData}
|
|
||||||
*/
|
|
||||||
export interface ContentData {
|
|
||||||
list: ContentItem[]
|
|
||||||
total: number
|
|
||||||
pic_list: unknown[]
|
|
||||||
pic_total: number
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 公告类型列表
|
|
||||||
* @since Alpha v0.1.2
|
|
||||||
* @interface AnnoTypeList
|
|
||||||
* @property {number} id 类型 ID
|
|
||||||
* @property {string} name 类型名称
|
|
||||||
* @property {string} mi18n_name 类型名称
|
|
||||||
* @returns {TypeList}
|
|
||||||
*/
|
|
||||||
export interface TypeList {
|
|
||||||
id: number
|
|
||||||
name: string
|
|
||||||
mi18n_name: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 公告列表项
|
|
||||||
* @since Alpha v0.1.2
|
|
||||||
* @interface AnnoListItem
|
|
||||||
* @property {number} ann_id 公告 ID
|
|
||||||
* @property {string} title 公告标题
|
|
||||||
* @property {string} subtitle 公告副标题
|
|
||||||
* @property {string} banner 公告图片
|
|
||||||
* @property {unknown} content 公告内容
|
|
||||||
* @property {string} type_label 公告类型标签
|
|
||||||
* @property {string} tag_label 公告标签
|
|
||||||
* @property {string} tag_icon 公告标签图标
|
|
||||||
* @property {number} login_alert 是否登录提示
|
|
||||||
* @property {string} lang 公告语言
|
|
||||||
* @property {string} start_time 公告开始时间 // "2023-03-01 07:00:00"
|
|
||||||
* @property {string} end_time 公告结束时间 // "2023-04-12 06:00:00"
|
|
||||||
* @property {number} type 公告类型
|
|
||||||
* @property {number} remind 公告提醒
|
|
||||||
* @property {number} alert 公告紧急
|
|
||||||
* @property {string} tag_start_time 公告标签开始时间 // "2000-01-02 15:04:05"
|
|
||||||
* @property {string} tag_end_time 公告标签结束时间 // "2030-01-02 15:04:05"
|
|
||||||
* @property {number} remind_ver 公告提醒版本
|
|
||||||
* @property {boolean} has_content 是否有内容
|
|
||||||
* @property {boolean} extra_remind 是否有额外提醒
|
|
||||||
* @returns {ListItem}
|
|
||||||
*/
|
|
||||||
export interface ListItem {
|
|
||||||
ann_id: number
|
|
||||||
title: string
|
|
||||||
subtitle: string
|
|
||||||
banner: string
|
|
||||||
content: unknown
|
|
||||||
type_label: string
|
|
||||||
tag_label: string
|
|
||||||
tag_icon: string
|
|
||||||
login_alert: number
|
|
||||||
lang: string
|
|
||||||
start_time: string
|
|
||||||
end_time: string
|
|
||||||
type: number
|
|
||||||
remind: number
|
|
||||||
alert: number
|
|
||||||
tag_start_time: string
|
|
||||||
tag_end_time: string
|
|
||||||
remind_ver: number
|
|
||||||
has_content: boolean
|
|
||||||
extra_remind: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 公告内容列表
|
|
||||||
* @since Alpha v0.1.2
|
|
||||||
* @interface AnnoContentItem
|
|
||||||
* @property {number} ann_id 公告 ID
|
|
||||||
* @property {string} title 公告标题
|
|
||||||
* @property {string} subtitle 公告副标题
|
|
||||||
* @property {string} banner 公告图片
|
|
||||||
* @property {string} content 公告内容为 HTML
|
|
||||||
* @property {string} lang 公告语言
|
|
||||||
* @returns {ContentItem}
|
|
||||||
*/
|
|
||||||
export interface ContentItem {
|
|
||||||
ann_id: number
|
|
||||||
title: string
|
|
||||||
subtitle: string
|
|
||||||
banner: string
|
|
||||||
content: string
|
|
||||||
lang: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 渲染用公告列表数据
|
|
||||||
* @since Alpha v0.1.2
|
|
||||||
* @interface AnnoListCard
|
|
||||||
* @property {number} id 公告 ID
|
|
||||||
* @property {string} title 公告标题
|
|
||||||
* @property {string} subtitle 公告副标题
|
|
||||||
* @property {string} banner 公告图片
|
|
||||||
* @property {string} typeLabel 公告类型标签
|
|
||||||
* @property {string} tagIcon 公告标签图标
|
|
||||||
* @property {string} startTime 公告开始时间
|
|
||||||
* @property {string} endTime 公告结束时间
|
|
||||||
* @returns {ListCard}
|
|
||||||
*/
|
|
||||||
export interface ListCard {
|
|
||||||
id: number
|
|
||||||
title: string
|
|
||||||
subtitle: string
|
|
||||||
banner: string
|
|
||||||
typeLabel: string
|
|
||||||
tagIcon: string
|
|
||||||
startTime: string
|
|
||||||
endTime: string
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
25
src/types/App/Account.d.ts
vendored
Normal file
25
src/types/App/Account.d.ts
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
/**
|
||||||
|
* @file types App Account.d.ts
|
||||||
|
* @description App 账号相关类型定义文件
|
||||||
|
* @author BTMuli<bt-muli@outlook.com>
|
||||||
|
* @since Alpha v0.2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare namespace TGApp.App.Account {
|
||||||
|
/**
|
||||||
|
* @description 用户简略信息
|
||||||
|
* @since Alpha v0.2.0
|
||||||
|
* @interface BriefInfo
|
||||||
|
* @property {string} nickname 用户昵称
|
||||||
|
* @property {string} uid 用户 uid
|
||||||
|
* @property {string} avatar 用户头像
|
||||||
|
* @property {string} desc 用户简介
|
||||||
|
* @return BriefInfo
|
||||||
|
*/
|
||||||
|
export interface BriefInfo {
|
||||||
|
nickname: string
|
||||||
|
uid: string
|
||||||
|
avatar: string
|
||||||
|
desc: string
|
||||||
|
}
|
||||||
|
}
|
||||||
52
src/types/App/Achievement.d.ts
vendored
Normal file
52
src/types/App/Achievement.d.ts
vendored
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
/**
|
||||||
|
* @file types App Achievement.d.ts
|
||||||
|
* @description 应用成就相关类型定义文件
|
||||||
|
* @todo https://github.com/BTMuli/Tauri.Genshin/issues/19
|
||||||
|
* @author BTMuli<bt-muli@outlook.com>
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare namespace TGApp.App.Achievement {
|
||||||
|
/**
|
||||||
|
* @description 本应用的成就类型
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @interface Item
|
||||||
|
* @property {number} id - 成就 ID
|
||||||
|
* @property {number} series - 成就系列 ID
|
||||||
|
* @property {number} order - 成就排列顺序,用于展示全部成就
|
||||||
|
* @property {string} name - 成就名称
|
||||||
|
* @property {string} description - 成就描述
|
||||||
|
* @property {number} reward - 成就奖励
|
||||||
|
* @property {string} version - 成就版本
|
||||||
|
* @return Item
|
||||||
|
*/
|
||||||
|
export interface Item {
|
||||||
|
id: number
|
||||||
|
series: number
|
||||||
|
order: number
|
||||||
|
name: string
|
||||||
|
description: string
|
||||||
|
reward: number
|
||||||
|
version: string
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @description 本应用的成就系列类型
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @interface Series
|
||||||
|
* @property {number} id - 成就系列 ID
|
||||||
|
* @property {number} order - 成就系列排列顺序,用于展示全部成就系列
|
||||||
|
* @property {string} name - 成就系列名称
|
||||||
|
* @property {string} version - 成就系列版本
|
||||||
|
* @property {string} card - 成就系列对应名片
|
||||||
|
* @property {string} icon - 成就系列图标
|
||||||
|
* @return Series
|
||||||
|
*/
|
||||||
|
export interface Series {
|
||||||
|
id: number
|
||||||
|
order: number
|
||||||
|
name: string
|
||||||
|
version: string
|
||||||
|
card: string
|
||||||
|
icon: string
|
||||||
|
}
|
||||||
|
}
|
||||||
33
src/types/App/Announcement.d.ts
vendored
Normal file
33
src/types/App/Announcement.d.ts
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
/**
|
||||||
|
* @file types App Announcement.d.ts
|
||||||
|
* @description 应用公告相关类型定义文件
|
||||||
|
* @author BTMuli<bt-muli@outlook.com>
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare namespace TGApp.App.Announcement {
|
||||||
|
/**
|
||||||
|
* @description 渲染用的公告列表数据类型
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @interface ListCard
|
||||||
|
* @property {number} id - 公告 ID
|
||||||
|
* @property {string} title - 公告标题
|
||||||
|
* @property {string} subtitle - 公告副标题
|
||||||
|
* @property {string} banner - 公告横幅
|
||||||
|
* @property {string} typeLabel - 公告类型标签
|
||||||
|
* @property {string} tagIcon - 公告标签图标
|
||||||
|
* @property {string} startTime - 公告开始时间
|
||||||
|
* @property {string} endTime - 公告结束时间
|
||||||
|
* @return ListCard
|
||||||
|
*/
|
||||||
|
export interface ListCard {
|
||||||
|
id: number
|
||||||
|
title: string
|
||||||
|
subtitle: string
|
||||||
|
banner: string
|
||||||
|
typeLabel: string
|
||||||
|
tagIcon: string
|
||||||
|
startTime: string
|
||||||
|
endTime: string
|
||||||
|
}
|
||||||
|
}
|
||||||
79
src/types/App/Calendar.d.ts
vendored
Normal file
79
src/types/App/Calendar.d.ts
vendored
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
/**
|
||||||
|
* @file types App Calendar.d.ts
|
||||||
|
* @description 应用素材日历相关类型定义文件
|
||||||
|
* @author BTMuli<bt-muli@outlook.com>
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare namespace TGApp.App.Calendar {
|
||||||
|
/**
|
||||||
|
* @description 素材日历类型
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @interface Item
|
||||||
|
* @property {number} id - 日历项 ID
|
||||||
|
* @property {number} contentId - 观测枢的 content_id
|
||||||
|
* @property {number[]} dropDays - 掉落日
|
||||||
|
* @property {string} name - 日历项名称
|
||||||
|
* @property {string} itemType - 日历项类型
|
||||||
|
* @property {number} star - 日历项星级
|
||||||
|
* @property {string} bg - 日历项背景
|
||||||
|
* @property {string} icon - 日历项图标
|
||||||
|
* @property {string} starIcon - 星级图标
|
||||||
|
* @property {string} weaponIcon - 武器类型图标
|
||||||
|
* @property {string} elementIcon - 角色元素类型图标
|
||||||
|
* @property {Material[]} materials - 日历项需要的素材
|
||||||
|
* @property {Source} source - 日历项来源
|
||||||
|
* @return Item
|
||||||
|
*/
|
||||||
|
export interface Item {
|
||||||
|
id: number
|
||||||
|
contentId: number
|
||||||
|
dropDays: number[]
|
||||||
|
name: string
|
||||||
|
itemType: string
|
||||||
|
star: number
|
||||||
|
bg: string
|
||||||
|
icon: string
|
||||||
|
starIcon: string
|
||||||
|
weaponIcon: string
|
||||||
|
elementIcon: string
|
||||||
|
materials: Material[]
|
||||||
|
source: Source
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 素材日历材料类型
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @interface Material
|
||||||
|
* @property {number} id - 素材 ID
|
||||||
|
* @property {string} name - 素材名称
|
||||||
|
* @property {number} star - 素材星级
|
||||||
|
* @property {string} starIcon - 素材星级图标
|
||||||
|
* @property {string} bg - 素材背景
|
||||||
|
* @property {string} icon - 素材图标
|
||||||
|
* @return Material
|
||||||
|
*/
|
||||||
|
export interface Material {
|
||||||
|
id: number
|
||||||
|
name: string
|
||||||
|
star: number
|
||||||
|
starIcon: string
|
||||||
|
bg: string
|
||||||
|
icon: string
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 素材日历来源类型
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @interface Source
|
||||||
|
* @property {string} area - 来源区域
|
||||||
|
* @property {string} icon - 来源图标
|
||||||
|
* @property {string} name - 来源名称
|
||||||
|
* @return Source
|
||||||
|
*/
|
||||||
|
export interface Source {
|
||||||
|
area: string
|
||||||
|
icon: string
|
||||||
|
name: string
|
||||||
|
}
|
||||||
|
}
|
||||||
192
src/types/App/Character.d.ts
vendored
Normal file
192
src/types/App/Character.d.ts
vendored
Normal file
@@ -0,0 +1,192 @@
|
|||||||
|
/**
|
||||||
|
* @file types App Character.d.ts
|
||||||
|
* @description 角色相关类型定义文件
|
||||||
|
* @author BTMuli<bt-muli@outlook.com>
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare namespace TGApp.App.Character {
|
||||||
|
/**
|
||||||
|
* @description Wiki 页简略信息
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @interface WikiBriefInfo
|
||||||
|
* @property {number} id - 角色 ID
|
||||||
|
* @property {number} contentId - 观测枢的 content_id
|
||||||
|
* @property {string} name - 角色名称
|
||||||
|
* @property {number} star - 角色星级
|
||||||
|
* @property {string} bg - 角色背景图
|
||||||
|
* @property {string} elementIcon - 角色元素类型图标
|
||||||
|
* @property {string} weaponIcon - 角色武器类型图标
|
||||||
|
* @property {string} icon - 角色图标
|
||||||
|
* @return WikiBriefInfo
|
||||||
|
*/
|
||||||
|
export interface WikiBriefInfo {
|
||||||
|
id: number
|
||||||
|
contentId: number
|
||||||
|
name: string
|
||||||
|
star: number
|
||||||
|
bg: string
|
||||||
|
elementIcon: string
|
||||||
|
weaponIcon: string
|
||||||
|
icon: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @description 本应用的角色类型
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface FullInfo
|
||||||
|
// * @property {number} id - 角色 ID
|
||||||
|
// * @property {string} name - 角色名称
|
||||||
|
// * @property {number} star - 角色星级
|
||||||
|
// * @property {string} element - 角色元素
|
||||||
|
// * @property {string} weapon - 角色武器类型
|
||||||
|
// * @property {BaseInfo} baseInfo - 角色基础信息
|
||||||
|
// * @property {Constellation[]} constellations - 命之座
|
||||||
|
// * @property {Talent[]} talents - 角色天赋
|
||||||
|
// * @property {AddInfo} addInfo - 角色附加信息
|
||||||
|
// * @return FullInfo
|
||||||
|
// */
|
||||||
|
// export interface FullInfo {
|
||||||
|
// id: number
|
||||||
|
// name: string
|
||||||
|
// star: number
|
||||||
|
// element: string
|
||||||
|
// weapon: string
|
||||||
|
// baseInfo: BaseInfo
|
||||||
|
// constellations: Constellation[]
|
||||||
|
// talents: Talent[]
|
||||||
|
// addInfo: AddInfo
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 角色基础信息
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface BaseInfo
|
||||||
|
// * @property {string} birthday - 生日
|
||||||
|
// * @property {string} camp - 所属
|
||||||
|
// * @property {string} constellation - 命之座
|
||||||
|
// * @property {string} cvZh - 中文配音
|
||||||
|
// * @property {string} cvJp - 日文配音
|
||||||
|
// * @property {string} description - 角色描述
|
||||||
|
// * @property {string[]} source - 角色获取途径
|
||||||
|
// * @return BaseInfo
|
||||||
|
// */
|
||||||
|
// export interface BaseInfo {
|
||||||
|
// birthday: string
|
||||||
|
// camp: string
|
||||||
|
// constellation: string
|
||||||
|
// cvZh: string
|
||||||
|
// cvJp: string
|
||||||
|
// description: string
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 角色命之座
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface Constellation
|
||||||
|
// * @property {number} id - 命之座 ID,主要是图标 id
|
||||||
|
// * @property {string} name - 命之座名称
|
||||||
|
// * @description 描述可作为 v-html 使用
|
||||||
|
// * @property {string} description - 命之座描述
|
||||||
|
// * @return Constellation
|
||||||
|
// */
|
||||||
|
// export interface Constellation {
|
||||||
|
// id: number
|
||||||
|
// name: string
|
||||||
|
// description: string
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 角色天赋
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface Talent
|
||||||
|
// * @property {number} id - 天赋 ID
|
||||||
|
// * @property {string} name - 天赋名称
|
||||||
|
// * @property {string} type - 天赋类型
|
||||||
|
// * @property {UpInfo[]} upInfos - 天赋升级信息
|
||||||
|
// * @description 描述可作为 v-html 使用
|
||||||
|
// * @property {string} description - 天赋描述
|
||||||
|
// * @return Talent
|
||||||
|
// */
|
||||||
|
// export interface Talent {
|
||||||
|
// id: number
|
||||||
|
// name: string
|
||||||
|
// type: string
|
||||||
|
// upInfos?: UpInfo[]
|
||||||
|
// description: string
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 天赋升级信息
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface UpInfo
|
||||||
|
// * @property {number} level - 天赋升级原始等级
|
||||||
|
// * @property {BTMuli.Genshin.Wiki.Material[]} materials - 天赋升级所需材料
|
||||||
|
// * @property {Record<string, number>} oriAttr - 天赋升级前属性
|
||||||
|
// * @property {Record<string, number>} upAttr - 天赋升级后属性
|
||||||
|
// * @return UpInfo
|
||||||
|
// */
|
||||||
|
// export interface UpInfo {
|
||||||
|
// level: number
|
||||||
|
// materials: BTMuli.App.Wiki.Material[]
|
||||||
|
// oriAttr: Record<string, number>
|
||||||
|
// upAttr: Record<string, number>
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 角色附加信息
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface AddInfo
|
||||||
|
// * @property {BTMuli.Genshin.Wiki.levelUp[]} levelUps - 角色升级信息
|
||||||
|
// * @property {SpecialFood} specialFood - 特色料理
|
||||||
|
// * @property {Uniform[]} uniforms - 角色衣装
|
||||||
|
// * @property {Story[]} stories - 角色故事
|
||||||
|
// * @return AddInfo
|
||||||
|
// */
|
||||||
|
// export interface AddInfo {
|
||||||
|
// levelUps: BTMuli.App.Wiki.levelUp[]
|
||||||
|
// specialFood: SpecialFood
|
||||||
|
// uniforms: Uniform[]
|
||||||
|
// stories: Story[]
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 角色特色料理
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface SpecialFood
|
||||||
|
// * @extends {BTMuli.Genshin.Wiki.Food}
|
||||||
|
// * @property {number} oriId - 原料理 ID
|
||||||
|
// * @property {string} oriName - 原料理名称
|
||||||
|
// * @return SpecialFood
|
||||||
|
// */
|
||||||
|
// export interface SpecialFood extends BTMuli.App.Wiki.Food {
|
||||||
|
// oriId: number
|
||||||
|
// oriName: string
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 角色衣装
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface Uniform
|
||||||
|
// * @property {string} name - 衣装名称
|
||||||
|
// * @property {string} description - 衣装描述
|
||||||
|
// * @return Uniform
|
||||||
|
// */
|
||||||
|
// export interface Uniform {
|
||||||
|
// name: string
|
||||||
|
// description: string
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 角色故事
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface Story
|
||||||
|
// * @property {string} title - 故事标题
|
||||||
|
// * @property {string} content - 故事内容
|
||||||
|
// * @return Story
|
||||||
|
// */
|
||||||
|
// export interface Story {
|
||||||
|
// title: string
|
||||||
|
// content: string
|
||||||
|
// }
|
||||||
435
src/types/App/GCG.d.ts
vendored
Normal file
435
src/types/App/GCG.d.ts
vendored
Normal file
@@ -0,0 +1,435 @@
|
|||||||
|
/**
|
||||||
|
* @file types App GCG.d.ts
|
||||||
|
* @description 本应用的卡牌相关类型定义
|
||||||
|
* @author BTMuli<bt-muli@outlook.com>
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare namespace TGApp.App.GCG {
|
||||||
|
/**
|
||||||
|
* @description Wiki页用到的简略信息
|
||||||
|
* @interface WikiBriefInfo
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @property {number} id - 卡牌 ID
|
||||||
|
* @property {number} contentId - 观测枢的 content_id
|
||||||
|
* @property {string} name - 卡牌名称
|
||||||
|
* @property {string} type - 卡牌类型
|
||||||
|
* @property {string} icon - 卡牌图标
|
||||||
|
* @return WikiBriefInfo
|
||||||
|
*/
|
||||||
|
export interface WikiBriefInfo {
|
||||||
|
id: number
|
||||||
|
contentId: number
|
||||||
|
name: string
|
||||||
|
type: string
|
||||||
|
icon: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @description Gcg 基本卡牌类型
|
||||||
|
// * @interface BaseCardType
|
||||||
|
// * @since Alpha
|
||||||
|
// * @property {string} characterCard 角色卡
|
||||||
|
// * @property {string} actionCard 行动卡
|
||||||
|
// * @property {string} monsterCard 魔物卡
|
||||||
|
// * @returns {BaseCardType}
|
||||||
|
// */
|
||||||
|
// export enum BaseCardType {
|
||||||
|
// characterCard = "角色牌",
|
||||||
|
// actionCard = "行动牌",
|
||||||
|
// monsterCard = "魔物牌",
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description Gcg 基本卡牌
|
||||||
|
// * @interface BaseCard
|
||||||
|
// * @since Alpha
|
||||||
|
// * @see BaseCardType
|
||||||
|
// * @see CharacterCard
|
||||||
|
// * @see ActionCard
|
||||||
|
// * @see MonsterCard
|
||||||
|
// * @property {string} name 卡牌名称
|
||||||
|
// * @property {int} id 卡牌 ID // TODO: 用于短期外链跳转
|
||||||
|
// * @property {string} type 卡牌类型
|
||||||
|
// * @property icon 卡牌图标
|
||||||
|
// * @property {string} icon.normal 正常图标
|
||||||
|
// * @property {string} icon.special 特殊图标
|
||||||
|
// * @property {unknown} info 卡牌信息
|
||||||
|
// * @property {unknown} skills 卡牌技能,仅角色卡与魔物卡有
|
||||||
|
// * @property {unknown} affect 卡牌效果,仅行动卡有
|
||||||
|
// * @returns {BaseCard}
|
||||||
|
// */
|
||||||
|
// export interface BaseCard {
|
||||||
|
// name: string
|
||||||
|
// id: number
|
||||||
|
// type: BaseCardType
|
||||||
|
// icon: { normal: string, special?: string }
|
||||||
|
// info: unknown
|
||||||
|
// skills?: unknown
|
||||||
|
// affect?: unknown
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description Gcg 角色卡牌
|
||||||
|
// * @interface CharacterCard
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @see BaseCard
|
||||||
|
// * @see CharacterCardType
|
||||||
|
// * @property {BTMuli.App.Wiki.EnumElement} info.element 元素
|
||||||
|
// * @property {BTMuli.App.Wiki.EnumWeapon} info.weapon 武器
|
||||||
|
// * @property {EnumCamp} info.camp 阵营
|
||||||
|
// * @property {string} info.source 卡牌来源
|
||||||
|
// * @property {string} info.title 卡牌标题
|
||||||
|
// * @property {string} info.description 卡牌描述
|
||||||
|
// * @property {string} skills[].name 技能名称
|
||||||
|
// * @property {string} skills[].type 技能类型
|
||||||
|
// * @property {string} skills[].description 技能描述
|
||||||
|
// * @property {string} skills[].cost 技能花费
|
||||||
|
// * @property {string} skills[].cost.type 花费类型
|
||||||
|
// * @property {string} skills[].cost.value 花费值
|
||||||
|
// * @description 当技能类型为 “召唤物” 时,会有以下属性
|
||||||
|
// * @property {number} skills[].count 可用次数
|
||||||
|
// * @returns {CharacterCard}
|
||||||
|
// */
|
||||||
|
// export interface CharacterCard extends BaseCard {
|
||||||
|
// type: BaseCardType.characterCard
|
||||||
|
// info: {
|
||||||
|
// element: BTMuli.App.Wiki.EnumElement
|
||||||
|
// weapon: BTMuli.App.Wiki.EnumWeapon
|
||||||
|
// camp: EnumCamp
|
||||||
|
// source: string
|
||||||
|
// title: string
|
||||||
|
// description: string
|
||||||
|
// }
|
||||||
|
// skills: Array<{
|
||||||
|
// name: string
|
||||||
|
// type: string
|
||||||
|
// description: string
|
||||||
|
// cost: {
|
||||||
|
// type: string
|
||||||
|
// value: string
|
||||||
|
// }
|
||||||
|
// count?: number
|
||||||
|
// }>
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description Gcg 行动卡牌
|
||||||
|
// * @interface ActionCard
|
||||||
|
// * @since Alpha
|
||||||
|
// * @see BaseCard
|
||||||
|
// * @see ActionCardType
|
||||||
|
// * @property {EnumActionType} info.actionType 类型
|
||||||
|
// * @property {EnumActionTag} info.actionTag 标签
|
||||||
|
// * @property {EnumActionCost} info.actionCost 花费
|
||||||
|
// * @property {string} info.source 卡牌来源
|
||||||
|
// * @property {string} info.title 卡牌标题
|
||||||
|
// * @property {string} info.description 卡牌描述
|
||||||
|
// * @description 当类型为“天赋”时,可能会有以下属性
|
||||||
|
// * @property {string} info.charge 充能
|
||||||
|
// * @property {string} affect 卡牌效果
|
||||||
|
// * @returns {ActionCard}
|
||||||
|
// */
|
||||||
|
// export interface ActionCard extends BaseCard {
|
||||||
|
// type: BaseCardType.actionCard
|
||||||
|
// info: {
|
||||||
|
// actionType: EnumActionType
|
||||||
|
// actionTag: EnumActionTag
|
||||||
|
// actionCost: EnumActionCost
|
||||||
|
// source: string
|
||||||
|
// title: string
|
||||||
|
// description: string
|
||||||
|
// charge?: string
|
||||||
|
// }
|
||||||
|
// affect: string
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description Gcg 魔物卡牌
|
||||||
|
// * @description 与角色卡牌类似
|
||||||
|
// * @interface MonsterCard
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @see BaseCard
|
||||||
|
// * @see CharacterCardType
|
||||||
|
// * @property {BTMuli.App.Wiki.EnumElement} info.element 元素
|
||||||
|
// * @property {BTMuli.App.Wiki.EnumWeapon} info.weapon 武器
|
||||||
|
// * @property {EnumCamp} info.camp 阵营
|
||||||
|
// * @property {string} info.source 卡牌来源
|
||||||
|
// * @description 无标题跟描述
|
||||||
|
// * @property {string} skills[].name 技能名称
|
||||||
|
// * @property {string} skills[].type 技能类型
|
||||||
|
// * @property {string} skills[].description 技能描述
|
||||||
|
// * @property {string} skills[].cost 技能花费
|
||||||
|
// * @property {string} skills[].cost.type 花费类型
|
||||||
|
// * @property {string} skills[].cost.value 花费值
|
||||||
|
// * @description 当技能类型为 “召唤物” 时,会有以下属性
|
||||||
|
// * @returns {MonsterCard}
|
||||||
|
// */
|
||||||
|
// export interface MonsterCard extends BaseCard {
|
||||||
|
// type: BaseCardType.monsterCard
|
||||||
|
// info: {
|
||||||
|
// element: BTMuli.App.Wiki.EnumElement
|
||||||
|
// weapon: BTMuli.App.Wiki.EnumWeapon
|
||||||
|
// camp: EnumCamp
|
||||||
|
// source: string
|
||||||
|
// }
|
||||||
|
// skills: Array<{
|
||||||
|
// name: string
|
||||||
|
// type: string
|
||||||
|
// description: string
|
||||||
|
// cost: {
|
||||||
|
// type: string
|
||||||
|
// value: string
|
||||||
|
// }
|
||||||
|
// }>
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description Gcg 角色牌分类依据
|
||||||
|
// * @interface CharacterCardType
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @see BaseCardType
|
||||||
|
// * @property {BTMuli.App.Wiki.EnumElement} element 元素
|
||||||
|
// * @property {BTMuli.App.Wiki.EnumWeapon} weapon 武器
|
||||||
|
// * @property {EnumCamp} camp 阵营
|
||||||
|
// * @returns {CharacterCardType}
|
||||||
|
// */
|
||||||
|
// export interface CharacterCardType {
|
||||||
|
// element: BTMuli.App.Wiki.EnumElement
|
||||||
|
// weapon: BTMuli.App.Wiki.EnumWeapon
|
||||||
|
// camp: EnumCamp
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description Gcg 行动牌分类依据
|
||||||
|
// * @interface ActionCardType
|
||||||
|
// * @since Alpha
|
||||||
|
// * @see BaseCardType
|
||||||
|
// * @property {EnumActionType} actionType 类型
|
||||||
|
// * @property {EnumActionTag} actionTag 标签
|
||||||
|
// * @property {EnumActionCost} actionCost 花费
|
||||||
|
// * @returns {ActionCardType}
|
||||||
|
// */
|
||||||
|
// export interface ActionCardType {
|
||||||
|
// actionType: EnumActionType
|
||||||
|
// actionTag: EnumActionTag
|
||||||
|
// actionCost: EnumActionCost
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 角色牌阵营
|
||||||
|
// * @enum {EnumCamp}
|
||||||
|
// * @since Alpha
|
||||||
|
// * @see CharacterCardType
|
||||||
|
// * @property {string} mondstadt 蒙德
|
||||||
|
// * @property {string} liyue 璃月
|
||||||
|
// * @property {string} inazuma 稻妻
|
||||||
|
// * @property {string} sumeru 须弥
|
||||||
|
// * @property {string} fatui 愚人众
|
||||||
|
// * @property {string} monster 魔物
|
||||||
|
// * @returns {EnumCamp}
|
||||||
|
// */
|
||||||
|
// export enum EnumCamp {
|
||||||
|
// mondstadt = "蒙德",
|
||||||
|
// liyue = "璃月",
|
||||||
|
// inazuma = "稻妻",
|
||||||
|
// sumeru = "须弥",
|
||||||
|
// fatui = "愚人众",
|
||||||
|
// monster = "魔物",
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 行动牌类型
|
||||||
|
// * @enum EnumActionType
|
||||||
|
// * @since Alpha
|
||||||
|
// * @see ActionCardType
|
||||||
|
// * @property {string} equipment 装备牌
|
||||||
|
// * @property {string} event 事件牌
|
||||||
|
// * @property {string} support 支援牌
|
||||||
|
// * @returns {EnumActionType}
|
||||||
|
// */
|
||||||
|
// export enum EnumActionType {
|
||||||
|
// equipment = "装备牌",
|
||||||
|
// event = "事件牌",
|
||||||
|
// support = "支援牌",
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 行动牌标签
|
||||||
|
// * @enum EnumActionTag
|
||||||
|
// * @since Alpha
|
||||||
|
// * @see ActionCardType
|
||||||
|
// * @property {string} weapon 武器
|
||||||
|
// * @property {string} artifact 圣遗物
|
||||||
|
// * @property {string} talent 天赋
|
||||||
|
// * @property {string} food 料理
|
||||||
|
// * @property {string} item 道具
|
||||||
|
// * @property {string} partner 伙伴
|
||||||
|
// * @property {string} filed 场地
|
||||||
|
// * @property {string} elementResonance 元素共鸣
|
||||||
|
// * @property {string} other 其他标签
|
||||||
|
// * @returns {EnumActionTag}
|
||||||
|
// */
|
||||||
|
// export enum EnumActionTag {
|
||||||
|
// weapon = "武器",
|
||||||
|
// artifact = "圣遗物",
|
||||||
|
// talent = "天赋",
|
||||||
|
// food = "料理",
|
||||||
|
// item = "道具",
|
||||||
|
// partner = "伙伴",
|
||||||
|
// filed = "场地",
|
||||||
|
// elementResonance = "元素共鸣",
|
||||||
|
// other = "其他标签",
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 行动牌花费
|
||||||
|
// * @enum EnumActionCost
|
||||||
|
// * @since Alpha
|
||||||
|
// * @see ActionCardType
|
||||||
|
// * @property {string} cost0 花费0
|
||||||
|
// * @property {string} cost1 花费1
|
||||||
|
// * @property {string} cost2 花费2
|
||||||
|
// * @property {string} cost3 花费3
|
||||||
|
// * @property {string} cost4 花费4
|
||||||
|
// * @property {string} cost5 花费5
|
||||||
|
// * @property {string} cost6 花费6
|
||||||
|
// * @property {string} other 其他花费
|
||||||
|
// * @returns {EnumActionCost}
|
||||||
|
// */
|
||||||
|
// export enum EnumActionCost {
|
||||||
|
// cost0 = "花费0",
|
||||||
|
// cost1 = "花费1",
|
||||||
|
// cost2 = "花费2",
|
||||||
|
// cost3 = "花费3",
|
||||||
|
// cost4 = "花费4",
|
||||||
|
// cost5 = "花费5",
|
||||||
|
// cost6 = "花费6",
|
||||||
|
// other = "其他花费",
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @description 卡牌完整信息
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface FullInfo
|
||||||
|
// * @property {number} id - 卡牌 ID
|
||||||
|
// * @property {string} name - 卡牌名称
|
||||||
|
// * @property {string} type - 卡牌类型
|
||||||
|
// * @property {BaseInfo} baseInfo - 基础信息
|
||||||
|
// * @property {skillInfo[]} skillInfo - 技能信息
|
||||||
|
// * @property {addInfo[]} addInfo - 附加信息
|
||||||
|
// * @return FullInfo
|
||||||
|
// */
|
||||||
|
// export interface FullInfo {
|
||||||
|
// id: number
|
||||||
|
// name: string
|
||||||
|
// type: string
|
||||||
|
// baseInfo: BaseInfo
|
||||||
|
// skillInfo: SkillInfo[]
|
||||||
|
// addInfo: AddInfo[]
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 卡牌点数消耗类型枚举
|
||||||
|
// * @enum PointType
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @see Point
|
||||||
|
// * @property {string} NONE - 无消耗
|
||||||
|
// * @property {string} SAME - 任意相同骰子
|
||||||
|
// * @property {string} ALL - 任意骰子
|
||||||
|
// * @property {string} ELEMENT_PYRO - 元素骰子-火
|
||||||
|
// * @property {string} ELEMENT_HYDRO - 元素骰子-水
|
||||||
|
// * @property {string} ELEMENT_CRYO - 元素骰子-冰
|
||||||
|
// * @property {string} ELEMENT_ELECTRO - 元素骰子-雷
|
||||||
|
// * @property {string} ELEMENT_ANEMO - 元素骰子-风
|
||||||
|
// * @property {string} ELEMENT_GEO - 元素骰子-岩
|
||||||
|
// * @property {string} ELEMENT_DENDRO - 元素骰子-草
|
||||||
|
// * @property {string} HP - 血量
|
||||||
|
// * @property {string} CHARGE - 充能
|
||||||
|
// * @return PointType
|
||||||
|
// */
|
||||||
|
// export enum PointType {
|
||||||
|
// NONE = "NONE",
|
||||||
|
// SAME = "SAME",
|
||||||
|
// ALL = "ALL",
|
||||||
|
// ELEMENT_PYRO = "ELEMENT_PYRO",
|
||||||
|
// ELEMENT_HYDRO = "ELEMENT_HYDRO",
|
||||||
|
// ELEMENT_CRYO = "ELEMENT_CRYO",
|
||||||
|
// ELEMENT_ELECTRO = "ELEMENT_ELECTRO",
|
||||||
|
// ELEMENT_ANEMO = "ELEMENT_ANEMO",
|
||||||
|
// ELEMENT_GEO = "ELEMENT_GEO",
|
||||||
|
// ELEMENT_DENDRO = "ELEMENT_DENDRO",
|
||||||
|
// HP = "HP",
|
||||||
|
// CHARGE = "CHARGE",
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 卡牌点数消耗
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface Point
|
||||||
|
// * @property {number} point - 点数
|
||||||
|
// * @property {PointType} type - 点数类型
|
||||||
|
// * @return Point
|
||||||
|
// */
|
||||||
|
// export interface Point {
|
||||||
|
// point: number
|
||||||
|
// type: PointType
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 基础信息
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface BaseInfo
|
||||||
|
// * @property {string} title - 卡牌称号
|
||||||
|
// * @property {string} icon - 卡牌图标
|
||||||
|
// * @property {BTMuli.Genshin.Wiki.BaseAttri[]} tags - 卡牌标签
|
||||||
|
// * @property {Point[]} cost - 卡牌点数消耗
|
||||||
|
// * @property {string} source - 卡牌获取途径
|
||||||
|
// * @property {string} description - 卡牌描述
|
||||||
|
// * @return BaseInfo
|
||||||
|
// */
|
||||||
|
// export interface BaseInfo {
|
||||||
|
// title: string
|
||||||
|
// icon: string
|
||||||
|
// tags: BTMuli.App.Wiki.BaseAttri[]
|
||||||
|
// cost: Point[]
|
||||||
|
// source: string
|
||||||
|
// description: string
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 技能信息
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface SkillInfo
|
||||||
|
// * @property {string} type - 技能类型
|
||||||
|
// * @property {string} name - 技能名称
|
||||||
|
// * @property {string} description - 技能描述
|
||||||
|
// * @property {Point[]} cost - 技能点数消耗
|
||||||
|
// * @property {string} icon - 技能图标
|
||||||
|
// * @return SkillInfo
|
||||||
|
// */
|
||||||
|
// export interface SkillInfo {
|
||||||
|
// type: string
|
||||||
|
// name: string
|
||||||
|
// description: string
|
||||||
|
// cost: Point[]
|
||||||
|
// icon: string
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 附加信息
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface AddInfo
|
||||||
|
// * @property {string} type - 附加信息类型
|
||||||
|
// * @property {string} name - 附加信息名称
|
||||||
|
// * @property {string} description - 附加信息描述
|
||||||
|
// * @property {string} icon - 附加信息图标
|
||||||
|
// * @return AddInfo
|
||||||
|
// */
|
||||||
|
// export interface AddInfo {
|
||||||
|
// type: string
|
||||||
|
// name: string
|
||||||
|
// description: string
|
||||||
|
// icon: string
|
||||||
|
// }
|
||||||
32
src/types/App/NameCard.d.ts
vendored
Normal file
32
src/types/App/NameCard.d.ts
vendored
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
/**
|
||||||
|
* @file types App NameCard.d.ts
|
||||||
|
* @description 本应用的名片类型定义
|
||||||
|
* @author BTMuli<bt-muli@outlook.com>
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare namespace TGApp.App.NameCard {
|
||||||
|
/**
|
||||||
|
* @description 名片数据
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @interface Item
|
||||||
|
* @property {string} name - 名片名称
|
||||||
|
* @property {string} desc - 名片描述
|
||||||
|
* @property {string} icon - 名片图标
|
||||||
|
* @property {string} bg - 名片背景图
|
||||||
|
* @property {string} profile - 名片 Profile 图
|
||||||
|
* @description 0: 其他,1: 成就,2:角色,3:纪行,4:活动 // todo: 后续用枚举替换
|
||||||
|
* @property {number} type - 名片类型
|
||||||
|
* @property {string} source - 名片来源
|
||||||
|
* @return Item
|
||||||
|
*/
|
||||||
|
export interface Item {
|
||||||
|
name: string
|
||||||
|
desc: string
|
||||||
|
icon: string
|
||||||
|
bg: string
|
||||||
|
profile: string
|
||||||
|
type: number
|
||||||
|
source: string
|
||||||
|
}
|
||||||
|
}
|
||||||
152
src/types/App/Weapon.d.ts
vendored
Normal file
152
src/types/App/Weapon.d.ts
vendored
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
/**
|
||||||
|
* @file types App Weapon.d.ts
|
||||||
|
* @description 本应用的武器类型定义文件
|
||||||
|
* @author BTMuli<bt-muli@outlook.com>
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare namespace TGApp.App.Weapon {
|
||||||
|
/**
|
||||||
|
* @description Wiki页的武器简略信息
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @interface WikiBriefInfo
|
||||||
|
* @property {number} id - 武器 ID
|
||||||
|
* @property {number} contentId - 观测枢 id
|
||||||
|
* @property {string} name - 武器名称
|
||||||
|
* @property {number} star - 武器星级
|
||||||
|
* @property {string} bg - 武器背景图
|
||||||
|
* @property {string} weaponIcon - 武器类型图标
|
||||||
|
* @property {string} icon - 武器图标
|
||||||
|
* @return WikiBriefInfo
|
||||||
|
*/
|
||||||
|
export interface WikiBriefInfo {
|
||||||
|
id: number
|
||||||
|
contentId: number
|
||||||
|
name: string
|
||||||
|
star: number
|
||||||
|
bg: string
|
||||||
|
weaponIcon: string
|
||||||
|
icon: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @description 本应用的武器类型
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface FullInfo
|
||||||
|
// * @property {number} id - 武器 ID
|
||||||
|
// * @property {string} name - 武器名称
|
||||||
|
// * @property {number} star - 武器星级
|
||||||
|
// * @property {string} type - 武器类型
|
||||||
|
// * @property {BaseInfo} baseInfo - 武器基础信息
|
||||||
|
// * @property {Refine[]} refines - 武器精炼信息
|
||||||
|
// * @property {AddInfo} addInfo - 武器附加信息
|
||||||
|
// * @return FullInfo
|
||||||
|
// */
|
||||||
|
// export interface FullInfo {
|
||||||
|
// id: number
|
||||||
|
// name: string
|
||||||
|
// star: number
|
||||||
|
// type: string
|
||||||
|
// baseInfo: BaseInfo
|
||||||
|
// refines: Refine[]
|
||||||
|
// addInfo: AddInfo
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 武器基础信息
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface BaseInfo
|
||||||
|
// * @property {string} refine - 武器精炼标题
|
||||||
|
// * @property {string} description - 武器描述
|
||||||
|
// * @property {string} source - 武器获取途径
|
||||||
|
// * @todo 属性值是按 1 级然后计算还是直接按 90 级计算?
|
||||||
|
// * @property {Record<string, number>} main - 武器主属性
|
||||||
|
// * @property {Record<string, number>} sub - 武器副属性
|
||||||
|
// * @return BaseInfo
|
||||||
|
// */
|
||||||
|
// export interface BaseInfo {
|
||||||
|
// refine: string
|
||||||
|
// source: string
|
||||||
|
// description: string
|
||||||
|
// main: Record<string, number>
|
||||||
|
// sub: Record<string, number>
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 武器精炼信息
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface Refine
|
||||||
|
// * @property {number} level - 精炼等级
|
||||||
|
// * @property {string} description - 精炼描述
|
||||||
|
// * @return Refine
|
||||||
|
// */
|
||||||
|
// export interface Refine {
|
||||||
|
// level: number
|
||||||
|
// description: string
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 武器附加信息
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface AddInfo
|
||||||
|
// * @property {BTMuli.Genshin.Wiki.levelUp[]} levelUps - 武器升级信息
|
||||||
|
// * @property {Story} story - 武器故事
|
||||||
|
// * @return AddInfo
|
||||||
|
// */
|
||||||
|
// export interface AddInfo {
|
||||||
|
// levelUps: BTMuli.App.Wiki.levelUp[]
|
||||||
|
// story: Story
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 武器突破信息
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface BreakInfo
|
||||||
|
// * @property {number} level - 突破等级
|
||||||
|
// * @property {Material[]} materials - 突破材料
|
||||||
|
// * @property {Record<string, number>} main - 突破后主属性
|
||||||
|
// * @property {Record<string, number>[]} up - 平均提升属性
|
||||||
|
// * @return BreakInfo
|
||||||
|
// */
|
||||||
|
// export interface BreakInfo {
|
||||||
|
// level: number
|
||||||
|
// materials: Material[]
|
||||||
|
// main: Record<string, number>
|
||||||
|
// up: Array<Record<string, number>>
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 武器故事
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface Story
|
||||||
|
// * @property {string} title - 武器故事名称
|
||||||
|
// * @property {string} content - 武器故事描述
|
||||||
|
// * @return Story
|
||||||
|
// */
|
||||||
|
// export interface Story {
|
||||||
|
// title: string
|
||||||
|
// content: string
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 武器材料
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface Material
|
||||||
|
// * @todo 材料 id 与名称的对应关系
|
||||||
|
// * @property {number} id - 材料 ID
|
||||||
|
// * @property {string} name - 材料名称
|
||||||
|
// * @property {number} star - 材料星级
|
||||||
|
// * @property {string} type - 材料类型
|
||||||
|
// * @property {number} count - 材料数量
|
||||||
|
// * @property {string} source - 材料获取途径
|
||||||
|
// * @return Material
|
||||||
|
// */
|
||||||
|
// export interface Material {
|
||||||
|
// id: number
|
||||||
|
// name: string
|
||||||
|
// star: number
|
||||||
|
// type: string
|
||||||
|
// count: number
|
||||||
|
// source: string
|
||||||
|
// }
|
||||||
44
src/types/BBS/Account.d.ts
vendored
Normal file
44
src/types/BBS/Account.d.ts
vendored
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
/**
|
||||||
|
* @file types BBS Account.d.ts
|
||||||
|
* @description BBS 账户相关类型定义文件
|
||||||
|
* @author BTMuli<bt-muli@outlook.com>
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare namespace TGApp.BBS.Account {
|
||||||
|
/**
|
||||||
|
* @description stoken 验证获取的用户信息
|
||||||
|
* @interface VerifySTokenInfo
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @todo 添加 request 索引
|
||||||
|
* @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} 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 账号绑定信息
|
||||||
|
* @return VerifySTokenInfo
|
||||||
|
*/
|
||||||
|
export interface VerifySTokenInfo {
|
||||||
|
aid: string
|
||||||
|
mid: string
|
||||||
|
account_name: string
|
||||||
|
email: string
|
||||||
|
is_email_verify: number
|
||||||
|
area_code: string
|
||||||
|
safe_mobile: string
|
||||||
|
realname: string
|
||||||
|
identity_code: string
|
||||||
|
rebind_area_code: string
|
||||||
|
rebind_mobile: string
|
||||||
|
rebind_mobile_time: string
|
||||||
|
links: unknown[]
|
||||||
|
}
|
||||||
|
}
|
||||||
167
src/types/BBS/Announcement.d.ts
vendored
Normal file
167
src/types/BBS/Announcement.d.ts
vendored
Normal file
@@ -0,0 +1,167 @@
|
|||||||
|
/**
|
||||||
|
* @file types BBS Announcement.d.ts
|
||||||
|
* @description 从 BBS 获取到的游戏内公告类型定义文件
|
||||||
|
* @author BTMuli<bt-muli@outlook.com>
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare namespace BTMuli.BBS.Announcement {
|
||||||
|
/**
|
||||||
|
* @description 公告列表返回响应类型
|
||||||
|
* @interface ListResponse
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @extends TGApp.BBS.Response.Base
|
||||||
|
* @property {ListData} data - 公告列表数据
|
||||||
|
* @return ListResponse
|
||||||
|
*/
|
||||||
|
export interface ListResponse extends TGApp.BBS.Response.Base {
|
||||||
|
data: ListData
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 公告内容返回响应类型
|
||||||
|
* @interface ContentResponse
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @extends TGApp.BBS.Response.Base
|
||||||
|
* @property {ContentData} data - 公告内容数据
|
||||||
|
* @return ContentResponse
|
||||||
|
*/
|
||||||
|
export interface ContentResponse extends TGApp.BBS.Response.Base {
|
||||||
|
data: ContentData
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 公告列表数据
|
||||||
|
* @interface ListData
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @property {ListItem[]} list - 公告列表
|
||||||
|
* @property {number} total - 公告总数
|
||||||
|
* @property {ListType[]} type_list - 公告类型列表
|
||||||
|
* @property {boolean} alert - 是否有紧急公告
|
||||||
|
* @property {number} time_zone - 时区
|
||||||
|
* @property {string} t - 时间戳,单位为秒
|
||||||
|
* @property {unknown[]} pic_list - 图片列表 todo: 未知类型
|
||||||
|
* @property {number} pic_total - 图片总数
|
||||||
|
* @property {unknown[]} pic_type_list - 图片类型列表 todo: 未知类型
|
||||||
|
* @property {boolean} pic_alert - 是否有紧急图片
|
||||||
|
* @property {number} pic_alert_id - 紧急图片 ID
|
||||||
|
* @property {unknown} static_sign - 静态签名 todo: 未知类型
|
||||||
|
* @return ListData
|
||||||
|
*/
|
||||||
|
export interface ListData {
|
||||||
|
list: ListItem[]
|
||||||
|
total: number
|
||||||
|
type_list: ListType[]
|
||||||
|
alert: boolean
|
||||||
|
time_zone: number
|
||||||
|
t: string
|
||||||
|
pic_list: unknown[]
|
||||||
|
pic_total: number
|
||||||
|
pic_type_list: unknown[]
|
||||||
|
pic_alert: boolean
|
||||||
|
pic_alert_id: number
|
||||||
|
static_sign: unknown
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 公告内容数据
|
||||||
|
* @interface ContentData
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @property {ContentItem[]} list - 公告内容列表
|
||||||
|
* @property {number} total - 公告内容总数
|
||||||
|
* @property {unknown[]} pic_list - 图片列表 todo: 未知类型
|
||||||
|
* @property {number} pic_total - 图片总数
|
||||||
|
* @return ContentData
|
||||||
|
*/
|
||||||
|
export interface ContentData {
|
||||||
|
list: ContentItem[]
|
||||||
|
total: number
|
||||||
|
pic_list: unknown[]
|
||||||
|
pic_total: number
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 公告列表项
|
||||||
|
* @interface ListItem
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @property {number} ann_id 公告 ID
|
||||||
|
* @property {string} title 公告标题
|
||||||
|
* @property {string} subtitle 公告副标题
|
||||||
|
* @property {string} banner 公告图片
|
||||||
|
* @property {unknown} content 公告内容
|
||||||
|
* @property {string} type_label 公告类型标签
|
||||||
|
* @property {string} tag_label 公告标签
|
||||||
|
* @property {string} tag_icon 公告标签图标
|
||||||
|
* @property {number} login_alert 是否登录提示
|
||||||
|
* @property {string} lang 公告语言
|
||||||
|
* @property {string} start_time 公告开始时间 // "2023-03-01 07:00:00"
|
||||||
|
* @property {string} end_time 公告结束时间 // "2023-04-12 06:00:00"
|
||||||
|
* @property {number} type 公告类型
|
||||||
|
* @property {number} remind 公告提醒
|
||||||
|
* @property {number} alert 公告紧急
|
||||||
|
* @property {string} tag_start_time 公告标签开始时间 // "2000-01-02 15:04:05"
|
||||||
|
* @property {string} tag_end_time 公告标签结束时间 // "2030-01-02 15:04:05"
|
||||||
|
* @property {number} remind_ver 公告提醒版本
|
||||||
|
* @property {boolean} has_content 是否有内容
|
||||||
|
* @property {boolean} extra_remind 是否有额外提醒
|
||||||
|
* @return ListItem
|
||||||
|
*/
|
||||||
|
export interface ListItem {
|
||||||
|
ann_id: number
|
||||||
|
title: string
|
||||||
|
subtitle: string
|
||||||
|
banner: string
|
||||||
|
content: unknown
|
||||||
|
type_label: string
|
||||||
|
tag_label: string
|
||||||
|
tag_icon: string
|
||||||
|
login_alert: number
|
||||||
|
lang: string
|
||||||
|
start_time: string
|
||||||
|
end_time: string
|
||||||
|
type: number
|
||||||
|
remind: number
|
||||||
|
alert: number
|
||||||
|
tag_start_time: string
|
||||||
|
tag_end_time: string
|
||||||
|
remind_ver: number
|
||||||
|
has_content: boolean
|
||||||
|
extra_remind: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 公告类型列表项
|
||||||
|
* @interface ListType
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @property {number} id 公告类型 ID
|
||||||
|
* @property {string} name 公告类型名称
|
||||||
|
* @property {string} mi18n_name 公告类型国际化名称
|
||||||
|
* @return ListType
|
||||||
|
*/
|
||||||
|
export interface ListType {
|
||||||
|
id: number
|
||||||
|
name: string
|
||||||
|
mi18n_name: string
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 公告内容列表项
|
||||||
|
* @interface ContentItem
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @property {number} ann_id 公告 ID
|
||||||
|
* @property {string} title 公告标题
|
||||||
|
* @property {string} subtitle 公告副标题
|
||||||
|
* @property {string} banner 公告图片
|
||||||
|
* @property {string} content 公告内容,为 html
|
||||||
|
* @property {string} lang 公告语言
|
||||||
|
* @return ContentItem
|
||||||
|
*/
|
||||||
|
export interface ContentItem {
|
||||||
|
ann_id: number
|
||||||
|
title: string
|
||||||
|
subtitle: string
|
||||||
|
banner: string
|
||||||
|
content: string
|
||||||
|
lang: string
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
/**
|
/**
|
||||||
* @file types UserRequest.d.ts
|
* @file types BBS Constant.d.ts
|
||||||
* @description 用户请求相关类型定义文件
|
* @description BBS 常量相关类型定义文件
|
||||||
* @author BTMuli<bt-muli@outlook.com>
|
* @author BTMuli<bt-muli@outlook.com>
|
||||||
* @since Alpha v0.2.0
|
* @since Alpha v0.1.5
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare namespace BTMuli.User.Base {
|
declare namespace TGApp.BBS.Constant {
|
||||||
/**
|
/**
|
||||||
* @description 用户 cookie 类型
|
* @description 用户 Cookie 类型
|
||||||
* @since Alpha v0.2.0
|
|
||||||
* @description 这边只写了需要的,其他的可以自行添加
|
|
||||||
* @interface Cookie
|
* @interface Cookie
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @description 这边只写了需要的,其他的可以自行添加
|
||||||
* @description login_ticket 与 login_uid 一起使用
|
* @description login_ticket 与 login_uid 一起使用
|
||||||
* @see TGRequest.User.byLoginTicket.getTokens
|
* @see TGRequest.User.byLoginTicket.getTokens
|
||||||
* @property {string} login_ticket 登录凭证
|
* @property {string} login_ticket 登录凭证
|
||||||
@@ -29,9 +29,9 @@ declare namespace BTMuli.User.Base {
|
|||||||
* @property {string} stuid stoken 对应的 uid
|
* @property {string} stuid stoken 对应的 uid
|
||||||
* @description stoken_v2 与 mid 一起使用,这是新版本的 token
|
* @description stoken_v2 与 mid 一起使用,这是新版本的 token
|
||||||
* @see https://github.com/BTMuli/Tauri.Genshin/issues/18
|
* @see https://github.com/BTMuli/Tauri.Genshin/issues/18
|
||||||
* @property {string} stokenV2 stoken_v2
|
* @property {string} stoken_v2 stoken_v2
|
||||||
* @property {string} mid mid
|
* @property {string} mid mid
|
||||||
* @returns Cookie
|
* @return Cookie
|
||||||
*/
|
*/
|
||||||
export interface Cookie {
|
export interface Cookie {
|
||||||
login_ticket: string
|
login_ticket: string
|
||||||
@@ -42,24 +42,7 @@ declare namespace BTMuli.User.Base {
|
|||||||
ltuid: string
|
ltuid: string
|
||||||
mid: string
|
mid: string
|
||||||
stoken: string
|
stoken: string
|
||||||
stoken_v2?: string
|
|
||||||
stuid: string
|
stuid: string
|
||||||
}
|
stoken_v2?: string
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 用户简略信息
|
|
||||||
* @since Alpha v0.2.0
|
|
||||||
* @interface BriefInfo
|
|
||||||
* @property {string} nickname 用户昵称
|
|
||||||
* @property {string} uid 用户 uid
|
|
||||||
* @property {string} avatar 用户头像
|
|
||||||
* @property {string} desc 用户简介
|
|
||||||
* @returns BriefInfo
|
|
||||||
*/
|
|
||||||
export interface BriefInfo {
|
|
||||||
nickname: string
|
|
||||||
uid: string
|
|
||||||
avatar: string
|
|
||||||
desc: string
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
94
src/types/BBS/Response.d.ts
vendored
Normal file
94
src/types/BBS/Response.d.ts
vendored
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
/**
|
||||||
|
* @file types BBS Tokens.d.ts
|
||||||
|
* @description BBS 返回数据类型定义文件
|
||||||
|
* @todo 视情况看看要不要拆分
|
||||||
|
* @author BTMuli<bt-muli@outlook.com>
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare namespace TGApp.BBS.Response {
|
||||||
|
/**
|
||||||
|
* @description 基础返回类型,设计米游社接口请求都是这个类型
|
||||||
|
* @interface Base
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @property {number} retcode - 响应代码
|
||||||
|
* @property {string} message - 响应消息
|
||||||
|
* @property {any} data - 响应数据
|
||||||
|
* @return Base
|
||||||
|
*/
|
||||||
|
export interface Base {
|
||||||
|
retcode: number
|
||||||
|
message: string
|
||||||
|
data: any
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 获取 ltoken 跟 stoken 的响应数据
|
||||||
|
* @interface getTokens
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @todo 添加 request 索引
|
||||||
|
* @extends Base
|
||||||
|
* @property {string} data.list[].name - token 名称
|
||||||
|
* @property {string} data.list[].token - token 值
|
||||||
|
* @return getTokens
|
||||||
|
*/
|
||||||
|
export interface getTokens extends Base {
|
||||||
|
data: {
|
||||||
|
list: Array<{
|
||||||
|
name: string
|
||||||
|
token: string
|
||||||
|
}>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 根据 stoken 获取 ltoken 的响应数据
|
||||||
|
* @interface getLTokenBySToken
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @todo 添加 request 索引
|
||||||
|
* @extends Base
|
||||||
|
* @property {string} data.ltoken - ltoken 值
|
||||||
|
* @return getLTokenBySToken
|
||||||
|
*/
|
||||||
|
export interface getLTokenBySToken extends Base {
|
||||||
|
data: {
|
||||||
|
ltoken: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 根据 stoken 获取 cookie_token 的响应数据
|
||||||
|
* @interface getCookieTokenBySToken
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @todo 添加 request 索引
|
||||||
|
* @extends Base
|
||||||
|
* @property {string} data.uid - 用户 uid
|
||||||
|
* @property {string} data.cookie_token - cookie_token 值
|
||||||
|
* @return getCookieTokenBySToken
|
||||||
|
*/
|
||||||
|
export interface getCookieTokenBySToken extends Base {
|
||||||
|
data: {
|
||||||
|
uid: string
|
||||||
|
cookie_token: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 通过 stoken 验证用户信息的返回类型
|
||||||
|
* @interface verifyUserInfoBySToken
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @todo 添加 request 索引
|
||||||
|
* @extends Base
|
||||||
|
* @property {TGApp.BBS.Account.VerifySTokenInfo} data.user_info - 用户信息
|
||||||
|
* @property {unknown} data.realname_info - 实名信息 // todo: 未知类型
|
||||||
|
* @property {boolean} data.need_realperson - 是否需要实名认证
|
||||||
|
* @return verifyUserInfoBySToken
|
||||||
|
*/
|
||||||
|
export interface verifyUserInfoBySToken extends Base {
|
||||||
|
data: {
|
||||||
|
user_info: TGApp.BBS.Account.VerifySTokenInfo
|
||||||
|
realname_info: unknown
|
||||||
|
need_realperson: boolean
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
40
src/types/Base.d.ts
vendored
40
src/types/Base.d.ts
vendored
@@ -1,40 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file core types TGBase.d.ts
|
|
||||||
* @description 类型定义,用于定义一些基础类型
|
|
||||||
* @author BTMuli<bt-muli@outlook.com>
|
|
||||||
* @since Alpha v0.1.2
|
|
||||||
*/
|
|
||||||
|
|
||||||
declare namespace BTMuli.Genshin {
|
|
||||||
export namespace Base {
|
|
||||||
/**
|
|
||||||
* @description 定义 IndexedDB 数据库配置
|
|
||||||
* @since Alpha v0.1.2
|
|
||||||
* @interface DBConfig
|
|
||||||
* @property {string} storeName 数据库名称
|
|
||||||
* @property {string} keyPath 数据库主键
|
|
||||||
* @property {string[]} indexes 数据库索引
|
|
||||||
* @returns {DBConfig}
|
|
||||||
*/
|
|
||||||
export interface DBConfig {
|
|
||||||
storeName: string
|
|
||||||
keyPath: string
|
|
||||||
indexes: string[]
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 定义基础返回数据
|
|
||||||
* @since Alpha v0.1.2
|
|
||||||
* @interface Response
|
|
||||||
* @property {number} retcode 状态码
|
|
||||||
* @property {string} message 状态信息
|
|
||||||
* @property {any} data 数据
|
|
||||||
* @returns {Response}
|
|
||||||
*/
|
|
||||||
export interface Response {
|
|
||||||
retcode: number
|
|
||||||
message: string
|
|
||||||
data: any
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
56
src/types/Calendar.d.ts
vendored
56
src/types/Calendar.d.ts
vendored
@@ -1,56 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file core types TGCalendar.d.ts
|
|
||||||
* @description 本应用的素材日历类型定义
|
|
||||||
* @author BTMuli<bt-muli@outlook.com>
|
|
||||||
* @since Alpha v0.1.5
|
|
||||||
*/
|
|
||||||
|
|
||||||
declare namespace BTMuli.Genshin.Calendar {
|
|
||||||
/**
|
|
||||||
* @description 素材日历接口
|
|
||||||
* @interface Data
|
|
||||||
* @since Alpha v0.1.5
|
|
||||||
* @property {number} id - 日历项 id
|
|
||||||
* @property {number} content_id - 观测枢的 content_id
|
|
||||||
* @property {Array<number>} drop_day - 掉落日
|
|
||||||
* @property {string} name - 日历项名称
|
|
||||||
* @property {string} item_type - 日历项类型
|
|
||||||
* @property {number} star - 日历项星级
|
|
||||||
* @property {string} bg - 日历项背景
|
|
||||||
* @property {string} icon - 日历项图标
|
|
||||||
* @property {string} weapon_type - 武器类型
|
|
||||||
* @property {string} element - 角色元素
|
|
||||||
* @property {BTMuli.Genshin.Material.BriefInfo[]} materials - 素材简要信息
|
|
||||||
* @property {CalendarSource} source - 日历项来源
|
|
||||||
* @returns {Data}
|
|
||||||
*/
|
|
||||||
export interface Data {
|
|
||||||
id: number
|
|
||||||
content_id: number | null
|
|
||||||
drop_day: number[]
|
|
||||||
name: string
|
|
||||||
item_type: string
|
|
||||||
star: number
|
|
||||||
bg: string
|
|
||||||
icon: string
|
|
||||||
weapon_type: string
|
|
||||||
element?: string
|
|
||||||
materials: BTMuli.Genshin.Material.BriefInfo[]
|
|
||||||
source: CalendarSource
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 素材日历来源
|
|
||||||
* @interface CalendarSource
|
|
||||||
* @since Alpha v0.1.5
|
|
||||||
* @property {string} type - 来源类型
|
|
||||||
* @property {string} area - 来源区域
|
|
||||||
* @property {string} name - 来源名称
|
|
||||||
* @return {CalendarSource}
|
|
||||||
*/
|
|
||||||
export interface CalendarSource {
|
|
||||||
type: string
|
|
||||||
area: string
|
|
||||||
name: string
|
|
||||||
}
|
|
||||||
}
|
|
||||||
192
src/types/Character.d.ts
vendored
192
src/types/Character.d.ts
vendored
@@ -1,192 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file types Character.d.ts
|
|
||||||
* @author BTMuli<bt-muli@outlook.com>
|
|
||||||
* @description 角色相关类型定义
|
|
||||||
* @since Alpha v0.1.5
|
|
||||||
*/
|
|
||||||
|
|
||||||
declare namespace BTMuli.Genshin.Wiki.Character {
|
|
||||||
/**
|
|
||||||
* @description 简略信息,用于整体展示
|
|
||||||
* @since Alpha v0.1.5
|
|
||||||
* @interface BriefInfo
|
|
||||||
* @property {number} id - 角色 ID
|
|
||||||
* @property {number} content_id - 观测枢 id
|
|
||||||
* @property {string} name - 角色名称
|
|
||||||
* @property {number} star - 角色星级
|
|
||||||
* @property {string} bg - 角色背景图
|
|
||||||
* @property {string} element - 角色元素图标
|
|
||||||
* @property {string} weapon - 角色武器类型图标
|
|
||||||
* @property {string} icon - 角色图标
|
|
||||||
* @return BriefInfo
|
|
||||||
*/
|
|
||||||
export interface BriefInfo {
|
|
||||||
id: number
|
|
||||||
content_id?: number | null
|
|
||||||
name: string
|
|
||||||
star: number
|
|
||||||
bg: string
|
|
||||||
element: string
|
|
||||||
weapon: string
|
|
||||||
icon: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 本应用的角色类型
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface FullInfo
|
|
||||||
* @property {number} id - 角色 ID
|
|
||||||
* @property {string} name - 角色名称
|
|
||||||
* @property {number} star - 角色星级
|
|
||||||
* @property {string} element - 角色元素
|
|
||||||
* @property {string} weapon - 角色武器类型
|
|
||||||
* @property {BaseInfo} baseInfo - 角色基础信息
|
|
||||||
* @property {Constellation[]} constellations - 命之座
|
|
||||||
* @property {Talent[]} talents - 角色天赋
|
|
||||||
* @property {AddInfo} addInfo - 角色附加信息
|
|
||||||
* @return FullInfo
|
|
||||||
*/
|
|
||||||
export interface FullInfo {
|
|
||||||
id: number
|
|
||||||
name: string
|
|
||||||
star: number
|
|
||||||
element: string
|
|
||||||
weapon: string
|
|
||||||
baseInfo: BaseInfo
|
|
||||||
constellations: Constellation[]
|
|
||||||
talents: Talent[]
|
|
||||||
addInfo: AddInfo
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 角色基础信息
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface BaseInfo
|
|
||||||
* @property {string} birthday - 生日
|
|
||||||
* @property {string} camp - 所属
|
|
||||||
* @property {string} constellation - 命之座
|
|
||||||
* @property {string} cvZh - 中文配音
|
|
||||||
* @property {string} cvJp - 日文配音
|
|
||||||
* @property {string} description - 角色描述
|
|
||||||
* @property {string[]} source - 角色获取途径
|
|
||||||
* @return BaseInfo
|
|
||||||
*/
|
|
||||||
export interface BaseInfo {
|
|
||||||
birthday: string
|
|
||||||
camp: string
|
|
||||||
constellation: string
|
|
||||||
cvZh: string
|
|
||||||
cvJp: string
|
|
||||||
description: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 角色命之座
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface Constellation
|
|
||||||
* @property {number} id - 命之座 ID,主要是图标 id
|
|
||||||
* @property {string} name - 命之座名称
|
|
||||||
* @description 描述可作为 v-html 使用
|
|
||||||
* @property {string} description - 命之座描述
|
|
||||||
* @return Constellation
|
|
||||||
*/
|
|
||||||
export interface Constellation {
|
|
||||||
id: number
|
|
||||||
name: string
|
|
||||||
description: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 角色天赋
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface Talent
|
|
||||||
* @property {number} id - 天赋 ID
|
|
||||||
* @property {string} name - 天赋名称
|
|
||||||
* @property {string} type - 天赋类型
|
|
||||||
* @property {UpInfo[]} upInfos - 天赋升级信息
|
|
||||||
* @description 描述可作为 v-html 使用
|
|
||||||
* @property {string} description - 天赋描述
|
|
||||||
* @return Talent
|
|
||||||
*/
|
|
||||||
export interface Talent {
|
|
||||||
id: number
|
|
||||||
name: string
|
|
||||||
type: string
|
|
||||||
upInfos?: UpInfo[]
|
|
||||||
description: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 天赋升级信息
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface UpInfo
|
|
||||||
* @property {number} level - 天赋升级原始等级
|
|
||||||
* @property {BTMuli.Genshin.Wiki.Material[]} materials - 天赋升级所需材料
|
|
||||||
* @property {Record<string, number>} oriAttr - 天赋升级前属性
|
|
||||||
* @property {Record<string, number>} upAttr - 天赋升级后属性
|
|
||||||
* @return UpInfo
|
|
||||||
*/
|
|
||||||
export interface UpInfo {
|
|
||||||
level: number
|
|
||||||
materials: BTMuli.Genshin.Wiki.Material[]
|
|
||||||
oriAttr: Record<string, number>
|
|
||||||
upAttr: Record<string, number>
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 角色附加信息
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface AddInfo
|
|
||||||
* @property {BTMuli.Genshin.Wiki.levelUp[]} levelUps - 角色升级信息
|
|
||||||
* @property {SpecialFood} specialFood - 特色料理
|
|
||||||
* @property {Uniform[]} uniforms - 角色衣装
|
|
||||||
* @property {Story[]} stories - 角色故事
|
|
||||||
* @return AddInfo
|
|
||||||
*/
|
|
||||||
export interface AddInfo {
|
|
||||||
levelUps: BTMuli.Genshin.Wiki.levelUp[]
|
|
||||||
specialFood: SpecialFood
|
|
||||||
uniforms: Uniform[]
|
|
||||||
stories: Story[]
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 角色特色料理
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface SpecialFood
|
|
||||||
* @extends {BTMuli.Genshin.Wiki.Food}
|
|
||||||
* @property {number} oriId - 原料理 ID
|
|
||||||
* @property {string} oriName - 原料理名称
|
|
||||||
* @return SpecialFood
|
|
||||||
*/
|
|
||||||
export interface SpecialFood extends BTMuli.Genshin.Wiki.Food {
|
|
||||||
oriId: number
|
|
||||||
oriName: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 角色衣装
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface Uniform
|
|
||||||
* @property {string} name - 衣装名称
|
|
||||||
* @property {string} description - 衣装描述
|
|
||||||
* @return Uniform
|
|
||||||
*/
|
|
||||||
export interface Uniform {
|
|
||||||
name: string
|
|
||||||
description: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 角色故事
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface Story
|
|
||||||
* @property {string} title - 故事标题
|
|
||||||
* @property {string} content - 故事内容
|
|
||||||
* @return Story
|
|
||||||
*/
|
|
||||||
export interface Story {
|
|
||||||
title: string
|
|
||||||
content: string
|
|
||||||
}
|
|
||||||
}
|
|
||||||
197
src/types/Enka.d.ts
vendored
197
src/types/Enka.d.ts
vendored
@@ -1,197 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file types Enka.d.ts
|
|
||||||
* @description Enka types
|
|
||||||
* @author BTMuli<bt-muli@outlook.com>
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
*/
|
|
||||||
|
|
||||||
declare namespace BTMuli.Genshin.Enka {
|
|
||||||
/**
|
|
||||||
* @description ENKA 数据
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface Data
|
|
||||||
* @property {PlayerInfo} playerInfo 玩家信息
|
|
||||||
* @property {AvatarInfo[]} avatarInfoList 角色信息列表
|
|
||||||
* @property {number} ttl 缓存时间
|
|
||||||
* @property {string} uid 用户 UID
|
|
||||||
* @return Data
|
|
||||||
*/
|
|
||||||
export interface Data {
|
|
||||||
playerInfo: PlayerInfo
|
|
||||||
avatarInfoList: AvatarInfo[]
|
|
||||||
ttl: number
|
|
||||||
uid: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 玩家信息
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface PlayerInfo
|
|
||||||
* @property {string} nickname 昵称
|
|
||||||
* @property {number} level 等级
|
|
||||||
* @property {string} signature 个性签名
|
|
||||||
* @property {number} worldLevel 世界等级
|
|
||||||
* @property {number} nameCardId 名片 ID
|
|
||||||
* @property {number} finishAchievementNum 完成成就数量
|
|
||||||
* @property {number} towerFloorIndex 深渊层数
|
|
||||||
* @property {number} towerLevelIndex 深渊间数
|
|
||||||
* @property {BriefAvatarInfo[]} showAvatarInfoList 显示角色信息列表
|
|
||||||
* @property {number[]} showNameCardIdList 显示名片 ID 列表
|
|
||||||
* @property {BriefAvatarInfo} profilePicture 角色头像
|
|
||||||
* @return PlayerInfo
|
|
||||||
*/
|
|
||||||
export interface PlayerInfo {
|
|
||||||
nickname: string
|
|
||||||
level: number
|
|
||||||
signature: string
|
|
||||||
worldLevel: number
|
|
||||||
nameCardId: number
|
|
||||||
finishAchievementNum: number
|
|
||||||
towerFloorIndex: number
|
|
||||||
towerLevelIndex: number
|
|
||||||
showAvatarInfoList: BriefAvatarInfo[]
|
|
||||||
showNameCardIdList: number[]
|
|
||||||
profilePicture: BriefAvatarInfo
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 简要角色信息
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface BriefAvatarInfo
|
|
||||||
* @property {number} avatarId 角色 ID
|
|
||||||
* @property {number} level 角色等级
|
|
||||||
* @property {number} costumeId 角色服装 ID
|
|
||||||
* @return BriefAvatarInfo
|
|
||||||
*/
|
|
||||||
export interface BriefAvatarInfo {
|
|
||||||
avatarId: number
|
|
||||||
level?: number
|
|
||||||
costumeId?: number
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 角色信息
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface AvatarInfo
|
|
||||||
* @property {number} avatarId 角色 ID
|
|
||||||
* @property {Record<number, AvatarProp>} propMap 角色属性
|
|
||||||
* @property {number[]} talentIdList 角色天赋 ID 列表
|
|
||||||
* @property {Record<number, number>} fightPropMap 角色战斗属性
|
|
||||||
* @property {number} skillDepotId 角色技能库 ID
|
|
||||||
* @property {number[]} inherentProudSkillList 角色固有技能列表
|
|
||||||
* @property {Record<number, number>} skillLevelMap 角色技能等级
|
|
||||||
* @property {Equip[]} equipList 角色装备列表
|
|
||||||
* @property {number} fetterInfo.expLevel 角色羁绊等级
|
|
||||||
* @return AvatarInfo
|
|
||||||
*/
|
|
||||||
export interface AvatarInfo {
|
|
||||||
avatarId: number
|
|
||||||
propMap: Record<number, AvatarProp>
|
|
||||||
talentIdList: number[]
|
|
||||||
fightPropMap: Record<number, number>
|
|
||||||
skillDepotId: number
|
|
||||||
inherentProudSkillList: number[]
|
|
||||||
skillLevelMap: Record<number, number>
|
|
||||||
equipList: Equip[]
|
|
||||||
fetterInfo: {
|
|
||||||
expLevel: number
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 角色属性
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface AvatarProp
|
|
||||||
* @property {number} type 角色属性类型
|
|
||||||
* @property {string} ival 角色属性值
|
|
||||||
* @property {string} val 角色属性值
|
|
||||||
* @return AvatarProp
|
|
||||||
*/
|
|
||||||
export interface AvatarProp {
|
|
||||||
type: number
|
|
||||||
ival: string
|
|
||||||
val?: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 角色装备
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface Equip
|
|
||||||
* @property {number} itemId 装备 ID
|
|
||||||
* @property {Reliquary} reliquary 装备圣遗物
|
|
||||||
* @property {EquipFlat} flat 装备属性
|
|
||||||
|
|
||||||
* @return Equip
|
|
||||||
*/
|
|
||||||
export interface Equip {
|
|
||||||
itemId: number
|
|
||||||
reliquary: Reliquary
|
|
||||||
flat: EquipFlat
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 圣遗物
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface Reliquary
|
|
||||||
* @property {number} level 圣遗物等级
|
|
||||||
* @property {number} mainPropId 圣遗物主属性 ID
|
|
||||||
* @property {number[]} appendPropIdList 圣遗物附加属性 ID 列表
|
|
||||||
* @return Reliquary
|
|
||||||
*/
|
|
||||||
export interface Reliquary {
|
|
||||||
level: number
|
|
||||||
mainPropId: number
|
|
||||||
appendPropIdList: number[]
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 装备属性
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface EquipFlat
|
|
||||||
* @property {string} nameTextMapHash 装备名称
|
|
||||||
* @property {string} setNameTextMapHash 装备套装名称
|
|
||||||
* @property {number} rankLevel 装备等级
|
|
||||||
* @property {ReliquaryMainStat} reliquaryMainStat 圣遗物主属性
|
|
||||||
* @property {ReliquaryAppendStat[]} reliquarySubStats 圣遗物附加属性
|
|
||||||
* @property {string} itemType 装备类型
|
|
||||||
* @property {string} icon 装备图标
|
|
||||||
* @property {string} equipType 装备类型
|
|
||||||
* @return EquipFlat
|
|
||||||
*/
|
|
||||||
export interface EquipFlat {
|
|
||||||
nameTextMapHash: string
|
|
||||||
setNameTextMapHash: string
|
|
||||||
rankLevel: number
|
|
||||||
reliquaryMainStat: ReliquaryMainStat
|
|
||||||
reliquarySubStats: ReliquaryAppendStat[]
|
|
||||||
itemType: string
|
|
||||||
icon: string
|
|
||||||
equipType: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 圣遗物主属性
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface ReliquaryMainStat
|
|
||||||
* @property {string} mainPropId 圣遗物主属性 ID
|
|
||||||
* @property {number} statValue 圣遗物主属性值
|
|
||||||
* @return ReliquaryMainStat
|
|
||||||
*/
|
|
||||||
export interface ReliquaryMainStat {
|
|
||||||
mainPropId: string
|
|
||||||
statValue: number
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 圣遗物附加属性
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface ReliquaryAppendStat
|
|
||||||
* @property {string} appendPropId 圣遗物附加属性 ID
|
|
||||||
* @property {number} statValue 圣遗物附加属性值
|
|
||||||
* @return ReliquaryAppendStat
|
|
||||||
*/
|
|
||||||
export interface ReliquaryAppendStat {
|
|
||||||
appendPropId: string
|
|
||||||
statValue: number
|
|
||||||
}
|
|
||||||
}
|
|
||||||
152
src/types/GCG.d.ts
vendored
152
src/types/GCG.d.ts
vendored
@@ -1,152 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file types GCG.d.ts
|
|
||||||
* @description 本应用的 GCG 通用类型定义
|
|
||||||
* @author BTMuli<bt-muli@outlook.com>
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
*/
|
|
||||||
|
|
||||||
declare namespace BTMuli.Genshin.Wiki.GCG {
|
|
||||||
/**
|
|
||||||
* @description 简略信息
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface BriefInfo
|
|
||||||
* @property {number} id - 卡牌 ID
|
|
||||||
* @property {number} content_id - 观测枢 ID
|
|
||||||
* @property {string} name - 卡牌名称
|
|
||||||
* @property {string} type - 卡牌类型
|
|
||||||
* @property {string} icon - 卡牌图标
|
|
||||||
* @return BriefInfo
|
|
||||||
*/
|
|
||||||
export interface BriefInfo {
|
|
||||||
id: number | null
|
|
||||||
content_id: number
|
|
||||||
name: string
|
|
||||||
type: string
|
|
||||||
icon: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 卡牌完整信息
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface FullInfo
|
|
||||||
* @property {number} id - 卡牌 ID
|
|
||||||
* @property {string} name - 卡牌名称
|
|
||||||
* @property {string} type - 卡牌类型
|
|
||||||
* @property {BaseInfo} baseInfo - 基础信息
|
|
||||||
* @property {skillInfo[]} skillInfo - 技能信息
|
|
||||||
* @property {addInfo[]} addInfo - 附加信息
|
|
||||||
* @return FullInfo
|
|
||||||
*/
|
|
||||||
export interface FullInfo {
|
|
||||||
id: number
|
|
||||||
name: string
|
|
||||||
type: string
|
|
||||||
baseInfo: BaseInfo
|
|
||||||
skillInfo: SkillInfo[]
|
|
||||||
addInfo: AddInfo[]
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 卡牌点数消耗类型枚举
|
|
||||||
* @enum PointType
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @see Point
|
|
||||||
* @property {string} NONE - 无消耗
|
|
||||||
* @property {string} SAME - 任意相同骰子
|
|
||||||
* @property {string} ALL - 任意骰子
|
|
||||||
* @property {string} ELEMENT_PYRO - 元素骰子-火
|
|
||||||
* @property {string} ELEMENT_HYDRO - 元素骰子-水
|
|
||||||
* @property {string} ELEMENT_CRYO - 元素骰子-冰
|
|
||||||
* @property {string} ELEMENT_ELECTRO - 元素骰子-雷
|
|
||||||
* @property {string} ELEMENT_ANEMO - 元素骰子-风
|
|
||||||
* @property {string} ELEMENT_GEO - 元素骰子-岩
|
|
||||||
* @property {string} ELEMENT_DENDRO - 元素骰子-草
|
|
||||||
* @property {string} HP - 血量
|
|
||||||
* @property {string} CHARGE - 充能
|
|
||||||
* @return PointType
|
|
||||||
*/
|
|
||||||
export enum PointType {
|
|
||||||
NONE = "NONE",
|
|
||||||
SAME = "SAME",
|
|
||||||
ALL = "ALL",
|
|
||||||
ELEMENT_PYRO = "ELEMENT_PYRO",
|
|
||||||
ELEMENT_HYDRO = "ELEMENT_HYDRO",
|
|
||||||
ELEMENT_CRYO = "ELEMENT_CRYO",
|
|
||||||
ELEMENT_ELECTRO = "ELEMENT_ELECTRO",
|
|
||||||
ELEMENT_ANEMO = "ELEMENT_ANEMO",
|
|
||||||
ELEMENT_GEO = "ELEMENT_GEO",
|
|
||||||
ELEMENT_DENDRO = "ELEMENT_DENDRO",
|
|
||||||
HP = "HP",
|
|
||||||
CHARGE = "CHARGE",
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 卡牌点数消耗
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface Point
|
|
||||||
* @property {number} point - 点数
|
|
||||||
* @property {PointType} type - 点数类型
|
|
||||||
* @return Point
|
|
||||||
*/
|
|
||||||
export interface Point {
|
|
||||||
point: number
|
|
||||||
type: PointType
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 基础信息
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface BaseInfo
|
|
||||||
* @property {string} title - 卡牌称号
|
|
||||||
* @property {string} icon - 卡牌图标
|
|
||||||
* @property {BTMuli.Genshin.Wiki.BaseAttri[]} tags - 卡牌标签
|
|
||||||
* @property {Point[]} cost - 卡牌点数消耗
|
|
||||||
* @property {string} source - 卡牌获取途径
|
|
||||||
* @property {string} description - 卡牌描述
|
|
||||||
* @return BaseInfo
|
|
||||||
*/
|
|
||||||
export interface BaseInfo {
|
|
||||||
title: string
|
|
||||||
icon: string
|
|
||||||
tags: BTMuli.Genshin.Wiki.BaseAttri[]
|
|
||||||
cost: Point[]
|
|
||||||
source: string
|
|
||||||
description: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 技能信息
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface SkillInfo
|
|
||||||
* @property {string} type - 技能类型
|
|
||||||
* @property {string} name - 技能名称
|
|
||||||
* @property {string} description - 技能描述
|
|
||||||
* @property {Point[]} cost - 技能点数消耗
|
|
||||||
* @property {string} icon - 技能图标
|
|
||||||
* @return SkillInfo
|
|
||||||
*/
|
|
||||||
export interface SkillInfo {
|
|
||||||
type: string
|
|
||||||
name: string
|
|
||||||
description: string
|
|
||||||
cost: Point[]
|
|
||||||
icon: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 附加信息
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface AddInfo
|
|
||||||
* @property {string} type - 附加信息类型
|
|
||||||
* @property {string} name - 附加信息名称
|
|
||||||
* @property {string} description - 附加信息描述
|
|
||||||
* @property {string} icon - 附加信息图标
|
|
||||||
* @return AddInfo
|
|
||||||
*/
|
|
||||||
export interface AddInfo {
|
|
||||||
type: string
|
|
||||||
name: string
|
|
||||||
description: string
|
|
||||||
icon: string
|
|
||||||
}
|
|
||||||
}
|
|
||||||
107
src/types/Gacha.d.ts
vendored
107
src/types/Gacha.d.ts
vendored
@@ -1,107 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file types Gacha.d.ts
|
|
||||||
* @description 卡池祈愿类型定义
|
|
||||||
* @author BTMuli<bt-muli@outlook.com>
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
*/
|
|
||||||
|
|
||||||
declare namespace TGPlugin.UIGF {
|
|
||||||
/**
|
|
||||||
* @description UIGF 数据
|
|
||||||
* @since Alpha v1.3.0
|
|
||||||
* @interface BaseData
|
|
||||||
* @property {UigfInfo} info - UIGF 头部信息
|
|
||||||
* @property {UigfGacha[]} list - UIGF 祈愿列表
|
|
||||||
* @return BaseData
|
|
||||||
*/
|
|
||||||
export interface BaseData {
|
|
||||||
info: UigfInfo
|
|
||||||
list: UigfInfo[]
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description UIGF 头部信息
|
|
||||||
* @since Alpha v1.3.0
|
|
||||||
* @interface UigfInfo
|
|
||||||
* @property {string} uid - UID
|
|
||||||
* @property {string} lang - 语言
|
|
||||||
* @property {string} uigf_version - UIGF 版本
|
|
||||||
* @property {number} export_timestamp - 导出时间戳(秒)
|
|
||||||
* @property {string} export_time - 导出时间 yyyy-MM-dd HH:mm:ss
|
|
||||||
* @property {string} export_app - 导出应用
|
|
||||||
* @property {string} export_app_version - 导出应用版本
|
|
||||||
* @return UIGF_Info
|
|
||||||
*/
|
|
||||||
export interface UigfInfo {
|
|
||||||
uid: string
|
|
||||||
lang: string
|
|
||||||
uigf_version: string
|
|
||||||
export_timestamp?: number
|
|
||||||
export_time?: string
|
|
||||||
export_app?: string
|
|
||||||
export_app_version?: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 祈愿类型
|
|
||||||
* @since Alpha v1.3.0
|
|
||||||
* @enum EnumGachaType
|
|
||||||
* @property {string} CharacterUp - 角色活动祈愿
|
|
||||||
* @property {string} CharacterUp2 - 角色活动祈愿2
|
|
||||||
* @property {string} WeaponUp - 武器活动祈愿
|
|
||||||
* @property {string} Normal - 普通祈愿
|
|
||||||
* @property {string} Newbie - 新手祈愿
|
|
||||||
* @return EnumGachaType
|
|
||||||
*/
|
|
||||||
export enum EnumGachaType {
|
|
||||||
CharacterUp = "301",
|
|
||||||
CharacterUp2 = "400",
|
|
||||||
WeaponUp = "302",
|
|
||||||
Normal = "200",
|
|
||||||
Newbie = "100",
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description UIGF 祈愿类型
|
|
||||||
* @since Alpha v1.3.0
|
|
||||||
* @enum EnumUigfGachaType
|
|
||||||
* @property {string} CharacterUp - 角色活动祈愿&角色活动祈愿2
|
|
||||||
* @property {string} WeaponUp - 武器活动祈愿
|
|
||||||
* @property {string} Normal - 普通祈愿
|
|
||||||
* @property {string} Newbie - 新手祈愿
|
|
||||||
* @return EnumUigfGachaType
|
|
||||||
*/
|
|
||||||
export enum EnumUigfGachaType {
|
|
||||||
CharacterUp = "301",
|
|
||||||
WeaponUp = "302",
|
|
||||||
Normal = "200",
|
|
||||||
Newbie = "100",
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description UIGF 祈愿列表
|
|
||||||
* @since Alpha v1.3.0
|
|
||||||
* @interface UigfGacha
|
|
||||||
* @property {EnumGachaType} gacha_type - 祈愿类型
|
|
||||||
* @property {string} item_id - 物品ID
|
|
||||||
* @property {string} count - 数量
|
|
||||||
* @property {string} time - 时间 yyyy-MM-dd HH:mm:ss
|
|
||||||
* @property {string} name - 名称
|
|
||||||
* @property {string} item_type - 物品类型
|
|
||||||
* @property {string} rank_type - 稀有度
|
|
||||||
* @property {string} id - ID
|
|
||||||
* @property {EnumUigfGachaType} uigf_gacha_type - UIGF 祈愿类型
|
|
||||||
* @return UIGF_Gacha
|
|
||||||
*/
|
|
||||||
export interface UigfGacha {
|
|
||||||
gacha_type: string
|
|
||||||
item_id?: string
|
|
||||||
count?: string
|
|
||||||
time: string
|
|
||||||
name: string
|
|
||||||
item_type?: string
|
|
||||||
rank_type?: string
|
|
||||||
id: string
|
|
||||||
uigf_gacha_type: string
|
|
||||||
}
|
|
||||||
}
|
|
||||||
150
src/types/Game/Abyss.d.ts
vendored
Normal file
150
src/types/Game/Abyss.d.ts
vendored
Normal file
@@ -0,0 +1,150 @@
|
|||||||
|
/**
|
||||||
|
* @file types Game Abyss.d.ts
|
||||||
|
* @description 游戏深渊相关类型定义文件
|
||||||
|
* @todo v0.1.5 不使用
|
||||||
|
* @author BTMuli<bt-muli@outlook.com>
|
||||||
|
* @since Alpha v0.2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare namespace BTMuli.Game.Abyss {
|
||||||
|
/**
|
||||||
|
* @description 深渊数据返回类型
|
||||||
|
* @interface Response
|
||||||
|
* @since Alpha v0.2.0
|
||||||
|
* @see todo 请求也得重构一下
|
||||||
|
* @extends TGApp.BBS.Response.Base
|
||||||
|
* @property {FullData} data - 深渊数据
|
||||||
|
* @return Response
|
||||||
|
*/
|
||||||
|
export interface Response extends TGApp.BBS.Response.Base {
|
||||||
|
data: FullData
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 深渊数据类型
|
||||||
|
* @interface FullData
|
||||||
|
* @since Alpha v0.2.0
|
||||||
|
* @property {number} schedule_id - 深渊周期 ID
|
||||||
|
* @property {string} start_time - 深渊开始时间,单位:秒
|
||||||
|
* @property {string} end_time - 深渊结束时间,单位:秒
|
||||||
|
* @property {number} total_battle_times - 总战斗次数
|
||||||
|
* @property {number} total_win_times - todo:未知
|
||||||
|
* @property {string} max_floor - 最深抵达 // 12-3
|
||||||
|
* @property {Character[]} reveal_rank - 出站次数 // 最多的 4 个角色
|
||||||
|
* @property {Character[]} defeat_rank - 最多击破数
|
||||||
|
* @property {Character[]} damage_rank - 最强一击
|
||||||
|
* @property {Character[]} take_damage_rank - 承受最多伤害
|
||||||
|
* @property {Character[]} normal_skill_rank - 元素战技释放数
|
||||||
|
* @property {Character[]} energy_skill_rank - 元素爆发次数
|
||||||
|
* @property {Floor[]} floors - 深渊各层数据
|
||||||
|
* @property {number} total_star - 总星数
|
||||||
|
* @property {boolean} is_unlock - 是否解锁
|
||||||
|
* @return FullData
|
||||||
|
*/
|
||||||
|
export interface FullData {
|
||||||
|
schedule_id: number
|
||||||
|
start_time: string
|
||||||
|
end_time: string
|
||||||
|
total_battle_times: number
|
||||||
|
total_win_times: number
|
||||||
|
max_floor: string
|
||||||
|
reveal_rank: CharacterData[]
|
||||||
|
defeat_rank: CharacterData[]
|
||||||
|
damage_rank: CharacterData[]
|
||||||
|
take_damage_rank: CharacterData[]
|
||||||
|
normal_skill_rank: CharacterData[]
|
||||||
|
energy_skill_rank: CharacterData[]
|
||||||
|
floors: Floor[]
|
||||||
|
total_star: number
|
||||||
|
is_unlock: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 深渊角色数据类型
|
||||||
|
* @interface CharacterData
|
||||||
|
* @since Alpha v0.2.0
|
||||||
|
* @property {number} avatar_id - 角色 ID
|
||||||
|
* @property {string} avatar_icon - 角色图标
|
||||||
|
* @property {number} value - 值
|
||||||
|
* @property {number} rarity - 角色星级
|
||||||
|
* @return CharacterData
|
||||||
|
*/
|
||||||
|
export interface CharacterData {
|
||||||
|
avatar_id: number
|
||||||
|
avatar_icon: string
|
||||||
|
value: number
|
||||||
|
rarity: number
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 深渊层数据类型
|
||||||
|
* @interface Floor
|
||||||
|
* @since Alpha v0.2.0
|
||||||
|
* @property {number} index - 层索引
|
||||||
|
* @property {string} icon - 层图标
|
||||||
|
* @property {boolean} is_unlock - 是否解锁
|
||||||
|
* @property {number} settle_time - todo: 未知
|
||||||
|
* @property {number} star - 获得星数
|
||||||
|
* @property {number} max_star - 最大星数
|
||||||
|
* @property {Level[]} levels - 层内关卡数据
|
||||||
|
* @return Floor
|
||||||
|
*/
|
||||||
|
export interface Floor {
|
||||||
|
index: number
|
||||||
|
icon: string
|
||||||
|
is_unlock: boolean
|
||||||
|
settle_time: number
|
||||||
|
star: number
|
||||||
|
max_star: number
|
||||||
|
levels: Level[]
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 深渊关卡数据类型
|
||||||
|
* @interface Level
|
||||||
|
* @since Alpha v0.2.0
|
||||||
|
* @property {number} index - 关卡索引
|
||||||
|
* @property {number} star - 获得星数
|
||||||
|
* @property {number} max_star - 最大星数
|
||||||
|
* @property {Battle[]} battles - 关卡内战斗数据
|
||||||
|
* @return Level
|
||||||
|
*/
|
||||||
|
export interface Level {
|
||||||
|
index: number
|
||||||
|
star: number
|
||||||
|
max_star: number
|
||||||
|
battles: Battle[]
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 深渊战斗数据类型
|
||||||
|
* @interface Battle
|
||||||
|
* @since Alpha v0.2.0
|
||||||
|
* @property {number} index - 战斗索引 // 1为上半场,2为下半场
|
||||||
|
* @property {string} timestamp - 战斗时间戳
|
||||||
|
* @property {CharacterInfo[]} avatars - 角色信息
|
||||||
|
* @return Battle
|
||||||
|
*/
|
||||||
|
export interface Battle {
|
||||||
|
index: number
|
||||||
|
timestamp: string
|
||||||
|
avatars: CharacterInfo[]
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 深渊角色信息类型
|
||||||
|
* @interface CharacterInfo
|
||||||
|
* @since Alpha v0.2.0
|
||||||
|
* @property {number} id - 角色 ID
|
||||||
|
* @property {string} icon - 角色图标
|
||||||
|
* @property {number} level - 角色等级
|
||||||
|
* @property {number} rarity - 角色星级
|
||||||
|
* @return CharacterInfo
|
||||||
|
*/
|
||||||
|
export interface CharacterInfo {
|
||||||
|
id: number
|
||||||
|
icon: string
|
||||||
|
level: number
|
||||||
|
rarity: number
|
||||||
|
}
|
||||||
|
}
|
||||||
130
src/types/Game/Constant.d.ts
vendored
Normal file
130
src/types/Game/Constant.d.ts
vendored
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
/**
|
||||||
|
* @file types Game Constant.d.ts
|
||||||
|
* @description 游戏常量类型定义文件
|
||||||
|
* @author BTMuli<bt-muli@outlook.com>
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare namespace TGApp.Game.Constant {
|
||||||
|
/**
|
||||||
|
* @description 七元素
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @enum {string}
|
||||||
|
* @property {string} pyro - 火元素
|
||||||
|
* @property {string} hydro - 水元素
|
||||||
|
* @property {string} anemo - 风元素
|
||||||
|
* @property {string} electro - 雷元素
|
||||||
|
* @property {string} cryo - 冰元素
|
||||||
|
* @property {string} geo - 岩元素
|
||||||
|
* @property {string} dendro - 草元素
|
||||||
|
*/
|
||||||
|
export enum EnumElement {
|
||||||
|
pyro = "火元素",
|
||||||
|
hydro = "水元素",
|
||||||
|
anemo = "风元素",
|
||||||
|
electro = "雷元素",
|
||||||
|
cryo = "冰元素",
|
||||||
|
geo = "岩元素",
|
||||||
|
dendro = "草元素",
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 武器类型
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @enum {string}
|
||||||
|
* @property {string} sword - 单手剑
|
||||||
|
* @property {string} claymore - 双手剑
|
||||||
|
* @property {string} pole - 长柄武器
|
||||||
|
* @property {string} bow - 弓
|
||||||
|
* @property {string} catalyst - 法器
|
||||||
|
*/
|
||||||
|
export enum EnumWeapon {
|
||||||
|
sword = "单手剑",
|
||||||
|
claymore = "双手剑",
|
||||||
|
pole = "长柄武器",
|
||||||
|
bow = "弓",
|
||||||
|
catalyst = "法器",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @description 突破信息,适用于角色和武器等级
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface levelUp
|
||||||
|
// * @property {number} level - 突破等级,指达到突破要求的等级,0 表示未突破
|
||||||
|
// * @property {Material[]} materials - 突破所需材料
|
||||||
|
// * @property {Record<string, number>[]} upAttri - 突破后的属性加成
|
||||||
|
// * @property {Record<string, number>[]} averAttri - 突破后的平均每级属性加成
|
||||||
|
// * @property {string} addInfo - 突破后的附加信息,如天赋解锁
|
||||||
|
// * @return levelUp
|
||||||
|
// */
|
||||||
|
// export interface levelUp {
|
||||||
|
// level: number
|
||||||
|
// materials: Material[]
|
||||||
|
// upAttri: Array<Record<string, number>>
|
||||||
|
// averAttri: Array<Record<string, number>>
|
||||||
|
// addInfo?: string
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 材料信息
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface Material
|
||||||
|
// * @property {number} id - 材料 ID
|
||||||
|
// * @property {string} name - 材料名称
|
||||||
|
// * @property {number} star - 材料星级
|
||||||
|
// * @property {string} type - 材料类型
|
||||||
|
// * @property {number} count - 材料数量
|
||||||
|
// * @property {string[]} source - 材料获取途径
|
||||||
|
// * @property {string} description - 材料描述
|
||||||
|
// * @return Material
|
||||||
|
// */
|
||||||
|
// export interface Material {
|
||||||
|
// id: number
|
||||||
|
// name: string
|
||||||
|
// star: number
|
||||||
|
// type: string
|
||||||
|
// count?: number
|
||||||
|
// source: string[]
|
||||||
|
// description: string
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 本应用的食物类型
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface Food
|
||||||
|
// * @property {number} id - 食物 ID
|
||||||
|
// * @property {string} name - 食物名称
|
||||||
|
// * @property {number} star - 食物星级
|
||||||
|
// * @property {string} type - 食物类型
|
||||||
|
// * @property {number} count - 食物数量
|
||||||
|
// * @property {string} description - 食物描述
|
||||||
|
// * @property {string[]} source - 食谱来源
|
||||||
|
// * @property {string} effect - 食物效果
|
||||||
|
// * @return Food
|
||||||
|
// */
|
||||||
|
// export interface Food {
|
||||||
|
// id: number
|
||||||
|
// name: string
|
||||||
|
// star: number
|
||||||
|
// type: string
|
||||||
|
// count?: number
|
||||||
|
// description: string
|
||||||
|
// source: string[]
|
||||||
|
// effect: string
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 本应用的基础属性类型
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface BaseAttri
|
||||||
|
// * @property {string} icon - 属性图标
|
||||||
|
// * @property {string} name - 属性名称
|
||||||
|
// * @property {string} value - 属性值
|
||||||
|
// * @return BaseAttri
|
||||||
|
// */
|
||||||
|
// export interface BaseAttri {
|
||||||
|
// icon: string
|
||||||
|
// name: string
|
||||||
|
// value: string
|
||||||
|
// }
|
||||||
31
src/types/Material.d.ts
vendored
31
src/types/Material.d.ts
vendored
@@ -1,31 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file types Material.d.ts
|
|
||||||
* @description 素材相关类型定义
|
|
||||||
* @author BTMuli<bt-muli@outlook.com>
|
|
||||||
* @since Alpha v0.1。5
|
|
||||||
*/
|
|
||||||
|
|
||||||
declare namespace BTMuli.Genshin.Material {
|
|
||||||
/**
|
|
||||||
* @description 简要信息
|
|
||||||
* @interface BriefInfo
|
|
||||||
* @since Alpha v0.1.5
|
|
||||||
* @property {number} id - 素材 id
|
|
||||||
* @property {number} content_id - 观测枢的 content_id
|
|
||||||
* @property {string} name - 素材名称
|
|
||||||
* @property {string} type - 素材类型
|
|
||||||
* @property {number} star - 素材星级
|
|
||||||
* @property {string} bg - 素材背景
|
|
||||||
* @property {string} icon - 素材图标
|
|
||||||
* @returns {BriefInfo}
|
|
||||||
*/
|
|
||||||
export interface BriefInfo {
|
|
||||||
id: number
|
|
||||||
content_id?: number
|
|
||||||
name: string
|
|
||||||
type: string
|
|
||||||
star: number
|
|
||||||
bg: string
|
|
||||||
icon: string
|
|
||||||
}
|
|
||||||
}
|
|
||||||
60
src/types/NameCard.d.ts
vendored
60
src/types/NameCard.d.ts
vendored
@@ -1,60 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file core types TGNameCard.d.ts
|
|
||||||
* @description 本应用的名片类型定义
|
|
||||||
* @author BTMuli<bt-muli@outlook.com>
|
|
||||||
* @since Alpha v0.1.4
|
|
||||||
*/
|
|
||||||
|
|
||||||
declare namespace BTMuli.Genshin {
|
|
||||||
/**
|
|
||||||
* @description 本应用的名片类型
|
|
||||||
* @since Alpha v0.1.2
|
|
||||||
* @interface NameCard
|
|
||||||
* @property {string} name - 名片名称,同时也是文件名
|
|
||||||
* @property {string} description - 名片描述
|
|
||||||
* @property {string} icon - 名片图标路径
|
|
||||||
* @property {string} bg - 名片背景图路径
|
|
||||||
* @property {string} profile - 名片 Profile 图路径
|
|
||||||
* @property {number} type - 名片类型 (0: 其他,1: 成就,2:角色,3:纪行,4:活动)
|
|
||||||
* @property {string} source - 名片来源
|
|
||||||
* @returns {NameCard}
|
|
||||||
*/
|
|
||||||
export interface NameCard {
|
|
||||||
name: string
|
|
||||||
description: string
|
|
||||||
icon: string
|
|
||||||
bg: string
|
|
||||||
profile: string
|
|
||||||
type: number
|
|
||||||
source: string
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
declare namespace BTMuli.SQLite {
|
|
||||||
/**
|
|
||||||
* @description 数据库内的名片类型
|
|
||||||
* @since Alpha v0.1.4
|
|
||||||
* @interface NameCard
|
|
||||||
* @property {number} id - 名片 ID
|
|
||||||
* @property {string} name - 名片名称
|
|
||||||
* @property {string} description - 名片描述
|
|
||||||
* @property {string} icon - 名片图标路径
|
|
||||||
* @property {string} bg - 名片背景图路径
|
|
||||||
* @property {string} profile - 名片 Profile 图路径
|
|
||||||
* @property {number} type - 名片类型 (0: 其他,1: 成就,2:角色,3:纪行,4:活动)
|
|
||||||
* @property {string} source - 名片来源
|
|
||||||
* @property {string} updated - 名片更新时间
|
|
||||||
* @returns {NameCard}
|
|
||||||
*/
|
|
||||||
export interface NameCard {
|
|
||||||
id: number
|
|
||||||
name: string
|
|
||||||
description: string
|
|
||||||
icon: string
|
|
||||||
bg: string
|
|
||||||
profile: string
|
|
||||||
type: number
|
|
||||||
source: string
|
|
||||||
updated: string
|
|
||||||
}
|
|
||||||
}
|
|
||||||
200
src/types/Plugins/Enka.d.ts
vendored
Normal file
200
src/types/Plugins/Enka.d.ts
vendored
Normal file
@@ -0,0 +1,200 @@
|
|||||||
|
/**
|
||||||
|
* @file types Plugins Enka.d.ts
|
||||||
|
* @description Enka 获取到的数据类型定义文件
|
||||||
|
* @todo 待使用
|
||||||
|
* @author BTMuli<bt-muli@outlook.com>
|
||||||
|
* @since Alpha v0.2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare namespace TGApp.Plugins.Enka {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @description ENKA 数据
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface Data
|
||||||
|
// * @property {PlayerInfo} playerInfo 玩家信息
|
||||||
|
// * @property {AvatarInfo[]} avatarInfoList 角色信息列表
|
||||||
|
// * @property {number} ttl 缓存时间
|
||||||
|
// * @property {string} uid 用户 UID
|
||||||
|
// * @return Data
|
||||||
|
// */
|
||||||
|
// export interface Data {
|
||||||
|
// playerInfo: PlayerInfo
|
||||||
|
// avatarInfoList: AvatarInfo[]
|
||||||
|
// ttl: number
|
||||||
|
// uid: string
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 玩家信息
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface PlayerInfo
|
||||||
|
// * @property {string} nickname 昵称
|
||||||
|
// * @property {number} level 等级
|
||||||
|
// * @property {string} signature 个性签名
|
||||||
|
// * @property {number} worldLevel 世界等级
|
||||||
|
// * @property {number} nameCardId 名片 ID
|
||||||
|
// * @property {number} finishAchievementNum 完成成就数量
|
||||||
|
// * @property {number} towerFloorIndex 深渊层数
|
||||||
|
// * @property {number} towerLevelIndex 深渊间数
|
||||||
|
// * @property {BriefAvatarInfo[]} showAvatarInfoList 显示角色信息列表
|
||||||
|
// * @property {number[]} showNameCardIdList 显示名片 ID 列表
|
||||||
|
// * @property {BriefAvatarInfo} profilePicture 角色头像
|
||||||
|
// * @return PlayerInfo
|
||||||
|
// */
|
||||||
|
// export interface PlayerInfo {
|
||||||
|
// nickname: string
|
||||||
|
// level: number
|
||||||
|
// signature: string
|
||||||
|
// worldLevel: number
|
||||||
|
// nameCardId: number
|
||||||
|
// finishAchievementNum: number
|
||||||
|
// towerFloorIndex: number
|
||||||
|
// towerLevelIndex: number
|
||||||
|
// showAvatarInfoList: BriefAvatarInfo[]
|
||||||
|
// showNameCardIdList: number[]
|
||||||
|
// profilePicture: BriefAvatarInfo
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 简要角色信息
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface BriefAvatarInfo
|
||||||
|
// * @property {number} avatarId 角色 ID
|
||||||
|
// * @property {number} level 角色等级
|
||||||
|
// * @property {number} costumeId 角色服装 ID
|
||||||
|
// * @return BriefAvatarInfo
|
||||||
|
// */
|
||||||
|
// export interface BriefAvatarInfo {
|
||||||
|
// avatarId: number
|
||||||
|
// level?: number
|
||||||
|
// costumeId?: number
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 角色信息
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface AvatarInfo
|
||||||
|
// * @property {number} avatarId 角色 ID
|
||||||
|
// * @property {Record<number, AvatarProp>} propMap 角色属性
|
||||||
|
// * @property {number[]} talentIdList 角色天赋 ID 列表
|
||||||
|
// * @property {Record<number, number>} fightPropMap 角色战斗属性
|
||||||
|
// * @property {number} skillDepotId 角色技能库 ID
|
||||||
|
// * @property {number[]} inherentProudSkillList 角色固有技能列表
|
||||||
|
// * @property {Record<number, number>} skillLevelMap 角色技能等级
|
||||||
|
// * @property {Equip[]} equipList 角色装备列表
|
||||||
|
// * @property {number} fetterInfo.expLevel 角色羁绊等级
|
||||||
|
// * @return AvatarInfo
|
||||||
|
// */
|
||||||
|
// export interface AvatarInfo {
|
||||||
|
// avatarId: number
|
||||||
|
// propMap: Record<number, AvatarProp>
|
||||||
|
// talentIdList: number[]
|
||||||
|
// fightPropMap: Record<number, number>
|
||||||
|
// skillDepotId: number
|
||||||
|
// inherentProudSkillList: number[]
|
||||||
|
// skillLevelMap: Record<number, number>
|
||||||
|
// equipList: Equip[]
|
||||||
|
// fetterInfo: {
|
||||||
|
// expLevel: number
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 角色属性
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface AvatarProp
|
||||||
|
// * @property {number} type 角色属性类型
|
||||||
|
// * @property {string} ival 角色属性值
|
||||||
|
// * @property {string} val 角色属性值
|
||||||
|
// * @return AvatarProp
|
||||||
|
// */
|
||||||
|
// export interface AvatarProp {
|
||||||
|
// type: number
|
||||||
|
// ival: string
|
||||||
|
// val?: string
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 角色装备
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface Equip
|
||||||
|
// * @property {number} itemId 装备 ID
|
||||||
|
// * @property {Reliquary} reliquary 装备圣遗物
|
||||||
|
// * @property {EquipFlat} flat 装备属性
|
||||||
|
//
|
||||||
|
// * @return Equip
|
||||||
|
// */
|
||||||
|
// export interface Equip {
|
||||||
|
// itemId: number
|
||||||
|
// reliquary: Reliquary
|
||||||
|
// flat: EquipFlat
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 圣遗物
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface Reliquary
|
||||||
|
// * @property {number} level 圣遗物等级
|
||||||
|
// * @property {number} mainPropId 圣遗物主属性 ID
|
||||||
|
// * @property {number[]} appendPropIdList 圣遗物附加属性 ID 列表
|
||||||
|
// * @return Reliquary
|
||||||
|
// */
|
||||||
|
// export interface Reliquary {
|
||||||
|
// level: number
|
||||||
|
// mainPropId: number
|
||||||
|
// appendPropIdList: number[]
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 装备属性
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface EquipFlat
|
||||||
|
// * @property {string} nameTextMapHash 装备名称
|
||||||
|
// * @property {string} setNameTextMapHash 装备套装名称
|
||||||
|
// * @property {number} rankLevel 装备等级
|
||||||
|
// * @property {ReliquaryMainStat} reliquaryMainStat 圣遗物主属性
|
||||||
|
// * @property {ReliquaryAppendStat[]} reliquarySubStats 圣遗物附加属性
|
||||||
|
// * @property {string} itemType 装备类型
|
||||||
|
// * @property {string} icon 装备图标
|
||||||
|
// * @property {string} equipType 装备类型
|
||||||
|
// * @return EquipFlat
|
||||||
|
// */
|
||||||
|
// export interface EquipFlat {
|
||||||
|
// nameTextMapHash: string
|
||||||
|
// setNameTextMapHash: string
|
||||||
|
// rankLevel: number
|
||||||
|
// reliquaryMainStat: ReliquaryMainStat
|
||||||
|
// reliquarySubStats: ReliquaryAppendStat[]
|
||||||
|
// itemType: string
|
||||||
|
// icon: string
|
||||||
|
// equipType: string
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 圣遗物主属性
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface ReliquaryMainStat
|
||||||
|
// * @property {string} mainPropId 圣遗物主属性 ID
|
||||||
|
// * @property {number} statValue 圣遗物主属性值
|
||||||
|
// * @return ReliquaryMainStat
|
||||||
|
// */
|
||||||
|
// export interface ReliquaryMainStat {
|
||||||
|
// mainPropId: string
|
||||||
|
// statValue: number
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 圣遗物附加属性
|
||||||
|
// * @since Alpha v0.1.3
|
||||||
|
// * @interface ReliquaryAppendStat
|
||||||
|
// * @property {string} appendPropId 圣遗物附加属性 ID
|
||||||
|
// * @property {number} statValue 圣遗物附加属性值
|
||||||
|
// * @return ReliquaryAppendStat
|
||||||
|
// */
|
||||||
|
// export interface ReliquaryAppendStat {
|
||||||
|
// appendPropId: string
|
||||||
|
// statValue: number
|
||||||
|
// }
|
||||||
55
src/types/Plugins/UIAF.d.ts
vendored
Normal file
55
src/types/Plugins/UIAF.d.ts
vendored
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
/**
|
||||||
|
* @file types Plugins UIAF.d.ts
|
||||||
|
* @description UIAF 插件类型定义文件
|
||||||
|
* @author BTMuli<bt-muli@outlook.com>
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare namespace TGApp.Plugins.UIAF {
|
||||||
|
/**
|
||||||
|
* @interface Data
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @description UIAF 成就数据
|
||||||
|
* @property {Export} info UIAF 头部信息
|
||||||
|
* @property {Achievement[]} list UIAF 成就列表
|
||||||
|
* @return Data
|
||||||
|
*/
|
||||||
|
export interface Data {
|
||||||
|
info: Export
|
||||||
|
list: Achievement[]
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @interface Export
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @description UIAF 头部信息
|
||||||
|
* @property {string} export_app 导出的应用名称
|
||||||
|
* @property {number} export_timestamp 导出时间戳,正确时间戳得乘以 1000
|
||||||
|
* @property {string} export_app_version 导出的应用版本
|
||||||
|
* @property {string} uiaf_version UIAF 版本
|
||||||
|
* @return Export
|
||||||
|
*/
|
||||||
|
export interface Export {
|
||||||
|
export_app: string
|
||||||
|
export_timestamp: number
|
||||||
|
export_app_version: string
|
||||||
|
uiaf_version: string
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @interface Achievement
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @description UIAF 单个成就数据
|
||||||
|
* @property {number} id 成就 ID
|
||||||
|
* @property {number} timestamp 成就记录时间戳,正确时间戳得乘以 1000
|
||||||
|
* @property {number} current 成就进度
|
||||||
|
* @property {number} status 成就状态,0 为未完成,1 为已完成
|
||||||
|
* @return Achievement
|
||||||
|
*/
|
||||||
|
export interface Achievement {
|
||||||
|
id: number
|
||||||
|
timestamp: number
|
||||||
|
current: number
|
||||||
|
status: number
|
||||||
|
}
|
||||||
|
}
|
||||||
110
src/types/Plugins/UIGF.d.ts
vendored
Normal file
110
src/types/Plugins/UIGF.d.ts
vendored
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
/**
|
||||||
|
* @file types Plugins UIGF.d.ts
|
||||||
|
* @description UIGF 插件类型定义文件
|
||||||
|
* @todo 待使用
|
||||||
|
* @author BTMuli<bt-muli@outlook.com>
|
||||||
|
* @since Alpha v0.2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare namespace TGApp.Plugins.UIGF {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @description UIGF 数据
|
||||||
|
// * @since Alpha v1.3.0
|
||||||
|
// * @interface BaseData
|
||||||
|
// * @property {UigfInfo} info - UIGF 头部信息
|
||||||
|
// * @property {UigfGacha[]} list - UIGF 祈愿列表
|
||||||
|
// * @return BaseData
|
||||||
|
// */
|
||||||
|
// export interface BaseData {
|
||||||
|
// info: UigfInfo
|
||||||
|
// list: UigfInfo[]
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description UIGF 头部信息
|
||||||
|
// * @since Alpha v1.3.0
|
||||||
|
// * @interface UigfInfo
|
||||||
|
// * @property {string} uid - UID
|
||||||
|
// * @property {string} lang - 语言
|
||||||
|
// * @property {string} uigf_version - UIGF 版本
|
||||||
|
// * @property {number} export_timestamp - 导出时间戳(秒)
|
||||||
|
// * @property {string} export_time - 导出时间 yyyy-MM-dd HH:mm:ss
|
||||||
|
// * @property {string} export_app - 导出应用
|
||||||
|
// * @property {string} export_app_version - 导出应用版本
|
||||||
|
// * @return UIGF_Info
|
||||||
|
// */
|
||||||
|
// export interface UigfInfo {
|
||||||
|
// uid: string
|
||||||
|
// lang: string
|
||||||
|
// uigf_version: string
|
||||||
|
// export_timestamp?: number
|
||||||
|
// export_time?: string
|
||||||
|
// export_app?: string
|
||||||
|
// export_app_version?: string
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description 祈愿类型
|
||||||
|
// * @since Alpha v1.3.0
|
||||||
|
// * @enum EnumGachaType
|
||||||
|
// * @property {string} CharacterUp - 角色活动祈愿
|
||||||
|
// * @property {string} CharacterUp2 - 角色活动祈愿2
|
||||||
|
// * @property {string} WeaponUp - 武器活动祈愿
|
||||||
|
// * @property {string} Normal - 普通祈愿
|
||||||
|
// * @property {string} Newbie - 新手祈愿
|
||||||
|
// * @return EnumGachaType
|
||||||
|
// */
|
||||||
|
// export enum EnumGachaType {
|
||||||
|
// CharacterUp = "301",
|
||||||
|
// CharacterUp2 = "400",
|
||||||
|
// WeaponUp = "302",
|
||||||
|
// Normal = "200",
|
||||||
|
// Newbie = "100",
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description UIGF 祈愿类型
|
||||||
|
// * @since Alpha v1.3.0
|
||||||
|
// * @enum EnumUigfGachaType
|
||||||
|
// * @property {string} CharacterUp - 角色活动祈愿&角色活动祈愿2
|
||||||
|
// * @property {string} WeaponUp - 武器活动祈愿
|
||||||
|
// * @property {string} Normal - 普通祈愿
|
||||||
|
// * @property {string} Newbie - 新手祈愿
|
||||||
|
// * @return EnumUigfGachaType
|
||||||
|
// */
|
||||||
|
// export enum EnumUigfGachaType {
|
||||||
|
// CharacterUp = "301",
|
||||||
|
// WeaponUp = "302",
|
||||||
|
// Normal = "200",
|
||||||
|
// Newbie = "100",
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @description UIGF 祈愿列表
|
||||||
|
// * @since Alpha v1.3.0
|
||||||
|
// * @interface UigfGacha
|
||||||
|
// * @property {EnumGachaType} gacha_type - 祈愿类型
|
||||||
|
// * @property {string} item_id - 物品ID
|
||||||
|
// * @property {string} count - 数量
|
||||||
|
// * @property {string} time - 时间 yyyy-MM-dd HH:mm:ss
|
||||||
|
// * @property {string} name - 名称
|
||||||
|
// * @property {string} item_type - 物品类型
|
||||||
|
// * @property {string} rank_type - 稀有度
|
||||||
|
// * @property {string} id - ID
|
||||||
|
// * @property {EnumUigfGachaType} uigf_gacha_type - UIGF 祈愿类型
|
||||||
|
// * @return UIGF_Gacha
|
||||||
|
// */
|
||||||
|
// export interface UigfGacha {
|
||||||
|
// gacha_type: string
|
||||||
|
// item_id?: string
|
||||||
|
// count?: string
|
||||||
|
// time: string
|
||||||
|
// name: string
|
||||||
|
// item_type?: string
|
||||||
|
// rank_type?: string
|
||||||
|
// id: string
|
||||||
|
// uigf_gacha_type: string
|
||||||
|
// }
|
||||||
67
src/types/Sqlite/Achievement.d.ts
vendored
Normal file
67
src/types/Sqlite/Achievement.d.ts
vendored
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
/**
|
||||||
|
* @file types Sqlite Achievement.d.ts
|
||||||
|
* @description 数据库成就相关类型定义文件
|
||||||
|
* @todo https://github.com/BTMuli/Tauri.Genshin/issues/19
|
||||||
|
* @author BTMuli<bt-muli@outlook.com>
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare namespace BTMuli.Sqlite.Achievement {
|
||||||
|
/**
|
||||||
|
* @description 数据库-成就表
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @interface SingleTable
|
||||||
|
* @property {number} id - 成就 ID
|
||||||
|
* @property {number} series - 成就系列 ID
|
||||||
|
* @property {number} order - 成就排列顺序,用于展示全部成就
|
||||||
|
* @property {string} name - 成就名称
|
||||||
|
* @property {string} description - 成就描述
|
||||||
|
* @property {number} reward - 成就奖励
|
||||||
|
* @property {number} isCompleted - 成就是否完成
|
||||||
|
* @property {string} completedTime - 成就完成时间
|
||||||
|
* @property {number} progress - 成就进度
|
||||||
|
* @property {string} version - 成就版本
|
||||||
|
* @property {string} updated - 数据库更新时间
|
||||||
|
* @return SingleTable
|
||||||
|
*/
|
||||||
|
export interface SingleTable {
|
||||||
|
id: number
|
||||||
|
series: number
|
||||||
|
order: number
|
||||||
|
name: string
|
||||||
|
description: string
|
||||||
|
reward: number
|
||||||
|
isCompleted: 0 | 1
|
||||||
|
completedTime: string
|
||||||
|
progress: number
|
||||||
|
version: string
|
||||||
|
updated: string
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 数据库-成就系列表
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @interface SeriesTable
|
||||||
|
* @property {number} id - 成就系列 ID
|
||||||
|
* @property {number} order - 成就系列排列顺序,用于展示全部成就系列
|
||||||
|
* @property {string} name - 成就系列名称
|
||||||
|
* @property {string} version - 成就系列版本
|
||||||
|
* @property {number} totalCount - 成就系列包含的成就数
|
||||||
|
* @property {number} finCount - 成就系列已完成的成就数
|
||||||
|
* @property {string} icon - 成就系列图标
|
||||||
|
* @property {string} nameCard - 成就系列对应名片
|
||||||
|
* @property {string} updated - 数据库更新时间
|
||||||
|
* @returns SeriesTable
|
||||||
|
*/
|
||||||
|
export interface SeriesTable {
|
||||||
|
id: number
|
||||||
|
order: number
|
||||||
|
name: string
|
||||||
|
version: string
|
||||||
|
totalCount: number
|
||||||
|
finCount: number
|
||||||
|
icon: string
|
||||||
|
nameCard: string
|
||||||
|
updated: string
|
||||||
|
}
|
||||||
|
}
|
||||||
34
src/types/Sqlite/NameCard.d.ts
vendored
Normal file
34
src/types/Sqlite/NameCard.d.ts
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
/**
|
||||||
|
* @file types Sqlite NameCard.d.ts
|
||||||
|
* @description Sqlite 名片类型定义文件
|
||||||
|
* @author BTMuli<bt-muli@outlook.com>
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare namespace TGApp.Sqlite.NameCard {
|
||||||
|
/**
|
||||||
|
* @description 名片数据
|
||||||
|
* @since Alpha v0.1.5
|
||||||
|
* @interface Item
|
||||||
|
* @property {string} name - 名片名称
|
||||||
|
* @property {string} desc - 名片描述
|
||||||
|
* @property {string} icon - 名片图标
|
||||||
|
* @property {string} bg - 名片背景图
|
||||||
|
* @property {string} profile - 名片 Profile 图
|
||||||
|
* @description 0: 其他,1: 成就,2:角色,3:纪行,4:活动 // todo: 后续用枚举替换
|
||||||
|
* @property {number} type - 名片类型
|
||||||
|
* @property {string} source - 名片来源
|
||||||
|
* @property {string} updated - 数据库更新时间
|
||||||
|
* @return Item
|
||||||
|
*/
|
||||||
|
export interface Item {
|
||||||
|
name: string
|
||||||
|
desc: string
|
||||||
|
icon: string
|
||||||
|
bg: string
|
||||||
|
profile: string
|
||||||
|
type: number
|
||||||
|
source: string
|
||||||
|
updated: string
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,15 +1,29 @@
|
|||||||
/**
|
/**
|
||||||
* @file types Game.d.ts
|
* @file types User Account.d.ts
|
||||||
* @description 游戏数据相关接口
|
* @description 用户账号相关类型定义文件
|
||||||
* @author BTMuli<bt-muli@outlook.com>
|
* @author BTMuli<bt-muli@outlook.com>
|
||||||
* @since Alpha v0.2.0
|
* @since Alpha v0.1.5
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare namespace BTMuli.User.Game {
|
declare namespace BTMuli.User.Account {
|
||||||
/**
|
/**
|
||||||
* @description 游戏账号
|
* @description 游戏账号返回类型
|
||||||
* @see TGRequest.User.byCookie.getAccounts
|
* @interface GameResponse
|
||||||
* @since Alpha v0.2.0
|
* @since Alpha v0.1.5
|
||||||
|
* @extends BTMuli.Constant.Response.Base
|
||||||
|
* @property {Game} data.list 游戏账号列表
|
||||||
|
* @return GameResponse
|
||||||
|
*/
|
||||||
|
export interface GameResponse extends BTMuli.Constant.Response.Base {
|
||||||
|
data: {
|
||||||
|
list: Game
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 游戏账号类型
|
||||||
|
* @interface Game
|
||||||
|
* @since Alpha v0.1.5
|
||||||
* @property {string} game_biz 游戏 biz,例如 hk4e_cn
|
* @property {string} game_biz 游戏 biz,例如 hk4e_cn
|
||||||
* @property {string} game_uid 游戏 uid
|
* @property {string} game_uid 游戏 uid
|
||||||
* @property {boolean} is_chosen 是否为当前选中账号
|
* @property {boolean} is_chosen 是否为当前选中账号
|
||||||
@@ -18,9 +32,9 @@ declare namespace BTMuli.User.Game {
|
|||||||
* @property {string} nickname 游戏昵称
|
* @property {string} nickname 游戏昵称
|
||||||
* @property {string} region 游戏区域
|
* @property {string} region 游戏区域
|
||||||
* @property {string} region_name 游戏区域名称
|
* @property {string} region_name 游戏区域名称
|
||||||
* @returns Account
|
* @return Game
|
||||||
*/
|
*/
|
||||||
export interface Account {
|
export interface Game {
|
||||||
game_biz: string
|
game_biz: string
|
||||||
game_uid: string
|
game_uid: string
|
||||||
is_chosen: boolean
|
is_chosen: boolean
|
||||||
@@ -30,4 +44,5 @@ declare namespace BTMuli.User.Game {
|
|||||||
region: string
|
region: string
|
||||||
region_name: string
|
region_name: string
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
130
src/types/UserResponse.d.ts
vendored
130
src/types/UserResponse.d.ts
vendored
@@ -1,130 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file types UserResponse.d.ts
|
|
||||||
* @description 用户请求返回相关类型定义文件
|
|
||||||
* @author BTMuli<bt-muli@outlook.com>
|
|
||||||
* @since Alpha v0.2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
declare namespace BTMuli.User.Response {
|
|
||||||
/**
|
|
||||||
* @description token 列表项
|
|
||||||
* @since Alpha v0.2.0
|
|
||||||
* @see Tokens
|
|
||||||
* @interface TokenItem
|
|
||||||
* @property {string} name token 名称
|
|
||||||
* @property {string} token token 值
|
|
||||||
* @returns {TokenItem}
|
|
||||||
*/
|
|
||||||
export interface TokenItem {
|
|
||||||
name: string
|
|
||||||
token: string
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @description 获取 ltoken 跟 stoken 的响应
|
|
||||||
* @since Alpha v0.2.0
|
|
||||||
* @see TGRequest.User.byLoginTicket.getTokens
|
|
||||||
* @interface Tokens
|
|
||||||
* @extends {BTMuli.Genshin.Base.Response}
|
|
||||||
* @property {TokenItem[]} data.list token 列表
|
|
||||||
* @returns {Tokens}
|
|
||||||
*/
|
|
||||||
export interface Tokens extends BTMuli.Genshin.Base.Response {
|
|
||||||
data: {
|
|
||||||
list: TokenItem[]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @description 根据 stoken 获取 ltoken
|
|
||||||
* @since Alpha v0.2.0
|
|
||||||
* @see TGRequest.User.byLoginTicket.getLToken
|
|
||||||
* @interface LToken extends BTMuli.Genshin.Base.Response
|
|
||||||
* @property {string} data.ltoken
|
|
||||||
* @returns {LToken}
|
|
||||||
*/
|
|
||||||
export interface LToken extends BTMuli.Genshin.Base.Response {
|
|
||||||
data: {
|
|
||||||
ltoken: string
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @description 根据 stoken 获取 cookie_token
|
|
||||||
* @since Alpha v0.2.0
|
|
||||||
* @see TGRequest.User.bySToken.getCookieToken
|
|
||||||
* @interface CookieToken extends BTMuli.Genshin.Base.Response
|
|
||||||
* @property {string} data.uid 用户 uid
|
|
||||||
* @property {string} data.cookie_token cookie_token
|
|
||||||
* @returns {CookieToken}
|
|
||||||
*/
|
|
||||||
export interface CookieToken extends BTMuli.Genshin.Base.Response {
|
|
||||||
data: {
|
|
||||||
uid: string
|
|
||||||
cookie_token: string
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @description 验证 stoken 的用户信息
|
|
||||||
* @since Alpha v0.2.0
|
|
||||||
* @see TGRequest.User.bySToken.verify
|
|
||||||
* @interface VerifyUserInfo
|
|
||||||
* @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} 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 账号绑定信息
|
|
||||||
* @returns {VerifyUserInfo}
|
|
||||||
*/
|
|
||||||
export interface VerifyUserInfo {
|
|
||||||
aid: string
|
|
||||||
mid: string
|
|
||||||
account_name: string
|
|
||||||
email: string
|
|
||||||
is_email_verify: number
|
|
||||||
area_code: string
|
|
||||||
safe_mobile: string
|
|
||||||
realname: string
|
|
||||||
identity_code: string
|
|
||||||
rebind_area_code: string
|
|
||||||
rebind_mobile: string
|
|
||||||
rebind_mobile_time: string
|
|
||||||
links: unknown[]
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @description 验证 stoken 的响应
|
|
||||||
* @since Alpha v0.2.0
|
|
||||||
* @see TGRequest.User.bySToken.verify
|
|
||||||
* @interface Verify extends BTMuli.Genshin.Base.Response
|
|
||||||
* @property {VerifyUserInfo} data.user_info 用户信息
|
|
||||||
* @property {unknown} data.realname_info 实名信息
|
|
||||||
* @property {boolean} need_realperson 是否需要实名认证
|
|
||||||
* @returns {Verify}
|
|
||||||
*/
|
|
||||||
export interface Verify extends BTMuli.Genshin.Base.Response {
|
|
||||||
data: {
|
|
||||||
user_info: VerifyUserInfo
|
|
||||||
realname_info: unknown | null
|
|
||||||
need_realperson: boolean
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @description 获取游戏账号的响应
|
|
||||||
* @since Alpha v0.2.0
|
|
||||||
* @see TGRequest.User.byCookie.getGameAccounts
|
|
||||||
* @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[]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
135
src/types/WIKI.d.ts
vendored
135
src/types/WIKI.d.ts
vendored
@@ -1,135 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file types WIki.d.ts
|
|
||||||
* @description 本应用的 Wiki 通用类型定义
|
|
||||||
* @author BTMuli<bt-muli@outlook.com>
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
*/
|
|
||||||
|
|
||||||
declare namespace BTMuli.Genshin.Wiki {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 七元素枚举
|
|
||||||
* @enum EnumElement
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @see CharacterCardType
|
|
||||||
* @property {string} pyro 火元素
|
|
||||||
* @property {string} hydro 水元素
|
|
||||||
* @property {string} cryo 冰元素
|
|
||||||
* @property {string} electro 雷元素
|
|
||||||
* @property {string} anemo 风元素
|
|
||||||
* @property {string} geo 岩元素
|
|
||||||
* @property {string} dendro 草元素
|
|
||||||
* @return EnumElement
|
|
||||||
*/
|
|
||||||
export enum EnumElement {
|
|
||||||
pyro = "火元素",
|
|
||||||
hydro = "水元素",
|
|
||||||
cryo = "冰元素",
|
|
||||||
electro = "雷元素",
|
|
||||||
anemo = "风元素",
|
|
||||||
geo = "岩元素",
|
|
||||||
dendro = "草元素",
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 武器类型枚举
|
|
||||||
* @enum EnumWeapon
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @see CharacterCardType
|
|
||||||
* @property {string} sword 单手剑
|
|
||||||
* @property {string} claymore 双手剑
|
|
||||||
* @property {string} pole 长柄武器
|
|
||||||
* @property {string} bow 弓
|
|
||||||
* @property {string} catalyst 法器
|
|
||||||
* @return EnumWeapon
|
|
||||||
*/
|
|
||||||
export enum EnumWeapon {
|
|
||||||
sword = "单手剑",
|
|
||||||
claymore = "双手剑",
|
|
||||||
pole = "长柄武器",
|
|
||||||
bow = "弓",
|
|
||||||
catalyst = "法器",
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 突破信息,适用于角色和武器等级
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface levelUp
|
|
||||||
* @property {number} level - 突破等级,指达到突破要求的等级,0 表示未突破
|
|
||||||
* @property {Material[]} materials - 突破所需材料
|
|
||||||
* @property {Record<string, number>[]} upAttri - 突破后的属性加成
|
|
||||||
* @property {Record<string, number>[]} averAttri - 突破后的平均每级属性加成
|
|
||||||
* @property {string} addInfo - 突破后的附加信息,如天赋解锁
|
|
||||||
* @return levelUp
|
|
||||||
*/
|
|
||||||
export interface levelUp {
|
|
||||||
level: number
|
|
||||||
materials: Material[]
|
|
||||||
upAttri: Array<Record<string, number>>
|
|
||||||
averAttri: Array<Record<string, number>>
|
|
||||||
addInfo?: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 材料信息
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface Material
|
|
||||||
* @property {number} id - 材料 ID
|
|
||||||
* @property {string} name - 材料名称
|
|
||||||
* @property {number} star - 材料星级
|
|
||||||
* @property {string} type - 材料类型
|
|
||||||
* @property {number} count - 材料数量
|
|
||||||
* @property {string[]} source - 材料获取途径
|
|
||||||
* @property {string} description - 材料描述
|
|
||||||
* @return Material
|
|
||||||
*/
|
|
||||||
export interface Material {
|
|
||||||
id: number
|
|
||||||
name: string
|
|
||||||
star: number
|
|
||||||
type: string
|
|
||||||
count?: number
|
|
||||||
source: string[]
|
|
||||||
description: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 本应用的食物类型
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface Food
|
|
||||||
* @property {number} id - 食物 ID
|
|
||||||
* @property {string} name - 食物名称
|
|
||||||
* @property {number} star - 食物星级
|
|
||||||
* @property {string} type - 食物类型
|
|
||||||
* @property {number} count - 食物数量
|
|
||||||
* @property {string} description - 食物描述
|
|
||||||
* @property {string[]} source - 食谱来源
|
|
||||||
* @property {string} effect - 食物效果
|
|
||||||
* @return Food
|
|
||||||
*/
|
|
||||||
export interface Food {
|
|
||||||
id: number
|
|
||||||
name: string
|
|
||||||
star: number
|
|
||||||
type: string
|
|
||||||
count?: number
|
|
||||||
description: string
|
|
||||||
source: string[]
|
|
||||||
effect: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 本应用的基础属性类型
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface BaseAttri
|
|
||||||
* @property {string} icon - 属性图标
|
|
||||||
* @property {string} name - 属性名称
|
|
||||||
* @property {string} value - 属性值
|
|
||||||
* @return BaseAttri
|
|
||||||
*/
|
|
||||||
export interface BaseAttri {
|
|
||||||
icon: string
|
|
||||||
name: string
|
|
||||||
value: string
|
|
||||||
}
|
|
||||||
}
|
|
||||||
153
src/types/Weapon.d.ts
vendored
153
src/types/Weapon.d.ts
vendored
@@ -1,153 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file types Weapon.d.ts
|
|
||||||
* @description 本应用的武器类型定义
|
|
||||||
* @author BTMuli<bt-muli@outlook.com>
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
*/
|
|
||||||
|
|
||||||
declare namespace BTMuli.Genshin.Wiki.Weapon {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 简略信息,用于整体展示
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface BriefInfo
|
|
||||||
* @property {number} id - 武器 ID
|
|
||||||
* @property {number} content_id - 观测枢 id
|
|
||||||
* @property {string} name - 武器名称
|
|
||||||
* @property {number} star - 武器星级
|
|
||||||
* @property {string} bg - 武器背景图
|
|
||||||
* @property {string} type - 武器类型
|
|
||||||
* @property {string} icon - 武器图标
|
|
||||||
* @return BriefInfo
|
|
||||||
*/
|
|
||||||
export interface BriefInfo {
|
|
||||||
id: number
|
|
||||||
content_id?: number | null
|
|
||||||
name: string
|
|
||||||
star: number
|
|
||||||
bg: string
|
|
||||||
type: string
|
|
||||||
icon: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 本应用的武器类型
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface FullInfo
|
|
||||||
* @property {number} id - 武器 ID
|
|
||||||
* @property {string} name - 武器名称
|
|
||||||
* @property {number} star - 武器星级
|
|
||||||
* @property {string} type - 武器类型
|
|
||||||
* @property {BaseInfo} baseInfo - 武器基础信息
|
|
||||||
* @property {Refine[]} refines - 武器精炼信息
|
|
||||||
* @property {AddInfo} addInfo - 武器附加信息
|
|
||||||
* @return FullInfo
|
|
||||||
*/
|
|
||||||
export interface FullInfo {
|
|
||||||
id: number
|
|
||||||
name: string
|
|
||||||
star: number
|
|
||||||
type: string
|
|
||||||
baseInfo: BaseInfo
|
|
||||||
refines: Refine[]
|
|
||||||
addInfo: AddInfo
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 武器基础信息
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface BaseInfo
|
|
||||||
* @property {string} refine - 武器精炼标题
|
|
||||||
* @property {string} description - 武器描述
|
|
||||||
* @property {string} source - 武器获取途径
|
|
||||||
* @todo 属性值是按 1 级然后计算还是直接按 90 级计算?
|
|
||||||
* @property {Record<string, number>} main - 武器主属性
|
|
||||||
* @property {Record<string, number>} sub - 武器副属性
|
|
||||||
* @return BaseInfo
|
|
||||||
*/
|
|
||||||
export interface BaseInfo {
|
|
||||||
refine: string
|
|
||||||
source: string
|
|
||||||
description: string
|
|
||||||
main: Record<string, number>
|
|
||||||
sub: Record<string, number>
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 武器精炼信息
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface Refine
|
|
||||||
* @property {number} level - 精炼等级
|
|
||||||
* @property {string} description - 精炼描述
|
|
||||||
* @return Refine
|
|
||||||
*/
|
|
||||||
export interface Refine {
|
|
||||||
level: number
|
|
||||||
description: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 武器附加信息
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface AddInfo
|
|
||||||
* @property {BTMuli.Genshin.Wiki.levelUp[]} levelUps - 武器升级信息
|
|
||||||
* @property {Story} story - 武器故事
|
|
||||||
* @return AddInfo
|
|
||||||
*/
|
|
||||||
export interface AddInfo {
|
|
||||||
levelUps: BTMuli.Genshin.Wiki.levelUp[]
|
|
||||||
story: Story
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 武器突破信息
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface BreakInfo
|
|
||||||
* @property {number} level - 突破等级
|
|
||||||
* @property {Material[]} materials - 突破材料
|
|
||||||
* @property {Record<string, number>} main - 突破后主属性
|
|
||||||
* @property {Record<string, number>[]} up - 平均提升属性
|
|
||||||
* @return BreakInfo
|
|
||||||
*/
|
|
||||||
export interface BreakInfo {
|
|
||||||
level: number
|
|
||||||
materials: Material[]
|
|
||||||
main: Record<string, number>
|
|
||||||
up: Array<Record<string, number>>
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 武器故事
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface Story
|
|
||||||
* @property {string} title - 武器故事名称
|
|
||||||
* @property {string} content - 武器故事描述
|
|
||||||
* @return Story
|
|
||||||
*/
|
|
||||||
export interface Story {
|
|
||||||
title: string
|
|
||||||
content: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 武器材料
|
|
||||||
* @since Alpha v0.1.3
|
|
||||||
* @interface Material
|
|
||||||
* @todo 材料 id 与名称的对应关系
|
|
||||||
* @property {number} id - 材料 ID
|
|
||||||
* @property {string} name - 材料名称
|
|
||||||
* @property {number} star - 材料星级
|
|
||||||
* @property {string} type - 材料类型
|
|
||||||
* @property {number} count - 材料数量
|
|
||||||
* @property {string} source - 材料获取途径
|
|
||||||
* @return Material
|
|
||||||
*/
|
|
||||||
export interface Material {
|
|
||||||
id: number
|
|
||||||
name: string
|
|
||||||
star: number
|
|
||||||
type: string
|
|
||||||
count: number
|
|
||||||
source: string
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user