mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-31 00:24:38 +00:00
Merge branch 'Wei-Shaw:main' into main
This commit is contained in:
@@ -1303,6 +1303,7 @@ export interface UsageLog {
|
||||
|
||||
// User-Agent
|
||||
user_agent: string | null
|
||||
ip_address?: string | null
|
||||
|
||||
// Cache TTL Override
|
||||
cache_ttl_overridden: boolean
|
||||
@@ -1336,9 +1337,6 @@ export interface AdminUsageLog extends UsageLog {
|
||||
channel_id?: number | null
|
||||
billing_tier?: string | null
|
||||
|
||||
// 用户请求 IP(仅管理员可见)
|
||||
ip_address?: string | null
|
||||
|
||||
// 最小账号信息(仅管理员接口返回)
|
||||
account?: UsageLogAccountSummary
|
||||
}
|
||||
@@ -1481,6 +1479,9 @@ export interface UsageStatsResponse {
|
||||
total_actual_cost: number // 实际扣除
|
||||
average_duration_ms: number
|
||||
models?: Record<string, number>
|
||||
endpoints?: EndpointStat[]
|
||||
upstream_endpoints?: EndpointStat[]
|
||||
endpoint_paths?: EndpointStat[]
|
||||
}
|
||||
|
||||
// ==================== Trend & Chart Types ====================
|
||||
@@ -1507,7 +1508,7 @@ export interface ModelStat {
|
||||
total_tokens: number
|
||||
cost: number // 标准计费
|
||||
actual_cost: number // 实际扣除
|
||||
account_cost: number // 账号成本
|
||||
account_cost?: number // 账号成本(仅管理员接口返回)
|
||||
}
|
||||
|
||||
export interface EndpointStat {
|
||||
@@ -1525,7 +1526,7 @@ export interface GroupStat {
|
||||
total_tokens: number
|
||||
cost: number // 标准计费
|
||||
actual_cost: number // 实际扣除
|
||||
account_cost: number // 账号成本
|
||||
account_cost?: number // 账号成本(仅管理员接口返回)
|
||||
}
|
||||
|
||||
export interface UserBreakdownItem {
|
||||
@@ -1700,8 +1701,10 @@ export interface UsageQueryParams {
|
||||
request_type?: UsageRequestType
|
||||
stream?: boolean
|
||||
billing_type?: number | null
|
||||
billing_mode?: string | null
|
||||
start_date?: string
|
||||
end_date?: string
|
||||
timezone?: string
|
||||
sort_by?: string
|
||||
sort_order?: 'asc' | 'desc'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user