▍ humdrum codex / soft
411 B raw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { z } from "zod";

// A cached fetch result for one source. payload shape depends on the source kind
// (validated by that module's payloadSchema before storage).
export const Snapshot = z.object({
  id: z.string(),
  sourceId: z.string(),
  payload: z.unknown(),
  fetchedAt: z.string().datetime(),
  ok: z.boolean(),
  error: z.string().nullable(),
});
export type Snapshot = z.infer<typeof Snapshot>;