@lorenzopant/tmdb 1.13.1 → 1.14.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 (46) hide show
  1. package/README.md +20 -1
  2. package/dist/client.d.ts +5 -1
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +47 -8
  5. package/dist/endpoints/base.d.ts +1 -0
  6. package/dist/endpoints/base.d.ts.map +1 -1
  7. package/dist/endpoints/base.js +3 -1
  8. package/dist/endpoints/movies.d.ts +4 -9
  9. package/dist/endpoints/movies.d.ts.map +1 -1
  10. package/dist/endpoints/movies.js +2 -7
  11. package/dist/endpoints/search.d.ts +27 -1
  12. package/dist/endpoints/search.d.ts.map +1 -1
  13. package/dist/endpoints/search.js +30 -0
  14. package/dist/endpoints/tv_seasons.d.ts +129 -0
  15. package/dist/endpoints/tv_seasons.d.ts.map +1 -0
  16. package/dist/endpoints/tv_seasons.js +164 -0
  17. package/dist/endpoints/tv_series_lists.d.ts +2 -6
  18. package/dist/endpoints/tv_series_lists.d.ts.map +1 -1
  19. package/dist/endpoints/tv_series_lists.js +2 -7
  20. package/dist/index.d.ts +1 -0
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +1 -0
  23. package/dist/routes.d.ts +8 -0
  24. package/dist/routes.d.ts.map +1 -1
  25. package/dist/routes.js +8 -0
  26. package/dist/tmdb.d.ts +2 -0
  27. package/dist/tmdb.d.ts.map +1 -1
  28. package/dist/tmdb.js +4 -1
  29. package/dist/types/config/options.d.ts +7 -0
  30. package/dist/types/config/options.d.ts.map +1 -1
  31. package/dist/types/index.d.ts +1 -0
  32. package/dist/types/index.d.ts.map +1 -1
  33. package/dist/types/index.js +1 -0
  34. package/dist/types/search.d.ts +32 -0
  35. package/dist/types/search.d.ts.map +1 -1
  36. package/dist/types/tv-seasons.d.ts +119 -2
  37. package/dist/types/tv-seasons.d.ts.map +1 -1
  38. package/dist/types/tv-series.d.ts +4 -4
  39. package/dist/types/tv-series.d.ts.map +1 -1
  40. package/dist/utils/index.d.ts +2 -0
  41. package/dist/utils/index.d.ts.map +1 -0
  42. package/dist/utils/index.js +1 -0
  43. package/dist/utils/logger.d.ts +19 -0
  44. package/dist/utils/logger.d.ts.map +1 -0
  45. package/dist/utils/logger.js +41 -0
  46. package/package.json +1 -1
package/README.md CHANGED
@@ -61,10 +61,29 @@ The main client class. **Each API method supports all the parameters supported b
61
61
  #### Constructor
62
62
 
63
63
  ```typescript
64
- const tmdb = new TMDB(accessToken: string);
64
+ const tmdb = new TMDB(accessToken: string, options?: TMDBOptions);
65
65
  ```
66
66
 
67
67
  - `accessToken`: **required**. Your TMDB API v4 access token.
68
+ - `options.logger`: Enable debug logging for all network requests.
69
+
70
+ Example:
71
+
72
+ ```typescript
73
+ const tmdb = new TMDB("your_access_token", { logger: true });
74
+ ```
75
+
76
+ Custom logger:
77
+
78
+ ```typescript
79
+ const tmdb = new TMDB("your_access_token", {
80
+ logger: (entry) => {
81
+ if (entry.type === "response") {
82
+ console.log("TMDB:", entry.endpoint, entry.status, entry.durationMs);
83
+ }
84
+ },
85
+ });
86
+ ```
68
87
 
69
88
  ---
70
89
 
