aboutsummaryrefslogtreecommitdiffstats
path: root/packages/shared
diff options
context:
space:
mode:
authorMohamedBassem <me@mbassem.com>2024-10-05 19:22:45 +0000
committerMohamedBassem <me@mbassem.com>2024-10-05 20:09:54 +0000
commit99c6232fde898932d77bab166934f59d3c56d7d1 (patch)
tree5899021619f8021d70c98506a522bb6b2516ea06 /packages/shared
parentc01732845408f209dd8dcaa0be942c5609239556 (diff)
downloadkarakeep-99c6232fde898932d77bab166934f59d3c56d7d1.tar.zst
fix: Drop the usage of useCursorV2 from the server
Diffstat (limited to 'packages/shared')
-rw-r--r--packages/shared/types/bookmarks.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/shared/types/bookmarks.ts b/packages/shared/types/bookmarks.ts
index e5389fe6..86bbbc1a 100644
--- a/packages/shared/types/bookmarks.ts
+++ b/packages/shared/types/bookmarks.ts
@@ -129,17 +129,17 @@ export const zGetBookmarksRequestSchema = z.object({
tagId: z.string().optional(),
listId: z.string().optional(),
limit: z.number().max(MAX_NUM_BOOKMARKS_PER_PAGE).optional(),
- cursor: zCursorV2.or(z.date()).nullish(),
- // TODO: Remove this field once all clients are updated to use the new cursor structure.
- // This is done for backward comptability. If a client doesn't send this field, we'll assume it's an old client
- // and repsond with the old cursor structure. Once all clients are updated, we can remove this field and drop the old cursor structure.
+ cursor: zCursorV2.nullish(),
+ // TODO: This was done for backward comptability. At this point, all clients should be settings this to true.
+ // The value is currently not being used, but keeping it so that client can still set it to true for older
+ // servers.
useCursorV2: z.boolean().optional(),
});
export type ZGetBookmarksRequest = z.infer<typeof zGetBookmarksRequestSchema>;
export const zGetBookmarksResponseSchema = z.object({
bookmarks: z.array(zBookmarkSchema),
- nextCursor: zCursorV2.or(z.date()).nullable(),
+ nextCursor: zCursorV2.nullable(),
});
export type ZGetBookmarksResponse = z.infer<typeof zGetBookmarksResponseSchema>;