aboutsummaryrefslogtreecommitdiffstats
path: root/packages/open-api/hoarder-openapi-spec.json
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2024-12-27 19:21:43 +0000
committerMohamed Bassem <me@mbassem.com>2024-12-27 19:34:04 +0000
commit3f56389f55ef116f8cea17c15c684798fb942290 (patch)
tree1a398accbcfc75674c5cc4970bc85fd27c637911 /packages/open-api/hoarder-openapi-spec.json
parent86d74e3f32dd5bccc8df195b55391e206df9a1c4 (diff)
downloadkarakeep-3f56389f55ef116f8cea17c15c684798fb942290.tar.zst
feat: Add REST APIs for manipulating highlights. Fixes #620
Diffstat (limited to 'packages/open-api/hoarder-openapi-spec.json')
-rw-r--r--packages/open-api/hoarder-openapi-spec.json93
1 files changed, 93 insertions, 0 deletions
diff --git a/packages/open-api/hoarder-openapi-spec.json b/packages/open-api/hoarder-openapi-spec.json
index a984fcc7..26f0a4b7 100644
--- a/packages/open-api/hoarder-openapi-spec.json
+++ b/packages/open-api/hoarder-openapi-spec.json
@@ -292,6 +292,57 @@
"Cursor": {
"type": "string"
},
+ "Highlight": {
+ "type": "object",
+ "properties": {
+ "bookmarkId": {
+ "type": "string"
+ },
+ "startOffset": {
+ "type": "number"
+ },
+ "endOffset": {
+ "type": "number"
+ },
+ "color": {
+ "type": "string",
+ "enum": [
+ "yellow",
+ "red",
+ "green",
+ "blue"
+ ],
+ "default": "yellow"
+ },
+ "text": {
+ "type": "string",
+ "nullable": true
+ },
+ "note": {
+ "type": "string",
+ "nullable": true
+ },
+ "id": {
+ "type": "string"
+ },
+ "userId": {
+ "type": "string"
+ },
+ "createdAt": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "bookmarkId",
+ "startOffset",
+ "endOffset",
+ "text",
+ "note",
+ "id",
+ "userId",
+ "createdAt"
+ ]
+ },
"List": {
"type": "object",
"properties": {
@@ -870,6 +921,48 @@
}
}
},
+ "/bookmarks/{bookmarkId}/highlights": {
+ "get": {
+ "description": "Get highlights of a bookmark",
+ "summary": "Get highlights of a bookmark",
+ "tags": [
+ "Bookmarks"
+ ],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/BookmarkId"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The list of highlights",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "highlights": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Highlight"
+ }
+ }
+ },
+ "required": [
+ "highlights"
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/lists": {
"get": {
"description": "Get all lists",