Skip to main content

Function: normalizeStateSyncStatusSummary()

normalizeStateSyncStatusSummary(args: { cachedSiteCount: number; currentStatus: { lastSyncAt?: number | null; siteCount: number; source: "cache" | "database" | "frontend" | "import" | "monitor-update"; synchronized: boolean; }; }): { lastSyncAt?: number | null; siteCount: number; source: "cache" | "database" | "frontend" | "import" | "monitor-update"; synchronized: boolean; }

Defined in: electron/services/ipc/internal/stateSyncStatusSummary.ts:34

Normalizes a cached + live summary into a safe StateSyncStatusSummary.

Parameters

args

cachedSiteCount

number

currentStatus

{ lastSyncAt?: number | null; siteCount: number; source: "cache" | "database" | "frontend" | "import" | "monitor-update"; synchronized: boolean; }

currentStatus.lastSyncAt?

number | null

currentStatus.siteCount

number

currentStatus.source

"cache" | "database" | "frontend" | "import" | "monitor-update"

currentStatus.synchronized

boolean

Returns

{ lastSyncAt?: number | null; siteCount: number; source: "cache" | "database" | "frontend" | "import" | "monitor-update"; synchronized: boolean; }

lastSyncAt?

optional lastSyncAt: number | null

siteCount

siteCount: number

source

source: "cache" | "database" | "frontend" | "import" | "monitor-update"

synchronized

synchronized: boolean