From f949c1c36ba323e2a05526bc4cf29400a2c9641c Mon Sep 17 00:00:00 2001 From: Ritesh Ghosh Date: Wed, 2 Aug 2023 21:10:36 +0530 Subject: feat(anime): added anime search result & most popular anime types --- src/models/anime.ts | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/models/anime.ts b/src/models/anime.ts index 90e10d2..511202e 100644 --- a/src/models/anime.ts +++ b/src/models/anime.ts @@ -1,3 +1,5 @@ +import { HttpError } from "http-errors"; + export interface Anime { id: string | null; name: string | null; @@ -5,7 +7,10 @@ export interface Anime { duration: string | null; type: string | null; rating: string | null; - episodes: string | null; + episodes: { + sub: number | null; + dub: number | null; + }; } type CommonAnimeProps = "id" | "name" | "poster"; @@ -20,6 +25,19 @@ export interface Top10Anime extends Pick { export type Top10AnimeTimePeriod = "day" | "week" | "month"; +export interface AnimeSearchResult { + animes: Array | HttpError; + mostPopularAnimes: Array | HttpError; + totalPages: number; + currentPage: number; + hasNextPage: boolean; +} + +export interface MostPopularAnime extends Pick { + jname: string | null; + otherInfo: string[] | []; +} + export type AnimeCategories = | "most-favorite" | "most-popular" -- cgit v1.2.3