import { z } from "zod";

export const MetadataSearchQuery = z.object({
	title: z.string(),
	year: z.string(),
});
export type MetadataSearchQuery = z.infer<typeof MetadataSearchQuery>;

export const MetadataSearchResultItem = z.object({
	id: z.number(),
	title: z.string().optional(),
	originalTitle: z.string().optional(),
	posterPath: z.string().nullable().optional(),
	releaseDate: z.string().optional(),
	originalLanguage: z.string(),
});

export type MetadataSearchResultItem = z.infer<typeof MetadataSearchResultItem>;

export const MetadataSearchResult = z.object({
	results: z.array(MetadataSearchResultItem),
});

export type MetadataSearchResult = z.infer<typeof MetadataSearchResult>;
