aboutsummaryrefslogtreecommitdiffstats
path: root/packages/shared
diff options
context:
space:
mode:
Diffstat (limited to 'packages/shared')
-rw-r--r--packages/shared/types/bookmarks.ts6
-rw-r--r--packages/shared/types/highlights.ts2
-rw-r--r--packages/shared/types/pagination.ts6
3 files changed, 9 insertions, 5 deletions
diff --git a/packages/shared/types/bookmarks.ts b/packages/shared/types/bookmarks.ts
index 359ff7c4..41f689cd 100644
--- a/packages/shared/types/bookmarks.ts
+++ b/packages/shared/types/bookmarks.ts
@@ -1,5 +1,6 @@
import { z } from "zod";
+import { zCursorV2 } from "./pagination";
import { zBookmarkTagSchema } from "./tags";
const MAX_TITLE_LENGTH = 250;
@@ -147,11 +148,6 @@ export type ZNewBookmarkRequest = z.infer<typeof zNewBookmarkRequestSchema>;
export const DEFAULT_NUM_BOOKMARKS_PER_PAGE = 20;
export const MAX_NUM_BOOKMARKS_PER_PAGE = 100;
-export const zCursorV2 = z.object({
- createdAt: z.date(),
- id: z.string(),
-});
-
export const zGetBookmarksRequestSchema = z.object({
ids: z.array(z.string()).optional(),
archived: z.boolean().optional(),
diff --git a/packages/shared/types/highlights.ts b/packages/shared/types/highlights.ts
index b766c360..9bda6029 100644
--- a/packages/shared/types/highlights.ts
+++ b/packages/shared/types/highlights.ts
@@ -1,5 +1,7 @@
import { z } from "zod";
+export const DEFAULT_NUM_HIGHLIGHTS_PER_PAGE = 20;
+
const zHighlightColorSchema = z.enum(["yellow", "red", "green", "blue"]);
export type ZHighlightColor = z.infer<typeof zHighlightColorSchema>;
export const SUPPORTED_HIGHLIGHT_COLORS = zHighlightColorSchema.options;
diff --git a/packages/shared/types/pagination.ts b/packages/shared/types/pagination.ts
new file mode 100644
index 00000000..d2312982
--- /dev/null
+++ b/packages/shared/types/pagination.ts
@@ -0,0 +1,6 @@
+import { z } from "zod";
+
+export const zCursorV2 = z.object({
+ createdAt: z.date(),
+ id: z.string(),
+});