@lorenzopant/tmdb 1.15.0 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/dist/client.d.ts +0 -1
  2. package/dist/client.js +2 -7
  3. package/dist/endpoints/base.d.ts +1 -1
  4. package/dist/endpoints/base.js +3 -2
  5. package/dist/endpoints/certifications.d.ts +0 -1
  6. package/dist/endpoints/changes.d.ts +0 -1
  7. package/dist/endpoints/collections.d.ts +0 -1
  8. package/dist/endpoints/companies.d.ts +0 -1
  9. package/dist/endpoints/configuration.d.ts +0 -1
  10. package/dist/endpoints/credits.d.ts +0 -1
  11. package/dist/endpoints/discover.d.ts +0 -1
  12. package/dist/endpoints/find.d.ts +0 -1
  13. package/dist/endpoints/genres.d.ts +0 -1
  14. package/dist/endpoints/keywords.d.ts +0 -1
  15. package/dist/endpoints/movie_lists.d.ts +0 -1
  16. package/dist/endpoints/movies.d.ts +0 -1
  17. package/dist/endpoints/networks.d.ts +0 -1
  18. package/dist/endpoints/people_lists.d.ts +16 -0
  19. package/dist/endpoints/people_lists.js +16 -0
  20. package/dist/endpoints/reviews.d.ts +14 -0
  21. package/dist/endpoints/reviews.js +16 -0
  22. package/dist/endpoints/search.d.ts +0 -1
  23. package/dist/endpoints/trending.d.ts +0 -1
  24. package/dist/endpoints/tv_episode_groups.d.ts +0 -1
  25. package/dist/endpoints/tv_episodes.d.ts +0 -1
  26. package/dist/endpoints/tv_seasons.d.ts +0 -1
  27. package/dist/endpoints/tv_series.d.ts +0 -1
  28. package/dist/endpoints/tv_series.js +19 -18
  29. package/dist/endpoints/tv_series_lists.d.ts +0 -1
  30. package/dist/endpoints/watch_providers.d.ts +0 -1
  31. package/dist/errors/messages.d.ts +0 -1
  32. package/dist/errors/tmdb.d.ts +0 -1
  33. package/dist/images/images.d.ts +0 -1
  34. package/dist/index.d.ts +0 -1
  35. package/dist/routes.d.ts +6 -1
  36. package/dist/routes.js +6 -0
  37. package/dist/tmdb.d.ts +4 -1
  38. package/dist/tmdb.js +6 -0
  39. package/dist/types/collections.d.ts +2 -2
  40. package/dist/types/common/certifications.d.ts +0 -1
  41. package/dist/types/common/changes.d.ts +0 -1
  42. package/dist/types/common/images.d.ts +0 -1
  43. package/dist/types/common/index.d.ts +0 -1
  44. package/dist/types/common/media.d.ts +0 -1
  45. package/dist/types/common/pagination.d.ts +0 -1
  46. package/dist/types/common/params.d.ts +0 -1
  47. package/dist/types/companies.d.ts +3 -3
  48. package/dist/types/config/configuration.d.ts +0 -1
  49. package/dist/types/config/countries.d.ts +0 -1
  50. package/dist/types/config/images.d.ts +0 -1
  51. package/dist/types/config/index.d.ts +0 -1
  52. package/dist/types/config/languages.d.ts +0 -1
  53. package/dist/types/config/options.d.ts +0 -1
  54. package/dist/types/config/timezones.d.ts +0 -1
  55. package/dist/types/credits.d.ts +0 -1
  56. package/dist/types/discover.d.ts +0 -1
  57. package/dist/types/enums.d.ts +0 -1
  58. package/dist/types/find.d.ts +0 -1
  59. package/dist/types/index.d.ts +2 -1
  60. package/dist/types/index.js +2 -0
  61. package/dist/types/keywords.d.ts +0 -1
  62. package/dist/types/movies.d.ts +2 -3
  63. package/dist/types/networks.d.ts +0 -1
  64. package/dist/types/people-lists.d.ts +5 -0
  65. package/dist/types/people-lists.js +1 -0
  66. package/dist/types/reviews.d.ts +22 -0
  67. package/dist/types/reviews.js +1 -0
  68. package/dist/types/search.d.ts +0 -1
  69. package/dist/types/trending.d.ts +0 -1
  70. package/dist/types/tv-episode-groups.d.ts +0 -1
  71. package/dist/types/tv-episodes.d.ts +2 -2
  72. package/dist/types/tv-seasons.d.ts +3 -2
  73. package/dist/types/tv-series.d.ts +2 -3
  74. package/dist/types/utility.d.ts +0 -1
  75. package/dist/types/watch-providers.d.ts +0 -1
  76. package/dist/utils/index.d.ts +0 -1
  77. package/dist/utils/logger.d.ts +0 -1
  78. package/dist/utils/logger.js +2 -3
  79. package/package.json +8 -2
  80. package/.release-it.json +0 -18
  81. package/dist/client.d.ts.map +0 -1
  82. package/dist/endpoints/base.d.ts.map +0 -1
  83. package/dist/endpoints/certifications.d.ts.map +0 -1
  84. package/dist/endpoints/changes.d.ts.map +0 -1
  85. package/dist/endpoints/collections.d.ts.map +0 -1
  86. package/dist/endpoints/companies.d.ts.map +0 -1
  87. package/dist/endpoints/configuration.d.ts.map +0 -1
  88. package/dist/endpoints/credits.d.ts.map +0 -1
  89. package/dist/endpoints/discover.d.ts.map +0 -1
  90. package/dist/endpoints/find.d.ts.map +0 -1
  91. package/dist/endpoints/genres.d.ts.map +0 -1
  92. package/dist/endpoints/keywords.d.ts.map +0 -1
  93. package/dist/endpoints/movie_lists.d.ts.map +0 -1
  94. package/dist/endpoints/movies.d.ts.map +0 -1
  95. package/dist/endpoints/networks.d.ts.map +0 -1
  96. package/dist/endpoints/search.d.ts.map +0 -1
  97. package/dist/endpoints/trending.d.ts.map +0 -1
  98. package/dist/endpoints/tv_episode_groups.d.ts.map +0 -1
  99. package/dist/endpoints/tv_episodes.d.ts.map +0 -1
  100. package/dist/endpoints/tv_seasons.d.ts.map +0 -1
  101. package/dist/endpoints/tv_series.d.ts.map +0 -1
  102. package/dist/endpoints/tv_series_lists.d.ts.map +0 -1
  103. package/dist/endpoints/watch_providers.d.ts.map +0 -1
  104. package/dist/errors/messages.d.ts.map +0 -1
  105. package/dist/errors/tmdb.d.ts.map +0 -1
  106. package/dist/images/images.d.ts.map +0 -1
  107. package/dist/index.d.ts.map +0 -1
  108. package/dist/routes.d.ts.map +0 -1
  109. package/dist/tmdb.d.ts.map +0 -1
  110. package/dist/types/collections.d.ts.map +0 -1
  111. package/dist/types/common/certifications.d.ts.map +0 -1
  112. package/dist/types/common/changes.d.ts.map +0 -1
  113. package/dist/types/common/images.d.ts.map +0 -1
  114. package/dist/types/common/index.d.ts.map +0 -1
  115. package/dist/types/common/media.d.ts.map +0 -1
  116. package/dist/types/common/pagination.d.ts.map +0 -1
  117. package/dist/types/common/params.d.ts.map +0 -1
  118. package/dist/types/companies.d.ts.map +0 -1
  119. package/dist/types/config/configuration.d.ts.map +0 -1
  120. package/dist/types/config/countries.d.ts.map +0 -1
  121. package/dist/types/config/images.d.ts.map +0 -1
  122. package/dist/types/config/index.d.ts.map +0 -1
  123. package/dist/types/config/languages.d.ts.map +0 -1
  124. package/dist/types/config/options.d.ts.map +0 -1
  125. package/dist/types/config/timezones.d.ts.map +0 -1
  126. package/dist/types/credits.d.ts.map +0 -1
  127. package/dist/types/discover.d.ts.map +0 -1
  128. package/dist/types/enums.d.ts.map +0 -1
  129. package/dist/types/find.d.ts.map +0 -1
  130. package/dist/types/index.d.ts.map +0 -1
  131. package/dist/types/keywords.d.ts.map +0 -1
  132. package/dist/types/movies.d.ts.map +0 -1
  133. package/dist/types/networks.d.ts.map +0 -1
  134. package/dist/types/search.d.ts.map +0 -1
  135. package/dist/types/trending.d.ts.map +0 -1
  136. package/dist/types/tv-episode-groups.d.ts.map +0 -1
  137. package/dist/types/tv-episodes.d.ts.map +0 -1
  138. package/dist/types/tv-seasons.d.ts.map +0 -1
  139. package/dist/types/tv-series.d.ts.map +0 -1
  140. package/dist/types/utility.d.ts.map +0 -1
  141. package/dist/types/watch-providers.d.ts.map +0 -1
  142. package/dist/utils/index.d.ts.map +0 -1
  143. package/dist/utils/logger.d.ts.map +0 -1
  144. package/eslint.config.mjs +0 -6
  145. package/package-scripts.json +0 -0
  146. package/tsconfig.json +0 -115
  147. package/vitest.config.mts +0 -16
