✨ feat(api): Add Time Period Configuration
This commit is contained in:
@@ -104,6 +104,17 @@ export async function updateEmailSmtpConfig(
|
||||
});
|
||||
}
|
||||
|
||||
/** 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 }>(
|
||||
'/v1/admin/system/get_node_multiplier',
|
||||
{
|
||||
method: 'GET',
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** Get invite config GET /v1/admin/system/invite_config */
|
||||
export async function getInviteConfig(options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: API.InviteConfig }>('/v1/admin/system/invite_config', {
|
||||
@@ -167,6 +178,21 @@ export async function updateRegisterConfig(
|
||||
});
|
||||
}
|
||||
|
||||
/** Set Node Multiplier POST /v1/admin/system/set_node_multiplier */
|
||||
export async function setNodeMultiplier(
|
||||
body: API.SetNodeMultiplierRequest,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: any }>('/v1/admin/system/set_node_multiplier', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** setting telegram bot POST /v1/admin/system/setting_telegram_bot */
|
||||
export async function settingTelegramBot(options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: any }>('/v1/admin/system/setting_telegram_bot', {
|
||||
|
||||
+14
@@ -375,6 +375,10 @@ declare namespace API {
|
||||
search?: string;
|
||||
};
|
||||
|
||||
type GetNodeMultiplierResponse = {
|
||||
periods: TimePeriod[];
|
||||
};
|
||||
|
||||
type GetNodeServerListRequest = {
|
||||
page: number;
|
||||
size: number;
|
||||
@@ -686,6 +690,10 @@ declare namespace API {
|
||||
download: number;
|
||||
};
|
||||
|
||||
type SetNodeMultiplierRequest = {
|
||||
periods: TimePeriod[];
|
||||
};
|
||||
|
||||
type Shadowsocks = {
|
||||
method: string;
|
||||
port: number;
|
||||
@@ -792,6 +800,12 @@ declare namespace API {
|
||||
count: number;
|
||||
};
|
||||
|
||||
type TimePeriod = {
|
||||
start_time: string;
|
||||
end_time: string;
|
||||
multiplier: number;
|
||||
};
|
||||
|
||||
type TosConfig = {
|
||||
tos_content: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user