import { ReportType, DeliveryMethod, ExportFormat } from '../entities';

/**
 * DTO for updating a report definition.
 */
export interface UpdateReportDefinitionDto {
  name?: string;
  description?: string;
  category?: string;
  reportType?: ReportType;
  baseQuery?: string;
  queryFunction?: string;
  isSqlBased?: boolean;
  parametersSchema?: Record<string, any>[];
  defaultParameters?: Record<string, any>;
  columnsConfig?: Record<string, any>[];
  totalsConfig?: Record<string, any>[];
  requiredPermissions?: string[];
  isPublic?: boolean;
  isActive?: boolean;
}

/**
 * DTO for updating a report schedule.
 */
export interface UpdateReportScheduleDto {
  name?: string;
  cronExpression?: string;
  timezone?: string;
  parameters?: Record<string, any>;
  deliveryMethod?: DeliveryMethod;
  deliveryConfig?: Record<string, any>;
  exportFormat?: ExportFormat;
  isActive?: boolean;
}

/**
 * DTO for updating a report recipient.
 */
export interface UpdateReportRecipientDto {
  userId?: string;
  email?: string;
  name?: string;
  isActive?: boolean;
}

/**
 * DTO for updating a custom report.
 */
export interface UpdateCustomReportDto {
  baseDefinitionId?: string;
  name?: string;
  description?: string;
  customColumns?: Record<string, any>[];
  customFilters?: Record<string, any>[];
  customGrouping?: Record<string, any>[];
  customSorting?: Record<string, any>[];
  isFavorite?: boolean;
}
