UNPKG

@tdanks2000/tmdb-wrapper

Version:

A powerful and easy-to-use TypeScript wrapper for The Movie Database (TMDb) API

2,029 lines 91.7 kB
//#region src/@types/endpoints/account.d.ts interface Gravatar { hash: string; } interface Avatar { gravatar: Gravatar; } interface AccountDetails { avatar: Avatar; id: number; include_adult: boolean; iso_3166_1: string; iso_639_1: string; name: string; username: string; } //# sourceMappingURL=account.d.ts.map //#endregion //#region src/@types/endpoints/certification.d.ts interface Certification { certification: string; meaning: string; order: number; } interface Certifications { certifications: { US: Certification[]; CA: Certification[]; DE: Certification[]; GB: Certification[]; AU: Certification[]; BR: Certification[]; FR: Certification[]; NZ: Certification[]; IN: Certification[]; }; } //# sourceMappingURL=certification.d.ts.map //#endregion //#region src/@types/endpoints/changes.d.ts interface MediaChange { id: number; adult: boolean | undefined; } interface MediaChanges { results: MediaChange[]; page: number; total_pages: number; total_results: number; } interface Changes<T> { changes: Change<T>[]; } interface Change<T> { key: string; items: ChangeItem<T>[]; } interface ChangeItem<T> { id: string; action: string; time: string; value: T; iso_639_1: string; original_value: T; } //# sourceMappingURL=changes.d.ts.map //#endregion //#region src/@types/endpoints/collection.d.ts interface Collection { id: number; backdrop_path: string; name: string; poster_path: string; adult: boolean; original_language: string; original_name: string; overview: string; } interface DetailedCollection extends Collection { parts: Movie[]; } interface CollectionImageOptions extends LanguageOption { /** * a list of ISO-639-1 values to query */ include_image_language?: string[]; } //# sourceMappingURL=collection.d.ts.map //#endregion //#region src/@types/endpoints/companies.d.ts interface CompanyDetails { description: string; headquarters: string; homepage: string; id: number; logo_path: string; name: string; origin_country: string; parent_company: ParentCompany; } interface ParentCompany { name: string; id: number; logo_path: string; } interface AlternativeNames { id: number; results: Name[]; } interface Name { name: string; type: string; } interface CompanyImages { id: number; logos: Image[]; } //# sourceMappingURL=companies.d.ts.map //#endregion //#region src/@types/endpoints/configuration.d.ts interface ImageConfiguration { base_url: string; secure_base_url: string; backdrop_sizes: BackdropSizes[]; logo_sizes: LogoSizes[]; poster_sizes: PosterSizes[]; profile_sizes: ProfileSizes[]; still_sizes: StillSizes[]; } interface Configuration { images: ImageConfiguration; change_keys: ChangeKeys[]; } declare enum BackdropSizes { W300 = "w300", W500 = "w500", W780 = "w780", W1280 = "w1280", ORIGINAL = "original", } declare enum LogoSizes { W45 = "w45", W92 = "w92", W154 = "w154", W185 = "w185", W300 = "w300", W500 = "w500", ORIGINAL = "original", } declare enum PosterSizes { W92 = "w92", W154 = "w154", W185 = "w185", W300 = "w300", W500 = "w500", W780 = "w780", ORIGINAL = "original", } declare enum ProfileSizes { W45 = "w45", W185 = "w185", W632 = "w632", ORIGINAL = "original", } declare enum StillSizes { W92 = "w92", W185 = "w185", W300 = "w300", ORIGINAL = "original", } declare enum ChangeKeys { ADULT = "adult", AIR_DATE = "air_date", ALSO_KNOWN_AS = "also_known_as", ALTERNATIVE_TITLES = "alternative_titles", BIOGRAPHY = "biography", BIRTHDAY = "birthday", BUDGET = "budget", CAST = "cast", CERTIFICATIONS = "certifications", CHARACTER_NAMES = "character_names", CREATED_BY = "created_by", CREW = "crew", DEATHDAY = "deathday", EPISODE = "episode", EPISODE_NUMBER = "episode_number", EPISODE_RUN_TIME = "episode_run_time", FREEBASE_ID = "freebase_id", FREEBASE_MID = "freebase_mid", GENERAL = "general", GENRES = "genres", GUEST_STARS = "guest_stars", HOMEPAGE = "homepage", IMAGES = "images", IMDB_ID = "imdb_id", LANGUAGES = "languages", NAME = "name", NETWORK = "network", ORIGIN_COUNTRY = "origin_country", ORIGINAL_NAME = "original_name", ORIGINAL_TITLE = "original_title", OVERVIEW = "overview", PARTS = "parts", PLACE_OF_BIRTH = "place_of_birth", PLOT_KEYWORDS = "plot_keywords", PRODUCTION_CODE = "production_code", PRODUCTION_COMPANIES = "production_companies", PRODUCTION_COUNTRIES = "production_countries", RELEASES = "releases", REVENUE = "revenue", RUNTIME = "runtime", SEASON = "season", SEASON_NUMBER = "season_number", SEASON_REGULAR = "season_regular", SPOKEN_LANGUAGES = "spoken_languages", STATUS = "status", TAGLINE = "tagline", TITLE = "title", TRANSLATIONS = "translations", TVDB_ID = "tvdb_id", TVRAGE_ID = "tvrage_id", TYPE = "type", VIDEO = "video", VIDEOS = "videos", } //# sourceMappingURL=configuration.d.ts.map //#endregion //#region src/@types/endpoints/credits.d.ts interface CreditSeason { air_date?: string; poster_path?: string; season_number?: number; } interface Media$1 { i?: number; name?: string; first_air_date?: string; vote_count?: number; overview?: string; vote_average?: number; backdrop_path?: string; genre_ids?: number[]; original_name?: string; origin_country?: string[]; poster_path?: string; original_language?: string; popularity?: number; character?: string; episodes?: string[]; seasons?: CreditSeason[]; } interface CreditResponse { credit_type?: string; department?: string; job?: string; media?: Media$1; media_type?: string; id?: string; person?: Person; } interface Title { iso_3166_1: string; title: string; type: string; } interface AlternativeTitles { id: number; titles: Title[]; } interface Cast { adult: boolean; gender: number; id: number; known_for_department: string; name: string; original_name: string; popularity: number; profile_path: string; cast_id: number; character: string; credit_id: string; order: number; } interface Crew { adult: boolean; gender: number; id: number; known_for_department: string; name: string; original_name: string; popularity: number; profile_path: string; credit_id: string; department: string; job: string; } interface Credits { id: number; cast: Cast[]; crew: Crew[]; } interface ImageCollection { id: number; backdrops: Image[]; posters: Image[]; } interface Video { id: string; iso_639_1: string; iso_3166_1: string; key: string; name: string; site: string; size: number; type: string; } interface Videos { id: number; results: Video[]; } interface AggregateCredits { id: number; cast: AggregateCast[]; crew: AggregateCrew[]; } interface CastRole { credit_id: string; character: string; episode_count: number; } interface AggregateCast { adult: boolean; gender: number; id: number; known_for_department: string; name: string; original_name: string; popularity: number; profile_path: string; roles: CastRole[]; total_episode_count: number; order: number; } interface CrewJob { credit_id: string; job: string; episode_count: number; } interface AggregateCrew { adult: boolean; gender: number; id: number; known_for_department: string; name: string; original_name: string; popularity: number; profile_path: string; jobs: CrewJob[]; department: string; total_episode_count: number; } //# sourceMappingURL=credits.d.ts.map //#endregion //#region src/@types/endpoints/discover.d.ts type SortOption = "popularity.asc" | "popularity.desc" | "release_date.asc" | "release_date.desc" | "revenue.asc" | "revenue.desc" | "primary_release_date.asc" | "primary_release_date.desc" | "original_title.asc" | "original_title.desc" | "vote_average.asc" | "vote_average.desc" | "vote_count.asc" | "vote_count.desc"; interface MovieDiscoverResult { page: number; results: Movie[]; total_results: number; total_pages: number; } interface TvShowDiscoverResult { page: number; results: TV[]; total_results: number; total_pages: number; } interface DiscoverQueryOptions { language?: string; sort_by?: SortOption; page?: number; "vote_average.gte"?: number; "vote_count.gte"?: number; "vote_count.lte"?: number; "vote_average.lte"?: number; with_watch_providers?: string; watch_region?: string; without_companies?: string; with_watch_monetization_types?: "flatrate" | "free" | "ads" | "rent" | "buy"; "with_runtime.gte"?: number; "with_runtime.lte"?: number; with_genres?: string; without_genres?: string; with_original_language?: string; without_keywords?: string; with_keywords?: string; with_companies?: string; } interface MovieQueryOptions extends DiscoverQueryOptions { region?: string; certification_country?: string; certification?: string; "certification.lte"?: string; "certification.gte"?: string; include_adult?: boolean; include_video?: boolean; primary_release_year?: number; "primary_release_date.gte"?: string; "primary_release_date.lte"?: string; "release_date.gte"?: string; "release_date.lte"?: string; with_release_type?: string; year?: number; with_cast?: string; with_crew?: string; with_people?: string; } interface TvShowQueryOptions extends DiscoverQueryOptions { "air_date.gte"?: string; "air_date.lte"?: string; "first_air_date.gte"?: string; "first_air_date.lte"?: string; first_air_date_year?: number; timezone?: string; with_networks?: string; include_null_first_air_dates?: boolean; screened_theatrically?: boolean; with_status?: string; with_type?: string; } //# sourceMappingURL=discover.d.ts.map //#endregion //#region src/@types/endpoints/find.d.ts type ExternalSource = "imdb_id" | "freebase_mid" | "freebase_id" | "tvdb_id" | "tvrage_id" | "facebook_id" | "twitter_id" | "instagram_id"; interface ExternalIdOptions { external_source: ExternalSource; language?: string; } type MediaTagged<T> = T & { media_type: MediaType; }; interface FindResult { movie_results: MediaTagged<Movie>[]; person_results: MediaTagged<Person>[]; tv_results: MediaTagged<TV>[]; tv_episode_results: MediaTagged<Episode>[]; tv_season_results: MediaTagged<Season & { show_id: string; }>[]; } //#endregion //#region src/@types/endpoints/genre.d.ts interface Genres { genres: Array<{ id: number; name: string; }>; } //# sourceMappingURL=genre.d.ts.map //#endregion //#region src/@types/endpoints/options.d.ts interface LanguageOption { language?: string; } interface RegionOption { region?: string; } interface TimezoneOption { timezone?: string; } interface PageOption { page?: number; } interface ChangeOption extends PageOption { start_date?: Date; end_date?: Date; } type AppendToResponseMovieKey = "images" | "videos" | "credits" | "recommendations" | "reviews" | "changes" | "similar" | "lists" | "release_dates" | "alternative_titles" | "external_ids" | "translations" | "watch/providers" | "keywords"; type AppendToResponseTvKey = "content_ratings" | "images" | "videos" | "credits" | "recommendations" | "reviews" | "changes" | "similar" | "alternative_titles" | "external_ids" | "translations" | "watch/providers" | "aggregate_credits" | "episode_groups" | "screened_theatrically" | "keywords"; type AppendToResponsePersonKey = "images" | "changes" | "movie_credits" | "tv_credits" | "combined_credits" | "external_ids" | "tagged_images" | "translations"; type AppendToResponseTvEpisodeKey = "images" | "credits" | "external_ids" | "videos" | "translations"; type AppendToResponseTvSeasonKey = "images" | "credits" | "external_ids" | "videos" | "aggregate_credits" | "translations"; type AppendToResponseAllKeys = AppendToResponseTvKey | AppendToResponseMovieKey | AppendToResponseTvEpisodeKey | AppendToResponseTvSeasonKey | AppendToResponsePersonKey; type AppendToResponseMediaType = "movie" | "tvShow" | "person" | "tvSeason" | "tvEpisode"; type AppendToResponse<K, T extends AppendToResponseAllKeys[] | undefined, Media extends AppendToResponseMediaType> = K & (T extends undefined ? object : T extends Array<unknown> ? ("credits" extends T[number] ? { credits: Media extends "tvEpisode" ? TvEpisodeCredit : Omit<Credits, "id">; } : object) & ("videos" extends T[number] ? { videos: Omit<Videos, "id">; } : object) & ("images" extends T[number] ? { images: Omit<Media extends "person" ? PeopleImages : Images, "id">; } : object) & ("recommendations" extends T[number] ? { recommendations: Recommendations; } : object) & ("reviews" extends T[number] ? { reviews: Omit<Reviews, "id">; } : object) & ("changes" extends T[number] ? { changes: Changes<Media extends "person" ? PersonChangeValue : Media extends "movie" ? MovieChangeValue : Media extends "tvShow" ? TvShowChangeValue : Media extends "tvSeason" ? TvSeasonChangeValue : TvEpisodeChangeValue>; } : object) & ("keywords" extends T[number] ? { keywords: Omit<Keywords, "id">; } : object) & ("lists" extends T[number] ? { lists: Omit<MovieLists, "id">; } : object) & ("release_dates" extends T[number] ? { release_dates: Omit<ReleaseDates, "id">; } : object) & ("alternative_titles" extends T[number] ? { alternative_titles: Omit<AlternativeTitles, "id">; } : object) & ("external_ids" extends T[number] ? { external_ids: Omit<ExternalIds, "id">; } : object) & ("translations" extends T[number] ? { translations: Omit<Media extends "person" ? PersonTranslations : Media extends "tvEpisode" ? TvEpisodeTranslations : Translations, "id">; } : object) & ("watch/providers" extends T[number] ? { "watch/providers": Omit<WatchProviders, "id">; } : object) & ("aggregate_credits" extends T[number] ? { aggregate_credits: Omit<Credits, "id">; } : object) & ("episode_groups" extends T[number] ? { episode_groups: Omit<EpisodeGroups, "id">; } : object) & ("screened_theatrically" extends T[number] ? { screened_theatrically: Omit<ScreenedTheatrically, "id">; } : object) & ("similar" extends T[number] ? { similar: Media extends "movie" ? SimilarMovies : Media extends "tvShow" ? Similartv : unknown; } : object) & ("content_ratings" extends T[number] ? { content_ratings: Omit<ContentRatings, "id">; } : object) & ("movie_credits" extends T[number] ? { movie_credits: Omit<PersonMovieCredit, "id">; } : object) & ("tv_credits" extends T[number] ? { tv_credits: Omit<PersonTvShowCredit, "id">; } : object) & ("combined_credits" extends T[number] ? { combined_credits: Omit<PersonCombinedCredits, "id">; } : object) & ("tagged_images" extends T[number] ? { tagged_images: TaggedImages; } : object) : never); //#endregion //#region src/@types/endpoints/keywords.d.ts interface KeywordsOptions extends PageOption { include_adult?: boolean; language?: string; } interface BelongingMovies { page: number; results: Movie[]; total_results: number; total_pages: number; } interface Keyword { id: number; name: string; } interface Keywords { id: number; keywords: Keyword[]; } //# sourceMappingURL=keywords.d.ts.map //#endregion //#region src/@types/endpoints/movies.d.ts interface BelongsToCollection { id: number; name: string; poster_path: string; backdrop_path: string; } interface MovieDetails { adult: boolean; backdrop_path: string; belongs_to_collection?: BelongsToCollection; budget: number; genres: Genre[]; homepage: string; id: number; imdb_id: string; original_language: string; original_title: string; overview: string; popularity: number; poster_path?: string; production_companies: ProductionCompany[]; production_countries: ProductionCountry[]; release_date: string; revenue: number; runtime: number; spoken_languages: SpokenLanguage[]; status: string; tagline: string; title: string; video: boolean; vote_average: number; vote_count: number; } declare enum ReleaseDateType { Premiere = 1, "Theatrical (limited)" = 2, Theatrical = 3, Digital = 4, Physical = 5, TV = 6, } interface ReleaseDate { certification: string; iso_639_1: string; release_date: Date; type: ReleaseDateType; note: string; } interface ReleaseDateResult { iso_3166_1: string; release_dates: ReleaseDate[]; } interface ReleaseDates { id: number; results: ReleaseDateResult[]; } interface SimilarMovies { page: number; results: Movie[]; total_pages: number; total_results: number; } interface MovieList { description: string; favorite_count: number; id: number; item_count: number; iso_639_1: string; list_type: string; name: string; poster_path: string; } interface MovieLists { id: number; page: number; results: MovieList[]; total_pages: number; total_results: number; } interface LatestMovie { adult: boolean; backdrop_path?: string; belongs_to_collection?: BelongsToCollection; budget: number; genres: Genre[]; homepage: string; id: number; imdb_id: string; original_language: string; original_title: string; overview: string; popularity: number; poster_path: string; production_companies: ProductionCompany[]; production_countries: ProductionCountry[]; release_date: string; revenue: number; runtime: number; spoken_languages: SpokenLanguage[]; status: string; tagline: string; title: string; video: boolean; vote_average: number; vote_count: number; } interface Dates { maximum: string; minimum: string; } interface MoviesPlayingNow { page: number; results: Movie[]; dates: Dates; total_pages: number; total_results: number; } interface PopularMovies { page: number; results: Movie[]; total_results: number; total_pages: number; } interface TopRatedMovies { page: number; results: Movie[]; total_results: number; total_pages: number; } interface UpcomingMovies { page: number; results: Movie[]; total_results: number; total_pages: number; } type MovieChangeValue = string | { person_id: number; character: string; order: number; cast_id: number; credit_id: string; } | unknown; interface MoviesImageSearchOptions extends LanguageOption { /** * a list of ISO-639-1 values to query */ include_image_language?: string[]; } //# sourceMappingURL=movies.d.ts.map //#endregion //#region src/@types/endpoints/networks.d.ts interface NetworkDetails { headquarters: string; homepage: string; id: number; logo_path: string; name: string; origin_country: string; } interface NetworkImages { id: number; logos: Image[]; } //# sourceMappingURL=networks.d.ts.map //#endregion //#region src/@types/endpoints/people.d.ts interface Cast$1 { character: string; credit_id: string; vote_count: number; id: number; backdrop_path: string; poster_path: string; original_language: string; vote_average: number; genre_ids: number[]; popularity: number; overview: string; } interface Crew$1 { id: number; department: string; original_language: string; credit_id: string; overview: string; vote_count: number; poster_path: string; backdrop_path: string; popularity: number; genre_ids: number[]; job: string; vote_average: number; } interface PersonMovieCast extends Cast$1 { release_date: string; video: boolean; adult: boolean; title: string; original_title: string; } interface PersonMovieCrew extends Crew$1 { original_title: string; video: boolean; title: string; adult: boolean; release_date: string; } interface PersonTvShowCrew extends Crew$1 { episode_count: number; origin_country: string[]; original_name: string; name: string; first_air_date: string; } interface PersonTvShowCast extends Cast$1 { original_name: string; name: string; episode_count: number; first_air_date: string; origin_country: string[]; } interface PersonMovieCredit { cast: PersonMovieCast[]; crew: PersonMovieCrew[]; id: number; } interface PersonTvShowCredit { cast: PersonTvShowCast[]; crew: PersonTvShowCrew[]; id: number; } interface PersonCombinedCredits { cast: (PersonMovieCast & PersonTvShowCast)[]; crew: (PersonMovieCrew & PersonTvShowCrew)[]; id: number; } interface PersonDetails { birthday: string; known_for_department: string; deathday: string; id: number; name: string; also_known_as: string[]; gender: number; biography: string; popularity: number; place_of_birth: string; profile_path: string; adult: boolean; imdb_id: string; homepage: string; } type PersonChangeValue = string | { profile: { file_path: string; }; }; interface PopularPersons { page: number; results: Person[]; total_results: number; total_pages: number; } interface PeopleImages { id: number; profiles: Image[]; } interface TaggedImage { aspect_ratio: number; file_path: string; height: number; id: string; iso_639_1: string; vote_average: number; vote_count: number; width: number; image_type: string; media_type: string; media: Movie | TV; } interface TaggedImages { page: number; results: TaggedImage[]; total_results: number; total_pages: number; } interface PersonTranslations { id: number; translations: { iso_3166_1: string; iso_639_1: string; name: string; english_name: string; data: { biography: string; }; }; } //#endregion //#region src/@types/endpoints/review.d.ts interface ReviewDetails extends Review { iso_639_1: string; media_id: number; media_title: number; media_type: number; } //# sourceMappingURL=review.d.ts.map //#endregion //#region src/@types/endpoints/search.d.ts interface Search<T> { page: number; results: T[]; total_pages: number; total_results: number; } type MultiSearchResult = MovieWithMediaType | TVWithMediaType | PersonWithMediaType; interface SearchOptions { query: string; page?: number; } interface MovieSearchOptions extends SearchOptions, LanguageOption, PageOption, RegionOption { include_adult?: boolean; year?: number; primary_release_year?: number; } interface CollectionSearchOptions extends SearchOptions, LanguageOption, PageOption, RegionOption { include_adult?: boolean; } interface TvSearchOptions extends SearchOptions, LanguageOption, PageOption { include_adult?: boolean; year?: number; first_air_date_year?: number; } interface PeopleSearchOptions extends SearchOptions, LanguageOption, PageOption { include_adult?: boolean; } interface MultiSearchOptions extends SearchOptions, LanguageOption, PageOption { include_adult?: boolean; } //# sourceMappingURL=search.d.ts.map //#endregion //#region src/@types/endpoints/trending.d.ts type TimeWindow = "day" | "week"; type TrendingMediaType = MediaType | "all"; type TrendingResult<T extends TrendingMediaType> = T extends "tv" ? TV : T extends "movie" ? Movie : T extends "person" ? Person : TVWithMediaType | MovieWithMediaType | PersonWithMediaType; interface TrendingResults<T extends TrendingMediaType> { page: number; results: TrendingResult<T>[]; total_pages: number; total_results: number; } //#endregion //#region src/@types/endpoints/tvEpisode.d.ts interface EpisodeSelection { tvShowID: number; seasonNumber: number; episodeNumber: number; } interface Episode { air_date: string; episode_number: number; crew: Crew[]; guest_stars: GuestStar[]; id: number; name: string; overview: string; production_code: string; season_number: number; still_path: string; vote_average: number; vote_count: number; runtime: number; show_id: number; } interface GuestStar { credit_id: string; order: number; character: string; adult: boolean; gender: number | null; id: number; known_for_department: string; name: string; original_name: string; popularity: number; profile_path: string | null; } interface TvEpisodeCredit extends Credits { guest_stars: GuestStar[]; } interface TvEpisodeTranslations { id: number; translations: { iso_3166_1: string; iso_639_1: string; name: string; english_name: string; data: { name: string; overview: string; }; }; } type TvEpisodeChangeValue = string | unknown; interface TvEpisodeImageSearchOptions extends LanguageOption { /** * a list of ISO-639-1 values to query */ include_image_language?: string[]; } interface TvEpisodeVideoSearchOptions extends LanguageOption { /** * a list of ISO-639-1 values to query */ include_video_language?: string[]; } //# sourceMappingURL=tvEpisode.d.ts.map //#endregion //#region src/@types/endpoints/tvSeasons.d.ts interface SeasonSelection { tvShowID: number; seasonNumber: number; } interface SeasonDetails { air_date: string; episodes: Episode[]; name: string; overview: string; id: number; poster_path: string | null; season_number: number; } type TvSeasonChangeValue = string | { episode_id: number; episode_number: number; }; interface TvSeasonImageSearchOptions extends LanguageOption { /** * a list of ISO-639-1 values to query */ include_image_language?: string[]; } interface TvSeasonVideoSearchOptions extends LanguageOption { /** * a list of ISO-639-1 values to query */ include_video_language?: string[]; } //# sourceMappingURL=tvSeasons.d.ts.map //#endregion //#region src/@types/endpoints/tvShows.d.ts interface CreatedBy { id: number; credit_id: string; name: string; gender: number; profile_path: string; } interface NextEpisodeToAir { id: number; name: string; overview: string; vote_average: number; vote_count: number; air_date: string; episode_number: number; production_code: string; runtime: number; season_number: number; show_id: number; still_path: string; } interface LastEpisodeToAir { air_date: string; episode_number: number; id: number; name: string; overview: string; production_code: string; season_number: number; still_path: string; vote_average: number; vote_count: number; } interface Network { name: string; id: number; logo_path: string; origin_country: string; } interface Season { air_date: string; episode_count: number; id: number; name: string; overview: string; poster_path: string; season_number: number; } interface TvShowDetails { backdrop_path: string; created_by: CreatedBy[]; episode_run_time: number[]; first_air_date: string; genres: Genre[]; homepage: string; id: number; in_production: boolean; languages: string[]; last_air_date: string; last_episode_to_air: LastEpisodeToAir; name: string; next_episode_to_air?: NextEpisodeToAir; networks: Network[]; number_of_episodes: number; number_of_seasons: number; origin_country: string[]; original_language: string; original_name: string; overview: string; popularity: number; poster_path: string; production_companies: ProductionCompany[]; production_countries: ProductionCountry[]; seasons: Season[]; spoken_languages: SpokenLanguage[]; status: string; tagline: string; type: string; vote_average: number; vote_count: number; } interface Network { id: number; logo_path: string; name: string; origin_country: string; } interface EpisodeGroup { description: string; episode_count: number; group_count: number; id: string; name: string; network: Network; type: number; } interface EpisodeGroups { results: EpisodeGroup[]; id: number; } interface ScreenedTheatricallyResult { id: number; episode_number: number; season_number: number; } interface ScreenedTheatrically { id: number; results: ScreenedTheatricallyResult[]; } interface SimilarTvShow { backdrop_path: string; first_air_date: string; genre_ids: number[]; id: number; original_language: string; original_name: string; overview: string; origin_country: string[]; poster_path: string; popularity: number; name: string; vote_average: number; vote_count: number; } interface Similartv { page: number; results: SimilarTvShow[]; total_pages: number; total_results: number; } interface Latesttv { backdrop_path?: string; created_by: CreatedBy[]; episode_run_time: number[]; first_air_date: string; genres: Genre[]; homepage: string; id: number; in_production: boolean; languages: string[]; last_air_date: string; name: string; networks: Network[]; number_of_episodes: number; number_of_seasons: number; origin_country: string[]; original_language: string; original_name: string; overview?: string; popularity: number; poster_path?: string; production_companies: ProductionCompany[]; seasons: Season[]; status: string; type: string; vote_average: number; vote_count: number; } interface OnTheAirResult { poster_path: string; popularity: number; id: number; backdrop_path: string; vote_average: number; overview: string; first_air_date: string; origin_country: string[]; genre_ids: number[]; original_language: string; vote_count: number; name: string; original_name: string; } interface OnTheAir { page: number; results: OnTheAirResult[]; total_results: number; total_pages: number; } interface AiringTodayResult { poster_path: string; popularity: number; id: number; backdrop_path: string; vote_average: number; overview: string; first_air_date: string; origin_country: string[]; genre_ids: number[]; original_language: string; vote_count: number; name: string; original_name: string; } interface tvAiringToday { page: number; results: AiringTodayResult[]; total_results: number; total_pages: number; } interface PopularTvShowResult { poster_path: string; popularity: number; id: number; backdrop_path: string; vote_average: number; overview: string; first_air_date: string; origin_country: string[]; genre_ids: number[]; original_language: string; vote_count: number; name: string; original_name: string; } interface Populartv { page: number; results: PopularTvShowResult[]; total_results: number; total_pages: number; } interface TopRatedTvShowResult { poster_path: string; popularity: number; id: number; backdrop_path: string; vote_average: number; overview: string; first_air_date: string; origin_country: string[]; genre_ids: number[]; original_language: string; vote_count: number; name: string; original_name: string; } interface TopRatedtv { page: number; results: TopRatedTvShowResult[]; total_results: number; total_pages: number; } interface TvShowChangeValue { season_id: number; season_number: number; } interface TvShowImageOptions extends LanguageOption { /** * a list of ISO-639-1 values to query */ include_image_language?: string[]; } interface TvShowVideoOptions extends LanguageOption { /** * a list of ISO-639-1 values to query */ include_video_language?: string[]; } //# sourceMappingURL=tvShows.d.ts.map //#endregion //#region src/@types/endpoints/watchProviders.d.ts interface Flatrate { display_priority: number; logo_path: string; provider_id: number; provider_name: string; } interface Rent { display_priority: number; logo_path: string; provider_id: number; provider_name: string; } interface Buy { display_priority: number; logo_path: string; provider_id: number; provider_name: string; } interface WatchRegion { iso_3166_1: string; english_name: string; native_name: string; } interface WatchRegionsResponse { results: WatchRegion[]; } interface WatchLocale { AR: { link: string; flatrate: Flatrate[]; rent: Rent[]; buy: Buy[]; }; AT: { link: string; rent: Rent[]; buy: Buy[]; }; AU: { link: string; flatrate: Flatrate[]; rent: Rent[]; buy: Buy[]; }; BE: { link: string; buy: Buy[]; flatrate: Flatrate[]; rent: Rent[]; }; BR: { link: string; rent: Rent[]; buy: Buy[]; flatrate: Flatrate[]; }; CA: { link: string; rent: Rent[]; flatrate: Flatrate[]; buy: Buy[]; }; CH: { link: string; rent: Rent[]; buy: Buy[]; flatrate: Flatrate[]; }; CL: { link: string; flatrate: Flatrate[]; buy: Buy[]; rent: Rent[]; }; CO: { link: string; flatrate: Flatrate[]; rent: Rent[]; buy: Buy[]; }; CZ: { link: string; buy: Buy[]; flatrate: Flatrate[]; rent: Rent[]; }; DE: { link: string; rent: Rent[]; buy: Buy[]; }; DK: { link: string; rent: Rent[]; buy: Buy[]; flatrate: Flatrate[]; }; EC: { link: string; flatrate: Flatrate[]; buy: Buy[]; rent: Rent[]; }; EE: { link: string; flatrate: Flatrate[]; buy: Buy[]; rent: Rent[]; }; ES: { link: string; rent: Rent[]; flatrate: Flatrate[]; buy: Buy[]; }; FI: { link: string; buy: Buy[]; flatrate: Flatrate[]; rent: Rent[]; }; FR: { link: string; flatrate: Flatrate[]; buy: Buy[]; rent: Rent[]; }; GB: { link: string; rent: Rent[]; flatrate: Flatrate[]; buy: Buy[]; }; GR: { link: string; flatrate: Flatrate[]; rent: Rent[]; buy: Buy[]; }; HU: { link: string; rent: Rent[]; buy: Buy[]; flatrate: Flatrate[]; }; ID: { link: string; flatrate: Flatrate[]; rent: Rent[]; buy: Buy[]; }; IE: { link: string; rent: Rent[]; flatrate: Flatrate[]; buy: Buy[]; }; IN: { link: string; buy: Buy[]; flatrate: Flatrate[]; rent: Rent[]; }; IT: { link: string; buy: Buy[]; flatrate: Flatrate[]; rent: Rent[]; }; JP: { link: string; rent: Rent[]; flatrate: Flatrate[]; buy: Buy[]; }; KR: { link: string; buy: Buy[]; rent: Rent[]; flatrate: Flatrate[]; }; LT: { link: string; buy: Buy[]; flatrate: Flatrate[]; }; LV: { link: string; buy: Buy[]; flatrate: Flatrate[]; }; MX: { link: string; flatrate: Flatrate[]; rent: Rent[]; buy: Buy[]; }; MY: { link: string; rent: Rent[]; flatrate: Flatrate[]; buy: Buy[]; }; NL: { link: string; flatrate: Flatrate[]; buy: Buy[]; rent: Rent[]; }; NO: { link: string; buy: Buy[]; rent: Rent[]; flatrate: Flatrate[]; }; NZ: { link: string; buy: Buy[]; rent: Rent[]; flatrate: Flatrate[]; }; PE: { link: string; flatrate: Flatrate[]; rent: Rent[]; buy: Buy[]; }; PH: { link: string; rent: Rent[]; buy: Buy[]; flatrate: Flatrate[]; }; PL: { link: string; rent: Rent[]; flatrate: Flatrate[]; buy: Buy[]; }; PT: { link: string; rent: Rent[]; flatrate: Flatrate[]; buy: Buy[]; }; RO: { link: string; flatrate: Flatrate[]; }; RU: { link: string; rent: Rent[]; flatrate: Flatrate[]; buy: Buy[]; }; SE: { link: string; rent: Rent[]; flatrate: Flatrate[]; buy: Buy[]; }; SG: { link: string; flatrate: Flatrate[]; buy: Buy[]; rent: Rent[]; }; TH: { link: string; flatrate: Flatrate[]; rent: Rent[]; buy: Buy[]; }; TR: { link: string; buy: Buy[]; rent: Rent[]; flatrate: Flatrate[]; }; US: { link: string; rent: Rent[]; buy: Buy[]; flatrate: Flatrate[]; }; VE: { link: string; flatrate: Flatrate[]; rent: Rent[]; buy: Buy[]; }; ZA: { link: string; rent: Rent[]; buy: Buy[]; flatrate: Flatrate[]; }; } interface WatchProviders { id: number; results: WatchLocale; } //# sourceMappingURL=watchProviders.d.ts.map //#endregion //#region src/utils/api.d.ts declare class API { private apiKey?; private accessToken?; constructor(auth: TokenType); /** * Generic GET: * @template T — response type * @template O — options (query params) type */ get<T, O extends Record<string, unknown> = Record<string, unknown>>(path: string, options?: O): Promise<T>; } declare const parseOptions: (options?: Record<string, unknown>) => string; //# sourceMappingURL=api.d.ts.map //#endregion //#region src/utils/getimagePath.d.ts /** * Utility method to construct full url for image * based on configuration * * https://developers.themoviedb.org/3/getting-started/images * @param {string} baseUrl base image url (e.g., 'https://image.tmdb.org/t/p/') * @param {string} fileSize file size (e.g., 'original', 'w500') * @param {string} imagePath raw image path * @param {string} format override image format (e.g., 'svg', 'png', 'jpg') * @returns {string} The complete image URL */ declare const getFullImagePath: (baseUrl: string, fileSize: string, imagePath: string, format?: string) => string; /** * Common image sizes available in TMDB */ declare const ImageSizes: { ORIGINAL: string; W500: string; W300: string; W185: string; W92: string; H632: string; }; /** * Image formats supported by TMDB */ declare const ImageFormats: { JPG: string; PNG: string; SVG: string; }; //# sourceMappingURL=getimagePath.d.ts.map //#endregion //#region src/@types/types.d.ts interface ErrorResponse { status_code: number; status_message: string; success: boolean; } type MediaType = "movie" | "tv" | "person"; interface AuthorDetails { name: string; username: string; avatar_path: string; rating?: number; } type KnownFor = MovieWithMediaType | TVWithMediaType; interface Person { id: number; name: string; known_for: KnownFor[]; profile_path: string; adult: boolean; known_for_department: string; gender: number; popularity: number; } interface PersonWithMediaType extends Person { media_type: "person"; } interface Movie { id: number; poster_path: string; adult: boolean; overview: string; release_date: string; genre_ids: number[]; original_title: string; original_language: string; title: string; backdrop_path: string; popularity: number; vote_count: number; video: boolean; vote_average: number; } interface MovieWithMediaType extends Movie { media_type: "movie"; } interface Company { id: number; logo_path: string; name: string; origin_country: string; } interface TV { id: number; name: string; first_air_date: string; backdrop_path: string; genre_ids: number[]; origin_country: string[]; original_language: string; original_name: string; overview: string; poster_path: string; popularity: number; vote_count: number; vote_average: number; } interface TVWithMediaType extends TV { media_type: "tv"; } interface Genre { id: number; name: string; } interface ExternalIds { imdb_id: string; facebook_id: string; instagram_id: string; twitter_id: string; id: number; } interface ProductionCompany { id: number; logo_path: string; name: string; origin_country: string; } interface ProductionCountry { iso_3166_1: string; name: string; } interface SpokenLanguage { english_name: string; iso_639_1: string; name: string; } interface ContentRatings { results: ContentRatingsResult[]; id: number; } interface ContentRatingsResult { descriptor: unknown[]; iso_3166_1: string; rating: string; } interface Recommendation { adult: boolean; backdrop_path?: string; genre_ids: number[]; id: number; original_language: string; original_title: string; overview: string; release_date: string; poster_path?: string; popularity: number; title: string; video: boolean; vote_average: number; vote_count: number; } interface Recommendations { page: number; results: Recommendation[]; total_pages: number; total_results: number; } interface Review { author: string; author_details: AuthorDetails; content: string; created_at: Date; id: string; updated_at: Date; url: string; } interface Reviews { id: number; page: number; results: Review[]; total_pages: number; total_results: number; } interface TranslationData { title: string; overview: string; homepage: string; } interface Translation { iso_3166_1: string; iso_639_1: string; name: string; english_name: string; data: TranslationData; } interface Translations { id: number; translations: Translation[]; } interface Image { aspect_ratio: number; file_path: string; height: number; iso_639_1: string; vote_average: number; vote_count: number; width: number; } interface Images { id: number; backdrops: Image[]; logos: Image[]; posters: Image[]; } interface TMDBConfig { apiKey?: string; accessToken?: string; } type TokenType = string | TMDBConfig; //# sourceMappingURL=types.d.ts.map //#endregion //#region src/@types/models/baseEndpoint.d.ts declare class BaseEndpoint { protected readonly auth: TokenType; protected api: API; constructor(auth: TokenType); } //# sourceMappingURL=baseEndpoint.d.ts.map //#endregion //#region src/endpoints/account.d.ts /** * Represents an endpoint for retrieving account details. */ declare class AccountEndpoint extends BaseEndpoint { protected readonly access_token: TokenType; /** * Constructs a new AccountEndpoint instance. * @param {string} access_token - The access token used for authentication. */ constructor(access_token: TokenType); /** * Retrieves account details asynchronously. * @returns {Promise<AccountDetails>} A Promise that resolves with the account details. */ details(): Promise<AccountDetails>; } //# sourceMappingURL=account.d.ts.map //#endregion //#region src/endpoints/certification.d.ts /** * Represents an endpoint for retrieving certifications for movies and TV shows. */ declare class CertificationEndpoint extends BaseEndpoint { protected readonly access_token: TokenType; /** * Constructs a new CertificationEndpoint instance. * @param {string} access_token - The access token used for authentication. */ constructor(access_token: TokenType); /** * Retrieves certifications for movies asynchronously. * @returns {Promise<Certifications>} A Promise that resolves with the certifications for movies. */ movies(): Promise<Certifications>; /** * Retrieves certifications for TV shows asynchronously. * @returns {Promise<Certifications>} A Promise that resolves with the certifications for TV shows. */ tv(): Promise<Certifications>; } //# sourceMappingURL=certification.d.ts.map //#endregion //#region src/endpoints/changes.d.ts /** * Represents an endpoint for retrieving changes in movies, TV shows, and persons. */ declare class ChangeEndpoint extends BaseEndpoint { protected readonly access_token: TokenType; /** * Constructs a new ChangeEndpoint instance. * @param {string} access_token - The access token used for authentication. */ constructor(access_token: TokenType); /** * Retrieves changes in movies asynchronously. * @param {ChangeOption} [options] - Optional parameters for filtering the changes. * @returns {Promise<MediaChanges>} A Promise that resolves with the changes in movies. */ movies(options?: ChangeOption): Promise<MediaChanges>; /** * Retrieves changes in TV shows asynchronously. * @param {ChangeOption} [options] - Optional parameters for filtering the changes. * @returns {Promise<MediaChanges>} A Promise that resolves with the changes in TV shows. */ tv(options?: ChangeOption): Promise<MediaChanges>; /** * Retrieves changes related to persons asynchronously. * @param {ChangeOption} [options] - Optional parameters for filtering the changes. * @returns {Promise<MediaChanges>} A Promise that resolves with the changes related to persons. */ person(options?: ChangeOption): Promise<MediaChanges>; } //# sourceMappingURL=changes.d.ts.map //#endregion //#region src/endpoints/collections.d.ts /** * Represents an endpoint for accessing collections and their details. */ declare class CollectionsEndpoint extends BaseEndpoint { protected readonly access_token: TokenType; /** * Constructs a new CollectionsEndpoint instance. * @param {string} access_token - The access token used for authentication. */ constructor(access_token: TokenType); /** * Retrieves details of a specific collection asynchronously. * @param {number} id - The ID of the collection. * @param {LanguageOption} [options] - Optional parameters for specifying the language. * @returns {Promise<DetailedCollection>} A Promise that resolves with the detailed information of the collection. */ details(id: number, options?: LanguageOption): Promise<DetailedCollection>; /** * Retrieves images associated with a specific collection asynchronously. * @param {number} id - The ID of the collection. * @param {CollectionImageOptions} [options] - Optional parameters for specifying image options. * @returns {Promise<ImageCollection>} A Promise that resolves with the collection images. */ images(id: number, options?: CollectionImageOptions): Promise<ImageCollection>; /** * Retrieves translations for a specific collection asynchronously. * @param {number} id - The ID of the collection. * @param {LanguageOption} [options] - Optional parameters for specifying the language. * @returns {Promise<Translations>} A Promise that resolves with the translations of the collection. */ translations(id: number, options?: LanguageOption): Promise<Translations>; } //# sourceMappingURL=collections.d.ts.map //#endregion //#region src/endpoints/companies.d.ts /** * Represents an endpoint for accessing company details and related information. */ declare class CompaniesEndpoint extends BaseEndpoint { protected readonly access_token: TokenType; /** * Constructs a new CompaniesEndpoint instance. * @param {string} access_token - The access token used for authentication. */ constructor(access_token: TokenType); /** * Retrieves details of a specific company asynchronously. * @param {number} id - The ID of the company. * @returns {Promise<CompanyDetails>} A Promise that resolves with the detailed information of the company. */ details(id: number): Promise<CompanyDetails>; /** * Retrieves alternative names of a specific company asynchronously. * @param {number} id - The ID of the company. * @returns {Promise<AlternativeNames>} A Promise that resolves with the alternative names of the company. */ alternativeNames(id: number): Promise<AlternativeNames>; /** * Retrieves images associated with a specific company asynchronously. * @param {number} id - The ID of the company. * @returns {Promise<CompanyImages>} A Promise that resolves with the images of the company. */ images(id: number): Promise<CompanyImages>; } //# sourceMappingURL=companies.d.ts.map //#endregion //#region src/endpoints/configuration.d.ts /** * Represents an endpoint for retrieving current system configuration. */ declare class ConfigurationEndpoint extends BaseEndpoint { protected readonly access_token: TokenType; /** * Constructs a new ConfigurationEndpoint instance. * @param {string} access_token - The access token used for authentication. */ constructor(access_token: TokenType); /** * Retrieves the current system configuration asynchronously. * @returns {Promise<Configuration>} A Promise that resolves with the current system configuration. */ getCurrent(): Promise<Configuration>; } //# sourceMappingURL=configuration.d.ts.map //#endregion //#region src/endpoints/credits.d.ts /** * Represents an endpoint for retrieving credit details. */ declare class CreditsEndpoint extends BaseEndpoint { protected readonly access_token: TokenType; /** * Constructs a new CreditsEndpoint instance. * @param {string} access_token - The access token used for authentication. */ constructor(access_token: TokenType); /** * Retrieves credit details by ID asynchronously. * @param {string} id - The ID of the credit. * @returns {Promise<CreditResponse>} A Promise that resolves with the credit details. */ getById(id: string): Promise<CreditResponse>; } //# sourceMappingURL=credits.d.ts.map //#endregion //#region src/endpoints/discover.d.ts /** * Represents an endpoint for discovering movies and TV shows based on various criteria. */ declare class DiscoverEndpoint extends BaseEndpoint { protected readonly access_token: TokenType; /** * Constructs a new DiscoverEndpoint instance. * @param {string} access_token - The access token used for authentication. */ constructor(access_token: TokenType); /** * Retrieves a list of movies based on the provided query options asynchronously. * @param {MovieQueryOptions} [options] - Optional parameters for refining the movie discovery. * @returns {Promise<MovieDiscoverResult>} A Promise that resolves with the movie discovery results. */ movie(options?: MovieQueryOptions): Promise<MovieDiscoverResult>; /** * Retrieves a list of TV shows based on the provided query options asynchronously. * @param {TvShowQueryOptions} [options] - Optional parameters for refining the TV show discovery. * @returns {Promise<TvShowDiscoverResult>} A Promise that resolves with the TV show discovery results. */ tvShow(options?: TvShowQueryOptions): Promise<TvShowDiscoverResult>; } //# sourceMappingURL=discover.d.ts.map //#endregion //#region src/endpoints/find.d.ts /** * Represents an endpoint for finding media by external ID. */ declare class FindEndpoint extends BaseEndpoint { protected readonly access_token: TokenType; /** * Constructs a new FindEndpoint instance. * @param {string} access_token - The access token used for authentication. */ constructor(access_token: TokenType); /** * Retrieves media by external ID asynchronously. * @param {string} externalId - The external ID of the media. * @param {ExternalIdOptions} options - Options for finding media by external ID. * @returns {Promise<FindResult>} A Promise that resolves with the resu