♻️ Yae数据传递移至App层,重构命令处理逻辑

This commit is contained in:
BTMuli
2025-12-09 16:33:35 +08:00
parent bd914a0f44
commit cc2020c64e
6 changed files with 201 additions and 137 deletions

View File

@@ -4,6 +4,19 @@
*/
declare namespace TGApp.Plugins.Yae {
/**
* 后端返的事件数据
* @since Beta v0.9.0
*/
type RsEvent = {
/** 数据序列化后的JSON */
data: string;
/** 类型,成就或背包 */
type: "achievement" | "store";
/** 存档UID需要预先输入 */
uid: string;
};
/**
* 后端返的成就列表数据
* @since Beta v0.7.8
@@ -22,8 +35,8 @@ declare namespace TGApp.Plugins.Yae {
*/
type BagItemUnion =
| BagItemMaterial
| BagItem<"weapon">
| BagItem<"reliquary">
| BagItemWeapon
| BagItemRelic
| BagItem<"furniture">
| BagItem<"virtual">
| BagItem<"unknown">;
@@ -34,6 +47,18 @@ declare namespace TGApp.Plugins.Yae {
*/
type BagItemMaterial = BagItem<"material">;
/**
* 背包物品-武器
* @since Beta v0.9.0
*/
type BagItemWeapon = BagItem<"weapon">;
/**
* 背包物品-圣遗物
* @since Beta v0.9.0
*/
type BagItemRelic = BagItem<"reliquary">;
/**
* 背包物品信息
* @since Beta v0.9.0