Interface: StateSyncApiInterface
Defined in: electron/preload/domains/stateSyncApi.ts:37
Interface defining the state sync domain API operations.
Extends
Properties
getSyncStatus()
getSyncStatus: () =>
Promise<{lastSyncAt?:number|null;siteCount:number;source:"cache"|"database"|"frontend";synchronized:boolean; }>
Defined in: electron/preload/domains/stateSyncApi.ts:43
Gets the current synchronization status
Returns
Promise<{ lastSyncAt?: number | null; siteCount: number; source: "cache" | "database" | "frontend"; synchronized: boolean; }>
Promise resolving to current sync status information
Overrides
StateSyncChannelMap.getSyncStatus
onStateSyncEvent()
onStateSyncEvent: (
callback: (data:StateSyncEventData) =>void) => () =>void
Defined in: electron/preload/domains/stateSyncApi.ts:52
Subscribe to state synchronization events
Parameters
callback
(data: StateSyncEventData) => void
Function to call when sync events are received
Returns
Cleanup function to remove the event listener
():
void
Returns
void
requestFullSync()
requestFullSync: () =>
Promise<{completedAt:number;siteCount:number;sites:Site[];source:"cache"|"database"|"frontend";synchronized:boolean; }>
Defined in: electron/preload/domains/stateSyncApi.ts:61
Requests a full synchronization of all data
Returns
Promise<{ completedAt: number; siteCount: number; sites: Site[]; source: "cache" | "database" | "frontend"; synchronized: boolean; }>
Promise resolving to synchronized site data