From fd9763417baf1aa02140761ea69a179c3dab6b53 Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Tue, 23 Jun 2026 15:18:00 +0200 Subject: [PATCH] feat: add library artifact model --- .../artifacts-library/model/artifact.ts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 surfsense_web/features/artifacts-library/model/artifact.ts diff --git a/surfsense_web/features/artifacts-library/model/artifact.ts b/surfsense_web/features/artifacts-library/model/artifact.ts new file mode 100644 index 000000000..577d15bf2 --- /dev/null +++ b/surfsense_web/features/artifacts-library/model/artifact.ts @@ -0,0 +1,21 @@ +/** Deliverable kinds surfaced in the search-space-wide artifacts library. */ +export type LibraryArtifactKind = "report" | "resume" | "podcast" | "video" | "image"; + +export type LibraryArtifactStatus = "ready" | "running" | "error"; + +/** + * A deliverable aggregated from the search space's list endpoints. The heavy + * content (report body, audio, video frames, image bytes) is fetched lazily by + * the viewer when a card is opened. + */ +export interface LibraryArtifact { + /** Stable list key — `${kind}-${entityId}`. */ + key: string; + kind: LibraryArtifactKind; + entityId: number; + title: string; + status: LibraryArtifactStatus; + createdAt: string; + /** Report panel content type — "typst" for resumes, "markdown" otherwise. */ + contentType: "markdown" | "typst"; +}