@lorenzopant/tmdb 1.14.1 → 1.15.1

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 (137) hide show
  1. package/dist/client.d.ts +0 -1
  2. package/dist/client.js +2 -7
  3. package/dist/endpoints/base.d.ts +0 -1
  4. package/dist/endpoints/certifications.d.ts +0 -1
  5. package/dist/endpoints/changes.d.ts +0 -1
  6. package/dist/endpoints/collections.d.ts +0 -1
  7. package/dist/endpoints/companies.d.ts +0 -1
  8. package/dist/endpoints/configuration.d.ts +0 -1
  9. package/dist/endpoints/credits.d.ts +0 -1
  10. package/dist/endpoints/discover.d.ts +0 -1
  11. package/dist/endpoints/find.d.ts +0 -1
  12. package/dist/endpoints/genres.d.ts +0 -1
  13. package/dist/endpoints/keywords.d.ts +0 -1
  14. package/dist/endpoints/movie_lists.d.ts +0 -1
  15. package/dist/endpoints/movies.d.ts +0 -1
  16. package/dist/endpoints/networks.d.ts +0 -1
  17. package/dist/endpoints/search.d.ts +0 -1
  18. package/dist/endpoints/trending.d.ts +36 -0
  19. package/dist/endpoints/trending.js +48 -0
  20. package/dist/endpoints/tv_episode_groups.d.ts +0 -1
  21. package/dist/endpoints/tv_episodes.d.ts +0 -1
  22. package/dist/endpoints/tv_seasons.d.ts +0 -1
  23. package/dist/endpoints/tv_series.d.ts +0 -1
  24. package/dist/endpoints/tv_series_lists.d.ts +0 -1
  25. package/dist/endpoints/watch_providers.d.ts +0 -1
  26. package/dist/errors/messages.d.ts +0 -1
  27. package/dist/errors/tmdb.d.ts +0 -1
  28. package/dist/images/images.d.ts +0 -1
  29. package/dist/index.d.ts +0 -1
  30. package/dist/routes.d.ts +6 -1
  31. package/dist/routes.js +6 -0
  32. package/dist/tmdb.d.ts +2 -1
  33. package/dist/tmdb.js +3 -0
  34. package/dist/types/collections.d.ts +0 -1
  35. package/dist/types/common/certifications.d.ts +0 -1
  36. package/dist/types/common/changes.d.ts +0 -1
  37. package/dist/types/common/images.d.ts +0 -1
  38. package/dist/types/common/index.d.ts +0 -1
  39. package/dist/types/common/media.d.ts +0 -1
  40. package/dist/types/common/pagination.d.ts +0 -1
  41. package/dist/types/common/params.d.ts +0 -1
  42. package/dist/types/companies.d.ts +0 -1
  43. package/dist/types/config/configuration.d.ts +0 -1
  44. package/dist/types/config/countries.d.ts +0 -1
  45. package/dist/types/config/images.d.ts +0 -1
  46. package/dist/types/config/index.d.ts +0 -1
  47. package/dist/types/config/languages.d.ts +0 -1
  48. package/dist/types/config/options.d.ts +0 -1
  49. package/dist/types/config/timezones.d.ts +0 -1
  50. package/dist/types/credits.d.ts +0 -1
  51. package/dist/types/discover.d.ts +0 -1
  52. package/dist/types/enums.d.ts +0 -1
  53. package/dist/types/find.d.ts +0 -1
  54. package/dist/types/index.d.ts +1 -1
  55. package/dist/types/index.js +1 -0
  56. package/dist/types/keywords.d.ts +0 -1
  57. package/dist/types/movies.d.ts +0 -1
  58. package/dist/types/networks.d.ts +0 -1
  59. package/dist/types/search.d.ts +0 -1
  60. package/dist/types/trending.d.ts +55 -0
  61. package/dist/types/trending.js +1 -0
  62. package/dist/types/tv-episode-groups.d.ts +0 -1
  63. package/dist/types/tv-episodes.d.ts +0 -1
  64. package/dist/types/tv-seasons.d.ts +0 -1
  65. package/dist/types/tv-series.d.ts +0 -1
  66. package/dist/types/utility.d.ts +0 -1
  67. package/dist/types/watch-providers.d.ts +0 -1
  68. package/dist/utils/index.d.ts +0 -1
  69. package/dist/utils/logger.d.ts +0 -1
  70. package/dist/utils/logger.js +2 -3
  71. package/package.json +6 -2
  72. package/.release-it.json +0 -18
  73. package/dist/client.d.ts.map +0 -1
  74. package/dist/endpoints/base.d.ts.map +0 -1
  75. package/dist/endpoints/certifications.d.ts.map +0 -1
  76. package/dist/endpoints/changes.d.ts.map +0 -1
  77. package/dist/endpoints/collections.d.ts.map +0 -1
  78. package/dist/endpoints/companies.d.ts.map +0 -1
  79. package/dist/endpoints/configuration.d.ts.map +0 -1
  80. package/dist/endpoints/credits.d.ts.map +0 -1
  81. package/dist/endpoints/discover.d.ts.map +0 -1
  82. package/dist/endpoints/find.d.ts.map +0 -1
  83. package/dist/endpoints/genres.d.ts.map +0 -1
  84. package/dist/endpoints/keywords.d.ts.map +0 -1
  85. package/dist/endpoints/movie_lists.d.ts.map +0 -1
  86. package/dist/endpoints/movies.d.ts.map +0 -1
  87. package/dist/endpoints/networks.d.ts.map +0 -1
  88. package/dist/endpoints/search.d.ts.map +0 -1
  89. package/dist/endpoints/tv_episode_groups.d.ts.map +0 -1
  90. package/dist/endpoints/tv_episodes.d.ts.map +0 -1
  91. package/dist/endpoints/tv_seasons.d.ts.map +0 -1
  92. package/dist/endpoints/tv_series.d.ts.map +0 -1
  93. package/dist/endpoints/tv_series_lists.d.ts.map +0 -1
  94. package/dist/endpoints/watch_providers.d.ts.map +0 -1
  95. package/dist/errors/messages.d.ts.map +0 -1
  96. package/dist/errors/tmdb.d.ts.map +0 -1
  97. package/dist/images/images.d.ts.map +0 -1
  98. package/dist/index.d.ts.map +0 -1
  99. package/dist/routes.d.ts.map +0 -1
  100. package/dist/tmdb.d.ts.map +0 -1
  101. package/dist/types/collections.d.ts.map +0 -1
  102. package/dist/types/common/certifications.d.ts.map +0 -1
  103. package/dist/types/common/changes.d.ts.map +0 -1
  104. package/dist/types/common/images.d.ts.map +0 -1
  105. package/dist/types/common/index.d.ts.map +0 -1
  106. package/dist/types/common/media.d.ts.map +0 -1
  107. package/dist/types/common/pagination.d.ts.map +0 -1
  108. package/dist/types/common/params.d.ts.map +0 -1
  109. package/dist/types/companies.d.ts.map +0 -1
  110. package/dist/types/config/configuration.d.ts.map +0 -1
  111. package/dist/types/config/countries.d.ts.map +0 -1
  112. package/dist/types/config/images.d.ts.map +0 -1
  113. package/dist/types/config/index.d.ts.map +0 -1
  114. package/dist/types/config/languages.d.ts.map +0 -1
  115. package/dist/types/config/options.d.ts.map +0 -1
  116. package/dist/types/config/timezones.d.ts.map +0 -1
  117. package/dist/types/credits.d.ts.map +0 -1
  118. package/dist/types/discover.d.ts.map +0 -1
  119. package/dist/types/enums.d.ts.map +0 -1
  120. package/dist/types/find.d.ts.map +0 -1
  121. package/dist/types/index.d.ts.map +0 -1
  122. package/dist/types/keywords.d.ts.map +0 -1
  123. package/dist/types/movies.d.ts.map +0 -1
  124. package/dist/types/networks.d.ts.map +0 -1
  125. package/dist/types/search.d.ts.map +0 -1
  126. package/dist/types/tv-episode-groups.d.ts.map +0 -1
  127. package/dist/types/tv-episodes.d.ts.map +0 -1
  128. package/dist/types/tv-seasons.d.ts.map +0 -1
  129. package/dist/types/tv-series.d.ts.map +0 -1
  130. package/dist/types/utility.d.ts.map +0 -1
  131. package/dist/types/watch-providers.d.ts.map +0 -1
  132. package/dist/utils/index.d.ts.map +0 -1
  133. package/dist/utils/logger.d.ts.map +0 -1
  134. package/eslint.config.mjs +0 -6
  135. package/package-scripts.json +0 -0
  136. package/tsconfig.json +0 -115
  137. 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
  }
