@lorenzopant/tmdb 1.9.0 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,30 @@
1
+ import { Keyword, KeywordDetailsParams, KeywordMoviesParams, MovieResultItem, PaginatedResponse } from "../types";
2
+ import { TMDBAPIBase } from "./base";
3
+ export declare class KeywordsAPI extends TMDBAPIBase {
4
+ private keywordPath;
5
+ /**
6
+ * Details
7
+ * GET - https://api.themoviedb.org/3/keyword/{keyword_id}
8
+ *
9
+ * Get the details of a keyword by ID.
10
+ *
11
+ * @param keyword_id Unique identifier for the keyword
12
+ * @reference https://developer.themoviedb.org/reference/keyword-details
13
+ */
14
+ details(params: KeywordDetailsParams): Promise<Keyword>;
15
+ /**
16
+ * Movies
17
+ * GET - https://api.themoviedb.org/3/keyword/{keyword_id}/movies
18
+ *
19
+ * Get the movies associated with a keyword.
20
+ *
21
+ * @deprecated TMDB marks this endpoint as deprecated. Use discover/movie with_keywords instead.
22
+ * @param keyword_id Unique identifier for the keyword
23
+ * @param language Language for localized results
24
+ * @param page Page number for paginated results
25
+ * @param include_adult Include adult titles in results
26
+ * @reference https://developer.themoviedb.org/reference/keyword-movies
27
+ */
28
+ movies(params: KeywordMoviesParams): Promise<PaginatedResponse<MovieResultItem>>;
29
+ }
30
+ //# sourceMappingURL=keywords.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keywords.d.ts","sourceRoot":"","sources":["../../src/endpoints/keywords.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClH,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAErC,qBAAa,WAAY,SAAQ,WAAW;IAC3C,OAAO,CAAC,WAAW;IAInB;;;;;;;;OAQG;IACG,OAAO,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC;IAK7D;;;;;;;;;;;;OAYG;IACG,MAAM,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC;CAKtF"}
@@ -0,0 +1,38 @@
1
+ import { ENDPOINTS } from "../routes";
2
+ import { TMDBAPIBase } from "./base";
3
+ export class KeywordsAPI extends TMDBAPIBase {
4
+ keywordPath(keyword_id) {
5
+ return `${ENDPOINTS.KEYWORDS.DETAILS}/${keyword_id}`;
6
+ }
7
+ /**
8
+ * Details
9
+ * GET - https://api.themoviedb.org/3/keyword/{keyword_id}
10
+ *
11
+ * Get the details of a keyword by ID.
12
+ *
13
+ * @param keyword_id Unique identifier for the keyword
14
+ * @reference https://developer.themoviedb.org/reference/keyword-details
15
+ */
16
+ async details(params) {
17
+ const endpoint = this.keywordPath(params.keyword_id);
18
+ return this.client.request(endpoint, params);
19
+ }
20
+ /**
21
+ * Movies
22
+ * GET - https://api.themoviedb.org/3/keyword/{keyword_id}/movies
23
+ *
24
+ * Get the movies associated with a keyword.
25
+ *
26
+ * @deprecated TMDB marks this endpoint as deprecated. Use discover/movie with_keywords instead.
27
+ * @param keyword_id Unique identifier for the keyword
28
+ * @param language Language for localized results
29
+ * @param page Page number for paginated results
30
+ * @param include_adult Include adult titles in results
31
+ * @reference https://developer.themoviedb.org/reference/keyword-movies
32
+ */
33
+ async movies(params) {
34
+ const endpoint = `${this.keywordPath(params.keyword_id)}${ENDPOINTS.KEYWORDS.MOVIES}`;
35
+ const requestParams = this.withLanguage(params);
36
+ return this.client.request(endpoint, requestParams);
37
+ }
38
+ }
@@ -0,0 +1,35 @@
1
+ import { WatchProviderListParams, WatchProviderListResponse, WatchProviderRegionsParams, WatchProviderRegionsResponse } from "../types";
2
+ import { TMDBAPIBase } from "./base";
3
+ export declare class WatchProvidersAPI extends TMDBAPIBase {
4
+ /**
5
+ * Movie Providers
6
+ * GET - https://api.themoviedb.org/3/watch/providers/movie
7
+ *
8
+ * Get the list of movie watch providers supported by TMDB.
9
+ *
10
+ * @param language Language used for localized provider names
11
+ * @reference https://developer.themoviedb.org/reference/watch-provider-movie-list
12
+ */
13
+ movie_providers(params?: WatchProviderListParams): Promise<WatchProviderListResponse>;
14
+ /**
15
+ * TV Providers
16
+ * GET - https://api.themoviedb.org/3/watch/providers/tv
17
+ *
18
+ * Get the list of TV watch providers supported by TMDB.
19
+ *
20
+ * @param language Language used for localized provider names
21
+ * @reference https://developer.themoviedb.org/reference/watch-provider-tv-list
22
+ */
23
+ tv_providers(params?: WatchProviderListParams): Promise<WatchProviderListResponse>;
24
+ /**
25
+ * Available Regions
26
+ * GET - https://api.themoviedb.org/3/watch/providers/regions
27
+ *
28
+ * Get the list of regions with watch provider support.
29
+ *
30
+ * @param language Language used for localized region names
31
+ * @reference https://developer.themoviedb.org/reference/watch-providers-available-regions
32
+ */
33
+ available_regions(params?: WatchProviderRegionsParams): Promise<WatchProviderRegionsResponse>;
34
+ }
35
+ //# sourceMappingURL=watch_providers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watch_providers.d.ts","sourceRoot":"","sources":["../../src/endpoints/watch_providers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AACxI,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAErC,qBAAa,iBAAkB,SAAQ,WAAW;IACjD;;;;;;;;OAQG;IACG,eAAe,CAAC,MAAM,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAM3F;;;;;;;;OAQG;IACG,YAAY,CAAC,MAAM,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAMxF;;;;;;;;OAQG;IACG,iBAAiB,CAAC,MAAM,CAAC,EAAE,0BAA0B,GAAG,OAAO,CAAC,4BAA4B,CAAC;CAKnG"}
@@ -0,0 +1,46 @@
1
+ import { ENDPOINTS } from "../routes";
2
+ import { TMDBAPIBase } from "./base";
3
+ export class WatchProvidersAPI extends TMDBAPIBase {
4
+ /**
5
+ * Movie Providers
6
+ * GET - https://api.themoviedb.org/3/watch/providers/movie
7
+ *
8
+ * Get the list of movie watch providers supported by TMDB.
9
+ *
10
+ * @param language Language used for localized provider names
11
+ * @reference https://developer.themoviedb.org/reference/watch-provider-movie-list
12
+ */
13
+ async movie_providers(params) {
14
+ const language = params?.language ?? this.defaultOptions.language;
15
+ const requestParams = language === undefined ? params : { ...params, language };
16
+ return this.client.request(ENDPOINTS.WATCH_PROVIDERS.MOVIE, requestParams);
17
+ }
18
+ /**
19
+ * TV Providers
20
+ * GET - https://api.themoviedb.org/3/watch/providers/tv
21
+ *
22
+ * Get the list of TV watch providers supported by TMDB.
23
+ *
24
+ * @param language Language used for localized provider names
25
+ * @reference https://developer.themoviedb.org/reference/watch-provider-tv-list
26
+ */
27
+ async tv_providers(params) {
28
+ const language = params?.language ?? this.defaultOptions.language;
29
+ const requestParams = language === undefined ? params : { ...params, language };
30
+ return this.client.request(ENDPOINTS.WATCH_PROVIDERS.TV, requestParams);
31
+ }
32
+ /**
33
+ * Available Regions
34
+ * GET - https://api.themoviedb.org/3/watch/providers/regions
35
+ *
36
+ * Get the list of regions with watch provider support.
37
+ *
38
+ * @param language Language used for localized region names
39
+ * @reference https://developer.themoviedb.org/reference/watch-providers-available-regions
40
+ */
41
+ async available_regions(params) {
42
+ const language = params?.language ?? this.defaultOptions.language;
43
+ const requestParams = language === undefined ? params : { ...params, language };
44
+ return this.client.request(ENDPOINTS.WATCH_PROVIDERS.REGIONS, requestParams);
45
+ }
46
+ }
package/dist/routes.d.ts CHANGED
@@ -38,6 +38,10 @@ export declare const ENDPOINTS: {
38
38
  MOVIE_LIST: string;
39
39
  TV_LIST: string;
40
40
  };
