2024-10-13 15:25:30 -07:00
|
|
|
import * as v from 'valibot';
|
2024-08-28 04:43:23 -07:00
|
|
|
|
2024-10-29 14:26:53 -07:00
|
|
|
/**
|
|
|
|
* @category Schemas
|
|
|
|
*/
|
2024-10-13 15:25:30 -07:00
|
|
|
const bookmarkFolderSchema = v.object({
|
2024-10-14 13:50:34 -07:00
|
|
|
id: v.pipe(v.unknown(), v.transform(String)),
|
2024-10-13 15:25:30 -07:00
|
|
|
name: v.fallback(v.string(), ''),
|
|
|
|
emoji: v.fallback(v.nullable(v.string()), null),
|
|
|
|
emoji_url: v.fallback(v.nullable(v.string()), null),
|
2024-08-28 04:43:23 -07:00
|
|
|
});
|
|
|
|
|
2024-10-13 15:25:30 -07:00
|
|
|
type BookmarkFolder = v.InferOutput<typeof bookmarkFolderSchema>;
|
2024-08-28 04:43:23 -07:00
|
|
|
|
|
|
|
export { bookmarkFolderSchema, type BookmarkFolder };
|