import { z } from 'zod';

export const createPhoneNumberSchema = z.object({
  branch_id: z.string().uuid().optional(),
  number: z.string().min(1, 'Phone number is required'),
  type: z.enum(['purchased', 'sip']).optional(),
  sip_config: z.record(z.string(), z.any()).optional(),
  is_active: z.boolean().optional(),
});

export const updatePhoneNumberSchema = z.object({
  number: z.string().optional(),
  type: z.enum(['purchased', 'sip']).optional(),
  sip_config: z.record(z.string(), z.any()).optional(),
  is_active: z.boolean().optional(),
});

export type CreatePhoneNumberInput = z.infer<typeof createPhoneNumberSchema>;
export type UpdatePhoneNumberInput = z.infer<typeof updatePhoneNumberSchema>;
