// API Response types

export interface ApiResponse<T = unknown> {
  success: boolean
  data: T
}

export interface ApiError {
  code: string
  message: string
  data?: {
    status: number
    details?: Record<string, unknown>
  }
}

// Analytics types
export interface DashboardStats {
  leads: {
    total: number
    this_month: number
    this_week: number
    today: number
    by_status: Record<string, number>
  }
  conversations: {
    total: number
    this_month: number
    this_week: number
    today: number
    avg_messages: number
    total_messages: number
  }
  conversions: {
    total: number
    rate: number
  }
  satisfaction: {
    average: number
  }
  meetings: {
    total: number
    this_month: number
  }
  usage: {
    messages: number
    conversations: number
    limit: number
    percentage: number
  }
}

export interface AnalyticsResponse {
  success: boolean
  data: DashboardStats
}

export interface TrendsData {
  date: string
  leads: number
  conversations: number
  messages: number
}

export interface TrendsResponse {
  success: boolean
  data: {
    period: string
    trends: TrendsData[]
  }
}

// Export types
export interface ExportResponse {
  success: boolean
  data: {
    download_url: string
    filename: string
    count: number
    expires: string
  }
}













