tmdb-ts 1.7.1 → 2.0.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.
Files changed (61) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/api.js +3 -2
  3. package/dist/api.js.map +1 -1
  4. package/dist/common/constants.d.ts +1 -0
  5. package/dist/common/constants.js +5 -0
  6. package/dist/common/constants.js.map +1 -0
  7. package/dist/endpoints/changes.js +1 -1
  8. package/dist/endpoints/changes.js.map +1 -1
  9. package/dist/endpoints/collections.d.ts +2 -2
  10. package/dist/endpoints/configuration.d.ts +7 -2
  11. package/dist/endpoints/configuration.js +16 -1
  12. package/dist/endpoints/configuration.js.map +1 -1
  13. package/dist/endpoints/discover.d.ts +1 -55
  14. package/dist/endpoints/discover.js.map +1 -1
  15. package/dist/endpoints/find.d.ts +1 -1
  16. package/dist/endpoints/find.js +2 -2
  17. package/dist/endpoints/find.js.map +1 -1
  18. package/dist/endpoints/index.d.ts +1 -0
  19. package/dist/endpoints/index.js +1 -0
  20. package/dist/endpoints/index.js.map +1 -1
  21. package/dist/endpoints/keywords.d.ts +4 -0
  22. package/dist/endpoints/keywords.js +4 -0
  23. package/dist/endpoints/keywords.js.map +1 -1
  24. package/dist/endpoints/people.d.ts +5 -2
  25. package/dist/endpoints/people.js +3 -0
  26. package/dist/endpoints/people.js.map +1 -1
  27. package/dist/endpoints/watch-providers.d.ts +11 -0
  28. package/dist/endpoints/watch-providers.js +22 -0
  29. package/dist/endpoints/watch-providers.js.map +1 -0
  30. package/dist/tmdb.d.ts +2 -1
  31. package/dist/tmdb.js +3 -0
  32. package/dist/tmdb.js.map +1 -1
  33. package/dist/types/account.d.ts +2 -1
  34. package/dist/types/certification.d.ts +47 -5
  35. package/dist/types/changes.d.ts +1 -1
  36. package/dist/types/collections.d.ts +3 -6
  37. package/dist/types/companies.d.ts +1 -1
  38. package/dist/types/configuration.d.ts +132 -88
  39. package/dist/types/configuration.js +111 -0
  40. package/dist/types/configuration.js.map +1 -1
  41. package/dist/types/credits.d.ts +6 -4
  42. package/dist/types/discover.d.ts +56 -1
  43. package/dist/types/index.d.ts +16 -5
  44. package/dist/types/index.js +66 -0
  45. package/dist/types/index.js.map +1 -1
  46. package/dist/types/movies.d.ts +4 -3
  47. package/dist/types/movies.js +1 -1
  48. package/dist/types/movies.js.map +1 -1
  49. package/dist/types/options.d.ts +9 -4
  50. package/dist/types/options.js +140 -0
  51. package/dist/types/options.js.map +1 -1
  52. package/dist/types/people.d.ts +3 -3
  53. package/dist/types/regions.d.ts +6 -0
  54. package/dist/types/regions.js +3 -0
  55. package/dist/types/regions.js.map +1 -0
  56. package/dist/types/tv-episode.d.ts +2 -2
  57. package/dist/types/watch-providers.d.ts +17 -0
  58. package/dist/utils/getImagePath.js.map +1 -1
  59. package/dist/utils/parseOptions.js +1 -1
  60. package/dist/utils/parseOptions.js.map +1 -1
  61. package/package.json +18 -23
