mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-13 09:28:14 +08:00
✏️ 适应 api 返回更新数据类型
This commit is contained in:
46
src/plugins/Mys/types/Forum.d.ts
vendored
Normal file
46
src/plugins/Mys/types/Forum.d.ts
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* @file plugins/Mys/types/Forum.d.ts
|
||||
* @description Mys 插件论坛类型定义文件
|
||||
* @since Beta v0.3.7
|
||||
*/
|
||||
|
||||
/**
|
||||
* @description Mys 插件论坛类型
|
||||
* @since Beta v0.3.7
|
||||
* @namespace TGApp.Plugins.Mys.Forum
|
||||
* @memberof TGApp.Plugins.Mys
|
||||
*/
|
||||
declare namespace TGApp.Plugins.Mys.Forum {
|
||||
/**
|
||||
* @description 特定论坛返回数据
|
||||
* @since Beta v0.3.7
|
||||
* @interface Response
|
||||
* @extends TGApp.BBS.Response.BaseWithData
|
||||
* @property {FullData} data 特定论坛数据
|
||||
* @return Response
|
||||
*/
|
||||
interface Response extends TGApp.BBS.Response.BaseWithData {
|
||||
data: FullData;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 特定论坛数据
|
||||
* @since Beta v0.3.7
|
||||
* @interface FullData
|
||||
* @property {number} last_id 最后一条帖子 ID
|
||||
* @property {boolean} is_last 是否最后一页
|
||||
* @property {boolean} is_origin 是否原创
|
||||
* @property {string} page 页码
|
||||
* @property {unknown} databox 数据盒子
|
||||
* @property {TGApp.Plugins.Mys.News.Item[]} list 帖子列表
|
||||
* @return FullData
|
||||
*/
|
||||
interface FullData {
|
||||
last_id: number;
|
||||
is_last: boolean;
|
||||
is_origin: boolean;
|
||||
page: string;
|
||||
databox: unknown;
|
||||
list: TGApp.Plugins.Mys.News.Item[];
|
||||
}
|
||||
}
|
||||
24
src/plugins/Mys/types/News.d.ts
vendored
24
src/plugins/Mys/types/News.d.ts
vendored
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file plugins/Mys/types/news.d.ts
|
||||
* @description Mys 插件咨讯类型定义文件
|
||||
* @since Alpha v0.2.1
|
||||
* @since Beta v0.3.7
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -40,7 +40,7 @@ declare namespace TGApp.Plugins.Mys.News {
|
||||
|
||||
/**
|
||||
* @description 咨讯列表项
|
||||
* @since Alpha v0.2.1
|
||||
* @since Beta v0.3.7
|
||||
* @interface Item
|
||||
* @property {TGApp.Plugins.Mys.Post.Post} post 帖子
|
||||
* @property {TGApp.Plugins.Mys.Post.Forum} forum 版块
|
||||
@@ -58,11 +58,19 @@ declare namespace TGApp.Plugins.Mys.News {
|
||||
* @property {number} last_modify_time 最后修改时间
|
||||
* @property {string} recommend_type 推荐类型
|
||||
* @property {unknown} collection 合集, 可能为 null
|
||||
* @property {unknown[]} vod_list 视频列表
|
||||
* @property {TGApp.Plugins.Mys.Post.Vod[]} vod_list 视频列表
|
||||
* @property {boolean} is_block_on 是否屏蔽
|
||||
* @property {unknown} forum_rank_info 版块排名信息,可能为 null
|
||||
* @property {unknown[]} link_card_list 链接卡片列表,可能为 null
|
||||
* @property {Meta} news_meta 元数据
|
||||
* @property {TGApp.Plugins.Mys.Post.RecommendReason|null} recommend_reason 推荐理由,可能为 null
|
||||
* @property {unknown} villa_card 别墅卡片,可能为 null
|
||||
* @property {boolean} is_mentor 是否为导师
|
||||
* @property {unknown} villa_room_card 别墅房间卡片,可能为 null
|
||||
* @property {unknown} reply_avatar_action_info 回复头像动作信息,可能为 null
|
||||
* @property {TGApp.Plugins.Mys.Post.Challenge} challenge 挑战信息,可能为 null
|
||||
* @property {unknown[]} hot_reply_list 热门回复列表
|
||||
* @property {unknown[]} villa_msg_image_list 别墅消息图片列表
|
||||
* @returns Item
|
||||
*/
|
||||
interface Item {
|
||||
@@ -82,11 +90,19 @@ declare namespace TGApp.Plugins.Mys.News {
|
||||
last_modify_time: number;
|
||||
recommend_type: string;
|
||||
collection: unknown;
|
||||
vod_list: unknown[];
|
||||
vod_list: TGApp.Plugins.Mys.Post.Vod[];
|
||||
is_block_on: boolean;
|
||||
forum_rank_info: unknown;
|
||||
link_card_list: unknown[];
|
||||
news_meta: Meta;
|
||||
recommend_reason: TGApp.Plugins.Mys.Post.RecommendReason | null;
|
||||
villa_card: unknown | null;
|
||||
is_mentor: boolean;
|
||||
villa_room_card: unknown | null;
|
||||
reply_avatar_action_info: unknown | null;
|
||||
challenge: TGApp.Plugins.Mys.Post.Challenge | null;
|
||||
hot_reply_list: unknown[];
|
||||
villa_msg_image_list: unknown[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
95
src/plugins/Mys/types/Post.d.ts
vendored
95
src/plugins/Mys/types/Post.d.ts
vendored
@@ -69,16 +69,24 @@ declare namespace TGApp.Plugins.Mys.Post {
|
||||
last_modify_time: number;
|
||||
recommend_type: string;
|
||||
collection: unknown | null;
|
||||
vod_list: unknown[];
|
||||
vod_list: Vod[];
|
||||
is_block_on: boolean;
|
||||
forum_rank_info: unknown | null;
|
||||
link_card_list: unknown[];
|
||||
news_meta: TGApp.Plugins.Mys.News.Meta | null;
|
||||
recommend_reason: unknown | null;
|
||||
villa_card: unknown | null;
|
||||
is_mentor: boolean;
|
||||
villa_room_card: unknown | null;
|
||||
reply_avatar_action_info: unknown | null;
|
||||
challenge: unknown | null;
|
||||
hot_reply_list: unknown[];
|
||||
villa_msg_image_list: unknown[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 帖子信息
|
||||
* @since Alpha v0.2.1
|
||||
* @since Beta v0.3.7
|
||||
* @interface Post
|
||||
* @property {number} game_id 游戏 ID // 2 为原神
|
||||
* @property {string} post_id 帖子 ID
|
||||
@@ -94,6 +102,7 @@ declare namespace TGApp.Plugins.Mys.Post {
|
||||
* @property {boolean} post_status.is_top 是否置顶
|
||||
* @property {boolean} post_status.is_good 是否加精
|
||||
* @property {boolean} post_status.is_official 是否官方
|
||||
* @property {number} post_status.post_status 帖子状态
|
||||
* @property {number[]} topic_ids 所属话题 ID 列表
|
||||
* @property {number} view_status 浏览状态
|
||||
* @property {number} max_floor 最大楼层
|
||||
@@ -119,6 +128,7 @@ declare namespace TGApp.Plugins.Mys.Post {
|
||||
* @property {boolean} is_showing_missing 是否显示缺失
|
||||
* @property {number} block_latest_reply_time 是否屏蔽最新回复时间
|
||||
* @property {number} selected_comment 是否选择评论
|
||||
* @property {boolean} is_mentor 是否为导师
|
||||
* @return Post
|
||||
*/
|
||||
interface Post {
|
||||
@@ -136,6 +146,7 @@ declare namespace TGApp.Plugins.Mys.Post {
|
||||
is_top: boolean;
|
||||
is_good: boolean;
|
||||
is_official: boolean;
|
||||
post_status: number;
|
||||
};
|
||||
topic_ids: number[];
|
||||
view_status: number;
|
||||
@@ -162,6 +173,7 @@ declare namespace TGApp.Plugins.Mys.Post {
|
||||
is_showing_missing: boolean;
|
||||
block_latest_reply_time: number;
|
||||
selected_comment: number;
|
||||
is_mentor: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -291,4 +303,83 @@ declare namespace TGApp.Plugins.Mys.Post {
|
||||
top_n: unknown[];
|
||||
answer_num: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 视频信息
|
||||
* @since Beta v0.3.7
|
||||
* @interface Vod
|
||||
* @property {string} id 视频 ID
|
||||
* @property {number} duration 视频时长
|
||||
* @property {string} cover 视频封面图 URL
|
||||
* @property {string} resolutions[].url 视频 URL
|
||||
* @property {string} resolutions[].definition 视频清晰度
|
||||
* @property {number} resolutions[].width 视频宽度
|
||||
* @property {number} resolutions[].height 视频高度
|
||||
* @property {number} resolutions[].bitrate 视频码率
|
||||
* @property {string} resolutions[].size 视频大小
|
||||
* @property {string} resolutions[].format 视频格式
|
||||
* @property {string} resolutions[].label 视频标签
|
||||
* @property {number} view_num 观看数
|
||||
* @property {number} transcoding_status 转码状态
|
||||
* @property {number} review_status 审核状态
|
||||
* @property {string} brief_info 视频简介
|
||||
* @return Vod
|
||||
*/
|
||||
interface Vod {
|
||||
id: string;
|
||||
duration: number;
|
||||
cover: string;
|
||||
resolutions: Array<{
|
||||
url: string;
|
||||
definition: string;
|
||||
width: number;
|
||||
height: number;
|
||||
bitrate: number;
|
||||
size: string;
|
||||
format: string;
|
||||
label: string;
|
||||
}>;
|
||||
view_num: number;
|
||||
transcoding_status: number;
|
||||
review_status: number;
|
||||
brief_info: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 推荐理由
|
||||
* @since Beta v0.3.7
|
||||
* @interface RecommendReason
|
||||
* @property {string[]} tags 标签
|
||||
* @property {boolean} is_mentor_rec_block 是否为导师推荐
|
||||
* @return RecommendReason
|
||||
*/
|
||||
interface RecommendReason {
|
||||
tags: string[];
|
||||
is_mentor_rec_block: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 挑战
|
||||
* @since Beta v0.3.7
|
||||
* @interface Challenge
|
||||
* @property {string} id 挑战 ID
|
||||
* @property {string} title 挑战标题
|
||||
* @property {number} participant_amount 参与人数
|
||||
* @property {TGApp.Plugins.Mys.User.Challenge} sponsor 发起人
|
||||
* @property {TGApp.Plugins.Mys.User.Challenge[]} participants 参与人
|
||||
* @property {boolean} is_sandbox 是否为沙盒
|
||||
* @property {string} header_url 头像 URL
|
||||
* @property {string} post_id 帖子 ID
|
||||
* @return Challenge
|
||||
*/
|
||||
interface Challenge {
|
||||
id: string;
|
||||
title: string;
|
||||
participant_amount: number;
|
||||
sponsor: TGApp.Plugins.Mys.User.Challenge;
|
||||
participants: TGApp.Plugins.Mys.User.Challenge[];
|
||||
is_sandbox: boolean;
|
||||
header_url: string;
|
||||
post_id: string;
|
||||
}
|
||||
}
|
||||
|
||||
44
src/plugins/Mys/types/User.d.ts
vendored
44
src/plugins/Mys/types/User.d.ts
vendored
@@ -6,7 +6,7 @@
|
||||
|
||||
/**
|
||||
* @description Mys 插件用户类型
|
||||
* @since Alpha v0.2.2
|
||||
* @since Beta v0.3.7
|
||||
* @namespace TGApp.Plugins.Mys.User
|
||||
* @memberof TGApp.Plugins.Mys
|
||||
*/
|
||||
@@ -226,7 +226,7 @@ declare namespace TGApp.Plugins.Mys.User {
|
||||
|
||||
/**
|
||||
* @description post中的用户信息
|
||||
* @since Alpha v0.2.1
|
||||
* @since Beta v0.3.7
|
||||
* @interface Post
|
||||
* @property {string} uid 用户 ID
|
||||
* @property {string} nickname 用户昵称
|
||||
@@ -238,9 +238,11 @@ declare namespace TGApp.Plugins.Mys.User {
|
||||
* @property {number} level_exp.level 用户等级
|
||||
* @property {number} level_exp.exp 用户经验
|
||||
* @property {boolean} is_following 是否关注
|
||||
* @property {boolean} is_follower 是否被关注
|
||||
* @property {boolean} is_followed 是否被关注
|
||||
* @property {string} avatar_url 用户头像链接
|
||||
* @property {string} pendant 用户挂件 URL,可能为 ""
|
||||
* @property {boolean} is_creator 是否是创作者
|
||||
* @property {AvatarExt} avatar_ext 用户头像扩展信息
|
||||
* @return Post
|
||||
*/
|
||||
interface Post {
|
||||
@@ -255,9 +257,11 @@ declare namespace TGApp.Plugins.Mys.User {
|
||||
exp: number;
|
||||
};
|
||||
is_following: boolean;
|
||||
is_follower: boolean;
|
||||
is_followed: boolean;
|
||||
avatar_url: string;
|
||||
pendant: string;
|
||||
is_creator: boolean;
|
||||
avatar_ext: AvatarExt;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -274,4 +278,36 @@ declare namespace TGApp.Plugins.Mys.User {
|
||||
is_collected: boolean;
|
||||
upvote_type: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 用户头像扩展信息
|
||||
* @since Beta v0.3.7
|
||||
* @interface AvatarExt
|
||||
* @property {number} avatar_type 头像类型
|
||||
* @property {string} avatar_assets_id 头像资源 ID
|
||||
* @property {unknown[]} resources 资源
|
||||
* @property {unknown[]} hd_resources 高清资源
|
||||
* @return AvatarExt
|
||||
*/
|
||||
interface AvatarExt {
|
||||
avatar_type: number;
|
||||
avatar_assets_id: string;
|
||||
resources: unknown[];
|
||||
hd_resources: unknown[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @description post.challenge 用户挑战信息
|
||||
* @since Beta v0.3.7
|
||||
* @interface Challenge
|
||||
* @property {string} uid 用户 ID
|
||||
* @property {string} nickname 用户昵称
|
||||
* @property {string} avatar_url 用户头像链接
|
||||
* @return Challenge
|
||||
*/
|
||||
interface Challenge {
|
||||
uid: string;
|
||||
nickname: string;
|
||||
avatar_url: string;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user