@lorenzopant/tmdb 1.0.2 → 1.0.4

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.
@@ -0,0 +1,20 @@
1
+ import { ApiClient } from "../client";
2
+ import { LanguageISO6391, TMDBOptions } from "../types";
3
+ export declare abstract class TMDBAPIBase {
4
+ protected client: ApiClient;
5
+ protected defaultOptions: TMDBOptions;
6
+ constructor(client: ApiClient, defaultOptions?: TMDBOptions);
7
+ /**
8
+ * Merges the endpoint's params with TMDB-wide defaults (language, region).
9
+ * Works only for param types that include optional `language` and `region` fields.
10
+ */
11
+ protected applyDefaults<T extends object>(params?: T): T | undefined;
12
+ /**
13
+ * Ensures params contains a language: prefer explicit param, fallback to defaultOptions.language.
14
+ * If neither is present, returns the original params unmodified.
15
+ */
16
+ protected withLanguage<T extends {
17
+ language?: LanguageISO6391;
18
+ }>(params?: T): T | undefined;
19
+ }
20
+ //# sourceMappingURL=base.d.ts.map
@@ -0,0 +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,eAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAExD,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,eAAe,CAAA;KAAE,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS;CAO3F"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TMDBAPIBase = void 0;
4
+ class TMDBAPIBase {
5
+ client;
6
+ defaultOptions;
7
+ constructor(client, defaultOptions = {}) {
8
+ this.client = client;
9
+ this.defaultOptions = defaultOptions;
10
+ }
11
+ /**
12
+ * Merges the endpoint's params with TMDB-wide defaults (language, region).
13
+ * Works only for param types that include optional `language` and `region` fields.
14
+ */
15
+ applyDefaults(params) {
16
+ return { ...this.defaultOptions, ...params };
17
+ }
18
+ /**
19
+ * Ensures params contains a language: prefer explicit param, fallback to defaultOptions.language.
20
+ * If neither is present, returns the original params unmodified.
21
+ */
22
+ withLanguage(params) {
23
+ if (!params)
24
+ return undefined; // Handle undefined params
25
+ if (params.language !== undefined)
26
+ return params;
27
+ const defaultLang = this.defaultOptions?.language;
28
+ if (defaultLang === undefined)
29
+ return params;
30
+ return { ...params, language: defaultLang };
31
+ }
32
+ }
33
+ exports.TMDBAPIBase = TMDBAPIBase;
@@ -0,0 +1,73 @@
1
+ import { Country } from "../types";
2
+ import { ConfigurationCountriesParams, ConfigurationJob, ConfigurationLanguage, ConfigurationResponse, ConfigurationTimezone } from "../types/configuration";
3
+ import { TMDBAPIBase } from "./base";
4
+ export declare class ConfigurationAPI extends TMDBAPIBase {
5
+ /**
6
+ * Details
7
+ * GET - https://api.themoviedb.org/3/configuration
8
+ *
9
+ * Query the API configuration details.
10
+ * The data returned here in the configuration endpoint is designed to provide some of
11
+ * the required information you'll need as you integrate our API.
12
+ * For example, you can get a list of valid image sizes and the valid image address.
13
+ * @reference https://developer.themoviedb.org/reference/configuration-details
14
+ */
15
+ get(): Promise<ConfigurationResponse>;
16
+ /**
17
+ * Countries
18
+ * GET - https://api.themoviedb.org/3/configuration/countries
19
+ *
20
+ * Get the list of countries (ISO 3166-1 tags) used throughout TMDB.
21
+ * @param language Language (Defaults to en-US)
22
+ * @reference https://developer.themoviedb.org/reference/configuration-countries
23
+ */
24
+ countries(params?: ConfigurationCountriesParams): Promise<Country[]>;
25
+ /**
26
+ * Jobs
27
+ * GET - https://api.themoviedb.org/3/configuration/jobs
28
+ *
29
+ * Get the list of the jobs and departments used throughout TMDB.
30
+ * @reference https://developer.themoviedb.org/reference/configuration-jobs
31
+ */
32
+ jobs(): Promise<ConfigurationJob[]>;
33
+ /**
34
+ * Languages
35
+ * GET - https://api.themoviedb.org/3/configuration/languages
36
+ *
37
+ * Get the list of the languages (ISO 639-1 tags) used throughout TMDB.
38
+ * @reference https://developer.themoviedb.org/reference/configuration-languages
39
+ */
40
+ languages(): Promise<ConfigurationLanguage[]>;
41
+ /**
42
+ * Primary Translations
43
+ * GET - https://api.themoviedb.org/3/configuration/primary_translations
44
+ *
45
+ * Get a list of the officially supported translations on TMDB.
46
+ *
47
+ * While it's technically possible to add a translation in any one of the languages we have added to TMDB
48
+ * (we don't restrict content), the ones listed in this method are the ones
49
+ * we also support for localizing the website with which means they are "primary" translations.
50
+ *
51
+ * These are all specified as IETF tags to identify the languages we use on TMDB. There is one exception which is image languages.
52
+ * They are currently only designated by a ISO-639-1 tag.
53
+ * This is a planned upgrade for the future.
54
+ *
55
+ * We're always open to adding more if you think one should be added.
56
+ * You can ask about getting a new primary translation added by posting on the forums.
57
+ *
58
+ * One more thing to mention, these are the translations that map to our website translation project.
59
+ * You can view and contribute to that project here.
60
+ *
61
+ * @reference https://developer.themoviedb.org/reference/configuration-primary-translations
62
+ */
63
+ primary_translations(): Promise<string[]>;
64
+ /**
65
+ * Timezones
66
+ * GET - https://api.themoviedb.org/3/configuration/timezones
67
+ *
68
+ * Get the list of timezones used throughout TMDB.
69
+ * @reference https://developer.themoviedb.org/reference/configuration-timezones
70
+ */
71
+ timezones(): Promise<ConfigurationTimezone[]>;
72
+ }
73
+ //# sourceMappingURL=configuration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../src/endpoints/configuration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EACN,4BAA4B,EAC5B,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAErC,qBAAa,gBAAiB,SAAQ,WAAW;IAChD;;;;;;;;;OASG;IACG,GAAG,IAAI,OAAO,CAAC,qBAAqB,CAAC;IAI3C;;;;;;;OAOG;IACG,SAAS,CAAC,MAAM,CAAC,EAAE,4BAA4B,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAI1E;;;;;;OAMG;IACG,IAAI,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAIzC;;;;;;OAMG;IACG,SAAS,IAAI,OAAO,CAAC,qBAAqB,EAAE,CAAC;IAInD;;;;;;;;;;;;;;;;;;;;;OAqBG;IACG,oBAAoB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAI/C;;;;;;OAMG;IACG,SAAS,IAAI,OAAO,CAAC,qBAAqB,EAAE,CAAC;CAGnD"}
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConfigurationAPI = void 0;
4
+ const routes_1 = require("../routes");
5
+ const base_1 = require("./base");
6
+ class ConfigurationAPI extends base_1.TMDBAPIBase {
7
+ /**
8
+ * Details
9
+ * GET - https://api.themoviedb.org/3/configuration
10
+ *
11
+ * Query the API configuration details.
12
+ * The data returned here in the configuration endpoint is designed to provide some of
13
+ * the required information you'll need as you integrate our API.
14
+ * For example, you can get a list of valid image sizes and the valid image address.
15
+ * @reference https://developer.themoviedb.org/reference/configuration-details
16
+ */
17
+ async get() {
18
+ return this.client.request(routes_1.ENDPOINTS.CONFIGURATION.DETAILS);
19
+ }
20
+ /**
21
+ * Countries
22
+ * GET - https://api.themoviedb.org/3/configuration/countries
23
+ *
24
+ * Get the list of countries (ISO 3166-1 tags) used throughout TMDB.
25
+ * @param language Language (Defaults to en-US)
26
+ * @reference https://developer.themoviedb.org/reference/configuration-countries
27
+ */
28
+ async countries(params) {
29
+ return this.client.request(routes_1.ENDPOINTS.CONFIGURATION.COUNTRIES, this.withLanguage(params));
30
+ }
31
+ /**
32
+ * Jobs
33
+ * GET - https://api.themoviedb.org/3/configuration/jobs
34
+ *
35
+ * Get the list of the jobs and departments used throughout TMDB.
36
+ * @reference https://developer.themoviedb.org/reference/configuration-jobs
37
+ */
38
+ async jobs() {
39
+ return this.client.request(routes_1.ENDPOINTS.CONFIGURATION.JOBS);
40
+ }
41
+ /**
42
+ * Languages
43
+ * GET - https://api.themoviedb.org/3/configuration/languages
44
+ *
45
+ * Get the list of the languages (ISO 639-1 tags) used throughout TMDB.
46
+ * @reference https://developer.themoviedb.org/reference/configuration-languages
47
+ */
48
+ async languages() {
49
+ return this.client.request(routes_1.ENDPOINTS.CONFIGURATION.LANGUAGES);
50
+ }
51
+ /**
52
+ * Primary Translations
53
+ * GET - https://api.themoviedb.org/3/configuration/primary_translations
54
+ *
55
+ * Get a list of the officially supported translations on TMDB.
56
+ *
57
+ * While it's technically possible to add a translation in any one of the languages we have added to TMDB
58
+ * (we don't restrict content), the ones listed in this method are the ones
59
+ * we also support for localizing the website with which means they are "primary" translations.
60
+ *
61
+ * These are all specified as IETF tags to identify the languages we use on TMDB. There is one exception which is image languages.
62
+ * They are currently only designated by a ISO-639-1 tag.
63
+ * This is a planned upgrade for the future.
64
+ *
65
+ * We're always open to adding more if you think one should be added.
66
+ * You can ask about getting a new primary translation added by posting on the forums.
67
+ *
68
+ * One more thing to mention, these are the translations that map to our website translation project.
69
+ * You can view and contribute to that project here.
70
+ *
71
+ * @reference https://developer.themoviedb.org/reference/configuration-primary-translations
72
+ */
73
+ async primary_translations() {
74
+ return this.client.request(routes_1.ENDPOINTS.CONFIGURATION.PRIMARY_TRANSLATIONS);
75
+ }
76
+ /**
77
+ * Timezones
78
+ * GET - https://api.themoviedb.org/3/configuration/timezones
79
+ *
80
+ * Get the list of timezones used throughout TMDB.
81
+ * @reference https://developer.themoviedb.org/reference/configuration-timezones
82
+ */
83
+ async timezones() {
84
+ return this.client.request(routes_1.ENDPOINTS.CONFIGURATION.TIMEZONES);
85
+ }
86
+ }
87
+ exports.ConfigurationAPI = ConfigurationAPI;
@@ -1,15 +1,10 @@
1
- import { ApiClient } from "../client";
2
- import { TMDBOptions } from "../types";
3
1
  import { MovieResultItem } from "../types/movies";
