Interface: TimeTrackerEngineDeps
Defined in: shared/src/hooks/use-time-tracker-engine.ts:97
Properties
Section titled “Properties”appointments
Section titled “appointments”appointments: { created_at: string; description: string | null; end_date: string; id: string; is_all_day: boolean; reminder: string | null; start_date: string; status: "upcoming" | "active" | "finished" | "completed" | "missed"; title: string; type: "work" | "private" | "meeting" | "blocked"; user_id: string; work_project_id: string | null; work_time_entry_id: string | null;}[];Defined in: shared/src/hooks/use-time-tracker-engine.ts:101
All appointments (from query)
created_at
Section titled “created_at”created_at: string;description
Section titled “description”description: string | null;end_date
Section titled “end_date”end_date: string;id: string;is_all_day
Section titled “is_all_day”is_all_day: boolean;reminder
Section titled “reminder”reminder: string | null;start_date
Section titled “start_date”start_date: string;status
Section titled “status”status: "upcoming" | "active" | "finished" | "completed" | "missed";title: string;type: "work" | "private" | "meeting" | "blocked";user_id
Section titled “user_id”user_id: string;work_project_id
Section titled “work_project_id”work_project_id: string | null;work_time_entry_id
Section titled “work_time_entry_id”work_time_entry_id: string | null;callbacks?
Section titled “callbacks?”optional callbacks: TimerEngineCallbacks;Defined in: shared/src/hooks/use-time-tracker-engine.ts:122
Platform callbacks
mutations
Section titled “mutations”mutations: { addWorkTimeEntry: (entry, rounding) => Promise< | { id: string; }[] | null | undefined>; advancePomodoroPhase: (id, phase) => void; incrementPomodoroSessions: (id) => void; setPomodoroPhaseOvertime: (id, overtime) => void; stopTimeTracker: (id) => void; updateAppointment: (id, data) => Promise<unknown>;};Defined in: shared/src/hooks/use-time-tracker-engine.ts:105
Mutation functions
addWorkTimeEntry()
Section titled “addWorkTimeEntry()”addWorkTimeEntry: (entry, rounding) => Promise< | { id: string;}[] | null| undefined>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
entry | InsertWorkTimeEntry |
rounding | TimerRoundingSettings |
Returns
Section titled “Returns”Promise<
| {
id: string;
}[]
| null
| undefined>
advancePomodoroPhase()
Section titled “advancePomodoroPhase()”advancePomodoroPhase: (id, phase) => void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id | string |
phase | "focus" | "short-break" | "long-break" |
Returns
Section titled “Returns”void
incrementPomodoroSessions()
Section titled “incrementPomodoroSessions()”incrementPomodoroSessions: (id) => void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id | string |
Returns
Section titled “Returns”void
setPomodoroPhaseOvertime()
Section titled “setPomodoroPhaseOvertime()”setPomodoroPhaseOvertime: (id, overtime) => void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id | string |
overtime | boolean |
Returns
Section titled “Returns”void
stopTimeTracker()
Section titled “stopTimeTracker()”stopTimeTracker: (id) => void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id | string |
Returns
Section titled “Returns”void
updateAppointment()
Section titled “updateAppointment()”updateAppointment: (id, data) => Promise<unknown>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id | string |
data | { work_time_entry_id: string; } |
data.work_time_entry_id | string |
Returns
Section titled “Returns”Promise<unknown>
pomodoroPreferences
Section titled “pomodoroPreferences”pomodoroPreferences: PomodoroPreferences;Defined in: shared/src/hooks/use-time-tracker-engine.ts:120
Pomodoro preferences (from settings store or defaults)
settings
Section titled “settings”settings: | { automaticly_stop_other_timer: boolean; background_color_mode: boolean; color_mode: boolean; created_at: string; default_project_bank_account_id: string | null; default_project_type: "hourly" | "project" | "hobby"; default_salary_amount: number; format_24h: boolean; id: string; locale: "en-US" | "de-DE"; round_in_time_sections: boolean; rounding_amount: "s" | "min" | "1/4h" | "1/2h" | "h" | "custom"; rounding_direction: "up" | "down" | "nearest"; rounding_interval: number; show_calendar_time: boolean; time_section_interval: number; updated_at: string; user_id: string;} | null | undefined;Defined in: shared/src/hooks/use-time-tracker-engine.ts:103
Global settings (from query, can be undefined if not loaded yet)
workProjects
Section titled “workProjects”workProjects: WorkProject[];Defined in: shared/src/hooks/use-time-tracker-engine.ts:99
All work projects (from query)