New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

tmdb-ts

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tmdb-ts - npm Package Compare versions

Comparing version 1.8.0 to 2.0.0

dist/common/constants.d.ts

5

dist/api.js

@@ -9,3 +9,3 @@ "use strict";

const utils_1 = require("./utils");
const BASE_URL_V3 = 'https://api.themoviedb.org/3';
const constants_1 = require("./common/constants");
class Api {

@@ -17,5 +17,6 @@ accessToken;

}
/* eslint-disable @typescript-eslint/no-explicit-any */
async get(path, options) {
const params = (0, utils_1.parseOptions)(options);
const response = await (0, cross_fetch_1.default)(`${BASE_URL_V3}${path}?${params}`, {
const response = await (0, cross_fetch_1.default)(`${constants_1.BASE_URL_V3}${path}?${params}`, {
method: 'GET',

@@ -22,0 +23,0 @@ headers: {

2

dist/endpoints/changes.js

@@ -18,3 +18,3 @@ "use strict";

async person(options) {
return await this.api.get(`/person/change`, options);
return await this.api.get(`/person/changes`, options);
}

@@ -21,0 +21,0 @@ }

@@ -1,2 +0,2 @@

import { CollectionImageOptions, DetailedCollection, ImageCollection, LanguageOption, Translations } from '../types';
import { CollectionDetails, CollectionImageOptions, ImageCollection, LanguageOption, Translations } from '../types';
import { BaseEndpoint } from './base';

@@ -6,5 +6,5 @@ export declare class CollectionsEndpoint extends BaseEndpoint {

constructor(accessToken: string);
details(id: number, options?: LanguageOption): Promise<DetailedCollection>;
details(id: number, options?: LanguageOption): Promise<CollectionDetails>;
images(id: number, options?: CollectionImageOptions): Promise<ImageCollection>;
translations(id: number, options?: LanguageOption): Promise<Translations>;
}
import { BaseEndpoint } from './base';
import { Configuration } from '../types/configuration';
import { Configuration, CountryConfiguration, JobConfiguration, LanguageConfiguration, TimezoneConfiguration } from '../types/configuration';
export declare class ConfigurationEndpoint extends BaseEndpoint {
protected readonly accessToken: string;
constructor(accessToken: string);
getCurrent(): Promise<Configuration>;
getApiConfiguration(): Promise<Configuration>;
getCountries(): Promise<CountryConfiguration[]>;
getLanguages(): Promise<LanguageConfiguration[]>;
getJobs(): Promise<JobConfiguration[]>;
getPrimaryTranslations(): Promise<string[]>;
getTimezones(): Promise<TimezoneConfiguration[]>;
}

@@ -11,7 +11,22 @@ "use strict";

}
async getCurrent() {
async getApiConfiguration() {
return await this.api.get(`/configuration`);
}
async getCountries() {
return await this.api.get(`/configuration/countries`);
}
async getLanguages() {
return await this.api.get(`/configuration/languages`);
}
async getJobs() {
return await this.api.get(`/configuration/jobs`);
}
async getPrimaryTranslations() {
return await this.api.get(`/configuration/primary_translations`);
}
async getTimezones() {
return await this.api.get(`/configuration/timezones`);
}
}
exports.ConfigurationEndpoint = ConfigurationEndpoint;
//# sourceMappingURL=configuration.js.map

@@ -1,56 +0,3 @@

import { MovieDiscoverResult, SortOption, TvShowDiscoverResult } from '../types';
import { MovieDiscoverResult, MovieQueryOptions, TvShowDiscoverResult, TvShowQueryOptions } from '../types';
import { BaseEndpoint } from './base';
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;
}
export declare class DiscoverEndpoint extends BaseEndpoint {

@@ -61,2 +8,1 @@ constructor(accessToken: string);

}
export {};

@@ -5,3 +5,3 @@ import { BaseEndpoint } from './base';

constructor(accessToken: string);
byId(externalId: string, options: ExternalIdOptions): Promise<FindResult>;
byExternalId(id: string, options: ExternalIdOptions): Promise<FindResult>;
}

@@ -9,4 +9,4 @@ "use strict";

}
async byId(externalId, options) {
return await this.api.get(`/find/${externalId}`, options);
async byExternalId(id, options) {
return await this.api.get(`/find/${id}`, options);
}

@@ -13,0 +13,0 @@ }

@@ -19,1 +19,2 @@ export * from './account';

export * from './tv-episode';
export * from './watch-providers';

@@ -35,2 +35,3 @@ "use strict";

__exportStar(require("./tv-episode"), exports);
__exportStar(require("./watch-providers"), exports);
//# sourceMappingURL=index.js.map

@@ -6,3 +6,7 @@ import { BaseEndpoint } from './base';

details(keywordId: number): Promise<Keyword>;
/**
*
* @deprecated
*/
belongingMovies(keywordId: number, options?: KeywordsOptions): Promise<BelongingMovies>;
}

