mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-04-03 06:55:06 +08:00
👽️ 替换祈愿数据源为yatta
This commit is contained in:
97
src/types/Plugins/Hakushi.d.ts
vendored
97
src/types/Plugins/Hakushi.d.ts
vendored
@@ -1,97 +0,0 @@
|
||||
/**
|
||||
* Hakushi插件相关类型
|
||||
* @since Beta v0.9.0
|
||||
*/
|
||||
|
||||
declare namespace TGApp.Plugins.Hakushi {
|
||||
/**
|
||||
* 武器JSON返回
|
||||
* @since Beta v0.9.0
|
||||
* @see https://api.hakush.in/gi/data/weapon.json
|
||||
*/
|
||||
type WeaponResp = Record<string, WeaponBrief>;
|
||||
|
||||
/**
|
||||
* 角色JSON返回
|
||||
* @since Beta v0.9.0
|
||||
* @see https://api.hakush.in/gi/data/character.json
|
||||
*/
|
||||
type AvatarResp = Record<string, AvatarBrief>;
|
||||
|
||||
/**
|
||||
* 武器信息
|
||||
* @since Beta v0.9.0
|
||||
*/
|
||||
type WeaponBrief = {
|
||||
/** 图标 */
|
||||
icon: string;
|
||||
/** 稀有度 */
|
||||
rank: number;
|
||||
/**
|
||||
* 类型
|
||||
* @remarks 枚举
|
||||
* @example
|
||||
* - WEAPON_BOW 弓
|
||||
*/
|
||||
type: string;
|
||||
/** 英文译名 */
|
||||
EN: string;
|
||||
/** 描述(英文) */
|
||||
desc: string;
|
||||
/** 韩文译名 */
|
||||
KR: string;
|
||||
/** 中文译名 */
|
||||
CHS: string;
|
||||
/** 日文译名 */
|
||||
JP: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* 角色信息
|
||||
* @since Beta v0.9.0
|
||||
*/
|
||||
type AvatarBrief = {
|
||||
/** 生日 */
|
||||
birth: Array<number>;
|
||||
/** 图标 */
|
||||
icon: string;
|
||||
/** 稀有度 */
|
||||
rank: number;
|
||||
/**
|
||||
* 武器类型
|
||||
* @remarks 枚举
|
||||
* @example
|
||||
* - WEAPON_BOW 弓
|
||||
*/
|
||||
weapon: string;
|
||||
/** 上线时间 */
|
||||
release: string;
|
||||
/** 元素 */
|
||||
element: string;
|
||||
/** 英文译名 */
|
||||
EN: string;
|
||||
/** 描述(英文) */
|
||||
desc: string;
|
||||
/** 韩文译名 */
|
||||
KR: string;
|
||||
/** 中文译名 */
|
||||
CHS: string;
|
||||
/** 日文译名 */
|
||||
JP: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* 转换后的数据
|
||||
* @since Beta v0.9.1
|
||||
*/
|
||||
type ConvertData = {
|
||||
/** ID */
|
||||
id: string;
|
||||
/** 名称 */
|
||||
name: string;
|
||||
/** 类型 */
|
||||
type: "武器" | "角色";
|
||||
/** 星级 */
|
||||
star: number;
|
||||
};
|
||||
}
|
||||
157
src/types/Plugins/Yatta.d.ts
vendored
Normal file
157
src/types/Plugins/Yatta.d.ts
vendored
Normal file
@@ -0,0 +1,157 @@
|
||||
/**
|
||||
* Yatta 插件相关类型
|
||||
* @since Beta v0.9.6
|
||||
*/
|
||||
|
||||
declare namespace TGApp.Plugins.Yatta {
|
||||
/**
|
||||
* 通用 Yatta 接口返回响应
|
||||
* @since Beta v0.9.6
|
||||
*/
|
||||
type Resp<T = unknown> = {
|
||||
/** 回复码 */
|
||||
response: number;
|
||||
/** 数据 */
|
||||
data: T;
|
||||
};
|
||||
|
||||
/**
|
||||
* 角色 JSON 返回
|
||||
* @since Beta v0.9.6
|
||||
* @see https://gi.yatta.moe/api/v2/chs/avatar
|
||||
*/
|
||||
type AvatarResp = Resp<AvatarRes>;
|
||||
|
||||
/**
|
||||
* 武器 JSON 返回
|
||||
* @since Beta v0.9.6
|
||||
* @see https://gi.yatta.moe/api/v2/chs/weapon
|
||||
*/
|
||||
type WeaponResp = Resp<WeaponRes>;
|
||||
|
||||
/**
|
||||
* 角色返回数据
|
||||
* @since Beta v0.9.6
|
||||
*/
|
||||
type AvatarRes = {
|
||||
/**
|
||||
* 属性
|
||||
* @remarks 未使用
|
||||
*/
|
||||
props: unknown;
|
||||
/**
|
||||
* 类型
|
||||
* @remarks 未使用
|
||||
*/
|
||||
types: unknown;
|
||||
/** 角色列表 */
|
||||
items: Record<string, Avatar>;
|
||||
};
|
||||
|
||||
/**
|
||||
* 角色数据
|
||||
* @since Beta v0.9.6
|
||||
*/
|
||||
type Avatar = {
|
||||
/** ID */
|
||||
id: number;
|
||||
/** 星级 */
|
||||
rank: number;
|
||||
/** 名称 */
|
||||
name: string;
|
||||
/**
|
||||
* 元素类型
|
||||
* @example Fire
|
||||
*/
|
||||
element: string;
|
||||
/**
|
||||
* 武器类型
|
||||
* @example WEAPON_CLAYMORE
|
||||
*/
|
||||
weaponType: string;
|
||||
/**
|
||||
* 区域
|
||||
* @example MONDSTAT
|
||||
*/
|
||||
region: string;
|
||||
/**
|
||||
* 特殊属性
|
||||
* @example FIGHT_PROP_CRITICAL
|
||||
*/
|
||||
specialProp: string;
|
||||
/**
|
||||
* 体型
|
||||
* @example MALE
|
||||
*/
|
||||
bodyType: string;
|
||||
/** 图标 */
|
||||
icon: string;
|
||||
/** 生日 */
|
||||
birthday: Array<number> & { length: 2 };
|
||||
/** 发行时间戳(秒) */
|
||||
release: number;
|
||||
/** 路由 */
|
||||
route: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* 武器返回数据
|
||||
* @since Beta v0.9.6
|
||||
*/
|
||||
type WeaponRes = {
|
||||
/**
|
||||
* 属性
|
||||
* @remarks 未使用
|
||||
*/
|
||||
props: unknown;
|
||||
/**
|
||||
* 类型
|
||||
* @remarks 未使用
|
||||
*/
|
||||
types: unknown;
|
||||
/** 武器列表 */
|
||||
items: Record<string, Weapon>;
|
||||
};
|
||||
|
||||
/**
|
||||
* 武器数据
|
||||
* @since Beta v0.9.6
|
||||
*/
|
||||
type Weapon = {
|
||||
/** ID */
|
||||
id: number;
|
||||
/** 星级 */
|
||||
rank: number;
|
||||
/**
|
||||
* 武器类型
|
||||
* @example WEAPON_SWORD_ONE_HAND
|
||||
*/
|
||||
type: string;
|
||||
/** 名称 */
|
||||
name: string;
|
||||
/**
|
||||
* 特殊属性
|
||||
* @example FIGHT_PROP_ELEMENT_MASTERY
|
||||
*/
|
||||
specialProp: string;
|
||||
/** 图标 */
|
||||
icon: string;
|
||||
/** 路由 */
|
||||
route: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* 转换后的数据
|
||||
* @since Beta v0.9.6
|
||||
*/
|
||||
type ConvertData = {
|
||||
/** ID */
|
||||
id: string;
|
||||
/** 名称 */
|
||||
name: string;
|
||||
/** 类型 */
|
||||
type: "武器" | "角色";
|
||||
/** 星级 */
|
||||
star: number;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user