import { z } from 'https://deno.land/x/zod@v3.22.4/mod.ts' export const Identifiable = z.object({ id: z.string().uuid(), }) export type TIdentifiable = z.infer export const Verse = z.object({ content: z.string(), }) export type TVerse = z.infer export const Map = z.object({ verseKeys: z.array(z.string()), }) export type TMap = z.infer export const Song = Identifiable.merge(z.object({ title: z.string(), verses: z.record(z.string(), Verse), maps: z.record(z.string(), Map), })) export type TSong = z.infer export const PlaylistEntry = z.object({ songKey: z.string().uuid(), mapKey: z.string(), }) export type TPlaylistEntry = z.infer export const Playlist = Identifiable.merge(z.object({ entries: z.array(PlaylistEntry), })) export type TPlaylist = z.infer export const Display = Identifiable.merge(z.object({ playlistKey: z.string().uuid(), songKeyIndex: z.number(), })) export type TDisplay = z.infer