Files
TREK/server/src/nest/settings/settings.dto.ts
T
Maurice 724c88c201 style: format server and shared with prettier
A mechanical prettier --write over server/src, server/tests, server/scripts
and shared/src with the workspaces' .prettierrc; nothing but layout and
import order changes, and every file keeps the same set of imports. shared
is formatted throughout and its format baseline is empty. The server
baseline keeps the 35 files that Prettier would grow past their lint:size
limit (they need a split first, which is not a formatting change), and the
generated entity files stay as their generator writes them.
2026-10-10 21:23:37 +02:00

20 lines
829 B
TypeScript

import {
adminDefaultUserSettingsRequestSchema,
settingUpsertRequestSchema,
settingsBulkRequestSchema,
} from '@trek/shared';
import { createZodDto } from 'nestjs-zod';
/**
* Server-side createZodDto wrappers over the @trek/shared settings contracts.
* The global ZodValidationPipe (APP_PIPE in app.module.ts) validates any
* @Body() parameter typed with one of these classes by metatype — the Zod
* schemas in shared/ remain the single source of truth for the wire contract.
*/
export class SettingUpsertDto extends createZodDto(settingUpsertRequestSchema) {}
export class SettingsBulkDto extends createZodDto(settingsBulkRequestSchema) {}
/** The admin route for the instance-wide user-setting defaults. */
export class AdminDefaultUserSettingsDto extends createZodDto(adminDefaultUserSettingsRequestSchema) {}