export interface KappaLoginPayload {
  email: string
  password: string
}

export interface KappaLoginResponse {
  access?: string
  token?: string
  key?: string
  email?: string
  first_name?: string
  last_name?: string
  full_name?: string
  user_id?: number
  user?: KappaUser
}

export interface KappaUser {
  id: number
  email: string
  first_name: string
  last_name: string
  username?: string
  is_staff?: boolean
}

export interface KappaInitiative {
  id: number
  name?: string
  initiative_name?: string
  key?: string
  description?: string
  start_date?: string
  end_date?: string
  status?: string
  created_at?: string
}

export interface KappaUserStory {
  id?: number
  code?: string
  title: string
  description?: string
  acceptance_criteria?: string
  criterios_aceptacion?: string
  status?: string | number
  status_name?: string
  priority?: string | number
  initiative: number | string
  story_points?: number
  sprint?: number | string
  end_date?: string
  initial_date?: string | null
  created_at?: string
  assigned_to?: number | null
  asignado_a?: number[] | string[] | null
  assigned_name?: string
}

export interface KappaEpicDevelopment {
  id: number
  code?: string
  title?: string
  name?: string
  description?: string
  status?: string
  priority?: string
  initiative?: number
  initiative_name?: string
  initiative_key?: string
  assigned_to?: number | null
  assigned_name?: string
  story_points?: number
  estimated_hours?: number
  actual_hours?: number
  start_date?: string
  due_date?: string
  completed_date?: string
  created_at?: string
  updated_at?: string
}

export interface KappaCreateEpicPayload {
  initiative: number | string
  name: string
  description?: string
  stimated_start_date?: string
  stimated_end_date?: string
  client_taker?: number
  hu?: number[]
  status?: boolean
}

export interface KappaLogbookMaster {
  id?: number
  initiative: number | string
  name: string
  description?: string
  created_at?: string
}

export interface KappaLogbookEntry {
  id?: number
  logbook_master?: number
  initiative?: number | string
  date: string
  description: string
  hours?: number
  created_at?: string
}

export interface KappaPlanningMaster {
  id?: number
  initiative: number | string
  name: string
  description?: string
  start_date?: string
  end_date?: string
  created_at?: string
}

export interface KappaPlanningEntry {
  id?: number
  planning_master?: number
  initiative?: number | string
  description: string
  responsible?: string
  start_date?: string
  end_date?: string
  created_at?: string
}

export interface KappaBusinessRule {
  name: string
  description: string
  initiative: number | string
}

export interface KappaRequirement {
  name: string
  description: string
  initiative: number | string
  type: 'funcional' | 'no_funcional'
  name_requirement?: string
}

export interface KappaEmployee {
  id: number
  first_name?: string
  last_name?: string
  full_name?: string
  email?: string
  user?: number
  initiative?: number | null
  initiative_name?: string
  initiative_key?: string
  position?: string
  is_active?: boolean
  created_at?: string
}

export interface KappaPending {
  id: number
  historia_title: string[]
  created_at: string
  updated_at: string
  responsible: string
  pending_activity: string
  delivery_date: string
  real_date: string | null
  type: string
  type_impediment: boolean
  status_pending: string | null
  status: boolean
  pending_client_type: string | null
  pending_general_client: boolean
  solution_date: string | null
  which: string
  client: string | null
  initiative: string | null
  hu: number[]
  initiatives_client: string[]
}

export interface KappaTypeImpediment {
  id: number
  name: string
}

export interface PaginatedResponse<T> {
  count: number
  next: string | null
  previous: string | null
  results: T[]
}