@@ -1,3 +1,4 @@
1
+ import { CountryCode } from '../types';
1
2
  export interface ImageConfiguration {
2
3
  base_url: string;
3
4
  secure_base_url: string;
@@ -11,95 +12,138 @@ export interface Configuration {
11
12
  images: ImageConfiguration;
12
13
  change_keys: ChangeKeys[];
13
14
  }
14
- export declare const enum BackdropSizes {
15
- W300 = "w300",
16
- W500 = "w500",
17
- W780 = "w780",
18
- W1280 = "w1280",
19
- ORIGINAL = "original"
15
+ export interface CountryConfiguration {
16
+ iso_3166_1: CountryCode;
17
+ english_name: string;
18
+ native_name: string;
20
19
  }
21
- export declare const enum LogoSizes {
22
- W45 = "w45",
23
- W92 = "w92",
24
- W154 = "w154",
25
- W185 = "w185",
26
- W300 = "w300",
27
- W500 = "w500",
28
- ORIGINAL = "original"
20
+ export interface LanguageConfiguration {
21
+ iso_639_1: string;
22
+ english_name: string;
23
+ name: string;
29
24
  }
30
- export declare const enum PosterSizes {
31
- W92 = "w92",
32
- W154 = "w154",
33
- W185 = "w185",
34
- W300 = "w300",
35
- W500 = "w500",
36
- W780 = "w780",
37
- ORIGINAL = "original"
25
+ export interface JobConfiguration {
26
+ department: string;
27
+ jobs: string[];
38
28
  }
39
- export declare const enum ProfileSizes {
40
- W45 = "w45",
41
- W185 = "w185",
42
- W632 = "w632",
43
- ORIGINAL = "original"
44
- }
45
- export declare const enum StillSizes {
46
- W92 = "w92",
47
- W185 = "w185",
48
- W300 = "w300",
49
- ORIGINAL = "original"
50
- }
51
- export declare const enum ChangeKeys {
52
- ADULT = "adult",
53
- AIR_DATE = "air_date",
54
- ALSO_KNOWN_AS = "also_known_as",
55
- ALTERNATIVE_TITLES = "alternative_titles",
56
- BIOGRAPHY = "biography",
57
- BIRTHDAY = "birthday",
58
- BUDGET = "budget",
59
- CAST = "cast",
60
- CERTIFICATIONS = "certifications",
61
- CHARACTER_NAMES = "character_names",
62
- CREATED_BY = "created_by",
63
- CREW = "crew",
64
- DEATHDAY = "deathday",
65
- EPISODE = "episode",
66
- EPISODE_NUMBER = "episode_number",
67
- EPISODE_RUN_TIME = "episode_run_time",
68
- FREEBASE_ID = "freebase_id",
69
- FREEBASE_MID = "freebase_mid",
70
- GENERAL = "general",
71
- GENRES = "genres",
72
- GUEST_STARS = "guest_stars",
73
- HOMEPAGE = "homepage",
74
- IMAGES = "images",
75
- IMDB_ID = "imdb_id",
76
- LANGUAGES = "languages",
77
- NAME = "name",
78
- NETWORK = "network",
79
- ORIGIN_COUNTRY = "origin_country",
80
- ORIGINAL_NAME = "original_name",
81
- ORIGINAL_TITLE = "original_title",
82
- OVERVIEW = "overview",
83
- PARTS = "parts",
84
- PLACE_OF_BIRTH = "place_of_birth",
85
- PLOT_KEYWORDS = "plot_keywords",
86
- PRODUCTION_CODE = "production_code",
87
- PRODUCTION_COMPANIES = "production_companies",
88
- PRODUCTION_COUNTRIES = "production_countries",
89
- RELEASES = "releases",
90
- REVENUE = "revenue",
91
- RUNTIME = "runtime",
92
- SEASON = "season",
93
- SEASON_NUMBER = "season_number",
94
- SEASON_REGULAR = "season_regular",
95
- SPOKEN_LANGUAGES = "spoken_languages",
96
- STATUS = "status",
97
- TAGLINE = "tagline",
98
- TITLE = "title",
99
- TRANSLATIONS = "translations",
100
- TVDB_ID = "tvdb_id",
101
- TVRAGE_ID = "tvrage_id",
102
- TYPE = "type",
103
- VIDEO = "video",
104
- VIDEOS = "videos"
29
+ export interface TimezoneConfiguration {
30
+ iso_3166_1: CountryCode;
31
+ zones: string[];
105
32
  }
33
+ export declare const MediaSize: {
34
+ readonly W45: "w45";
35
+ readonly W92: "w92";
36
+ readonly W154: "w154";
37
+ readonly W185: "w185";
38
+ readonly W300: "w300";
39
+ readonly W342: "w342";
40
+ readonly W500: "w500";
41
+ readonly W632: "w632";
42
+ readonly W780: "w780";
43
+ readonly W1280: "w1280";
44
+ readonly ORIGINAL: "original";
45
+ };
46
+ export declare const BackdropSize: {
47
+ readonly W45: "w45";
48
+ readonly W92: "w92";
49
+ readonly W154: "w154";
50
+ readonly W185: "w185";
51
+ readonly W300: "w300";
52
+ readonly W500: "w500";
53
+ readonly W780: "w780";
54
+ readonly W1280: "w1280";
55
+ readonly ORIGINAL: "original";
56
+ };
57
+ type BackdropSizes = (typeof BackdropSize)[keyof typeof BackdropSize];
58
+ export declare const LogoSize: {
59
+ readonly W45: "w45";
60
+ readonly W92: "w92";
61
+ readonly W154: "w154";
62
+ readonly W185: "w185";
63
+ readonly W300: "w300";
64
+ readonly W500: "w500";
65
+ readonly ORIGINAL: "original";
66
+ };
67
+ type LogoSizes = (typeof LogoSize)[keyof typeof LogoSize];
68
+ export declare const PosterSize: {
69
+ readonly W92: "w92";
70
+ readonly W154: "w154";
71
+ readonly W185: "w185";
72
+ readonly W300: "w300";
73
+ readonly W342: "w342";
74
+ readonly W500: "w500";
75
+ readonly W780: "w780";
76
+ readonly ORIGINAL: "original";
77
+ };
78
+ type PosterSizes = (typeof PosterSize)[keyof typeof PosterSize];
79
+ export declare const ProfileSize: {
80
+ readonly W45: "w45";
81
+ readonly W185: "w185";
82
+ readonly W632: "w632";
83
+ readonly ORIGINAL: "original";
84
+ };
85
+ type ProfileSizes = (typeof ProfileSize)[keyof typeof ProfileSize];
86
+ export declare const StillSize: {
87
+ readonly W92: "w92";
88
+ readonly W185: "w185";
89
+ readonly W300: "w300";
90
+ readonly ORIGINAL: "original";
91
+ };
92
+ type StillSizes = (typeof StillSize)[keyof typeof StillSize];
93
+ export declare const ChangeKey: {
94
+ readonly ADULT: "adult";
95
+ readonly AIR_DATE: "air_date";
96
+ readonly ALSO_KNOWN_AS: "also_known_as";
97
+ readonly ALTERNATIVE_TITLES: "alternative_titles";
98
+ readonly BIOGRAPHY: "biography";
99
+ readonly BIRTHDAY: "birthday";
100
+ readonly BUDGET: "budget";
101
+ readonly CAST: "cast";
102
+ readonly CERTIFICATIONS: "certifications";
103
+ readonly CHARACTER_NAMES: "character_names";
104
+ readonly CREATED_BY: "created_by";
105
+ readonly CREW: "crew";
106
+ readonly DEATHDAY: "deathday";
107
+ readonly EPISODE: "episode";
108
+ readonly EPISODE_NUMBER: "episode_number";
109
+ readonly EPISODE_RUN_TIME: "episode_run_time";
110
+ readonly FREEBASE_ID: "freebase_id";
111
+ readonly FREEBASE_MID: "freebase_mid";
112
+ readonly GENERAL: "general";
113
+ readonly GENRES: "genres";
114
+ readonly GUEST_STARS: "guest_stars";
115
+ readonly HOMEPAGE: "homepage";
116
+ readonly IMAGES: "images";
117
+ readonly IMDB_ID: "imdb_id";
118
+ readonly LANGUAGES: "languages";
119
+ readonly NAME: "name";
120
+ readonly NETWORK: "network";
121
+ readonly ORIGIN_COUNTRY: "origin_country";
122
+ readonly ORIGINAL_NAME: "original_name";
123
+ readonly ORIGINAL_TITLE: "original_title";
124
+ readonly OVERVIEW: "overview";
125
+ readonly PARTS: "parts";
126
+ readonly PLACE_OF_BIRTH: "place_of_birth";
127
+ readonly PLOT_KEYWORDS: "plot_keywords";
128
+ readonly PRODUCTION_CODE: "production_code";
129
+ readonly PRODUCTION_COMPANIES: "production_companies";
130
+ readonly PRODUCTION_COUNTRIES: "production_countries";
131
+ readonly RELEASES: "releases";
132
+ readonly REVENUE: "revenue";
133
+ readonly RUNTIME: "runtime";
134
+ readonly SEASON: "season";
135
+ readonly SEASON_NUMBER: "season_number";
136
+ readonly SEASON_REGULAR: "season_regular";
137
+ readonly SPOKEN_LANGUAGES: "spoken_languages";
138
+ readonly STATUS: "status";
139
+ readonly TAGLINE: "tagline";
140
+ readonly TITLE: "title";
141
+ readonly TRANSLATIONS: "translations";
142
+ readonly TVDB_ID: "tvdb_id";
143
+ readonly TVRAGE_ID: "tvrage_id";
144
+ readonly TYPE: "type";
145
+ readonly VIDEO: "video";
146
+ readonly VIDEOS: "videos";
147
+ };
148
+ type ChangeKeys = (typeof ChangeKey)[keyof typeof ChangeKey];
149
+ export {};
@@ -1,3 +1,114 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChangeKey = exports.StillSize = exports.ProfileSize = exports.PosterSize = exports.LogoSize = exports.BackdropSize = exports.MediaSize = void 0;
4
+ exports.MediaSize = {
5
+ W45: 'w45',
6
+ W92: 'w92',
7
+ W154: 'w154',
8
+ W185: 'w185',
9
+ W300: 'w300',
10
+ W342: 'w342',
11
+ W500: 'w500',
12
+ W632: 'w632',
13
+ W780: 'w780',
14
+ W1280: 'w1280',
15
+ ORIGINAL: 'original',
16
+ };
17
+ exports.BackdropSize = {
18
+ W45: 'w45',
19
+ W92: 'w92',
20
+ W154: 'w154',
21
+ W185: 'w185',
22
+ W300: 'w300',
23
+ W500: 'w500',
24
+ W780: 'w780',
25
+ W1280: 'w1280',
26
+ ORIGINAL: 'original',
27
+ };
28
+ exports.LogoSize = {
29
+ W45: 'w45',
30
+ W92: 'w92',
31
+ W154: 'w154',
32
+ W185: 'w185',
33
+ W300: 'w300',
34
+ W500: 'w500',
35
+ ORIGINAL: 'original',
36
+ };
37
+ exports.PosterSize = {
38
+ W92: 'w92',
39
+ W154: 'w154',
40
+ W185: 'w185',
41
+ W300: 'w300',
42
+ W342: 'w342',
43
+ W500: 'w500',
44
+ W780: 'w780',
45
+ ORIGINAL: 'original',
46
+ };
47
+ exports.ProfileSize = {
48
+ W45: 'w45',
49
+ W185: 'w185',
50
+ W632: 'w632',
51
+ ORIGINAL: 'original',
52
+ };
53
+ exports.StillSize = {
54
+ W92: 'w92',
55
+ W185: 'w185',
56
+ W300: 'w300',
57
+ ORIGINAL: 'original',
58
+ };
59
+ exports.ChangeKey = {
60
+ ADULT: 'adult',
61
+ AIR_DATE: 'air_date',
62
+ ALSO_KNOWN_AS: 'also_known_as',
63
+ ALTERNATIVE_TITLES: 'alternative_titles',
64
+ BIOGRAPHY: 'biography',
65
+ BIRTHDAY: 'birthday',
66
+ BUDGET: 'budget',
67
+ CAST: 'cast',
68
+ CERTIFICATIONS: 'certifications',
69
+ CHARACTER_NAMES: 'character_names',
70
+ CREATED_BY: 'created_by',
71
+ CREW: 'crew',
72
+ DEATHDAY: 'deathday',
73
+ EPISODE: 'episode',
74
+ EPISODE_NUMBER: 'episode_number',
75
+ EPISODE_RUN_TIME: 'episode_run_time',
76
+ FREEBASE_ID: 'freebase_id',
77
+ FREEBASE_MID: 'freebase_mid',
78
+ GENERAL: 'general',
79
+ GENRES: 'genres',
80
+ GUEST_STARS: 'guest_stars',
81
+ HOMEPAGE: 'homepage',
82
+ IMAGES: 'images',
83
+ IMDB_ID: 'imdb_id',
84
+ LANGUAGES: 'languages',
85
+ NAME: 'name',
86
+ NETWORK: 'network',
87
+ ORIGIN_COUNTRY: 'origin_country',
88
+ ORIGINAL_NAME: 'original_name',
89
+ ORIGINAL_TITLE: 'original_title',
90
+ OVERVIEW: 'overview',
91
+ PARTS: 'parts',
92
+ PLACE_OF_BIRTH: 'place_of_birth',
93
+ PLOT_KEYWORDS: 'plot_keywords',
94
+ PRODUCTION_CODE: 'production_code',
95
+ PRODUCTION_COMPANIES: 'production_companies',
96
+ PRODUCTION_COUNTRIES: 'production_countries',
97
+ RELEASES: 'releases',
98
+ REVENUE: 'revenue',
99
+ RUNTIME: 'runtime',
100
+ SEASON: 'season',
101
+ SEASON_NUMBER: 'season_number',
102
+ SEASON_REGULAR: 'season_regular',
103
+ SPOKEN_LANGUAGES: 'spoken_languages',
104
+ STATUS: 'status',
105
+ TAGLINE: 'tagline',
106
+ TITLE: 'title',
107
+ TRANSLATIONS: 'translations',
108
+ TVDB_ID: 'tvdb_id',
109
+ TVRAGE_ID: 'tvrage_id',
110
+ TYPE: 'type',
111
+ VIDEO: 'video',
112
+ VIDEOS: 'videos',
113
+ };
3
114
  //# sourceMappingURL=configuration.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../src/types/configuration.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../src/types/configuration.ts"],"names":[],"mappings":";;;AAuCa,QAAA,SAAS,GAAG;IACvB,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;CACZ,CAAC;AAEE,QAAA,YAAY,GAAG;IAC1B,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;CACZ,CAAC;AAIE,QAAA,QAAQ,GAAG;IACtB,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,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,SAAS;IAClB,cAAc,EAAE,gBAAgB;IAChC,aAAa,EAAE,eAAe;IAC9B,cAAc,EAAE,gBAAgB;IAChC,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;IACd,cAAc,EAAE,gBAAgB;IAChC,aAAa,EAAE,eAAe;IAC9B,eAAe,EAAE,iBAAiB;IAClC,oBAAoB,EAAE,sBAAsB;IAC5C,oBAAoB,EAAE,sBAAsB;IAC5C,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,aAAa,EAAE,eAAe;IAC9B,cAAc,EAAE,gBAAgB;IAChC,gBAAgB,EAAE,kBAAkB;IACpC,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,YAAY,EAAE,cAAc;IAC5B,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;CACR,CAAC"}
@@ -1,11 +1,11 @@
1
- import { Image, Person } from './';
1
+ import { CountryCode, Image, Person } from './';
2
2
  export interface CreditSeason {
3
3
  air_date?: string;
4
4
  poster_path?: string;
5
5
  season_number?: number;
6
6
  }
7
7
  export interface Media {
8
- i?: number;
8
+ id?: number;
9
9
  name?: string;
10
10
  first_air_date?: string;
11
11
  vote_count?: number;
@@ -13,6 +13,8 @@ export interface Media {
13
13
  vote_average?: number;
14
14
  backdrop_path?: string;
15
15
  genre_ids?: number[];
16
+ media_type: string;
17
+ adult: boolean;
16
18
  original_name?: string;
17
19
  origin_country?: string[];
18
20
  poster_path?: string;
@@ -32,7 +34,7 @@ export interface CreditResponse {
32
34
  person?: Person;
33
35
  }
34
36
  export interface Title {
35
- iso_3166_1: string;
37
+ iso_3166_1: CountryCode;
36
38
  title: string;
37
39
  type: string;
38
40
  }
@@ -80,7 +82,7 @@ export interface ImageCollection {
80
82
  export interface Video {
81
83
  id: string;
82
84
  iso_639_1: string;
83
- iso_3166_1: string;
85
+ iso_3166_1: CountryCode;
84
86
  key: string;
85
87
  name: string;
86
88
  site: string;
@@ -1,5 +1,60 @@
1
1
  import { Movie, TV } from '.';
2
- export type SortOption = 'popularity.asc' | 'popularity.desc' | 'release_date.asc' | 'release_date.desc' | 'revenue.asc' | 'revenue.desc' | 'primary_release_date.asc' | 'primary_release_date.desc' | 'original_title.asc' | 'original_title.desc' | 'vote_average.asc' | 'vote_average.desc' | 'vote_count.asc' | 'vote_count.desc';
2
+ export type MonetizationType = 'flatrate' | 'free' | 'ads' | 'rent' | 'buy';
3
+ export interface DiscoverQueryOptions {
4
+ language?: string;
5
+ sort_by?: SortOption;
6
+ page?: number;
7
+ 'vote_average.gte'?: number;
8
+ 'vote_count.gte'?: number;
9
+ 'vote_count.lte'?: number;
10
+ 'vote_average.lte'?: number;
11
+ with_watch_providers?: string;
12
+ watch_region?: string;
13
+ without_companies?: string;
14
+ with_watch_monetization_types?: MonetizationType;
15
+ 'with_runtime.gte'?: number;
16
+ 'with_runtime.lte'?: number;
17
+ with_genres?: string;
18
+ without_genres?: string;
19
+ with_original_language?: string;
20
+ without_keywords?: string;
21
+ with_keywords?: string;
22
+ with_companies?: string;
23
+ include_adult?: boolean;
24
+ }
25
+ export interface MovieQueryOptions extends DiscoverQueryOptions {
26
+ region?: string;
27
+ certification_country?: string;
28
+ certification?: string;
29
+ 'certification.lte'?: string;
30
+ 'certification.gte'?: string;
31
+ include_adult?: boolean;
32
+ include_video?: boolean;
33
+ primary_release_year?: number;
34
+ 'primary_release_date.gte'?: string;
35
+ 'primary_release_date.lte'?: string;
36
+ 'release_date.gte'?: string;
37
+ 'release_date.lte'?: string;
38
+ with_release_type?: string;
39
+ year?: number;
40
+ with_cast?: string;
41
+ with_crew?: string;
42
+ with_people?: string;
43
+ }
44
+ export interface TvShowQueryOptions extends DiscoverQueryOptions {
45
+ 'air_date.gte'?: string;
46
+ 'air_date.lte'?: string;
47
+ 'first_air_date.gte'?: string;
48
+ 'first_air_date.lte'?: string;
49
+ first_air_date_year?: number;
50
+ timezone?: string;
51
+ with_networks?: string;
52
+ include_null_first_air_dates?: boolean;
53
+ screened_theatrically?: boolean;
54
+ with_status?: string;
55
+ with_type?: string;
56
+ }
57
+ export type SortOption = 'first_air_date.asc' | 'first_air_date.desc' | 'popularity.asc' | 'popularity.desc' | 'release_date.asc' | 'release_date.desc' | 'revenue.asc' | 'revenue.desc' | 'primary_release_date.asc' | 'primary_release_date.desc' | 'original_title.asc' | 'original_title.desc' | 'vote_average.asc' | 'vote_average.desc' | 'vote_count.asc' | 'vote_count.desc';
3
58
  export interface MovieDiscoverResult {
4
59
  page: number;
5
60
  results: Movie[];
@@ -34,6 +34,7 @@ export type KnownFor = MovieWithMediaType | TVWithMediaType;
34
34
  export interface Person {
35
35
  id: number;
36
36
  name: string;
37
+ original_name: string;
37
38
  known_for: KnownFor[];
38
39
  profile_path: string;
39
40
  adult: boolean;
@@ -71,6 +72,7 @@ export interface Company {
71
72
  }
72
73
  export interface TV {
73
74
  id: number;
75
+ adult: boolean;
74
76
  name: string;
75
77
  first_air_date: string;
76
78
  backdrop_path: string;
@@ -96,6 +98,13 @@ export interface ExternalIds {
96
98
  facebook_id: string;
97
99
  instagram_id: string;
98
100
  twitter_id: string;
101
+ tvdb_id?: number;
102
+ freebase_mid?: string;
103
+ freebase_id?: string;
104
+ tvrage_id?: number;
105
+ wikidata_id: string;
106
+ tiktok_id?: string;
107
+ youtube_id?: string;
99
108
  id: number;
100
109
  }
101
110
  export interface ProductionCompany {
@@ -105,7 +114,7 @@ export interface ProductionCompany {
105
114
  origin_country: string;
106
115
  }
107
116
  export interface ProductionCountry {
108
- iso_3166_1: string;
117
+ iso_3166_1: CountryCode;
109
118
  name: string;
110
119
  }
111
120
  export interface SpokenLanguage {
@@ -119,7 +128,7 @@ export interface ContentRatings {
119
128
  }
120
129
  export interface ContentRatingsResult {
121
130
  descriptor: unknown[];
122
- iso_3166_1: string;
131
+ iso_3166_1: CountryCode;
123
132
  rating: string;
124
133
  }
125
134
  export interface Recommendation {
@@ -148,9 +157,9 @@ export interface Review {
148
157
  author: string;
149
158
  author_details: AuthorDetails;
150
159
  content: string;
151
- created_at: Date;
160
+ created_at: string;
152
161
  id: string;
153
- updated_at: Date;
162
+ updated_at: string;
154
163
  url: string;
155
164
  }
156
165
  export interface Reviews {
@@ -166,7 +175,7 @@ export interface TranslationData {
166
175
  homepage: string;
167
176
  }
168
177
  export interface Translation {
169
- iso_3166_1: string;
178
+ iso_3166_1: CountryCode;
170
179
  iso_639_1: string;
171
180
  name: string;
172
181
  english_name: string;
@@ -191,3 +200,5 @@ export interface Images {
191
200
  logos: Image[];
192
201
  posters: Image[];
193
202
  }
203
+ export declare const CountryCodes: readonly ["AE", "AR", "AT", "AU", "BE", "BG", "BO", "BR", "CA", "CH", "CL", "CO", "CR", "CV", "CZ", "DE", "DK", "EC", "EE", "EG", "ES", "FI", "FR", "GB", "GH", "GR", "GT", "HK", "HN", "HU", "ID", "IE", "IL", "IN", "IT", "JP", "LT", "LV", "MU", "MX", "MY", "MZ", "NL", "NO", "NZ", "PE", "PH", "PL", "PT", "PY", "RU", "SA", "SE", "SG", "SI", "SK", "TH", "TR", "TW", "UG", "US", "VE", "ZA"];
204
+ export type CountryCode = (typeof CountryCodes)[number];
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.CountryCodes = void 0;
17
18
  __exportStar(require("./options"), exports);
18
19
  __exportStar(require("./certification"), exports);
19
20
  __exportStar(require("./credits"), exports);
@@ -34,4 +35,69 @@ __exportStar(require("./keywords"), exports);
34
35
  __exportStar(require("./collections"), exports);
35
36
  __exportStar(require("./tv-episode"), exports);
36
37
  __exportStar(require("./tv-seasons"), exports);
38
+ exports.CountryCodes = [
39
+ 'AE',
40
+ 'AR',
41
+ 'AT',
42
+ 'AU',
43
+ 'BE',
44
+ 'BG',
45
+ 'BO',
46
+ 'BR',
47
+ 'CA',
48
+ 'CH',
49
+ 'CL',
50
+ 'CO',
51
+ 'CR',
52
+ 'CV',
53
+ 'CZ',
54
+ 'DE',
55
+ 'DK',
56
+ 'EC',
57
+ 'EE',
58
+ 'EG',
59
+ 'ES',
60
+ 'FI',
61
+ 'FR',
62
+ 'GB',
63
+ 'GH',
64
+ 'GR',
65
+ 'GT',
66
+ 'HK',
67
+ 'HN',
68
+ 'HU',
69
+ 'ID',
70
+ 'IE',
71
+ 'IL',
72
+ 'IN',
73
+ 'IT',
74
+ 'JP',
75
+ 'LT',
76
+ 'LV',
77
+ 'MU',
78
+ 'MX',
79
+ 'MY',
80
+ 'MZ',
81
+ 'NL',
82
+ 'NO',
83
+ 'NZ',
84
+ 'PE',
85
+ 'PH',
86
+ 'PL',
87
+ 'PT',
88
+ 'PY',
89
+ 'RU',
90
+ 'SA',
91
+ 'SE',
92
+ 'SG',
93
+ 'SI',
94
+ 'SK',
95
+ 'TH',
96
+ 'TR',
97
+ 'TW',
98
+ 'UG',
99
+ 'US',
100
+ 'VE',
101
+ 'ZA',
102
+ ];
37
103
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,kDAAgC;AAChC,4CAA0B;AAC1B,8CAA4B;AAC5B,6CAA2B;AAC3B,kDAAgC;AAChC,4CAA0B;AAC1B,2CAAyB;AACzB,2CAAyB;AACzB,6CAA2B;AAC3B,oDAAkC;AAClC,2CAAyB;AACzB,6CAA2B;AAC3B,2CAAyB;AACzB,6CAA2B;AAC3B,yCAAuB;AACvB,6CAA2B;AAC3B,gDAA8B;AAC9B,+CAA6B;AAC7B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ProductionCompany, ProductionCountry, SpokenLanguage } from './';
1
+ import { CountryCode, Genre, Movie, ProductionCompany, ProductionCountry, SpokenLanguage } from './';
2
2
  export interface BelongsToCollection {
3
3
  id: number;
4
4
  name: string;
@@ -42,13 +42,14 @@ export declare enum ReleaseDateType {
42
42
  }
43
43
  export interface ReleaseDate {
44
44
  certification: string;
45
+ descriptors: string[];
45
46
  iso_639_1: string;
46
- release_date: Date;
47
+ release_date: string;
47
48
  type: ReleaseDateType;
48
49
  note: string;
49
50
  }
50
51
  export interface ReleaseDateResult {
51
- iso_3166_1: string;
52
+ iso_3166_1: CountryCode;
52
53
  release_dates: ReleaseDate[];
53
54
  }
54
55
  export interface ReleaseDates {
@@ -9,5 +9,5 @@ var ReleaseDateType;
9
9
  ReleaseDateType[ReleaseDateType["Digital"] = 4] = "Digital";
10
10
  ReleaseDateType[ReleaseDateType["Physical"] = 5] = "Physical";
11
11
  ReleaseDateType[ReleaseDateType["TV"] = 6] = "TV";
12
- })(ReleaseDateType = exports.ReleaseDateType || (exports.ReleaseDateType = {}));
12
+ })(ReleaseDateType || (exports.ReleaseDateType = ReleaseDateType = {}));
13
13
  //# sourceMappingURL=movies.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"movies.js","sourceRoot":"","sources":["../../src/types/movies.ts"],"names":[],"mappings":";;;AA2CA,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,6DAAc,CAAA;IACd,qFAAsB,CAAA;IACtB,iEAAY,CAAA;IACZ,2DAAS,CAAA;IACT,6DAAU,CAAA;IACV,iDAAI,CAAA;AACN,CAAC,EAPW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAO1B"}
1
+ {"version":3,"file":"movies.js","sourceRoot":"","sources":["../../src/types/movies.ts"],"names":[],"mappings":";;;AA4CA,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,6DAAc,CAAA;IACd,qFAAsB,CAAA;IACtB,iEAAY,CAAA;IACZ,2DAAS,CAAA;IACT,6DAAU,CAAA;IACV,iDAAI,CAAA;AACN,CAAC,EAPW,eAAe,+BAAf,eAAe,QAO1B"}
@@ -1,6 +1,11 @@
1
- import { AlternativeTitles, Changes, ContentRatings, Credits, EpisodeGroups, ExternalIds, Images, Keywords, MovieLists, PeopleImages, PersonTranslations, PersonCombinedCredits, PersonMovieCredit, PersonTvShowCredit, Recommendations, ReleaseDates, Reviews, ScreenedTheatrically, SimilarMovies, SimilarTvShows, TaggedImages, Translations, Videos, WatchProviders, PersonChangeValue, MovieChangeValue, TvShowChangeValue, TvEpisodeChangeValue, TvEpisodeCredit, TvEpisodeTranslations, TvSeasonChangeValue } from '.';
1
+ import { AlternativeTitles, Changes, ContentRatings, Credits, EpisodeGroups, ExternalIds, Images, Keywords, MovieLists, PeopleImages, PersonTranslations, PersonCombinedCredits, PersonMovieCredit, PersonTvShowCredit, Recommendations, ReleaseDates, Reviews, ScreenedTheatrically, SimilarMovies, SimilarTvShows, TaggedImages, Translations, Videos, WatchProviders, PersonChangeValue, MovieChangeValue, TvShowChangeValue, TvEpisodeChangeValue, TvEpisodeCredit, TvEpisodeTranslations, TvSeasonChangeValue, CountryCode } from '.';
2
+ export declare const AvailableLanguages: readonly ["af-ZA", "ar-AE", "ar-BH", "ar-EG", "ar-IQ", "ar-JO", "ar-LY", "ar-MA", "ar-QA", "ar-SA", "ar-TD", "ar-YE", "be-BY", "bg-BG", "bn-BD", "br-FR", "ca-AD", "ca-ES", "ch-GU", "cs-CZ", "cy-GB", "da-DK", "de-AT", "de-CH", "de-DE", "el-CY", "el-GR", "en-AG", "en-AU", "en-BB", "en-BZ", "en-CA", "en-CM", "en-GB", "en-GG", "en-GH", "en-GI", "en-GY", "en-IE", "en-JM", "en-KE", "en-LC", "en-MW", "en-NZ", "en-PG", "en-TC", "en-US", "en-ZM", "en-ZW", "eo-EO", "es-AR", "es-CL", "es-DO", "es-EC", "es-ES", "es-GQ", "es-GT", "es-HN", "es-MX", "es-NI", "es-PA", "es-PE", "es-PY", "es-SV", "es-UY", "et-EE", "eu-ES", "fa-IR", "fi-FI", "fr-BF", "fr-CA", "fr-CD", "fr-CI", "fr-FR", "fr-GF", "fr-GP", "fr-MC", "fr-ML", "fr-MU", "fr-PF", "ga-IE", "gd-GB", "gl-ES", "he-IL", "hi-IN", "hr-HR", "hu-HU", "id-ID", "it-IT", "it-VA", "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-AO", "pt-BR", "pt-MZ", "pt-PT", "ro-MD", "ro-RO", "ru-RU", "si-LK", "sk-SK", "sl-SI", "sq-AL", "sq-XK", "sr-ME", "sr-RS", "sv-SE", "sw-TZ", "ta-IN", "te-IN", "th-TH", "tl-PH", "tr-TR", "uk-UA", "ur-PK", "vi-VN", "zh-CN", "zh-HK", "zh-SG", "zh-TW", "zu-ZA"];
3
+ export type AvailableLanguage = (typeof AvailableLanguages)[number];
2
4
  export interface LanguageOption {
3
- language?: string;
5
+ language?: AvailableLanguage;
6
+ }
7
+ export interface WatchRegionOption {
8
+ watch_region?: CountryCode;
4
9
  }
5
10
  export interface RegionOption {
6
11
  region?: string;
@@ -12,8 +17,8 @@ export interface PageOption {
12
17
  page?: number;
13
18
  }
14
19
  export interface ChangeOption extends PageOption {
15
- start_date?: Date;
16
- end_date?: Date;
20
+ start_date?: string;
21
+ end_date?: string;
17
22
  }
18
23
  export type AppendToResponseMovieKey = 'images' | 'videos' | 'credits' | 'recommendations' | 'reviews' | 'changes' | 'similar' | 'lists' | 'release_dates' | 'alternative_titles' | 'external_ids' | 'translations' | 'watch/providers' | 'keywords';
19
24
  export type AppendToResponseTvKey = 'content_ratings' | 'images' | 'videos' | 'credits' | 'recommendations' | 'reviews' | 'changes' | 'similar' | 'alternative_titles' | 'external_ids' | 'translations' | 'watch/providers' | 'aggregate_credits' | 'episode_groups' | 'screened_theatrically' | 'keywords';