// Re-export client-side ApiResponse type for consistency
// Server routes should return ApiResponse<T> format
export type { ApiResponse } from '../../app/types/api'

// Legacy types for backward compatibility
export interface ApiError {
  error: string
  statusCode?: number
  details?: unknown
}

// Version endpoint response
export interface DatabaseVersionRow {
  version: string
}

export type VersionResponse = DatabaseVersionRow[]

// Auth endpoint responses (Better Auth handles these internally)
// These are provided for documentation/reference
export interface AuthSession {
  user: {
    id: string
    email: string
    name?: string
    image?: string
    superAdmin?: boolean
  }
  session: {
    id: string
    userId: string
    expiresAt: Date
  }
}

export interface AuthResponse {
  user?: AuthSession['user']
  session?: AuthSession['session']
  error?: string
}

// Generic success response (use ApiResponse<T> instead)
export interface SuccessResponse<T = unknown> {
  success: true
  data: T
}

// Generic error response (use ApiResponse<T> instead)
export interface ErrorResponse {
  success: false
  error: string
  statusCode?: number
}
