feat(backend): recordings — expose transcription, keyword search, date range, speaker summary

- getRecent now returns transcription; new filters q (ILIKE on transcription
  + username) and startDate/endDate (created_at range, epoch ms)
- new recordings.summary: per-speaker leaderboard (clips, est_duration_s from
  128kbps bytes, transcribed words, last activity)
- oRPC list input + summary procedure wired
This commit is contained in:
asepharyana
2026-08-30 13:31:39 +07:00
parent a3a91aa2ce
commit 22c09ecd28
2 changed files with 103 additions and 6 deletions
+7
View File
@@ -296,6 +296,9 @@ const recordingsRouter = {
channelId: z.string().optional(),
userId: z.string().optional(),
cursor: z.string().optional(),
q: z.string().optional(),
startDate: z.coerce.number().int().optional(),
endDate: z.coerce.number().int().optional(),
}),
)
.handler(({ input }) =>
@@ -303,12 +306,16 @@ const recordingsRouter = {
channelId: input.channelId,
userId: input.userId,
cursor: input.cursor,
q: input.q,
startDate: input.startDate,
endDate: input.endDate,
}),
),
delete: os.input(z.object({ id: z.string() })).handler(async ({ input }) => {
await recordingsService.deleteById(input.id);
return { ok: true };
}),
summary: os.handler(async () => recordingsService.getSummary()),
};
// ── Analysis (search) ──────────────────────────────────────────────