feat: 新增定时日报与微信发送能力底座

This commit is contained in:
Wxw-Gu committed 2026-08-27 17:08:09 +08:00
1 parent 62abd872ee
commit 949e6bc868
11 files changed
+786 -2

No files matched your search

+23
View File
@@ -44,6 +44,29 @@ export interface PersonalWechatSenderStatus {
error?: string
}
/** Stable, feature-facing send capability derived from the low-level sender status. */
export type PersonalWechatSendCapabilityState =
| 'unsupported'
| 'unconfigured'
| 'needs_binding'
| 'needs_verification'
| 'ready'
| 'error'
export interface PersonalWechatSendCapability {
supported: boolean
ready: boolean
status: PersonalWechatSendCapabilityState
capabilities: {
text: boolean
image: boolean
voice: boolean
}
senderStatus: PersonalWechatSenderStatus
message: string
error?: string
}
interface PersonalWechatSendBaseRequest {
to: string
isGroup: boolean
+53
View File
@@ -0,0 +1,53 @@
export type ScheduledReportRange = 'yesterday' | 'recent24h'
export type ScheduledReportExecutionStatus = 'running' | 'success' | 'failed'
export interface ScheduledReportTask {
id: string
name: string
/** Human-readable group name or WeChat room id. */
group: string
scheduleTime: string
reportRange: ScheduledReportRange
/** Current implementation targets one specified WeChat group. */
target: string
enabled: boolean
createdAt: string
updatedAt: string
lastRunAt?: string
nextRunAt: string
/** Internal idempotency marker for a daily scheduled slot. */
lastScheduledSlot?: string
}
export interface ScheduledReportExecution {
id: string
taskId: string
startedAt: string
finishedAt?: string
status: ScheduledReportExecutionStatus
error?: string
message?: string
scheduledSlot?: string
}
export interface ScheduledReportCreateInput {
name: string
group: string
scheduleTime: string
reportRange?: ScheduledReportRange
target?: string
enabled?: boolean
}
export type ScheduledReportUpdateInput = Partial<
Pick<
ScheduledReportCreateInput,
'name' | 'group' | 'scheduleTime' | 'reportRange' | 'target' | 'enabled'
>
>
export interface ScheduledReportResult<T> {
success: boolean
data?: T
error?: string
}