mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-12 09:18:14 +08:00
✏️ 完善基本 Response 类型 #51
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
/**
|
||||
* @file plugins Mys utils doGameLogin
|
||||
* @file plugins/Mys/utils/doGameLogin
|
||||
* @todo 完善
|
||||
* @description 获取 gameToken,曲线获取 stoken
|
||||
* @author BTMuli <bt-muli@outlook.com>
|
||||
* @since Beta v0.3.0
|
||||
*/
|
||||
|
||||
// tauri
|
||||
import { http } from "@tauri-apps/api";
|
||||
|
||||
const device = crypto.randomUUID();
|
||||
@@ -13,10 +12,10 @@ const device = crypto.randomUUID();
|
||||
/**
|
||||
* @description 获取登录二维码
|
||||
* @since Beta v0.3.0
|
||||
* @returns {Promise<TGApp.Plugins.Mys.GameLogin.GetLoginQrData|TGApp.Plugins.Mys.Base.Response>}
|
||||
* @returns {Promise<TGApp.Plugins.Mys.GameLogin.GetLoginQrData|TGApp.BBS.Response.Base>}
|
||||
*/
|
||||
export async function getLoginQr(): Promise<
|
||||
TGApp.Plugins.Mys.GameLogin.GetLoginQrData | TGApp.Plugins.Mys.Base.Response
|
||||
TGApp.Plugins.Mys.GameLogin.GetLoginQrData | TGApp.BBS.Response.Base
|
||||
> {
|
||||
const url = "https://hk4e-sdk.mihoyo.com/hk4e_cn/combo/panda/qrcode/fetch";
|
||||
const data = {
|
||||
@@ -24,7 +23,7 @@ export async function getLoginQr(): Promise<
|
||||
device,
|
||||
};
|
||||
return await http
|
||||
.fetch<TGApp.Plugins.Mys.GameLogin.GetLoginQrResponse>(url, {
|
||||
.fetch<TGApp.Plugins.Mys.GameLogin.GetLoginQrResponse | TGApp.BBS.Response.Base>(url, {
|
||||
method: "POST",
|
||||
body: http.Body.json(data),
|
||||
})
|
||||
@@ -38,16 +37,16 @@ export async function getLoginQr(): Promise<
|
||||
* @description 获取登录状态
|
||||
* @since Beta v0.3.0
|
||||
* @param {string} ticket 二维码 ticket
|
||||
* @returns {Promise<TGApp.Plugins.Mys.GameLogin.GetLoginStatusData | TGApp.Plugins.Mys.Base.Response>}
|
||||
* @returns {Promise<TGApp.Plugins.Mys.GameLogin.GetLoginStatusData | TGApp.BBS.Response.Base>}
|
||||
*/
|
||||
export async function getLoginStatus(
|
||||
ticket: string,
|
||||
): Promise<TGApp.Plugins.Mys.GameLogin.GetLoginStatusData | TGApp.Plugins.Mys.Base.Response> {
|
||||
): Promise<TGApp.Plugins.Mys.GameLogin.GetLoginStatusData | TGApp.BBS.Response.Base> {
|
||||
const url = "https://hk4e-sdk.mihoyo.com/hk4e_cn/combo/panda/qrcode/query";
|
||||
const data = { app_id: "4", device, ticket };
|
||||
console.log(data);
|
||||
return await http
|
||||
.fetch<TGApp.Plugins.Mys.GameLogin.GetLoginStatusResponse>(url, {
|
||||
.fetch<TGApp.Plugins.Mys.GameLogin.GetLoginStatusResponse | TGApp.BBS.Response.Base>(url, {
|
||||
method: "POST",
|
||||
body: http.Body.json(data),
|
||||
})
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
/**
|
||||
* @file plugins Mys request getEmojis.ts
|
||||
* @file plugins/Mys/request/getEmojis.ts
|
||||
* @description Mys 表情包请求函数集合
|
||||
* @author BTMuli <bt-muli@outlook.com>
|
||||
* @since Beta v0.3.0
|
||||
*/
|
||||
|
||||
// tauri
|
||||
import { http } from "@tauri-apps/api";
|
||||
|
||||
/**
|
||||
@@ -15,7 +13,9 @@ import { http } from "@tauri-apps/api";
|
||||
*/
|
||||
export async function getEmojis(): Promise<Record<string, string> | TGApp.BBS.Response.Base> {
|
||||
const url = "https://bbs-api-static.miyoushe.com/misc/api/emoticon_set";
|
||||
return await http.fetch<TGApp.Plugins.Mys.Emoji.Response>(url).then((res) => {
|
||||
return await http
|
||||
.fetch<TGApp.Plugins.Mys.Emoji.Response | TGApp.BBS.Response.Base>(url)
|
||||
.then((res) => {
|
||||
if (res.data.retcode === 0) {
|
||||
const emojis: Record<string, string> = {};
|
||||
res.data.data.list.forEach((series) => {
|
||||
|
||||
29
src/plugins/Mys/types/Base.d.ts
vendored
29
src/plugins/Mys/types/Base.d.ts
vendored
@@ -1,29 +0,0 @@
|
||||
/**
|
||||
* @file plugins Mys types Base.d.ts
|
||||
* @description Mys 插件基础类型定义文件
|
||||
* @author BTMuli <bt-muli@outlook.com>
|
||||
* @since Alpha v0.2.1
|
||||
*/
|
||||
|
||||
/**
|
||||
* @description Mys 插件基础类型
|
||||
* @since Alpha v0.2.1
|
||||
* @namespace Base
|
||||
* @return Base
|
||||
*/
|
||||
declare namespace TGApp.Plugins.Mys.Base {
|
||||
/**
|
||||
* @description Mys Response 统一接口
|
||||
* @since Alpha v0.2.1
|
||||
* @interface Response
|
||||
* @property {number} retcode 状态码
|
||||
* @property {string} message 状态信息
|
||||
* @property {any} data 数据
|
||||
* @return Response
|
||||
*/
|
||||
export interface Response {
|
||||
retcode: number;
|
||||
message: string;
|
||||
data: any;
|
||||
}
|
||||
}
|
||||
16
src/plugins/Mys/types/Emoji.d.ts
vendored
16
src/plugins/Mys/types/Emoji.d.ts
vendored
@@ -1,27 +1,27 @@
|
||||
/**
|
||||
* @file plugins Mys types Emoji.d.ts
|
||||
* @file plugins/Mys/types/Emoji.d.ts
|
||||
* @description Mys 表情包类型声明文件
|
||||
* @author BTMuli <bt-muli@outlook.com>
|
||||
* @since Beta v0.3.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* @description Mys 表情包类型
|
||||
* @since Beta v0.3.0
|
||||
* @namespace Emoji
|
||||
* return Emoji
|
||||
* @namespace TGApp.Plugins.Mys.Emoji
|
||||
* @memberof TGApp.Plugins.Mys
|
||||
*/
|
||||
declare namespace TGApp.Plugins.Mys.Emoji {
|
||||
/**
|
||||
* @description 获取表情包列表返回
|
||||
* @since Beta v0.3.0
|
||||
* @interface Response
|
||||
* @extends TGApp.Plugins.Mys.Base.Response
|
||||
* @extends TGApp.BBS.Response.Base
|
||||
* @property {Series[]} data.list 表情包列表
|
||||
* @property {unknown} data.recently_emoticon 最近使用的表情包
|
||||
* @return Response
|
||||
*/
|
||||
export interface Response extends TGApp.Plugins.Mys.Base.Response {
|
||||
interface Response extends TGApp.BBS.Response.Base {
|
||||
retcode: 0;
|
||||
data: {
|
||||
list: Series[];
|
||||
recently_emoticon: unknown;
|
||||
@@ -43,7 +43,7 @@ declare namespace TGApp.Plugins.Mys.Emoji {
|
||||
* @property {boolean} is_available 表情包系列是否可用
|
||||
* @return Series
|
||||
*/
|
||||
export interface Series {
|
||||
interface Series {
|
||||
id: number;
|
||||
name: string;
|
||||
icon: string;
|
||||
@@ -70,7 +70,7 @@ declare namespace TGApp.Plugins.Mys.Emoji {
|
||||
* @property {unknown[]} keywords 表情包关键词
|
||||
* @return EmojiItem
|
||||
*/
|
||||
export interface EmojiItem {
|
||||
interface EmojiItem {
|
||||
id: number;
|
||||
name: string;
|
||||
icon: string;
|
||||
|
||||
11
src/plugins/Mys/types/Gacha.d.ts
vendored
11
src/plugins/Mys/types/Gacha.d.ts
vendored
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @file plugins Mys types Gacha.d.ts
|
||||
* @file plugins/Mys/types/Gacha.d.ts
|
||||
* @description Mys 插件卡池类型定义文件
|
||||
* @since Beta v0.3.3
|
||||
*/
|
||||
@@ -7,19 +7,20 @@
|
||||
/**
|
||||
* @description Mys 卡池类型定义
|
||||
* @since Beta v0.3.3
|
||||
* @namespace Gacha
|
||||
* @return Gacha
|
||||
* @namespace TGApp.Plugins.Mys.Gacha
|
||||
* @memberof TGApp.Plugins.Mys
|
||||
*/
|
||||
declare namespace TGApp.Plugins.Mys.Gacha {
|
||||
/**
|
||||
* @description 获取卡池信息返回
|
||||
* @since Alpha v0.2.1
|
||||
* @interface Response
|
||||
* @extends TGApp.Plugins.Mys.Base.Response
|
||||
* @extends TGApp.BBS.Response.Base
|
||||
* @property {Data[]} data.list 卡池数据
|
||||
* @return Response
|
||||
*/
|
||||
interface Response extends TGApp.Plugins.Mys.Base.Response {
|
||||
interface Response extends TGApp.BBS.Response.Base {
|
||||
retcode: 0;
|
||||
data: {
|
||||
list: Data[];
|
||||
};
|
||||
|
||||
25
src/plugins/Mys/types/GameLogin.d.ts
vendored
25
src/plugins/Mys/types/GameLogin.d.ts
vendored
@@ -1,26 +1,26 @@
|
||||
/**
|
||||
* @file plugins Mys types GameLogin.d.ts
|
||||
* @file plugins/Mys/types/GameLogin.d.ts
|
||||
* @description Mys 插件 Game 登录类型定义文件
|
||||
* @author BTMuli <bt-muli@outlook.com>
|
||||
* @since Beta v0.3.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* @description Mys 插件 Game 登录类型
|
||||
* @since Beta v0.3.0
|
||||
* @namespace GameLogin
|
||||
* @return GameLogin
|
||||
* @namespace TGApp.Plugins.Mys.GameLogin
|
||||
* @memberof TGApp.Plugins.Mys
|
||||
*/
|
||||
declare namespace TGApp.Plugins.Mys.GameLogin {
|
||||
/**
|
||||
* @description 获取登录二维码返回数据
|
||||
* @since Beta v0.3.0
|
||||
* @interface GetLoginQrResponse
|
||||
* @extends TGApp.Plugins.Mys.Base.Response
|
||||
* @extends TGApp.BBS.Response.Base
|
||||
* @property {GetLoginQrData} data 数据
|
||||
* @return GetLoginQrResponse
|
||||
*/
|
||||
export interface GetLoginQrResponse extends TGApp.Plugins.Mys.Base.Response {
|
||||
interface GetLoginQrResponse extends TGApp.BBS.Response.Base {
|
||||
retcode: 0;
|
||||
data: GetLoginQrData;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ declare namespace TGApp.Plugins.Mys.GameLogin {
|
||||
* @property {string} url 二维码链接
|
||||
* @return GetLoginQrData
|
||||
*/
|
||||
export interface GetLoginQrData {
|
||||
interface GetLoginQrData {
|
||||
url: string;
|
||||
}
|
||||
|
||||
@@ -39,11 +39,12 @@ declare namespace TGApp.Plugins.Mys.GameLogin {
|
||||
* @description 获取登录状态返回数据
|
||||
* @since Beta v0.3.0
|
||||
* @interface GetLoginStatusResponse
|
||||
* @extends TGApp.Plugins.Mys.Base.Response
|
||||
* @extends TGApp.BBS.Response.Base
|
||||
* @property {GetLoginStatusData} data 数据
|
||||
* @return GetLoginStatusResponse
|
||||
*/
|
||||
export interface GetLoginStatusResponse extends TGApp.Plugins.Mys.Base.Response {
|
||||
interface GetLoginStatusResponse extends TGApp.BBS.Response.Base {
|
||||
retcode: 0;
|
||||
data: GetLoginStatusData;
|
||||
}
|
||||
|
||||
@@ -55,7 +56,7 @@ declare namespace TGApp.Plugins.Mys.GameLogin {
|
||||
* @property {StatusPayload} payload 状态数据
|
||||
* @return GetLoginStatusData
|
||||
*/
|
||||
export interface GetLoginStatusData {
|
||||
interface GetLoginStatusData {
|
||||
stat: string;
|
||||
payload: StatusPayload;
|
||||
}
|
||||
@@ -69,7 +70,7 @@ declare namespace TGApp.Plugins.Mys.GameLogin {
|
||||
* @property {string} raw 序列化数据,反序列化后是 {uid: string, token: string}
|
||||
* @return StatusPayload
|
||||
*/
|
||||
export interface StatusPayload {
|
||||
interface StatusPayload {
|
||||
ext: string;
|
||||
proto: string;
|
||||
raw: string;
|
||||
@@ -83,7 +84,7 @@ declare namespace TGApp.Plugins.Mys.GameLogin {
|
||||
* @property {string} token 用户 token
|
||||
* @return StatusPayloadRaw
|
||||
*/
|
||||
export interface StatusPayloadRaw {
|
||||
interface StatusPayloadRaw {
|
||||
uid: string;
|
||||
token: string;
|
||||
}
|
||||
|
||||
20
src/plugins/Mys/types/Lottery.d.ts
vendored
20
src/plugins/Mys/types/Lottery.d.ts
vendored
@@ -1,26 +1,26 @@
|
||||
/**
|
||||
* @file plugins Mys types Lottery.d.ts
|
||||
* @file plugins/Mys/types/Lottery.d.ts
|
||||
* @description Mys 插件抽奖类型定义文件
|
||||
* @author BTMuli <bt-muli@outlook.com>
|
||||
* @since Alpha v0.2.1
|
||||
*/
|
||||
|
||||
/**
|
||||
* @description Mys 插件抽奖类型
|
||||
* @since Alpha v0.2.1
|
||||
* @namespace Lottery
|
||||
* @return Lottery
|
||||
* @namespace TGApp.Plugins.Mys.Lottery
|
||||
* @memberof TGApp.Plugins.Mys
|
||||
*/
|
||||
declare namespace TGApp.Plugins.Mys.Lottery {
|
||||
/**
|
||||
* @description 抽奖返回数据
|
||||
* @since Alpha v0.2.1
|
||||
* @interface Response
|
||||
* @extends TGApp.Plugins.Mys.Base.Response;
|
||||
* @extends TGApp.BBS.Response.Base
|
||||
* @property {FullData} data.show_lottery 抽奖数据
|
||||
* @return Response
|
||||
*/
|
||||
export interface Response extends TGApp.Plugins.Mys.Base.Response {
|
||||
interface Response extends TGApp.BBS.Response.Base {
|
||||
retcode: 0;
|
||||
data: {
|
||||
show_lottery: FullData;
|
||||
};
|
||||
@@ -47,7 +47,7 @@ declare namespace TGApp.Plugins.Mys.Lottery {
|
||||
* @property {string} now_time 当前时间
|
||||
* @return FullData
|
||||
*/
|
||||
export interface FullData {
|
||||
interface FullData {
|
||||
id: string;
|
||||
creator: TGApp.Plugins.Mys.User.Post;
|
||||
draw_time: string;
|
||||
@@ -77,7 +77,7 @@ declare namespace TGApp.Plugins.Mys.Lottery {
|
||||
* @property {string} id 奖励 ID
|
||||
* @return Reward
|
||||
*/
|
||||
export interface Reward {
|
||||
interface Reward {
|
||||
reward_name: string;
|
||||
winner_number: number;
|
||||
scheduled_winner_number: number;
|
||||
@@ -98,7 +98,7 @@ declare namespace TGApp.Plugins.Mys.Lottery {
|
||||
* @property {RenderReward[]} rewards 奖励列表
|
||||
* @return RenderCard
|
||||
*/
|
||||
export interface RenderCard {
|
||||
interface RenderCard {
|
||||
id: string;
|
||||
upWay: string;
|
||||
status: string;
|
||||
@@ -117,7 +117,7 @@ declare namespace TGApp.Plugins.Mys.Lottery {
|
||||
* @property {TGApp.Plugins.Mys.User.Post[]} users 用户列表
|
||||
* @return RenderReward
|
||||
*/
|
||||
export interface RenderReward {
|
||||
interface RenderReward {
|
||||
name: string;
|
||||
win: number;
|
||||
goal: number;
|
||||
|
||||
22
src/plugins/Mys/types/News.d.ts
vendored
22
src/plugins/Mys/types/News.d.ts
vendored
@@ -1,26 +1,26 @@
|
||||
/**
|
||||
* @file plugins Mys types news.d.ts
|
||||
* @file plugins/Mys/types/news.d.ts
|
||||
* @description Mys 插件咨讯类型定义文件
|
||||
* @author BTMuli <bt-muli@outlook.com>
|
||||
* @since Alpha v0.2.1
|
||||
*/
|
||||
|
||||
/**
|
||||
* @description Mys 插件咨讯类型
|
||||
* @since Alpha v0.2.1
|
||||
* @namespace News
|
||||
* @return News
|
||||
* @namespace TGApp.Plugins.Mys.News
|
||||
* @memberof TGApp.Plugins.Mys
|
||||
*/
|
||||
declare namespace TGApp.Plugins.Mys.News {
|
||||
/**
|
||||
* @description 咨讯返回数据
|
||||
* @since Alpha v0.2.1
|
||||
* @interface Response
|
||||
* @extends TGApp.Plugins.Mys.Base.Response
|
||||
* @extends TGApp.BBS.Response.Base
|
||||
* @property {FullData} data 咨讯数据
|
||||
* @return Response
|
||||
*/
|
||||
export interface Response extends TGApp.Plugins.Mys.Base.Response {
|
||||
interface Response extends TGApp.BBS.Response.Base {
|
||||
retcode: 0;
|
||||
data: FullData;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ declare namespace TGApp.Plugins.Mys.News {
|
||||
* @property {Item[]} list 咨讯列表
|
||||
* @return FullData
|
||||
*/
|
||||
export interface FullData {
|
||||
interface FullData {
|
||||
last_id: number;
|
||||
is_last: boolean;
|
||||
list: Item[];
|
||||
@@ -66,7 +66,7 @@ declare namespace TGApp.Plugins.Mys.News {
|
||||
* @property {Meta} news_meta 元数据
|
||||
* @returns Item
|
||||
*/
|
||||
export interface Item {
|
||||
interface Item {
|
||||
post: TGApp.Plugins.Mys.Post.Post;
|
||||
forum: TGApp.Plugins.Mys.Post.Forum;
|
||||
topics: TGApp.Plugins.Mys.Post.Topic[];
|
||||
@@ -99,7 +99,7 @@ declare namespace TGApp.Plugins.Mys.News {
|
||||
* @property {string} end_at_sec 活动结束时间戳,单位秒
|
||||
* @return Meta
|
||||
*/
|
||||
export interface Meta {
|
||||
interface Meta {
|
||||
activity_status: number;
|
||||
start_at_sec: string;
|
||||
end_at_sec: string;
|
||||
@@ -130,7 +130,7 @@ declare namespace TGApp.Plugins.Mys.News {
|
||||
* @property {number} data.view 帖子浏览数
|
||||
* @return RenderCard
|
||||
*/
|
||||
export interface RenderCard {
|
||||
interface RenderCard {
|
||||
title: string;
|
||||
cover: string;
|
||||
postId: number;
|
||||
@@ -162,7 +162,7 @@ declare namespace TGApp.Plugins.Mys.News {
|
||||
* @property {string} colorCss 活动状态按钮背景色
|
||||
* @returns RenderStatus
|
||||
*/
|
||||
export interface RenderStatus {
|
||||
interface RenderStatus {
|
||||
status: string;
|
||||
colorCss: string;
|
||||
}
|
||||
|
||||
14
src/plugins/Mys/types/Obc.d.ts
vendored
14
src/plugins/Mys/types/Obc.d.ts
vendored
@@ -1,26 +1,26 @@
|
||||
/**
|
||||
* @file plugins Mys types Obc.d.ts
|
||||
* @file plugins/Mys/types/Obc.d.ts
|
||||
* @description Mys obc 类型定义文件
|
||||
* @author BTMuli <bt-muli@outlook.com>
|
||||
* @since Alpha v0.2.1
|
||||
*/
|
||||
|
||||
/**
|
||||
* @description Mys obc 类型
|
||||
* @since Alpha v0.2.1
|
||||
* @namespace Obc
|
||||
* @return Obc
|
||||
* @namespace TGApp.Plugins.Mys.Obc
|
||||
* @memberof TGApp.Plugins.Mys
|
||||
*/
|
||||
declare namespace TGApp.Plugins.Mys.Obc {
|
||||
/**
|
||||
* @description Mys obc 返回数据
|
||||
* @since Alpha v0.2.1
|
||||
* @interface Response
|
||||
* @extends TGApp.Plugins.Mys.Base.Response
|
||||
* @extends TGApp.BBS.Response.Base
|
||||
* @property {Obc[]} data.list obc 列表
|
||||
* @return Response
|
||||
*/
|
||||
export interface Response extends TGApp.Plugins.Mys.Base.Response {
|
||||
interface Response extends TGApp.BBS.Response.Base {
|
||||
retcode: 0;
|
||||
data: {
|
||||
list: Obc[];
|
||||
};
|
||||
@@ -39,7 +39,7 @@ declare namespace TGApp.Plugins.Mys.Obc {
|
||||
* @property {unknown[]} list 列表
|
||||
* @return Data
|
||||
*/
|
||||
export interface Data {
|
||||
interface Data {
|
||||
id: number;
|
||||
name: string;
|
||||
parent_id: number;
|
||||
|
||||
18
src/plugins/Mys/types/Position.d.ts
vendored
18
src/plugins/Mys/types/Position.d.ts
vendored
@@ -1,26 +1,26 @@
|
||||
/**
|
||||
* @file plugins Mys types Position.d.ts
|
||||
* @file plugins/Mys/types/Position.d.ts
|
||||
* @description Mys 插件热点追踪接口
|
||||
* @author BTMuli <bt-muli@outlook.com>
|
||||
* @since Alpha v0.2.1
|
||||
*/
|
||||
|
||||
/**
|
||||
* @description Mys 插件热点追踪类型
|
||||
* @since Alpha v0.2.1
|
||||
* @namespace Position
|
||||
* @return Position
|
||||
* @namespace TGApp.Plugins.Mys.Position
|
||||
* @memberof TGApp.Plugins.Mys
|
||||
*/
|
||||
declare namespace TGApp.Plugins.Mys.Position {
|
||||
/**
|
||||
* @description 热点追踪信息的返回类型
|
||||
* @since Alpha v0.2.1
|
||||
* @interface Response
|
||||
* @extends TGApp.Plugins.Mys.Base.Response
|
||||
* @extends TGApp.BBS.Response.Base
|
||||
* @property {ObcItem[]} data.list obc 列表
|
||||
* @return Response
|
||||
*/
|
||||
export interface Response extends TGApp.Plugins.Mys.Obc.Response {
|
||||
interface Response extends TGApp.BBS.Response.Base {
|
||||
retcode: 0;
|
||||
data: {
|
||||
list: ObcItem[];
|
||||
};
|
||||
@@ -34,7 +34,7 @@ declare namespace TGApp.Plugins.Mys.Position {
|
||||
* @property {Data[]} list 列表
|
||||
* @return ObcItem
|
||||
*/
|
||||
export interface ObcItem extends TGApp.Plugins.Mys.Obc.Data {
|
||||
interface ObcItem extends TGApp.Plugins.Mys.Obc.Data {
|
||||
list: Data[];
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ declare namespace TGApp.Plugins.Mys.Position {
|
||||
* @property {string} end_time 结束时间 // 1680465599000
|
||||
* @return Data
|
||||
*/
|
||||
export interface Data {
|
||||
interface Data {
|
||||
recommend_id: number;
|
||||
content_id: number;
|
||||
title: string;
|
||||
@@ -88,7 +88,7 @@ declare namespace TGApp.Plugins.Mys.Position {
|
||||
* @property {number} time.endStamp 结束时间戳
|
||||
* @return RenderCard
|
||||
*/
|
||||
export interface RenderCard {
|
||||
interface RenderCard {
|
||||
title: string;
|
||||
postId: number;
|
||||
icon: string;
|
||||
|
||||
33
src/plugins/Mys/types/Post.d.ts
vendored
33
src/plugins/Mys/types/Post.d.ts
vendored
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @file plugins Mys types post.d.ts
|
||||
* @file plugins/Mys/types/post.d.ts
|
||||
* @description Mys 插件帖子类型定义文件
|
||||
* @since Beta v0.3.3
|
||||
*/
|
||||
@@ -7,19 +7,20 @@
|
||||
/**
|
||||
* @description Mys 插件帖子类型
|
||||
* @since Alpha v0.2.1
|
||||
* @namespace Post
|
||||
* @return Post
|
||||
* @namespace TGApp.Plugins.Mys.Post
|
||||
* @memberof TGApp.Plugins.Mys
|
||||
*/
|
||||
declare namespace TGApp.Plugins.Mys.Post {
|
||||
/**
|
||||
* @description 帖子返回数据
|
||||
* @since Alpha v0.2.1
|
||||
* @interface Response
|
||||
* @extends TGApp.Plugins.Mys.Base.Response
|
||||
* @extends TGApp.BBS.Response.Base
|
||||
* @property {FullData} data.post 帖子数据
|
||||
* @return Response
|
||||
*/
|
||||
export interface Response extends TGApp.Plugins.Mys.Base.Response {
|
||||
interface Response extends TGApp.BBS.Response.Base {
|
||||
retcode: 0;
|
||||
data: {
|
||||
post: FullData;
|
||||
};
|
||||
@@ -52,7 +53,7 @@ declare namespace TGApp.Plugins.Mys.Post {
|
||||
* @property {TGApp.Plugins.Mys.News.Meta} news_meta 咨讯元数据,可能为 null
|
||||
* @return FullData
|
||||
*/
|
||||
export interface FullData {
|
||||
interface FullData {
|
||||
post: Post;
|
||||
forum: Forum;
|
||||
topics: Topic[];
|
||||
@@ -121,7 +122,7 @@ declare namespace TGApp.Plugins.Mys.Post {
|
||||
* @property {number} selected_comment 是否选择评论
|
||||
* @return Post
|
||||
*/
|
||||
export interface Post {
|
||||
interface Post {
|
||||
game_id: number;
|
||||
post_id: string;
|
||||
f_forum_id: number;
|
||||
@@ -175,7 +176,7 @@ declare namespace TGApp.Plugins.Mys.Post {
|
||||
* @property {unknown} forum_cate 版块分类,可能为 null
|
||||
* @return Forum
|
||||
*/
|
||||
export interface Forum {
|
||||
interface Forum {
|
||||
id: number;
|
||||
name: string;
|
||||
icon: string;
|
||||
@@ -197,7 +198,7 @@ declare namespace TGApp.Plugins.Mys.Post {
|
||||
* @property {number} content_type 内容类型
|
||||
* @return Topic
|
||||
*/
|
||||
export interface Topic {
|
||||
interface Topic {
|
||||
id: number;
|
||||
name: string;
|
||||
cover: string;
|
||||
@@ -219,7 +220,7 @@ declare namespace TGApp.Plugins.Mys.Post {
|
||||
* @property {number} forward_num 转发数
|
||||
* @return Stat
|
||||
*/
|
||||
export interface Stat {
|
||||
interface Stat {
|
||||
view_num: number;
|
||||
reply_num: number;
|
||||
like_num: number;
|
||||
@@ -249,7 +250,7 @@ declare namespace TGApp.Plugins.Mys.Post {
|
||||
* @property {boolean} is_deleted 是否已删除
|
||||
* @return Image
|
||||
*/
|
||||
export interface Image {
|
||||
interface Image {
|
||||
url: string;
|
||||
height: number;
|
||||
width: number;
|
||||
@@ -278,7 +279,7 @@ declare namespace TGApp.Plugins.Mys.Post {
|
||||
* @property {number} answer_num 回答数
|
||||
* @return HelpSys
|
||||
*/
|
||||
export interface HelpSys {
|
||||
interface HelpSys {
|
||||
top_up: unknown | null;
|
||||
top_n: unknown[];
|
||||
answer_num: number;
|
||||
@@ -293,7 +294,7 @@ declare namespace TGApp.Plugins.Mys.Post {
|
||||
* @property {string[]} images 图片 URL
|
||||
* @return Content
|
||||
*/
|
||||
export interface PostContent {
|
||||
interface PostContent {
|
||||
describe: string;
|
||||
images?: string[];
|
||||
}
|
||||
@@ -330,7 +331,7 @@ declare namespace TGApp.Plugins.Mys.Post {
|
||||
* @property {string} attributes.link 链接
|
||||
* @return StructuredContent
|
||||
*/
|
||||
export interface StructuredContent {
|
||||
interface StructuredContent {
|
||||
insert:
|
||||
| {
|
||||
image?: string;
|
||||
@@ -386,7 +387,7 @@ declare namespace TGApp.Plugins.Mys.Post {
|
||||
* @property {number} review_status 审核状态
|
||||
* @return StructuredVod
|
||||
*/
|
||||
export interface StructuredVod {
|
||||
interface StructuredVod {
|
||||
id: number;
|
||||
duration: number;
|
||||
cover: string;
|
||||
@@ -422,7 +423,7 @@ declare namespace TGApp.Plugins.Mys.Post {
|
||||
* @property {number} landing_url_type 落地链接类型
|
||||
* @return StructuredLinkCard
|
||||
*/
|
||||
export interface StructuredLinkCard {
|
||||
interface StructuredLinkCard {
|
||||
link_type: number;
|
||||
origin_url: string;
|
||||
landing_url: string;
|
||||
|
||||
28
src/plugins/Mys/types/User.d.ts
vendored
28
src/plugins/Mys/types/User.d.ts
vendored
@@ -1,26 +1,26 @@
|
||||
/**
|
||||
* @file plugins Mys types user.ts
|
||||
* @file plugins/Mys/types/user.ts
|
||||
* @description Mys 插件用户类型定义文件
|
||||
* @author BTMuli <bt-muli@outlook.com>
|
||||
* @since Alpha v0.2.2
|
||||
*/
|
||||
|
||||
/**
|
||||
* @description Mys 插件用户类型
|
||||
* @since Alpha v0.2.2
|
||||
* @namespace User
|
||||
* @return User
|
||||
* @namespace TGApp.Plugins.Mys.User
|
||||
* @memberof TGApp.Plugins.Mys
|
||||
*/
|
||||
declare namespace TGApp.Plugins.Mys.User {
|
||||
/**
|
||||
* @description 主页用户信息返回
|
||||
* @since Alpha v0.2.1
|
||||
* @interface HomeResponse
|
||||
* @extends TGApp.Plugins.Mys.Base.Response
|
||||
* @extends TGApp.BBS.Response.Base
|
||||
* @property {Home} data 用户信息
|
||||
* @return HomeResponse
|
||||
*/
|
||||
export interface HomeResponse extends TGApp.Plugins.Mys.Base.Response {
|
||||
interface HomeResponse extends TGApp.BBS.Response.Base {
|
||||
retcode: 0;
|
||||
data: Home;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ declare namespace TGApp.Plugins.Mys.User {
|
||||
* @property {number} audit_info.nickname_status 昵称审核状态
|
||||
* @return Home
|
||||
*/
|
||||
export interface Home {
|
||||
interface Home {
|
||||
user_info: Info;
|
||||
follow_relation: unknown;
|
||||
auth_relations: unknown[];
|
||||
@@ -86,7 +86,7 @@ declare namespace TGApp.Plugins.Mys.User {
|
||||
* @property {string} ip_region 用户 IP 地区
|
||||
* @return Info
|
||||
*/
|
||||
export interface Info {
|
||||
interface Info {
|
||||
uid: string;
|
||||
nickname: string;
|
||||
introduce: string;
|
||||
@@ -112,7 +112,7 @@ declare namespace TGApp.Plugins.Mys.User {
|
||||
* @property {string} label 认证标签
|
||||
* @return Certification
|
||||
*/
|
||||
export interface Certification {
|
||||
interface Certification {
|
||||
type: number;
|
||||
label: string;
|
||||
}
|
||||
@@ -126,7 +126,7 @@ declare namespace TGApp.Plugins.Mys.User {
|
||||
* @property {number} game_id 游戏 ID
|
||||
* @return LevelExp
|
||||
*/
|
||||
export interface LevelExp {
|
||||
interface LevelExp {
|
||||
level: number;
|
||||
exp: number;
|
||||
game_id: number;
|
||||
@@ -147,7 +147,7 @@ declare namespace TGApp.Plugins.Mys.User {
|
||||
* @property {string} follow_collection_cnt 收藏数
|
||||
* @return Archive
|
||||
*/
|
||||
export interface Archive {
|
||||
interface Archive {
|
||||
like_num: string;
|
||||
post_num: string;
|
||||
replypost_num: string;
|
||||
@@ -192,7 +192,7 @@ declare namespace TGApp.Plugins.Mys.User {
|
||||
* @property {number} created_at 创建时间
|
||||
* @return Community
|
||||
*/
|
||||
export interface Community {
|
||||
interface Community {
|
||||
is_realname: boolean;
|
||||
agree_status: boolean;
|
||||
silent_end_time: number;
|
||||
@@ -244,7 +244,7 @@ declare namespace TGApp.Plugins.Mys.User {
|
||||
* @property {string} pendant 用户挂件 URL,可能为 ""
|
||||
* @return Post
|
||||
*/
|
||||
export interface Post {
|
||||
interface Post {
|
||||
uid: string;
|
||||
nickname: string;
|
||||
introduce: string;
|
||||
@@ -269,7 +269,7 @@ declare namespace TGApp.Plugins.Mys.User {
|
||||
* @property {boolean} is_collected 是否收藏
|
||||
* @returns {SelfOperation}
|
||||
*/
|
||||
export interface SelfOperation {
|
||||
interface SelfOperation {
|
||||
attitude: number;
|
||||
is_collected: boolean;
|
||||
}
|
||||
|
||||
27
src/types/BBS/Announcement.d.ts
vendored
27
src/types/BBS/Announcement.d.ts
vendored
@@ -1,10 +1,15 @@
|
||||
/**
|
||||
* @file types BBS Announcement.d.ts
|
||||
* @file types/BBS/Announcement.d.ts
|
||||
* @description 从 BBS 获取到的游戏内公告类型定义文件
|
||||
* @author BTMuli<bt-muli@outlook.com>
|
||||
* @since Alpha v0.1.5
|
||||
*/
|
||||
|
||||
/**
|
||||
* @description 游戏内公告类型定义
|
||||
* @since Alpha v0.1.5
|
||||
* @namespace TGApp.BBS.Announcement
|
||||
* @memberof TGApp.BBS
|
||||
*/
|
||||
declare namespace TGApp.BBS.Announcement {
|
||||
/**
|
||||
* @description 公告列表返回响应类型
|
||||
@@ -14,7 +19,8 @@ declare namespace TGApp.BBS.Announcement {
|
||||
* @property {ListData} data - 公告列表数据
|
||||
* @return ListResponse
|
||||
*/
|
||||
export interface ListResponse extends TGApp.BBS.Response.Base {
|
||||
interface ListResponse extends TGApp.BBS.Response.Base {
|
||||
retcode: 0;
|
||||
data: ListData;
|
||||
}
|
||||
|
||||
@@ -26,7 +32,8 @@ declare namespace TGApp.BBS.Announcement {
|
||||
* @property {ContentData} data - 公告内容数据
|
||||
* @return ContentResponse
|
||||
*/
|
||||
export interface ContentResponse extends TGApp.BBS.Response.Base {
|
||||
interface ContentResponse extends TGApp.BBS.Response.Base {
|
||||
retcode: 0;
|
||||
data: ContentData;
|
||||
}
|
||||
|
||||
@@ -48,7 +55,7 @@ declare namespace TGApp.BBS.Announcement {
|
||||
* @property {unknown} static_sign - 静态签名
|
||||
* @return ListData
|
||||
*/
|
||||
export interface ListData {
|
||||
interface ListData {
|
||||
list: ListItem[];
|
||||
total: number;
|
||||
type_list: ListType[];
|
||||
@@ -73,7 +80,7 @@ declare namespace TGApp.BBS.Announcement {
|
||||
* @property {number} pic_total - 图片总数
|
||||
* @return ContentData
|
||||
*/
|
||||
export interface ContentData {
|
||||
interface ContentData {
|
||||
list: ContentItem[];
|
||||
total: number;
|
||||
pic_list: unknown[];
|
||||
@@ -89,7 +96,7 @@ declare namespace TGApp.BBS.Announcement {
|
||||
* @property {string} type_label - 公告类型标签
|
||||
* @return ListItem
|
||||
*/
|
||||
export interface ListItem {
|
||||
interface ListItem {
|
||||
list: AnnoSingle[];
|
||||
type_id: number;
|
||||
type_label: string;
|
||||
@@ -121,7 +128,7 @@ declare namespace TGApp.BBS.Announcement {
|
||||
* @property {boolean} extra_remind 是否有额外提醒
|
||||
* @return AnnoSingle
|
||||
*/
|
||||
export interface AnnoSingle {
|
||||
interface AnnoSingle {
|
||||
ann_id: number;
|
||||
title: string;
|
||||
subtitle: string;
|
||||
@@ -153,7 +160,7 @@ declare namespace TGApp.BBS.Announcement {
|
||||
* @property {string} mi18n_name 公告类型国际化名称
|
||||
* @return ListType
|
||||
*/
|
||||
export interface ListType {
|
||||
interface ListType {
|
||||
id: number;
|
||||
name: string;
|
||||
mi18n_name: string;
|
||||
@@ -171,7 +178,7 @@ declare namespace TGApp.BBS.Announcement {
|
||||
* @property {string} lang 公告语言
|
||||
* @return ContentItem
|
||||
*/
|
||||
export interface ContentItem {
|
||||
interface ContentItem {
|
||||
ann_id: number;
|
||||
title: string;
|
||||
subtitle: string;
|
||||
|
||||
11
src/types/BBS/Response.d.ts
vendored
11
src/types/BBS/Response.d.ts
vendored
@@ -21,9 +21,9 @@ declare namespace TGApp.BBS.Response {
|
||||
* @return Base
|
||||
*/
|
||||
interface Base {
|
||||
retcode: number;
|
||||
retcode: Pick<number, 0>;
|
||||
message: string;
|
||||
data: any;
|
||||
data: never;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -48,6 +48,7 @@ declare namespace TGApp.BBS.Response {
|
||||
* @return getTokens
|
||||
*/
|
||||
interface getTokens extends Base {
|
||||
retcode: 0;
|
||||
data: {
|
||||
list: getTokensRes[];
|
||||
};
|
||||
@@ -62,6 +63,7 @@ declare namespace TGApp.BBS.Response {
|
||||
* @return getLTokenBySToken
|
||||
*/
|
||||
interface getLTokenBySToken extends Base {
|
||||
retcode: 0;
|
||||
data: {
|
||||
ltoken: string;
|
||||
};
|
||||
@@ -77,6 +79,7 @@ declare namespace TGApp.BBS.Response {
|
||||
* @return getCookieTokenBySToken
|
||||
*/
|
||||
interface getCookieTokenBySToken extends Base {
|
||||
retcode: 0;
|
||||
data: {
|
||||
uid: string;
|
||||
cookie_token: string;
|
||||
@@ -94,6 +97,7 @@ declare namespace TGApp.BBS.Response {
|
||||
* @return verifyUserInfoBySToken
|
||||
*/
|
||||
interface verifyUserInfoBySToken extends Base {
|
||||
retcode: 0;
|
||||
data: {
|
||||
user_info: TGApp.BBS.Account.VerifySTokenInfo;
|
||||
realname_info: unknown;
|
||||
@@ -110,6 +114,7 @@ declare namespace TGApp.BBS.Response {
|
||||
* @return getStokenByGameToken
|
||||
*/
|
||||
interface getStokenByGameToken extends Base {
|
||||
retcode: 0;
|
||||
data: getStokenByGameTokenData;
|
||||
}
|
||||
|
||||
@@ -144,6 +149,7 @@ declare namespace TGApp.BBS.Response {
|
||||
* @return getCookieTokenByGameToken
|
||||
*/
|
||||
interface getCookieTokenByGameToken extends Base {
|
||||
retcode: 0;
|
||||
data: {
|
||||
uid: string;
|
||||
cookie_token: string;
|
||||
@@ -161,6 +167,7 @@ declare namespace TGApp.BBS.Response {
|
||||
* @return getActionTicketBySToken
|
||||
*/
|
||||
interface getActionTicketBySToken extends Base {
|
||||
retcode: 0;
|
||||
data: {
|
||||
ticket: string;
|
||||
is_verified: boolean;
|
||||
|
||||
24
src/types/Game/Abyss.d.ts
vendored
24
src/types/Game/Abyss.d.ts
vendored
@@ -1,10 +1,15 @@
|
||||
/**
|
||||
* @file types Game Abyss.d.ts
|
||||
* @file types/Game/Abyss.d.ts
|
||||
* @description 游戏深渊相关类型定义文件
|
||||
* @author BTMuli<bt-muli@outlook.com>
|
||||
* @since Alpha v0.2.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* @description 深渊数据相关类型
|
||||
* @since Alpha v0.2.0
|
||||
* @namespace TGApp.Game.Abyss
|
||||
* @memberof TGApp.Game
|
||||
*/
|
||||
declare namespace TGApp.Game.Abyss {
|
||||
/**
|
||||
* @description 深渊数据返回类型
|
||||
@@ -14,7 +19,8 @@ declare namespace TGApp.Game.Abyss {
|
||||
* @property {FullData} data - 深渊数据
|
||||
* @return Response
|
||||
*/
|
||||
export interface Response extends TGApp.BBS.Response.Base {
|
||||
interface Response extends TGApp.BBS.Response.Base {
|
||||
retcode: 0;
|
||||
data: FullData;
|
||||
}
|
||||
|
||||
@@ -39,7 +45,7 @@ declare namespace TGApp.Game.Abyss {
|
||||
* @property {boolean} is_unlock - 是否解锁
|
||||
* @return FullData
|
||||
*/
|
||||
export interface FullData {
|
||||
interface FullData {
|
||||
schedule_id: number;
|
||||
start_time: string;
|
||||
end_time: string;
|
||||
@@ -67,7 +73,7 @@ declare namespace TGApp.Game.Abyss {
|
||||
* @property {number} rarity - 角色星级
|
||||
* @return CharacterData
|
||||
*/
|
||||
export interface CharacterData {
|
||||
interface CharacterData {
|
||||
avatar_id: number;
|
||||
avatar_icon: string;
|
||||
value: number;
|
||||
@@ -87,7 +93,7 @@ declare namespace TGApp.Game.Abyss {
|
||||
* @property {Level[]} levels - 层内关卡数据
|
||||
* @return Floor
|
||||
*/
|
||||
export interface Floor {
|
||||
interface Floor {
|
||||
index: number;
|
||||
icon: string;
|
||||
is_unlock: boolean;
|
||||
@@ -107,7 +113,7 @@ declare namespace TGApp.Game.Abyss {
|
||||
* @property {Battle[]} battles - 关卡内战斗数据
|
||||
* @return Level
|
||||
*/
|
||||
export interface Level {
|
||||
interface Level {
|
||||
index: number;
|
||||
star: number;
|
||||
max_star: number;
|
||||
@@ -123,7 +129,7 @@ declare namespace TGApp.Game.Abyss {
|
||||
* @property {CharacterInfo[]} avatars - 角色信息
|
||||
* @return Battle
|
||||
*/
|
||||
export interface Battle {
|
||||
interface Battle {
|
||||
index: number;
|
||||
timestamp: string;
|
||||
avatars: CharacterInfo[];
|
||||
@@ -139,7 +145,7 @@ declare namespace TGApp.Game.Abyss {
|
||||
* @property {number} rarity - 角色星级
|
||||
* @return CharacterInfo
|
||||
*/
|
||||
export interface CharacterInfo {
|
||||
interface CharacterInfo {
|
||||
id: number;
|
||||
icon: string;
|
||||
level: number;
|
||||
|
||||
25
src/types/Game/Calculate.d.ts
vendored
25
src/types/Game/Calculate.d.ts
vendored
@@ -1,10 +1,15 @@
|
||||
/**
|
||||
* @file types Game Calculate.d.ts
|
||||
* @file types/Game/Calculate.d.ts
|
||||
* @description 养成计算器相关类型定义文件
|
||||
* @author BTMuli <bt-muli@outlook.com>
|
||||
* @since Alpha v0.2.1
|
||||
*/
|
||||
|
||||
/**
|
||||
* @description 养成计算器相关类型定义命名空间
|
||||
* @since Alpha v0.2.1
|
||||
* @namespace TGApp.Game.Calculate
|
||||
* @memberof TGApp.Game
|
||||
*/
|
||||
declare namespace TGApp.Game.Calculate {
|
||||
/**
|
||||
* @description 获取同步角色列表返回
|
||||
@@ -15,7 +20,8 @@ declare namespace TGApp.Game.Calculate {
|
||||
* @property {Array<AvatarListItem>} data.list - 角色列表
|
||||
* @return SyncAvatarListResponse
|
||||
*/
|
||||
export interface SyncAvatarListResponse extends TGApp.BBS.Response.Base {
|
||||
interface SyncAvatarListResponse extends TGApp.BBS.Response.Base {
|
||||
retcode: 0;
|
||||
data: {
|
||||
list: AvatarListItem[];
|
||||
};
|
||||
@@ -35,7 +41,7 @@ declare namespace TGApp.Game.Calculate {
|
||||
* @property {number} level_current - 角色当前等级
|
||||
* @return AvatarListItem
|
||||
*/
|
||||
export interface AvatarListItem {
|
||||
interface AvatarListItem {
|
||||
id: number;
|
||||
name: string;
|
||||
icon: string;
|
||||
@@ -55,7 +61,8 @@ declare namespace TGApp.Game.Calculate {
|
||||
* @property {AvatarDetail} data - 角色详情
|
||||
* @return SyncAvatarDetailResponse
|
||||
*/
|
||||
export interface SyncAvatarDetailResponse extends TGApp.BBS.Response.Base {
|
||||
interface SyncAvatarDetailResponse extends TGApp.BBS.Response.Base {
|
||||
retcode: 0;
|
||||
data: TGApp.Game.Calculate.AvatarDetail;
|
||||
}
|
||||
|
||||
@@ -68,7 +75,7 @@ declare namespace TGApp.Game.Calculate {
|
||||
* @property {AvatarDetailRelic[]} reliquary_list - 角色圣遗物列表
|
||||
* @return AvatarDetail
|
||||
*/
|
||||
export interface AvatarDetail {
|
||||
interface AvatarDetail {
|
||||
skill_list: AvatarDetailSkill[];
|
||||
weapon: AvatarDetailWeapon;
|
||||
reliquary_list: AvatarDetailRelic[];
|
||||
@@ -86,7 +93,7 @@ declare namespace TGApp.Game.Calculate {
|
||||
* @property {number} level_current - 技能当前等级
|
||||
* @return AvatarDetailSkill
|
||||
*/
|
||||
export interface AvatarDetailSkill {
|
||||
interface AvatarDetailSkill {
|
||||
id: number;
|
||||
group_id: number;
|
||||
name: string;
|
||||
@@ -108,7 +115,7 @@ declare namespace TGApp.Game.Calculate {
|
||||
* @property {number} level_current - 武器当前等级
|
||||
* @return AvatarDetailWeapon
|
||||
*/
|
||||
export interface AvatarDetailWeapon {
|
||||
interface AvatarDetailWeapon {
|
||||
id: number;
|
||||
name: string;
|
||||
icon: string;
|
||||
@@ -131,7 +138,7 @@ declare namespace TGApp.Game.Calculate {
|
||||
* @property {number} max_level - 圣遗物最大等级
|
||||
* @return AvatarDetailRelic
|
||||
*/
|
||||
export interface AvatarDetailRelic {
|
||||
interface AvatarDetailRelic {
|
||||
id: number;
|
||||
name: string;
|
||||
icon: string;
|
||||
|
||||
26
src/types/Game/Character.d.ts
vendored
26
src/types/Game/Character.d.ts
vendored
@@ -1,10 +1,15 @@
|
||||
/**
|
||||
* @file types Game Character.d.ts
|
||||
* @file types/Game/Character.d.ts
|
||||
* @description 游戏角色相关类型定义文件
|
||||
* @author BTMuli<bt-muli@outlook.com>
|
||||
* @since Alpha v0.2.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* @description 游戏角色相关类型定义命名空间
|
||||
* @since Alpha v0.2.0
|
||||
* @namespace TGApp.Game.Character
|
||||
* @memberof TGApp.Game
|
||||
*/
|
||||
declare namespace TGApp.Game.Character {
|
||||
/**
|
||||
* @description 角色列表数据返回类型
|
||||
@@ -15,7 +20,8 @@ declare namespace TGApp.Game.Character {
|
||||
* @property {ListRole} data.role - 角色信息
|
||||
* @return ListResponse
|
||||
*/
|
||||
export interface ListResponse extends TGApp.BBS.Response.Base {
|
||||
interface ListResponse extends TGApp.BBS.Response.Base {
|
||||
retcode: 0;
|
||||
data: {
|
||||
avatars: ListItem[];
|
||||
role: ListRole;
|
||||
@@ -43,7 +49,7 @@ declare namespace TGApp.Game.Character {
|
||||
* @property {unknown} external
|
||||
* @return ListItem
|
||||
*/
|
||||
export interface ListItem {
|
||||
interface ListItem {
|
||||
id: number;
|
||||
image: string;
|
||||
icon: string;
|
||||
@@ -71,7 +77,7 @@ declare namespace TGApp.Game.Character {
|
||||
* @property {number} level - 角色等级
|
||||
* @return ListRole
|
||||
*/
|
||||
export interface ListRole {
|
||||
interface ListRole {
|
||||
AvatarUrl: string;
|
||||
nickname: string;
|
||||
region: string;
|
||||
@@ -94,7 +100,7 @@ declare namespace TGApp.Game.Character {
|
||||
* @property {number} affix_level - 武器精炼等级
|
||||
* @return LIWeapon
|
||||
*/
|
||||
export interface LIWeapon {
|
||||
interface LIWeapon {
|
||||
id: number;
|
||||
name: string;
|
||||
icon: string;
|
||||
@@ -121,7 +127,7 @@ declare namespace TGApp.Game.Character {
|
||||
* @property {TGApp.Game.Constant.EnumRelic} pos_name - 圣遗物位置名称
|
||||
* @return LIRelic
|
||||
*/
|
||||
export interface LIRelic {
|
||||
interface LIRelic {
|
||||
id: number;
|
||||
name: string;
|
||||
icon: string;
|
||||
@@ -142,7 +148,7 @@ declare namespace TGApp.Game.Character {
|
||||
* @property {string} affixes[].effect - 圣遗物套装效果
|
||||
* @return RelicSet
|
||||
*/
|
||||
export interface RelicSet {
|
||||
interface RelicSet {
|
||||
id: number;
|
||||
name: string;
|
||||
affixes: Array<{
|
||||
@@ -163,7 +169,7 @@ declare namespace TGApp.Game.Character {
|
||||
* @property {number} pos - 命座位置
|
||||
* @return LIConstellation
|
||||
*/
|
||||
export interface LIConstellation {
|
||||
interface LIConstellation {
|
||||
id: number;
|
||||
name: string;
|
||||
icon: string;
|
||||
@@ -181,7 +187,7 @@ declare namespace TGApp.Game.Character {
|
||||
* @property {string} icon - 时装图标
|
||||
* @return LICostume
|
||||
*/
|
||||
export interface LICostume {
|
||||
interface LICostume {
|
||||
id: number;
|
||||
name: string;
|
||||
icon: string;
|
||||
|
||||
20
src/types/Game/DailyNotes.d.ts
vendored
20
src/types/Game/DailyNotes.d.ts
vendored
@@ -1,10 +1,15 @@
|
||||
/**
|
||||
* @file types Game DailyNotes.d.ts
|
||||
* @file types/Game/DailyNotes.d.ts
|
||||
* @description 获取实时便笺数据类型定义文件
|
||||
* @author BTMuli <bt-muli@outlook.com>
|
||||
* @since Alpha v0.2.2
|
||||
*/
|
||||
|
||||
/**
|
||||
* @description 获取实时便笺数据
|
||||
* @since Alpha v0.2.2
|
||||
* @namespace TGApp.Game.DailyNotes
|
||||
* @memberof TGApp.Game
|
||||
*/
|
||||
declare namespace TGApp.Game.DailyNotes {
|
||||
/**
|
||||
* @description 便笺数据返回
|
||||
@@ -14,7 +19,8 @@ declare namespace TGApp.Game.DailyNotes {
|
||||
* @property {FullInfo} data - 便笺数据
|
||||
* @return Response
|
||||
*/
|
||||
export interface Response extends TGApp.BBS.Response.Base {
|
||||
interface Response extends TGApp.BBS.Response.Base {
|
||||
retcode: 0;
|
||||
data: FullInfo;
|
||||
}
|
||||
|
||||
@@ -40,7 +46,7 @@ declare namespace TGApp.Game.DailyNotes {
|
||||
* @property {Transform} transformer - 便笺数据转换器
|
||||
* @return FullInfo
|
||||
*/
|
||||
export interface FullInfo {
|
||||
interface FullInfo {
|
||||
current_resin: number;
|
||||
max_resin: number;
|
||||
resin_recovery_time: string;
|
||||
@@ -68,7 +74,7 @@ declare namespace TGApp.Game.DailyNotes {
|
||||
* @property {string} remained_time - 剩余时间(秒)
|
||||
* @return Expedition
|
||||
*/
|
||||
export interface Expedition {
|
||||
interface Expedition {
|
||||
avatar_side_icon: string;
|
||||
status: string;
|
||||
remained_time: string;
|
||||
@@ -85,7 +91,7 @@ declare namespace TGApp.Game.DailyNotes {
|
||||
* @property {string} last_job_id - 上次任务 ID
|
||||
* @return Transform
|
||||
*/
|
||||
export interface Transform {
|
||||
interface Transform {
|
||||
obtained: boolean;
|
||||
recovery_time: TransformTime;
|
||||
wiki: string;
|
||||
@@ -104,7 +110,7 @@ declare namespace TGApp.Game.DailyNotes {
|
||||
* @property {boolean} reached - 是否已达到恢复时间
|
||||
* @return TransformTime
|
||||
*/
|
||||
export interface TransformTime {
|
||||
interface TransformTime {
|
||||
Day: number;
|
||||
Hour: number;
|
||||
Minute: number;
|
||||
|
||||
17
src/types/Game/Gacha.d.ts
vendored
17
src/types/Game/Gacha.d.ts
vendored
@@ -1,10 +1,15 @@
|
||||
/**
|
||||
* @file types Game Gacha.d.ts
|
||||
* @file types/Game/Gacha.d.ts
|
||||
* @description 游戏抽卡相关类型定义文件
|
||||
* @author BTMuli<bt-muli@outlook.com>
|
||||
* @since Beta v0.3.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* @description 游戏抽卡相关类型定义命名空间
|
||||
* @since Beta v0.3.0
|
||||
* @namespace TGApp.Game.Gacha
|
||||
* @memberof TGApp.Game
|
||||
*/
|
||||
declare namespace TGApp.Game.Gacha {
|
||||
/**
|
||||
* @description 获取 authkey 返回类型
|
||||
@@ -16,7 +21,8 @@ declare namespace TGApp.Game.Gacha {
|
||||
* @property {string} data.authkey - authkey
|
||||
* @return AuthkeyResponse
|
||||
*/
|
||||
export interface AuthkeyResponse extends TGApp.BBS.Response.Base {
|
||||
interface AuthkeyResponse extends TGApp.BBS.Response.Base {
|
||||
retcode: 0;
|
||||
data: {
|
||||
sign_type: number;
|
||||
authkey_ver: number;
|
||||
@@ -35,7 +41,8 @@ declare namespace TGApp.Game.Gacha {
|
||||
* @property {GachaItem[]} data.list - 抽卡记录列表
|
||||
* @return GachaLogResponse
|
||||
*/
|
||||
export interface GachaLogResponse extends TGApp.BBS.Response.Base {
|
||||
interface GachaLogResponse extends TGApp.BBS.Response.Base {
|
||||
retcode: 0;
|
||||
data: {
|
||||
page: number;
|
||||
size: number;
|
||||
@@ -60,7 +67,7 @@ declare namespace TGApp.Game.Gacha {
|
||||
* @property {string} id - 抽卡记录 id
|
||||
* @return GachaItem
|
||||
*/
|
||||
export interface GachaItem {
|
||||
interface GachaItem {
|
||||
uid: string;
|
||||
gacha_type: string;
|
||||
item_id: string;
|
||||
|
||||
26
src/types/Game/Record.d.ts
vendored
26
src/types/Game/Record.d.ts
vendored
@@ -1,10 +1,15 @@
|
||||
/**
|
||||
* @file types Game Record.d.ts
|
||||
* @file types/Game/Record.d.ts
|
||||
* @description 原神战绩相关类型定义文件
|
||||
* @author BTMuli <bt-muli@outlook.com>
|
||||
* @since Alpha v0.2.2
|
||||
*/
|
||||
|
||||
/**
|
||||
* @description 原神战绩相关类型定义命名空间
|
||||
* @since Alpha v0.2.2
|
||||
* @namespace TGApp.Game.Record
|
||||
* @memberof TGApp.Game
|
||||
*/
|
||||
declare namespace TGApp.Game.Record {
|
||||
/**
|
||||
* @description 原神战绩数据返回类型
|
||||
@@ -14,7 +19,8 @@ declare namespace TGApp.Game.Record {
|
||||
* @property {FullData} data - 原神战绩数据
|
||||
* @return Response
|
||||
*/
|
||||
export interface Response extends TGApp.BBS.Response.Base {
|
||||
interface Response extends TGApp.BBS.Response.Base {
|
||||
retcode: 0;
|
||||
data: FullData;
|
||||
}
|
||||
|
||||
@@ -30,7 +36,7 @@ declare namespace TGApp.Game.Record {
|
||||
* @property {Home[]} homes - 尘歌壶信息
|
||||
* @return FullData
|
||||
*/
|
||||
export interface FullData {
|
||||
interface FullData {
|
||||
role: Role;
|
||||
avatars: Avatar[];
|
||||
stats: Stats;
|
||||
@@ -49,7 +55,7 @@ declare namespace TGApp.Game.Record {
|
||||
* @property {number} level - 等级
|
||||
* @return Role
|
||||
*/
|
||||
export interface Role {
|
||||
interface Role {
|
||||
AvatarUrl: string;
|
||||
nickname: string;
|
||||
region: string;
|
||||
@@ -72,7 +78,7 @@ declare namespace TGApp.Game.Record {
|
||||
* @property {boolean} is_chosen - 角色是否展示
|
||||
* @return Avatar
|
||||
*/
|
||||
export interface Avatar {
|
||||
interface Avatar {
|
||||
id: number;
|
||||
image: string;
|
||||
name: string;
|
||||
@@ -107,7 +113,7 @@ declare namespace TGApp.Game.Record {
|
||||
* @property {number} hydroculus_number - 水神瞳数量
|
||||
* @return Stats
|
||||
*/
|
||||
export interface Stats {
|
||||
interface Stats {
|
||||
active_day_number: number;
|
||||
achievement_number: number;
|
||||
anemoculus_number: number;
|
||||
@@ -145,7 +151,7 @@ declare namespace TGApp.Game.Record {
|
||||
* @property {string} cover - 封面 URL
|
||||
* @return WorldExplore
|
||||
*/
|
||||
export interface WorldExplore {
|
||||
interface WorldExplore {
|
||||
level: number;
|
||||
exploration_percentage: number;
|
||||
icon: string;
|
||||
@@ -170,7 +176,7 @@ declare namespace TGApp.Game.Record {
|
||||
* @property {string} icon - 图标
|
||||
* @return WorldOffering
|
||||
*/
|
||||
export interface WorldOffering {
|
||||
interface WorldOffering {
|
||||
name: string;
|
||||
level: number;
|
||||
icon: string;
|
||||
@@ -190,7 +196,7 @@ declare namespace TGApp.Game.Record {
|
||||
* @property {string} comfort_level_icon - 洞天仙力等级图标
|
||||
* @return Home
|
||||
*/
|
||||
export interface Home {
|
||||
interface Home {
|
||||
level: number;
|
||||
visit_num: number;
|
||||
comfort_num: number;
|
||||
|
||||
14
src/types/User/Account.d.ts
vendored
14
src/types/User/Account.d.ts
vendored
@@ -1,10 +1,15 @@
|
||||
/**
|
||||
* @file types User Account.d.ts
|
||||
* @file types/User/Account.d.ts
|
||||
* @description 用户账号相关类型定义文件
|
||||
* @author BTMuli<bt-muli@outlook.com>
|
||||
* @since Alpha v0.1.5
|
||||
*/
|
||||
|
||||
/**
|
||||
* @description 用户账号相关类型定义命名空间
|
||||
* @since Alpha v0.1.5
|
||||
* @namespace TGApp.User.Account
|
||||
* @memberof TGApp.User
|
||||
*/
|
||||
declare namespace TGApp.User.Account {
|
||||
/**
|
||||
* @description 游戏账号返回类型
|
||||
@@ -14,7 +19,8 @@ declare namespace TGApp.User.Account {
|
||||
* @property {Game[]} data.list 游戏账号列表
|
||||
* @return GameResponse
|
||||
*/
|
||||
export interface GameResponse extends TGApp.BBS.Response.Base {
|
||||
interface GameResponse extends TGApp.BBS.Response.Base {
|
||||
retcode: 0;
|
||||
data: {
|
||||
list: Game[];
|
||||
};
|
||||
@@ -34,7 +40,7 @@ declare namespace TGApp.User.Account {
|
||||
* @property {string} region_name 游戏区域名称
|
||||
* @return Game
|
||||
*/
|
||||
export interface Game {
|
||||
interface Game {
|
||||
game_biz: string;
|
||||
game_uid: string;
|
||||
is_chosen: boolean;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @file web request genAuthkey.ts
|
||||
* @file web/request/genAuthkey.ts
|
||||
* @description 生成 authkey
|
||||
* @since Beta v0.3.0
|
||||
*/
|
||||
@@ -29,7 +29,7 @@ export async function genAuthkey(
|
||||
};
|
||||
const header = TGUtils.User.getHeader(cookie, "POST", JSON.stringify(data), "lk2", true);
|
||||
return await http
|
||||
.fetch<TGApp.Game.Gacha.AuthkeyResponse>(url, {
|
||||
.fetch<TGApp.Game.Gacha.AuthkeyResponse | TGApp.BBS.Response.Base>(url, {
|
||||
method: "POST",
|
||||
headers: header,
|
||||
body: http.Body.json(data),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @file web request getAbyss.ts
|
||||
* @file web/request/getAbyss.ts
|
||||
* @description 获取深渊信息
|
||||
* @since Beta v0.3.0
|
||||
*/
|
||||
@@ -27,7 +27,7 @@ export async function getAbyss(
|
||||
const params = { role_id, schedule_type, server: account.region };
|
||||
const header = TGUtils.User.getHeader(cookie, "GET", params, "common");
|
||||
return await http
|
||||
.fetch<TGApp.Game.Abyss.Response>(url, {
|
||||
.fetch<TGApp.Game.Abyss.Response | TGApp.BBS.Response.Base>(url, {
|
||||
method: "GET",
|
||||
headers: header,
|
||||
query: params,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @file web request getCookieToken.ts
|
||||
* @file web/request/getCookieToken.ts
|
||||
* @description 获取 Cookie Token 的请求函数
|
||||
* @since Beta v0.3.0
|
||||
*/
|
||||
@@ -28,7 +28,7 @@ export async function getCookieTokenBySToken(
|
||||
const params = { stoken: Stoken };
|
||||
const header = TGUtils.User.getHeader(cookie, "GET", params, "common");
|
||||
return await http
|
||||
.fetch<TGApp.BBS.Response.getCookieTokenBySToken>(url, {
|
||||
.fetch<TGApp.BBS.Response.getCookieTokenBySToken | TGApp.BBS.Response.Base>(url, {
|
||||
method: "GET",
|
||||
headers: header,
|
||||
query: params,
|
||||
@@ -53,7 +53,7 @@ export async function getCookieTokenByGameToken(
|
||||
const url = "https://api-takumi.mihoyo.com/auth/api/getCookieAccountInfoByGameToken";
|
||||
const data = { account_id: Number(accountId), game_token: gameToken };
|
||||
return await http
|
||||
.fetch<TGApp.BBS.Response.getCookieTokenByGameToken>(url, {
|
||||
.fetch<TGApp.BBS.Response.getCookieTokenByGameToken | TGApp.BBS.Response.Base>(url, {
|
||||
method: "POST",
|
||||
body: http.Body.json(data),
|
||||
})
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
/**
|
||||
* @file web request getGachaLog.ts
|
||||
* @file web/request/getGachaLog.ts
|
||||
* @description 获取抽卡记录请求函数
|
||||
* @author BTMuli <bt-muli@outlook.com>
|
||||
* @since Beta v0.3.0
|
||||
*/
|
||||
|
||||
// tauri
|
||||
import { http } from "@tauri-apps/api";
|
||||
|
||||
/**
|
||||
@@ -33,7 +31,7 @@ export async function getGachaLog(
|
||||
end_id: endId,
|
||||
};
|
||||
return await http
|
||||
.fetch<TGApp.Game.Gacha.GachaLogResponse>(url, {
|
||||
.fetch<TGApp.Game.Gacha.GachaLogResponse | TGApp.BBS.Response.Base>(url, {
|
||||
method: "GET",
|
||||
query: params,
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @file web request getGameAccounts.ts
|
||||
* @file web/request/getGameAccounts.ts
|
||||
* @description 获取游戏账号信息相关请求函数
|
||||
* @since Alpha v0.1.5
|
||||
*/
|
||||
@@ -65,7 +65,7 @@ async function getGameAccounts(
|
||||
): Promise<TGApp.BBS.Response.Base | TGApp.User.Account.Game[]> {
|
||||
const header = TGUtils.User.getHeader(cookie, "GET", params, "common");
|
||||
return await http
|
||||
.fetch<TGApp.User.Account.GameResponse>(url, {
|
||||
.fetch<TGApp.User.Account.GameResponse | TGApp.BBS.Response.Base>(url, {
|
||||
method: "GET",
|
||||
headers: header,
|
||||
query: params,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @file core utils getGameRecord.ts
|
||||
* @file core/utils/getGameRecord.ts
|
||||
* @description 获取游戏数据的函数
|
||||
* @since Alpha v0.2.1
|
||||
*/
|
||||
@@ -30,7 +30,7 @@ export async function getGameRecord(
|
||||
const params = { role_id: user.gameUid, server: user.region };
|
||||
const header = TGUtils.User.getHeader(ck, "GET", params, "common");
|
||||
return await http
|
||||
.fetch<TGApp.Game.Record.Response>(url, {
|
||||
.fetch<TGApp.Game.Record.Response | TGApp.BBS.Response.Base>(url, {
|
||||
method: "GET",
|
||||
headers: header,
|
||||
query: params,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/**
|
||||
* @file web request getLToken.ts
|
||||
* @file web/request/getLToken.ts
|
||||
* @description 获取 ltoken 的请求
|
||||
|
||||
* @since Beta v0.3.0
|
||||
*/
|
||||
|
||||
@@ -29,7 +28,7 @@ export async function getLTokenBySToken(
|
||||
const params = { stoken: Stoken };
|
||||
const header = TGUtils.User.getHeader(cookie, "GET", params, "common");
|
||||
return await http
|
||||
.fetch<TGApp.BBS.Response.getLTokenBySToken>(url, {
|
||||
.fetch<TGApp.BBS.Response.getLTokenBySToken | TGApp.BBS.Response.Base>(url, {
|
||||
method: "GET",
|
||||
headers: header,
|
||||
query: params,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @file web request getRoleList.ts
|
||||
* @file web/request/getRoleList.ts
|
||||
* @description 获取游戏角色列表的请求方法
|
||||
* @since Alpha v0.2.0
|
||||
*/
|
||||
@@ -33,7 +33,7 @@ export async function getGameRoleListByLToken(
|
||||
};
|
||||
const header = TGUtils.User.getHeader(ck, "POST", JSON.stringify(data), "common");
|
||||
return await http
|
||||
.fetch<TGApp.Game.Character.ListResponse>(url, {
|
||||
.fetch<TGApp.Game.Character.ListResponse | TGApp.BBS.Response.Base>(url, {
|
||||
method: "POST",
|
||||
headers: header,
|
||||
body: http.Body.json(data),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @file web request getStoken.ts
|
||||
* @file web/request/getStoken.ts
|
||||
* @description 获取 stoken
|
||||
* @since Beta v0.3.0
|
||||
*/
|
||||
@@ -25,7 +25,7 @@ export async function getStokenByGameToken(
|
||||
"x-rpc-app_id": TGConstant.BBS.APP_ID,
|
||||
};
|
||||
return await http
|
||||
.fetch<TGApp.BBS.Response.getStokenByGameToken>(url, {
|
||||
.fetch<TGApp.BBS.Response.getStokenByGameToken | TGApp.BBS.Response.Base>(url, {
|
||||
method: "POST",
|
||||
headers: header,
|
||||
body: http.Body.json(data),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @file web request getTokens.ts
|
||||
* @file web/request/getTokens.ts
|
||||
* @description 获取游戏 Token
|
||||
* @since Alpha v0.1.5
|
||||
*/
|
||||
@@ -29,7 +29,7 @@ export async function getTokensByLoginTicket(
|
||||
const params = { login_ticket: ticket, token_types: 3, uid };
|
||||
const header = TGUtils.User.getHeader(cookie, "GET", params, "common");
|
||||
return await http
|
||||
.fetch<TGApp.BBS.Response.getTokens>(url, {
|
||||
.fetch<TGApp.BBS.Response.getTokens | TGApp.BBS.Response.Base>(url, {
|
||||
method: "GET",
|
||||
headers: header,
|
||||
query: params,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @file web request getUserInfo.ts
|
||||
* @file web/request/getUserInfo.ts
|
||||
* @description 获取用户信息请求
|
||||
* @since Beta v0.3.4
|
||||
*/
|
||||
@@ -28,7 +28,7 @@ export async function getUserInfoByCookie(
|
||||
const params = { gids: "2" };
|
||||
const header = TGUtils.User.getHeader(cookie, "GET", params, "common", true);
|
||||
return await http
|
||||
.fetch<TGApp.Plugins.Mys.User.HomeResponse>(url, {
|
||||
.fetch<TGApp.Plugins.Mys.User.HomeResponse | TGApp.BBS.Response.Base>(url, {
|
||||
method: "GET",
|
||||
headers: header,
|
||||
query: params,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @file web request verifyLToken.ts
|
||||
* @file web/request/verifyLToken.ts
|
||||
* @description 验证 stoken 的请求函数
|
||||
* @since Alpha v0.1.5
|
||||
*/
|
||||
@@ -28,7 +28,7 @@ export async function verifyLToken(
|
||||
const data = { ltoken };
|
||||
const header = TGUtils.User.getHeader(cookie, "POST", data, "common");
|
||||
return await http
|
||||
.fetch<TGApp.BBS.Response.verifyUserInfoBySToken>(url, {
|
||||
.fetch<TGApp.BBS.Response.verifyUserInfoBySToken | TGApp.BBS.Response.Base>(url, {
|
||||
method: "POST",
|
||||
headers: header,
|
||||
body: http.Body.json(data),
|
||||
|
||||
Reference in New Issue
Block a user