41
+ KEYWORDS: {
42
+ DETAILS: string;
43
+ MOVIES: string;
44
+ };
41
45
  MOVIES: {
42
46
  DETAILS: string;
43
47
  ALTERNATIVE_TITLES: string;
@@ -93,5 +97,10 @@ export declare const ENDPOINTS: {
93
97
  VIDEOS: string;
94
98
  WATCH_PROVIDERS: string;
95
99
  };
100
+ WATCH_PROVIDERS: {
101
+ MOVIE: string;
102
+ TV: string;
103
+ REGIONS: string;
104
+ };
96
105
  };
97
106
  //# sourceMappingURL=routes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+FrB,CAAC"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwGrB,CAAC"}
package/dist/routes.js CHANGED
@@ -38,6 +38,10 @@ export const ENDPOINTS = {
38
38
  MOVIE_LIST: "/genre/movie/list",
39
39
  TV_LIST: "/genre/tv/list",
40
40
  },
41
+ KEYWORDS: {
42
+ DETAILS: "/keyword",
43
+ MOVIES: "/movies",
44
+ },
41
45
  MOVIES: {
42
46
  DETAILS: "/movie",
43
47
  ALTERNATIVE_TITLES: "/alternative_titles",
@@ -93,4 +97,9 @@ export const ENDPOINTS = {
93
97
  VIDEOS: "/videos",
94
98
  WATCH_PROVIDERS: "/watch/providers",
95
99
  },
100
+ WATCH_PROVIDERS: {
101
+ MOVIE: "/watch/providers/movie",
102
+ TV: "/watch/providers/tv",
103
+ REGIONS: "/watch/providers/regions",
104
+ },
96
105
  };
