Pomodoro
Özellik desteği için app.capabilities, yetkilendirme için app.access ve ana makine izinlerini kontrol edin. Çağrıdan önce örnek değerleri değiştirin.
Tip Tanımları
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!
}İşlemler
pomodoroSettingsChanged
Pomodoro ayarları değiştiğinde değişiklik sinyali alır.
subscription pomodoroSettingsChanged {
pomodoroSettingsChanged
}pomodoroAction
Pomodoro zamanlayıcısı eylem güncellemelerini alır.
subscription pomodoroAction {
pomodoroAction { completedState }
}pausePomodoro
Çalışan Pomodoro zamanlayıcısını duraklatır.
mutation pausePomodoro {
pausePomodoro { date completedCount currentRound timeLeftSec totalTimeSec isRunning isPaused state }
}setPomodoroRemainingTime
Çalışan veya duraklatılmış zamanlayıcının kalan süresini sıfır ile mevcut tur süresi arasında saniye olarak ayarlar.
mutation setPomodoroRemainingTime($remainingSec: Int!) {
setPomodoroRemainingTime(remainingSec: $remainingSec) { date completedCount currentRound timeLeftSec totalTimeSec isRunning isPaused state }
}startPomodoro
Verilen saniye süresiyle Pomodoro zamanlayıcısını başlatır.
mutation startPomodoro($durationSec: Int!) {
startPomodoro(durationSec: $durationSec) { date completedCount currentRound timeLeftSec totalTimeSec isRunning isPaused state }
}stopPomodoro
Pomodoro zamanlayıcısını durdurur ve mevcut turu sıfırlar.
mutation stopPomodoro {
stopPomodoro { date completedCount currentRound timeLeftSec totalTimeSec isRunning isPaused state }
}pomodoroSettings
Kayıtlı Pomodoro ayarlarını (süreler, otomatik başlatma bayrakları, turlar) getirir.
query pomodoroSettings {
pomodoroSettings { workDurationMin shortBreakDurationMin longBreakDurationMin pomodorosBeforeLongBreak showNotification playSoundOnComplete soundPath originalSoundName }
}pomodoroToday
Bugünün çalışma bilgilerini getirir: tamamlanan turlar, mevcut aşama, kalan süre ve çalışma durumu.
query pomodoroToday {
pomodoroToday { date completedCount currentRound timeLeftSec totalTimeSec isRunning isPaused state }
}