diff options
| author | erik-nilcoast <138068205+erik-nilcoast@users.noreply.github.com> | 2025-03-09 10:18:46 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-09 15:18:46 +0000 |
| commit | 9fb80514773d63115a5b41787b339670326bb763 (patch) | |
| tree | d88c6e8b57336dbec0803974dd1f5b0205cdd4a9 /packages/open-api/lib/bookmarks.ts | |
| parent | 80a808048340f7f5e95e71c4ee649fdae7c8c565 (diff) | |
| download | karakeep-9fb80514773d63115a5b41787b339670326bb763.tar.zst | |
feat: Expose bookmark summarization in the API (#1088)
Proxy to the TRPC Summarize mutation for use in the public API
Diffstat (limited to 'packages/open-api/lib/bookmarks.ts')
| -rw-r--r-- | packages/open-api/lib/bookmarks.ts | 23 |
1 files changed, 23 insertions, 0 deletions
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 @@ -199,6 +199,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", description: "Attach tags to a bookmark", summary: "Attach tags to a bookmark", |
