Merge branch 'feat/v144-settings' into release/v1.44.0

# Conflicts:
#	src/components/settings/privacy-section.tsx
This commit is contained in:
Marc-André Bombeck committed 2026-10-21 20:51:39 +02:00
commit e1b70537cc
129 files changed
+5138 -3169

No files matched your search

+2
View File
@@ -2154,6 +2154,8 @@ const accountSettingsBackupSchema = z
medicationListLayoutJson: z.unknown().optional(),
moodTagLayoutJson: z.unknown().optional(),
documentsLayoutJson: z.unknown().optional(),
moduleListLayoutJson: z.unknown().optional(),
previewFeaturesJson: z.unknown().optional(),
reportSelectionJson: z.unknown().optional(),
globalExcludedInjectionSites: z.array(z.string()).optional(),
healthKitConfigJson: z.unknown().optional(),
+37
View File
@@ -0,0 +1,37 @@
/**
* Request schemas for the per-user Settings preferences that are not part of
* the account payload: the list presentation of the labs, illness and
* checkups lists, and the preview-feature opt-ins. Shared by the routes and
* the OpenAPI registry so the wire contract has one source.
*/
import { z } from "zod/v4";
import {
MODULE_LIST_ID_MAX,
MODULE_LIST_KEYS,
MODULE_LIST_ORDER_MAX,
MODULE_LIST_VIEWS,
MODULE_SORT_DIRS,
} from "@/lib/settings/module-list-layout";
export const moduleListLayoutPutSchema = z
.object({
version: z.literal(1),
list: z.enum(MODULE_LIST_KEYS),
view: z.enum(MODULE_LIST_VIEWS).optional(),
order: z
.array(z.string().min(1).max(MODULE_LIST_ID_MAX))
.max(MODULE_LIST_ORDER_MAX)
.optional(),
sortDir: z.enum(MODULE_SORT_DIRS).optional(),
})
.strict();
export const previewFeaturesPatchSchema = z
.object({
topics: z.boolean().optional(),
})
.strict()
.refine((body) => Object.keys(body).length > 0, {
message: "Name at least one preview feature.",
});