import { z } from 'zod';

export const createFeedSchema = z.object({
  name: z.string().min(1).max(100),
  url: z.string().url(),
  refreshInterval: z.enum(['FIFTEEN_MIN', 'HOURLY', 'SIX_HOUR', 'DAILY']).default('HOURLY'),
});

export const updateFeedSchema = z.object({
  name: z.string().min(1).max(100).optional(),
  url: z.string().url().optional(),
  refreshInterval: z.enum(['FIFTEEN_MIN', 'HOURLY', 'SIX_HOUR', 'DAILY']).optional(),
});

export const createExportTokenSchema = z.object({
  includePersonal: z.boolean(),
  includeLayers: z.array(z.string()).optional(),
});

export type CreateFeedInput = z.infer<typeof createFeedSchema>;
export type UpdateFeedInput = z.infer<typeof updateFeedSchema>;
export type CreateExportTokenInput = z.infer<typeof createExportTokenSchema>;
