feat(calls): 微信语音列表加今日统计卡片+通话时间范围筛选+客户跳转带通话时间定位(对齐云客)

- GET /api/calls/stats:今日(Asia/Shanghai)好友呼入/外呼量+群量+时长聚合(@chatroom判群)
- CallList:5张统计卡片(仅微信语音tab)+datetimerange筛选(服务端start/end)+viewCallCustomer带?start定位
- TDD新增stats聚合测试,全量绿

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
浅念
2026-08-20 11:08:13 +08:00
parent 6c9245a682
commit 4aeed003a4
6 changed files with 188 additions and 12 deletions
+5
View File
@@ -7,6 +7,7 @@ import { getJson, requestJson } from './client'
import type {
Account,
CallChannel,
CallStats,
Channel,
Customer,
Department,
@@ -185,6 +186,10 @@ export interface CallQuery {
page_size?: number
}
export function getCallStats(): Promise<CallStats> {
return getJson<CallStats>('/calls/stats')
}
export function getCalls(query: CallQuery = {}): Promise<Page<PhoneCall>> {
return getJson<Page<PhoneCall>>(
'/calls',
+10
View File
@@ -120,6 +120,16 @@ export interface GroupMember {
*/
export type CallChannel = 'phone_call' | 'voice_call' | 'wa_voice_call'
export interface CallStats {
/** 今日微信语音统计卡片(GET /api/calls/stats,时长单位秒)。 */
friend_incoming: number
friend_outgoing: number
group_count: number
friend_incoming_duration: number
friend_outgoing_duration: number
group_duration: number
}
export interface PhoneCall {
call_id: string
channel: CallChannel