refactor: tighten support log tail types

This commit is contained in:
Gustavo Madeira Santana
2026-04-22 17:24:49 -04:00
parent 174726e28a
commit 9c819d94c8

View File

@@ -132,18 +132,24 @@ type ConfigExport = {
sanitized?: unknown;
};
type SanitizedLogTail = {
status: "included" | "failed";
type IncludedSanitizedLogTail = {
status: "included";
file: string;
cursor: number;
size: number;
lineCount: number;
truncated: boolean;
reset: boolean;
error?: string;
lines: Array<Record<string, unknown>>;
};
type FailedSanitizedLogTail = Omit<IncludedSanitizedLogTail, "status"> & {
status: "failed";
error: string;
};
type SanitizedLogTail = IncludedSanitizedLogTail | FailedSanitizedLogTail;
type SupportSnapshotStatus =
| {
status: "included";