update dashboard store

This commit is contained in:
2026-03-20 14:19:32 +08:00
parent 4d89875105
commit e9ffb85aff
3 changed files with 378 additions and 0 deletions
+45
View File
@@ -208,6 +208,51 @@ export interface FailedMessageFilters {
failed_at_range: [string, string] | null
}
/** ─── Dashboard 统计 ─── */
export interface SuccessFailedCount {
success: number
failed: number
}
export interface DataTypeCount extends SuccessFailedCount {
data_type: string
}
export interface DashboardOverview {
today: SuccessFailedCount
this_week: SuccessFailedCount
this_month: SuccessFailedCount
by_type: DataTypeCount[]
}
export interface DashboardTrendPoint {
date: string
success: number
failed: number
}
export interface DashboardTrendParams {
from?: string
to?: string
group_by?: 'day' | 'week' | 'month'
data_type?: string
}
export interface DashboardBreakdownItem {
id: number
name: string
success: number
failed: number
}
export interface DashboardBreakdownParams {
dimension?: 'company' | 'platform' | 'store'
from?: string
to?: string
data_type?: string
}
/** 业务异常 */
export class ApiError extends Error {
code: number