From 5ecdc36b7d60aa66b49e01e9fec8ba61ad537376 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Thu, 2 Jan 2025 13:00:58 +0200 Subject: feat: Add support for smart lists (#802) * feat: Add support for smart lists * i18n * Fix update list endpoint * Add a test for smart lists * Add header to the query explainer * Hide remove from lists in the smart context list * Add proper validation to list form --------- Co-authored-by: Deepak Kapoor <41769111+orthdron@users.noreply.github.com> --- apps/cli/src/commands/lists.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'apps/cli/src') diff --git a/apps/cli/src/commands/lists.ts b/apps/cli/src/commands/lists.ts index 4b157cdf..57b6d948 100644 --- a/apps/cli/src/commands/lists.ts +++ b/apps/cli/src/commands/lists.ts @@ -89,9 +89,17 @@ listsCmd .action(async (opts) => { const api = getAPIClient(); try { - const results = await api.lists.get.query({ listId: opts.list }); + let resp = await api.bookmarks.getBookmarks.query({ listId: opts.list }); + let results: string[] = resp.bookmarks.map((b) => b.id); + while (resp.nextCursor) { + resp = await api.bookmarks.getBookmarks.query({ + listId: opts.list, + cursor: resp.nextCursor, + }); + results = [...results, ...resp.bookmarks.map((b) => b.id)]; + } - printObject(results.bookmarks); + printObject(results); } catch (error) { printErrorMessageWithReason( "Failed to get the ids of the bookmarks in the list", -- cgit v1.2.3-70-g09d2