14 lines
478 B
TypeScript
14 lines
478 B
TypeScript
import { z } from 'zod';
|
|
|
|
export const updateNotificationPreferencesSchema = z.object({
|
|
emailNotificationsEnabled: z.boolean().optional(),
|
|
pushNotificationsEnabled: z.boolean().optional(),
|
|
inAppNotificationsEnabled: z.boolean().optional()
|
|
}).refine(
|
|
(data) => Object.keys(data).length > 0,
|
|
{ message: 'At least one notification preference must be provided' }
|
|
);
|
|
|
|
export type UpdateNotificationPreferencesRequest = z.infer<typeof updateNotificationPreferencesSchema>;
|
|
|