feat(sync): full code sync from release
This commit is contained in:
@@ -369,6 +369,22 @@ export async function getTodayStats(id: number): Promise<WindowStats> {
|
||||
return data
|
||||
}
|
||||
|
||||
export interface BatchTodayStatsResponse {
|
||||
stats: Record<string, WindowStats>
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量获取多个账号的今日统计
|
||||
* @param accountIds - 账号 ID 列表
|
||||
* @returns 以账号 ID(字符串)为键的统计映射
|
||||
*/
|
||||
export async function getBatchTodayStats(accountIds: number[]): Promise<BatchTodayStatsResponse> {
|
||||
const { data } = await apiClient.post<BatchTodayStatsResponse>('/admin/accounts/today-stats/batch', {
|
||||
account_ids: accountIds
|
||||
})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* Set account schedulable status
|
||||
* @param id - Account ID
|
||||
@@ -556,6 +572,7 @@ export const accountsAPI = {
|
||||
clearError,
|
||||
getUsage,
|
||||
getTodayStats,
|
||||
getBatchTodayStats,
|
||||
clearRateLimit,
|
||||
getTempUnschedulableStatus,
|
||||
resetTempUnschedulable,
|
||||
|
||||
Reference in New Issue
Block a user