🐛 fix: Fix bugs
This commit is contained in:
@@ -19,3 +19,14 @@ export async function querySubscribeList(
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** Get user subscribe node info GET /v1/public/subscribe/node/list */
|
||||
export async function queryUserSubscribeNodeList(options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: API.QueryUserSubscribeNodeListResponse }>(
|
||||
'/v1/public/subscribe/node/list',
|
||||
{
|
||||
method: 'GET',
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Vendored
+55
-1
@@ -108,6 +108,7 @@ declare namespace API {
|
||||
type AuthConfig = {
|
||||
mobile: MobileAuthenticateConfig;
|
||||
email: EmailAuthticateConfig;
|
||||
device: DeviceAuthticateConfig;
|
||||
register: PubilcRegisterConfig;
|
||||
};
|
||||
|
||||
@@ -204,6 +205,13 @@ declare namespace API {
|
||||
currency_symbol: string;
|
||||
};
|
||||
|
||||
type DeviceAuthticateConfig = {
|
||||
enable: boolean;
|
||||
show_ads: boolean;
|
||||
enable_security: boolean;
|
||||
only_real_device: boolean;
|
||||
};
|
||||
|
||||
type Document = {
|
||||
id: number;
|
||||
title: string;
|
||||
@@ -256,6 +264,11 @@ declare namespace API {
|
||||
list: PaymentMethod[];
|
||||
};
|
||||
|
||||
type GetDeviceListResponse = {
|
||||
list: UserDevice[];
|
||||
total: number;
|
||||
};
|
||||
|
||||
type GetLoginLogParams = {
|
||||
page: number;
|
||||
size: number;
|
||||
@@ -343,7 +356,7 @@ declare namespace API {
|
||||
list: Ticket[];
|
||||
};
|
||||
|
||||
type Hysteria = {
|
||||
type Hysteria2 = {
|
||||
port: number;
|
||||
hop_ports: string;
|
||||
hop_interval: number;
|
||||
@@ -799,6 +812,10 @@ declare namespace API {
|
||||
total: number;
|
||||
};
|
||||
|
||||
type QueryUserSubscribeNodeListResponse = {
|
||||
list: UserSubscribeInfo[];
|
||||
};
|
||||
|
||||
type RechargeOrderRequest = {
|
||||
amount: number;
|
||||
payment: number;
|
||||
@@ -1039,6 +1056,10 @@ declare namespace API {
|
||||
security_config: SecurityConfig;
|
||||
};
|
||||
|
||||
type UnbindDeviceRequest = {
|
||||
id: number;
|
||||
};
|
||||
|
||||
type UnbindOAuthRequest = {
|
||||
method: string;
|
||||
};
|
||||
@@ -1150,6 +1171,26 @@ declare namespace API {
|
||||
updated_at: number;
|
||||
};
|
||||
|
||||
type UserSubscribeInfo = {
|
||||
id: number;
|
||||
user_id: number;
|
||||
order_id: number;
|
||||
subscribe_id: number;
|
||||
start_time: number;
|
||||
expire_time: number;
|
||||
finished_at: number;
|
||||
reset_time: number;
|
||||
traffic: number;
|
||||
download: number;
|
||||
upload: number;
|
||||
token: string;
|
||||
status: number;
|
||||
created_at: number;
|
||||
updated_at: number;
|
||||
is_try_out: boolean;
|
||||
nodes: UserSubscribeNodeInfo[];
|
||||
};
|
||||
|
||||
type UserSubscribeLog = {
|
||||
id: number;
|
||||
user_id: number;
|
||||
@@ -1160,6 +1201,19 @@ declare namespace API {
|
||||
timestamp: number;
|
||||
};
|
||||
|
||||
type UserSubscribeNodeInfo = {
|
||||
id: number;
|
||||
name: string;
|
||||
uuid: string;
|
||||
protocol: string;
|
||||
port: number;
|
||||
address: string;
|
||||
tags: string[];
|
||||
country: string;
|
||||
city: string;
|
||||
created_at: number;
|
||||
};
|
||||
|
||||
type VerifyCodeConfig = {
|
||||
verify_code_expire_time: number;
|
||||
verify_code_limit: number;
|
||||
|
||||
@@ -128,6 +128,14 @@ export async function queryUserCommissionLog(
|
||||
);
|
||||
}
|
||||
|
||||
/** Get Device List GET /v1/public/user/devices */
|
||||
export async function getDeviceList(options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: API.GetDeviceListResponse }>('/v1/public/user/devices', {
|
||||
method: 'GET',
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Query User Info GET /v1/public/user/info */
|
||||
export async function queryUserInfo(options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: API.User }>('/v1/public/user/info', {
|
||||
@@ -236,6 +244,21 @@ export async function resetUserSubscribeToken(
|
||||
});
|
||||
}
|
||||
|
||||
/** Unbind Device PUT /v1/public/user/unbind_device */
|
||||
export async function unbindDevice(
|
||||
body: API.UnbindDeviceRequest,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: any }>('/v1/public/user/unbind_device', {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Unbind OAuth POST /v1/public/user/unbind_oauth */
|
||||
export async function unbindOAuth(body: API.UnbindOAuthRequest, options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: any }>('/v1/public/user/unbind_oauth', {
|
||||
|
||||
Reference in New Issue
Block a user