feat(core,server): log feed, titles on changes, work titles on copies

GET log (engagements and listens, keyset over at/kind/id), listChanges
title and intoTitle, listCopies workTitle, all via batched lookups.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Lucas Winther
2026-10-30 22:11:53 +01:00
co-authored by Claude Opus 5.5
parent 5fa59310f3
commit c2e8c83f86
12 changed files with 561 additions and 7 deletions
+2
View File
@@ -8,6 +8,7 @@ import { engagementRoutes } from "./routes/engagements.ts";
import { entryRoutes } from "./routes/entries.ts";
import { exportRoutes } from "./routes/export.ts";
import { listRoutes } from "./routes/lists.ts";
import { logRoutes } from "./routes/log.ts";
import { metaRoutes } from "./routes/meta.ts";
import { sourceRoutes } from "./routes/sources.ts";
import { workRoutes } from "./routes/works.ts";
@@ -26,6 +27,7 @@ export function createApp(deps: AppDeps): App {
...engagementRoutes,
...workRoutes,
...listRoutes,
...logRoutes,
...copyRoutes,
...customFieldRoutes,
...attachmentRoutes,
+15
View File
@@ -0,0 +1,15 @@
import { listLog } from "@sttracker/core/log";
import { z } from "zod";
import { route } from "../http.ts";
import { qInt } from "./schemas.ts";
export const logRoutes = [
route({
method: "GET",
path: "log",
summary: "Your Log: engagements and listens, newest first (keyset cursor).",
auth: "any:read",
query: z.object({ limit: qInt.optional(), cursor: z.string().max(2000).optional() }),
handler: async ({ deps, user, query }) => listLog(deps.db, user.id, query),
}),
];