package/dist/client.d.ts CHANGED
@@ -1,7 +1,11 @@
1
+ import { TMDBLoggerFn } from "./utils/logger";
1
2
  export declare class ApiClient {
2
3
  private accessToken;
3
4
  private baseUrl;
4
- constructor(accessToken: string);
5
+ private logger?;
6
+ constructor(accessToken: string, options?: {
7
+ logger?: boolean | TMDBLoggerFn;
8
+ });
5
9
  request<T>(endpoint: string, params?: Record<string, unknown | undefined>): Promise<T>;
6
10
  /**
7
11
  * Recursively converts null values to undefined in API responses.
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAEA,qBAAa,SAAS;IACrB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,OAAO,CAA0C;gBAE7C,WAAW,EAAE,MAAM;IAIzB,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,CAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAmBhG;;;;OAIG;IACH,OAAO,CAAC,aAAa;YA2BP,WAAW;CAmBzB"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE1D,qBAAa,SAAS;IACrB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,OAAO,CAA0C;IACzD,OAAO,CAAC,MAAM,CAAC,CAAa;gBAEhB,WAAW,EAAE,MAAM,EAAE,OAAO,GAAE;QAAE,MAAM,CAAC,EAAE,OAAO,GAAG,YAAY,CAAA;KAAO;IAK5E,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,CAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAgDhG;;;;OAIG;IACH,OAAO,CAAC,aAAa;YA2BP,WAAW;CA6BzB"}
package/dist/client.js CHANGED
@@ -1,9 +1,12 @@
1
1
  import { TMDBError } from "./errors/tmdb";
2
+ import { TMDBLogger } from "./utils/logger";
2
3
  export class ApiClient {
3
4
  accessToken;
4
5
  baseUrl = "https://api.themoviedb.org/3";
5
- constructor(accessToken) {
6
+ logger;
7
+ constructor(accessToken, options = {}) {
6
8
  this.accessToken = accessToken;
9
+ this.logger = TMDBLogger.from(options.logger);
7
10
  }
8
11
  async request(endpoint, params = {}) {
9
12
  const url = new URL(`${this.baseUrl}${endpoint}`);
@@ -12,14 +15,41 @@ export class ApiClient {
12
15
  continue;
13
16
  url.searchParams.append(key, String(value));
14
17
  }
15
- const res = await fetch(url.toString(), {
16
- headers: {
17
- Authorization: `Bearer ${this.accessToken}`,
18
- "Content-Type": "application/json;charset=utf-8",
19
- },
18
+ const startedAt = Date.now();
19
+ this.logger?.log({
20
+ type: "request",
21
+ method: "GET",
22
+ endpoint,
20
23
  });
24
+ let res;
25
+ try {
26
+ res = await fetch(url.toString(), {
27
+ headers: {
28
+ Authorization: `Bearer ${this.accessToken}`,
29
+ "Content-Type": "application/json;charset=utf-8",
30
+ },
31
+ });
32
+ }
33
+ catch (error) {
34
+ this.logger?.log({
35
+ type: "error",
36
+ method: "GET",
37
+ endpoint,
38
+ errorMessage: error instanceof Error ? error.message : String(error),
39
+ durationMs: Date.now() - startedAt,
40
+ });
41
+ throw error;
42
+ }
21
43
  if (!res.ok)
22
- await this.handleError(res);
44
+ await this.handleError(res, endpoint);
45
+ this.logger?.log({
46
+ type: "response",
47
+ method: "GET",
48
+ endpoint,
49
+ status: res.status,
50
+ statusText: res.statusText,
51
+ durationMs: Date.now() - startedAt,
52
+ });
23
53
  const data = await res.json();
24
54
  return this.sanitizeNulls(data);
25
55
  }
@@ -50,7 +80,7 @@ export class ApiClient {
50
80
  }
51
81
  return sanitized;
52
82
  }
53
- async handleError(res) {
83
+ async handleError(res, endpoint) {
54
84
  let errorMessage = res.statusText;
55
85
  let tmdbStatusCode = -1;
56
86
  try {
@@ -65,6 +95,15 @@ export class ApiClient {
65
95
  console.error(`Unknown error: ${error}`);
66
96
  // If response is not JSON, fallback to HTTP status text
67
97
  }
98
+ this.logger?.log({
99
+ type: "error",
100
+ method: "GET",
101
+ endpoint,
102
+ status: res.status,
103
+ statusText: res.statusText,
104
+ tmdbStatusCode,
105
+ errorMessage,
106
+ });
68
107
  const error = new TMDBError(errorMessage, res.status, tmdbStatusCode);
69
108
  throw error;
70
109
  }
@@ -8,6 +8,7 @@ export declare abstract class TMDBAPIBase {
8
8
  /**
9
9
  * Merges the endpoint's params with TMDB-wide defaults (language, region).
10
10
  * Works only for param types that include optional `language` and `region` fields.
11
+ * Only request-safe defaults are merged — config-only options (logger, images, etc.) are excluded.
11
12
  */
12
13
  protected applyDefaults<T extends object>(params?: T): T | undefined;
13
14
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/endpoints/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,8BAAsB,WAAW;IAChC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC;IAC5B,SAAS,CAAC,cAAc,EAAE,WAAW,CAAC;gBAE1B,MAAM,EAAE,SAAS,EAAE,cAAc,GAAE,WAAgB;IAK/D;;;OAGG;IACH,SAAS,CAAC,aAAa,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS;IAIpE;;;OAGG;IACH,SAAS,CAAC,YAAY,CAAC,CAAC,SAAS;QAAE,QAAQ,CAAC,EAAE,QAAQ,CAAA;KAAE,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS;CAOpF"}
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/endpoints/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,8BAAsB,WAAW;IAChC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC;IAC5B,SAAS,CAAC,cAAc,EAAE,WAAW,CAAC;gBAE1B,MAAM,EAAE,SAAS,EAAE,cAAc,GAAE,WAAgB;IAK/D;;;;OAIG;IACH,SAAS,CAAC,aAAa,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS;IAKpE;;;OAGG;IACH,SAAS,CAAC,YAAY,CAAC,CAAC,SAAS;QAAE,QAAQ,CAAC,EAAE,QAAQ,CAAA;KAAE,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS;CAOpF"}
@@ -8,9 +8,11 @@ export class TMDBAPIBase {
8
8
  /**
9
9
  * Merges the endpoint's params with TMDB-wide defaults (language, region).
10
10
  * Works only for param types that include optional `language` and `region` fields.
11
+ * Only request-safe defaults are merged — config-only options (logger, images, etc.) are excluded.
11
12
  */
12
13
  applyDefaults(params) {
13
- return { ...this.defaultOptions, ...params };
14
+ const { language, region } = this.defaultOptions;
15
+ return { ...(language !== undefined && { language }), ...(region !== undefined && { region }), ...params };
14
16
  }
15
17
  /**
16
18
  * Ensures params contains a language: prefer explicit param, fallback to defaultOptions.language.
@@ -1,12 +1,7 @@
1
- import { ApiClient } from "../client";
2
- import { MediaWatchProviders } from "../types";
3
- import { TMDBOptions } from "../types/config";
4
- import { MovieAlternativeTitles, MovieAppendToResponseNamespace, MovieCredits, MovieDetails, MovieDetailsWithAppends, MovieExternalIDs, MovieImages, MovieKeywords, MovieRecommendations, MovieReleaseDates, MovieReviews, MovieSimilar, MovieTranslations, MovieVideos, MovieChanges } from "../types/movies";
5
- import { MovieAlternativeTitlesParams, MovieChangesParams, MovieCreditsParams, MovieDetailsParams, MovieExternalIDsParams, MovieImagesParams, MovieKeywordsParams, MovieRecommendationsParams, MovieReleaseDatesParams, MovieReviewsParams, MovieSimilarParams, MovieTranslationsParams, MovieVideosParams, MovieWatchProvidersParams } from "../types";
6
- export declare class MoviesAPI {
7
- private client;
8
- private defaultOptions;
9
- constructor(client: ApiClient, options?: TMDBOptions);
1
+ import { MediaWatchProviders, MovieAlternativeTitlesParams, MovieChangesParams, MovieCreditsParams, MovieDetailsParams, MovieExternalIDsParams, MovieImagesParams, MovieKeywordsParams, MovieRecommendationsParams, MovieReleaseDatesParams, MovieReviewsParams, MovieSimilarParams, MovieTranslationsParams, MovieVideosParams, MovieWatchProvidersParams } from "../types";
2
+ import { MovieAlternativeTitles, MovieAppendToResponseNamespace, MovieChanges, MovieCredits, MovieDetails, MovieDetailsWithAppends, MovieExternalIDs, MovieImages, MovieKeywords, MovieRecommendations, MovieReleaseDates, MovieReviews, MovieSimilar, MovieTranslations, MovieVideos } from "../types/movies";
3
+ import { TMDBAPIBase } from "./base";
4
+ export declare class MoviesAPI extends TMDBAPIBase {
10
5
  private moviePath;
11
6
  private movieSubPath;
12
7
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"movies.d.ts","sourceRoot":"","sources":["../../src/endpoints/movies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EACN,sBAAsB,EACtB,8BAA8B,EAC9B,YAAY,EACZ,YAAY,EACZ,uBAAuB,EACvB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,oBAAoB,EACpB,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACN,4BAA4B,EAC5B,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,0BAA0B,EAC1B,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,iBAAiB,EACjB,yBAAyB,EACzB,MAAM,UAAU,CAAC;AAElB,qBAAa,SAAS;IACrB,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,cAAc,CAAc;gBAExB,MAAM,EAAE,SAAS,EAAE,OAAO,GAAE,WAAgB;IAKxD,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,YAAY;IAIpB;;;;;;;;;;OAUG;IACG,OAAO,CAAC,CAAC,SAAS,SAA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G;IACG,eAAe,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAItF"}
@@ -1,11 +1,6 @@
1
1
  import { ENDPOINTS } from "../routes";
2
- export class MoviesAPI {
3
- client;
4
- defaultOptions;
5
- constructor(client, options = {}) {
6
- this.client = client;
7
- this.defaultOptions = options;
8
- }
2
+ import { TMDBAPIBase } from "./base";
3
+ export class MoviesAPI extends TMDBAPIBase {
9
4
  moviePath(movie_id) {
10
5
  return `${ENDPOINTS.MOVIES.DETAILS}/${movie_id}`;
11
6
  }
@@ -1,4 +1,4 @@
1
- import { CollectionResultItem, CompanyResultItem, KeywordResultItem, MovieResultItem, PaginatedResponse, PersonResultItem, SearchCollectionsParams, SearchCompanyParams, SearchKeywordsParams, SearchMoviesParams, SearchPersonParams } from "../types";
1
+ import { CollectionResultItem, CompanyResultItem, KeywordResultItem, MovieResultItem, MultiSearchResultItem, PaginatedResponse, PersonResultItem, SearchCollectionsParams, SearchCompanyParams, SearchKeywordsParams, SearchMoviesParams, SearchMultiParams, SearchPersonParams, SearchTVSeriesParams, TVSeriesResultItem } from "../types";
2
2
  import { TMDBAPIBase } from "./base";
3
3
  export declare class SearchAPI extends TMDBAPIBase {
4
4
  /**
@@ -59,5 +59,31 @@ export declare class SearchAPI extends TMDBAPIBase {
59
59
  * @reference https://developer.themoviedb.org/reference/search-person
60
60
  */
61
61
  person(params: SearchPersonParams): Promise<PaginatedResponse<PersonResultItem>>;
62
+ /**
63
+ * Search TV Series
64
+ * GET - https://api.themoviedb.org/3/search/tv
65
+ *
66
+ * Search for TV shows by their original, translated and also known as names.
67
+ * @param query Search query (required)
68
+ * @param include_adult Include Adult (Defaults to false)
69
+ * @param language Language (Defaults to en-US)
70
+ * @param page Page (Defaults to 1)
71
+ * @param first_air_date_year Filter by first air date year
72
+ * @param year Filter by any air date year (including episodes)
73
+ * @reference https://developer.themoviedb.org/reference/search-tv
74
+ */
75
+ tv_series(params: SearchTVSeriesParams): Promise<PaginatedResponse<TVSeriesResultItem>>;
76
+ /**
77
+ * Search Multi
78
+ * GET - https://api.themoviedb.org/3/search/multi
79
+ *
80
+ * Search for movies, TV shows, and people in a single request.
81
+ * @param query Search query (required)
82
+ * @param include_adult Include Adult (Defaults to false)
83
+ * @param language Language (Defaults to en-US)
84
+ * @param page Page (Defaults to 1)
85
+ * @reference https://developer.themoviedb.org/reference/search-multi
86
+ */
87
+ multi(params: SearchMultiParams): Promise<PaginatedResponse<MultiSearchResultItem>>;
62
88
  }
63
89
  //# sourceMappingURL=search.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/endpoints/search.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAErC,qBAAa,SAAU,SAAQ,WAAW;IACzC;;;;;;;;;;;OAWG;IACG,WAAW,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;IAIpG;;;;;;;;;;;;;OAaG;IACG,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC;IAIrF;;;;;;;;OAQG;IACG,OAAO,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IAIzF;;;;;;;;OAQG;IACG,OAAO,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IAI1F;;;;;;;;OAQG;IACG,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,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qB,CAAC,CAAC;CAGzF"}
@@ -69,4 +69,34 @@ export class SearchAPI extends TMDBAPIBase {
69
69
  async person(params) {
70
70
  return this.client.request(ENDPOINTS.SEARCH.PERSON, this.applyDefaults(params));
71
71
  }
72
+ /**
73
+ * Search TV Series
74
+ * GET - https://api.themoviedb.org/3/search/tv
75
+ *
76
+ * Search for TV shows by their original, translated and also known as names.
77
+ * @param query Search query (required)
78
+ * @param include_adult Include Adult (Defaults to false)
79
+ * @param language Language (Defaults to en-US)
80
+ * @param page Page (Defaults to 1)
81
+ * @param first_air_date_year Filter by first air date year
82
+ * @param year Filter by any air date year (including episodes)
83
+ * @reference https://developer.themoviedb.org/reference/search-tv
84
+ */
85
+ async tv_series(params) {
86
+ return this.client.request(ENDPOINTS.SEARCH.TV, this.applyDefaults(params));
87
+ }
88
+ /**
89
+ * Search Multi
90
+ * GET - https://api.themoviedb.org/3/search/multi
91
+ *
92
+ * Search for movies, TV shows, and people in a single request.
93
+ * @param query Search query (required)
94
+ * @param include_adult Include Adult (Defaults to false)
95
+ * @param language Language (Defaults to en-US)
96
+ * @param page Page (Defaults to 1)
97
+ * @reference https://developer.themoviedb.org/reference/search-multi
98
+ */
99
+ async multi(params) {
100
+ return this.client.request(ENDPOINTS.SEARCH.MULTI, this.applyDefaults(params));
101
+ }
72
102
  }
@@ -0,0 +1,129 @@
1
+ import { Changes, MediaWatchProviders, TVSeasonAggregateCredits, TVSeasonAggregateCreditsParams, TVSeasonAppendToResponseNamespace, TVSeasonBaseParams, TVSeasonChangesParams, TVSeasonCredits, TVSeasonCreditsParams, TVSeasonDetailsParams, TVSeasonDetailsWithAppends, TVSeasonExternalIDs, TVSeasonImages, TVSeasonImagesParams, TVSeasonTranslations, TVSeasonVideos, TVSeasonVideosParams, TVSeasonWatchProvidersParams, TVSeason } from "../types";
2
+ import { TMDBAPIBase } from "./base";
3
+ export declare class TVSeasonsAPI extends TMDBAPIBase {
4
+ private seasonPath;
5
+ private seasonSubPath;
6
+ /**
7
+ * Details
8
+ * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}
9
+ *
10
+ * Query the details of a TV season.
11
+ * @param series_id The ID of the TV series.
12
+ * @param season_number The season number within the TV show.
13
+ * @param append_to_response A comma-separated list of the fields to include in the response.
14
+ * @param language The language to use for the response.
15
+ * @returns A promise that resolves to the TV season details.
16
+ * @reference https://developer.themoviedb.org/reference/tv-season-details
17
+ */
18
+ details<T extends readonly TVSeasonAppendToResponseNamespace[] = []>(params: Omit<TVSeasonDetailsParams, "append_to_response"> & {
19
+ append_to_response?: T;
20
+ }): Promise<T extends [] ? TVSeason : TVSeasonDetailsWithAppends<T>>;
21
+ /**
22
+ * Aggregate Credits
23
+ * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/aggregate_credits
24
+ *
25
+ * Get the aggregate credits for a TV season.
26
+ * This returns the full cast and crew across all episodes of the season.
27
+ * @param series_id The ID of the TV series.
28
+ * @param season_number The season number within the TV show.
29
+ * @param language The language to use for the response.
30
+ * @returns A promise that resolves to the TV season aggregate credits.
31
+ * @reference https://developer.themoviedb.org/reference/tv-season-aggregate-credits
32
+ */
33
+ aggregate_credits(params: TVSeasonAggregateCreditsParams): Promise<TVSeasonAggregateCredits>;
34
+ /**
35
+ * Changes
36
+ * GET - https://api.themoviedb.org/3/tv/season/{season_id}/changes
37
+ *
38
+ * Get the changes for a TV season by season ID. By default only the last 24 hours are returned.
39
+ * You can query up to 14 days in a single query by using the start_date and end_date query parameters.
40
+ * @param season_id The ID of the TV season.
41
+ * @param start_date Filter changes by start date (ISO 8601 format, e.g. "2024-01-01").
42
+ * @param end_date Filter changes by end date (ISO 8601 format, e.g. "2024-01-14").
43
+ * @param page The page of results to return.
44
+ * @returns A promise that resolves to the TV season changes history.
45
+ * @reference https://developer.themoviedb.org/reference/tv-season-changes-by-id
46
+ */
47
+ changes(params: TVSeasonChangesParams): Promise<Changes>;
48
+ /**
49
+ * Credits
50
+ * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/credits
51
+ *
52
+ * Get the credits for a TV season.
53
+ * @param series_id The ID of the TV series.
54
+ * @param season_number The season number within the TV show.
55
+ * @param language The language to use for the response.
56
+ * @returns A promise that resolves to the TV season credits.
57
+ * @reference https://developer.themoviedb.org/reference/tv-season-credits
58
+ */
59
+ credits(params: TVSeasonCreditsParams): Promise<TVSeasonCredits>;
60
+ /**
61
+ * External IDs
62
+ * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/external_ids
63
+ *
64
+ * Get a list of external IDs that have been added to a TV season.
65
+ * @param series_id The ID of the TV series.
66
+ * @param season_number The season number within the TV show.
67
+ * @returns A promise that resolves to the TV season external IDs.
68
+ * @reference https://developer.themoviedb.org/reference/tv-season-external-ids
69
+ */
70
+ external_ids(params: TVSeasonBaseParams): Promise<TVSeasonExternalIDs>;
71
+ /**
72
+ * Images
73
+ * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/images
74
+ *
75
+ * Get the images that belong to a TV season. Returns season posters.
76
+ *
77
+ * NOTE: If you have a language specified, it will act as a filter on the returned items.
78
+ * You can use the include_image_language param to query additional languages.
79
+ *
80
+ * @param series_id The ID of the TV series.
81
+ * @param season_number The season number within the TV show.
82
+ * @param language The language code to filter images by language.
83
+ * @param include_image_language A comma-separated list of language codes to include images for.
84
+ * @returns A promise that resolves to the TV season images.
85
+ * @reference https://developer.themoviedb.org/reference/tv-season-images
86
+ */
87
+ images(params: TVSeasonImagesParams): Promise<TVSeasonImages>;
88
+ /**
89
+ * Translations
90
+ * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/translations
91
+ *
92
+ * Get the translations that have been added to a TV season.
93
+ * Take a read through our language documentation for more information about languages on TMDB.
94
+ * https://developer.themoviedb.org/docs/languages
95
+ * @param series_id The ID of the TV series.
96
+ * @param season_number The season number within the TV show.
97
+ * @returns A promise that resolves to the TV season translations.
98
+ * @reference https://developer.themoviedb.org/reference/tv-season-translations
99
+ */
100
+ translations(params: TVSeasonBaseParams): Promise<TVSeasonTranslations>;
101
+ /**
102
+ * Videos
103
+ * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/videos
104
+ *
105
+ * Get the videos that belong to a TV season.
106
+ * @param series_id The ID of the TV series.
107
+ * @param season_number The season number within the TV show.
108
+ * @param language The language to use for the response.
109
+ * @param include_video_language A comma-separated list of language codes to include videos for.
110
+ * @returns A promise that resolves to the TV season videos.
111
+ * @reference https://developer.themoviedb.org/reference/tv-season-videos
112
+ */
113
+ videos(params: TVSeasonVideosParams): Promise<TVSeasonVideos>;
114
+ /**
115
+ * Watch Providers
116
+ * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/watch/providers
117
+ *
118
+ * Get the watch providers for a specific TV season.
119
+ * Powered by our partnership with JustWatch, you can query which streaming services
120
+ * have the season available.
121
+ * @param series_id The ID of the TV series.
122
+ * @param season_number The season number within the TV show.
123
+ * @param language The language to use for the response.
124
+ * @returns A promise that resolves to the TV season watch providers.
125
+ * @reference https://developer.themoviedb.org/reference/tv-season-watch-providers
126
+ */
127
+ watch_providers(params: TVSeasonWatchProvidersParams): Promise<MediaWatchProviders>;
128
+ }
129
+ //# sourceMappingURL=tv_seasons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tv_seasons.d.ts","sourceRoot":"","sources":["../../src/endpoints/tv_seasons.ts"],"names":[],"mappings":"AACA,OAAO,EACN,OAAO,EACP,mBAAmB,EACnB,wBAAwB,EACxB,8BAA8B,EAC9B,iCAAiC,EACjC,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,mBAAmB,EACnB,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,EACd,oBAAoB,EACpB,4BAA4B,EAC5B,QAAQ,EACR,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAErC,qBAAa,YAAa,SAAQ,WAAW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${ENDPOINTS.TV_SERIES.DETAILS}/${params.series_id}${ENDPOINTS.TV_SEASONS.DETAILS}/${params.season_number}`;
6
+ }
7
+ seasonSubPath(params, route) {
8
+ return `${this.seasonPath(params)}${route}`;
9
+ }
10
+ /**
11
+ * Details
12
+ * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}
13
+ *
14
+ * Query the details of a TV season.
15
+ * @param series_id The ID of the TV series.
16
+ * @param season_number The season number within the TV show.
17
+ * @param append_to_response A comma-separated list of the fields to include in the response.
18
+ * @param language The language to use for the response.
19
+ * @returns A promise that resolves to the TV season details.
20
+ * @reference https://developer.themoviedb.org/reference/tv-season-details
21
+ */
22
+ async details(params) {
23
+ const { language = this.defaultOptions.language, append_to_response, ...rest } = params;
24
+ const endpoint = this.seasonPath(rest);
25
+ return this.client.request(endpoint, { language, append_to_response });
26
+ }
27
+ /**
28
+ * Aggregate Credits
29
+ * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/aggregate_credits
30
+ *
31
+ * Get the aggregate credits for a TV season.
32
+ * This returns the full cast and crew across all episodes of the season.
33
+ * @param series_id The ID of the TV series.
34
+ * @param season_number The season number within the TV show.
35
+ * @param language The language to use for the response.
36
+ * @returns A promise that resolves to the TV season aggregate credits.
37
+ * @reference https://developer.themoviedb.org/reference/tv-season-aggregate-credits
38
+ */
39
+ async aggregate_credits(params) {
40
+ const { language = this.defaultOptions.language, ...rest } = params;
41
+ const endpoint = this.seasonSubPath(rest, ENDPOINTS.TV_SEASONS.AGGREGATE_CREDITS);
42
+ return this.client.request(endpoint, { language });
43
+ }
44
+ /**
45
+ * Changes
46
+ * GET - https://api.themoviedb.org/3/tv/season/{season_id}/changes
47
+ *
48
+ * Get the changes for a TV season by season ID. By default only the last 24 hours are returned.
49
+ * You can query up to 14 days in a single query by using the start_date and end_date query parameters.
50
+ * @param season_id The ID of the TV season.
51
+ * @param start_date Filter changes by start date (ISO 8601 format, e.g. "2024-01-01").
52
+ * @param end_date Filter changes by end date (ISO 8601 format, e.g. "2024-01-14").
53
+ * @param page The page of results to return.
54
+ * @returns A promise that resolves to the TV season changes history.
55
+ * @reference https://developer.themoviedb.org/reference/tv-season-changes-by-id
56
+ */
57
+ async changes(params) {
58
+ const { season_id, ...rest } = params;
59
+ const endpoint = `${ENDPOINTS.TV_SERIES.DETAILS}${ENDPOINTS.TV_SEASONS.DETAILS}/${season_id}${ENDPOINTS.TV_SEASONS.CHANGES}`;
60
+ return this.client.request(endpoint, { ...rest });
61
+ }
62
+ /**
63
+ * Credits
64
+ * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/credits
65
+ *
66
+ * Get the credits for a TV season.
67
+ * @param series_id The ID of the TV series.
68
+ * @param season_number The season number within the TV show.
69
+ * @param language The language to use for the response.
70
+ * @returns A promise that resolves to the TV season credits.
71
+ * @reference https://developer.themoviedb.org/reference/tv-season-credits
72
+ */
73
+ async credits(params) {
74
+ const { language = this.defaultOptions.language, ...rest } = params;
75
+ const endpoint = this.seasonSubPath(rest, ENDPOINTS.TV_SEASONS.CREDITS);
76
+ return this.client.request(endpoint, { language });
77
+ }
78
+ /**
79
+ * External IDs
80
+ * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/external_ids
81
+ *
82
+ * Get a list of external IDs that have been added to a TV season.
83
+ * @param series_id The ID of the TV series.
84
+ * @param season_number The season number within the TV show.
85
+ * @returns A promise that resolves to the TV season external IDs.
86
+ * @reference https://developer.themoviedb.org/reference/tv-season-external-ids
87
+ */
88
+ async external_ids(params) {
89
+ const endpoint = this.seasonSubPath(params, ENDPOINTS.TV_SEASONS.EXTERNAL_IDS);
90
+ return this.client.request(endpoint);
91
+ }
92
+ /**
93
+ * Images
94
+ * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/images
95
+ *
96
+ * Get the images that belong to a TV season. Returns season posters.
97
+ *
98
+ * NOTE: If you have a language specified, it will act as a filter on the returned items.
99
+ * You can use the include_image_language param to query additional languages.
100
+ *
101
+ * @param series_id The ID of the TV series.
102
+ * @param season_number The season number within the TV show.
103
+ * @param language The language code to filter images by language.
104
+ * @param include_image_language A comma-separated list of language codes to include images for.
105
+ * @returns A promise that resolves to the TV season images.
106
+ * @reference https://developer.themoviedb.org/reference/tv-season-images
107
+ */
108
+ async images(params) {
109
+ const { language = this.defaultOptions.language, include_image_language, ...rest } = params;
110
+ const endpoint = this.seasonSubPath(rest, ENDPOINTS.TV_SEASONS.IMAGES);
111
+ return this.client.request(endpoint, { language, include_image_language });
112
+ }
113
+ /**
114
+ * Translations
115
+ * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/translations
116
+ *
117
+ * Get the translations that have been added to a TV season.
118
+ * Take a read through our language documentation for more information about languages on TMDB.
119
+ * https://developer.themoviedb.org/docs/languages
120
+ * @param series_id The ID of the TV series.
121
+ * @param season_number The season number within the TV show.
122
+ * @returns A promise that resolves to the TV season translations.
123
+ * @reference https://developer.themoviedb.org/reference/tv-season-translations
124
+ */
125
+ async translations(params) {
126
+ const endpoint = this.seasonSubPath(params, ENDPOINTS.TV_SEASONS.TRANSLATIONS);
127
+ return this.client.request(endpoint);
128
+ }
129
+ /**
130
+ * Videos
131
+ * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/videos
132
+ *
133
+ * Get the videos that belong to a TV season.
134
+ * @param series_id The ID of the TV series.
135
+ * @param season_number The season number within the TV show.
136
+ * @param language The language to use for the response.
137
+ * @param include_video_language A comma-separated list of language codes to include videos for.
138
+ * @returns A promise that resolves to the TV season videos.
139
+ * @reference https://developer.themoviedb.org/reference/tv-season-videos
140
+ */
141
+ async videos(params) {
142
+ const { language = this.defaultOptions.language, include_video_language, ...rest } = params;
143
+ const endpoint = this.seasonSubPath(rest, ENDPOINTS.TV_SEASONS.VIDEOS);
144
+ return this.client.request(endpoint, { language, include_video_language });
145
+ }
146
+ /**
147
+ * Watch Providers
148
+ * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/watch/providers
149
+ *
150
+ * Get the watch providers for a specific TV season.
151
+ * Powered by our partnership with JustWatch, you can query which streaming services
152
+ * have the season available.
153
+ * @param series_id The ID of the TV series.
154
+ * @param season_number The season number within the TV show.
155
+ * @param language The language to use for the response.
156
+ * @returns A promise that resolves to the TV season watch providers.
157
+ * @reference https://developer.themoviedb.org/reference/tv-season-watch-providers
158
+ */
159
+ async watch_providers(params) {
160
+ const { language = this.defaultOptions.language, ...rest } = params;
161
+ const endpoint = this.seasonSubPath(rest, ENDPOINTS.TV_SEASONS.WATCH_PROVIDERS);
162
+ return this.client.request(endpoint, { language });
163
+ }
164
+ }
@@ -1,11 +1,7 @@
1
- import { ApiClient } from "../client";
2
1
  import { PaginatedResponse, TVSeriesResultItem } from "../types";
