From 75d315dda4232ee3b89abf054f0b6ee10105ffe3 Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Fri, 1 Mar 2024 18:00:58 +0000 Subject: feature: Add support for creating and updating lists --- packages/web/lib/types/api/lists.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 packages/web/lib/types/api/lists.ts (limited to 'packages/web/lib') diff --git a/packages/web/lib/types/api/lists.ts b/packages/web/lib/types/api/lists.ts new file mode 100644 index 00000000..4b0ccaca --- /dev/null +++ b/packages/web/lib/types/api/lists.ts @@ -0,0 +1,18 @@ +import { z } from "zod"; + +export const zBookmarkListSchema = z.object({ + id: z.string(), + name: z.string(), + icon: z.string(), +}); + +export const zBookmarkListWithBookmarksSchema = zBookmarkListSchema.merge( + z.object({ + bookmarks: z.array(z.string()), + }), +); + +export type ZBookmarkList = z.infer; +export type ZBookmarkListWithBookmarks = z.infer< + typeof zBookmarkListWithBookmarksSchema +>; -- cgit v1.2.3-70-g09d2