mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-04-03 06:55:06 +08:00
193
src/types/Game/Challenge.d.ts
vendored
193
src/types/Game/Challenge.d.ts
vendored
@@ -38,4 +38,197 @@ declare namespace TGApp.Game.Challenge {
|
||||
image: string;
|
||||
rarity: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* @description 挑战数据返回响应(详细)
|
||||
* @since Beta v0.8.0
|
||||
* @interface ChallengeResp
|
||||
* @extends TGApp.BBS.Response.BaseWithData<ChallengeRes>
|
||||
*/
|
||||
type ChallengeResp = TGApp.BBS.Response.BaseWithData<ChallengeRes>;
|
||||
|
||||
/**
|
||||
* @description 挑战数据返回(详细)
|
||||
* @since Beta v0.8.0
|
||||
* @interface ChallengeRes
|
||||
* @property {Array<ChallengeItem>} data - 挑战数据列表
|
||||
* @property {boolean} is_unlock - 是否解锁挑战
|
||||
* @property {ChallengeLink} link - 挑战链接信息
|
||||
*/
|
||||
type ChallengeRes = { data: Array<ChallengeItem>; is_unlock: boolean; link: ChallengeLink };
|
||||
|
||||
/**
|
||||
* @description 挑战链接信息
|
||||
* @since Beta v0.8.0
|
||||
* @interface ChallengeLink
|
||||
* @property {string} lineup_link - 队伍配置链接
|
||||
* @property {string} play_link - 挑战链接
|
||||
*/
|
||||
type ChallengeLink = { lineup_link: string; play_link: string };
|
||||
|
||||
/**
|
||||
* @description 挑战数据项
|
||||
* @since Beta v0.8.0
|
||||
* @interface ChallengeItem
|
||||
* @property {ChallengeSchedule} schedule - 挑战周期信息
|
||||
* @property {ChallengeSingle} single - 单次挑战数据
|
||||
* @property {ChallengeMp} mp - 多人挑战数据
|
||||
* @property {Array<unknown>} blings - 挑战相关的其他数据(如成就等)
|
||||
*/
|
||||
type ChallengeItem = {
|
||||
schedule: ChallengeSchedule;
|
||||
single: ChallengeSingle;
|
||||
mp: ChallengeMp;
|
||||
blings: Array<unknown>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @description 多人挑战数据
|
||||
* @since Beta v0.8.0
|
||||
* @interface ChallengeMp
|
||||
* @todo 待测试
|
||||
*/
|
||||
type ChallengeMp = ChallengeSingle;
|
||||
|
||||
/**
|
||||
* @description 时间对象
|
||||
* @since Beta v0.8.0
|
||||
* @interface DateTime
|
||||
* @property {number} year - 年份
|
||||
* @property {number} month - 月份(1-12)
|
||||
* @property {number} day - 日(1-31)
|
||||
* @property {number} hour - 小时(0-23)
|
||||
* @property {number} minute - 分钟(0-59)
|
||||
* @property {number} second - 秒(0-59)
|
||||
*/
|
||||
type DateTime = {
|
||||
year: number;
|
||||
month: number;
|
||||
day: number;
|
||||
hour: number;
|
||||
minute: number;
|
||||
second: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* @description 挑战周期信息
|
||||
* @since Beta v0.8.0
|
||||
* @interface ChallengeSchedule
|
||||
* @property {string} schedule_id - 挑战周期 ID
|
||||
* @property {string} start_time - 挑战开始时间(秒级时间戳)
|
||||
* @property {string} end_time - 挑战结束时间(秒级时间戳)
|
||||
* @property {DateTime} start_date_time - 挑战开始时间(DateTime 对象)
|
||||
* @property {DateTime} end_date_time - 挑战结束时间(DateTime 对象)
|
||||
* @property {boolean} is_valid - 是否有效
|
||||
* @property {string} name - 挑战名称
|
||||
*/
|
||||
type ChallengeSchedule = {
|
||||
schedule_id: string;
|
||||
start_time: string;
|
||||
end_time: string;
|
||||
start_date_time: DateTime;
|
||||
end_date_time: DateTime;
|
||||
is_valid: boolean;
|
||||
name: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* @description 单次挑战数据
|
||||
* @since Beta v0.8.0
|
||||
* @interface ChallengeSingle
|
||||
* @property {SingleBest} best - 最佳挑战数据
|
||||
* @property {Array<SingleChallenge>} challenge - 挑战列表
|
||||
* @property {boolean} has_data - 是否有数据
|
||||
*/
|
||||
type ChallengeSingle = { best: SingleBest; challenge: Array<SingleChallenge>; has_data: boolean };
|
||||
|
||||
/**
|
||||
* @description 单次挑战最佳数据
|
||||
* @since Beta v0.8.0
|
||||
* @interface SingleBest
|
||||
* @property {number} difficulty - 挑战难度
|
||||
* @property {number} second - 挑战用时(秒)
|
||||
* @property {string} icon - 挑战图标名称
|
||||
*/
|
||||
type SingleBest = { difficulty: number; second: number; icon: string };
|
||||
|
||||
/**
|
||||
* @description 单次挑战数据项
|
||||
* @since Beta v0.8.0
|
||||
* @interface SingleChallenge
|
||||
* @property {string} name - 怪物名称
|
||||
* @property {number} seconds - 挑战用时(秒)
|
||||
* @property {Array<SingleTeam>} teams - 挑战队伍列表
|
||||
* @property {Array<SingleAvatar>} best_avatar - 最佳角色列表
|
||||
* @property {SingleMonster} monster - 挑战怪物数据
|
||||
*/
|
||||
type SingleChallenge = {
|
||||
name: string;
|
||||
seconds: number;
|
||||
teams: Array<SingleTeam>;
|
||||
best_avatar: Array<SingleAvatar>;
|
||||
monster: SingleMonster;
|
||||
};
|
||||
|
||||
/**
|
||||
* @description 单次挑战队伍数据
|
||||
* @since Beta v0.8.0
|
||||
* @interface SingleTeam
|
||||
* @property {number} avatar_id - 角色 ID
|
||||
* @property {string} name - 角色名称
|
||||
* @property {string} element - 角色元素
|
||||
* @property {string} image - 角色头像图片 URL
|
||||
* @property {number} level - 角色等级
|
||||
* @property {number} rarity - 角色稀有度
|
||||
* @property {number} rank - 角色命座
|
||||
*/
|
||||
type SingleTeam = {
|
||||
avatar_id: number;
|
||||
name: string;
|
||||
element: string;
|
||||
image: string;
|
||||
level: number;
|
||||
rarity: number;
|
||||
rank: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* @description 单次挑战最佳角色数据
|
||||
* @since Beta v0.8.0
|
||||
* @interface SingleAvatar
|
||||
* @property {number} avatar_id - 角色 ID
|
||||
* @property {string} side_icon - 角色侧边图标 URL
|
||||
* @property {string} dps - 角色 DPS 数据
|
||||
* @property {string} type - 1-最强一击,2-最高总伤害
|
||||
*/
|
||||
type SingleAvatar = { avatar_id: number; side_icon: string; dps: string; type: string };
|
||||
|
||||
/**
|
||||
* @description 单次挑战怪物数据
|
||||
* @since Beta v0.8.0
|
||||
* @interface SingleMonster
|
||||
* @property {string} name - 怪物名称
|
||||
* @property {number} level - 怪物等级
|
||||
* @property {string} icon - 怪物图标 URL
|
||||
* @property {Array<string>} desc - 怪物描述列表
|
||||
* @property {Array<MonsterTag>} tags - 怪物标签列表
|
||||
* @property {string} monster_id - 怪物 ID
|
||||
*/
|
||||
type SingleMonster = {
|
||||
name: string;
|
||||
level: number;
|
||||
icon: string;
|
||||
desc: Array<string>;
|
||||
tags: Array<MonsterTag>;
|
||||
monster_id: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* @description 怪物标签
|
||||
* @since Beta v0.8.0
|
||||
* @interface MonsterTag
|
||||
* @property {string} type - 标签类型
|
||||
* @property {string} desc - 标签描述
|
||||
*/
|
||||
type MonsterTag = { type: string; desc: string };
|
||||
}
|
||||
|
||||
55
src/types/Sqlite/Challenge.d.ts
vendored
Normal file
55
src/types/Sqlite/Challenge.d.ts
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
* @file types/Sqlite/Challenge.d.ts
|
||||
* @description 幽境危战类型定义文件
|
||||
* @since Beta v0.8.0
|
||||
*/
|
||||
|
||||
declare namespace TGApp.Sqlite.Challenge {
|
||||
/**
|
||||
* @description 数据库-幽境危战表(原始数据)
|
||||
* @since Beta v0.8.0
|
||||
* @interface RawTable
|
||||
* @property {string} uid - 用户 UID
|
||||
* @property {number} id - 挑战 ID
|
||||
* @property {string} startTime - 开始时间
|
||||
* @property {string} endTime - 结束时间
|
||||
* @property {string} name - 挑战名称
|
||||
* @property {string} single - 挑战单个数据(JSON 字符串)
|
||||
* @property {string} mp - 挑战多人数据(JSON 字符串)
|
||||
* @property {string} updated - 更新时间
|
||||
*/
|
||||
type RawTable = {
|
||||
uid: string;
|
||||
id: number;
|
||||
startTime: string;
|
||||
endTime: string;
|
||||
name: string;
|
||||
single: string; // JSON 字符串
|
||||
mp: string; // JSON 字符串
|
||||
updated: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* @description 数据库-幽境危战表
|
||||
* @since Beta v0.8.0
|
||||
* @interface SingleTable
|
||||
* @property {string} uid - 用户 UID
|
||||
* @property {number} id - 挑战 ID
|
||||
* @property {string} startTime - 开始时间
|
||||
* @property {string} endTime - 结束时间
|
||||
* @property {string} name - 挑战名称
|
||||
* @property {TGApp.Game.Challenge.ChallengeSingle} single - 挑战单个数据
|
||||
* @property {TGApp.Game.Challenge.ChallengeMp} mp - 挑战多人数据
|
||||
* @property {string} updated - 更新时间
|
||||
*/
|
||||
type SingleTable = {
|
||||
uid: string;
|
||||
id: number;
|
||||
startTime: string;
|
||||
endTime: string;
|
||||
name: string;
|
||||
single: TGApp.Game.Challenge.ChallengeSingle;
|
||||
mp: TGApp.Game.Challenge.ChallengeMp;
|
||||
updated: string;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user