diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/models/anime.ts | 20 |
1 files changed, 19 insertions, 1 deletions
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<Anime, CommonAnimeProps> { export type Top10AnimeTimePeriod = "day" | "week" | "month"; +export interface AnimeSearchResult { + animes: Array<Anime> | HttpError; + mostPopularAnimes: Array<MostPopularAnime> | HttpError; + totalPages: number; + currentPage: number; + hasNextPage: boolean; +} + +export interface MostPopularAnime extends Pick<Anime, CommonAnimeProps> { + jname: string | null; + otherInfo: string[] | []; +} + export type AnimeCategories = | "most-favorite" | "most-popular" |