3
- import { TMDBOptions } from "../types/config";
4
2
  import { TVSeriesListParams } from "../types/tv-series";
5
- export declare class TVSeriesListsAPI {
6
- private client;
7
- private defaultOptions;
8
- constructor(client: ApiClient, defaultOptions?: TMDBOptions);
3
+ import { TMDBAPIBase } from "./base";
4
+ export declare class TVSeriesListsAPI extends TMDBAPIBase {
9
5
  private withDefaults;
10
6
  /**
11
7
  * Fetch TVSeries List Wrapper
@@ -1 +1 @@
1
- {"version":3,"file":"tv_series_lists.d.ts","sourceRoot":"","sources":["../../src/endpoints/tv_series_lists.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,qBAAa,gBAAgB;IAC5B,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,cAAc,CAAc;gBAExB,MAAM,EAAE,SAAS,EAAE,cAAc,GAAE,WAAgB;IAK/D,OAAO,CAAC,YAAY;IAKpB;;;;;OAKG;IACH,OAAO,CAAC,o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,CAAC,kBAAkB,CAAC,CAAC;CAGhG"}
@@ -1,11 +1,6 @@
1
1
  import { ENDPOINTS } from "../routes";
2
- export class TVSeriesListsAPI {
3
- client;
4
- defaultOptions;
5
- constructor(client, defaultOptions = {}) {
6
- this.client = client;
7
- this.defaultOptions = defaultOptions;
8
- }
2
+ import { TMDBAPIBase } from "./base";
3
+ export class TVSeriesListsAPI extends TMDBAPIBase {
9
4
  withDefaults(params) {
10
5
  const { language = this.defaultOptions.language, timezone = this.defaultOptions.timezone, ...rest } = params;
11
6
  return { language, timezone, ...rest };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { TMDB } from "./tmdb";
2
2
  export { TMDBError } from "./errors/tmdb";
3
3
  export * from "./types";
4
+ export * from "./utils";
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -2,3 +2,4 @@
2
2
  export { TMDB } from "./tmdb";
3
3
  export { TMDBError } from "./errors/tmdb";
4
4
  export * from "./types";
5
+ export * from "./utils";
package/dist/routes.d.ts CHANGED
@@ -104,6 +104,14 @@ export declare const ENDPOINTS: {
104
104
  };
105
105
  TV_SEASONS: {
106
106
  DETAILS: string;
107
+ AGGREGATE_CREDITS: string;
108
+ CHANGES: string;
109
+ CREDITS: string;
110
+ EXTERNAL_IDS: string;
111
+ IMAGES: string;
112
+ TRANSLATIONS: string;
113
+ VIDEOS: string;
114
+ WATCH_PROVIDERS: string;
107
115
  };
108
116
  TV_EPISODES: {
109
117
  DETAILS: string;
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4HrB,CAAC"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoIrB,CAAC"}
package/dist/routes.js CHANGED
@@ -104,6 +104,14 @@ export const ENDPOINTS = {
104
104
  },
105
105
  TV_SEASONS: {
106
106
  DETAILS: "/season",
107
+ AGGREGATE_CREDITS: "/aggregate_credits",
108
+ CHANGES: "/changes",
109
+ CREDITS: "/credits",
110
+ EXTERNAL_IDS: "/external_ids",
111
+ IMAGES: "/images",
112
+ TRANSLATIONS: "/translations",
113
+ VIDEOS: "/videos",
114
+ WATCH_PROVIDERS: "/watch/providers",
107
115
  },
108
116
  TV_EPISODES: {
109
117
  DETAILS: "/episode",
package/dist/tmdb.d.ts CHANGED
@@ -19,6 +19,7 @@ import { TMDBOptions } from "./types/config";
19
19
  import { NetworksAPI } from "./endpoints/networks";
20
20
  import { TVEpisodesAPI } from "./endpoints/tv_episodes";
21
21
  import { TVEpisodeGroupsAPI } from "./endpoints/tv_episode_groups";
22
+ import { TVSeasonsAPI } from "./endpoints/tv_seasons";
22
23
  export declare class TMDB {
23
24
  private client;
24
25
  private options;
@@ -42,6 +43,7 @@ export declare class TMDB {
42
43
  networks: NetworksAPI;
43
44
  tv_episodes: TVEpisodesAPI;
44
45
  tv_episode_groups: TVEpisodeGroupsAPI;
46
+ tv_seasons: TVSeasonsAPI;
45
47
  /**
46
48
  * Creates a new TMDB instance.
47
49
  * @param accessToken The TMDB API access token.
@@ -1 +1 @@
1
- {"version":3,"file":"tmdb.d.ts","sourceRoot":"","sources":["../src/tmdb.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAA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CAAC;IACtB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,SAAS,EAAE,WAAW,CAAC;IACvB,eAAe,EAAE,iBAAiB,CAAC;IACnC,cAAc,EAAE,iBAAiB,CAAC;IAClC,OAAO,EAAE,UAAU,CAAC;IACpB,SAAS,EAAE,YAAY,CAAC;IACxB,OAAO,EAAE,UAAU,CAAC;IACpB,WAAW,EAAE,cAAc,CAAC;IAC5B,QAAQ,EAAE,WAAW,CAAC;IACtB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,WAAW,CAAC;IACtB,WAAW,EAAE,aAAa,CAAC;IAC3B,iBAAiB,EAAE,kBAAkB,CAAC;IACtC,UAAU,EAAE,YAAY,CAAC;IAGhC;;;;OAIG;gBACS,WAAW,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB;CA0B1D"}
package/dist/tmdb.js CHANGED
@@ -21,6 +21,7 @@ import { ImageAPI } from "./images/images";
21
21
  import { NetworksAPI } from "./endpoints/networks";
22
22
  import { TVEpisodesAPI } from "./endpoints/tv_episodes";
23
23
  import { TVEpisodeGroupsAPI } from "./endpoints/tv_episode_groups";
24
+ import { TVSeasonsAPI } from "./endpoints/tv_seasons";
24
25
  export class TMDB {
25
26
  client;
26
27
  options; // ** Default options for all requests
@@ -44,6 +45,7 @@ export class TMDB {
44
45
  networks;
45
46
  tv_episodes;
46
47
  tv_episode_groups;
48
+ tv_seasons;
47
49
  // etc...
48
50
  /**
49
51
  * Creates a new TMDB instance.
@@ -54,7 +56,7 @@ export class TMDB {
54
56
  if (!accessToken)
55
57
  throw new Error(Errors.NO_ACCESS_TOKEN);
56
58
  this.options = options;
57
- this.client = new ApiClient(accessToken);
59
+ this.client = new ApiClient(accessToken, { logger: options.logger });
58
60
  this.movies = new MoviesAPI(this.client, this.options);
59
61
  this.movie_lists = new MovieListsAPI(this.client, this.options);
60
62
  this.search = new SearchAPI(this.client, this.options);
@@ -75,5 +77,6 @@ export class TMDB {
75
77
  this.networks = new NetworksAPI(this.client, this.options);
76
78
  this.tv_episodes = new TVEpisodesAPI(this.client, this.options);
77
79
  this.tv_episode_groups = new TVEpisodeGroupsAPI(this.client, this.options);
80
+ this.tv_seasons = new TVSeasonsAPI(this.client, this.options);
78
81
  }
79
82
  }
@@ -1,3 +1,4 @@
1
+ import type { TMDBLoggerFn } from "../../utils/logger";
1
2
  import { CountryISO3166_1 } from "./countries";
2
3
  import { ImagesConfig } from "./images";
3
4
  import { Language } from "./languages";
@@ -26,5 +27,11 @@ export type TMDBOptions = {
26
27
  * Read more: https://www.themoviedb.org/talk/54c554679251416eae010d6d
27
28
  */
28
29
  timezone?: Timezone;
30
+ /**
31
+ * Enable request logging for debugging.
32
+ * - `true` uses a built-in console logger.
33
+ * - Pass a function to customize logging output.
34
+ */
35
+ logger?: boolean | TMDBLoggerFn;
29
36
  };
30
37
  //# sourceMappingURL=options.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/types/config/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,MAAM,WAAW,GAAG;IACzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACpB,CAAC"}
1
+ {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/types/config/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,MAAM,WAAW,GAAG;IACzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,YAAY,CAAC;CAChC,CAAC"}
@@ -4,6 +4,7 @@ export * from "./discover";
4
4
  export * from "./movies";
5
5
  export * from "./search";
6
6
  export * from "./tv-series";
7
+ export * from "./tv-seasons";
7
8
  export * from "./tv-episodes";
8
9
  export * from "./utility";
9
10
  export * from "./collections";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
@@ -4,6 +4,7 @@ export * from "./discover";
4
4
  export * from "./movies";
5
5
  export * from "./search";
6
6
  export * from "./tv-series";
7
+ export * from "./tv-seasons";
7
8
  export * from "./tv-episodes";
8
9
  export * from "./utility";
9
10
  export * from "./collections";
@@ -129,6 +129,17 @@ export type MovieResultItem = {
129
129
  /** Total number of votes received */
130
130
  vote_count: number;
131
131
  };
132
+ /**
133
+ * A single result item from the multi-search endpoint.
134
+ * Discriminated on `media_type`.
135
+ */
136
+ export type MultiSearchResultItem = (MovieResultItem & {
137
+ media_type: "movie";
138
+ }) | (TVSeriesResultItem & {
139
+ media_type: "tv";
140
+ }) | (PersonResultItem & {
141
+ media_type: "person";
142
+ });
132
143
  /**
133
144
  * Parameters for searching movies
134
145
  */
@@ -164,4 +175,25 @@ export type SearchCompanyParams = Pick<SearchMoviesParams, "query" | "page">;
164
175
  * Parameters for searching people
165
176
  */
166
177
  export type SearchPersonParams = Pick<SearchMoviesParams, "query" | "page" | "include_adult" | "language">;
178
+ /**
179
+ * Parameters for searching TV series
180
+ */
181
+ export type SearchTVSeriesParams = {
182
+ /** Search query text */
183
+ query: string;
184
+ /** Include adult (18+) content in results (default: false) */
185
+ include_adult?: boolean;
186
+ /** ISO 639-1 language code with optional region (e.g., "en-US") */
187
+ language?: Language;
188
+ /** Page number for paginated results (default: 1) */
189
+ page?: number;
190
+ /** Filter by first air date year (1000–9999) */
191
+ first_air_date_year?: number;
192
+ /** Filter by any air date year, including episodes (1000–9999) */
193
+ year?: number;
194
+ };
195
+ /**
196
+ * Parameters for multi-search (movies, TV shows, and people in a single request)
197
+ */
198
+ export type SearchMultiParams = Pick<SearchTVSeriesParams, "query" | "include_adult" | "language" | "page">;
167
199
  //# sourceMappingURL=search.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/types/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAClC,oDAAoD;IACpD,KAAK,EAAE,OAAO,CAAC;IACf,6BAA6B;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,mCAAmC;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,aAAa,EAAE,MAAM,CAAC;IACtB,2DAA2D;IAC3D,iBAAiB,EAAE,MAAM,CAAC;IAC1B,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,2BAA2B;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC/B,gCAAgC;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,cAAc,EAAE,gBAAgB,CAAC;CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAExC;;GAEG;AACH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E,MAAM,CAAC;IAC9B,0DAA0D;IAC1D,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,kBAAkB,EAAE,sBAAsB,GAAG,MAAM,CAAC,CAAC;AAEhG;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,kBAAkB,EAAE,OAAO,GAAG,MAAM,CAAC,CAAC;AAE9E;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,kBAAkB,EAAE,OAAO,GAAG,MAAM,CAAC,CAAC;AAE7E;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,EAAE,OAAO,GAAG,MAAM,GAAG,eAAe,GAAG,UAAU,CAAC,CAAC;AAE3G;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAClC,wBAAwB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,qDAAqD;IACrD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,eAAe,GAAG,UAAU,GAAG,MAAM,CAAC,CAAC"}
@@ -1,4 +1,8 @@
1
- import { TVBaseParam } from "./tv-series";
1
+ import { Cast, Crew, DateRange, ImageItem, ImagesResult, TranslationResults, VideoResults, WithLanguage, WithParams } from "./common";
2
+ import { TVAggregateCredits, TVBaseParam, TVEpisodeItem, TVExternalIDs } from "./tv-series";
3
+ import { MediaWatchProviders } from "./common/media";
4
+ import { NetworkItem } from "./networks";
5
+ import { LiteralUnion, Prettify } from "./utility";
2
6
  /**
3
7
  * Almost every query within the TV Series Seasons domain
4
8
  * will take this required param to identify the
@@ -10,6 +14,119 @@ export type TVSeasonBaseParams = TVBaseParam & {
10
14
  };
11
15
  /** Uniquely identifies a season across different tv shows. */
12
16
  export type TVSeasonId = {
13
- season_id: string;
17
+ season_id: string | number;
14
18
  };
19
+ /**
20
+ * Represents a single episode within a TV season from the TMDB API.
21
+ * Extends {@link TVEpisodeItem} (rather than `TVEpisode`) with crew, guest stars, and episode type.
22
+ *
23
+ * NOTE: `TVEpisode` is intentionally not used here to avoid a circular dependency:
24
+ * `tv-episodes.ts` imports `TVSeasonBaseParams` from this file, so importing
25
+ * `TVEpisode` back would form a cycle. `TVEpisodeItem` carries the same scalar
26
+ * fields (including `show_id`) and produces an identical runtime shape.
27
+ */
28
+ export type TVSeasonEpisode = TVEpisodeItem & {
29
+ /** Array of crew members for this episode */
30
+ crew: Crew[];
31
+ /** Episode type */
32
+ episode_type: LiteralUnion<"standard" | "finale">;
33
+ /** Array of guest stars in this episode */
34
+ guest_stars: Omit<Cast, "cast_id">[];
35
+ };
36
+ /**
37
+ * Detailed information about a TV season returned by the TMDB API.
38
+ */
39
+ export type TVSeason = {
40
+ /** ISO 8601 date when the season first aired */
41
+ air_date?: string | null;
42
+ /** Array of episodes in this season */
43
+ episodes: TVSeasonEpisode[];
44
+ /** Unique TMDB identifier for the season */
45
+ id: number;
46
+ /** Season name */
47
+ name: string;
48
+ /** Networks that broadcast this season */
49
+ networks: NetworkItem[];
50
+ /** Season overview/description */
51
+ overview: string;
52
+ /** Relative path to the season poster */
53
+ poster_path?: string | null;
54
+ /** Season number within the TV show */
55
+ season_number: number;
56
+ /** Average user rating (0–10) */
57
+ vote_average: number;
58
+ };
59
+ /**
60
+ * Available append-to-response options for TV season details.
61
+ * These allow fetching additional related data in a single API request.
62
+ */
63
+ export type TVSeasonAppendToResponseNamespace = "aggregate_credits" | "credits" | "external_ids" | "images" | "translations" | "videos" | "watch_providers";
64
+ /**
65
+ * Maps append-to-response keys to their corresponding response types.
66
+ */
67
+ export type TVSeasonAppendableMap = {
68
+ aggregate_credits: TVSeasonAggregateCredits;
69
+ credits: TVSeasonCredits;
70
+ external_ids: TVSeasonExternalIDs;
71
+ images: TVSeasonImages;
72
+ translations: TVSeasonTranslations;
73
+ videos: TVSeasonVideos;
74
+ watch_providers: MediaWatchProviders;
75
+ };
76
+ /**
77
+ * TV season details with additional appended data based on the requested namespaces.
78
+ * @template T - Array of append-to-response namespace keys to include
79
+ */
80
+ export type TVSeasonDetailsWithAppends<T extends readonly TVSeasonAppendToResponseNamespace[]> = TVSeason & {
81
+ [K in T[number]]: TVSeasonAppendableMap[K];
82
+ };
83
+ /** Aggregate cast and crew credits for a TV season across all its episodes. */
84
+ export type TVSeasonAggregateCredits = TVAggregateCredits;
85
+ /** Season change history, using the same structure as other TMDB change responses. */
86
+ export type TVSeasonChanges = import("./common").Changes;
87
+ /** Credits (cast & crew) for a TV season, mirroring the series-level credits shape. */
88
+ export type TVSeasonCredits = {
89
+ /** TMDB unique identifier */
90
+ id: number;
91
+ /** Cast members */
92
+ cast: Cast[];
93
+ /** Crew members */
94
+ crew: Crew[];
95
+ };
96
+ /** External platform identifiers for a TV season (subset of TV series external IDs). */
97
+ export type TVSeasonExternalIDs = Pick<TVExternalIDs, "id" | "freebase_mid" | "freebase_id" | "tvdb_id" | "tvrage_id" | "wikidata_id">;
98
+ /**
99
+ * Images associated with a TV season.
100
+ * Contains posters only.
101
+ */
102
+ export type TVSeasonImages = ImagesResult<ImageItem, "posters">;
103
+ /** Translation data for a TV season. */
104
+ export type TVSeasonTranslationData = {
105
+ name?: string | null;
106
+ overview?: string | null;
107
+ };
108
+ /** Collection of all available translations for a TV season. */
109
+ export type TVSeasonTranslations = TranslationResults<TVSeasonTranslationData>;
110
+ /** Videos (trailers, teasers, clips) for a TV season. */
111
+ export type TVSeasonVideos = VideoResults;
112
+ /** Parameters for the season details endpoint. */
113
+ export type TVSeasonDetailsParams = Prettify<TVSeasonBaseParams & {
114
+ append_to_response?: TVSeasonAppendToResponseNamespace[];
115
+ } & WithParams<"language">>;
116
+ /** Parameters for the season aggregate credits endpoint. */
117
+ export type TVSeasonAggregateCreditsParams = TVSeasonBaseParams & WithLanguage;
118
+ /** Parameters for the season credits endpoint. */
119
+ export type TVSeasonCreditsParams = TVSeasonBaseParams & WithLanguage;
120
+ /** Parameters for the season images endpoint, with optional language filtering. */
121
+ export type TVSeasonImagesParams = TVSeasonBaseParams & WithLanguage & {
122
+ include_image_language?: string;
123
+ };
124
+ /** Parameters for the season videos endpoint, with optional language filtering. */
125
+ export type TVSeasonVideosParams = TVSeasonBaseParams & WithLanguage & {
126
+ include_video_language?: string;
127
+ };
128
+ /** Parameters for the season watch providers endpoint. */
129
+ export type TVSeasonWatchProvidersParams = TVSeasonBaseParams & WithLanguage;
130
+ /** Parameters for the season changes endpoint. */
131
+ export type TVSeasonChangesParams = TVSeasonId & Prettify<WithParams<"page"> & DateRange>;
15
132
  //# sourceMappingURL=tv-seasons.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tv-seasons.d.ts","sourceRoot":"","sources":["../../src/types/tv-seasons.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG;IAC9C,iBAAiB;IACjB,aAAa,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,8DAA8D;AAC9D,MAAM,MAAM,UAAU,GAAG;IACxB,SAAS,EAAE,MAAM,CAAC;CAClB,CAAC"}
1
+ {"version":3,"file":"tv-seasons.d.ts","sourceRoot":"","sources":["../../src/types/tv-seasons.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,E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GAAG,YAAY,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;AAIhE,wCAAwC;AACxC,MAAM,MAAM,uBAAuB,GAAG;IACrC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,CAAC;AAEF,gEAAgE;AAChE,MAAM,MAAM,oBAAoB,GAAG,kBAAkB,CAAC,uBAAuB,CAAC,CAAC;AAI/E,yDAAyD;AACzD,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC;AAI1C,kDAAkD;AAClD,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAC3C,kBAAkB,GAAG;IAAE,kBAAkB,CAAC,EAAE,iCAAiC,EAAE,CAAA;CAAE,GAAG,UAAU,CAAC,UAAU,CAAC,CAC1G,CAAC;AAEF,4DAA4D;AAC5D,MAAM,MAAM,8BAA8B,GAAG,kBAAkB,GAAG,YAAY,CAAC;AAE/E,kDAAkD;AAClD,MAAM,MAAM,qBAAqB,GAAG,kBAAkB,GAAG,YAAY,CAAC;AAEtE,mFAAmF;AACnF,MAAM,MAAM,oBAAoB,GAAG,kBAAkB,GAAG,YAAY,GAAG;IAAE,sBAAsB,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3G,mFAAmF;AACnF,MAAM,MAAM,oBAAoB,GAAG,kBAAkB,GAAG,YAAY,GAAG;IAAE,sBAAsB,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3G,0DAA0D;AAC1D,MAAM,MAAM,4BAA4B,GAAG,kBAAkB,GAAG,YAAY,CAAC;AAE7E,kDAAkD;AAClD,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC"}
@@ -82,19 +82,19 @@ export type TVEpisodeItem = {
82
82
  /** The total number of votes received for the episode */
83
83
  vote_count: number;
84
84
  /** The date the episode first aired */
85
- air_date: string;
85
+ air_date?: string | null;
86
86
  /** The episode number within its season */
87
87
  episode_number: number;
88
88
  /** The production code used internally during filming */
89
- production_code: string;
89
+ production_code?: string | null;
90
90
  /** The runtime of the episode in minutes */
91
- runtime: number;
91
+ runtime?: number | null;
92
92
  /** The season number this episode belongs to */
93
93
  season_number: number;
94
94
  /** The unique identifier of the TV show this episode belongs to */
95
95
  show_id: number;
96
96
  /** The path to the episode's still image (screenshot) */
97
- still_path: string;
97
+ still_path?: string | null;
98
98
  };
99
99
  export type TVSeasonItem = {
100
100
  /** The date the season first aired, or null if not available */
@@ -1 +1 @@
1
- {"version":3,"file":"tv-series.d.ts","sourceRoot":"","sources":["../../src/types/tv-series.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,gBAAgB,EAChB,IAAI,EACJ,OAAO,EACP,aAAa,EACb,MAAM,EACN,IAAI,EACJ,SAAS,EACT,KAAK,EACL,SAAS,EACT,YAAY,EACZ,OAAO,EACP,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,MAAM,EACN,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAIrC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC7B,+DAA+D;IAC/D,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,kDAAkD;IAClD,UAAU,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,GAAG,WAAW,GAAG,QAAQ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QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC;AAEpF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC,WAAW,GAAG,YAAY,CAAC,CAAC;AAEnE;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,CACpC,WAAW,GAAG;IACb,qFAAqF;IACrF,QAAQ,CAAC,EAAE,QAAQ,GAAG,eAAe,CAAC;IACtC,oFAAoF;IACpF,sBAAsB,CAAC,EAAE,QAAQ,GAAG,eAAe,CAAC;CACpD,CACD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,WAAW,GAAG,gBAAgB,CAAC,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC,WAAW,GAAG,gBAAgB,CAAC,CAAC;AAE/E;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC,WAAW,GAAG,gBAAgB,CAAC,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC,WAAW,GAAG,gBAAgB,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./logger";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "./logger";
@@ -0,0 +1,19 @@
1
+ export type TMDBLoggerEntry = {
2
+ type: "request" | "response" | "error";
3
+ method: "GET";
4
+ endpoint: string;
5
+ status?: number;
6
+ statusText?: string;
7
+ durationMs?: number;
8
+ tmdbStatusCode?: number;
9
+ errorMessage?: string;
10
+ };
11
+ export type TMDBLoggerFn = (entry: TMDBLoggerEntry) => void;
12
+ export declare class TMDBLogger {
13
+ private logger?;
14
+ constructor(logger?: TMDBLoggerFn);
15
+ static from(logger?: boolean | TMDBLoggerFn): TMDBLogger | undefined;
16
+ log(entry: TMDBLoggerEntry): void;
17
+ private static defaultLogger;
18
+ }
19
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;IACvC,MAAM,EAAE,KAAK,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;AAE5D,qBAAa,UAAU;IACtB,OAAO,CAAC,MAAM,CAAC,CAAe;gBAElB,MAAM,CAAC,EAAE,YAAY;IAIjC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,YAAY,GAAG,UAAU,GAAG,SAAS;IAOpE,GAAG,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;IAUjC,OAAO,CAAC,MAAM,CAAC,aAAa;CAoB5B"}
@@ -0,0 +1,41 @@
1
+ export class TMDBLogger {
2
+ logger;
3
+ constructor(logger) {
4
+ this.logger = logger;
5
+ }
6
+ static from(logger) {
7
+ if (!logger)
8
+ return undefined;
9
+ if (logger === true)
10
+ return new TMDBLogger(TMDBLogger.defaultLogger);
11
+ if (typeof logger === "function")
12
+ return new TMDBLogger(logger);
13
+ return undefined;
14
+ }
15
+ log(entry) {
16
+ if (!this.logger)
17
+ return;
18
+ try {
19
+ this.logger(entry);
20
+ }
21
+ catch (error) {
22
+ // Avoid breaking requests if the logger throws.
23
+ console.warn(`TMDB logger error: ${error}`);
24
+ }
25
+ }
26
+ static defaultLogger(entry) {
27
+ const prefix = "🎬 [tmdb]";
28
+ const timestamp = new Date().toISOString();
29
+ if (entry.type === "request") {
30
+ console.log(`${prefix} ${timestamp} 🛰️ REQUEST ${entry.method} ${entry.endpoint}\n`);
31
+ return;
32
+ }
33
+ if (entry.type === "response") {
34
+ console.log(`${prefix} ${timestamp} ✅ RESPONSE ${entry.method} ${entry.status} ${entry.statusText} ${entry.endpoint} (${entry.durationMs}ms)\n`);
35
+ return;
36
+ }
37
+ const statusPart = entry.status != null ? `${entry.status} ${entry.statusText}` : "NETWORK ERROR";
38
+ const tmdbPart = entry.tmdbStatusCode != null ? ` (tmdb: ${entry.tmdbStatusCode})` : "";
39
+ console.log(`${prefix} ${timestamp} ❌ ${entry.method} ${statusPart} ${entry.endpoint} - ${entry.errorMessage}${tmdbPart}\n`);
40
+ }
41
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lorenzopant/tmdb",
3
- "version": "1.13.1",
3
+ "version": "1.14.1",
4
4
  "description": "A completely type-safe The Movie Database (TMDB) API wrapper for typescript applications.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",