From 9fb80514773d63115a5b41787b339670326bb763 Mon Sep 17 00:00:00 2001 From: erik-nilcoast <138068205+erik-nilcoast@users.noreply.github.com> Date: Sun, 9 Mar 2025 10:18:46 -0500 Subject: feat: Expose bookmark summarization in the API (#1088) Proxy to the TRPC Summarize mutation for use in the public API --- packages/open-api/lib/bookmarks.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'packages/open-api/lib/bookmarks.ts') diff --git a/packages/open-api/lib/bookmarks.ts b/packages/open-api/lib/bookmarks.ts index c7c05256..a1ab1353 100644 --- a/packages/open-api/lib/bookmarks.ts +++ b/packages/open-api/lib/bookmarks.ts @@ -197,6 +197,29 @@ registry.registerPath({ }, }); +registry.registerPath({ + method: "post", + path: "/bookmarks/{bookmarkId}/summarize", + description: + "Attaches a summary to the bookmark and returns the updated record.", + summary: "Summarize a bookmark", + tags: ["Bookmarks"], + security: [{ [BearerAuth.name]: [] }], + request: { + params: z.object({ bookmarkId: BookmarkIdSchema }), + }, + responses: { + 200: { + description: "The updated bookmark with summary", + content: { + "application/json": { + schema: zBareBookmarkSchema, + }, + }, + }, + }, +}); + registry.registerPath({ method: "post", path: "/bookmarks/{bookmarkId}/tags", -- cgit v1.2.3-70-g09d2