✨ feat(user): Add user Detail
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
// @ts-ignore
|
||||
/* eslint-disable */
|
||||
import request from '@/utils/request';
|
||||
|
||||
/** Get auth method config GET /v1/admin/auth-method/config */
|
||||
export async function getAuthMethodConfig(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.GetAuthMethodConfigParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: API.AuthMethodConfig }>('/v1/admin/auth-method/config', {
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Update auth method config PUT /v1/admin/auth-method/config */
|
||||
export async function updateAuthMethodConfig(
|
||||
body: API.UpdataAuthMethodConfigRequest,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: API.AuthMethodConfig }>('/v1/admin/auth-method/config', {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Get email support platform GET /v1/admin/auth-method/email_platform */
|
||||
export async function getEmailPlatform(options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: API.PlatformResponse }>(
|
||||
'/v1/admin/auth-method/email_platform',
|
||||
{
|
||||
method: 'GET',
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** Get auth method list GET /v1/admin/auth-method/list */
|
||||
export async function getAuthMethodList(options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: API.GetAuthMethodListResponse }>(
|
||||
'/v1/admin/auth-method/list',
|
||||
{
|
||||
method: 'GET',
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** Get sms support platform GET /v1/admin/auth-method/sms_platform */
|
||||
export async function getSmsPlatform(options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: API.PlatformResponse }>(
|
||||
'/v1/admin/auth-method/sms_platform',
|
||||
{
|
||||
method: 'GET',
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** Test email send POST /v1/admin/auth-method/test_email_send */
|
||||
export async function testEmailSend(
|
||||
body: API.TestEmailSendRequest,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: any }>('/v1/admin/auth-method/test_email_send', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Test sms send POST /v1/admin/auth-method/test_sms_send */
|
||||
export async function testSmsSend(body: API.TestSmsSendRequest, options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: any }>('/v1/admin/auth-method/test_sms_send', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
// API 更新时间:
|
||||
// API 唯一标识:
|
||||
import * as announcement from './announcement';
|
||||
import * as authMethod from './authMethod';
|
||||
import * as console from './console';
|
||||
import * as coupon from './coupon';
|
||||
import * as document from './document';
|
||||
@@ -17,6 +18,7 @@ import * as tool from './tool';
|
||||
import * as user from './user';
|
||||
export default {
|
||||
announcement,
|
||||
authMethod,
|
||||
console,
|
||||
coupon,
|
||||
document,
|
||||
|
||||
@@ -154,6 +154,62 @@ export async function getNodeList(
|
||||
});
|
||||
}
|
||||
|
||||
/** Update rule group PUT /v1/admin/server/rule_group */
|
||||
export async function updateRuleGroup(
|
||||
body: API.UpdateRuleGroupRequest,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: any }>('/v1/admin/server/rule_group', {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Create rule group POST /v1/admin/server/rule_group */
|
||||
export async function createRuleGroup(
|
||||
body: API.CreateRuleGroupRequest,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: any }>('/v1/admin/server/rule_group', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Delete rule group DELETE /v1/admin/server/rule_group */
|
||||
export async function deleteRuleGroup(
|
||||
body: API.DeleteRuleGroupRequest,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: any }>('/v1/admin/server/rule_group', {
|
||||
method: 'DELETE',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Get rule group list GET /v1/admin/server/rule_group_list */
|
||||
export async function getRuleGroupList(options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: API.GetRuleGroupResponse }>(
|
||||
'/v1/admin/server/rule_group_list',
|
||||
{
|
||||
method: 'GET',
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** Node sort POST /v1/admin/server/sort */
|
||||
export async function nodeSort(body: API.NodeSortRequest, options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: any }>('/v1/admin/server/sort', {
|
||||
|
||||
@@ -152,29 +152,6 @@ export async function updateCurrencyConfig(
|
||||
});
|
||||
}
|
||||
|
||||
/** Get email smtp config GET /v1/admin/system/email_config */
|
||||
export async function getEmailSmtpConfig(options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: API.EmailSmtpConfig }>('/v1/admin/system/email_config', {
|
||||
method: 'GET',
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Update email smtp config PUT /v1/admin/system/email_config */
|
||||
export async function updateEmailSmtpConfig(
|
||||
body: API.EmailSmtpConfig,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: any }>('/v1/admin/system/email_config', {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Get Node Multiplier GET /v1/admin/system/get_node_multiplier */
|
||||
export async function getNodeMultiplier(options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: API.GetNodeMultiplierResponse }>(
|
||||
@@ -226,47 +203,6 @@ export async function updateNodeConfig(body: API.NodeConfig, options?: { [key: s
|
||||
});
|
||||
}
|
||||
|
||||
/** Get oauth config GET /v1/admin/system/oauth_config */
|
||||
export async function getOAuthConfig(options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: API.GetOAuthConfigResponse }>(
|
||||
'/v1/admin/system/oauth_config',
|
||||
{
|
||||
method: 'GET',
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** Update oauth config PUT /v1/admin/system/oauth_config */
|
||||
export async function updateOAuthConfig(
|
||||
body: API.UpdateOAuthConfig,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: any }>('/v1/admin/system/oauth_config', {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Get OAuth Config By Platform GET /v1/admin/system/oauth/platform */
|
||||
export async function getOAuthByPlatform(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.GetOAuthByPlatformParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: API.OAuthMethod }>('/v1/admin/system/oauth/platform', {
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Get register config GET /v1/admin/system/register_config */
|
||||
export async function getRegisterConfig(options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: API.RegisterConfig }>('/v1/admin/system/register_config', {
|
||||
@@ -333,37 +269,6 @@ export async function updateSiteConfig(body: API.SiteConfig, options?: { [key: s
|
||||
});
|
||||
}
|
||||
|
||||
/** Get sms config GET /v1/admin/system/sms_config */
|
||||
export async function getSmsConfig(options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: API.SmsConfig }>('/v1/admin/system/sms_config', {
|
||||
method: 'GET',
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Get sms config PUT /v1/admin/system/sms_config */
|
||||
export async function updateSmsConfig(body: API.SmsConfig, options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: any }>('/v1/admin/system/sms_config', {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Get sms config GET /v1/admin/system/sms_platform */
|
||||
export async function getSmsPlatform(options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: API.SmsPlatformResponse }>(
|
||||
'/v1/admin/system/sms_platform',
|
||||
{
|
||||
method: 'GET',
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** Get subscribe config GET /v1/admin/system/subscribe_config */
|
||||
export async function getSubscribeConfig(options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: API.SubscribeConfig }>(
|
||||
@@ -421,33 +326,6 @@ export async function updateTelegramConfig(
|
||||
});
|
||||
}
|
||||
|
||||
/** Test email smtp POST /v1/admin/system/test_email */
|
||||
export async function testEmailSmtp(
|
||||
body: API.TestEmailSmtpRequest,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: any }>('/v1/admin/system/test_email', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Test sms send POST /v1/admin/system/test_sms */
|
||||
export async function testSmsSend(body: API.SendSmsRequest, options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: any }>('/v1/admin/system/test_sms', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Get Team of Service Config GET /v1/admin/system/tos_config */
|
||||
export async function getTosConfig(options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: API.TosConfig }>('/v1/admin/system/tos_config', {
|
||||
|
||||
+258
-101
@@ -66,15 +66,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 BatchDeleteCouponRequest = {
|
||||
@@ -204,6 +205,13 @@ declare namespace API {
|
||||
subscribe_id?: number;
|
||||
};
|
||||
|
||||
type CreateRuleGroupRequest = {
|
||||
name: string;
|
||||
icon: string;
|
||||
description: string;
|
||||
enable: boolean;
|
||||
};
|
||||
|
||||
type CreateSubscribeGroupRequest = {
|
||||
name: string;
|
||||
description: string;
|
||||
@@ -260,6 +268,13 @@ declare namespace API {
|
||||
is_admin: boolean;
|
||||
};
|
||||
|
||||
type CreateUserSubscribeRequest = {
|
||||
user_id: number;
|
||||
expired_at: number;
|
||||
traffic: number;
|
||||
subscribe_id: number;
|
||||
};
|
||||
|
||||
type CurrencyConfig = {
|
||||
currency_unit: string;
|
||||
currency_symbol: string;
|
||||
@@ -293,6 +308,10 @@ declare namespace API {
|
||||
id: number;
|
||||
};
|
||||
|
||||
type DeleteRuleGroupRequest = {
|
||||
id: number;
|
||||
};
|
||||
|
||||
type DeleteSubscribeGroupRequest = {
|
||||
id: number;
|
||||
};
|
||||
@@ -301,6 +320,11 @@ declare namespace API {
|
||||
id: number;
|
||||
};
|
||||
|
||||
type DeleteUserAuthMethodRequest = {
|
||||
user_id: number;
|
||||
auth_type: string;
|
||||
};
|
||||
|
||||
type DeleteUserDeivceRequest = {
|
||||
id: number;
|
||||
};
|
||||
@@ -320,26 +344,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 EpayConfig = {
|
||||
@@ -392,6 +400,18 @@ declare namespace API {
|
||||
id: number;
|
||||
};
|
||||
|
||||
type GetAuthMethodConfigParams = {
|
||||
method: string;
|
||||
};
|
||||
|
||||
type GetAuthMethodConfigRequest = {
|
||||
method: string;
|
||||
};
|
||||
|
||||
type GetAuthMethodListResponse = {
|
||||
list: AuthMethodConfig[];
|
||||
};
|
||||
|
||||
type GetCouponListParams = {
|
||||
page: number;
|
||||
size: number;
|
||||
@@ -476,18 +496,6 @@ declare namespace API {
|
||||
list: Server[];
|
||||
};
|
||||
|
||||
type GetOAuthByPlatformParams = {
|
||||
platform: string;
|
||||
};
|
||||
|
||||
type GetOAuthByPlatformRequest = {
|
||||
platform: string;
|
||||
};
|
||||
|
||||
type GetOAuthConfigResponse = {
|
||||
list: OAuthMethod[];
|
||||
};
|
||||
|
||||
type GetOrderListParams = {
|
||||
page: number;
|
||||
size: number;
|
||||
@@ -511,6 +519,11 @@ declare namespace API {
|
||||
list: Order[];
|
||||
};
|
||||
|
||||
type GetRuleGroupResponse = {
|
||||
total: number;
|
||||
list: ServerRuleGroup[];
|
||||
};
|
||||
|
||||
type GetSmsListParams = {
|
||||
page: number;
|
||||
size: number;
|
||||
@@ -525,7 +538,7 @@ declare namespace API {
|
||||
|
||||
type GetSmsListResponse = {
|
||||
total: number;
|
||||
list: Sms[];
|
||||
list: SMS[];
|
||||
};
|
||||
|
||||
type GetSubscribeDetailsParams = {
|
||||
@@ -594,7 +607,7 @@ declare namespace API {
|
||||
};
|
||||
|
||||
type GetUserAuthMethodResponse = {
|
||||
auth_methods: AuthMethod[];
|
||||
auth_methods: UserAuthMethod[];
|
||||
};
|
||||
|
||||
type GetUserDetailParams = {
|
||||
@@ -618,6 +631,97 @@ declare namespace API {
|
||||
list: User[];
|
||||
};
|
||||
|
||||
type GetUserLoginLogsParams = {
|
||||
page: number;
|
||||
size: number;
|
||||
user_id: number;
|
||||
};
|
||||
|
||||
type GetUserLoginLogsRequest = {
|
||||
page: number;
|
||||
size: number;
|
||||
user_id: number;
|
||||
};
|
||||
|
||||
type GetUserLoginLogsResponse = {
|
||||
list: UserLoginLog[];
|
||||
total: number;
|
||||
};
|
||||
|
||||
type GetUserSubscribeDevicesParams = {
|
||||
page: number;
|
||||
size: number;
|
||||
user_id: number;
|
||||
subscribe_id: number;
|
||||
};
|
||||
|
||||
type GetUserSubscribeDevicesRequest = {
|
||||
page: number;
|
||||
size: number;
|
||||
user_id: number;
|
||||
subscribe_id: number;
|
||||
};
|
||||
|
||||
type GetUserSubscribeDevicesResponse = {
|
||||
list: UserDevice[];
|
||||
total: number;
|
||||
};
|
||||
|
||||
type GetUserSubscribeListRequest = {
|
||||
page: number;
|
||||
size: number;
|
||||
user_id: number;
|
||||
};
|
||||
|
||||
type GetUserSubscribeListResponse = {
|
||||
list: UserSubscribe[];
|
||||
total: number;
|
||||
};
|
||||
|
||||
type GetUserSubscribeLogsParams = {
|
||||
page: number;
|
||||
size: number;
|
||||
user_id: number;
|
||||
subscribe_id?: number;
|
||||
};
|
||||
|
||||
type GetUserSubscribeLogsRequest = {
|
||||
page: number;
|
||||
size: number;
|
||||
user_id: number;
|
||||
subscribe_id?: number;
|
||||
};
|
||||
|
||||
type GetUserSubscribeLogsResponse = {
|
||||
list: UserSubscribeLog[];
|
||||
total: number;
|
||||
};
|
||||
|
||||
type GetUserSubscribeParams = {
|
||||
page: number;
|
||||
size: number;
|
||||
user_id: number;
|
||||
};
|
||||
|
||||
type GetUserSubscribeTrafficLogsParams = {
|
||||
page: number;
|
||||
size: number;
|
||||
user_id: number;
|
||||
subscribe_id: number;
|
||||
};
|
||||
|
||||
type GetUserSubscribeTrafficLogsRequest = {
|
||||
page: number;
|
||||
size: number;
|
||||
user_id: number;
|
||||
subscribe_id: number;
|
||||
};
|
||||
|
||||
type GetUserSubscribeTrafficLogsResponse = {
|
||||
list: TrafficLog[];
|
||||
total: number;
|
||||
};
|
||||
|
||||
type Hysteria2 = {
|
||||
port: number;
|
||||
hop_ports: string;
|
||||
@@ -632,10 +736,21 @@ declare namespace API {
|
||||
only_first_purchase: boolean;
|
||||
};
|
||||
|
||||
type KickOfflineRequest = {
|
||||
id: number;
|
||||
};
|
||||
|
||||
type LogResponse = {
|
||||
list: Record<string, any>;
|
||||
};
|
||||
|
||||
type MobileAuthenticateConfig = {
|
||||
enable: boolean;
|
||||
limit: number;
|
||||
interval: number;
|
||||
expire_time: number;
|
||||
};
|
||||
|
||||
type NodeConfig = {
|
||||
node_secret: string;
|
||||
node_pull_interval: number;
|
||||
@@ -658,16 +773,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;
|
||||
@@ -739,6 +844,16 @@ declare namespace API {
|
||||
enable: boolean;
|
||||
};
|
||||
|
||||
type PlatformInfo = {
|
||||
platform: string;
|
||||
platform_url: string;
|
||||
platform_field_description: Record<string, any>;
|
||||
};
|
||||
|
||||
type PlatformResponse = {
|
||||
list: PlatformInfo[];
|
||||
};
|
||||
|
||||
type RegisterConfig = {
|
||||
stop_register: boolean;
|
||||
enable_trial: boolean;
|
||||
@@ -773,12 +888,6 @@ declare namespace API {
|
||||
reality_short_id: string;
|
||||
};
|
||||
|
||||
type SendSmsRequest = {
|
||||
content: string;
|
||||
area_code: string;
|
||||
telephone: string;
|
||||
};
|
||||
|
||||
type Server = {
|
||||
id: number;
|
||||
tags: string[];
|
||||
@@ -808,6 +917,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;
|
||||
@@ -854,7 +973,7 @@ declare namespace API {
|
||||
site_logo: string;
|
||||
};
|
||||
|
||||
type Sms = {
|
||||
type SMS = {
|
||||
id: string;
|
||||
content: string;
|
||||
platform: string;
|
||||
@@ -864,36 +983,6 @@ declare namespace API {
|
||||
created_at: number;
|
||||
};
|
||||
|
||||
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 SmsPlatformInfo = {
|
||||
platform: string;
|
||||
platform_url: string;
|
||||
platform_field_description: Record<string, any>;
|
||||
};
|
||||
|
||||
type SmsPlatformResponse = {
|
||||
list: SmsPlatformInfo[];
|
||||
};
|
||||
|
||||
type SortItem = {
|
||||
id: number;
|
||||
sort: number;
|
||||
@@ -996,10 +1085,15 @@ declare namespace API {
|
||||
telegram_web_hook_domain: string;
|
||||
};
|
||||
|
||||
type TestEmailSmtpRequest = {
|
||||
type TestEmailSendRequest = {
|
||||
email: string;
|
||||
};
|
||||
|
||||
type TestSmsSendRequest = {
|
||||
area_code: string;
|
||||
telephone: string;
|
||||
};
|
||||
|
||||
type Ticket = {
|
||||
id: number;
|
||||
title: string;
|
||||
@@ -1025,6 +1119,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;
|
||||
@@ -1044,6 +1148,13 @@ declare namespace API {
|
||||
security_config: SecurityConfig;
|
||||
};
|
||||
|
||||
type UpdataAuthMethodConfigRequest = {
|
||||
id: number;
|
||||
method: string;
|
||||
config: Record<string, any>;
|
||||
enabled: boolean;
|
||||
};
|
||||
|
||||
type UpdateAlipayF2fRequest = {
|
||||
id: number;
|
||||
name: string;
|
||||
@@ -1150,14 +1261,6 @@ declare namespace API {
|
||||
sort: number;
|
||||
};
|
||||
|
||||
type UpdateOAuthConfig = {
|
||||
id: number;
|
||||
platform: string;
|
||||
config: Record<string, any>;
|
||||
redirect: string;
|
||||
enabled: boolean;
|
||||
};
|
||||
|
||||
type UpdateOrderStatusRequest = {
|
||||
id: number;
|
||||
status: number;
|
||||
@@ -1165,6 +1268,14 @@ declare namespace API {
|
||||
trade_no?: string;
|
||||
};
|
||||
|
||||
type UpdateRuleGroupRequest = {
|
||||
id: number;
|
||||
name: string;
|
||||
icon: string;
|
||||
description: string;
|
||||
enable: boolean;
|
||||
};
|
||||
|
||||
type UpdateStripeRequest = {
|
||||
id: number;
|
||||
name: string;
|
||||
@@ -1214,8 +1325,14 @@ declare namespace API {
|
||||
status: number;
|
||||
};
|
||||
|
||||
type UpdateUserRequest = {
|
||||
id: number;
|
||||
type UpdateUserAuthMethodRequest = {
|
||||
user_id: number;
|
||||
auth_type: string;
|
||||
auth_identifier: string;
|
||||
};
|
||||
|
||||
type UpdateUserBasiceInfoRequest = {
|
||||
user_id: number;
|
||||
password: string;
|
||||
avatar: string;
|
||||
balance: number;
|
||||
@@ -1226,6 +1343,10 @@ declare namespace API {
|
||||
referer_id: number;
|
||||
enable: boolean;
|
||||
is_admin: boolean;
|
||||
};
|
||||
|
||||
type UpdateUserNotifySettingRequest = {
|
||||
user_id: number;
|
||||
enable_email_notify: boolean;
|
||||
enable_telegram_notify: boolean;
|
||||
enable_balance_notify: boolean;
|
||||
@@ -1234,6 +1355,16 @@ declare namespace API {
|
||||
enable_trade_notify: boolean;
|
||||
};
|
||||
|
||||
type UpdateUserSubscribeRequest = {
|
||||
user_subscribe_id: number;
|
||||
subscribe_id: number;
|
||||
traffic: number;
|
||||
expired_at: number;
|
||||
upload: number;
|
||||
download: number;
|
||||
status: number;
|
||||
};
|
||||
|
||||
type User = {
|
||||
id: number;
|
||||
avatar: string;
|
||||
@@ -1252,7 +1383,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;
|
||||
@@ -1266,6 +1398,12 @@ declare namespace API {
|
||||
enable: boolean;
|
||||
};
|
||||
|
||||
type UserAuthMethod = {
|
||||
auth_type: string;
|
||||
auth_identifier: string;
|
||||
verified: boolean;
|
||||
};
|
||||
|
||||
type UserBalanceLog = {
|
||||
id: number;
|
||||
user_id: number;
|
||||
@@ -1278,15 +1416,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 UserStatistics = {
|
||||
date?: string;
|
||||
register: number;
|
||||
@@ -1319,6 +1466,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 UserTrafficData = {
|
||||
user_id: number;
|
||||
email: string;
|
||||
|
||||
@@ -2,18 +2,6 @@
|
||||
/* eslint-disable */
|
||||
import request from '@/utils/request';
|
||||
|
||||
/** Update user PUT /v1/admin/user/ */
|
||||
export async function updateUser(body: API.UpdateUserRequest, options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: any }>('/v1/admin/user/', {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Create user POST /v1/admin/user/ */
|
||||
export async function createUser(body: API.CreateUserRequest, options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: any }>('/v1/admin/user/', {
|
||||
@@ -52,6 +40,21 @@ export async function getUserAuthMethod(options?: { [key: string]: any }) {
|
||||
);
|
||||
}
|
||||
|
||||
/** Update user auth method PUT /v1/admin/user/auth_method */
|
||||
export async function updateUserAuthMethod(
|
||||
body: API.UpdateUserAuthMethodRequest,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: any }>('/v1/admin/user/auth_method', {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Create user auth method POST /v1/admin/user/auth_method */
|
||||
export async function createUserAuthMethod(
|
||||
body: API.CreateUserAuthMethodRequest,
|
||||
@@ -67,6 +70,36 @@ export async function createUserAuthMethod(
|
||||
});
|
||||
}
|
||||
|
||||
/** Delete user auth method DELETE /v1/admin/user/auth_method */
|
||||
export async function deleteUserAuthMethod(
|
||||
body: API.DeleteUserAuthMethodRequest,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: any }>('/v1/admin/user/auth_method', {
|
||||
method: 'DELETE',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Update user basic info PUT /v1/admin/user/basic */
|
||||
export async function updateUserBasicInfo(
|
||||
body: API.UpdateUserBasiceInfoRequest,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: any }>('/v1/admin/user/basic', {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Batch delete user DELETE /v1/admin/user/batch */
|
||||
export async function batchDeleteUser(
|
||||
body: API.BatchDeleteUserRequest,
|
||||
@@ -106,7 +139,7 @@ export async function getUserDetail(
|
||||
}
|
||||
|
||||
/** User device PUT /v1/admin/user/device */
|
||||
export async function updaeUserDevice(body: API.UserDevice, options?: { [key: string]: any }) {
|
||||
export async function updateUserDevice(body: API.UserDevice, options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: any }>('/v1/admin/user/device', {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
@@ -132,6 +165,21 @@ export async function deleteUserDevice(
|
||||
});
|
||||
}
|
||||
|
||||
/** kick offline user device PUT /v1/admin/user/device/kick_offline */
|
||||
export async function kickOfflineByUserDevice(
|
||||
body: API.KickOfflineRequest,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: any }>('/v1/admin/user/device/kick_offline', {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Get user list GET /v1/admin/user/list */
|
||||
export async function getUserList(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
@@ -146,3 +194,138 @@ export async function getUserList(
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Get user login logs GET /v1/admin/user/login/logs */
|
||||
export async function getUserLoginLogs(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.GetUserLoginLogsParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: API.GetUserLoginLogsResponse }>(
|
||||
'/v1/admin/user/login/logs',
|
||||
{
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** Update user notify setting PUT /v1/admin/user/notify */
|
||||
export async function updateUserNotifySetting(
|
||||
body: API.UpdateUserNotifySettingRequest,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: any }>('/v1/admin/user/notify', {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Get user subcribe GET /v1/admin/user/subscribe */
|
||||
export async function getUserSubscribe(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.GetUserSubscribeParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: API.GetUserSubscribeListResponse }>(
|
||||
'/v1/admin/user/subscribe',
|
||||
{
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** Update user subcribe PUT /v1/admin/user/subscribe */
|
||||
export async function updateUserSubscribe(
|
||||
body: API.UpdateUserSubscribeRequest,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: any }>('/v1/admin/user/subscribe', {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Create user subcribe POST /v1/admin/user/subscribe */
|
||||
export async function createUserSubscribe(
|
||||
body: API.CreateUserSubscribeRequest,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: any }>('/v1/admin/user/subscribe', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Get user subcribe devices GET /v1/admin/user/subscribe/device */
|
||||
export async function getUserSubscribeDevices(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.GetUserSubscribeDevicesParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: API.GetUserSubscribeDevicesResponse }>(
|
||||
'/v1/admin/user/subscribe/device',
|
||||
{
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** Get user subcribe logs GET /v1/admin/user/subscribe/logs */
|
||||
export async function getUserSubscribeLogs(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.GetUserSubscribeLogsParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: API.GetUserSubscribeLogsResponse }>(
|
||||
'/v1/admin/user/subscribe/logs',
|
||||
{
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** Get user subcribe traffic logs GET /v1/admin/user/subscribe/traffic_logs */
|
||||
export async function getUserSubscribeTrafficLogs(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.GetUserSubscribeTrafficLogsParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: API.GetUserSubscribeTrafficLogsResponse }>(
|
||||
'/v1/admin/user/subscribe/traffic_logs',
|
||||
{
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(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;
|
||||
|
||||
Reference in New Issue
Block a user