mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-18 13:42:06 +00:00
Co-authored-by: JellyBrick <shlee1503@naver.com> Co-authored-by: Angelos Bouklis <angelbouklis.official@gmail.com> Co-authored-by: Angelos Bouklis <me@arjix.dev> Co-authored-by: Angelos Bouklis <53124886+ArjixWasTaken@users.noreply.github.com>
27 lines
760 B
TypeScript
27 lines
760 B
TypeScript
import { z } from '@hono/zod-openapi';
|
|
|
|
import { MediaType } from '@/providers/song-info';
|
|
|
|
export type ResponseSongInfo = z.infer<typeof SongInfoSchema>;
|
|
export const SongInfoSchema = z.object({
|
|
title: z.string(),
|
|
artist: z.string(),
|
|
views: z.number(),
|
|
uploadDate: z.string().optional(),
|
|
imageSrc: z.string().nullable().optional(),
|
|
isPaused: z.boolean().optional(),
|
|
songDuration: z.number(),
|
|
elapsedSeconds: z.number().optional(),
|
|
url: z.string().optional(),
|
|
album: z.string().nullable().optional(),
|
|
videoId: z.string(),
|
|
playlistId: z.string().optional(),
|
|
mediaType: z.enum([
|
|
MediaType.Audio,
|
|
MediaType.OriginalMusicVideo,
|
|
MediaType.UserGeneratedContent,
|
|
MediaType.PodcastEpisode,
|
|
MediaType.OtherVideo,
|
|
]),
|
|
});
|