@lorenzopant/tmdb 1.1.7 → 1.2.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/configuration.d.ts +3 -3
- package/dist/endpoints/configuration.d.ts.map +1 -1
- package/dist/endpoints/configuration.js +1 -1
- package/dist/endpoints/movie_lists.d.ts +2 -6
- package/dist/endpoints/movie_lists.d.ts.map +1 -1
- package/dist/endpoints/movie_lists.js +2 -7
- package/dist/endpoints/movies.d.ts +3 -2
- package/dist/endpoints/movies.d.ts.map +1 -1
- package/dist/endpoints/search.d.ts +7 -7
- package/dist/endpoints/search.d.ts.map +1 -1
- package/dist/endpoints/tv_series.d.ts +240 -12
- package/dist/endpoints/tv_series.d.ts.map +1 -1
- package/dist/endpoints/tv_series.js +288 -10
- package/dist/tmdb.d.ts +1 -1
- package/dist/tmdb.d.ts.map +1 -1
- package/dist/tmdb.js +2 -2
- package/dist/types/common/changes.d.ts +2 -0
- package/dist/types/common/changes.d.ts.map +1 -1
- package/dist/types/common/media.d.ts +107 -0
- package/dist/types/common/media.d.ts.map +1 -1
- package/dist/types/common/params.d.ts +9 -0
- package/dist/types/common/params.d.ts.map +1 -1
- package/dist/types/config/configuration.d.ts +9 -0
- package/dist/types/config/configuration.d.ts.map +1 -1
- package/dist/types/config/countries.d.ts +2 -9
- package/dist/types/config/countries.d.ts.map +1 -1
- package/dist/types/config/languages.d.ts +0 -1
- package/dist/types/config/languages.d.ts.map +1 -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/alternative_titles.d.ts +2 -12
- package/dist/types/movies/alternative_titles.d.ts.map +1 -1
- package/dist/types/movies/index.d.ts +1 -2
- package/dist/types/movies/index.d.ts.map +1 -1
- package/dist/types/movies/index.js +1 -2
- package/dist/types/movies/movie.d.ts +1 -1
- package/dist/types/movies/params.d.ts +2 -7
- package/dist/types/movies/params.d.ts.map +1 -1
- package/dist/types/movies/{reccomendations.d.ts → recommendations.d.ts} +1 -1
- package/dist/types/movies/recommendations.d.ts.map +1 -0
- package/dist/types/movies/reviews.d.ts +2 -34
- package/dist/types/movies/reviews.d.ts.map +1 -1
- package/dist/types/movies/translations.d.ts +16 -23
- package/dist/types/movies/translations.d.ts.map +1 -1
- package/dist/types/search/collection.d.ts +1 -1
- package/dist/types/search/company.d.ts +1 -1
- package/dist/types/search/index.d.ts +1 -1
- package/dist/types/search/index.d.ts.map +1 -1
- package/dist/types/search/index.js +1 -1
- package/dist/types/search/keyword.d.ts +2 -6
- package/dist/types/search/keyword.d.ts.map +1 -1
- package/dist/types/search/{movies.d.ts → movie.d.ts} +1 -1
- package/dist/types/search/movie.d.ts.map +1 -0
- package/dist/types/{person → search}/person.d.ts.map +1 -1
- package/dist/types/tv/alternative_titles.d.ts +11 -0
- package/dist/types/tv/alternative_titles.d.ts.map +1 -0
- package/dist/types/tv/changes.d.ts +3 -0
- package/dist/types/tv/changes.d.ts.map +1 -0
- package/dist/types/tv/content_ratings.d.ts +5 -0
- package/dist/types/tv/content_ratings.d.ts.map +1 -0
- package/dist/types/tv/content_ratings.js +1 -0
- package/dist/types/tv/episode_groups.d.ts +30 -0
- package/dist/types/tv/episode_groups.d.ts.map +1 -0
- package/dist/types/tv/episode_groups.js +1 -0
- package/dist/types/tv/external_ids.d.ts +17 -7
- package/dist/types/tv/external_ids.d.ts.map +1 -1
- package/dist/types/tv/images.d.ts +11 -5
- package/dist/types/tv/images.d.ts.map +1 -1
- package/dist/types/tv/index.d.ts +9 -1
- package/dist/types/tv/index.d.ts.map +1 -1
- package/dist/types/tv/index.js +9 -1
- package/dist/types/tv/lists.d.ts +32 -0
- package/dist/types/tv/lists.d.ts.map +1 -0
- package/dist/types/tv/lists.js +1 -0
- package/dist/types/tv/params.d.ts +48 -4
- package/dist/types/tv/params.d.ts.map +1 -1
- package/dist/types/tv/{reccomendations.d.ts → recommendations.d.ts} +1 -1
- package/dist/types/tv/recommendations.d.ts.map +1 -0
- package/dist/types/tv/recommendations.js +1 -0
- package/dist/types/tv/reviews.d.ts +6 -0
- package/dist/types/tv/reviews.d.ts.map +1 -0
- package/dist/types/tv/reviews.js +1 -0
- package/dist/types/tv/screened_theatrically.d.ts +21 -0
- package/dist/types/tv/screened_theatrically.d.ts.map +1 -0
- package/dist/types/tv/screened_theatrically.js +1 -0
- package/dist/types/tv/translations.d.ts +33 -0
- package/dist/types/tv/translations.d.ts.map +1 -0
- package/dist/types/tv/translations.js +1 -0
- package/dist/types/tv/tv_series.d.ts +5 -4
- package/dist/types/tv/tv_series.d.ts.map +1 -1
- package/package.json +5 -9
- package/.husky/pre-commit +0 -15
- package/.prettierrc +0 -5
- package/CODE_OF_CONDUCT.md +0 -128
- package/CONTRIBUTING.md +0 -71
- package/dist/scripts/check-exports.d.ts +0 -2
- package/dist/scripts/check-exports.d.ts.map +0 -1
- package/dist/scripts/check-exports.js +0 -87
- package/dist/scripts/find-missing.d.ts +0 -2
- package/dist/scripts/find-missing.d.ts.map +0 -1
- package/dist/scripts/find-missing.js +0 -95
- package/dist/scripts/generate-explicit-exports.d.ts +0 -2
- package/dist/scripts/generate-explicit-exports.d.ts.map +0 -1
- package/dist/scripts/generate-explicit-exports.js +0 -47
- package/dist/scripts/generate-index-files.d.ts +0 -2
- package/dist/scripts/generate-index-files.d.ts.map +0 -1
- package/dist/scripts/generate-index-files.js +0 -27
- package/dist/types/movies/reccomendations.d.ts.map +0 -1
- package/dist/types/movies/watch_providers.d.ts +0 -37
- package/dist/types/movies/watch_providers.d.ts.map +0 -1
- package/dist/types/person/index.d.ts +0 -2
- package/dist/types/person/index.d.ts.map +0 -1
- package/dist/types/person/index.js +0 -1
- package/dist/types/search/movies.d.ts.map +0 -1
- package/dist/types/tv/reccomendations.d.ts.map +0 -1
- /package/dist/types/movies/{reccomendations.js → recommendations.js} +0 -0
- /package/dist/types/{movies/watch_providers.js → search/movie.js} +0 -0
- /package/dist/types/{person → search}/person.d.ts +0 -0
- /package/dist/types/{person → search}/person.js +0 -0
- /package/dist/types/{search/movies.js → tv/alternative_titles.js} +0 -0
- /package/dist/types/tv/{reccomendations.js → changes.js} +0 -0
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { Timezone } from "../config/timezones";
|
|
2
|
-
import { TVAppendToResponseNamespace } from "
|
|
2
|
+
import { TVAppendToResponseNamespace } from "./tv_series";
|
|
3
3
|
import { Prettify } from "../utility";
|
|
4
|
-
import { WithLanguagePage, WithParams } from "../common/params";
|
|
4
|
+
import { DateRange, WithLanguagePage, WithParams } from "../common/params";
|
|
5
|
+
import { Language, LanguageISO6391 } from "../config";
|
|
5
6
|
/**
|
|
6
7
|
* Almost every query within the TV Series domain
|
|
7
8
|
* will take this required param to identify the
|
|
8
9
|
* tv show.
|
|
9
10
|
*/
|
|
10
|
-
type TVBaseParam = {
|
|
11
|
+
export type TVBaseParam = {
|
|
11
12
|
series_id: number;
|
|
12
13
|
};
|
|
13
14
|
/**
|
|
@@ -26,5 +27,48 @@ export type TVDetailsParams = Prettify<TVBaseParam & {
|
|
|
26
27
|
* Parameters for fetching aggregate credits for a TV show (cast and crew across all seasons).
|
|
27
28
|
*/
|
|
28
29
|
export type TVAggregateCreditsParams = Prettify<TVBaseParam & WithParams<"language">>;
|
|
29
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Parameters for fetching tv show change history.
|
|
32
|
+
*/
|
|
33
|
+
export type TVChangeParams = Prettify<TVBaseParam & WithParams<"page"> & DateRange>;
|
|
34
|
+
/**
|
|
35
|
+
* Parameters for fetching tv show credits (cast and crew last season).
|
|
36
|
+
*/
|
|
37
|
+
export type TVCreditsParams = Prettify<TVBaseParam & WithParams<"language">>;
|
|
38
|
+
/**
|
|
39
|
+
* Parameters for fetching tv shows images (backdrops, logos, posters).
|
|
40
|
+
*
|
|
41
|
+
* Note: language and include_image_language params still only support
|
|
42
|
+
* ISO-639-1 language definition according to TMDB docs:
|
|
43
|
+
*
|
|
44
|
+
* "These are all specified as IETF tags to identify the languages we use on TMDB.
|
|
45
|
+
* There is one exception which is image languages.
|
|
46
|
+
* They are currently only designated by a ISO-639-1 tag. This is a planned upgrade for the future."
|
|
47
|
+
* https://developer.themoviedb.org/reference/configuration-primary-translations
|
|
48
|
+
*
|
|
49
|
+
* However, in practice, language in format "en-US" is still accepted.
|
|
50
|
+
* So we allow for both formats.
|
|
51
|
+
*/
|
|
52
|
+
export type TVImagesParams = Prettify<TVBaseParam & {
|
|
53
|
+
/** Language for image metadata (supports both ISO-639-1 and full Language format) */
|
|
54
|
+
language?: Language | LanguageISO6391;
|
|
55
|
+
/** Include images with specific language tags (comma-separated, e.g., "en,null") */
|
|
56
|
+
include_image_language?: Language | LanguageISO6391;
|
|
57
|
+
}>;
|
|
58
|
+
/**
|
|
59
|
+
* Parameters for fetching TV series lists (lists endpoint, different from airing_today ecc...).
|
|
60
|
+
*/
|
|
61
|
+
export type TVSeriesListsParams = Prettify<TVBaseParam & WithLanguagePage>;
|
|
62
|
+
/**
|
|
63
|
+
* Parameters for fetching tv shows recommendations.
|
|
64
|
+
*/
|
|
65
|
+
export type TVRecommendationsParams = Prettify<TVBaseParam & WithLanguagePage>;
|
|
66
|
+
/**
|
|
67
|
+
* Parameters for fetching similar tv shows.
|
|
68
|
+
*/
|
|
69
|
+
export type TVSimilarParams = Prettify<TVBaseParam & WithLanguagePage>;
|
|
70
|
+
/**
|
|
71
|
+
* Parameters for fetching tv show reviews.
|
|
72
|
+
*/
|
|
73
|
+
export type TVReviewsParams = Prettify<TVBaseParam & WithLanguagePage>;
|
|
30
74
|
//# sourceMappingURL=params.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"params.d.ts","sourceRoot":"","sources":["../../../src/types/tv/params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,2BAA2B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"params.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CAAC,EAAE,QAAQ,GAAG,eAAe,CAAC;CACpD,CACD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,WAAW,GAAG,gBAAgB,CAAC,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC,WAAW,GAAG,gBAAgB,CAAC,CAAC;AAE/E;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC,WAAW,GAAG,gBAAgB,CAAC,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC,WAAW,GAAG,gBAAgB,CAAC,CAAC"}
|
|
@@ -2,4 +2,4 @@ import { PaginatedResponse } from "../common";
|
|
|
2
2
|
import { TVSeriesResultItem } from "../search";
|
|
3
3
|
/** List of TV shows that are recommended for a TV show. */
|
|
4
4
|
export type TVRecommendations = PaginatedResponse<TVSeriesResultItem>;
|
|
5
|
-
//# sourceMappingURL=
|
|
5
|
+
//# sourceMappingURL=recommendations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recommendations.d.ts","sourceRoot":"","sources":["../../../src/types/tv/recommendations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,2DAA2D;AAC3D,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reviews.d.ts","sourceRoot":"","sources":["../../../src/types/tv/reviews.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the response for TV episodes that have been screened theatrically.
|
|
3
|
+
*/
|
|
4
|
+
export type TVScreenedTheatrically = {
|
|
5
|
+
/** The unique identifier of the TV series. */
|
|
6
|
+
id: number;
|
|
7
|
+
/** The list of episodes that received a theatrical screening. */
|
|
8
|
+
results: TVScreeningItem[];
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Represents a single TV episode that was screened theatrically.
|
|
12
|
+
*/
|
|
13
|
+
export type TVScreeningItem = {
|
|
14
|
+
/** The unique identifier of the episode. */
|
|
15
|
+
id: number;
|
|
16
|
+
/** The episode number within its season. */
|
|
17
|
+
episode_number: number;
|
|
18
|
+
/** The season number the episode belongs to. */
|
|
19
|
+
season_number: number;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=screened_theatrically.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screened_theatrically.d.ts","sourceRoot":"","sources":["../../../src/types/tv/screened_theatrically.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACpC,8CAA8C;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,iEAAiE;IACjE,OAAO,EAAE,eAAe,EAAE,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC7B,4CAA4C;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,4CAA4C;IAC5C,cAAc,EAAE,MAAM,CAAC;IACvB,gDAAgD;IAChD,aAAa,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Translation } from "../common";
|
|
2
|
+
/**
|
|
3
|
+
* Represents the collection of available translations for a TV series.
|
|
4
|
+
*/
|
|
5
|
+
export type TVTranslations = {
|
|
6
|
+
/** The unique identifier of the TV series. */
|
|
7
|
+
id: number;
|
|
8
|
+
/** The list of available translations for this TV series. */
|
|
9
|
+
translations: TVTranslationItem[];
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Represents a single translation entry for a TV series,
|
|
13
|
+
* extending the base `Translation` type with TV-specific translated data.
|
|
14
|
+
*/
|
|
15
|
+
export type TVTranslationItem = Translation & {
|
|
16
|
+
/** The translated content fields for this TV series. */
|
|
17
|
+
data: TVTranslationData;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* The translated text fields for a TV series in a specific language.
|
|
21
|
+
* All fields are optional as not every translation may provide all values.
|
|
22
|
+
*/
|
|
23
|
+
export type TVTranslationData = {
|
|
24
|
+
/** The translated name of the TV series. */
|
|
25
|
+
name?: string;
|
|
26
|
+
/** The translated overview or synopsis of the TV series. */
|
|
27
|
+
overview?: string;
|
|
28
|
+
/** The translated homepage URL for the TV series. */
|
|
29
|
+
homepage?: string;
|
|
30
|
+
/** The translated tagline of the TV series. */
|
|
31
|
+
tagline?: string;
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=translations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/types/tv/translations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC5B,8CAA8C;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,6DAA6D;IAC7D,YAAY,EAAE,iBAAiB,EAAE,CAAC;CAClC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG;IAC7C,wDAAwD;IACxD,IAAI,EAAE,iBAAiB,CAAC;CACxB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC/B,4CAA4C;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -6,14 +6,15 @@ import { TVEpisodeItem } from "./episodes";
|
|
|
6
6
|
import { TVExternalIDs } from "./external_ids";
|
|
7
7
|
import { TVImages } from "./images";
|
|
8
8
|
import { TVKeywords } from "./keywords";
|
|
9
|
-
import { TVRecommendations } from "./
|
|
9
|
+
import { TVRecommendations } from "./recommendations";
|
|
10
10
|
import { TVSeasonItem } from "./seasons";
|
|
11
11
|
import { TVSimilar } from "./similar";
|
|
12
|
+
import { TVTranslations } from "./translations";
|
|
12
13
|
import { TVVideos } from "./videos";
|
|
13
14
|
/**
|
|
14
15
|
* Represent the detailed information about a TV show.
|
|
15
16
|
*/
|
|
16
|
-
export type
|
|
17
|
+
export type TVSeriesDetails = {
|
|
17
18
|
/** The path to the backdrop image, or null if not available */
|
|
18
19
|
backdrop_path: string | null;
|
|
19
20
|
/** Array of creators who developed the TV show */
|
|
@@ -90,14 +91,14 @@ export type TVAppendableMap = {
|
|
|
90
91
|
keywords: TVKeywords;
|
|
91
92
|
recommendations: TVRecommendations;
|
|
92
93
|
similar: TVSimilar;
|
|
93
|
-
translations:
|
|
94
|
+
translations: TVTranslations;
|
|
94
95
|
videos: TVVideos;
|
|
95
96
|
};
|
|
96
97
|
/**
|
|
97
98
|
* TV show details with additional appended data based on the requested namespaces.
|
|
98
99
|
* @template T - Array of append-to-response namespace keys to include
|
|
99
100
|
*/
|
|
100
|
-
export type TVDetailsWithAppends<T extends readonly TVAppendToResponseNamespace[]> =
|
|
101
|
+
export type TVDetailsWithAppends<T extends readonly TVAppendToResponseNamespace[]> = TVSeriesDetails & {
|
|
101
102
|
[K in T[number]]: TVAppendableMap[K];
|
|
102
103
|
};
|
|
103
104
|
//# sourceMappingURL=tv_series.d.ts.map
|
|
@@ -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,aAAa,CAAC;AAC1C,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,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC;;GAEG;AACH,MAAM,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,aAAa,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EA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BAAiB,CAAC;IACnC,OAAO,EAAE,SAAS,CAAC;IACnB,YAAY,EAAE,cAAc,CAAC;IAC7B,MAAM,EAAE,QAAQ,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,SAAS,2BAA2B,EAAE,IAAI,eAAe,GAAG;KACrG,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC;CACpC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lorenzopant/tmdb",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "A completely type-safe The Movie Database (TMDB) API wrapper for typescript applications.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/lorenzopant/tmdb"
|
|
10
10
|
},
|
|
11
|
-
"homepage": "https://lorenzopant-docs.vercel.app
|
|
11
|
+
"homepage": "https://lorenzopant-tmdb-docs.vercel.app",
|
|
12
12
|
"bugs": {
|
|
13
13
|
"url": "https://github.com/lorenzopant/tmdb/issues"
|
|
14
14
|
},
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"api",
|
|
21
21
|
"movies"
|
|
22
22
|
],
|
|
23
|
-
"packageManager": "pnpm@8.8.0",
|
|
24
23
|
"devDependencies": {
|
|
25
24
|
"@eslint/compat": "^2.0.0",
|
|
26
25
|
"@eslint/eslintrc": "^3.3.1",
|
|
@@ -56,7 +55,8 @@
|
|
|
56
55
|
},
|
|
57
56
|
"scripts": {
|
|
58
57
|
"build": "tsc",
|
|
59
|
-
"
|
|
58
|
+
"dev": "tsc --watch",
|
|
59
|
+
"typecheck": "tsc --noEmit",
|
|
60
60
|
"test": "vitest",
|
|
61
61
|
"test:ui": "vitest --ui",
|
|
62
62
|
"test:coverage": "vitest --coverage",
|
|
@@ -64,10 +64,6 @@
|
|
|
64
64
|
"release": "pnpm release:patch",
|
|
65
65
|
"release:patch": "pnpm version patch --git-tag-version && git push --follow-tags",
|
|
66
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
|
-
"generate-indexes": "tsx src/scripts/generate-index-files.ts",
|
|
69
|
-
"generate-exports": "tsx src/scripts/generate-explicit-exports.ts",
|
|
70
|
-
"prebuild": "npm run generate-indexes",
|
|
71
|
-
"check-exports": "tsx src/scripts/check-exports.ts"
|
|
67
|
+
"release:major": "pnpm version major --git-tag-version && git push --follow-tags"
|
|
72
68
|
}
|
|
73
69
|
}
|
package/.husky/pre-commit
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
pnpm run lint
|
|
2
|
-
RESULT=$?
|
|
3
|
-
if [ $RESULT -ne 0 ]; then
|
|
4
|
-
echo "\n❌ Lint errors found. Commit aborted."
|
|
5
|
-
exit 1
|
|
6
|
-
fi
|
|
7
|
-
|
|
8
|
-
pnpm run build
|
|
9
|
-
RESULT=$?
|
|
10
|
-
if [ $RESULT -ne 0 ]; then
|
|
11
|
-
echo "\n❌ Build failed. Commit aborted."
|
|
12
|
-
exit 1
|
|
13
|
-
fi
|
|
14
|
-
|
|
15
|
-
pnpm test
|
package/.prettierrc
DELETED
package/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
|
2
|
-
|
|
3
|
-
## Our Pledge
|
|
4
|
-
|
|
5
|
-
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
-
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
-
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
-
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity
|
|
10
|
-
and orientation.
|
|
11
|
-
|
|
12
|
-
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
-
diverse, inclusive, and healthy community.
|
|
14
|
-
|
|
15
|
-
## Our Standards
|
|
16
|
-
|
|
17
|
-
Examples of behavior that contributes to a positive environment for our
|
|
18
|
-
community include:
|
|
19
|
-
|
|
20
|
-
* Demonstrating empathy and kindness toward other people
|
|
21
|
-
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
-
* Giving and gracefully accepting constructive feedback
|
|
23
|
-
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
-
and learning from the experience
|
|
25
|
-
* Focusing on what is best not just for us as individuals, but for the
|
|
26
|
-
overall community
|
|
27
|
-
|
|
28
|
-
Examples of unacceptable behavior include:
|
|
29
|
-
|
|
30
|
-
* The use of sexualized language or imagery, and sexual attention or
|
|
31
|
-
advances of any kind
|
|
32
|
-
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
-
* Public or private harassment
|
|
34
|
-
* Publishing others' private information, such as a physical or email
|
|
35
|
-
address, without their explicit permission
|
|
36
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
-
professional setting
|
|
38
|
-
|
|
39
|
-
## Enforcement Responsibilities
|
|
40
|
-
|
|
41
|
-
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
-
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
-
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
-
or harmful.
|
|
45
|
-
|
|
46
|
-
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
-
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
-
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
-
decisions when appropriate.
|
|
50
|
-
|
|
51
|
-
## Scope
|
|
52
|
-
|
|
53
|
-
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
-
an individual is officially representing the community in public spaces.
|
|
55
|
-
Examples of representing our community include using an official e-mail address,
|
|
56
|
-
posting via an official social media account, or acting as an appointed
|
|
57
|
-
representative at an online or offline event.
|
|
58
|
-
|
|
59
|
-
## Enforcement
|
|
60
|
-
|
|
61
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
-
reported to the community leaders responsible for enforcement at
|
|
63
|
-
l.pantano97@gmail.com.
|
|
64
|
-
All complaints will be reviewed and investigated promptly and fairly.
|
|
65
|
-
|
|
66
|
-
All community leaders are obligated to respect the privacy and security of the
|
|
67
|
-
reporter of any incident.
|
|
68
|
-
|
|
69
|
-
## Enforcement Guidelines
|
|
70
|
-
|
|
71
|
-
Community leaders will follow these Community Impact Guidelines in determining
|
|
72
|
-
the consequences for any action they deem in violation of this Code of Conduct:
|
|
73
|
-
|
|
74
|
-
### 1. Correction
|
|
75
|
-
|
|
76
|
-
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
77
|
-
unprofessional or unwelcome in the community.
|
|
78
|
-
|
|
79
|
-
**Consequence**: A private, written warning from community leaders, providing
|
|
80
|
-
clarity around the nature of the violation and an explanation of why the
|
|
81
|
-
behavior was inappropriate. A public apology may be requested.
|
|
82
|
-
|
|
83
|
-
### 2. Warning
|
|
84
|
-
|
|
85
|
-
**Community Impact**: A violation through a single incident or series
|
|
86
|
-
of actions.
|
|
87
|
-
|
|
88
|
-
**Consequence**: A warning with consequences for continued behavior. No
|
|
89
|
-
interaction with the people involved, including unsolicited interaction with
|
|
90
|
-
those enforcing the Code of Conduct, for a specified period of time. This
|
|
91
|
-
includes avoiding interactions in community spaces as well as external channels
|
|
92
|
-
like social media. Violating these terms may lead to a temporary or
|
|
93
|
-
permanent ban.
|
|
94
|
-
|
|
95
|
-
### 3. Temporary Ban
|
|
96
|
-
|
|
97
|
-
**Community Impact**: A serious violation of community standards, including
|
|
98
|
-
sustained inappropriate behavior.
|
|
99
|
-
|
|
100
|
-
**Consequence**: A temporary ban from any sort of interaction or public
|
|
101
|
-
communication with the community for a specified period of time. No public or
|
|
102
|
-
private interaction with the people involved, including unsolicited interaction
|
|
103
|
-
with those enforcing the Code of Conduct, is allowed during this period.
|
|
104
|
-
Violating these terms may lead to a permanent ban.
|
|
105
|
-
|
|
106
|
-
### 4. Permanent Ban
|
|
107
|
-
|
|
108
|
-
**Community Impact**: Demonstrating a pattern of violation of community
|
|
109
|
-
standards, including sustained inappropriate behavior, harassment of an
|
|
110
|
-
individual, or aggression toward or disparagement of classes of individuals.
|
|
111
|
-
|
|
112
|
-
**Consequence**: A permanent ban from any sort of public interaction within
|
|
113
|
-
the community.
|
|
114
|
-
|
|
115
|
-
## Attribution
|
|
116
|
-
|
|
117
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
118
|
-
version 2.0, available at
|
|
119
|
-
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
|
120
|
-
|
|
121
|
-
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
|
122
|
-
enforcement ladder](https://github.com/mozilla/diversity).
|
|
123
|
-
|
|
124
|
-
[homepage]: https://www.contributor-covenant.org
|
|
125
|
-
|
|
126
|
-
For answers to common questions about this code of conduct, see the FAQ at
|
|
127
|
-
https://www.contributor-covenant.org/faq. Translations are available at
|
|
128
|
-
https://www.contributor-covenant.org/translations.
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# Contributing to tmdb-api-ts
|
|
2
|
-
|
|
3
|
-
Thank you for considering contributing to **tmdb-api-ts**! Whether it's bug reports, feature requests, documentation improvements, or code contributions — all help is appreciated 🙌
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 🧰 Getting Started
|
|
8
|
-
|
|
9
|
-
1. Fork the repository and clone it locally.
|
|
10
|
-
2. Install dependencies:
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
pnpm install
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
3. Run the development server and test suite:
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
pnpm dev
|
|
20
|
-
pnpm test
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## 🧪 Running Tests
|
|
26
|
-
|
|
27
|
-
We use [Vitest](https://vitest.dev/) for testing.
|
|
28
|
-
|
|
29
|
-
To run tests:
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
pnpm test
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
To generate a coverage report:
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
pnpm test --coverage
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
## ✍️ Code Style
|
|
44
|
-
|
|
45
|
-
- Use **TypeScript**
|
|
46
|
-
- Use **named exports** where possible
|
|
47
|
-
- Follow the established file structure (`src/`, `types/`, `tests/`, etc.)
|
|
48
|
-
- Use `pnpm lint` and `pnpm format` before submitting a PR
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
## 🧩 Submitting a Pull Request
|
|
53
|
-
|
|
54
|
-
1. Create a new branch from `main`
|
|
55
|
-
2. Follow the PR template if available
|
|
56
|
-
3. Provide a clear description of what you changed and why
|
|
57
|
-
4. Include related issue numbers if applicable
|
|
58
|
-
5. Ensure all tests pass and types are correct
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
## 🗃 Feature Requests & Bugs
|
|
63
|
-
|
|
64
|
-
- Open an issue describing the problem or idea
|
|
65
|
-
- Provide examples if possible (stack traces, API request/response, etc.)
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## 🙌 Thank You
|
|
70
|
-
|
|
71
|
-
You're helping improve the developer experience for people building with the TMDB API in TypeScript. Thank you for your contributions!
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"check-exports.d.ts","sourceRoot":"","sources":["../../src/scripts/check-exports.ts"],"names":[],"mappings":""}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
// scripts/check-exports.ts
|
|
2
|
-
import * as fs from "fs";
|
|
3
|
-
import * as path from "path";
|
|
4
|
-
import { Project } from "ts-morph";
|
|
5
|
-
function findAllExportedTypes(dir) {
|
|
6
|
-
const types = new Set();
|
|
7
|
-
const files = fs.readdirSync(dir);
|
|
8
|
-
files.forEach((file) => {
|
|
9
|
-
const filePath = path.join(dir, file);
|
|
10
|
-
const stat = fs.statSync(filePath);
|
|
11
|
-
if (stat.isDirectory()) {
|
|
12
|
-
const subTypes = findAllExportedTypes(filePath);
|
|
13
|
-
subTypes.forEach((t) => types.add(t));
|
|
14
|
-
}
|
|
15
|
-
else if (file.endsWith(".ts") && file !== "index.ts") {
|
|
16
|
-
// Estrai i nomi dei tipi esportati
|
|
17
|
-
const content = fs.readFileSync(filePath, "utf-8");
|
|
18
|
-
const exportMatches = content.matchAll(/export (?:type|interface) (\w+)/g);
|
|
19
|
-
for (const match of exportMatches) {
|
|
20
|
-
types.add(match[1]);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
return types;
|
|
25
|
-
}
|
|
26
|
-
function checkIndexExports(dir) {
|
|
27
|
-
const indexPath = path.join(dir, "index.ts");
|
|
28
|
-
if (!fs.existsSync(indexPath)) {
|
|
29
|
-
return [`Missing index.ts in ${dir}`];
|
|
30
|
-
}
|
|
31
|
-
const content = fs.readFileSync(indexPath, "utf-8");
|
|
32
|
-
const subdirs = fs.readdirSync(dir).filter((f) => fs.statSync(path.join(dir, f)).isDirectory());
|
|
33
|
-
const files = fs
|
|
34
|
-
.readdirSync(dir)
|
|
35
|
-
.filter((f) => f.endsWith(".ts") && f !== "index.ts")
|
|
36
|
-
.map((f) => f.replace(".ts", ""));
|
|
37
|
-
const missing = [];
|
|
38
|
-
// Controlla se tutti i file sono esportati
|
|
39
|
-
files.forEach((file) => {
|
|
40
|
-
if (!content.includes(`from './${file}'`) && !content.includes(`from "./${file}"`)) {
|
|
41
|
-
missing.push(`${dir}/index.ts missing: export * from './${file}'`);
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
// Controlla se tutte le subdirectory sono esportate
|
|
45
|
-
subdirs.forEach((subdir) => {
|
|
46
|
-
if (!content.includes(`from './${subdir}'`)) {
|
|
47
|
-
missing.push(`${dir}/index.ts missing: export * from './${subdir}'`);
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
// Ricorsivamente controlla subdirectories
|
|
51
|
-
subdirs.forEach((subdir) => {
|
|
52
|
-
const subMissing = checkIndexExports(path.join(dir, subdir));
|
|
53
|
-
missing.push(...subMissing);
|
|
54
|
-
});
|
|
55
|
-
return missing;
|
|
56
|
-
}
|
|
57
|
-
// Run checks
|
|
58
|
-
const allDefinedTypes = findAllExportedTypes("src/types");
|
|
59
|
-
const missingExports = checkIndexExports("src/types");
|
|
60
|
-
console.log("=== All defined types ===");
|
|
61
|
-
console.log(Array.from(allDefinedTypes).sort());
|
|
62
|
-
console.log("\n=== Missing exports ===");
|
|
63
|
-
if (missingExports.length === 0) {
|
|
64
|
-
console.log("✅ All exports are correct!");
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
missingExports.forEach((m) => console.log("❌", m));
|
|
68
|
-
}
|
|
69
|
-
// Controlla cosa viene effettivamente esportato dal package
|
|
70
|
-
const project = new Project({ tsConfigFilePath: "tsconfig.json" });
|
|
71
|
-
const sourceFile = project.getSourceFileOrThrow("src/index.ts");
|
|
72
|
-
const exported = sourceFile.getExportedDeclarations();
|
|
73
|
-
console.log("\n=== Actually exported from package ===");
|
|
74
|
-
const exportedTypeNames = new Set();
|
|
75
|
-
exported.forEach((_decl, name) => {
|
|
76
|
-
exportedTypeNames.add(name);
|
|
77
|
-
});
|
|
78
|
-
console.log(Array.from(exportedTypeNames).sort());
|
|
79
|
-
// Trova differenze
|
|
80
|
-
console.log("\n=== Types defined but NOT exported ===");
|
|
81
|
-
const notExported = Array.from(allDefinedTypes).filter((t) => !exportedTypeNames.has(t));
|
|
82
|
-
if (notExported.length === 0) {
|
|
83
|
-
console.log("✅ All types are exported!");
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
notExported.forEach((t) => console.log("❌", t));
|
|
87
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-missing.d.ts","sourceRoot":"","sources":["../../src/scripts/find-missing.ts"],"names":[],"mappings":""}
|