@@ -13,2 +13,6 @@ "use strict";

}
/**
*
* @deprecated
*/
async belongingMovies(keywordId, options) {

@@ -15,0 +19,0 @@ return await this.api.get(`${BASE_Keyword}/${keywordId}/movies`, options);

@@ -1,2 +0,2 @@

import { AppendToResponse, AppendToResponsePersonKey, ChangeOption, ExternalIds, PageOption, PeopleImages, PersonTranslations, PersonCombinedCredits, PersonDetails, PersonMovieCredit, PersonTvShowCredit, PopularPersons, TaggedImages, Changes, PersonChangeValue, LanguageOption } from '../types';
import { AppendToResponse, AppendToResponsePersonKey, ChangeOption, ExternalIds, PageOption, PeopleImages, PersonTranslations, PersonCombinedCredits, PersonDetails, PersonMovieCredit, PersonTvShowCredit, TaggedImages, Changes, PersonChangeValue, LanguageOption, PopularPeople } from '../types';
import { BaseEndpoint } from './base';

@@ -12,6 +12,9 @@ export declare class PeopleEndpoint extends BaseEndpoint {

images(id: number): Promise<PeopleImages>;
/**
* @deprecated
*/
taggedImages(id: number, options?: PageOption): Promise<TaggedImages>;
translation(id: number): Promise<PersonTranslations>;
latest(): Promise<PersonDetails>;
popular(options?: LanguageOption & PageOption): Promise<PopularPersons>;
popular(options?: LanguageOption & PageOption): Promise<PopularPeople>;
}

@@ -37,2 +37,5 @@ "use strict";

}
/**
* @deprecated
*/
async taggedImages(id, options) {

@@ -39,0 +42,0 @@ return await this.api.get(`${BASE_PERSON}/${id}/tagged_images`, options);

@@ -1,2 +0,2 @@

import { AccountEndpoint, CertificationEndpoint, ChangeEndpoint, CreditsEndpoint, GenreEndpoint, MoviesEndpoint, SearchEndpoint, TvShowsEndpoint, ConfigurationEndpoint, DiscoverEndpoint, PeopleEndpoint, ReviewEndpoint, TrendingEndpoint, FindEndpoint, KeywordsEndpoint, CollectionsEndpoint, TvSeasonsEndpoint, TvEpisodesEndpoint } from './endpoints';
import { AccountEndpoint, CertificationEndpoint, ChangeEndpoint, CreditsEndpoint, GenreEndpoint, MoviesEndpoint, SearchEndpoint, TvShowsEndpoint, ConfigurationEndpoint, DiscoverEndpoint, PeopleEndpoint, ReviewEndpoint, TrendingEndpoint, FindEndpoint, KeywordsEndpoint, CollectionsEndpoint, TvSeasonsEndpoint, TvEpisodesEndpoint, WatchProvidersEndpoint } from './endpoints';
import { CompaniesEndpoint } from './endpoints/companies';

@@ -27,2 +27,3 @@ import { NetworksEndpoint } from './endpoints/networks';

get tvSeasons(): TvSeasonsEndpoint;
get watchProviders(): WatchProvidersEndpoint;
}

@@ -72,4 +72,7 @@ "use strict";

}
get watchProviders() {
return new endpoints_1.WatchProvidersEndpoint(this.accessToken);
}
}
exports.TMDB = TMDB;
//# sourceMappingURL=tmdb.js.map

@@ -0,1 +1,2 @@

