feat(staff): StaffList 微信 5 数字改读本地 summary + 日期选择器(Phase A 接线)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
浅念
2026-08-07 18:42:19 +08:00
parent 628659b849
commit 876767cd68
3 changed files with 168 additions and 31 deletions
+24
View File
@@ -17,6 +17,7 @@ import type {
PhoneCall,
Sms,
Staff,
StaffChatStats,
SyncRun,
SyncState,
SyncStatus,
@@ -215,6 +216,28 @@ export function getSms(query: SmsQuery = {}): Promise<Page<Sms>> {
)
}
// ---------------------------------------------------------------------------
// Staff chat stats (微信员工 5 数字 + 客户明细,全本地 message 聚合)
// ---------------------------------------------------------------------------
export interface StaffChatStatsQuery {
owner_account_id: string
/** ms-epoch inclusive 窗口(默认近 3 天,由后端兜底)。 */
start?: number
end?: number
}
export function getStaffChatStats(query: StaffChatStatsQuery): Promise<StaffChatStats> {
return getJson<StaffChatStats>(
'/staff-chat-stats',
clean({
owner_account_id: query.owner_account_id,
start: query.start,
end: query.end,
}),
)
}
// ---------------------------------------------------------------------------
// Sync monitor
// ---------------------------------------------------------------------------
@@ -279,6 +302,7 @@ export type {
PhoneCall,
Sms,
Staff,
StaffChatStats,
SyncRun,
SyncState,
SyncStatus,