feat: 完善定时日报

This commit is contained in:
Wxw-Gu committed 2026-08-27 19:03:07 +08:00
1 parent 949e6bc868
commit 7cf043e3c3
13 files changed
+1866 -109

No files matched your search

+30 -2
View File
@@ -1,4 +1,15 @@
export type ScheduledReportRange = 'yesterday' | 'recent24h'
import type { SelectableReportTemplateId } from './report-templates'
export type ScheduledReportRange = 'today' | 'yesterday' | '7days' | 'recent24h'
export type ScheduledReportMessageType =
| 'text'
| 'image'
| 'sticker'
| 'video'
| 'voice'
| 'share'
| 'system'
export type ScheduledReportMemberNameMode = 'groupNickname' | 'wechatNickname' | 'remark'
export type ScheduledReportExecutionStatus = 'running' | 'success' | 'failed'
export interface ScheduledReportTask {
@@ -8,6 +19,10 @@ export interface ScheduledReportTask {
group: string
scheduleTime: string
reportRange: ScheduledReportRange
messageTypes?: ScheduledReportMessageType[]
templateId?: SelectableReportTemplateId
memberNameMode?: ScheduledReportMemberNameMode
timeoutSeconds?: number
/** Current implementation targets one specified WeChat group. */
target: string
enabled: boolean
@@ -35,6 +50,10 @@ export interface ScheduledReportCreateInput {
group: string
scheduleTime: string
reportRange?: ScheduledReportRange
messageTypes?: ScheduledReportMessageType[]
templateId?: SelectableReportTemplateId
memberNameMode?: ScheduledReportMemberNameMode
timeoutSeconds?: number
target?: string
enabled?: boolean
}
@@ -42,7 +61,16 @@ export interface ScheduledReportCreateInput {
export type ScheduledReportUpdateInput = Partial<
Pick<
ScheduledReportCreateInput,
'name' | 'group' | 'scheduleTime' | 'reportRange' | 'target' | 'enabled'
| 'name'
| 'group'
| 'scheduleTime'
| 'reportRange'
| 'messageTypes'
| 'templateId'
| 'memberNameMode'
| 'timeoutSeconds'
| 'target'
| 'enabled'
>
>