diff options
Diffstat (limited to 'packages/open-api/lib/bookmarks.ts')
| -rw-r--r-- | packages/open-api/lib/bookmarks.ts | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/packages/open-api/lib/bookmarks.ts b/packages/open-api/lib/bookmarks.ts index 57b50a9b..b2159570 100644 --- a/packages/open-api/lib/bookmarks.ts +++ b/packages/open-api/lib/bookmarks.ts @@ -16,7 +16,6 @@ import { import { AssetIdSchema } from "./assets"; import { BearerAuth } from "./common"; import { ErrorSchema } from "./errors"; -import { HighlightSchema } from "./highlights"; import { BookmarkSchema, IncludeContentSearchParamSchema, @@ -24,6 +23,7 @@ import { PaginationSchema, } from "./pagination"; import { TagIdSchema } from "./tags"; +import { HighlightSchema, ListSchema } from "./types"; export const registry = new OpenAPIRegistry(); extendZodWithOpenApi(z); @@ -339,6 +339,36 @@ registry.registerPath({ registry.registerPath({ method: "get", + path: "/bookmarks/{bookmarkId}/lists", + description: "Get lists of a bookmark", + summary: "Get lists of a bookmark", + tags: ["Bookmarks"], + security: [{ [BearerAuth.name]: [] }], + request: { + params: z.object({ bookmarkId: BookmarkIdSchema }), + }, + responses: { + 200: { + description: "The list of highlights", + content: { + "application/json": { + schema: z.object({ lists: z.array(ListSchema) }), + }, + }, + }, + 404: { + description: "Bookmark not found", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, + }, +}); + +registry.registerPath({ + method: "get", path: "/bookmarks/{bookmarkId}/highlights", description: "Get highlights of a bookmark", summary: "Get highlights of a bookmark", |