package/dist/client.d.ts CHANGED
@@ -15,4 +15,3 @@ export declare class ApiClient {
15
15
  private sanitizeNulls;
16
16
  private handleError;
17
17
  }
18
- //# sourceMappingURL=client.d.ts.map
package/dist/client.js CHANGED
@@ -63,9 +63,6 @@ export class ApiClient {
63
63
  if (value === null) {
64
64
  return undefined;
65
65
  }
66
- if (value === undefined) {
67
- return undefined;
68
- }
69
66
  if (typeof value !== "object") {
70
67
  return value;
71
68
  }
@@ -73,10 +70,8 @@ export class ApiClient {
73
70
  return value.map((v) => this.sanitizeNulls(v));
74
71
  }
75
72
  const sanitized = {};
76
- for (const key in value) {
77
- if (Object.prototype.hasOwnProperty.call(value, key)) {
78
- sanitized[key] = this.sanitizeNulls(value[key]);
79
- }
73
+ for (const [key, val] of Object.entries(value)) {
74
+ sanitized[key] = this.sanitizeNulls(val);
80
75
  }
81
76
  return sanitized;
82
77
  }
@@ -14,9 +14,9 @@ export declare abstract class TMDBAPIBase {
14
14
  /**
15
15
  * Ensures params contains a language: prefer explicit param, fallback to defaultOptions.language.
16
16
  * If neither is present, returns the original params unmodified.
17
+ * When params is undefined but a default language is set, returns { language: defaultLang }.
17
18
  */
18
19
  protected withLanguage<T extends {
19
20
  language?: Language;
20
21
  }>(params?: T): T | undefined;
21
22
  }
22
- //# sourceMappingURL=base.d.ts.map
@@ -17,13 +17,14 @@ export class TMDBAPIBase {
17
17
  /**
18
18
  * Ensures params contains a language: prefer explicit param, fallback to defaultOptions.language.
19
19
  * If neither is present, returns the original params unmodified.
20
+ * When params is undefined but a default language is set, returns { language: defaultLang }.
20
21
  */
21
22
  withLanguage(params) {
23
+ const defaultLang = this.defaultOptions?.language;
22
24
  if (!params)
23
- return undefined; // Handle undefined params
25
+ return defaultLang !== undefined ? { language: defaultLang } : undefined;
24
26
  if (params.language !== undefined)
25
27
  return params;
26
- const defaultLang = this.defaultOptions?.language;
27
28
  if (defaultLang === undefined)
28
29
  return params;
29
30
  return { ...params, language: defaultLang };
@@ -18,4 +18,3 @@ export declare class CertificationsAPI extends TMDBAPIBase {
18
18
  */
19
19
  tv_certifications(): Promise<Certifications>;
20
20
  }
21
- //# sourceMappingURL=certifications.d.ts.map
@@ -38,4 +38,3 @@ export declare class ChangesAPI extends TMDBAPIBase {
38
38
  */
39
39
  tv_list(params?: WithPageAndDateRange): Promise<PaginatedResponse<ChangeResultItem>>;
40
40
  }
41
- //# sourceMappingURL=changes.d.ts.map
@@ -37,4 +37,3 @@ export declare class CollectionsAPI extends TMDBAPIBase {
37
37
  */
38
38
  translations(params: CollectionBaseParam): Promise<CollectionTranslations>;
39
39
  }
40
- //# sourceMappingURL=collections.d.ts.map
@@ -35,4 +35,3 @@ export declare class CompaniesAPI extends TMDBAPIBase {
35
35
  */
36
36
  images(params: CompanyImagesParams): Promise<CompanyImages>;
37
37
  }
38
- //# sourceMappingURL=companies.d.ts.map
@@ -70,4 +70,3 @@ export declare class ConfigurationAPI extends TMDBAPIBase {
70
70
  */
71
71
  timezones(): Promise<ConfigurationTimezone[]>;
72
72
  }
73
- //# sourceMappingURL=configuration.d.ts.map
@@ -14,4 +14,3 @@ export declare class CreditsAPI extends TMDBAPIBase {
14
14
  */
15
15
  details(params: CreditDetailsParams): Promise<CreditDetails>;
16
16
  }
17
- //# sourceMappingURL=credits.d.ts.map
@@ -34,4 +34,3 @@ export declare class DiscoverAPI extends TMDBAPIBase {
34
34
  */
35
35
  tv(params?: DiscoverTVParams): Promise<PaginatedResponse<DiscoverTVResultItem>>;
36
36
  }
37
- //# sourceMappingURL=discover.d.ts.map
@@ -14,4 +14,3 @@ export declare class FindAPI extends TMDBAPIBase {
14
14
  */
15
15
  by_id(params: FindByIDParams): Promise<FindResults>;
16
16
  }
17
- //# sourceMappingURL=find.d.ts.map
@@ -23,4 +23,3 @@ export declare class GenresAPI extends TMDBAPIBase {
23
23
  */
24
24
  tv_list(params?: WithLanguage): Promise<GenresResponse>;
25
25
  }
26
- //# sourceMappingURL=genres.d.ts.map
@@ -27,4 +27,3 @@ export declare class KeywordsAPI extends TMDBAPIBase {
27
27
  */
28
28
  movies(params: KeywordMoviesParams): Promise<PaginatedResponse<MovieResultItem>>;
29
29
  }
30
- //# sourceMappingURL=keywords.d.ts.map
@@ -51,4 +51,3 @@ export declare class MovieListsAPI extends TMDBAPIBase {
51
51
  */
52
52
  upcoming(params?: MovieListParams): Promise<PaginatedResponse<MovieResultItem>>;
53
53
  }
54
- //# sourceMappingURL=movie_lists.d.ts.map
@@ -200,4 +200,3 @@ export declare class MoviesAPI extends TMDBAPIBase {
200
200
  */
201
201
  watch_providers(params: MovieWatchProvidersParams): Promise<MediaWatchProviders>;
202
202
  }
203
- //# sourceMappingURL=movies.d.ts.map
@@ -34,4 +34,3 @@ export declare class NetworksAPI extends TMDBAPIBase {
34
34
  */
35
35
  images(params: NetworkBaseParams): Promise<NetworkImages>;
36
36
  }
37
- //# sourceMappingURL=networks.d.ts.map
@@ -0,0 +1,16 @@
1
+ import type { PaginatedResponse } from "../types";
2
+ import type { PersonResultItem } from "../types/search";
3
+ import type { PeopleListParams } from "../types/people-lists";
4
+ import { TMDBAPIBase } from "./base";
5
+ export declare class PeopleListsAPI extends TMDBAPIBase {
6
+ /**
7
+ * Popular
8
+ * GET - https://api.themoviedb.org/3/person/popular
9
+ *
10
+ * Get a list of people ordered by popularity.
11
+ * @param language Language for localised results (Defaults to en-US or TMDB default)
12
+ * @param page Page number (Defaults to 1)
13
+ * @reference https://developer.themoviedb.org/reference/person-popular-list
14
+ */
15
+ popular(params?: PeopleListParams): Promise<PaginatedResponse<PersonResultItem>>;
16
+ }
@@ -0,0 +1,16 @@
1
+ import { ENDPOINTS } from "../routes";
2
+ import { TMDBAPIBase } from "./base";
3
+ export class PeopleListsAPI extends TMDBAPIBase {
4
+ /**
5
+ * Popular
6
+ * GET - https://api.themoviedb.org/3/person/popular
7
+ *
8
+ * Get a list of people ordered by popularity.
9
+ * @param language Language for localised results (Defaults to en-US or TMDB default)
10
+ * @param page Page number (Defaults to 1)
11
+ * @reference https://developer.themoviedb.org/reference/person-popular-list
12
+ */
13
+ async popular(params = {}) {
14
+ return this.client.request(ENDPOINTS.PEOPLE_LISTS.POPULAR, this.withLanguage(params) ?? params);
15
+ }
16
+ }
@@ -0,0 +1,14 @@
1
+ import type { ReviewDetails, ReviewDetailsParams } from "../types/reviews";
2
+ import { TMDBAPIBase } from "./base";
3
+ export declare class ReviewsAPI extends TMDBAPIBase {
4
+ /**
5
+ * Details
6
+ * GET - https://api.themoviedb.org/3/review/{review_id}
7
+ *
8
+ * Retrieve the details of a single review by its TMDB review ID.
9
+ * @param review_id The TMDB review identifier.
10
+ * @returns A promise that resolves to the full review details.
11
+ * @reference https://developer.themoviedb.org/reference/review-details
12
+ */
13
+ details(params: ReviewDetailsParams): Promise<ReviewDetails>;
14
+ }
@@ -0,0 +1,16 @@
1
+ import { ENDPOINTS } from "../routes";
2
+ import { TMDBAPIBase } from "./base";
3
+ export class ReviewsAPI extends TMDBAPIBase {
4
+ /**
5
+ * Details
6
+ * GET - https://api.themoviedb.org/3/review/{review_id}
7
+ *
8
+ * Retrieve the details of a single review by its TMDB review ID.
9
+ * @param review_id The TMDB review identifier.
10
+ * @returns A promise that resolves to the full review details.
11
+ * @reference https://developer.themoviedb.org/reference/review-details
12
+ */
13
+ async details(params) {
14
+ return this.client.request(`${ENDPOINTS.REVIEWS.DETAILS}/${params.review_id}`);
15
+ }
16
+ }
@@ -86,4 +86,3 @@ export declare class SearchAPI extends TMDBAPIBase {
86
86
  */
87
87
  multi(params: SearchMultiParams): Promise<PaginatedResponse<MultiSearchResultItem>>;
88
88
  }
89
- //# sourceMappingURL=search.d.ts.map
@@ -34,4 +34,3 @@ export declare class TrendingAPI extends TMDBAPIBase {
34
34
  */
35
35
  people(params: TrendingParams): Promise<PaginatedResponse<TrendingPersonResult>>;
36
36
  }
37
- //# sourceMappingURL=trending.d.ts.map
@@ -11,4 +11,3 @@ export declare class TVEpisodeGroupsAPI extends TMDBAPIBase {
11
11
  */
12
12
  details(params: TVEpisodeGroupParams): Promise<TVEpisodeGroupDetails>;
13
13
  }
14
- //# sourceMappingURL=tv_episode_groups.d.ts.map
@@ -108,4 +108,3 @@ export declare class TVEpisodesAPI extends TMDBAPIBase {
108
108
  */
109
109
  videos(params: TVEpisodeBaseParams): Promise<TVEpisodeVideos>;
110
110
  }
111
- //# sourceMappingURL=tv_episodes.d.ts.map
@@ -126,4 +126,3 @@ export declare class TVSeasonsAPI extends TMDBAPIBase {
126
126
  */
127
127
  watch_providers(params: TVSeasonWatchProvidersParams): Promise<MediaWatchProviders>;
128
128
  }
129
- //# sourceMappingURL=tv_seasons.d.ts.map
@@ -242,4 +242,3 @@ export declare class TVSeriesAPI extends TMDBAPIBase {
242
242
  */
243
243
  watch_providers(params: TVBaseParam): Promise<MediaWatchProviders>;
244
244
  }
245
- //# sourceMappingURL=tv_series.d.ts.map
@@ -19,8 +19,8 @@ export class TVSeriesAPI extends TMDBAPIBase {
19
19
  * @reference https://developer.themoviedb.org/reference/tv-series-details
20
20
  */
21
21
  async details(params) {
22
- const { language = this.defaultOptions.language, ...rest } = params;
23
- const endpoint = this.seriesPath(params.series_id);
22
+ const { language = this.defaultOptions.language, series_id, ...rest } = params;
23
+ const endpoint = this.seriesPath(series_id);
24
24
  return this.client.request(endpoint, { language, ...rest });
25
25
  }
26
26
  /**
@@ -37,8 +37,8 @@ export class TVSeriesAPI extends TMDBAPIBase {
37
37
  * @reference https://developer.themoviedb.org/reference/tv-series-aggregate-credits
38
38
  */
39
39
  async aggregate_credits(params) {
40
- const { language = this.defaultOptions.language, ...rest } = params;
41
- const endpoint = this.seriesSubPath(params.series_id, ENDPOINTS.TV_SERIES.AGGREGATE_CREDITS);
40
+ const { language = this.defaultOptions.language, series_id, ...rest } = params;
41
+ const endpoint = this.seriesSubPath(series_id, ENDPOINTS.TV_SERIES.AGGREGATE_CREDITS);
42
42
  return this.client.request(endpoint, { language, ...rest });
43
43
  }
44
44
  /**
@@ -72,8 +72,9 @@ export class TVSeriesAPI extends TMDBAPIBase {
72
72
  * @reference https://developer.themoviedb.org/reference/tv-series-changes
73
73
  */
74
74
  async changes(params) {
75
- const endpoint = this.seriesSubPath(params.series_id, ENDPOINTS.TV_SERIES.CHANGES);
76
- return this.client.request(endpoint, { ...params });
75
+ const { series_id, ...rest } = params;
76
+ const endpoint = this.seriesSubPath(series_id, ENDPOINTS.TV_SERIES.CHANGES);
77
+ return this.client.request(endpoint, { ...rest });
77
78
  }
78
79
  /**
79
80
  * Content Ratings
@@ -103,8 +104,8 @@ export class TVSeriesAPI extends TMDBAPIBase {
103
104
  * @reference https://developer.themoviedb.org/reference/tv-series-credits
104
105
  */
105
106
  async credits(params) {
106
- const endpoint = this.seriesSubPath(params.series_id, ENDPOINTS.TV_SERIES.CREDITS);
107
- const { language = this.defaultOptions.language, ...rest } = params;
107
+ const { language = this.defaultOptions.language, series_id, ...rest } = params;
108
+ const endpoint = this.seriesSubPath(series_id, ENDPOINTS.TV_SERIES.CREDITS);
108
109
  return this.client.request(endpoint, { language, ...rest });
109
110
  }
110
111
  /**
@@ -150,8 +151,8 @@ export class TVSeriesAPI extends TMDBAPIBase {
150
151
  * @reference https://developer.themoviedb.org/reference/tv-series-images
151
152
  */
152
153
  async images(params) {
153
- const { language = this.defaultOptions.language, ...rest } = params;
154
- const endpoint = this.seriesSubPath(params.series_id, ENDPOINTS.TV_SERIES.IMAGES);
154
+ const { language = this.defaultOptions.language, series_id, ...rest } = params;
155
+ const endpoint = this.seriesSubPath(series_id, ENDPOINTS.TV_SERIES.IMAGES);
155
156
  return this.client.request(endpoint, { language, ...rest });
156
157
  }
157
158
  /**
@@ -192,8 +193,8 @@ export class TVSeriesAPI extends TMDBAPIBase {
192
193
  * @reference https://developer.themoviedb.org/reference/lists-copy (TODO: Check this url for updates, it's like this on TMDB docs (??))
193
194
  */
194
195
  async lists(params) {
195
- const endpoint = this.seriesSubPath(params.series_id, ENDPOINTS.TV_SERIES.LISTS);
196
- const { language = this.defaultOptions.language, ...rest } = params;
196
+ const { language = this.defaultOptions.language, series_id, ...rest } = params;
197
+ const endpoint = this.seriesSubPath(series_id, ENDPOINTS.TV_SERIES.LISTS);
197
198
  return this.client.request(endpoint, { language, ...rest });
198
199
  }
199
200
  /**
@@ -208,8 +209,8 @@ export class TVSeriesAPI extends TMDBAPIBase {
208
209
  * @reference https://developer.themoviedb.org/reference/tv-series-recommendations
209
210
  */
210
211
  async recommendations(params) {
211
- const endpoint = this.seriesSubPath(params.series_id, ENDPOINTS.TV_SERIES.RECOMMENDATIONS);
212
- const { language = this.defaultOptions.language, ...rest } = params;
212
+ const { language = this.defaultOptions.language, series_id, ...rest } = params;
213
+ const endpoint = this.seriesSubPath(series_id, ENDPOINTS.TV_SERIES.RECOMMENDATIONS);
213
214
  return this.client.request(endpoint, { language, ...rest });
214
215
  }
215
216
  /**
@@ -224,8 +225,8 @@ export class TVSeriesAPI extends TMDBAPIBase {
224
225
  * @reference https://developer.themoviedb.org/reference/tv-series-recommendations
225
226
  */
226
227
  async reviews(params) {
227
- const endpoint = this.seriesSubPath(params.series_id, ENDPOINTS.TV_SERIES.REVIEWS);
228
- const { language = this.defaultOptions.language, ...rest } = params;
228
+ const { language = this.defaultOptions.language, series_id, ...rest } = params;
229
+ const endpoint = this.seriesSubPath(series_id, ENDPOINTS.TV_SERIES.REVIEWS);
229
230
  return this.client.request(endpoint, { language, ...rest });
230
231
  }
231
232
  /**
@@ -253,8 +254,8 @@ export class TVSeriesAPI extends TMDBAPIBase {
253
254
  * @reference https://developer.themoviedb.org/reference/tv-series-similar
254
255
  */
255
256
  async similar(params) {
256
- const endpoint = this.seriesSubPath(params.series_id, ENDPOINTS.TV_SERIES.SIMILAR);
257
- const { language = this.defaultOptions.language, ...rest } = params;
257
+ const { language = this.defaultOptions.language, series_id, ...rest } = params;
258
+ const endpoint = this.seriesSubPath(series_id, ENDPOINTS.TV_SERIES.SIMILAR);
258
259
  return this.client.request(endpoint, { language, ...rest });
259
260
  }
260
261
  /**
@@ -49,4 +49,3 @@ export declare class TVSeriesListsAPI extends TMDBAPIBase {
49
49
  */
50
50
  top_rated(params?: TVSeriesListParams): Promise<PaginatedResponse<TVSeriesResultItem>>;
51
51
  }
52
- //# sourceMappingURL=tv_series_lists.d.ts.map
@@ -32,4 +32,3 @@ export declare class WatchProvidersAPI extends TMDBAPIBase {
32
32
  */
33
33
  available_regions(params?: WatchProviderRegionsParams): Promise<WatchProviderRegionsResponse>;
34
34
  }
35
- //# sourceMappingURL=watch_providers.d.ts.map
@@ -13,4 +13,3 @@ export declare const TMDB_ERRORS: Map<number, {
13
13
  message: string;
14
14
  http_status: number;
15
15
  }>;
16
- //# sourceMappingURL=messages.d.ts.map
@@ -43,4 +43,3 @@ export declare class TMDBError extends Error {
43
43
  */
44
44
  constructor(message: string, http_status: number, tmdb_status_code?: number);
45
45
  }
46
- //# sourceMappingURL=tmdb.d.ts.map
@@ -10,4 +10,3 @@ export declare class ImageAPI {
10
10
  profile(path: string, size?: ProfileSize): string;
11
11
  still(path: string, size?: StillSize): string;
12
12
  }
13
- //# sourceMappingURL=images.d.ts.map
package/dist/index.d.ts CHANGED
@@ -2,4 +2,3 @@ export { TMDB } from "./tmdb";
2
2
  export { TMDBError } from "./errors/tmdb";
3
3
  export * from "./types";
4
4
  export * from "./utils";
5
- //# sourceMappingURL=index.d.ts.map
package/dist/routes.d.ts CHANGED
@@ -136,5 +136,10 @@ export declare const ENDPOINTS: {
136
136
  TV: string;
137
137
  PERSON: string;
138
138
  };
139
+ REVIEWS: {
140
+ DETAILS: string;
141
+ };
142
+ PEOPLE_LISTS: {
143
+ POPULAR: string;
144
+ };
139
145
  };
140
- //# sourceMappingURL=routes.d.ts.map
package/dist/routes.js CHANGED
@@ -136,4 +136,10 @@ export const ENDPOINTS = {
136
136
  TV: "/trending/tv",
137
137
  PERSON: "/trending/person",
138
138
  },
139
+ REVIEWS: {
140
+ DETAILS: "/review",
141
+ },
142
+ PEOPLE_LISTS: {
143
+ POPULAR: "/person/popular",
144
+ },
139
145
  };
package/dist/tmdb.d.ts CHANGED
@@ -21,6 +21,8 @@ import { TVEpisodesAPI } from "./endpoints/tv_episodes";
21
21
  import { TVEpisodeGroupsAPI } from "./endpoints/tv_episode_groups";
22
22
  import { TVSeasonsAPI } from "./endpoints/tv_seasons";
23
23
  import { TrendingAPI } from "./endpoints/trending";
24
+ import { ReviewsAPI } from "./endpoints/reviews";
25
+ import { PeopleListsAPI } from "./endpoints/people_lists";
24
26
  export declare class TMDB {
25
27
  private client;
26
28
  private options;
@@ -46,6 +48,8 @@ export declare class TMDB {
46
48
  tv_episode_groups: TVEpisodeGroupsAPI;
47
49
  tv_seasons: TVSeasonsAPI;
48
50
  trending: TrendingAPI;
51
+ reviews: ReviewsAPI;
52
+ people_lists: PeopleListsAPI;
49
53
  /**
50
54
  * Creates a new TMDB instance.
51
55
  * @param accessToken The TMDB API access token.
@@ -53,4 +57,3 @@ export declare class TMDB {
53
57
  */
54
58
  constructor(accessToken: string, options?: TMDBOptions);
55
59
  }
56
- //# sourceMappingURL=tmdb.d.ts.map
package/dist/tmdb.js CHANGED
@@ -23,6 +23,8 @@ import { TVEpisodesAPI } from "./endpoints/tv_episodes";
23
23
  import { TVEpisodeGroupsAPI } from "./endpoints/tv_episode_groups";
24
24
  import { TVSeasonsAPI } from "./endpoints/tv_seasons";
25
25
  import { TrendingAPI } from "./endpoints/trending";
26
+ import { ReviewsAPI } from "./endpoints/reviews";
27
+ import { PeopleListsAPI } from "./endpoints/people_lists";
26
28
  export class TMDB {
27
29
  client;
28
30
  options; // ** Default options for all requests
@@ -48,6 +50,8 @@ export class TMDB {
48
50
  tv_episode_groups;
49
51
  tv_seasons;
50
52
  trending;
53
+ reviews;
54
+ people_lists;
51
55
  // etc...
52
56
  /**
53
57
  * Creates a new TMDB instance.
@@ -81,5 +85,7 @@ export class TMDB {
81
85
  this.tv_episode_groups = new TVEpisodeGroupsAPI(this.client, this.options);
82
86
  this.tv_seasons = new TVSeasonsAPI(this.client, this.options);
83
87
  this.trending = new TrendingAPI(this.client, this.options);
88
+ this.reviews = new ReviewsAPI(this.client, this.options);
89
+ this.people_lists = new PeopleListsAPI(this.client, this.options);
84
90
  }
85
91
  }
@@ -67,6 +67,6 @@ export type CollectionBaseParam = {
67
67
  export type CollectionDetailsParams = CollectionBaseParam & WithLanguage;
68
68
  export type CollectionImagesParams = CollectionBaseParam & {
69
69
  language?: Language | LanguageISO6391;
70
- include_image_language?: Language | LanguageISO6391;
70
+ /** Languages to include images for. Pass an array — it will be serialized as a comma-separated list (e.g. ["en", "null"]). Use "null" to include untagged images. */
71
+ include_image_language?: (Language | "null")[];
71
72
  };
72
- //# sourceMappingURL=collections.d.ts.map
@@ -17,4 +17,3 @@ export type Certifications = {
17
17
  /** A record mapping each country (ISO 3166-1 alpha-2 code) to its list of applicable certifications */
18
18
  certifications: Record<CountryISO3166_1, CertificationItem[]>;
19
19
  };
20
- //# sourceMappingURL=certifications.d.ts.map
@@ -42,4 +42,3 @@ export type ChangeResultItem = {
42
42
  /** Whether the movie, tv show or person is marked as adult content */
43
43
  adult: boolean;
44
44
  };
45
- //# sourceMappingURL=changes.d.ts.map
@@ -62,4 +62,3 @@ export type ImagesResult<T, K extends ImageCollectionKey> = {
62
62
  };
63
63
  /** Available file type on svg (for images) */
64
64
  export type FileType = LiteralUnion<".png" | ".svg">;
65
- //# sourceMappingURL=images.d.ts.map
@@ -4,4 +4,3 @@ export * from "./images";
4
4
  export * from "./pagination";
5
5
  export * from "./params";
6
6
  export * from "./certifications";
7
- //# sourceMappingURL=index.d.ts.map
@@ -303,4 +303,3 @@ export type WatchProviderItem = {
303
303
  display_priority: number;
304
304
  };
305
305
  export {};
306
- //# sourceMappingURL=media.d.ts.map
@@ -4,4 +4,3 @@ export type PaginatedResponse<T> = {
4
4
  total_results: number;
5
5
  results: T[];
6
6
  };
7
- //# sourceMappingURL=pagination.d.ts.map
@@ -25,4 +25,3 @@ export type WithPage = WithParams<"page">;
25
25
  export type WithRegion = WithParams<"region">;
26
26
  export type WithLanguagePage = WithParams<"language" | "page">;
27
27
  export type WithPageAndDateRange = WithParams<"page"> & DateRange;
28
- //# sourceMappingURL=params.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { AlternativeName, AlternativeNamesResult, WithLanguage } from "./common";
2
2
  import { ImagesResult, OrganizationImage } from "./common/images";
3
3
  import { CountryISO3166_1 } from "./config/countries";
4
- import { Language, LanguageISO6391 } from "./config/languages";
4
+ import { Language } from "./config";
5
5
  /**
6
6
  * Minimal company data reused across company-related responses.
7
7
  */
@@ -48,6 +48,6 @@ export type CompanyBaseParam = {
48
48
  export type CompanyDetailsParams = CompanyBaseParam;
49
49
  export type CompanyAlternativeNamesParams = CompanyBaseParam;
50
50
  export type CompanyImagesParams = CompanyBaseParam & {
51
- include_image_language?: Language | LanguageISO6391;
51
+ /** Languages to include images for. Pass an array — it will be serialized as a comma-separated list (e.g. ["en", "null"]). Use "null" to include untagged images. */
52
+ include_image_language?: (Language | "null")[];
52
53
  } & WithLanguage;
53
- //# sourceMappingURL=companies.d.ts.map
@@ -54,4 +54,3 @@ export type ConfigurationTimezone = {
54
54
  /** List of timezone identifiers for this country (e.g., "America/New_York") */
55
55
  zones: string[];
56
56
  };
57
- //# sourceMappingURL=configuration.d.ts.map
@@ -1,4 +1,3 @@
1
1
  import { ConfigurationCountry } from "./configuration";
2
2
  export declare const TMDBCountries: ConfigurationCountry[];
3
3
  export type CountryISO3166_1 = "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AN" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BM" | "BN" | "BO" | "BR" | "BS" | "BT" | "BU" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CS" | "CU" | "CV" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SU" | "SV" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TP" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "XC" | "XG" | "XI" | "XK" | "YE" | "YT" | "YU" | "ZA" | "ZM" | "ZR" | "ZW";
4
- //# sourceMappingURL=countries.d.ts.map
@@ -47,4 +47,3 @@ export type ImagesConfig = {
47
47
  */
48
48
  default_image_sizes?: Partial<DefaultImageSizesConfig>;
49
49
  };
50
- //# sourceMappingURL=images.d.ts.map
@@ -4,4 +4,3 @@ export * from "./images";
4
4
  export * from "./languages";
5
5
  export * from "./options";
6
6
  export * from "./timezones";
7
- //# sourceMappingURL=index.d.ts.map
@@ -9,4 +9,3 @@ export type PrimaryTranslations = "af-ZA" | "ar-AE" | "ar-SA" | "be-BY" | "bg-BG
9
9
  * https://developer.themoviedb.org/reference/configuration-primary-translations
10
10
  */
11
11
  export type Language = PrimaryTranslations | LanguageISO6391;
12
- //# sourceMappingURL=languages.d.ts.map
@@ -34,4 +34,3 @@ export type TMDBOptions = {
34
34
  */
35
35
  logger?: boolean | TMDBLoggerFn;
36
36
  };
37
- //# sourceMappingURL=options.d.ts.map
@@ -749,4 +749,3 @@ declare const TIMEZONE_DATA: readonly [{
749
749
  readonly zones: readonly ["Africa/Maputo"];
750
750
  }];
751
751
  export {};
752
- //# sourceMappingURL=timezones.d.ts.map
@@ -146,4 +146,3 @@ export type CreditDetails = {
146
146
  person: CreditDetailsPerson;
147
147
  };
148
148
  export {};
149
- //# sourceMappingURL=credits.d.ts.map
@@ -128,4 +128,3 @@ export type DiscoverTVParams = Prettify<Omit<DiscoverBaseParams, "sort_by"> & {
128
128
  with_type?: DiscoverFilterExpression<DiscoverTVType>;
129
129
  }>;
130
130
  export {};
131
- //# sourceMappingURL=discover.d.ts.map
@@ -6,4 +6,3 @@ export declare enum ReleaseType {
6
6
  Physical = 5,
7
7
  TV = 6
8
8
  }
9
- //# sourceMappingURL=enums.d.ts.map
@@ -101,4 +101,3 @@ export type FindResults = {
101
101
  tv_season_results: FindTVSeasonResultItem[];
102
102
  };
103
103
  export {};
104
- //# sourceMappingURL=find.d.ts.map
@@ -16,4 +16,5 @@ export * from "./find";
16
16
  export * from "./watch-providers";
17
17
  export * from "./keywords";
18
18
  export * from "./credits";
19
- //# sourceMappingURL=index.d.ts.map
19
+ export * from "./reviews";
20
+ export * from "./people-lists";
@@ -16,3 +16,5 @@ export * from "./find";
16
16
  export * from "./watch-providers";
17
17
  export * from "./keywords";
18
18
  export * from "./credits";
19
+ export * from "./reviews";
20
+ export * from "./people-lists";