Skip to main content

Function: toMonitorSnapshotOverlay()

toMonitorSnapshotOverlay(source?: UnknownRecord | Monitor | Partial<Pick<Monitor, "responseTime" | "status" | "monitoring" | "activeOperations" | "history" | "lastChecked">>): Partial<Pick<Monitor, "responseTime" | "status" | "monitoring" | "activeOperations" | "history" | "lastChecked">> | undefined

Defined in: shared/utils/siteSnapshots.ts:285

Derives a normalized overlay describing the mutable portions of a monitor snapshot.

Parametersโ€‹

source?โ€‹

Monitor payload or monitor-like object to normalize.

UnknownRecord | Monitor | Partial<Pick<Monitor, "responseTime" | "status" | "monitoring" | "activeOperations" | "history" | "lastChecked">>

Returnsโ€‹

Partial<Pick<Monitor, "responseTime" | "status" | "monitoring" | "activeOperations" | "history" | "lastChecked">> | undefined

Overlay populated with the validated subset of monitor fields, or undefined when no serializable data is present.