import { z } from "zod/v4";

export const UpdateCustomerByIdParamsRequestSchema = z.object({
  customer_id: z.string(),
});

export const UpdateCustomerByIdRequestSchema = z.object({
  reference: z.string().optional(),

  is_company: z.string().optional(),
  name: z.string().optional(),
  trade_name: z.string().optional(),
  tin: z.string().optional(),
  default_taxes: z.array(z.string()).optional(), // completo (sustituye), o null => vaciar

  street: z.string().optional(),
  street2: z.string().optional(),
  city: z.string().optional(),
  province: z.string().optional(),
  postal_code: z.string().optional(),
  country: z.string().optional(),

  email_primary: z.string().optional(),
  email_secondary: z.string().optional(),
  phone_primary: z.string().optional(),
  phone_secondary: z.string().optional(),
  mobile_primary: z.string().optional(),
  mobile_secondary: z.string().optional(),

  fax: z.string().optional(),
  website: z.string().optional(),

  legal_record: z.string().optional(),

  language_code: z.string().optional(),
  currency_code: z.string().optional(),
});

export type UpdateCustomerByIdRequestDTO = Partial<z.infer<typeof UpdateCustomerByIdRequestSchema>>;