@@ -19,4 +19,3 @@ export declare abstract class TMDBAPIBase {
19
19
  language?: Language;
20
20
  }>(params?: T): T | undefined;
21
21
  }
22
- //# sourceMappingURL=base.d.ts.map
@@ -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
@@ -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
@@ -0,0 +1,36 @@
1
+ import type { PaginatedResponse, TrendingAllResult, TrendingMovieResult, TrendingParams, TrendingPersonResult, TrendingTVResult } from "../types";
2
+ import { TMDBAPIBase } from "./base";
3
+ export declare class TrendingAPI extends TMDBAPIBase {
4
+ /**
5
+ * Trending All
6
+ * GET - https://api.themoviedb.org/3/trending/all/{time_window}
7
+ *
8
+ * Get the trending movies, TV shows and people on TMDB.
9
+ * @reference https://developer.themoviedb.org/reference/trending-all
10
+ */
11
+ all(params: TrendingParams): Promise<PaginatedResponse<TrendingAllResult>>;
12
+ /**
13
+ * Trending Movies
14
+ * GET - https://api.themoviedb.org/3/trending/movie/{time_window}
15
+ *
16
+ * Get the trending movies on TMDB.
17
+ * @reference https://developer.themoviedb.org/reference/trending-movies
18
+ */
19
+ movies(params: TrendingParams): Promise<PaginatedResponse<TrendingMovieResult>>;
20
+ /**
21
+ * Trending TV
22
+ * GET - https://api.themoviedb.org/3/trending/tv/{time_window}
23
+ *
24
+ * Get the trending TV shows on TMDB.
25
+ * @reference https://developer.themoviedb.org/reference/trending-tv
26
+ */
27
+ tv(params: TrendingParams): Promise<PaginatedResponse<TrendingTVResult>>;
28
+ /**
29
+ * Trending People
30
+ * GET - https://api.themoviedb.org/3/trending/person/{time_window}
31
+ *
32
+ * Get the trending people on TMDB.
33
+ * @reference https://developer.themoviedb.org/reference/trending-people
34
+ */
35
+ people(params: TrendingParams): Promise<PaginatedResponse<TrendingPersonResult>>;
36
+ }
@@ -0,0 +1,48 @@
1
+ import { ENDPOINTS } from "../routes";
2
+ import { TMDBAPIBase } from "./base";
3
+ export class TrendingAPI extends TMDBAPIBase {
4
+ /**
5
+ * Trending All
6
+ * GET - https://api.themoviedb.org/3/trending/all/{time_window}
7
+ *
8
+ * Get the trending movies, TV shows and people on TMDB.
9
+ * @reference https://developer.themoviedb.org/reference/trending-all
10
+ */
11
+ async all(params) {
12
+ const { time_window, language = this.defaultOptions.language } = params;
13
+ return this.client.request(`${ENDPOINTS.TRENDING.ALL}/${time_window}`, { language });
14
+ }
15
+ /**
16
+ * Trending Movies
17
+ * GET - https://api.themoviedb.org/3/trending/movie/{time_window}
18
+ *
19
+ * Get the trending movies on TMDB.
20
+ * @reference https://developer.themoviedb.org/reference/trending-movies
21
+ */
22
+ async movies(params) {
23
+ const { time_window, language = this.defaultOptions.language } = params;
24
+ return this.client.request(`${ENDPOINTS.TRENDING.MOVIE}/${time_window}`, { language });
25
+ }
26
+ /**
27
+ * Trending TV
28
+ * GET - https://api.themoviedb.org/3/trending/tv/{time_window}
29
+ *
30
+ * Get the trending TV shows on TMDB.
31
+ * @reference https://developer.themoviedb.org/reference/trending-tv
32
+ */
33
+ async tv(params) {
34
+ const { time_window, language = this.defaultOptions.language } = params;
35
+ return this.client.request(`${ENDPOINTS.TRENDING.TV}/${time_window}`, { language });
36
+ }
37
+ /**
38
+ * Trending People
39
+ * GET - https://api.themoviedb.org/3/trending/person/{time_window}
40
+ *
41
+ * Get the trending people on TMDB.
42
+ * @reference https://developer.themoviedb.org/reference/trending-people
43
+ */
44
+ async people(params) {
45
+ const { time_window, language = this.defaultOptions.language } = params;
46
+ return this.client.request(`${ENDPOINTS.TRENDING.PERSON}/${time_window}`, { language });
47
+ }
48
+ }
@@ -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
@@ -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
@@ -130,5 +130,10 @@ export declare const ENDPOINTS: {
130
130
  TV: string;
131
131
  REGIONS: string;
132
132
  };
