bigbuffet-rw/packages/pl-api/lib/entities/bookmark-folder.ts
marcin mikołajczak 0bed543c20 pl-api: moar blind search and replace
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-10-14 22:50:34 +02:00

12 lines
387 B
TypeScript

import * as v from 'valibot';
const bookmarkFolderSchema = v.object({
id: v.pipe(v.unknown(), v.transform(String)),
name: v.fallback(v.string(), ''),
emoji: v.fallback(v.nullable(v.string()), null),
emoji_url: v.fallback(v.nullable(v.string()), null),
});
type BookmarkFolder = v.InferOutput<typeof bookmarkFolderSchema>;
export { bookmarkFolderSchema, type BookmarkFolder };