mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-12-01 01:05:30 +08:00
feat: 定时日报并入自动化,统一规则管理与发送链路
发送目标与退群通知统一为 来源群 / 自己 / 文件传输助手 / 指定好友 日报页补「定时日报已并入自动化」指引条
This commit is contained in:
1 parent
c835d5c570
commit
4d5c6459fe
49 files changed
+6436
-4863
No files matched your search
Vendored
+17
-29
@@ -84,13 +84,12 @@ import type {
|
||||
import type { PersonalWechatSendCapability } from '../shared/personal-wechat'
|
||||
import type { GroupMemberStatsQuery, GroupMemberStatsResult } from '../shared/group-stats'
|
||||
import type {
|
||||
ScheduledReportCreateInput,
|
||||
ScheduledReportExecution,
|
||||
ScheduledReportNotification,
|
||||
ScheduledReportNotificationCapability,
|
||||
ScheduledReportNotificationSettings,
|
||||
ScheduledReportNotificationSettingsResult,
|
||||
ScheduledReportResult,
|
||||
ScheduledReportTask,
|
||||
ScheduledReportUpdateInput
|
||||
ScheduledReportResult
|
||||
} from '../shared/scheduled-report'
|
||||
import type {
|
||||
PersonalWechatVoiceEncodingEnvironment,
|
||||
@@ -102,7 +101,8 @@ import type {
|
||||
AutomationExecution,
|
||||
AutomationRule,
|
||||
AutomationRuleDraft,
|
||||
AutomationStatusSummary
|
||||
AutomationStatusSummary,
|
||||
ScheduledRuleRunOutcome
|
||||
} from '../shared/automation'
|
||||
import type { ActionLogEntry } from '../shared/action-log'
|
||||
import type {
|
||||
@@ -733,35 +733,23 @@ declare global {
|
||||
sendPersonalWechatMessage: (
|
||||
request: PersonalWechatSendRequest
|
||||
) => Promise<PersonalWechatSendResult>
|
||||
listScheduledReports: () => Promise<ScheduledReportTask[]>
|
||||
listScheduledReportExecutions: (taskId?: string) => Promise<ScheduledReportExecution[]>
|
||||
/** 定时日报:「立即执行」——与 scheduler 走同一条执行链路(manual trigger)。 */
|
||||
runScheduledReportRule: (
|
||||
ruleId: string
|
||||
) => Promise<{ success: boolean; error?: string; data?: ScheduledRuleRunOutcome }>
|
||||
/** 定时日报:旧执行记录**只读存档**(旧记录无法无损转换,原样展示)。 */
|
||||
listScheduledReportLegacyExecutions: (
|
||||
ruleId?: string
|
||||
) => Promise<ScheduledReportExecution[]>
|
||||
/** 定时日报:微信异常通知开关与能力检测。 */
|
||||
getScheduledReportNotificationSettings: () => Promise<ScheduledReportNotificationSettings>
|
||||
getScheduledReportNotificationCapability: () => Promise<ScheduledReportNotificationCapability>
|
||||
setScheduledReportNotificationEnabled: (
|
||||
enabled: boolean
|
||||
) => Promise<ScheduledReportNotificationSettingsResult>
|
||||
createScheduledReport: (
|
||||
request: ScheduledReportCreateInput
|
||||
) => Promise<ScheduledReportResult<ScheduledReportTask>>
|
||||
updateScheduledReport: (
|
||||
taskId: string,
|
||||
request: ScheduledReportUpdateInput
|
||||
) => Promise<ScheduledReportResult<ScheduledReportTask>>
|
||||
deleteScheduledReport: (
|
||||
taskId: string
|
||||
) => Promise<ScheduledReportResult<{ deletedId: string }>>
|
||||
setScheduledReportEnabled: (
|
||||
taskId: string,
|
||||
enabled: boolean
|
||||
) => Promise<ScheduledReportResult<ScheduledReportTask>>
|
||||
runScheduledReportNow: (
|
||||
taskId: string
|
||||
) => Promise<ScheduledReportResult<ScheduledReportExecution>>
|
||||
retryScheduledReportSend: (
|
||||
executionId: string
|
||||
) => Promise<ScheduledReportResult<ScheduledReportExecution>>
|
||||
testScheduledReportErrorNotification: (
|
||||
taskId: string
|
||||
) => Promise<ScheduledReportResult<ScheduledReportExecution>>
|
||||
ruleId: string
|
||||
) => Promise<ScheduledReportResult<ScheduledReportNotification>>
|
||||
getPersonalWechatVoiceDiagnostic: () => Promise<PersonalWechatVoiceDiagnostic | null>
|
||||
getAgentHubStatus: () => Promise<AgentHubStatus>
|
||||
getAgentHubLogs: () => Promise<AgentHubLogEntry[]>
|
||||
|
||||
+24
-38
@@ -52,13 +52,12 @@ import type {
|
||||
} from '../shared/personal-wechat'
|
||||
import type { PersonalWechatSendCapability } from '../shared/personal-wechat'
|
||||
import type {
|
||||
ScheduledReportCreateInput,
|
||||
ScheduledReportExecution,
|
||||
ScheduledReportNotification,
|
||||
ScheduledReportNotificationCapability,
|
||||
ScheduledReportNotificationSettings,
|
||||
ScheduledReportNotificationSettingsResult,
|
||||
ScheduledReportResult,
|
||||
ScheduledReportTask,
|
||||
ScheduledReportUpdateInput
|
||||
ScheduledReportResult
|
||||
} from '../shared/scheduled-report'
|
||||
import type {
|
||||
PersonalWechatVoiceEncodingEnvironment,
|
||||
@@ -71,7 +70,8 @@ import type {
|
||||
AutomationExecution,
|
||||
AutomationRule,
|
||||
AutomationRuleDraft,
|
||||
AutomationStatusSummary
|
||||
AutomationStatusSummary,
|
||||
ScheduledRuleRunOutcome
|
||||
} from '../shared/automation'
|
||||
import type { GroupMemberStatsQuery, GroupMemberStatsResult } from '../shared/group-stats'
|
||||
import type { ActionLogEntry } from '../shared/action-log'
|
||||
@@ -572,44 +572,30 @@ const api = {
|
||||
sendPersonalWechatMessage: (
|
||||
request: PersonalWechatSendRequest
|
||||
): Promise<PersonalWechatSendResult> => ipcRenderer.invoke('wechat-personal:send', request),
|
||||
listScheduledReports: (): Promise<ScheduledReportTask[]> =>
|
||||
ipcRenderer.invoke('scheduled-report:list'),
|
||||
listScheduledReportExecutions: (taskId?: string): Promise<ScheduledReportExecution[]> =>
|
||||
ipcRenderer.invoke('scheduled-report:listExecutions', taskId),
|
||||
/**
|
||||
* 定时日报(Automation 的 `scheduled_report` 规则类型)。
|
||||
*
|
||||
* 规则 CRUD 复用上面的 `automation:*` 通道;这里只暴露三块专属能力:
|
||||
* 立即执行、微信异常通知、旧执行记录只读存档。
|
||||
*/
|
||||
runScheduledReportRule: (
|
||||
ruleId: string
|
||||
): Promise<{ success: boolean; error?: string; data?: ScheduledRuleRunOutcome }> =>
|
||||
ipcRenderer.invoke('automation:runScheduledReportRule', ruleId),
|
||||
listScheduledReportLegacyExecutions: (ruleId?: string): Promise<ScheduledReportExecution[]> =>
|
||||
ipcRenderer.invoke('automation:listScheduledReportLegacyExecutions', ruleId),
|
||||
getScheduledReportNotificationSettings: (): Promise<ScheduledReportNotificationSettings> =>
|
||||
ipcRenderer.invoke('scheduled-report:getNotificationSettings'),
|
||||
ipcRenderer.invoke('automation:getScheduledReportNotificationSettings'),
|
||||
getScheduledReportNotificationCapability: (): Promise<ScheduledReportNotificationCapability> =>
|
||||
ipcRenderer.invoke('automation:getScheduledReportNotificationCapability'),
|
||||
setScheduledReportNotificationEnabled: (
|
||||
enabled: boolean
|
||||
): Promise<ScheduledReportNotificationSettingsResult> =>
|
||||
ipcRenderer.invoke('scheduled-report:setNotificationEnabled', enabled),
|
||||
createScheduledReport: (
|
||||
request: ScheduledReportCreateInput
|
||||
): Promise<ScheduledReportResult<ScheduledReportTask>> =>
|
||||
ipcRenderer.invoke('scheduled-report:create', request),
|
||||
updateScheduledReport: (
|
||||
taskId: string,
|
||||
request: ScheduledReportUpdateInput
|
||||
): Promise<ScheduledReportResult<ScheduledReportTask>> =>
|
||||
ipcRenderer.invoke('scheduled-report:update', taskId, request),
|
||||
deleteScheduledReport: (taskId: string): Promise<ScheduledReportResult<{ deletedId: string }>> =>
|
||||
ipcRenderer.invoke('scheduled-report:delete', taskId),
|
||||
setScheduledReportEnabled: (
|
||||
taskId: string,
|
||||
enabled: boolean
|
||||
): Promise<ScheduledReportResult<ScheduledReportTask>> =>
|
||||
ipcRenderer.invoke('scheduled-report:setEnabled', taskId, enabled),
|
||||
runScheduledReportNow: (
|
||||
taskId: string
|
||||
): Promise<ScheduledReportResult<ScheduledReportExecution>> =>
|
||||
ipcRenderer.invoke('scheduled-report:runNow', taskId),
|
||||
retryScheduledReportSend: (
|
||||
executionId: string
|
||||
): Promise<ScheduledReportResult<ScheduledReportExecution>> =>
|
||||
ipcRenderer.invoke('scheduled-report:retrySend', executionId),
|
||||
ipcRenderer.invoke('automation:setScheduledReportNotificationEnabled', enabled),
|
||||
testScheduledReportErrorNotification: (
|
||||
taskId: string
|
||||
): Promise<ScheduledReportResult<ScheduledReportExecution>> =>
|
||||
ipcRenderer.invoke('scheduled-report:testErrorNotification', taskId),
|
||||
ruleId: string
|
||||
): Promise<ScheduledReportResult<ScheduledReportNotification>> =>
|
||||
ipcRenderer.invoke('automation:testScheduledReportErrorNotification', ruleId),
|
||||
getPersonalWechatVoiceDiagnostic: (): Promise<PersonalWechatVoiceDiagnostic | null> =>
|
||||
ipcRenderer.invoke('wechat-personal:getVoiceDiagnostic'),
|
||||
getAgentHubStatus: () => ipcRenderer.invoke('agent-hub:getStatus'),
|
||||
|
||||
Reference in new issue
Block a user