PlainApp
API-referentie

Pomodoro

Controleer app.capabilities voor functieondersteuning en app.access plus hostrechten voor autorisatie. Voorbeelden gebruiken synthetische waarden; vervang paden, ID’s, invoer en filters vóór aanroepen.

Typedefinities

graphql
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!
}

Bewerkingen

subscription

pomodoroSettingsChanged

Een wijzigingssignaal ontvangen als Pomodoro-instellingen veranderen.

graphql
subscription pomodoroSettingsChanged {
  pomodoroSettingsChanged
}
subscription

pomodoroAction

Actie-updates van de Pomodoro-timer ontvangen.

graphql
subscription pomodoroAction {
  pomodoroAction { completedState }
}
mutation

pausePomodoro

De lopende Pomodoro-timer pauzeren.

graphql
mutation pausePomodoro {
  pausePomodoro { date completedCount currentRound timeLeftSec totalTimeSec isRunning isPaused state }
}
mutation

setPomodoroRemainingTime

De resterende tijd van de lopende of gepauzeerde timer instellen in seconden, tussen nul en de huidige rondeduur.

graphql
mutation setPomodoroRemainingTime($remainingSec: Int!) {
  setPomodoroRemainingTime(remainingSec: $remainingSec) { date completedCount currentRound timeLeftSec totalTimeSec isRunning isPaused state }
}
mutation

startPomodoro

Een Pomodoro-timer met de opgegeven duur in seconden starten.

graphql
mutation startPomodoro($durationSec: Int!) {
  startPomodoro(durationSec: $durationSec) { date completedCount currentRound timeLeftSec totalTimeSec isRunning isPaused state }
}
mutation

stopPomodoro

De Pomodoro-timer stoppen en de huidige ronde terugzetten.

graphql
mutation stopPomodoro {
  stopPomodoro { date completedCount currentRound timeLeftSec totalTimeSec isRunning isPaused state }
}
query

pomodoroSettings

De opgeslagen Pomodoro-instellingen ophalen (duren, automatisch starten, rondes).

graphql
query pomodoroSettings {
  pomodoroSettings { workDurationMin shortBreakDurationMin longBreakDurationMin pomodorosBeforeLongBreak showNotification playSoundOnComplete soundPath originalSoundName }
}
query

pomodoroToday

De uitvoeringsinformatie van vandaag ophalen: voltooide rondes, huidige fase, resterende tijd en uitvoeringsstatus.

graphql
query pomodoroToday {
  pomodoroToday { date completedCount currentRound timeLeftSec totalTimeSec isRunning isPaused state }
}