/**
 * User settings types — product-scoped settings with per-device overrides.
 */

import { z } from 'zod';

export interface UserSettingsDoc {
  id: string;
  productId: string;
  userId: string;
  settings: Record<string, unknown>;
  deviceOverrides: Record<string, Record<string, unknown>>;
  createdAt: string;
  updatedAt: string;
}

export const UpdateSettingsSchema = z.object({
  settings: z.record(z.unknown()),
});

export const SetDeviceOverridesSchema = z.object({
  overrides: z.record(z.unknown()),
});

export type UpdateSettingsInput = z.infer<typeof UpdateSettingsSchema>;
export type SetDeviceOverridesInput = z.infer<typeof SetDeviceOverridesSchema>;
