Pomodoro
Funktionsunterstützung über app.capabilities prüfen, Autorisierung über app.access und Host-Berechtigungen. Die Beispiele verwenden synthetische Werte; vor dem Aufruf Pfade, IDs, Eingaben und Filter ersetzen.
Typdefinitionen
type Subscription {
pomodoroSettingsChanged: Boolean!
pomodoroAction: PomodoroAction!
}
type Mutation {
pausePomodoro: PomodoroToday!
setPomodoroRemainingTime(remainingSec: Int!): PomodoroToday!
startPomodoro(durationSec: Int!): PomodoroToday!
stopPomodoro: PomodoroToday!
}
type Query {
pomodoroSettings: PomodoroSettings!
pomodoroToday: PomodoroToday!
}
scalar Instant
type PomodoroAction {
today: PomodoroToday!
completedState: PomodoroState
}
type PomodoroSettings {
workDurationMin: Int!
shortBreakDurationMin: Int!
longBreakDurationMin: Int!
pomodorosBeforeLongBreak: Int!
showNotification: Boolean!
playSoundOnComplete: Boolean!
soundPath: String!
originalSoundName: String!
}
enum PomodoroState {
WORK
SHORT_BREAK
LONG_BREAK
}
type PomodoroToday {
date: Instant!
completedCount: Int!
currentRound: Int!
timeLeftSec: Int!
totalTimeSec: Int!
isRunning: Boolean!
isPaused: Boolean!
state: PomodoroState!
}Operationen
pomodoroSettingsChanged
Empfängt ein Änderungssignal bei geänderten Pomodoro-Einstellungen.
subscription pomodoroSettingsChanged {
pomodoroSettingsChanged
}pomodoroAction
Empfängt Aktualisierungen der Pomodoro-Timeraktionen.
subscription pomodoroAction {
pomodoroAction { completedState }
}pausePomodoro
Pausiert den laufenden Pomodoro-Timer.
mutation pausePomodoro {
pausePomodoro { date completedCount currentRound timeLeftSec totalTimeSec isRunning isPaused state }
}setPomodoroRemainingTime
Setzt die verbleibende Zeit eines laufenden oder pausierten Timers in Sekunden zwischen 0 und der Dauer der aktuellen Runde.
mutation setPomodoroRemainingTime($remainingSec: Int!) {
setPomodoroRemainingTime(remainingSec: $remainingSec) { date completedCount currentRound timeLeftSec totalTimeSec isRunning isPaused state }
}startPomodoro
Startet einen Pomodoro-Timer mit der angegebenen Dauer in Sekunden.
mutation startPomodoro($durationSec: Int!) {
startPomodoro(durationSec: $durationSec) { date completedCount currentRound timeLeftSec totalTimeSec isRunning isPaused state }
}stopPomodoro
Stoppt den Pomodoro-Timer und setzt die aktuelle Runde zurück.
mutation stopPomodoro {
stopPomodoro { date completedCount currentRound timeLeftSec totalTimeSec isRunning isPaused state }
}pomodoroSettings
Liest gespeicherte Pomodoro-Einstellungen: Zeitdauern, Autostart-Flags und Runden.
query pomodoroSettings {
pomodoroSettings { workDurationMin shortBreakDurationMin longBreakDurationMin pomodorosBeforeLongBreak showNotification playSoundOnComplete soundPath originalSoundName }
}pomodoroToday
Liest den heutigen Laufzeitstatus: abgeschlossene Runden, aktuelle Phase, Restzeit und Betriebszustand.
query pomodoroToday {
pomodoroToday { date completedCount currentRound timeLeftSec totalTimeSec isRunning isPaused state }
}