133
+ TRENDING: {
134
+ ALL: string;
135
+ MOVIE: string;
136
+ TV: string;
137
+ PERSON: string;
138
+ };
133
139
  };
134
- //# sourceMappingURL=routes.d.ts.map
package/dist/routes.js CHANGED
@@ -130,4 +130,10 @@ export const ENDPOINTS = {
130
130
  TV: "/watch/providers/tv",
131
131
  REGIONS: "/watch/providers/regions",
132
132
  },
133
+ TRENDING: {
134
+ ALL: "/trending/all",
135
+ MOVIE: "/trending/movie",
136
+ TV: "/trending/tv",
137
+ PERSON: "/trending/person",
138
+ },
133
139
  };
package/dist/tmdb.d.ts CHANGED
@@ -20,6 +20,7 @@ import { NetworksAPI } from "./endpoints/networks";
20
20
  import { TVEpisodesAPI } from "./endpoints/tv_episodes";
21
21
  import { TVEpisodeGroupsAPI } from "./endpoints/tv_episode_groups";
22
22
  import { TVSeasonsAPI } from "./endpoints/tv_seasons";
23
+ import { TrendingAPI } from "./endpoints/trending";
23
24
  export declare class TMDB {
24
25
  private client;
25
26
  private options;
@@ -44,6 +45,7 @@ export declare class TMDB {
44
45
  tv_episodes: TVEpisodesAPI;
45
46
  tv_episode_groups: TVEpisodeGroupsAPI;
46
47
  tv_seasons: TVSeasonsAPI;
48
+ trending: TrendingAPI;
47
49
  /**
48
50
  * Creates a new TMDB instance.
49
51
  * @param accessToken The TMDB API access token.
@@ -51,4 +53,3 @@ export declare class TMDB {
51
53
  */
52
54
  constructor(accessToken: string, options?: TMDBOptions);
53
55
  }
54
- //# sourceMappingURL=tmdb.d.ts.map
package/dist/tmdb.js CHANGED
@@ -22,6 +22,7 @@ import { NetworksAPI } from "./endpoints/networks";
22
22
  import { TVEpisodesAPI } from "./endpoints/tv_episodes";
23
23
  import { TVEpisodeGroupsAPI } from "./endpoints/tv_episode_groups";
24
24
  import { TVSeasonsAPI } from "./endpoints/tv_seasons";
25
+ import { TrendingAPI } from "./endpoints/trending";
25
26
  export class TMDB {
26
27
  client;
27
28
  options; // ** Default options for all requests
@@ -46,6 +47,7 @@ export class TMDB {
46
47
  tv_episodes;
47
48
  tv_episode_groups;
48
49
  tv_seasons;
50
+ trending;
49
51
  // etc...
50
52
  /**
51
53
  * Creates a new TMDB instance.
@@ -78,5 +80,6 @@ export class TMDB {
78
80
  this.tv_episodes = new TVEpisodesAPI(this.client, this.options);
79
81
  this.tv_episode_groups = new TVEpisodeGroupsAPI(this.client, this.options);
80
82
  this.tv_seasons = new TVSeasonsAPI(this.client, this.options);
83
+ this.trending = new TrendingAPI(this.client, this.options);
81
84
  }
82
85
  }
@@ -69,4 +69,3 @@ export type CollectionImagesParams = CollectionBaseParam & {
69
69
  language?: Language | LanguageISO6391;
70
70
  include_image_language?: Language | LanguageISO6391;
71
71
  };
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
@@ -50,4 +50,3 @@ export type CompanyAlternativeNamesParams = CompanyBaseParam;
50
50
  export type CompanyImagesParams = CompanyBaseParam & {
51
51
  include_image_language?: Language | LanguageISO6391;
52
52
  } & 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
@@ -1,6 +1,7 @@
1
1
  export * from "./common";
2
2
  export * from "./config";
3
3
  export * from "./discover";
4
+ export * from "./trending";
4
5
  export * from "./movies";
5
6
  export * from "./search";
6
7
  export * from "./tv-series";
@@ -15,4 +16,3 @@ export * from "./find";
15
16
  export * from "./watch-providers";
16
17
  export * from "./keywords";
17
18
  export * from "./credits";
18
- //# sourceMappingURL=index.d.ts.map
@@ -1,6 +1,7 @@
1
1
  export * from "./common";
2
2
  export * from "./config";
3
3
  export * from "./discover";
4
+ export * from "./trending";
4
5
  export * from "./movies";
5
6
  export * from "./search";
6
7
  export * from "./tv-series";
@@ -17,4 +17,3 @@ export type KeywordDetailsParams = KeywordBaseParam;
17
17
  export type KeywordMoviesParams = KeywordBaseParam & Pick<TMDBQueryParams, "language" | "page"> & {
18
18
  include_adult?: boolean;
19
19
  };
20
- //# sourceMappingURL=keywords.d.ts.map
@@ -302,4 +302,3 @@ export type MovieVideosParams = Prettify<MovieBaseParam & WithParams<"language">
302
302
  */
303
303
  export type MovieReviewsParams = Prettify<MovieBaseParam & WithLanguagePage>;
304
304
  export {};
305
- //# sourceMappingURL=movies.d.ts.map
@@ -43,4 +43,3 @@ export type NetworkBaseParams = {
43
43
  /** The unique TMDB identifier of the network. */
44
44
  network_id: number;
45
45
  };
46
- //# sourceMappingURL=networks.d.ts.map
@@ -196,4 +196,3 @@ export type SearchTVSeriesParams = {
196
196
  * Parameters for multi-search (movies, TV shows, and people in a single request)
197
197
  */
198
198
  export type SearchMultiParams = Pick<SearchTVSeriesParams, "query" | "include_adult" | "language" | "page">;
199
- //# sourceMappingURL=search.d.ts.map
@@ -0,0 +1,55 @@
1
+ import type { Language } from "./config/languages";
2
+ import type { MovieResultItem, PersonResultItem, TVSeriesResultItem } from "./search";
3
+ /** Time window for trending data */
4
+ export type TrendingTimeWindow = "day" | "week";
5
+ /**
6
+ * Query parameters for all trending endpoints.
7
+ * `time_window` is embedded in the URL path; `language` is a query param.
8
+ */
9
+ export type TrendingParams = {
10
+ /** Time window for trending data. `"day"` returns the last 24 hours, `"week"` returns the last 7 days. */
11
+ time_window: TrendingTimeWindow;
12
+ /** Language for localised results (ISO 639-1 + ISO 3166-1, e.g. `"en-US"`). */
13
+ language?: Language;
14
+ };
15
+ /**
16
+ * A trending movie result.
17
+ * Extends {@link MovieResultItem} with the `media_type` discriminator.
18
+ */
19
+ export type TrendingMovieResult = MovieResultItem & {
20
+ /** Media type discriminator — always `"movie"` for this endpoint. */
21
+ media_type: "movie";
22
+ };
23
+ /**
24
+ * A trending TV series result.
25
+ * Extends {@link TVSeriesResultItem} with the `media_type` discriminator.
26
+ */
27
+ export type TrendingTVResult = TVSeriesResultItem & {
28
+ /** Media type discriminator — always `"tv"` for this endpoint. */
29
+ media_type: "tv";
30
+ };
31
+ /**
32
+ * A trending person result.
33
+ * Extends {@link PersonResultItem} with the `media_type` discriminator.
34
+ */
35
+ export type TrendingPersonResult = PersonResultItem & {
36
+ /** Media type discriminator — always `"person"` for this endpoint. */
37
+ media_type: "person";
38
+ };
39
+ /**
40
+ * Union of all trending result types returned by the `trending.all()` endpoint.
41
+ * Discriminated by `media_type`.
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * import { isTrendingMovie, isTrendingTV } from "@lorenzopant/tmdb";
46
+ *
47
+ * const results = await tmdb.trending.all({ time_window: "day" });
48
+ * for (const item of results.results) {
49
+ * if (item.media_type === "movie") console.log(item.title);
50
+ * if (item.media_type === "tv") console.log(item.name);
51
+ * if (item.media_type === "person") console.log(item.name);
52
+ * }
53
+ * ```
54
+ */
55
+ export type TrendingAllResult = TrendingMovieResult | TrendingTVResult | TrendingPersonResult;
@@ -0,0 +1 @@
1
+ export {};
@@ -61,4 +61,3 @@ export type TVEpisodeGroupParams = {
61
61
  /** Episode group identifier */
62
62
  episode_group_id: string;
63
63
  };
64
- //# sourceMappingURL=tv-episode-groups.d.ts.map
@@ -95,4 +95,3 @@ export type TVEpisodeCreditsParams = TVEpisodeBaseParams & WithLanguage;
95
95
  export type TVEpisodeImagesParams = TVEpisodeBaseParams & WithLanguage & {
96
96
  include_image_language?: Language;
97
97
  };
98
- //# sourceMappingURL=tv-episodes.d.ts.map
@@ -129,4 +129,3 @@ export type TVSeasonVideosParams = TVSeasonBaseParams & WithLanguage & {
129
129
  export type TVSeasonWatchProvidersParams = TVSeasonBaseParams & WithLanguage;
130
130
  /** Parameters for the season changes endpoint. */
131
131
  export type TVSeasonChangesParams = TVSeasonId & Prettify<WithParams<"page"> & DateRange>;
132
- //# sourceMappingURL=tv-seasons.d.ts.map
@@ -443,4 +443,3 @@ export type TVSimilarParams = Prettify<TVBaseParam & WithLanguagePage>;
443
443
  * Parameters for fetching tv show reviews.
444
444
  */
445
445
  export type TVReviewsParams = Prettify<TVBaseParam & WithLanguagePage>;
446
- //# sourceMappingURL=tv-series.d.ts.map
@@ -14,4 +14,3 @@ export type LiteralUnion<T extends string> = T | (string & {});
14
14
  */
15
15
  export declare function isKnownForMovie(item: KnownForItem): item is KnownForMovie;
16
16
  export declare function isKnownForTV(item: KnownForItem): item is KnownForTV;
17
- //# sourceMappingURL=utility.d.ts.map
@@ -32,4 +32,3 @@ export type WatchProviderListResponse = {
32
32
  export type WatchProviderRegionsResponse = {
33
33
  results: ConfigurationCountry[];
34
34
  };
35
- //# sourceMappingURL=watch-providers.d.ts.map
@@ -1,2 +1 @@
1
1
  export * from "./logger";
2
- //# sourceMappingURL=index.d.ts.map