4
2
  import { PaginatedResponse, SearchMoviesParams } from "../types/params";
3
+ import { TMDBAPIBase } from "./base";
5
4
  export declare const SEARCH_ENDPOINTS: {
6
5
  MOVIE: string;
7
6
  };
8
- export declare class SearchAPI {
9
- private client;
10
- private defaultOptions;
11
- constructor(client: ApiClient, defaultOptions?: TMDBOptions);
12
- withDefaults(params: SearchMoviesParams): SearchMoviesParams;
7
+ export declare class SearchAPI extends TMDBAPIBase {
13
8
  /**
14
9
  * Search
15
10
  * GET - https://api.themoviedb.org/3/search/movie
@@ -1 +1 @@
1
- {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/endpoints/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAExE,eAAO,MAAM,gBAAgB;;CAE5B,CAAC;AAEF,qBAAa,SAAS;IACrB,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,cAAc,CAAc;gBAExB,MAAM,EAAE,SAAS,EAAE,cAAc,GAAE,WAAgB;IAKxD,YAAY,CAAC,MAAM,EAAE,kBAAkB,GAAG,kBAAkB;IAKnE;;;;;;;;;;;;;OAaG;IACG,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC;CAIrF"}
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/endpoints/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAErC,eAAO,MAAM,gBAAgB;;CAE5B,CAAC;AAEF,qBAAa,SAAU,SAAQ,WAAW;IACzC;;;;;;;;;;;;;OAaG;IACG,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC;CAIrF"}
@@ -1,20 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SearchAPI = exports.SEARCH_ENDPOINTS = void 0;
4
+ const base_1 = require("./base");
4
5
  exports.SEARCH_ENDPOINTS = {
5
6
  MOVIE: "/search/movie",
6
7
  };
7
- class SearchAPI {
8
- client;
9
- defaultOptions; // ** Default options for all requests
10
- constructor(client, defaultOptions = {}) {
11
- this.client = client;
12
- this.defaultOptions = defaultOptions;
13
- }
14
- withDefaults(params) {
15
- const { language = this.defaultOptions.language, region = this.defaultOptions.region, ...rest } = params;
16
- return { language, region, ...rest };
17
- }
8
+ class SearchAPI extends base_1.TMDBAPIBase {
18
9
  /**
19
10
  * Search
20
11
  * GET - https://api.themoviedb.org/3/search/movie
@@ -31,7 +22,7 @@ class SearchAPI {
31
22
  */
32
23
  async movies(params) {
33
24
  const endpoint = `${exports.SEARCH_ENDPOINTS.MOVIE}`;
34
- return this.client.request(endpoint, this.withDefaults(params));
25
+ return this.client.request(endpoint, this.applyDefaults(params));
35
26
  }
36
27
  }
37
28
  exports.SearchAPI = SearchAPI;
@@ -1 +1 @@
1
- {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/errors/messages.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,MAAM;;CAElB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAyC5E,CAAC"}
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/errors/messages.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,MAAM;;CAElB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAmC5E,CAAC"}
@@ -34,13 +34,7 @@ exports.TMDB_ERRORS = new Map([
34
34
  [19, { message: "Invalid accept header.", http_status: 406 }],
35
35
  [20, { message: "Invalid date range: Should be a range no longer than 14 days.", http_status: 422 }],
36
36
  [21, { message: "Entry not found: The item you are trying to edit cannot be found.", http_status: 200 }],
37
- [
38
- 22,
39
- {
40
- message: "Invalid page: Pages start at 1 and max at 500. They are expected to be an integer.",
41
- http_status: 400,
42
- },
43
- ],
37
+ [22, { message: "Invalid page: Pages start at 1 and max at 500. They are expected to be an integer.", http_status: 400 }],
44
38
  [23, { message: "Invalid date: Format needs to be YYYY-MM-DD.", http_status: 400 }],
45
39
  [24, { message: "Your request to the backend server timed out. Try again.", http_status: 504 }],
46
40
  [25, { message: "Your request count (#) is over the allowed limit of (40).", http_status: 429 }],
@@ -0,0 +1,11 @@
1
+ export declare const ENDPOINTS: {
2
+ CONFIGURATION: {
3
+ DETAILS: string;
4
+ COUNTRIES: string;
5
+ JOBS: string;
6
+ LANGUAGES: string;
7
+ TIMEZONES: string;
8
+ PRIMARY_TRANSLATIONS: string;
9
+ };
10
+ };
11
+ //# sourceMappingURL=routes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;;;CASrB,CAAC"}
package/dist/routes.js ADDED
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ENDPOINTS = void 0;
4
+ exports.ENDPOINTS = {
5
+ CONFIGURATION: {
6
+ DETAILS: "/configuration",
7
+ COUNTRIES: "/configuration/countries",
8
+ JOBS: "/configuration/jobs",
9
+ LANGUAGES: "/configuration/languages",
10
+ TIMEZONES: "/configuration/timezones",
11
+ PRIMARY_TRANSLATIONS: "/configuration/primary_translations",
12
+ },
13
+ };
package/dist/tmdb.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { ConfigurationAPI } from "./endpoints/configuration";
1
2
  import { MovieListsAPI } from "./endpoints/movie_lists";
2
3
  import { MoviesAPI } from "./endpoints/movies";
3
4
  import { SearchAPI } from "./endpoints/search";
@@ -10,6 +11,7 @@ export declare class TMDB {
10
11
  movie_lists: MovieListsAPI;
11
12
  search: SearchAPI;
12
13
  images: ImageAPI;
14
+ config: ConfigurationAPI;
13
15
  /**
14
16
  * Creates a new TMDB instance.
15
17
  * @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,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,qBAAa,IAAI;IAChB,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,OAAO,CAAc;IACtB,MAAM,EAAE,SAAS,CAAC;IAClB,WAAW,EAAE,aAAa,CAAC;IAC3B,MAAM,EAAE,SAAS,CAAC;IAClB,MAAM,EAAE,QAAQ,CAAC;IAGxB;;;;OAIG;gBACS,WAAW,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB;CAS1D"}
1
+ {"version":3,"file":"tmdb.d.ts","sourceRoot":"","sources":["../src/tmdb.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,qBAAa,IAAI;IAChB,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,OAAO,CAAc;IACtB,MAAM,EAAE,SAAS,CAAC;IAClB,WAAW,EAAE,aAAa,CAAC;IAC3B,MAAM,EAAE,SAAS,CAAC;IAClB,MAAM,EAAE,QAAQ,CAAC;IACjB,MAAM,EAAE,gBAAgB,CAAC;IAGhC;;;;OAIG;gBACS,WAAW,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB;CAU1D"}
package/dist/tmdb.js CHANGED
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.TMDB = void 0;
5
5
  const client_1 = require("./client");
6
+ const configuration_1 = require("./endpoints/configuration");
6
7
  const movie_lists_1 = require("./endpoints/movie_lists");
7
8
  const movies_1 = require("./endpoints/movies");
8
9
  const search_1 = require("./endpoints/search");
@@ -15,6 +16,7 @@ class TMDB {
15
16
  movie_lists;
16
17
  search;
17
18
  images;
19
+ config;
18
20
  // etc...
19
21
  /**
20
22
  * Creates a new TMDB instance.
@@ -30,6 +32,7 @@ class TMDB {
30
32
  this.movie_lists = new movie_lists_1.MovieListsAPI(this.client, this.options);
31
33
  this.search = new search_1.SearchAPI(this.client, this.options);
32
34
  this.images = new images_1.ImageAPI(this.options.images);
35
+ this.config = new configuration_1.ConfigurationAPI(this.client, this.options);
33
36
  }
34
37
  }
35
38
  exports.TMDB = TMDB;
@@ -0,0 +1,31 @@
1
+ import { LanguageISO6391 } from "./lang";
2
+ export type ImageConfiguration = {
3
+ base_url: string;
4
+ secure_base_url: string;
5
+ backdrop_sizes: string[];
6
+ logo_sizes: string[];
7
+ poster_sizes: string[];
8
+ profile_sizes: string[];
9
+ still_sizes: string[];
10
+ };
11
+ export type ConfigurationResponse = {
12
+ images: ImageConfiguration;
13
+ change_keys: string[];
14
+ };
15
+ export type ConfigurationCountriesParams = {
16
+ language?: LanguageISO6391;
17
+ };
18
+ export type ConfigurationJob = {
19
+ department: string;
20
+ jobs: string[];
21
+ };
22
+ export type ConfigurationLanguage = {
23
+ iso_639_1: string;
24
+ english_name: string;
25
+ name: string;
26
+ };
27
+ export type ConfigurationTimezone = {
28
+ iso_3166_1: string;
29
+ zones: string[];
30
+ };
31
+ //# sourceMappingURL=configuration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../src/types/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC,MAAM,MAAM,kBAAkB,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,WAAW,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IACnC,MAAM,EAAE,kBAAkB,CAAC;IAC3B,WAAW,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IAC1C,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,EAAE,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +1,8 @@
1
- export declare const TMDBCountries: {
1
+ export type Country = {
2
2
  iso_3166_1: CountryISO3166_1;
3
3
  english_name: string;
4
4
  native_name: string;
5
- }[];
5
+ };
6
+ export declare const TMDBCountries: Country[];
6
7
  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";
7
8
  //# sourceMappingURL=countries.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"countries.d.ts","sourceRoot":"","sources":["../../src/types/countries.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,EAAE;IAAE,UAAU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GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,CAAC"}
@@ -4,4 +4,9 @@ export declare const Languages: {
4
4
  name: string;
5
5
  }[];
6
6
  export type LanguageISO6391 = "ay" | "ch" | "fj" | "it" | "nv" | "qu" | "ru" | "sc" | "sw" | "tn" | "ur" | "ho" | "km" | "kj" | "tt" | "ps" | "cn" | "mk" | "yo" | "fo" | "ff" | "ig" | "io" | "id" | "ko" | "mo" | "nr" | "pi" | "so" | "sq" | "ta" | "tl" | "th" | "ve" | "vo" | "cu" | "kw" | "fr" | "fy" | "ht" | "ie" | "ia" | "mh" | "rn" | "se" | "gd" | "ii" | "lo" | "la" | "ny" | "oj" | "ab" | "ar" | "ee" | "hi" | "an" | "ba" | "bn" | "bi" | "et" | "eu" | "gl" | "ha" | "hz" | "iu" | "jv" | "kr" | "mn" | "my" | "na" | "pt" | "sd" | "zu" | "ak" | "hu" | "ik" | "ks" | "ka" | "lg" | "oc" | "uz" | "xh" | "za" | "zh" | "el" | "ga" | "gn" | "gu" | "kl" | "kn" | "ky" | "nl" | "sl" | "sr" | "ss" | "ug" | "bg" | "co" | "cy" | "dv" | "ki" | "mt" | "ne" | "si" | "sn" | "su" | "to" | "wa" | "cr" | "fi" | "hr" | "mg" | "nb" | "ts" | "vi" | "hy" | "av" | "az" | "gv" | "sh" | "lv" | "mr" | "pl" | "rm" | "tr" | "xx" | "ca" | "de" | "rw" | "ln" | "ro" | "ty" | "ti" | "he" | "as" | "bo" | "dz" | "eo" | "ja" | "ng" | "no" | "pa" | "sa" | "am" | "fa" | "aa" | "ae" | "br" | "is" | "kk" | "lt" | "mi" | "ms" | "or" | "st" | "tk" | "af" | "bm" | "bs" | "cs" | "ce" | "kv" | "lb" | "nd" | "sk" | "sm" | "tg" | "wo" | "yi" | "be" | "cv" | "da" | "en" | "kg" | "ku" | "li" | "lu" | "ml" | "nn" | "om" | "os" | "sg" | "es" | "sv" | "te" | "tw" | "uk";
7
+ /**
8
+ * Defined as const for utility purposes.
9
+ * Last update: 20 Nov 2025
10
+ */
11
+ export type PrimaryTranslations = "af-ZA" | "ar-AE" | "ar-SA" | "be-BY" | "bg-BG" | "bn-BD" | "ca-ES" | "ch-GU" | "cn-CN" | "cs-CZ" | "cy-GB" | "da-DK" | "de-AT" | "de-CH" | "de-DE" | "el-GR" | "en-AU" | "en-CA" | "en-GB" | "en-IE" | "en-NZ" | "en-US" | "eo-EO" | "es-ES" | "es-MX" | "et-EE" | "eu-ES" | "fa-IR" | "fi-FI" | "fr-CA" | "fr-FR" | "ga-IE" | "gd-GB" | "gl-ES" | "he-IL" | "hi-IN" | "hr-HR" | "hu-HU" | "id-ID" | "it-IT" | "ja-JP" | "ka-GE" | "kk-KZ" | "kn-IN" | "ko-KR" | "ky-KG" | "lt-LT" | "lv-LV" | "ml-IN" | "mr-IN" | "ms-MY" | "ms-SG" | "nb-NO" | "nl-BE" | "nl-NL" | "no-NO" | "pa-IN" | "pl-PL" | "pt-BR" | "pt-PT" | "ro-RO" | "ru-RU" | "si-LK" | "sk-SK" | "sl-SI" | "sq-AL" | "sr-RS" | "sv-SE" | "ta-IN" | "te-IN" | "th-TH" | "tl-PH" | "tr-TR" | "uk-UA" | "vi-VN" | "zh-CN" | "zh-HK" | "zh-SG" | "zh-TW" | "zu-ZA";
7
12
  //# sourceMappingURL=lang.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lang.d.ts","sourceRoot":"","sources":["../../src/types/lang.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,EAAE;IAAE,SAAS,EAAE,eAAe,CAAC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AO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,CAAC"}
@@ -7,6 +7,10 @@ export type PaginatedResponse<T> = {
7
7
  total_results: number;
8
8
  results: T[];
9
9
  };
10
+ export type TMDBCommonParams = {
11
+ language?: LanguageISO6391;
12
+ region?: CountryISO3166_1;
13
+ };
10
14
  export type SearchMoviesParams = {
11
15
  query: string;
12
16
  include_adult?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"params.d.ts","sourceRoot":"","sources":["../../src/types/params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AACz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AE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,sBAAsB,CAAC,EAAE,eAAe,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,0BAA0B,CAAC;AAC5D,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,CAAC;AACnD,MAAM,MAAM,kBAAkB,GAAG,0BAA0B,CAAC"}
package/package.json CHANGED
@@ -1,60 +1,64 @@
1
1
  {
2
- "name": "@lorenzopant/tmdb",
3
- "version": "1.0.2",
4
- "description": "A completely type-safe The Movie Database (TMDB) API wrapper for typescript applications.",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "repository": {
8
- "type": "git",
9
- "url": "git+https://github.com/lorenzopant/tmdb"
10
- },
11
- "scripts": {
12
- "build": "tsc",
13
- "build:watch": "tsc --watch",
14
- "test": "vitest",
15
- "test:ui": "vitest --ui",
16
- "test:coverage": "vitest --coverage",
17
- "prepare": "husky",
18
- "lint": "eslint .",
19
- "patch": "npm version patch && npm publish"
20
- },
21
- "author": "Lorenzo Pantano",
22
- "license": "MIT",
23
- "keywords": [
24
- "tmdb",
25
- "typescript",
26
- "api",
27
- "movies"
28
- ],
29
- "devDependencies": {
30
- "@eslint/compat": "^1.3.1",
31
- "@eslint/eslintrc": "^3.3.1",
32
- "@eslint/js": "^9.30.0",
33
- "@types/node": "^22.15.2",
34
- "@typescript-eslint/eslint-plugin": "^8.35.0",
35
- "@typescript-eslint/parser": "^8.35.0",
36
- "@vitest/coverage-v8": "^3.1.2",
37
- "@vitest/ui": "^3.1.2",
38
- "dotenv": "^16.5.0",
39
- "eslint": "^9.30.0",
40
- "eslint-config-prettier": "^10.1.5",
41
- "eslint-plugin-import": "^2.32.0",
42
- "husky": "^9.1.7",
43
- "release-it": "^19.0.3",
44
- "release-it-pnpm": "^4.6.6",
45
- "typescript": "^5.8.3",
46
- "typescript-eslint": "^8.35.0",
47
- "vite": "^7.0.0",
48
- "vitest": "^3.2.4"
49
- },
50
- "exports": {
51
- ".": {
52
- "import": "./dist/index.js",
53
- "types": "./dist/index.d.ts"
54
- },
55
- "./types": {
56
- "types": "./dist/types/index.d.ts",
57
- "default": "./dist/types/index.js"
58
- }
59
- }
2
+ "name": "@lorenzopant/tmdb",
3
+ "version": "1.0.4",
4
+ "description": "A completely type-safe The Movie Database (TMDB) API wrapper for typescript applications.",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/lorenzopant/tmdb"
10
+ },
11
+ "homepage": "https://lorenzopant-docs.vercel.app/",
12
+ "bugs": {
13
+ "url": "https://github.com/lorenzopant/tmdb/issues"
14
+ },
15
+ "scripts": {
16
+ "build": "tsc",
17
+ "build:watch": "tsc --watch",
18
+ "test": "vitest",
19
+ "test:ui": "vitest --ui",
20
+ "test:coverage": "vitest --coverage",
21
+ "prepare": "husky",
22
+ "lint": "eslint .",
23
+ "patch": "npm version patch && npm publish"
24
+ },
25
+ "author": "Lorenzo Pantano",
26
+ "license": "MIT",
27
+ "keywords": [
28
+ "tmdb",
29
+ "typescript",
30
+ "api",
31
+ "movies"
32
+ ],
33
+ "devDependencies": {
34
+ "@eslint/compat": "^2.0.0",
35
+ "@eslint/eslintrc": "^3.3.1",
36
+ "@eslint/js": "^9.30.0",
37
+ "@types/node": "^22.15.2",
38
+ "@typescript-eslint/eslint-plugin": "^8.35.0",
39
+ "@typescript-eslint/parser": "^8.35.0",
40
+ "@vitest/coverage-v8": "^4.0.9",
41
+ "@vitest/ui": "^4.0.10",
42
+ "dotenv": "^16.5.0",
43
+ "eslint": "^9.30.0",
44
+ "eslint-config-prettier": "^10.1.5",
45
+ "eslint-plugin-import": "^2.32.0",
46
+ "husky": "^9.1.7",
47
+ "release-it": "^19.0.3",
48
+ "release-it-pnpm": "^4.6.6",
49
+ "typescript": "^5.8.3",
50
+ "typescript-eslint": "^8.35.0",
51
+ "vite": "^7.0.0",
52
+ "vitest": "^4.0.9"
53
+ },
54
+ "exports": {
55
+ ".": {
56
+ "import": "./dist/index.js",
57
+ "types": "./dist/index.d.ts"
58
+ },
59
+ "./types": {
60
+ "types": "./dist/types/index.d.ts",
61
+ "default": "./dist/types/index.js"
62
+ }
63
+ }
60
64
  }
package/tsconfig.json CHANGED
@@ -1,114 +1,115 @@
1
1
  {
2
- "compilerOptions": {
3
- /* Visit https://aka.ms/tsconfig to read more about this file */
2
+ "compilerOptions": {
3
+ /* Visit https://aka.ms/tsconfig to read more about this file */
4
4
 
5
- /* Projects */
6
- // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
7
- // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8
- // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
9
- // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
10
- // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
11
- // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
5
+ /* Projects */
6
+ // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
7
+ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8
+ // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
9
+ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
10
+ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
11
+ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12
12
 
13
- /* Language and Environment */
14
- "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
15
- // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
16
- "jsx": "react-jsx", /* Specify what JSX code is generated. */
17
- // "libReplacement": true, /* Enable lib replacement. */
18
- // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
19
- // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
20
- // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
21
- // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
22
- // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
23
- // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
24
- // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
25
- // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
26
- // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
13
+ /* Language and Environment */
14
+ "target": "ESNext" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
15
+ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
16
+ "jsx": "react-jsx" /* Specify what JSX code is generated. */,
17
+ // "libReplacement": true, /* Enable lib replacement. */
18
+ // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
19
+ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
20
+ // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
21
+ // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
22
+ // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
23
+ // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
24
+ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
25
+ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
26
+ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
27
27
 
28
- /* Modules */
29
- "module": "nodenext", /* Specify what module code is generated. */
30
- "rootDir": "src", /* Specify the root folder within your source files. */
31
- "moduleResolution": "nodenext", /* Specify how TypeScript looks up a file from a given module specifier. */
32
- // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
33
- // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
34
- // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
35
- // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
36
- // "types": [], /* Specify type package names to be included without being referenced in a source file. */
37
- // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
38
- // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
39
- // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
40
- // "rewriteRelativeImportExtensions": true, /* Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files. */
41
- // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
42
- // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
43
- // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
44
- // "noUncheckedSideEffectImports": true, /* Check side effect imports. */
45
- // "resolveJsonModule": true, /* Enable importing .json files. */
46
- // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
47
- // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
28
+ /* Modules */
29
+ "module": "nodenext" /* Specify what module code is generated. */,
30
+ "rootDir": "src" /* Specify the root folder within your source files. */,
31
+ "moduleResolution": "nodenext" /* Specify how TypeScript looks up a file from a given module specifier. */,
32
+ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
33
+ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
34
+ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
35
+ // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
36
+ // "types": [], /* Specify type package names to be included without being referenced in a source file. */
37
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
38
+ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
39
+ // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
40
+ // "rewriteRelativeImportExtensions": true, /* Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files. */
41
+ // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
42
+ // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
43
+ // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
44
+ // "noUncheckedSideEffectImports": true, /* Check side effect imports. */
45
+ // "resolveJsonModule": true, /* Enable importing .json files. */
46
+ // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
47
+ // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
48
48
 
49
- /* JavaScript Support */
50
- // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
51
- // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
52
- // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
49
+ /* JavaScript Support */
50
+ // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
51
+ // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
52
+ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
53
53
 
54
- /* Emit */
55
- "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
56
- "declarationMap": true, /* Create sourcemaps for d.ts files. */
57
- // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
58
- // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
59
- // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
60
- // "noEmit": true, /* Disable emitting files from a compilation. */
61
- // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
62
- "outDir": "dist", /* Specify an output folder for all emitted files. */
63
- "removeComments": false, /* Disable emitting comments. */
64
- // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
65
- // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
66
- // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
67
- // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
68
- // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
69
- // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
70
- // "newLine": "crlf", /* Set the newline character for emitting files. */
71
- // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
72
- // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
73
- // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
74
- // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
75
- // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
54
+ /* Emit */
55
+ "declaration": true /* Generate .d.ts files from TypeScript and JavaScript files in your project. */,
56
+ "declarationMap": true /* Create sourcemaps for d.ts files. */,
57
+ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
58
+ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
59
+ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
60
+ // "noEmit": true, /* Disable emitting files from a compilation. */
61
+ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
62
+ "outDir": "dist" /* Specify an output folder for all emitted files. */,
63
+ "removeComments": false /* Disable emitting comments. */,
64
+ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
65
+ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
66
+ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
67
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
68
+ // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
69
+ // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
70
+ // "newLine": "crlf", /* Set the newline character for emitting files. */
71
+ // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
72
+ // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
73
+ // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
74
+ // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
75
+ // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
76
76
 
77
- /* Interop Constraints */
78
- // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
79
- // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
80
- // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */
81
- // "erasableSyntaxOnly": true, /* Do not allow runtime constructs that are not part of ECMAScript. */
82
- "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
83
- "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
84
- // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
85
- "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
77
+ /* Interop Constraints */
78
+ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
79
+ // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
80
+ // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */
81
+ // "erasableSyntaxOnly": true, /* Do not allow runtime constructs that are not part of ECMAScript. */
82
+ "allowSyntheticDefaultImports": true /* Allow 'import x from y' when a module doesn't have a default export. */,
83
+ "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
84
+ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
85
+ "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
86
86
 
87
- /* Type Checking */
88
- "strict": true, /* Enable all strict type-checking options. */
89
- // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
90
- // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
91
- // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
92
- // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
93
- // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
94
- // "strictBuiltinIteratorReturn": true, /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */
95
- // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
96
- // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
97
- // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
98
- // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
99
- // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
100
- // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
101
- // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
102
- // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
103
- // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
104
- // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
105
- // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
106
- // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
107
- // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
87
+ /* Type Checking */
88
+ "strict": true /* Enable all strict type-checking options. */,
89
+ // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
90
+ // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
91
+ // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
92
+ // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
93
+ // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
94
+ // "strictBuiltinIteratorReturn": true, /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */
95
+ // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
96
+ // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
97
+ // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
98
+ // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
99
+ // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
100
+ // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
101
+ // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
102
+ // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
103
+ // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
104
+ // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
105
+ // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
106
+ // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
107
+ // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
108
108
 
109
- /* Completeness */
110
- // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
111
- "skipLibCheck": true /* Skip type checking all .d.ts files. */
112
- },
113
- "include": ["src"]
109
+ /* Completeness */
110
+ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
111
+ "skipLibCheck": true /* Skip type checking all .d.ts files. */
112
+ },
113
+ "include": ["src"],
114
+ "exclude": ["**/*.test.ts", "**/*.spec.ts", "src/tests", "dist"]
114
115
  }
package/dist/logger.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export declare const logger: import("pino").Logger<never, boolean>;
2
- //# sourceMappingURL=logger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,uCAUjB,CAAC"}
package/dist/logger.js DELETED
@@ -1,12 +0,0 @@
1
- import pino from "pino";
2
- // Create a singleton logger instance for the project
3
- export const logger = pino({
4
- name: "tmdb-api-ts",
5
- level: process.env.LOG_LEVEL || "info",
6
- transport: process.env.NODE_ENV === "development"
7
- ? {
8
- target: "pino-pretty",
9
- options: { colorize: true },
10
- }
11
- : undefined,
12
- });
@@ -1,6 +0,0 @@
1
- import { TMDBOptions } from "../tmdb";
2
- /**
3
- * Merges default options with required parameters, returning only the keys present in both types.
4
- * Method params take precedence over defaults.
5
- */
6
- export declare function mergeParams<TParams extends object>(defaults: TMDBOptions, params: TParams): TParams;
@@ -1,13 +0,0 @@
1
- /**
2
- * Merges default options with required parameters, returning only the keys present in both types.
3
- * Method params take precedence over defaults.
4
- */
5
- export function mergeParams(defaults, params) {
6
- const filteredDefaults = Object.keys(defaults)
7
- .filter((key) => Object.keys(params).includes(key))
8
- .reduce((obj, key) => {
9
- obj[key] = defaults[key];
10
- return obj;
11
- }, {});
12
- return { ...filteredDefaults, ...params };
13
- }