Referencia de la API

Pomodoro

Controla el temporizador Pomodoro integrado: lee los ajustes, inspecciona el progreso de hoy e inicia/pausa/detiene la sesión actual.

Definiciones de tipos

bash
type PomodoroSettings {
  workDuration: Int!          # minutes
  shortBreak: Int!            # minutes
  longBreak: Int!             # minutes
  roundsBeforeLongBreak: Int!
  autoStartBreaks: Boolean!
  autoStartWork: Boolean!
}

type PomodoroToday {
  date: String!               # ISO date (YYYY-MM-DD)
  completedCount: Int!        # completed work rounds today
  currentRound: Int!
  timeLeft: Int!              # seconds remaining in the current phase
  totalTime: Int!             # seconds elapsed in the current phase
  isRunning: Boolean!
  isPause: Boolean!
  state: PomodoroState!       # WORK | SHORT_BREAK | LONG_BREAK | PAUSED
}

enum PomodoroState {
  WORK
  SHORT_BREAK
  LONG_BREAK
  PAUSED
}

Operaciones

query

pomodoroSettings

Obtiene los ajustes de Pomodoro almacenados (duraciones, indicadores de auto-inicio, rondas).

bash
query GetPomodoroSettings {
  pomodoroSettings {
    workDuration shortBreak longBreak roundsBeforeLongBreak
    autoStartBreaks autoStartWork
  }
}
query

pomodoroToday

Obtiene la información de ejecución de hoy: rondas completadas, fase actual, tiempo restante y estado de ejecución.

bash
query GetPomodoroToday {
  pomodoroToday {
    date completedCount currentRound timeLeft totalTime isRunning isPause state
  }
}
mutation

startPomodoro

Inicia el temporizador Pomodoro. Pasa timeLeft (segundos) para reanudar desde un estado pausado, o 0 para un inicio fresco.

bash
mutation StartPomodoro($timeLeft: Int!) {
  startPomodoro(timeLeft: $timeLeft)
}
mutation

pausePomodoro

Pausa el temporizador Pomodoro en ejecución.

bash
mutation PausePomodoro {
  pausePomodoro
}
mutation

stopPomodoro

Detiene el temporizador Pomodoro y reinicia la ronda actual.

bash
mutation StopPomodoro {
  stopPomodoro
}