slim check snapshot model/types

This commit is contained in:
Alex Holliday committed 2026-08-04 11:27:32 -07:00
1 parent 3646af9c04
commit dfcb3b4b21
12 files changed
+295 -243

No files matched your search

+38 -1
View File
@@ -250,7 +250,44 @@ export interface ChecksSummary {
downChecks: number;
}
export type CheckSnapshot = Omit<Check, "metadata" | "__v" | "updatedAt">;
export type SnapshotCpuInfo = Pick<
CheckCpuInfo,
| "physical_core"
| "logical_core"
| "frequency"
| "current_frequency"
| "temperature"
| "usage_percent"
>;
export type SnapshotMemoryInfo = Pick<
CheckMemoryInfo,
"total_bytes" | "used_bytes" | "usage_percent"
>;
export type SnapshotDiskInfo = Pick<
CheckDiskInfo,
"device" | "total_bytes" | "used_bytes" | "usage_percent"
>;
export type SnapshotHostInfo = Pick<CheckHostInfo, "os" | "platform" | "pretty_name">;
export type CheckSnapshot = Pick<
Check,
| "id"
| "status"
| "responseTime"
| "statusCode"
| "message"
| "createdAt"
| "accessibility"
| "bestPractices"
| "seo"
| "performance"
| "audits"
> & {
cpu?: SnapshotCpuInfo;
memory?: SnapshotMemoryInfo;
disk?: SnapshotDiskInfo[];
host?: SnapshotHostInfo;
};
export interface HasResponseTime {
responseTime: number;
}