Pomodoro
Controle o timer Pomodoro integrado: leia configurações, inspecione o progresso de hoje e inicie/pause/pare a sessão atual.
Definições de Tipo
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
}Operações
pomodoroSettings
Obtenha as configurações de Pomodoro armazenadas (durações, flags de auto-início, rounds).
query GetPomodoroSettings {
pomodoroSettings {
workDuration shortBreak longBreak roundsBeforeLongBreak
autoStartBreaks autoStartWork
}
}pomodoroToday
Obtenha as informações de runtime de hoje: rounds concluídos, fase atual, tempo restante e estado de execução.
query GetPomodoroToday {
pomodoroToday {
date completedCount currentRound timeLeft totalTime isRunning isPause state
}
}startPomodoro
Inicie o timer Pomodoro. Passe timeLeft (segundos) para retomar de um estado pausado, ou 0 para um início limpo.
mutation StartPomodoro($timeLeft: Int!) {
startPomodoro(timeLeft: $timeLeft)
}pausePomodoro
Pause o timer Pomodoro em execução.
mutation PausePomodoro {
pausePomodoro
}stopPomodoro
Pare o timer Pomodoro e redefina o round atual.
mutation StopPomodoro {
stopPomodoro
}