import { z } from 'zod';

export const createSmsCampaignSchema = z.object({
  name: z.string().min(1).max(200),
  messageTemplate: z.string().min(1).max(1600),
  contactListId: z.string().min(1),
  advocacyCampaignId: z.string().nullable().optional(),
  delayBetweenMs: z.number().int().min(1000).max(60000).default(3000),
});

export const updateSmsCampaignSchema = z.object({
  name: z.string().min(1).max(200).optional(),
  messageTemplate: z.string().min(1).max(1600).optional(),
  delayBetweenMs: z.number().int().min(1000).max(60000).optional(),
});

export type CreateSmsCampaignInput = z.infer<typeof createSmsCampaignSchema>;
export type UpdateSmsCampaignInput = z.infer<typeof updateSmsCampaignSchema>;
