@lorenzopant/tmdb 1.9.0 → 1.11.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.
- package/dist/endpoints/keywords.d.ts +30 -0
- package/dist/endpoints/keywords.d.ts.map +1 -0
- package/dist/endpoints/keywords.js +38 -0
- package/dist/endpoints/networks.d.ts +36 -0
- package/dist/endpoints/networks.d.ts.map +1 -0
- package/dist/endpoints/networks.js +46 -0
- package/dist/endpoints/watch_providers.d.ts +35 -0
- package/dist/endpoints/watch_providers.d.ts.map +1 -0
- package/dist/endpoints/watch_providers.js +46 -0
- package/dist/routes.d.ts +14 -0
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +14 -0
- package/dist/tmdb.d.ts +6 -0
- package/dist/tmdb.d.ts.map +1 -1
- package/dist/tmdb.js +9 -0
- package/dist/types/common/images.d.ts +65 -0
- package/dist/types/common/images.d.ts.map +1 -0
- package/dist/types/common/index.d.ts +1 -0
- package/dist/types/common/index.d.ts.map +1 -1
- package/dist/types/common/index.js +1 -0
- package/dist/types/common/media.d.ts +25 -22
- package/dist/types/common/media.d.ts.map +1 -1
- package/dist/types/common/media.js +0 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +0 -1
- package/dist/types/movies/images.d.ts +2 -11
- package/dist/types/movies/images.d.ts.map +1 -1
- package/dist/types/other/collections.d.ts +3 -9
- package/dist/types/other/collections.d.ts.map +1 -1
- package/dist/types/other/companies.d.ts +5 -33
- package/dist/types/other/companies.d.ts.map +1 -1
- package/dist/types/other/index.d.ts +3 -0
- package/dist/types/other/index.d.ts.map +1 -1
- package/dist/types/other/index.js +3 -0
- package/dist/types/other/keywords.d.ts +20 -0
- package/dist/types/other/keywords.d.ts.map +1 -0
- package/dist/types/other/keywords.js +1 -0
- package/dist/types/other/networks.d.ts +46 -0
- package/dist/types/other/networks.d.ts.map +1 -0
- package/dist/types/other/networks.js +1 -0
- package/dist/types/other/watch_providers.d.ts +35 -0
- package/dist/types/other/watch_providers.d.ts.map +1 -0
- package/dist/types/other/watch_providers.js +1 -0
- package/dist/types/tv/episode_groups.d.ts +1 -1
- package/dist/types/tv/episode_groups.d.ts.map +1 -1
- package/dist/types/tv/images.d.ts +2 -11
- package/dist/types/tv/images.d.ts.map +1 -1
- package/dist/types/tv/tv_series.d.ts +1 -1
- package/dist/types/tv/tv_series.d.ts.map +1 -1
- package/package.json +70 -68
- package/LICENSE +0 -21
- package/dist/types/networks/alternative_names.d.ts +0 -1
- package/dist/types/networks/alternative_names.d.ts.map +0 -1
- package/dist/types/networks/alternative_names.js +0 -1
- package/dist/types/networks/images.d.ts +0 -1
- package/dist/types/networks/images.d.ts.map +0 -1
- package/dist/types/networks/images.js +0 -1
- package/dist/types/networks/index.d.ts +0 -2
- package/dist/types/networks/index.d.ts.map +0 -1
- package/dist/types/networks/index.js +0 -1
- package/dist/types/networks/network.d.ts +0 -8
- package/dist/types/networks/network.d.ts.map +0 -1
- /package/dist/types/{networks/network.js → common/images.js} +0 -0
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
import { ImageItem } from "../common";
|
|
1
|
+
import { ImageItem, ImagesResult } from "../common/images";
|
|
2
2
|
/**
|
|
3
3
|
* Collection of movie images (backdrops, logos, posters)
|
|
4
4
|
*/
|
|
5
|
-
export type MovieImages =
|
|
6
|
-
/** Movie identifier */
|
|
7
|
-
id: number;
|
|
8
|
-
/** Array of backdrop images */
|
|
9
|
-
backdrops: ImageItem[];
|
|
10
|
-
/** Array of logo images */
|
|
11
|
-
logos: ImageItem[];
|
|
12
|
-
/** Array of poster images */
|
|
13
|
-
posters: ImageItem[];
|
|
14
|
-
};
|
|
5
|
+
export type MovieImages = ImagesResult<ImageItem, "backdrops" | "logos" | "posters">;
|
|
15
6
|
//# sourceMappingURL=images.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"images.d.ts","sourceRoot":"","sources":["../../../src/types/movies/images.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"images.d.ts","sourceRoot":"","sources":["../../../src/types/movies/images.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC,SAAS,EAAE,WAAW,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MediaType, Translation, WithLanguage } from "../common";
|
|
2
|
+
import { ImageItem, ImagesResult } from "../common/images";
|
|
2
3
|
import { Language, LanguageISO6391 } from "../config";
|
|
3
4
|
import { MovieResultItem } from "../search";
|
|
4
5
|
/**
|
|
@@ -41,14 +42,7 @@ export type CollectionItem = Omit<MovieResultItem, "title" | "original_title"> &
|
|
|
41
42
|
* Represents the images associated with a TMDB collection,
|
|
42
43
|
* including backdrops and posters.
|
|
43
44
|
*/
|
|
44
|
-
export type CollectionImages =
|
|
45
|
-
/** Unique TMDB identifier for the collection */
|
|
46
|
-
id: number;
|
|
47
|
-
/** List of backdrop images available for the collection */
|
|
48
|
-
backdrops: ImageItem[];
|
|
49
|
-
/** List of poster images available for the collection */
|
|
50
|
-
posters: ImageItem[];
|
|
51
|
-
};
|
|
45
|
+
export type CollectionImages = ImagesResult<ImageItem, "backdrops" | "posters">;
|
|
52
46
|
/**
|
|
53
47
|
* Represents the available translations for a TMDB collection.
|
|
54
48
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../../src/types/other/collections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../../src/types/other/collections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,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GAAG;IACrD,0CAA0C;IAC1C,IAAI,EAAE,yBAAyB,CAAC;CAChC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACvC,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,gDAAgD;AAChD,MAAM,MAAM,mBAAmB,GAAG;IACjC,gDAAgD;IAChD,aAAa,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,mBAAmB,GAAG,YAAY,CAAC;AACzE,MAAM,MAAM,sBAAsB,GAAG,mBAAmB,GAAG;IAC1D,QAAQ,CAAC,EAAE,QAAQ,GAAG,eAAe,CAAC;IACtC,sBAAsB,CAAC,EAAE,QAAQ,GAAG,eAAe,CAAC;CACpD,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AlternativeName, AlternativeNamesResult, WithLanguage } from "../common";
|
|
2
|
+
import { ImagesResult, OrganizationImage } from "../common/images";
|
|
2
3
|
import { CountryISO3166_1 } from "../config/countries";
|
|
3
4
|
import { Language, LanguageISO6391 } from "../config/languages";
|
|
4
5
|
/**
|
|
@@ -30,44 +31,15 @@ export type Company = CompanySummary & {
|
|
|
30
31
|
/**
|
|
31
32
|
* A single alternative company name entry.
|
|
32
33
|
*/
|
|
33
|
-
export type CompanyAlternativeName =
|
|
34
|
-
/** Alternative company name */
|
|
35
|
-
name: string;
|
|
36
|
-
/** Optional classification for the name */
|
|
37
|
-
type: string;
|
|
38
|
-
};
|
|
34
|
+
export type CompanyAlternativeName = AlternativeName;
|
|
39
35
|
/**
|
|
40
36
|
* Alternative names response for a company.
|
|
41
37
|
*/
|
|
42
|
-
export type CompanyAlternativeNames =
|
|
43
|
-
/** Unique company identifier */
|
|
44
|
-
id: number;
|
|
45
|
-
/** List of alternative names associated with the company */
|
|
46
|
-
results: CompanyAlternativeName[];
|
|
47
|
-
};
|
|
38
|
+
export type CompanyAlternativeNames = AlternativeNamesResult;
|
|
48
39
|
/**
|
|
49
40
|
* Company logo images returned by `/company/{company_id}/images`.
|
|
50
41
|
*/
|
|
51
|
-
export type CompanyImages =
|
|
52
|
-
/** Unique company identifier */
|
|
53
|
-
id: number;
|
|
54
|
-
/** Logos available for the company */
|
|
55
|
-
logos: CompanyImage[];
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* Represents a single company logo (slightly different from ImageItem)
|
|
59
|
-
*
|
|
60
|
-
* Note on FileType from TMDB:
|
|
61
|
-
* There are two image formats that are supported for companies, PNG's and SVG's.
|
|
62
|
-
* You can see which type the original file is by looking at the file_type field.
|
|
63
|
-
* We prefer SVG's as they are resolution independent and as such, the width and height are only
|
|
64
|
-
* there to reflect the original asset that was uploaded.
|
|
65
|
-
* An SVG can be scaled properly beyond those dimensions if you call them as a PNG.
|
|
66
|
-
*/
|
|
67
|
-
export type CompanyImage = Omit<ImageItem, "iso_639_1"> & {
|
|
68
|
-
id: string;
|
|
69
|
-
file_type: FileType;
|
|
70
|
-
};
|
|
42
|
+
export type CompanyImages = ImagesResult<OrganizationImage, "logos">;
|
|
71
43
|
/** Base param used by all company queries */
|
|
72
44
|
export type CompanyBaseParam = {
|
|
73
45
|
/** Uniquely identifies a company in TMDB. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companies.d.ts","sourceRoot":"","sources":["../../../src/types/other/companies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"companies.d.ts","sourceRoot":"","sources":["../../../src/types/other/companies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,C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.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;AAC3B,cAAc,YAAY,CAAC"}
|
|
@@ -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,46 @@
|
|
|
1
|
+
import { ImagesResult, OrganizationImage } from "../common/images";
|
|
2
|
+
import { CountryISO3166_1 } from "../config/countries";
|
|
3
|
+
/**
|
|
4
|
+
* Represents a network entry as returned in search results or list responses.
|
|
5
|
+
*
|
|
6
|
+
* @see https://developer.themoviedb.org/reference/network-details
|
|
7
|
+
*/
|
|
8
|
+
export type NetworkItem = {
|
|
9
|
+
/** The unique TMDB identifier of the network. */
|
|
10
|
+
id: number;
|
|
11
|
+
/** Path to the network's logo, to be appended to the TMDB base image URL. */
|
|
12
|
+
logo_path: string;
|
|
13
|
+
/** The name of the network. */
|
|
14
|
+
name: string;
|
|
15
|
+
/** The ISO 3166-1 country code of the network's country of origin. */
|
|
16
|
+
origin_country: CountryISO3166_1;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Represents the images response for a network.
|
|
20
|
+
* Networks only expose logo images.
|
|
21
|
+
*
|
|
22
|
+
* @see https://developer.themoviedb.org/reference/network-images
|
|
23
|
+
*/
|
|
24
|
+
export type NetworkImages = ImagesResult<OrganizationImage, "logos">;
|
|
25
|
+
/**
|
|
26
|
+
* Represents the full details of a network, as returned by the network details endpoint.
|
|
27
|
+
* Extends {@link NetworkItem} with additional metadata.
|
|
28
|
+
*
|
|
29
|
+
* @see https://developer.themoviedb.org/reference/network-details
|
|
30
|
+
*/
|
|
31
|
+
export type Network = NetworkItem & {
|
|
32
|
+
/** The city or location of the network's headquarters, if available. */
|
|
33
|
+
headquarters?: string | null;
|
|
34
|
+
/** The URL of the network's official homepage, if available. */
|
|
35
|
+
homepage?: string | null;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Base parameters required by all network endpoints.
|
|
39
|
+
*
|
|
40
|
+
* @see https://developer.themoviedb.org/reference/network-details
|
|
41
|
+
*/
|
|
42
|
+
export type NetworkBaseParams = {
|
|
43
|
+
/** The unique TMDB identifier of the network. */
|
|
44
|
+
network_id: number;
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=networks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"networks.d.ts","sourceRoot":"","sources":["../../../src/types/other/networks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG;IACzB,iDAAiD;IACjD,EAAE,EAAE,MAAM,CAAC;IACX,6EAA6E;IAC7E,SAAS,EAAE,MAAM,CAAC;IAClB,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,cAAc,EAAE,gBAAgB,CAAC;CACjC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;AAErE;;;;;GAKG;AACH,MAAM,MAAM,OAAO,GAAG,WAAW,GAAG;IACnC,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC/B,iDAAiD;IACjD,UAAU,EAAE,MAAM,CAAC;CACnB,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 {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"episode_groups.d.ts","sourceRoot":"","sources":["../../../src/types/tv/episode_groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"episode_groups.d.ts","sourceRoot":"","sources":["../../../src/types/tv/episode_groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC7B,2BAA2B;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,mCAAmC;IACnC,OAAO,EAAE,kBAAkB,EAAE,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAChC,kEAAkE;IAClE,WAAW,EAAE,MAAM,CAAC;IACpB,6CAA6C;IAC7C,aAAa,EAAE,MAAM,CAAC;IACtB,qDAAqD;IACrD,WAAW,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,OAAO,EAAE,WAAW,CAAC;IACrB,4GAA4G;IAC5G,IAAI,EAAE,MAAM,CAAC;CACb,CAAC"}
|
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
import { ImageItem } from "../common";
|
|
1
|
+
import { ImageItem, ImagesResult } from "../common/images";
|
|
2
2
|
/**
|
|
3
3
|
* Images related to a TV show.
|
|
4
4
|
* Contains backdrops, logos, posters and stills.
|
|
5
5
|
*/
|
|
6
|
-
export type TVImages =
|
|
7
|
-
/** TMDB unique identifier for the TV show. */
|
|
8
|
-
id: number;
|
|
9
|
-
/** List of backdrop images for the TV show. */
|
|
10
|
-
backdrops: TVImageItem[];
|
|
11
|
-
/** List of logo images for the TV show. */
|
|
12
|
-
logos: TVImageItem[];
|
|
13
|
-
/** List of poster images for the TV show. */
|
|
14
|
-
posters: TVImageItem[];
|
|
15
|
-
};
|
|
6
|
+
export type TVImages = ImagesResult<TVImageItem, "backdrops" | "logos" | "posters">;
|
|
16
7
|
/**
|
|
17
8
|
* Image items for TVShows have an undocumented "iso_3166_1" property
|
|
18
9
|
* I decided to put it anyway as an optional property,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"images.d.ts","sourceRoot":"","sources":["../../../src/types/tv/images.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"images.d.ts","sourceRoot":"","sources":["../../../src/types/tv/images.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE3D;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,YAAY,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;AAEpF;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Credit, Genre, ProductionCompany, ProductionCountry, SpokenLanguage } from "../common";
|
|
2
2
|
import { CountryISO3166_1 } from "../config/countries";
|
|
3
|
-
import { NetworkItem } from "../
|
|
3
|
+
import { NetworkItem } from "../other";
|
|
4
4
|
import { TVCredits } from "./credits";
|
|
5
5
|
import { TVEpisodeItem } from "./episodes";
|
|
6
6
|
import { TVExternalIDs } from "./external_ids";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tv_series.d.ts","sourceRoot":"","sources":["../../../src/types/tv/tv_series.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"tv_series.d.ts","sourceRoot":"","sources":["../../../src/types/tv/tv_series.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,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IAAI,eAAe,GAAG;KACrG,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC;CACpC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,69 +1,71 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
2
|
+
"name": "@lorenzopant/tmdb",
|
|
3
|
+
"version": "1.11.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.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=alternative_names.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alternative_names.d.ts","sourceRoot":"","sources":["../../../src/types/networks/alternative_names.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=images.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"images.d.ts","sourceRoot":"","sources":["../../../src/types/networks/images.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/networks/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./network";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../../src/types/networks/network.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,MAAM,MAAM,WAAW,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,gBAAgB,CAAC;CACjC,CAAC"}
|
|
File without changes
|