API-referentie

Pomodoro

Bedien de ingebouwde Pomodoro-timer: lees instellingen, bekijk de voortgang van vandaag en start/pauzeer/stop de huidige sessie.

Typedefinities

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
}

Bewerkingen

query

pomodoroSettings

Haal de opgeslagen Pomodoro-instellingen op (duuraties, auto-start-flags, rondes).

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

pomodoroToday

Haal de runtime-info van vandaag op: voltooide rondes, huidige fase, resterende tijd en uitvoeringsstatus.

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

startPomodoro

Start de Pomodoro-timer. Geef timeLeft (seconden) door om te hervatten vanuit een gepauzeerde status, of 0 voor een schone start.

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

pausePomodoro

Pauzeer de actieve Pomodoro-timer.

bash
mutation PausePomodoro {
  pausePomodoro
}
mutation

stopPomodoro

Stop de Pomodoro-timer en reset de huidige ronde.

bash
mutation StopPomodoro {
  stopPomodoro
}