mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-04-13 07:25:53 +00:00
支持自动化条件导出;优化引导页面提示;支持快速添加账号
This commit is contained in:
4
src/types/electron.d.ts
vendored
4
src/types/electron.d.ts
vendored
@@ -18,7 +18,7 @@ export interface ElectronAPI {
|
||||
respondCloseConfirm: (action: 'tray' | 'quit' | 'cancel') => Promise<boolean>
|
||||
openAgreementWindow: () => Promise<boolean>
|
||||
completeOnboarding: () => Promise<boolean>
|
||||
openOnboardingWindow: () => Promise<boolean>
|
||||
openOnboardingWindow: (options?: { mode?: 'add-account' }) => Promise<boolean>
|
||||
setTitleBarOverlay: (options: { symbolColor: string }) => void
|
||||
openVideoPlayerWindow: (videoPath: string, videoWidth?: number, videoHeight?: number) => Promise<void>
|
||||
resizeToFitVideo: (videoWidth: number, videoHeight: number) => Promise<void>
|
||||
@@ -146,7 +146,7 @@ export interface ElectronAPI {
|
||||
}
|
||||
key: {
|
||||
autoGetDbKey: () => Promise<{ success: boolean; key?: string; error?: string; logs?: string[] }>
|
||||
autoGetImageKey: (manualDir?: string, wxid?: string) => Promise<{ success: boolean; xorKey?: number; aesKey?: string; error?: string }>
|
||||
autoGetImageKey: (manualDir?: string, wxid?: string) => Promise<{ success: boolean; xorKey?: number; aesKey?: string; verified?: boolean; error?: string }>
|
||||
scanImageKeyFromMemory: (userDir: string) => Promise<{ success: boolean; xorKey?: number; aesKey?: string; error?: string }>
|
||||
onDbKeyStatus: (callback: (payload: { message: string; level: number }) => void) => () => void
|
||||
onImageKeyStatus: (callback: (payload: { message: string }) => void) => () => void
|
||||
|
||||
68
src/types/exportAutomation.ts
Normal file
68
src/types/exportAutomation.ts
Normal file
@@ -0,0 +1,68 @@
|
||||
import type { ExportOptions as ElectronExportOptions } from './electron'
|
||||
|
||||
export type ExportAutomationScope = 'single' | 'multi' | 'content'
|
||||
export type ExportAutomationContentType = 'text' | 'voice' | 'image' | 'video' | 'emoji' | 'file'
|
||||
|
||||
export type ExportAutomationSchedule =
|
||||
| {
|
||||
type: 'interval'
|
||||
intervalDays: number
|
||||
intervalHours: number
|
||||
}
|
||||
|
||||
export interface ExportAutomationCondition {
|
||||
type: 'new-message-since-last-success'
|
||||
}
|
||||
|
||||
export interface ExportAutomationDateRangeConfig {
|
||||
version?: 1
|
||||
preset?: string
|
||||
useAllTime?: boolean
|
||||
start?: string | number | Date | null
|
||||
end?: string | number | Date | null
|
||||
relativeMode?: 'last-n-days' | string
|
||||
relativeDays?: number
|
||||
}
|
||||
|
||||
export interface ExportAutomationTemplate {
|
||||
scope: ExportAutomationScope
|
||||
contentType?: ExportAutomationContentType
|
||||
optionTemplate: Omit<ElectronExportOptions, 'dateRange'>
|
||||
dateRangeConfig: ExportAutomationDateRangeConfig | string | null
|
||||
}
|
||||
|
||||
export interface ExportAutomationStopCondition {
|
||||
endAt?: number
|
||||
maxRuns?: number
|
||||
}
|
||||
|
||||
export type ExportAutomationRunStatus = 'idle' | 'queued' | 'running' | 'success' | 'error' | 'skipped'
|
||||
|
||||
export interface ExportAutomationRunState {
|
||||
lastRunStatus?: ExportAutomationRunStatus
|
||||
lastTriggeredAt?: number
|
||||
lastStartedAt?: number
|
||||
lastFinishedAt?: number
|
||||
lastSuccessAt?: number
|
||||
lastSkipAt?: number
|
||||
lastSkipReason?: string
|
||||
lastError?: string
|
||||
lastScheduleKey?: string
|
||||
successCount?: number
|
||||
}
|
||||
|
||||
export interface ExportAutomationTask {
|
||||
id: string
|
||||
name: string
|
||||
enabled: boolean
|
||||
sessionIds: string[]
|
||||
sessionNames: string[]
|
||||
outputDir?: string
|
||||
schedule: ExportAutomationSchedule
|
||||
condition: ExportAutomationCondition
|
||||
stopCondition?: ExportAutomationStopCondition
|
||||
template: ExportAutomationTemplate
|
||||
runState?: ExportAutomationRunState
|
||||
createdAt: number
|
||||
updatedAt: number
|
||||
}
|
||||
Reference in New Issue
Block a user