feat: add Deepbrid, daily scheduling, and notification center
Add encrypted Deepbrid API accounts with account validation, provider routing, fallback, usage tracking, safe error handling, and verified 1Fichier downloads. Restore persistent recurring daily starts with local-calendar deduplication and legacy schedule compatibility. Add durable Discord package, run, remaining-volume, stall, and recovery notifications with privacy-safe telemetry and disk-failure recovery.
This commit is contained in:
@@ -1,7 +1,16 @@
|
||||
import type { AppSettings, RendererSettingsUpdate } from "../shared/types";
|
||||
import { createRendererSettings } from "./renderer-state";
|
||||
import { isValidLocalDate } from "./daily-start-scheduler";
|
||||
|
||||
const DERIVED_KEYS = new Set(["archivePasswordListConfigured", "notifyUrlConfigured", "configuredProviders"]);
|
||||
const DERIVED_KEYS = new Set([
|
||||
"archivePasswordListConfigured",
|
||||
"notifyUrlConfigured",
|
||||
"configuredProviders",
|
||||
"dailyStartLastHandledLocalDate",
|
||||
"dailyStartPendingLocalDate",
|
||||
"dailyStartLastOutcome",
|
||||
"nextDailyStartEpochMs"
|
||||
]);
|
||||
const WRITE_ONLY_KEYS = new Set(["archivePasswordList", "notifyUrl"]);
|
||||
const MAX_SETTINGS_PAYLOAD_BYTES = 1_000_000;
|
||||
|
||||
@@ -82,6 +91,15 @@ export function validateRendererSettingsUpdate(value: unknown, current: AppSetti
|
||||
if (!(key in safe)) {
|
||||
invalid();
|
||||
}
|
||||
if (key === "notifyPackageSuccessMode" && entry !== "digest" && entry !== "individual") {
|
||||
invalid();
|
||||
}
|
||||
if (key === "dailyStartMinuteOfDay" && (!Number.isInteger(entry) || (entry as number) < 0 || (entry as number) > 1_439)) {
|
||||
invalid();
|
||||
}
|
||||
if (key === "dailyStartFirstLocalDate" && entry !== "" && (typeof entry !== "string" || !isValidLocalDate(entry))) {
|
||||
invalid();
|
||||
}
|
||||
validateTopLevelType(entry, safe[key]);
|
||||
validateJsonValue(entry);
|
||||
output[key] = entry;
|
||||
|
||||
Reference in New Issue
Block a user