You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
489 B
31 lines
489 B
import z from "zod";
|
|
|
|
const qualityTypes = [
|
|
"maxres",
|
|
"maxresdefault",
|
|
"sddefault",
|
|
"high",
|
|
"medium",
|
|
"default",
|
|
"start",
|
|
"middle",
|
|
"end"
|
|
] as const;
|
|
|
|
export const AuthorThumbnailModel = z.object({
|
|
url: z.string(),
|
|
width: z.number(),
|
|
height: z.number()
|
|
});
|
|
|
|
export const ThumbnailModel = z.object({
|
|
url: z.string().url(),
|
|
width: z.number(),
|
|
height: z.number(),
|
|
quality: z.enum(qualityTypes)
|
|
});
|
|
|
|
type Thumbnail = z.infer<typeof ThumbnailModel>;
|
|
|
|
export default Thumbnail;
|