package/dist/tmdb.d.ts CHANGED
@@ -7,11 +7,13 @@ import { ConfigurationAPI } from "./endpoints/configuration";
7
7
  import { DiscoverAPI } from "./endpoints/discover";
8
8
  import { FindAPI } from "./endpoints/find";
9
9
  import { GenresAPI } from "./endpoints/genres";
10
+ import { KeywordsAPI } from "./endpoints/keywords";
10
11
  import { MovieListsAPI } from "./endpoints/movie_lists";
11
12
  import { MoviesAPI } from "./endpoints/movies";
12
13
  import { SearchAPI } from "./endpoints/search";
13
14
  import { TVSeriesAPI } from "./endpoints/tv_series";
14
15
  import { TVSeriesListsAPI } from "./endpoints/tv_series_lists";
16
+ import { WatchProvidersAPI } from "./endpoints/watch_providers";
15
17
  import { ImageAPI } from "./images/images";
16
18
  import { TMDBOptions } from "./types/config";
17
19
  export declare class TMDB {
@@ -23,8 +25,10 @@ export declare class TMDB {
23
25
  images: ImageAPI;
24
26
  configuration: ConfigurationAPI;
25
27
  genres: GenresAPI;
28
+ keywords: KeywordsAPI;
26
29
  tv_lists: TVSeriesListsAPI;
27
30
  tv_series: TVSeriesAPI;
31
+ watch_providers: WatchProvidersAPI;
28
32
  certifications: CertificationsAPI;
29
33
  changes: ChangesAPI;
30
34
  companies: CompaniesAPI;
@@ -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,oBAAo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SAAS,EAAE,YAAY,CAAC;IACxB,OAAO,EAAE,UAAU,CAAC;IACpB,WAAW,EAAE,cAAc,CAAC;IAC5B,QAAQ,EAAE,WAAW,CAAC;IACtB,IAAI,EAAE,OAAO,CAAC;IAGrB;;;;OAIG;gBACS,WAAW,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB;CAsB1D"}
package/dist/tmdb.js CHANGED
@@ -9,11 +9,13 @@ import { ConfigurationAPI } from "./endpoints/configuration";
9
9
  import { DiscoverAPI } from "./endpoints/discover";
10
10
  import { FindAPI } from "./endpoints/find";
11
11
  import { GenresAPI } from "./endpoints/genres";
12
+ import { KeywordsAPI } from "./endpoints/keywords";
12
13
  import { MovieListsAPI } from "./endpoints/movie_lists";
13
14
  import { MoviesAPI } from "./endpoints/movies";
14
15
  import { SearchAPI } from "./endpoints/search";
15
16
  import { TVSeriesAPI } from "./endpoints/tv_series";
16
17
  import { TVSeriesListsAPI } from "./endpoints/tv_series_lists";
18
+ import { WatchProvidersAPI } from "./endpoints/watch_providers";
17
19
  import { Errors } from "./errors/messages";
18
20
  import { ImageAPI } from "./images/images";
19
21
  export class TMDB {
@@ -25,8 +27,10 @@ export class TMDB {
25
27
  images;
26
28
  configuration;
27
29
  genres;
30
+ keywords;
28
31
  tv_lists;
29
32
  tv_series;
33
+ watch_providers;
30
34
  certifications;
31
35
  changes;
32
36
  companies;
@@ -51,8 +55,10 @@ export class TMDB {
51
55
  this.images = new ImageAPI(this.options.images);
52
56
  this.configuration = new ConfigurationAPI(this.client, this.options);
53
57
  this.genres = new GenresAPI(this.client, this.options);
58
+ this.keywords = new KeywordsAPI(this.client, this.options);
54
59
  this.tv_lists = new TVSeriesListsAPI(this.client, this.options);
55
60
  this.tv_series = new TVSeriesAPI(this.client, this.options);
61
+ this.watch_providers = new WatchProvidersAPI(this.client, this.options);
56
62
  this.certifications = new CertificationsAPI(this.client, this.options);
57
63
  this.changes = new ChangesAPI(this.client, this.options);
58
64
  this.companies = new CompaniesAPI(this.client, this.options);
@@ -2,4 +2,6 @@ export * from "./collections";
2
2
  export * from "./companies";
3
3
  export * from "./credits";
4
4
  export * from "./find";
5
+ export * from "./watch_providers";
6
+ export * from "./keywords";
5
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/other/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/other/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC"}
@@ -2,3 +2,5 @@ export * from "./collections";
2
2
  export * from "./companies";
3
3
  export * from "./credits";
4
4
  export * from "./find";
5
+ export * from "./watch_providers";
6
+ export * from "./keywords";
@@ -0,0 +1,20 @@
1
+ import { TMDBQueryParams } from "../common";
2
+ /**
3
+ * Base params used by keyword endpoints.
4
+ */
5
+ export type KeywordBaseParam = {
6
+ /** TMDB keyword identifier. */
7
+ keyword_id: number;
8
+ };
9
+ /**
10
+ * Parameters for fetching keyword details.
11
+ */
12
+ export type KeywordDetailsParams = KeywordBaseParam;
13
+ /**
14
+ * Parameters for fetching movies associated with a keyword.
15
+ * @reference https://developer.themoviedb.org/reference/keyword-movies
16
+ */
17
+ export type KeywordMoviesParams = KeywordBaseParam & Pick<TMDBQueryParams, "language" | "page"> & {
18
+ include_adult?: boolean;
19
+ };
20
+ //# sourceMappingURL=keywords.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keywords.d.ts","sourceRoot":"","sources":["../../../src/types/other/keywords.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC9B,+BAA+B;IAC/B,UAAU,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,CAAC;AAEpD;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,GACjD,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,MAAM,CAAC,GAAG;IAC5C,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,35 @@
1
+ import { WithLanguage } from "../common";
2
+ import { WatchProviderItem } from "../common/media";
3
+ import { CountryISO3166_1 } from "../config";
4
+ import { ConfigurationCountry } from "../config/configuration";
5
+ /**
6
+ * Parameters supported by watch provider namespace endpoints.
7
+ */
8
+ export type WatchProviderListParams = WithLanguage;
9
+ /**
10
+ * Parameters for listing the available watch provider regions.
11
+ */
12
+ export type WatchProviderRegionsParams = WithLanguage;
13
+ /**
14
+ * Country-specific display priorities returned by top-level watch provider list endpoints.
15
+ */
16
+ export type WatchProviderDisplayPriorities = Partial<Record<CountryISO3166_1, number>>;
17
+ /**
18
+ * A watch provider returned by top-level movie and TV provider list endpoints.
19
+ */
20
+ export type WatchProviderListItem = WatchProviderItem & {
21
+ display_priorities: WatchProviderDisplayPriorities;
22
+ };
23
+ /**
24
+ * Response returned by movie and TV watch provider list endpoints.
25
+ */
26
+ export type WatchProviderListResponse = {
27
+ results: WatchProviderListItem[];
28
+ };
29
+ /**
30
+ * Response returned by the available regions endpoint.
31
+ */
32
+ export type WatchProviderRegionsResponse = {
33
+ results: ConfigurationCountry[];
34
+ };
35
+ //# sourceMappingURL=watch_providers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watch_providers.d.ts","sourceRoot":"","sources":["../../../src/types/other/watch_providers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,YAAY,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,YAAY,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC,CAAC;AAEvF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,GAAG;IACvD,kBAAkB,EAAE,8BAA8B,CAAC;CACnD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACvC,OAAO,EAAE,qBAAqB,EAAE,CAAC;CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG;IAC1C,OAAO,EAAE,oBAAoB,EAAE,CAAC;CAChC,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,69 +1,71 @@
1
1
  {
2
- "name": "@lorenzopant/tmdb",
3
- "version": "1.9.0",
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-tmdb-docs.vercel.app",
12
- "bugs": {
13
- "url": "https://github.com/lorenzopant/tmdb/issues"
14
- },
15
- "author": "Lorenzo Pantano",
16
- "license": "MIT",
17
- "keywords": [
18
- "tmdb",
19
- "typescript",
20
- "api",
21
- "movies"
22
- ],
23
- "devDependencies": {
24
- "@eslint/compat": "^2.0.0",
25
- "@eslint/eslintrc": "^3.3.1",
26
- "@eslint/js": "^9.30.0",
27
- "@types/node": "^22.15.2",
28
- "@typescript-eslint/eslint-plugin": "^8.35.0",
29
- "@typescript-eslint/parser": "^8.35.0",
30
- "@vitest/coverage-v8": "^4.0.9",
31
- "@vitest/ui": "^4.0.10",
32
- "dotenv": "^16.5.0",
33
- "eslint": "^9.30.0",
34
- "eslint-config-prettier": "^10.1.5",
35
- "eslint-plugin-import": "^2.32.0",
36
- "husky": "^9.1.7",
37
- "release-it": "^19.0.3",
38
- "release-it-pnpm": "^4.6.6",
39
- "ts-morph": "^27.0.2",
40
- "tsx": "^4.21.0",
41
- "typescript": "^5.8.3",
42
- "typescript-eslint": "^8.35.0",
43
- "vite": "^7.0.0",
44
- "vitest": "^4.0.9"
45
- },
46
- "exports": {
47
- ".": {
48
- "import": "./dist/index.js",
49
- "types": "./dist/index.d.ts"
50
- },
51
- "./types": {
52
- "types": "./dist/types/index.d.ts",
53
- "default": "./dist/types/index.js"
54
- }
55
- },
56
- "scripts": {
57
- "build": "tsc",
58
- "dev": "tsc --watch",
59
- "typecheck": "tsc --noEmit",
60
- "test": "vitest",
61
- "test:ui": "vitest --ui",
62
- "test:coverage": "vitest --coverage",
63
- "lint": "eslint .",
64
- "release": "pnpm release:patch",
65
- "release:patch": "pnpm version patch --git-tag-version && git push --follow-tags",
66
- "release:minor": "pnpm version minor --git-tag-version && git push --follow-tags",
67
- "release:major": "pnpm version major --git-tag-version && git push --follow-tags"
68
- }
69
- }
2
+ "name": "@lorenzopant/tmdb",
3
+ "version": "1.10.0",
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-tmdb-docs.vercel.app",
12
+ "bugs": {
13
+ "url": "https://github.com/lorenzopant/tmdb/issues"
14
+ },
15
+ "scripts": {
16
+ "build": "tsc",
17
+ "dev": "tsc --watch",
18
+ "typecheck": "tsc --noEmit",
19
+ "test": "vitest",
20
+ "test:ui": "vitest --ui",
21
+ "test:coverage": "vitest --coverage",
22
+ "prepare": "husky",
23
+ "lint": "eslint .",
24
+ "release": "pnpm release:patch",
25
+ "release:patch": "pnpm version patch --git-tag-version && git push --follow-tags",
26
+ "release:minor": "pnpm version minor --git-tag-version && git push --follow-tags",
27
+ "release:major": "pnpm version major --git-tag-version && git push --follow-tags"
28
+ },
29
+ "author": "Lorenzo Pantano",
30
+ "license": "MIT",
31
+ "keywords": [
32
+ "tmdb",
33
+ "typescript",
34
+ "api",
35
+ "movies"
36
+ ],
37
+ "packageManager": "pnpm@8.8.0",
38
+ "devDependencies": {
39
+ "@eslint/compat": "^2.0.0",
40
+ "@eslint/eslintrc": "^3.3.1",
41
+ "@eslint/js": "^9.30.0",
42
+ "@types/node": "^22.15.2",
43
+ "@typescript-eslint/eslint-plugin": "^8.35.0",
44
+ "@typescript-eslint/parser": "^8.35.0",
45
+ "@vitest/coverage-v8": "^4.0.9",
46
+ "@vitest/ui": "^4.0.10",
47
+ "dotenv": "^16.5.0",
48
+ "eslint": "^9.30.0",
49
+ "eslint-config-prettier": "^10.1.5",
50
+ "eslint-plugin-import": "^2.32.0",
51
+ "husky": "^9.1.7",
52
+ "release-it": "^19.0.3",
53
+ "release-it-pnpm": "^4.6.6",
54
+ "ts-morph": "^27.0.2",
55
+ "tsx": "^4.21.0",
56
+ "typescript": "^5.8.3",
57
+ "typescript-eslint": "^8.35.0",
58
+ "vite": "^7.0.0",
59
+ "vitest": "^4.0.9"
60
+ },
61
+ "exports": {
62
+ ".": {
63
+ "import": "./dist/index.js",
64
+ "types": "./dist/index.d.ts"
65
+ },
66
+ "./types": {
67
+ "types": "./dist/types/index.d.ts",
68
+ "default": "./dist/types/index.js"
69
+ }
70
+ }
71
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 @lorenzopant
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.