✨ feat(user): Add user Detail
This commit is contained in:
@@ -32,6 +32,7 @@ export async function appleLoginCallback(
|
||||
return request<API.Response & { data?: any }>('/v1/auth/oauth/callback/apple', {
|
||||
method: 'POST',
|
||||
data: formData,
|
||||
requestType: 'form',
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
+67
-59
@@ -64,15 +64,16 @@ declare namespace API {
|
||||
};
|
||||
|
||||
type AuthConfig = {
|
||||
sms: SmsAuthenticateConfig;
|
||||
sms: MobileAuthenticateConfig;
|
||||
email: EmailAuthticateConfig;
|
||||
register: RegisterConfig;
|
||||
};
|
||||
|
||||
type AuthMethod = {
|
||||
auth_type: string;
|
||||
auth_identifier: string;
|
||||
verified: boolean;
|
||||
type AuthMethodConfig = {
|
||||
id: number;
|
||||
method: string;
|
||||
config: Record<string, any>;
|
||||
enabled: boolean;
|
||||
};
|
||||
|
||||
type CheckUserParams = {
|
||||
@@ -124,26 +125,10 @@ declare namespace API {
|
||||
};
|
||||
|
||||
type EmailAuthticateConfig = {
|
||||
email_enabled: boolean;
|
||||
email_enable_verify: boolean;
|
||||
email_enable_domain_suffix: boolean;
|
||||
email_domain_suffix_list: string;
|
||||
};
|
||||
|
||||
type EmailSmtpConfig = {
|
||||
email_enabled: boolean;
|
||||
email_smtp_host: string;
|
||||
email_smtp_port: number;
|
||||
email_smtp_user: string;
|
||||
email_smtp_pass: string;
|
||||
email_smtp_from: string;
|
||||
email_smtp_ssl: boolean;
|
||||
verify_email_template: string;
|
||||
maintenance_email_template: string;
|
||||
expiration_email_template: string;
|
||||
email_enable_verify: boolean;
|
||||
email_enable_domain_suffix: boolean;
|
||||
email_domain_suffix_list: string;
|
||||
enable: boolean;
|
||||
enable_verify: boolean;
|
||||
enable_domain_suffix: boolean;
|
||||
domain_suffix_list: string;
|
||||
};
|
||||
|
||||
type Follow = {
|
||||
@@ -213,6 +198,13 @@ declare namespace API {
|
||||
token: string;
|
||||
};
|
||||
|
||||
type MobileAuthenticateConfig = {
|
||||
enable: boolean;
|
||||
limit: number;
|
||||
interval: number;
|
||||
expire_time: number;
|
||||
};
|
||||
|
||||
type NodeConfig = {
|
||||
node_secret: string;
|
||||
node_pull_interval: number;
|
||||
@@ -247,16 +239,6 @@ declare namespace API {
|
||||
redirect: string;
|
||||
};
|
||||
|
||||
type OAuthMethod = {
|
||||
id: number;
|
||||
platform: string;
|
||||
config: Record<string, any>;
|
||||
redirect: string;
|
||||
enabled: boolean;
|
||||
created_at: number;
|
||||
updated_at: number;
|
||||
};
|
||||
|
||||
type OnlineUser = {
|
||||
uid: number;
|
||||
ip: string;
|
||||
@@ -399,6 +381,16 @@ declare namespace API {
|
||||
updated_at: number;
|
||||
};
|
||||
|
||||
type ServerRuleGroup = {
|
||||
id: number;
|
||||
name: string;
|
||||
icon: string;
|
||||
description: string;
|
||||
enable: boolean;
|
||||
created_at: number;
|
||||
updated_at: number;
|
||||
};
|
||||
|
||||
type ServerStatus = {
|
||||
cpu: number;
|
||||
mem: number;
|
||||
@@ -419,26 +411,6 @@ declare namespace API {
|
||||
site_logo: string;
|
||||
};
|
||||
|
||||
type SmsAuthenticateConfig = {
|
||||
sms_enabled: boolean;
|
||||
sms_limit: number;
|
||||
sms_interval: number;
|
||||
sms_expire_time: number;
|
||||
};
|
||||
|
||||
type SmsConfig = {
|
||||
sms_enabled: boolean;
|
||||
sms_key: string;
|
||||
sms_secret: string;
|
||||
sms_template: string;
|
||||
sms_template_code: string;
|
||||
sms_template_param: string;
|
||||
sms_platform: string;
|
||||
sms_limit: number;
|
||||
sms_interval: number;
|
||||
sms_expire_time: number;
|
||||
};
|
||||
|
||||
type SortItem = {
|
||||
id: number;
|
||||
sort: number;
|
||||
@@ -556,6 +528,16 @@ declare namespace API {
|
||||
tos_content: string;
|
||||
};
|
||||
|
||||
type TrafficLog = {
|
||||
id: number;
|
||||
server_id: number;
|
||||
user_id: number;
|
||||
subscribe_id: number;
|
||||
download: number;
|
||||
upload: number;
|
||||
timestamp: number;
|
||||
};
|
||||
|
||||
type TransportConfig = {
|
||||
path: string;
|
||||
host: string;
|
||||
@@ -593,7 +575,8 @@ declare namespace API {
|
||||
enable_login_notify: boolean;
|
||||
enable_subscribe_notify: boolean;
|
||||
enable_trade_notify: boolean;
|
||||
auth_methods: AuthMethod[];
|
||||
auth_methods: UserAuthMethod[];
|
||||
user_devices: UserDevice[];
|
||||
created_at: number;
|
||||
updated_at: number;
|
||||
deleted_at?: number;
|
||||
@@ -607,6 +590,12 @@ declare namespace API {
|
||||
enable: boolean;
|
||||
};
|
||||
|
||||
type UserAuthMethod = {
|
||||
auth_type: string;
|
||||
auth_identifier: string;
|
||||
verified: boolean;
|
||||
};
|
||||
|
||||
type UserBalanceLog = {
|
||||
id: number;
|
||||
user_id: number;
|
||||
@@ -619,15 +608,24 @@ declare namespace API {
|
||||
|
||||
type UserDevice = {
|
||||
id: number;
|
||||
user_id: number;
|
||||
device_number: string;
|
||||
ip: string;
|
||||
imei: string;
|
||||
user_agent: string;
|
||||
online: boolean;
|
||||
last_online: number;
|
||||
enabled: boolean;
|
||||
created_at: number;
|
||||
updated_at: number;
|
||||
};
|
||||
|
||||
type UserLoginLog = {
|
||||
id: number;
|
||||
user_id: number;
|
||||
login_ip: string;
|
||||
user_agent: string;
|
||||
success: boolean;
|
||||
created_at: number;
|
||||
};
|
||||
|
||||
type UserLoginRequest = {
|
||||
email: string;
|
||||
password: string;
|
||||
@@ -660,6 +658,16 @@ declare namespace API {
|
||||
updated_at: number;
|
||||
};
|
||||
|
||||
type UserSubscribeLog = {
|
||||
id: number;
|
||||
user_id: number;
|
||||
user_subscribe_id: number;
|
||||
token: string;
|
||||
ip: string;
|
||||
user_agent: string;
|
||||
created_at: number;
|
||||
};
|
||||
|
||||
type VeifyConfig = {
|
||||
turnstile_site_key: string;
|
||||
enable_login_verify: boolean;
|
||||
|
||||
Vendored
+100
-66
@@ -58,15 +58,16 @@ declare namespace API {
|
||||
};
|
||||
|
||||
type AuthConfig = {
|
||||
sms: SmsAuthenticateConfig;
|
||||
sms: MobileAuthenticateConfig;
|
||||
email: EmailAuthticateConfig;
|
||||
register: RegisterConfig;
|
||||
};
|
||||
|
||||
type AuthMethod = {
|
||||
auth_type: string;
|
||||
auth_identifier: string;
|
||||
verified: boolean;
|
||||
type AuthMethodConfig = {
|
||||
id: number;
|
||||
method: string;
|
||||
config: Record<string, any>;
|
||||
enabled: boolean;
|
||||
};
|
||||
|
||||
type BindOAuthCallbackRequest = {
|
||||
@@ -155,26 +156,10 @@ declare namespace API {
|
||||
};
|
||||
|
||||
type EmailAuthticateConfig = {
|
||||
email_enabled: boolean;
|
||||
email_enable_verify: boolean;
|
||||
email_enable_domain_suffix: boolean;
|
||||
email_domain_suffix_list: string;
|
||||
};
|
||||
|
||||
type EmailSmtpConfig = {
|
||||
email_enabled: boolean;
|
||||
email_smtp_host: string;
|
||||
email_smtp_port: number;
|
||||
email_smtp_user: string;
|
||||
email_smtp_pass: string;
|
||||
email_smtp_from: string;
|
||||
email_smtp_ssl: boolean;
|
||||
verify_email_template: string;
|
||||
maintenance_email_template: string;
|
||||
expiration_email_template: string;
|
||||
email_enable_verify: boolean;
|
||||
email_enable_domain_suffix: boolean;
|
||||
email_domain_suffix_list: string;
|
||||
enable: boolean;
|
||||
enable_verify: boolean;
|
||||
enable_domain_suffix: boolean;
|
||||
domain_suffix_list: string;
|
||||
};
|
||||
|
||||
type Follow = {
|
||||
@@ -190,8 +175,38 @@ declare namespace API {
|
||||
list: PaymentConfig[];
|
||||
};
|
||||
|
||||
type GetLoginLogParams = {
|
||||
page: number;
|
||||
size: number;
|
||||
};
|
||||
|
||||
type GetLoginLogRequest = {
|
||||
page: number;
|
||||
size: number;
|
||||
};
|
||||
|
||||
type GetLoginLogResponse = {
|
||||
list: UserLoginLog[];
|
||||
total: number;
|
||||
};
|
||||
|
||||
type GetOAuthMethodsResponse = {
|
||||
methods: AuthMethod[];
|
||||
methods: UserAuthMethod[];
|
||||
};
|
||||
|
||||
type GetSubscribeLogParams = {
|
||||
page: number;
|
||||
size: number;
|
||||
};
|
||||
|
||||
type GetSubscribeLogRequest = {
|
||||
page: number;
|
||||
size: number;
|
||||
};
|
||||
|
||||
type GetSubscribeLogResponse = {
|
||||
list: UserSubscribeLog[];
|
||||
total: number;
|
||||
};
|
||||
|
||||
type GetUserTicketDetailRequest = {
|
||||
@@ -235,6 +250,13 @@ declare namespace API {
|
||||
only_first_purchase: boolean;
|
||||
};
|
||||
|
||||
type MobileAuthenticateConfig = {
|
||||
enable: boolean;
|
||||
limit: number;
|
||||
interval: number;
|
||||
expire_time: number;
|
||||
};
|
||||
|
||||
type NodeConfig = {
|
||||
node_secret: string;
|
||||
node_pull_interval: number;
|
||||
@@ -253,16 +275,6 @@ declare namespace API {
|
||||
last_at: number;
|
||||
};
|
||||
|
||||
type OAuthMethod = {
|
||||
id: number;
|
||||
platform: string;
|
||||
config: Record<string, any>;
|
||||
redirect: string;
|
||||
enabled: boolean;
|
||||
created_at: number;
|
||||
updated_at: number;
|
||||
};
|
||||
|
||||
type OnlineUser = {
|
||||
uid: number;
|
||||
ip: string;
|
||||
@@ -559,6 +571,16 @@ declare namespace API {
|
||||
updated_at: number;
|
||||
};
|
||||
|
||||
type ServerRuleGroup = {
|
||||
id: number;
|
||||
name: string;
|
||||
icon: string;
|
||||
description: string;
|
||||
enable: boolean;
|
||||
created_at: number;
|
||||
updated_at: number;
|
||||
};
|
||||
|
||||
type ServerStatus = {
|
||||
cpu: number;
|
||||
mem: number;
|
||||
@@ -579,26 +601,6 @@ declare namespace API {
|
||||
site_logo: string;
|
||||
};
|
||||
|
||||
type SmsAuthenticateConfig = {
|
||||
sms_enabled: boolean;
|
||||
sms_limit: number;
|
||||
sms_interval: number;
|
||||
sms_expire_time: number;
|
||||
};
|
||||
|
||||
type SmsConfig = {
|
||||
sms_enabled: boolean;
|
||||
sms_key: string;
|
||||
sms_secret: string;
|
||||
sms_template: string;
|
||||
sms_template_code: string;
|
||||
sms_template_param: string;
|
||||
sms_platform: string;
|
||||
sms_limit: number;
|
||||
sms_interval: number;
|
||||
sms_expire_time: number;
|
||||
};
|
||||
|
||||
type SortItem = {
|
||||
id: number;
|
||||
sort: number;
|
||||
@@ -689,6 +691,16 @@ declare namespace API {
|
||||
tos_content: string;
|
||||
};
|
||||
|
||||
type TrafficLog = {
|
||||
id: number;
|
||||
server_id: number;
|
||||
user_id: number;
|
||||
subscribe_id: number;
|
||||
download: number;
|
||||
upload: number;
|
||||
timestamp: number;
|
||||
};
|
||||
|
||||
type TransportConfig = {
|
||||
path: string;
|
||||
host: string;
|
||||
@@ -717,18 +729,14 @@ declare namespace API {
|
||||
};
|
||||
|
||||
type UpdateUserNotifyRequest = {
|
||||
enable_email_notify: boolean;
|
||||
enable_telegram_notify: boolean;
|
||||
enable_balance_notify: boolean;
|
||||
enable_login_notify: boolean;
|
||||
enable_subscribe_notify: boolean;
|
||||
enable_trade_notify: boolean;
|
||||
};
|
||||
|
||||
type UpdateUserNotifySettingRequet = {
|
||||
telegram: number;
|
||||
enable_email_notify: boolean;
|
||||
enable_telegram_notify: boolean;
|
||||
};
|
||||
|
||||
type UpdateUserPasswordRequest = {
|
||||
password: string;
|
||||
};
|
||||
@@ -756,7 +764,8 @@ declare namespace API {
|
||||
enable_login_notify: boolean;
|
||||
enable_subscribe_notify: boolean;
|
||||
enable_trade_notify: boolean;
|
||||
auth_methods: AuthMethod[];
|
||||
auth_methods: UserAuthMethod[];
|
||||
user_devices: UserDevice[];
|
||||
created_at: number;
|
||||
updated_at: number;
|
||||
deleted_at?: number;
|
||||
@@ -770,6 +779,12 @@ declare namespace API {
|
||||
enable: boolean;
|
||||
};
|
||||
|
||||
type UserAuthMethod = {
|
||||
auth_type: string;
|
||||
auth_identifier: string;
|
||||
verified: boolean;
|
||||
};
|
||||
|
||||
type UserBalanceLog = {
|
||||
id: number;
|
||||
user_id: number;
|
||||
@@ -782,15 +797,24 @@ declare namespace API {
|
||||
|
||||
type UserDevice = {
|
||||
id: number;
|
||||
user_id: number;
|
||||
device_number: string;
|
||||
ip: string;
|
||||
imei: string;
|
||||
user_agent: string;
|
||||
online: boolean;
|
||||
last_online: number;
|
||||
enabled: boolean;
|
||||
created_at: number;
|
||||
updated_at: number;
|
||||
};
|
||||
|
||||
type UserLoginLog = {
|
||||
id: number;
|
||||
user_id: number;
|
||||
login_ip: string;
|
||||
user_agent: string;
|
||||
success: boolean;
|
||||
created_at: number;
|
||||
};
|
||||
|
||||
type UserSubscribe = {
|
||||
id: number;
|
||||
user_id: number;
|
||||
@@ -809,6 +833,16 @@ declare namespace API {
|
||||
updated_at: number;
|
||||
};
|
||||
|
||||
type UserSubscribeLog = {
|
||||
id: number;
|
||||
user_id: number;
|
||||
user_subscribe_id: number;
|
||||
token: string;
|
||||
ip: string;
|
||||
user_agent: string;
|
||||
created_at: number;
|
||||
};
|
||||
|
||||
type VerifyConfig = {
|
||||
turnstile_site_key: string;
|
||||
turnstile_secret: string;
|
||||
|
||||
@@ -106,6 +106,21 @@ export async function queryUserInfo(options?: { [key: string]: any }) {
|
||||
});
|
||||
}
|
||||
|
||||
/** Get Login Log GET /v1/public/user/login_log */
|
||||
export async function getLoginLog(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.GetLoginLogParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: API.GetLoginLogResponse }>('/v1/public/user/login_log', {
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Update User Notify PUT /v1/public/user/notify */
|
||||
export async function updateUserNotify(
|
||||
body: API.UpdateUserNotifyRequest,
|
||||
@@ -121,21 +136,6 @@ export async function updateUserNotify(
|
||||
});
|
||||
}
|
||||
|
||||
/** Update User Notify Setting PUT /v1/public/user/notify_setting */
|
||||
export async function updateUserNotifySetting(
|
||||
body: API.UpdateUserNotifySettingRequet,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: any }>('/v1/public/user/notify_setting', {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Get OAuth Methods GET /v1/public/user/oauth_methods */
|
||||
export async function getOAuthMethods(options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: API.GetOAuthMethodsResponse }>(
|
||||
@@ -173,6 +173,24 @@ export async function queryUserSubscribe(options?: { [key: string]: any }) {
|
||||
);
|
||||
}
|
||||
|
||||
/** Get Subscribe Log GET /v1/public/user/subscribe_log */
|
||||
export async function getSubscribeLog(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.GetSubscribeLogParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: API.GetSubscribeLogResponse }>(
|
||||
'/v1/public/user/subscribe_log',
|
||||
{
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** Reset User Subscribe Token PUT /v1/public/user/subscribe_token */
|
||||
export async function resetUserSubscribeToken(
|
||||
body: API.ResetUserSubscribeTokenRequest,
|
||||
|
||||
Reference in New Issue
Block a user