aboutsummaryrefslogtreecommitdiff
path: root/src/types
diff options
context:
space:
mode:
Diffstat (limited to 'src/types')
-rw-r--r--src/types/anime.ts140
-rw-r--r--src/types/controllers/animeAboutInfo.ts3
-rw-r--r--src/types/controllers/animeCategory.ts7
-rw-r--r--src/types/controllers/animeEpisodeSrcs.ts7
-rw-r--r--src/types/controllers/animeEpisodes.ts3
-rw-r--r--src/types/controllers/animeGenre.ts7
-rw-r--r--src/types/controllers/animeProducer.ts7
-rw-r--r--src/types/controllers/animeSearch.ts20
-rw-r--r--src/types/controllers/animeSearchSuggestion.ts3
-rw-r--r--src/types/controllers/episodeServers.ts3
-rw-r--r--src/types/controllers/estimatedSchedule.ts3
-rw-r--r--src/types/controllers/index.ts10
-rw-r--r--src/types/extractor.ts18
-rw-r--r--src/types/parsers/animeAboutInfo.ts19
-rw-r--r--src/types/parsers/animeCategory.ts22
-rw-r--r--src/types/parsers/animeEpisodeSrcs.ts12
-rw-r--r--src/types/parsers/animeEpisodes.ts6
-rw-r--r--src/types/parsers/animeGenre.ts11
-rw-r--r--src/types/parsers/animeProducer.ts8
-rw-r--r--src/types/parsers/animeSearch.ts14
-rw-r--r--src/types/parsers/animeSearchSuggestion.ts6
-rw-r--r--src/types/parsers/episodeServers.ts9
-rw-r--r--src/types/parsers/estimatedSchedule.ts13
-rw-r--r--src/types/parsers/homePage.ts24
-rw-r--r--src/types/parsers/index.ts25
25 files changed, 0 insertions, 400 deletions
diff --git a/src/types/anime.ts b/src/types/anime.ts
deleted file mode 100644
index 83a3d1f..0000000
--- a/src/types/anime.ts
+++ /dev/null
@@ -1,140 +0,0 @@
-export interface Anime {
- id: string | null;
- name: string | null;
- jname: string | null;
- poster: string | null;
- duration: string | null;
- type: string | null;
- rating: string | null;
- episodes: {
- sub: number | null;
- dub: number | null;
- };
-}
-
-type CommonAnimeProps = "id" | "name" | "poster";
-
-export interface Top10Anime extends Pick<Anime, CommonAnimeProps | "episodes"> {
- rank: number | null;
- jname: string | null;
-}
-
-export type Top10AnimeTimePeriod = "day" | "week" | "month";
-
-export interface MostPopularAnime
- extends Pick<Anime, CommonAnimeProps | "episodes" | "type"> {
- jname: string | null;
-}
-
-export interface SpotlightAnime
- extends MostPopularAnime,
- Pick<Top10Anime, "rank"> {
- description: string | null;
-}
-
-export interface TrendingAnime
- extends Pick<Anime, CommonAnimeProps>,
- Pick<Top10Anime, "rank"> {}
-
-export interface LatestEpisodeAnime extends Anime {}
-
-export interface TopUpcomingAnime extends Anime {}
-
-export interface TopAiringAnime extends MostPopularAnime {}
-export interface MostFavoriteAnime extends MostPopularAnime {}
-export interface LatestCompletedAnime extends MostPopularAnime {}
-
-export interface AnimeGeneralAboutInfo
- extends Pick<Anime, CommonAnimeProps>,
- Pick<SpotlightAnime, "description"> {
- anilistId: number | null;
- malId: number | null;
- stats: {
- quality: string | null;
- } & Pick<Anime, "duration" | "episodes" | "rating" | "type">;
- promotionalVideos: AnimePromotionalVideo[];
- charactersVoiceActors: AnimeCharactersAndVoiceActors[];
-}
-
-export interface RecommendedAnime extends Anime {}
-
-export interface RelatedAnime extends MostPopularAnime {}
-
-export interface Season extends Pick<Anime, CommonAnimeProps> {
- isCurrent: boolean;
- title: string | null;
-}
-
-export interface AnimePromotionalVideo {
- title: string | undefined;
- source: string | undefined;
- thumbnail: string | undefined;
-}
-
-export interface AnimeCharactersAndVoiceActors {
- character: AnimeCharacter;
- voiceActor: AnimeCharacter;
-}
-
-export interface AnimeCharacter {
- id: string;
- poster: string;
- name: string;
- cast: string;
-}
-
-export interface AnimeSearchSuggestion
- extends Omit<MostPopularAnime, "episodes" | "type"> {
- moreInfo: Array<string>;
-}
-
-export interface AnimeEpisode extends Pick<Season, "title"> {
- episodeId: string | null;
- number: number;
- isFiller: boolean;
-}
-
-export interface SubEpisode {
- serverName: string;
- serverId: number | null;
-}
-export interface DubEpisode extends SubEpisode {}
-export interface RawEpisode extends SubEpisode {}
-
-export type AnimeCategories =
- | "most-favorite"
- | "most-popular"
- | "subbed-anime"
- | "dubbed-anime"
- | "recently-updated"
- | "recently-added"
- | "top-upcoming"
- | "top-airing"
- | "movie"
- | "special"
- | "ova"
- | "ona"
- | "tv"
- | "completed";
-
-export type AnimeServers =
- | "hd-1"
- | "hd-2"
- | "megacloud"
- | "streamsb"
- | "streamtape";
-
-export enum Servers {
- VidStreaming = "hd-1",
- MegaCloud = "megacloud",
- StreamSB = "streamsb",
- StreamTape = "streamtape",
- VidCloud = "hd-2",
- AsianLoad = "asianload",
- GogoCDN = "gogocdn",
- MixDrop = "mixdrop",
- UpCloud = "upcloud",
- VizCloud = "vizcloud",
- MyCloud = "mycloud",
- Filemoon = "filemoon",
-}
diff --git a/src/types/controllers/animeAboutInfo.ts b/src/types/controllers/animeAboutInfo.ts
deleted file mode 100644
index aa65efd..0000000
--- a/src/types/controllers/animeAboutInfo.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export type AnimeAboutInfoQueryParams = {
- id?: string;
-};
diff --git a/src/types/controllers/animeCategory.ts b/src/types/controllers/animeCategory.ts
deleted file mode 100644
index 7de0876..0000000
--- a/src/types/controllers/animeCategory.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-export type CategoryAnimePathParams = {
- category?: string;
-};
-
-export type CategoryAnimeQueryParams = {
- page?: string;
-};
diff --git a/src/types/controllers/animeEpisodeSrcs.ts b/src/types/controllers/animeEpisodeSrcs.ts
deleted file mode 100644
index 0e82539..0000000
--- a/src/types/controllers/animeEpisodeSrcs.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { type AnimeServers } from "../anime.js";
-
-export type AnimeEpisodeSrcsQueryParams = {
- id?: string;
- server?: AnimeServers;
- category?: "sub" | "dub";
-};
diff --git a/src/types/controllers/animeEpisodes.ts b/src/types/controllers/animeEpisodes.ts
deleted file mode 100644
index 481eb87..0000000
--- a/src/types/controllers/animeEpisodes.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export type AnimeEpisodePathParams = {
- animeId?: string;
-};
diff --git a/src/types/controllers/animeGenre.ts b/src/types/controllers/animeGenre.ts
deleted file mode 100644
index 038d15e..0000000
--- a/src/types/controllers/animeGenre.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-export type GenreAnimePathParams = {
- name?: string;
-};
-
-export type GenreAnimeQueryParams = {
- page?: string;
-};
diff --git a/src/types/controllers/animeProducer.ts b/src/types/controllers/animeProducer.ts
deleted file mode 100644
index 7f8a9a7..0000000
--- a/src/types/controllers/animeProducer.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-export type AnimeProducerPathParams = {
- name?: string;
-};
-
-export type AnimeProducerQueryParams = {
- page?: string;
-};
diff --git a/src/types/controllers/animeSearch.ts b/src/types/controllers/animeSearch.ts
deleted file mode 100644
index fccb243..0000000
--- a/src/types/controllers/animeSearch.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-export type AnimeSearchQueryParams = {
- q?: string;
- page?: string;
- type?: string;
- status?: string;
- rated?: string;
- score?: string;
- season?: string;
- language?: string;
- start_date?: string;
- end_date?: string;
- sort?: string;
- genres?: string;
-};
-
-export type SearchFilters = Omit<AnimeSearchQueryParams, "q" | "page">;
-
-export type FilterKeys = Partial<
- keyof Omit<SearchFilters, "start_date" | "end_date">
->;
diff --git a/src/types/controllers/animeSearchSuggestion.ts b/src/types/controllers/animeSearchSuggestion.ts
deleted file mode 100644
index 491daa0..0000000
--- a/src/types/controllers/animeSearchSuggestion.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export type AnimeSearchSuggestQueryParams = {
- q?: string;
-};
diff --git a/src/types/controllers/episodeServers.ts b/src/types/controllers/episodeServers.ts
deleted file mode 100644
index d711a40..0000000
--- a/src/types/controllers/episodeServers.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export type EpisodeServersQueryParams = {
- episodeId?: string;
-};
diff --git a/src/types/controllers/estimatedSchedule.ts b/src/types/controllers/estimatedSchedule.ts
deleted file mode 100644
index e732aaa..0000000
--- a/src/types/controllers/estimatedSchedule.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export type EstimatedScheduleQueryParams = {
- date?: string;
-};
diff --git a/src/types/controllers/index.ts b/src/types/controllers/index.ts
deleted file mode 100644
index 14876e2..0000000
--- a/src/types/controllers/index.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-export type * from "./animeGenre.js";
-export type * from "./animeCategory.js";
-export type * from "./animeProducer.js";
-export type * from "./animeSearch.js";
-export type * from "./animeEpisodes.js";
-export type * from "./episodeServers.js";
-export type * from "./animeAboutInfo.js";
-export type * from "./animeEpisodeSrcs.js";
-export type * from "./estimatedSchedule.js";
-export type * from "./animeSearchSuggestion.js";
diff --git a/src/types/extractor.ts b/src/types/extractor.ts
deleted file mode 100644
index 71c6be1..0000000
--- a/src/types/extractor.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-export interface Video {
- url: string;
- quality?: string;
- isM3U8?: boolean;
- size?: number;
- [x: string]: unknown;
-}
-
-export interface Subtitle {
- id?: string;
- url: string;
- lang: string;
-}
-
-export interface Intro {
- start: number;
- end: number;
-}
diff --git a/src/types/parsers/animeAboutInfo.ts b/src/types/parsers/animeAboutInfo.ts
deleted file mode 100644
index 274e7c2..0000000
--- a/src/types/parsers/animeAboutInfo.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import type {
- Season,
- RelatedAnime,
- RecommendedAnime,
- AnimeGeneralAboutInfo,
-} from "../anime.js";
-import { type HttpError } from "http-errors";
-import { type ScrapedAnimeSearchResult } from "./animeSearch.js";
-
-export interface ScrapedAnimeAboutInfo
- extends Pick<ScrapedAnimeSearchResult, "mostPopularAnimes"> {
- anime: {
- info: AnimeGeneralAboutInfo;
- moreInfo: Record<string, string | string[]>;
- };
- seasons: Array<Season>;
- relatedAnimes: Array<RelatedAnime> | HttpError;
- recommendedAnimes: Array<RecommendedAnime> | HttpError;
-}
diff --git a/src/types/parsers/animeCategory.ts b/src/types/parsers/animeCategory.ts
deleted file mode 100644
index 89c56f0..0000000
--- a/src/types/parsers/animeCategory.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import type { HttpError } from "http-errors";
-import type { Anime, Top10Anime } from "../anime.js";
-
-export interface ScrapedAnimeCategory {
- animes: Array<Anime> | HttpError;
- genres: Array<string>;
- top10Animes: {
- today: Array<Top10Anime> | HttpError;
- week: Array<Top10Anime> | HttpError;
- month: Array<Top10Anime> | HttpError;
- };
- category: string;
- totalPages: number;
- currentPage: number;
- hasNextPage: boolean;
-}
-
-export type CommonAnimeScrapeTypes =
- | "animes"
- | "totalPages"
- | "hasNextPage"
- | "currentPage";
diff --git a/src/types/parsers/animeEpisodeSrcs.ts b/src/types/parsers/animeEpisodeSrcs.ts
deleted file mode 100644
index ef58ed3..0000000
--- a/src/types/parsers/animeEpisodeSrcs.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import type { Intro, Subtitle, Video } from "../extractor.js";
-
-export interface ScrapedAnimeEpisodesSources {
- headers?: {
- [k: string]: string;
- };
- intro?: Intro;
- subtitles?: Subtitle[];
- sources: Video[];
- download?: string;
- embedURL?: string;
-}
diff --git a/src/types/parsers/animeEpisodes.ts b/src/types/parsers/animeEpisodes.ts
deleted file mode 100644
index 3587573..0000000
--- a/src/types/parsers/animeEpisodes.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { type AnimeEpisode } from "../anime.js";
-
-export interface ScrapedAnimeEpisodes {
- totalEpisodes: number;
- episodes: Array<AnimeEpisode>;
-}
diff --git a/src/types/parsers/animeGenre.ts b/src/types/parsers/animeGenre.ts
deleted file mode 100644
index 10f8b85..0000000
--- a/src/types/parsers/animeGenre.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import type {
- ScrapedAnimeCategory,
- CommonAnimeScrapeTypes,
-} from "./animeCategory.js";
-import { type ScrapedHomePage } from "./homePage.js";
-
-export interface ScrapedGenreAnime
- extends Pick<ScrapedAnimeCategory, CommonAnimeScrapeTypes | "genres">,
- Pick<ScrapedHomePage, "topAiringAnimes"> {
- genreName: string;
-}
diff --git a/src/types/parsers/animeProducer.ts b/src/types/parsers/animeProducer.ts
deleted file mode 100644
index bcd784e..0000000
--- a/src/types/parsers/animeProducer.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import type { ScrapedHomePage } from "./homePage.js";
-import type { ScrapedAnimeCategory } from "./animeCategory.js";
-
-export interface ScrapedProducerAnime
- extends Omit<ScrapedAnimeCategory, "genres" | "category">,
- Pick<ScrapedHomePage, "topAiringAnimes"> {
- producerName: string;
-}
diff --git a/src/types/parsers/animeSearch.ts b/src/types/parsers/animeSearch.ts
deleted file mode 100644
index 7e641ea..0000000
--- a/src/types/parsers/animeSearch.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import type {
- ScrapedAnimeCategory,
- CommonAnimeScrapeTypes,
-} from "./animeCategory.js";
-import type { HttpError } from "http-errors";
-import type { MostPopularAnime } from "../anime.js";
-import type { SearchFilters } from "../controllers/animeSearch.js";
-
-export interface ScrapedAnimeSearchResult
- extends Pick<ScrapedAnimeCategory, CommonAnimeScrapeTypes> {
- mostPopularAnimes: Array<MostPopularAnime> | HttpError;
- searchQuery: string;
- searchFilters: SearchFilters;
-}
diff --git a/src/types/parsers/animeSearchSuggestion.ts b/src/types/parsers/animeSearchSuggestion.ts
deleted file mode 100644
index 4c262a4..0000000
--- a/src/types/parsers/animeSearchSuggestion.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import type { HttpError } from "http-errors";
-import type { AnimeSearchSuggestion } from "../anime.js";
-
-export interface ScrapedAnimeSearchSuggestion {
- suggestions: Array<AnimeSearchSuggestion> | HttpError;
-}
diff --git a/src/types/parsers/episodeServers.ts b/src/types/parsers/episodeServers.ts
deleted file mode 100644
index a003149..0000000
--- a/src/types/parsers/episodeServers.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import type { SubEpisode, DubEpisode, RawEpisode } from "../anime.js";
-
-export interface ScrapedEpisodeServers {
- sub: SubEpisode[];
- dub: DubEpisode[];
- raw: RawEpisode[];
- episodeNo: number;
- episodeId: string;
-}
diff --git a/src/types/parsers/estimatedSchedule.ts b/src/types/parsers/estimatedSchedule.ts
deleted file mode 100644
index 881be86..0000000
--- a/src/types/parsers/estimatedSchedule.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-type EstimatedSchedule = {
- id: string | null;
- time: string | null;
- name: string | null;
- jname: string | null;
- airingTimestamp: number;
- secondsUntilAiring: number;
- episode: number;
-};
-
-export type ScrapedEstimatedSchedule = {
- scheduledAnimes: Array<EstimatedSchedule>;
-};
diff --git a/src/types/parsers/homePage.ts b/src/types/parsers/homePage.ts
deleted file mode 100644
index 23f6284..0000000
--- a/src/types/parsers/homePage.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import type {
- TrendingAnime,
- SpotlightAnime,
- TopAiringAnime,
- TopUpcomingAnime,
- LatestEpisodeAnime,
- MostFavoriteAnime,
- MostPopularAnime,
- LatestCompletedAnime,
-} from "../anime.js";
-import type { HttpError } from "http-errors";
-import type { ScrapedAnimeCategory } from "./animeCategory.js";
-
-export interface ScrapedHomePage
- extends Pick<ScrapedAnimeCategory, "genres" | "top10Animes"> {
- spotlightAnimes: Array<SpotlightAnime> | HttpError;
- trendingAnimes: Array<TrendingAnime> | HttpError;
- latestEpisodeAnimes: Array<LatestEpisodeAnime> | HttpError;
- topUpcomingAnimes: Array<TopUpcomingAnime> | HttpError;
- topAiringAnimes: Array<TopAiringAnime> | HttpError;
- mostPopularAnimes: Array<MostPopularAnime> | HttpError;
- mostFavoriteAnimes: Array<MostFavoriteAnime> | HttpError;
- latestCompletedAnimes: Array<LatestCompletedAnime> | HttpError;
-}
diff --git a/src/types/parsers/index.ts b/src/types/parsers/index.ts
deleted file mode 100644
index 057e2fc..0000000
--- a/src/types/parsers/index.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import type { ScrapedHomePage } from "./homePage.js";
-import type { ScrapedGenreAnime } from "./animeGenre.js";
-import type { ScrapedAnimeEpisodes } from "./animeEpisodes.js";
-import type { ScrapedAnimeCategory } from "./animeCategory.js";
-import type { ScrapedProducerAnime } from "./animeProducer.js";
-import type { ScrapedEpisodeServers } from "./episodeServers.js";
-import type { ScrapedAnimeAboutInfo } from "./animeAboutInfo.js";
-import type { ScrapedAnimeSearchResult } from "./animeSearch.js";
-import type { ScrapedEstimatedSchedule } from "./estimatedSchedule.js";
-import type { ScrapedAnimeEpisodesSources } from "./animeEpisodeSrcs.js";
-import type { ScrapedAnimeSearchSuggestion } from "./animeSearchSuggestion.js";
-
-export type {
- ScrapedHomePage,
- ScrapedGenreAnime,
- ScrapedAnimeEpisodes,
- ScrapedProducerAnime,
- ScrapedAnimeCategory,
- ScrapedEpisodeServers,
- ScrapedAnimeAboutInfo,
- ScrapedAnimeSearchResult,
- ScrapedEstimatedSchedule,
- ScrapedAnimeEpisodesSources,
- ScrapedAnimeSearchSuggestion,
-};