mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 21:10:59 +00:00
Bring the scattered data-sovereignty controls into one /settings/privacy pane. It assembles already-shipped pieces rather than rebuilding them: the encryption- at-rest summary and configured retention windows (read from the server so the copy stays truthful), links to the export surfaces (including the passphrase- encrypted option) and the account-deletion / data-reset surface, the active- session list, trusted devices, and the security-activity log. The backup↔ deletion lag is disclosed honestly — deletion is immediate, but encrypted off-host backups still hold the data until they roll off retention.
51 lines
2.1 KiB
TypeScript
51 lines
2.1 KiB
TypeScript
/**
|
|
* Query keys — settings + notification surfaces, version/meta reads,
|
|
* gamification, share links, and feature flags.
|
|
* Part of the centralized factory; aggregated in `./index.ts`.
|
|
*/
|
|
export const settingsKeys = {
|
|
gamificationAchievements: () => ["gamification", "achievements"] as const,
|
|
|
|
notificationsPreferences: () => ["notifications", "preferences"] as const,
|
|
notificationsStatus: () => ["notifications", "status"] as const,
|
|
|
|
settingsGlobalServices: () => ["settings", "global-services"] as const,
|
|
settingsNtfy: () => ["settings", "ntfy"] as const,
|
|
/** v1.17.1 — generic-webhook channel config. */
|
|
settingsWebhook: () => ["settings", "webhook"] as const,
|
|
/** v1.17.1 — SMTP / email channel config. */
|
|
settingsEmail: () => ["settings", "email"] as const,
|
|
settingsReminderThresholds: () =>
|
|
["settings", "reminder-thresholds"] as const,
|
|
|
|
/** v1.8.5 — user-level injection-site preferences (global exclusion). */
|
|
injectionSitePrefs: () => ["settings", "injection-site-prefs"] as const,
|
|
|
|
/**
|
|
* v1.18.0 — the per-user module enable/disable map behind
|
|
* `GET/PATCH /api/auth/me/modules`. Used as the Module-hub mutation key;
|
|
* the resolved map itself rides on `authMe()` (the `/auth/me` payload),
|
|
* so the toggle mutation invalidates `authMe()` to re-gate the nav,
|
|
* Insights pills, and dashboard tiles in lockstep.
|
|
*/
|
|
modulesPrefs: () => ["settings", "modules"] as const,
|
|
|
|
apiVersion: () => ["api", "version"] as const,
|
|
publicVersion: () => ["public", "version"] as const,
|
|
/** v1.15.12 H1 — admin overview "update available" check against the
|
|
* latest GitHub release tag (best-effort, day-stale). */
|
|
versionUpdateCheck: () => ["version", "update-check"] as const,
|
|
researchMode: () => ["research-mode"] as const,
|
|
|
|
/**
|
|
* v1.23 — the Data & Privacy dashboard's read-only retention + encryption
|
|
* summary behind `GET /api/settings/privacy-summary`.
|
|
*/
|
|
privacySummary: () => ["settings", "privacy-summary"] as const,
|
|
|
|
/** v1.11.0 — owner's clinician share links (Settings → Sharing). */
|
|
shareLinks: () => ["share-links"] as const,
|
|
|
|
featureFlags: () => ["feature-flags"] as const,
|
|
};
|