import { CountryCode } from '../types';
export interface Gravatar {

@@ -11,3 +12,3 @@ hash: string;

include_adult: boolean;
iso_3166_1: string;
iso_3166_1: CountryCode;
iso_639_1: string;

@@ -14,0 +15,0 @@ name: string;

@@ -8,12 +8,54 @@ export interface Certification {

certifications: {
US: Certification[];
AR: Certification[];
AT: Certification[];
AU: Certification[];
BG: Certification[];
BR: Certification[];
CA: Certification[];
'CA-QC': Certification[];
CH: Certification[];
CL: Certification[];
CZ: Certification[];
DE: Certification[];
DK: Certification[];
ES: Certification[];
FI: Certification[];
FR: Certification[];
GB: Certification[];
AU: Certification[];
BR: Certification[];
FR: Certification[];
GR: Certification[];
HK: Certification[];
HU: Certification[];
ID: Certification[];
IE: Certification[];
IL: Certification[];
IN: Certification[];
IT: Certification[];
JP: Certification[];
KR: Certification[];
LT: Certification[];
LU: Certification[];
LV: Certification[];
MO: Certification[];
MX: Certification[];
MY: Certification[];
NL: Certification[];
NO: Certification[];
NZ: Certification[];
IN: Certification[];
PH: Certification[];
PL: Certification[];
PR: Certification[];
PT: Certification[];
RO: Certification[];
RU: Certification[];
SE: Certification[];
SG: Certification[];
SK: Certification[];
TH: Certification[];
TR: Certification[];
TW: Certification[];
UA: Certification[];
US: Certification[];
VI: Certification[];
ZA: Certification[];
};
}
export interface MediaChange {
id: number;
adult: boolean | undefined;
adult?: boolean;
}

@@ -5,0 +5,0 @@ export interface MediaChanges {

import { LanguageOption, Movie } from '.';
export interface Collection {
id: number;
backdrop_path: string;
name: string;
overview: string;
poster_path: string;
adult: boolean;
original_language: string;
original_name: string;
overview: string;
backdrop_path: string;
}
export interface DetailedCollection extends Collection {
export interface CollectionDetails extends Collection {
parts: Movie[];

@@ -14,0 +11,0 @@ }

@@ -10,3 +10,3 @@ import { Image } from '.';

origin_country: string;
parent_company: ParentCompany;
parent_company?: ParentCompany;
}

@@ -13,0 +13,0 @@ export interface ParentCompany {

@@ -0,1 +1,2 @@

import { CountryCode } from '../types';
export interface ImageConfiguration {

@@ -14,93 +15,136 @@ base_url: string;

}
export declare enum BackdropSizes {
W300 = "w300",
W500 = "w500",
W780 = "w780",
W1280 = "w1280",
ORIGINAL = "original"
export interface CountryConfiguration {
iso_3166_1: CountryCode;
english_name: string;
native_name: string;
}
export declare enum LogoSizes {
W45 = "w45",
W92 = "w92",
W154 = "w154",
W185 = "w185",
W300 = "w300",
W500 = "w500",
ORIGINAL = "original"
export interface LanguageConfiguration {
iso_639_1: string;
english_name: string;
name: string;
}
export declare enum PosterSizes {
W92 = "w92",
W154 = "w154",
W185 = "w185",
W300 = "w300",
W500 = "w500",
W780 = "w780",
ORIGINAL = "original"
export interface JobConfiguration {
department: string;
jobs: string[];
}
export declare enum ProfileSizes {
W45 = "w45",
W185 = "w185",
W632 = "w632",
ORIGINAL = "original"
export interface TimezoneConfiguration {
iso_3166_1: CountryCode;
zones: string[];
}
export declare enum StillSizes {
W92 = "w92",
W185 = "w185",
W300 = "w300",
ORIGINAL = "original"
}
export 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"
}
export declare const MediaSize: {
readonly W45: "w45";
readonly W92: "w92";
readonly W154: "w154";
readonly W185: "w185";
readonly W300: "w300";
readonly W342: "w342";
readonly W500: "w500";
readonly W632: "w632";
readonly W780: "w780";
readonly W1280: "w1280";
readonly ORIGINAL: "original";
};
export declare const BackdropSize: {
readonly W45: "w45";
readonly W92: "w92";
readonly W154: "w154";
readonly W185: "w185";
readonly W300: "w300";
readonly W500: "w500";
readonly W780: "w780";
readonly W1280: "w1280";
readonly ORIGINAL: "original";
};
type BackdropSizes = (typeof BackdropSize)[keyof typeof BackdropSize];
export declare const LogoSize: {
readonly W45: "w45";
readonly W92: "w92";
readonly W154: "w154";
readonly W185: "w185";
readonly W300: "w300";
readonly W500: "w500";
readonly ORIGINAL: "original";
};
type LogoSizes = (typeof LogoSize)[keyof typeof LogoSize];
export declare const PosterSize: {
readonly W92: "w92";
readonly W154: "w154";
readonly W185: "w185";
readonly W300: "w300";
readonly W342: "w342";
readonly W500: "w500";
readonly W780: "w780";
readonly ORIGINAL: "original";
};
type PosterSizes = (typeof PosterSize)[keyof typeof PosterSize];
export declare const ProfileSize: {
readonly W45: "w45";
readonly W185: "w185";
readonly W632: "w632";
readonly ORIGINAL: "original";
};
type ProfileSizes = (typeof ProfileSize)[keyof typeof ProfileSize];
export declare const StillSize: {
readonly W92: "w92";
readonly W185: "w185";
readonly W300: "w300";
readonly ORIGINAL: "original";
};
type StillSizes = (typeof StillSize)[keyof typeof StillSize];
export declare const ChangeKey: {
readonly ADULT: "adult";
readonly AIR_DATE: "air_date";
readonly ALSO_KNOWN_AS: "also_known_as";
readonly ALTERNATIVE_TITLES: "alternative_titles";
readonly BIOGRAPHY: "biography";
readonly BIRTHDAY: "birthday";
readonly BUDGET: "budget";
readonly CAST: "cast";
readonly CERTIFICATIONS: "certifications";
readonly CHARACTER_NAMES: "character_names";
readonly CREATED_BY: "created_by";
readonly CREW: "crew";
readonly DEATHDAY: "deathday";
readonly EPISODE: "episode";
readonly EPISODE_NUMBER: "episode_number";
readonly EPISODE_RUN_TIME: "episode_run_time";
readonly FREEBASE_ID: "freebase_id";
readonly FREEBASE_MID: "freebase_mid";
readonly GENERAL: "general";
readonly GENRES: "genres";
readonly GUEST_STARS: "guest_stars";
readonly HOMEPAGE: "homepage";
readonly IMAGES: "images";
readonly IMDB_ID: "imdb_id";
readonly LANGUAGES: "languages";
readonly NAME: "name";
readonly NETWORK: "network";
readonly ORIGIN_COUNTRY: "origin_country";
readonly ORIGINAL_NAME: "original_name";
readonly ORIGINAL_TITLE: "original_title";
readonly OVERVIEW: "overview";
readonly PARTS: "parts";
readonly PLACE_OF_BIRTH: "place_of_birth";
readonly PLOT_KEYWORDS: "plot_keywords";
readonly PRODUCTION_CODE: "production_code";
readonly PRODUCTION_COMPANIES: "production_companies";
readonly PRODUCTION_COUNTRIES: "production_countries";
readonly RELEASES: "releases";
readonly REVENUE: "revenue";
readonly RUNTIME: "runtime";
readonly SEASON: "season";
readonly SEASON_NUMBER: "season_number";
readonly SEASON_REGULAR: "season_regular";
readonly SPOKEN_LANGUAGES: "spoken_languages";
readonly STATUS: "status";
readonly TAGLINE: "tagline";
readonly TITLE: "title";
readonly TRANSLATIONS: "translations";
readonly TVDB_ID: "tvdb_id";
readonly TVRAGE_ID: "tvrage_id";
readonly TYPE: "type";
readonly VIDEO: "video";
readonly VIDEOS: "videos";
};
type ChangeKeys = (typeof ChangeKey)[keyof typeof ChangeKey];
export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ChangeKeys = exports.StillSizes = exports.ProfileSizes = exports.PosterSizes = exports.LogoSizes = exports.BackdropSizes = void 0;
var BackdropSizes;
(function (BackdropSizes) {
BackdropSizes["W300"] = "w300";
BackdropSizes["W500"] = "w500";
BackdropSizes["W780"] = "w780";
BackdropSizes["W1280"] = "w1280";
BackdropSizes["ORIGINAL"] = "original";
})(BackdropSizes = exports.BackdropSizes || (exports.BackdropSizes = {}));
var LogoSizes;
(function (LogoSizes) {
LogoSizes["W45"] = "w45";
LogoSizes["W92"] = "w92";
LogoSizes["W154"] = "w154";
LogoSizes["W185"] = "w185";
LogoSizes["W300"] = "w300";
LogoSizes["W500"] = "w500";
LogoSizes["ORIGINAL"] = "original";
})(LogoSizes = exports.LogoSizes || (exports.LogoSizes = {}));
var PosterSizes;
(function (PosterSizes) {
PosterSizes["W92"] = "w92";
PosterSizes["W154"] = "w154";
PosterSizes["W185"] = "w185";
PosterSizes["W300"] = "w300";
PosterSizes["W500"] = "w500";
PosterSizes["W780"] = "w780";
PosterSizes["ORIGINAL"] = "original";
})(PosterSizes = exports.PosterSizes || (exports.PosterSizes = {}));
var ProfileSizes;
(function (ProfileSizes) {
ProfileSizes["W45"] = "w45";
ProfileSizes["W185"] = "w185";
ProfileSizes["W632"] = "w632";
ProfileSizes["ORIGINAL"] = "original";
})(ProfileSizes = exports.ProfileSizes || (exports.ProfileSizes = {}));
var StillSizes;
(function (StillSizes) {
StillSizes["W92"] = "w92";
StillSizes["W185"] = "w185";
StillSizes["W300"] = "w300";
StillSizes["ORIGINAL"] = "original";
})(StillSizes = exports.StillSizes || (exports.StillSizes = {}));
var ChangeKeys;
(function (ChangeKeys) {
ChangeKeys["ADULT"] = "adult";
ChangeKeys["AIR_DATE"] = "air_date";
ChangeKeys["ALSO_KNOWN_AS"] = "also_known_as";
ChangeKeys["ALTERNATIVE_TITLES"] = "alternative_titles";
ChangeKeys["BIOGRAPHY"] = "biography";
ChangeKeys["BIRTHDAY"] = "birthday";
ChangeKeys["BUDGET"] = "budget";
ChangeKeys["CAST"] = "cast";
ChangeKeys["CERTIFICATIONS"] = "certifications";
ChangeKeys["CHARACTER_NAMES"] = "character_names";
ChangeKeys["CREATED_BY"] = "created_by";
ChangeKeys["CREW"] = "crew";
ChangeKeys["DEATHDAY"] = "deathday";
ChangeKeys["EPISODE"] = "episode";
ChangeKeys["EPISODE_NUMBER"] = "episode_number";
ChangeKeys["EPISODE_RUN_TIME"] = "episode_run_time";
ChangeKeys["FREEBASE_ID"] = "freebase_id";
ChangeKeys["FREEBASE_MID"] = "freebase_mid";
ChangeKeys["GENERAL"] = "general";
ChangeKeys["GENRES"] = "genres";
ChangeKeys["GUEST_STARS"] = "guest_stars";
ChangeKeys["HOMEPAGE"] = "homepage";
ChangeKeys["IMAGES"] = "images";
ChangeKeys["IMDB_ID"] = "imdb_id";
ChangeKeys["LANGUAGES"] = "languages";
ChangeKeys["NAME"] = "name";
ChangeKeys["NETWORK"] = "network";
ChangeKeys["ORIGIN_COUNTRY"] = "origin_country";
ChangeKeys["ORIGINAL_NAME"] = "original_name";
ChangeKeys["ORIGINAL_TITLE"] = "original_title";
ChangeKeys["OVERVIEW"] = "overview";
ChangeKeys["PARTS"] = "parts";
ChangeKeys["PLACE_OF_BIRTH"] = "place_of_birth";
ChangeKeys["PLOT_KEYWORDS"] = "plot_keywords";
ChangeKeys["PRODUCTION_CODE"] = "production_code";
ChangeKeys["PRODUCTION_COMPANIES"] = "production_companies";
ChangeKeys["PRODUCTION_COUNTRIES"] = "production_countries";
ChangeKeys["RELEASES"] = "releases";
ChangeKeys["REVENUE"] = "revenue";
ChangeKeys["RUNTIME"] = "runtime";
ChangeKeys["SEASON"] = "season";
ChangeKeys["SEASON_NUMBER"] = "season_number";
ChangeKeys["SEASON_REGULAR"] = "season_regular";
ChangeKeys["SPOKEN_LANGUAGES"] = "spoken_languages";
ChangeKeys["STATUS"] = "status";
ChangeKeys["TAGLINE"] = "tagline";
ChangeKeys["TITLE"] = "title";
ChangeKeys["TRANSLATIONS"] = "translations";
ChangeKeys["TVDB_ID"] = "tvdb_id";
ChangeKeys["TVRAGE_ID"] = "tvrage_id";
ChangeKeys["TYPE"] = "type";
ChangeKeys["VIDEO"] = "video";
ChangeKeys["VIDEOS"] = "videos";
})(ChangeKeys = exports.ChangeKeys || (exports.ChangeKeys = {}));
exports.ChangeKey = exports.StillSize = exports.ProfileSize = exports.PosterSize = exports.LogoSize = exports.BackdropSize = exports.MediaSize = void 0;
exports.MediaSize = {
W45: 'w45',
W92: 'w92',
W154: 'w154',
W185: 'w185',
W300: 'w300',
W342: 'w342',
W500: 'w500',
W632: 'w632',
W780: 'w780',
W1280: 'w1280',
ORIGINAL: 'original',
};
exports.BackdropSize = {
W45: 'w45',
W92: 'w92',
W154: 'w154',
W185: 'w185',
W300: 'w300',
W500: 'w500',
W780: 'w780',
W1280: 'w1280',
ORIGINAL: 'original',
};
exports.LogoSize = {
W45: 'w45',
W92: 'w92',
W154: 'w154',
W185: 'w185',
W300: 'w300',
W500: 'w500',
ORIGINAL: 'original',
};
exports.PosterSize = {
W92: 'w92',
W154: 'w154',
W185: 'w185',
W300: 'w300',
W342: 'w342',
W500: 'w500',
W780: 'w780',
ORIGINAL: 'original',
};
exports.ProfileSize = {
W45: 'w45',
W185: 'w185',
W632: 'w632',
ORIGINAL: 'original',
};
exports.StillSize = {
W92: 'w92',
W185: 'w185',
W300: 'w300',
ORIGINAL: 'original',
};
exports.ChangeKey = {
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.js.map

@@ -1,2 +0,2 @@

import { Image, Person } from './';
import { CountryCode, Image, Person } from './';
export interface CreditSeason {

@@ -8,3 +8,3 @@ air_date?: string;

export interface Media {
i?: number;
id?: number;
name?: string;

@@ -17,2 +17,4 @@ first_air_date?: string;

genre_ids?: number[];
media_type: string;
adult: boolean;
original_name?: string;

@@ -37,3 +39,3 @@ origin_country?: string[];

export interface Title {
iso_3166_1: string;
iso_3166_1: CountryCode;
title: string;

@@ -86,3 +88,3 @@ type: string;

iso_639_1: string;
iso_3166_1: string;
iso_3166_1: CountryCode;
key: string;

@@ -89,0 +91,0 @@ name: string;

import { Movie, TV } from '.';
export 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';
export type MonetizationType = 'flatrate' | 'free' | 'ads' | 'rent' | 'buy';
export 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?: MonetizationType;
'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;
include_adult?: boolean;
}
export 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;
}
export 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;
}
export type SortOption = 'first_air_date.asc' | 'first_air_date.desc' | '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';
export interface MovieDiscoverResult {

@@ -4,0 +59,0 @@ page: number;

@@ -37,2 +37,3 @@ export * from './options';

name: string;
original_name: string;
known_for: KnownFor[];

@@ -75,2 +76,3 @@ profile_path: string;

id: number;
adult: boolean;
name: string;

@@ -101,2 +103,9 @@ first_air_date: string;

twitter_id: string;
tvdb_id?: number;
freebase_mid?: string;
freebase_id?: string;
tvrage_id?: number;
wikidata_id: string;
tiktok_id?: string;
youtube_id?: string;
id: number;

@@ -111,3 +120,3 @@ }

export interface ProductionCountry {
iso_3166_1: string;
iso_3166_1: CountryCode;
name: string;

@@ -126,3 +135,3 @@ }

descriptor: unknown[];
iso_3166_1: string;
iso_3166_1: CountryCode;
rating: string;

@@ -156,5 +165,5 @@ }

content: string;
created_at: Date;
created_at: string;
id: string;
updated_at: Date;
updated_at: string;
url: string;

@@ -175,3 +184,3 @@ }

export interface Translation {
iso_3166_1: string;
iso_3166_1: CountryCode;
iso_639_1: string;

@@ -201,1 +210,3 @@ name: string;

}
export declare const CountryCodes: readonly ["AE", "AR", "AT", "AU", "BE", "BG", "BO", "BR", "CA", "CH", "CL", "CO", "CR", "CV", "CZ", "DE", "DK", "EC", "EE", "EG", "ES", "FI", "FR", "GB", "GH", "GR", "GT", "HK", "HN", "HU", "ID", "IE", "IL", "IN", "IT", "JP", "LT", "LV", "MU", "MX", "MY", "MZ", "NL", "NO", "NZ", "PE", "PH", "PL", "PT", "PY", "RU", "SA", "SE", "SG", "SI", "SK", "TH", "TR", "TW", "UG", "US", "VE", "ZA"];
export type CountryCode = (typeof CountryCodes)[number];

@@ -17,2 +17,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.CountryCodes = void 0;
__exportStar(require("./options"), exports);

@@ -38,2 +39,67 @@ __exportStar(require("./certification"), exports);

__exportStar(require("./tv-seasons"), exports);
exports.CountryCodes = [
'AE',
'AR',
'AT',
'AU',
'BE',
'BG',
'BO',
'BR',
'CA',
'CH',
'CL',
'CO',
'CR',
'CV',
'CZ',
'DE',
'DK',
'EC',
'EE',
'EG',
'ES',
'FI',
'FR',
'GB',
'GH',
'GR',
'GT',
'HK',
'HN',
'HU',
'ID',
'IE',
'IL',
'IN',
'IT',
'JP',
'LT',
'LV',
'MU',
'MX',
'MY',
'MZ',
'NL',
'NO',
'NZ',
'PE',
'PH',
'PL',
'PT',
'PY',
'RU',
'SA',
'SE',
'SG',
'SI',
'SK',
'TH',
'TR',
'TW',
'UG',
'US',
'VE',
'ZA',
];
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import { Genre, Movie, ProductionCompany, ProductionCountry, SpokenLanguage } from './';
import { CountryCode, Genre, Movie, ProductionCompany, ProductionCountry, SpokenLanguage } from './';
export interface BelongsToCollection {

@@ -45,4 +45,5 @@ id: number;

certification: string;
descriptors: string[];
iso_639_1: string;
release_date: Date;
release_date: string;
type: ReleaseDateType;

@@ -52,3 +53,3 @@ note: string;

export interface ReleaseDateResult {
iso_3166_1: string;
iso_3166_1: CountryCode;
release_dates: ReleaseDate[];

@@ -55,0 +56,0 @@ }

@@ -12,3 +12,3 @@ "use strict";

ReleaseDateType[ReleaseDateType["TV"] = 6] = "TV";
})(ReleaseDateType = exports.ReleaseDateType || (exports.ReleaseDateType = {}));
})(ReleaseDateType || (exports.ReleaseDateType = ReleaseDateType = {}));
//# sourceMappingURL=movies.js.map

@@ -1,5 +0,10 @@

import { AlternativeTitles, Changes, ContentRatings, Credits, EpisodeGroups, ExternalIds, Images, Keywords, MovieLists, PeopleImages, PersonTranslations, PersonCombinedCredits, PersonMovieCredit, PersonTvShowCredit, Recommendations, ReleaseDates, Reviews, ScreenedTheatrically, SimilarMovies, SimilarTvShows, TaggedImages, Translations, Videos, WatchProviders, PersonChangeValue, MovieChangeValue, TvShowChangeValue, TvEpisodeChangeValue, TvEpisodeCredit, TvEpisodeTranslations, TvSeasonChangeValue } from '.';
import { AlternativeTitles, Changes, ContentRatings, Credits, EpisodeGroups, ExternalIds, Images, Keywords, MovieLists, PeopleImages, PersonTranslations, PersonCombinedCredits, PersonMovieCredit, PersonTvShowCredit, Recommendations, ReleaseDates, Reviews, ScreenedTheatrically, SimilarMovies, SimilarTvShows, TaggedImages, Translations, Videos, WatchProviders, PersonChangeValue, MovieChangeValue, TvShowChangeValue, TvEpisodeChangeValue, TvEpisodeCredit, TvEpisodeTranslations, TvSeasonChangeValue, CountryCode } from '.';
export declare const AvailableLanguages: readonly ["af-ZA", "ar-AE", "ar-BH", "ar-EG", "ar-IQ", "ar-JO", "ar-LY", "ar-MA", "ar-QA", "ar-SA", "ar-TD", "ar-YE", "be-BY", "bg-BG", "bn-BD", "br-FR", "ca-AD", "ca-ES", "ch-GU", "cs-CZ", "cy-GB", "da-DK", "de-AT", "de-CH", "de-DE", "el-CY", "el-GR", "en-AG", "en-AU", "en-BB", "en-BZ", "en-CA", "en-CM", "en-GB", "en-GG", "en-GH", "en-GI", "en-GY", "en-IE", "en-JM", "en-KE", "en-LC", "en-MW", "en-NZ", "en-PG", "en-TC", "en-US", "en-ZM", "en-ZW", "eo-EO", "es-AR", "es-CL", "es-DO", "es-EC", "es-ES", "es-GQ", "es-GT", "es-HN", "es-MX", "es-NI", "es-PA", "es-PE", "es-PY", "es-SV", "es-UY", "et-EE", "eu-ES", "fa-IR", "fi-FI", "fr-BF", "fr-CA", "fr-CD", "fr-CI", "fr-FR", "fr-GF", "fr-GP", "fr-MC", "fr-ML", "fr-MU", "fr-PF", "ga-IE", "gd-GB", "gl-ES", "he-IL", "hi-IN", "hr-HR", "hu-HU", "id-ID", "it-IT", "it-VA", "ja-JP", "ka-GE", "kk-KZ", "kn-IN", "ko-KR", "ky-KG", "lt-LT", "lv-LV", "ml-IN", "mr-IN", "ms-MY", "ms-SG", "nb-NO", "nl-BE", "nl-NL", "no-NO", "pa-IN", "pl-PL", "pt-AO", "pt-BR", "pt-MZ", "pt-PT", "ro-MD", "ro-RO", "ru-RU", "si-LK", "sk-SK", "sl-SI", "sq-AL", "sq-XK", "sr-ME", "sr-RS", "sv-SE", "sw-TZ", "ta-IN", "te-IN", "th-TH", "tl-PH", "tr-TR", "uk-UA", "ur-PK", "vi-VN", "zh-CN", "zh-HK", "zh-SG", "zh-TW", "zu-ZA"];
export type AvailableLanguage = (typeof AvailableLanguages)[number];
export interface LanguageOption {
language?: string;
language?: AvailableLanguage;
}
export interface WatchRegionOption {
watch_region?: CountryCode;
}
export interface RegionOption {

@@ -15,4 +20,4 @@ region?: string;

export interface ChangeOption extends PageOption {
start_date?: Date;
end_date?: Date;
start_date?: string;
end_date?: string;
}

@@ -19,0 +24,0 @@ export type AppendToResponseMovieKey = 'images' | 'videos' | 'credits' | 'recommendations' | 'reviews' | 'changes' | 'similar' | 'lists' | 'release_dates' | 'alternative_titles' | 'external_ids' | 'translations' | 'watch/providers' | 'keywords';

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AvailableLanguages = void 0;
exports.AvailableLanguages = [
'af-ZA',
'ar-AE',
'ar-BH',
'ar-EG',
'ar-IQ',
'ar-JO',
'ar-LY',
'ar-MA',
'ar-QA',
'ar-SA',
'ar-TD',
'ar-YE',
'be-BY',
'bg-BG',
'bn-BD',
'br-FR',
'ca-AD',
'ca-ES',
'ch-GU',
'cs-CZ',
'cy-GB',
'da-DK',
'de-AT',
'de-CH',
'de-DE',
'el-CY',
'el-GR',
'en-AG',
'en-AU',
'en-BB',
'en-BZ',
'en-CA',
'en-CM',
'en-GB',
'en-GG',
'en-GH',
'en-GI',
'en-GY',
'en-IE',
'en-JM',
'en-KE',
'en-LC',
'en-MW',
'en-NZ',
'en-PG',
'en-TC',
'en-US',
'en-ZM',
'en-ZW',
'eo-EO',
'es-AR',
'es-CL',
'es-DO',
'es-EC',
'es-ES',
'es-GQ',
'es-GT',
'es-HN',
'es-MX',
'es-NI',
'es-PA',
'es-PE',
'es-PY',
'es-SV',
'es-UY',
'et-EE',
'eu-ES',
'fa-IR',
'fi-FI',
'fr-BF',
'fr-CA',
'fr-CD',
'fr-CI',
'fr-FR',
'fr-GF',
'fr-GP',
'fr-MC',
'fr-ML',
'fr-MU',
'fr-PF',
'ga-IE',
'gd-GB',
'gl-ES',
'he-IL',
'hi-IN',
'hr-HR',
'hu-HU',
'id-ID',
'it-IT',
'it-VA',
'ja-JP',
'ka-GE',
'kk-KZ',
'kn-IN',
'ko-KR',
'ky-KG',
'lt-LT',
'lv-LV',
'ml-IN',
'mr-IN',
'ms-MY',
'ms-SG',
'nb-NO',
'nl-BE',
'nl-NL',
'no-NO',
'pa-IN',
'pl-PL',
'pt-AO',
'pt-BR',
'pt-MZ',
'pt-PT',
'ro-MD',
'ro-RO',
'ru-RU',
'si-LK',
'sk-SK',
'sl-SI',
'sq-AL',
'sq-XK',
'sr-ME',
'sr-RS',
'sv-SE',
'sw-TZ',
'ta-IN',
'te-IN',
'th-TH',
'tl-PH',
'tr-TR',
'uk-UA',
'ur-PK',
'vi-VN',
'zh-CN',
'zh-HK',
'zh-SG',
'zh-TW',
'zu-ZA',
];
//# sourceMappingURL=options.js.map

@@ -1,2 +0,2 @@

import { Image, Movie, Person, TV } from '.';
import { CountryCode, Image, Movie, Person, TV } from '.';
interface Cast {

@@ -93,3 +93,3 @@ character: string;

};
export interface PopularPersons {
export interface PopularPeople {
page: number;

@@ -126,3 +126,3 @@ results: Person[];

translations: {
iso_3166_1: string;
iso_3166_1: CountryCode;
iso_639_1: string;

@@ -129,0 +129,0 @@ name: string;

@@ -1,2 +0,2 @@

import { Credits, Crew } from '.';
import { CountryCode, Credits, Crew } from '.';
export interface EpisodeSelection {

@@ -42,3 +42,3 @@ tvShowID: number;

translations: {
iso_3166_1: string;
iso_3166_1: CountryCode;
iso_639_1: string;

@@ -45,0 +45,0 @@ name: string;

@@ -0,1 +1,18 @@

import { Region } from './regions';
import { CountryCode } from '../types';
export interface WatchProvider {
display_priorities: {
[K in CountryCode]: number;
};
display_priority: number;
logo_path: string;
provider_id: number;
provider_name: string;
}
export interface RegionResult {
results: Array<Region>;
}
export interface WatchProviderResult {
results: Array<WatchProvider>;
}
export interface Flatrate {

@@ -2,0 +19,0 @@ display_priority: number;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseOptions = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
function parseOptions(options) {
/* eslint-disable @typescript-eslint/no-explicit-any */
return options ? new URLSearchParams(Object.entries(options)).toString() : '';

@@ -7,0 +7,0 @@ }

MIT License
Copyright (c) 2021 Blake Joynes
Copyright (c) 2024 Blake Joynes

@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

{
"name": "tmdb-ts",
"version": "1.8.0",
"version": "2.0.0",
"description": "TMDB v3 library wrapper",

@@ -9,5 +9,5 @@ "main": "dist/index.js",

"compile": "rm -rf dist && tsc -d",
"lint": "eslint --ext .ts src/",
"lint:fix": "eslint --ext .ts src/ --fix",
"format": "npx prettier --write src",
"lint": "eslint src/",
"lint:fix": "eslint --fix",
"format": "prettier --write src",
"pre-commit": "npm run lint"

@@ -33,24 +33,19 @@ },

"devDependencies": {
"@types/node": "^18.15.11",
"@types/node-fetch": "^2.5.10",
"@typescript-eslint/eslint-plugin": "^5.58.0",
"@typescript-eslint/parser": "^5.58.0",
"dotenv": "^9.0.2",
"eslint": "^8.38.0",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"husky": "^8.0.3",
"prettier": "^2.8.7",
"ts-node": "^10.9.1",
"typescript": "^4.9.5"
"@eslint/js": "^9.4.0",
"@types/eslint__js": "^8.42.3",
"@types/node": "^20.14.2",
"@types/node-fetch": "^3.0.3",
"dotenv": "^16.4.5",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"globals": "^15.4.0",
"husky": "^9.0.11",
"prettier": "^3.3.1",
"ts-node": "^10.9.2",
"typescript": "^5.4.5",
"typescript-eslint": "^7.12.0"
},
"dependencies": {
"cross-fetch": "^3.1.4"
"cross-fetch": "^4.0.0"
},
"volta": {
"node": "18.16.0",
"yarn": "1.22.4",
"npm": "9.5.1"
},
"husky": {

@@ -57,0 +52,0 @@ "hooks": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc