From 2defc2475fc36635c45a449a44669048871864f6 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sun, 12 Oct 2025 22:41:56 +0100 Subject: feat: Add source field to track bookmark creation sources (#2037) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add source field to track bookmark creation sources Add a new 'source' field to the bookmarks table to track where bookmarks were created from. Possible values: api, web, cli, mobile, singlefile, rss. Changes: - Add source field to bookmarks table schema - Update Zod schemas to include source field - Update tRPC createBookmark procedure to store source - Update all callsites to pass appropriate source value: - api: Default to "api" if not provided - singlefile: Set to "singlefile" - rss: Set to "rss" in feedWorker - cli: Set to "cli" - mobile: Set to "mobile" in all mobile app bookmark creation - browser-extension: Set to "web" - web: Set to "web" in all web app bookmark creation - Create migration file for database schema change Fixes #2036 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Mohamed Bassem * feat: Add extension source type for browser extension - Add 'extension' to bookmark source enum - Update browser extension to use 'extension' instead of 'web' Co-authored-by: Mohamed Bassem * fix CI * fix CI * fix the migration file * add import source * make source nullish --------- Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Mohamed Bassem --- packages/open-api/karakeep-openapi-spec.json | 55 ++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) (limited to 'packages/open-api') diff --git a/packages/open-api/karakeep-openapi-spec.json b/packages/open-api/karakeep-openapi-spec.json index 21dda7bc..0b520b00 100644 --- a/packages/open-api/karakeep-openapi-spec.json +++ b/packages/open-api/karakeep-openapi-spec.json @@ -94,6 +94,20 @@ "type": "string", "nullable": true }, + "source": { + "type": "string", + "nullable": true, + "enum": [ + "api", + "web", + "cli", + "mobile", + "extension", + "singlefile", + "rss", + "import" + ] + }, "tags": { "type": "array", "items": { @@ -696,6 +710,19 @@ }, "importSessionId": { "type": "string" + }, + "source": { + "type": "string", + "enum": [ + "api", + "web", + "cli", + "mobile", + "extension", + "singlefile", + "rss", + "import" + ] } } }, @@ -1148,6 +1175,20 @@ "summary": { "type": "string", "nullable": true + }, + "source": { + "type": "string", + "nullable": true, + "enum": [ + "api", + "web", + "cli", + "mobile", + "extension", + "singlefile", + "rss", + "import" + ] } }, "required": [ @@ -1258,6 +1299,20 @@ "summary": { "type": "string", "nullable": true + }, + "source": { + "type": "string", + "nullable": true, + "enum": [ + "api", + "web", + "cli", + "mobile", + "extension", + "singlefile", + "rss", + "import" + ] } }, "required": [ -- cgit v1.2.3-70-g09d2