@kenzuya/tmdb-ts 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2085 @@
1
+ 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"];
2
+ type AvailableLanguage = (typeof AvailableLanguages)[number];
3
+ interface LanguageOption {
4
+ language?: AvailableLanguage;
5
+ }
6
+ interface WatchRegionOption {
7
+ watch_region?: CountryCode;
8
+ }
9
+ interface RegionOption {
10
+ region?: string;
11
+ }
12
+ interface TimezoneOption {
13
+ timezone?: string;
14
+ }
15
+ interface PageOption {
16
+ page?: number;
17
+ }
18
+ interface ChangeOption extends PageOption {
19
+ start_date?: string;
20
+ end_date?: string;
21
+ }
22
+ type AppendToResponseMovieKey = 'images' | 'videos' | 'credits' | 'recommendations' | 'reviews' | 'changes' | 'similar' | 'lists' | 'release_dates' | 'alternative_titles' | 'external_ids' | 'translations' | 'watch/providers' | 'keywords';
23
+ 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';
24
+ type AppendToResponsePersonKey = 'images' | 'changes' | 'movie_credits' | 'tv_credits' | 'combined_credits' | 'external_ids' | 'tagged_images' | 'translations';
25
+ type AppendToResponseTvEpisodeKey = 'images' | 'credits' | 'external_ids' | 'videos' | 'translations';
26
+ type AppendToResponseTvSeasonKey = 'images' | 'credits' | 'external_ids' | 'videos' | 'aggregate_credits' | 'translations';
27
+ type AppendToResponseAllKeys = AppendToResponseTvKey | AppendToResponseMovieKey | AppendToResponseTvEpisodeKey | AppendToResponseTvSeasonKey | AppendToResponsePersonKey;
28
+ type AppendToResponseMediaType = 'movie' | 'tvShow' | 'person' | 'tvSeason' | 'tvEpisode';
29
+ type AppendToResponse<K, T extends AppendToResponseAllKeys[] | undefined, Media extends AppendToResponseMediaType> = K & (T extends undefined ? object : T extends Array<unknown> ? ('credits' extends T[number] ? {
30
+ credits: Media extends 'tvEpisode' ? TvEpisodeCredit : Omit<Credits, 'id'>;
31
+ } : object) & ('videos' extends T[number] ? {
32
+ videos: Omit<Videos, 'id'>;
33
+ } : object) & ('images' extends T[number] ? {
34
+ images: Omit<Media extends 'person' ? PeopleImages : Images, 'id'>;
35
+ } : object) & ('recommendations' extends T[number] ? {
36
+ recommendations: Recommendations;
37
+ } : object) & ('reviews' extends T[number] ? {
38
+ reviews: Omit<Reviews, 'id'>;
39
+ } : object) & ('reviews' extends T[number] ? {
40
+ reviews: Omit<Translations, 'id'>;
41
+ } : object) & ('changes' extends T[number] ? {
42
+ changes: Changes<Media extends 'person' ? PersonChangeValue : Media extends 'movie' ? MovieChangeValue : Media extends 'tvShow' ? TvShowChangeValue : Media extends 'tvSeason' ? TvSeasonChangeValue : TvEpisodeChangeValue>;
43
+ } : object) & ('keywords' extends T[number] ? {
44
+ keywords: Omit<Keywords, 'id'>;
45
+ } : object) & ('lists' extends T[number] ? {
46
+ lists: Omit<MovieLists, 'id'>;
47
+ } : object) & ('release_dates' extends T[number] ? {
48
+ release_dates: Omit<ReleaseDates, 'id'>;
49
+ } : object) & ('alternative_titles' extends T[number] ? {
50
+ alternative_titles: Omit<AlternativeTitles, 'id'>;
51
+ } : object) & ('external_ids' extends T[number] ? {
52
+ external_ids: Omit<ExternalIds, 'id'>;
53
+ } : object) & ('translations' extends T[number] ? {
54
+ translations: Omit<Media extends 'person' ? PersonTranslations : Media extends 'tvEpisode' ? TvEpisodeTranslations : Translations, 'id'>;
55
+ } : object) & ('watch/providers' extends T[number] ? {
56
+ 'watch/providers': Omit<WatchProviders, 'id'>;
57
+ } : object) & ('aggregate_credits' extends T[number] ? {
58
+ aggregate_credits: Omit<Credits, 'id'>;
59
+ } : object) & ('episode_groups' extends T[number] ? {
60
+ episode_groups: Omit<EpisodeGroups, 'id'>;
61
+ } : object) & ('screened_theatrically' extends T[number] ? {
62
+ screened_theatrically: Omit<ScreenedTheatrically, 'id'>;
63
+ } : object) & ('similar' extends T[number] ? {
64
+ similar: Media extends 'movie' ? SimilarMovies : Media extends 'tvShow' ? SimilarTvShows : unknown;
65
+ } : object) & ('content_ratings' extends T[number] ? {
66
+ content_ratings: Omit<ContentRatings, 'id'>;
67
+ } : object) & ('movie_credits' extends T[number] ? {
68
+ movie_credits: Omit<PersonMovieCredit, 'id'>;
69
+ } : object) & ('tv_credits' extends T[number] ? {
70
+ tv_credits: Omit<PersonTvShowCredit, 'id'>;
71
+ } : object) & ('combined_credits' extends T[number] ? {
72
+ combined_credits: Omit<PersonCombinedCredits, 'id'>;
73
+ } : object) & ('tagged_images' extends T[number] ? {
74
+ tagged_images: TaggedImages;
75
+ } : object) : never);
76
+
77
+ interface Certification {
78
+ certification: string;
79
+ meaning: string;
80
+ order: number;
81
+ }
82
+ interface Certifications {
83
+ certifications: {
84
+ AR: Certification[];
85
+ AT: Certification[];
86
+ AU: Certification[];
87
+ BG: Certification[];
88
+ BR: Certification[];
89
+ CA: Certification[];
90
+ 'CA-QC': Certification[];
91
+ CH: Certification[];
92
+ CL: Certification[];
93
+ CZ: Certification[];
94
+ DE: Certification[];
95
+ DK: Certification[];
96
+ ES: Certification[];
97
+ FI: Certification[];
98
+ FR: Certification[];
99
+ GB: Certification[];
100
+ GR: Certification[];
101
+ HK: Certification[];
102
+ HU: Certification[];
103
+ ID: Certification[];
104
+ IE: Certification[];
105
+ IL: Certification[];
106
+ IN: Certification[];
107
+ IT: Certification[];
108
+ JP: Certification[];
109
+ KR: Certification[];
110
+ LT: Certification[];
111
+ LU: Certification[];
112
+ LV: Certification[];
113
+ MO: Certification[];
114
+ MX: Certification[];
115
+ MY: Certification[];
116
+ NL: Certification[];
117
+ NO: Certification[];
118
+ NZ: Certification[];
119
+ PH: Certification[];
120
+ PL: Certification[];
121
+ PR: Certification[];
122
+ PT: Certification[];
123
+ RO: Certification[];
124
+ RU: Certification[];
125
+ SE: Certification[];
126
+ SG: Certification[];
127
+ SK: Certification[];
128
+ TH: Certification[];
129
+ TR: Certification[];
130
+ TW: Certification[];
131
+ UA: Certification[];
132
+ US: Certification[];
133
+ VI: Certification[];
134
+ ZA: Certification[];
135
+ };
136
+ }
137
+
138
+ interface CreditSeason {
139
+ air_date?: string;
140
+ poster_path?: string;
141
+ season_number?: number;
142
+ }
143
+ interface Media {
144
+ id?: number;
145
+ name?: string;
146
+ first_air_date?: string;
147
+ vote_count?: number;
148
+ overview?: string;
149
+ vote_average?: number;
150
+ backdrop_path?: string;
151
+ genre_ids?: number[];
152
+ media_type: string;
153
+ adult: boolean;
154
+ original_name?: string;
155
+ origin_country?: string[];
156
+ poster_path?: string;
157
+ original_language?: string;
158
+ popularity?: number;
159
+ character?: string;
160
+ episodes?: string[];
161
+ seasons?: CreditSeason[];
162
+ }
163
+ interface CreditResponse {
164
+ credit_type?: string;
165
+ department?: string;
166
+ job?: string;
167
+ media?: Media;
168
+ media_type?: string;
169
+ id?: string;
170
+ person?: Person;
171
+ }
172
+ interface Title {
173
+ iso_3166_1: CountryCode;
174
+ title: string;
175
+ type: string;
176
+ }
177
+ interface AlternativeTitles {
178
+ id: number;
179
+ titles: Title[];
180
+ }
181
+ interface Cast$1 {
182
+ adult: boolean;
183
+ gender: number;
184
+ id: number;
185
+ known_for_department: string;
186
+ name: string;
187
+ original_name: string;
188
+ popularity: number;
189
+ profile_path: string;
190
+ cast_id: number;
191
+ character: string;
192
+ credit_id: string;
193
+ order: number;
194
+ }
195
+ interface Crew$1 {
196
+ adult: boolean;
197
+ gender: number;
198
+ id: number;
199
+ known_for_department: string;
200
+ name: string;
201
+ original_name: string;
202
+ popularity: number;
203
+ profile_path: string;
204
+ credit_id: string;
205
+ department: string;
206
+ job: string;
207
+ }
208
+ interface Credits {
209
+ id: number;
210
+ cast: Cast$1[];
211
+ crew: Crew$1[];
212
+ }
213
+ interface ImageCollection {
214
+ id: number;
215
+ backdrops: Image[];
216
+ posters: Image[];
217
+ }
218
+ interface Video {
219
+ id: string;
220
+ iso_639_1: string;
221
+ iso_3166_1: CountryCode;
222
+ key: string;
223
+ name: string;
224
+ site: string;
225
+ size: number;
226
+ type: string;
227
+ }
228
+ interface Videos {
229
+ id: number;
230
+ results: Video[];
231
+ }
232
+ interface AggregateCredits {
233
+ id: number;
234
+ cast: AggregateCast[];
235
+ crew: AggregateCrew[];
236
+ }
237
+ interface CastRole {
238
+ credit_id: string;
239
+ character: string;
240
+ episode_count: number;
241
+ }
242
+ interface AggregateCast {
243
+ adult: boolean;
244
+ gender: number;
245
+ id: number;
246
+ known_for_department: string;
247
+ name: string;
248
+ original_name: string;
249
+ popularity: number;
250
+ profile_path: string;
251
+ roles: CastRole[];
252
+ total_episode_count: number;
253
+ order: number;
254
+ }
255
+ interface CrewJob {
256
+ credit_id: string;
257
+ job: string;
258
+ episode_count: number;
259
+ }
260
+ interface AggregateCrew {
261
+ adult: boolean;
262
+ gender: number;
263
+ id: number;
264
+ known_for_department: string;
265
+ name: string;
266
+ original_name: string;
267
+ popularity: number;
268
+ profile_path: string;
269
+ jobs: CrewJob[];
270
+ department: string;
271
+ total_episode_count: number;
272
+ }
273
+
274
+ interface CompanyDetails {
275
+ description: string;
276
+ headquarters: string;
277
+ homepage: string;
278
+ id: number;
279
+ logo_path: string;
280
+ name: string;
281
+ origin_country: string;
282
+ parent_company?: ParentCompany;
283
+ }
284
+ interface ParentCompany {
285
+ name: string;
286
+ id: number;
287
+ logo_path: string;
288
+ }
289
+ interface AlternativeNames {
290
+ id: number;
291
+ results: Name[];
292
+ }
293
+ interface Name {
294
+ name: string;
295
+ type: string;
296
+ }
297
+ interface CompanyImages {
298
+ id: number;
299
+ logos: Image[];
300
+ }
301
+
302
+ interface NetworkDetails {
303
+ headquarters: string;
304
+ homepage: string;
305
+ id: number;
306
+ logo_path: string;
307
+ name: string;
308
+ origin_country: string;
309
+ }
310
+ interface NetworkImages {
311
+ id: number;
312
+ logos: Image[];
313
+ }
314
+
315
+ interface ImageConfiguration {
316
+ base_url: string;
317
+ secure_base_url: string;
318
+ backdrop_sizes: BackdropSizes[];
319
+ logo_sizes: LogoSizes[];
320
+ poster_sizes: PosterSizes[];
321
+ profile_sizes: ProfileSizes[];
322
+ still_sizes: StillSizes[];
323
+ }
324
+ interface Configuration {
325
+ images: ImageConfiguration;
326
+ change_keys: ChangeKeys[];
327
+ }
328
+ interface CountryConfiguration {
329
+ iso_3166_1: CountryCode;
330
+ english_name: string;
331
+ native_name: string;
332
+ }
333
+ interface LanguageConfiguration {
334
+ iso_639_1: string;
335
+ english_name: string;
336
+ name: string;
337
+ }
338
+ interface JobConfiguration {
339
+ department: string;
340
+ jobs: string[];
341
+ }
342
+ interface TimezoneConfiguration {
343
+ iso_3166_1: CountryCode;
344
+ zones: string[];
345
+ }
346
+ declare const MediaSize: {
347
+ readonly W45: "w45";
348
+ readonly W92: "w92";
349
+ readonly W154: "w154";
350
+ readonly W185: "w185";
351
+ readonly W300: "w300";
352
+ readonly W342: "w342";
353
+ readonly W500: "w500";
354
+ readonly W632: "w632";
355
+ readonly W780: "w780";
356
+ readonly W1280: "w1280";
357
+ readonly ORIGINAL: "original";
358
+ };
359
+ declare const BackdropSize: {
360
+ readonly W45: "w45";
361
+ readonly W92: "w92";
362
+ readonly W154: "w154";
363
+ readonly W185: "w185";
364
+ readonly W300: "w300";
365
+ readonly W500: "w500";
366
+ readonly W780: "w780";
367
+ readonly W1280: "w1280";
368
+ readonly ORIGINAL: "original";
369
+ };
370
+ type BackdropSizes = (typeof BackdropSize)[keyof typeof BackdropSize];
371
+ declare const LogoSize: {
372
+ readonly W45: "w45";
373
+ readonly W92: "w92";
374
+ readonly W154: "w154";
375
+ readonly W185: "w185";
376
+ readonly W300: "w300";
377
+ readonly W500: "w500";
378
+ readonly ORIGINAL: "original";
379
+ };
380
+ type LogoSizes = (typeof LogoSize)[keyof typeof LogoSize];
381
+ declare const PosterSize: {
382
+ readonly W92: "w92";
383
+ readonly W154: "w154";
384
+ readonly W185: "w185";
385
+ readonly W300: "w300";
386
+ readonly W342: "w342";
387
+ readonly W500: "w500";
388
+ readonly W780: "w780";
389
+ readonly ORIGINAL: "original";
390
+ };
391
+ type PosterSizes = (typeof PosterSize)[keyof typeof PosterSize];
392
+ declare const ProfileSize: {
393
+ readonly W45: "w45";
394
+ readonly W185: "w185";
395
+ readonly W632: "w632";
396
+ readonly ORIGINAL: "original";
397
+ };
398
+ type ProfileSizes = (typeof ProfileSize)[keyof typeof ProfileSize];
399
+ declare const StillSize: {
400
+ readonly W92: "w92";
401
+ readonly W185: "w185";
402
+ readonly W300: "w300";
403
+ readonly ORIGINAL: "original";
404
+ };
405
+ type StillSizes = (typeof StillSize)[keyof typeof StillSize];
406
+ declare const ChangeKey: {
407
+ readonly ADULT: "adult";
408
+ readonly AIR_DATE: "air_date";
409
+ readonly ALSO_KNOWN_AS: "also_known_as";
410
+ readonly ALTERNATIVE_TITLES: "alternative_titles";
411
+ readonly BIOGRAPHY: "biography";
412
+ readonly BIRTHDAY: "birthday";
413
+ readonly BUDGET: "budget";
414
+ readonly CAST: "cast";
415
+ readonly CERTIFICATIONS: "certifications";
416
+ readonly CHARACTER_NAMES: "character_names";
417
+ readonly CREATED_BY: "created_by";
418
+ readonly CREW: "crew";
419
+ readonly DEATHDAY: "deathday";
420
+ readonly EPISODE: "episode";
421
+ readonly EPISODE_NUMBER: "episode_number";
422
+ readonly EPISODE_RUN_TIME: "episode_run_time";
423
+ readonly FREEBASE_ID: "freebase_id";
424
+ readonly FREEBASE_MID: "freebase_mid";
425
+ readonly GENERAL: "general";
426
+ readonly GENRES: "genres";
427
+ readonly GUEST_STARS: "guest_stars";
428
+ readonly HOMEPAGE: "homepage";
429
+ readonly IMAGES: "images";
430
+ readonly IMDB_ID: "imdb_id";
431
+ readonly LANGUAGES: "languages";
432
+ readonly NAME: "name";
433
+ readonly NETWORK: "network";
434
+ readonly ORIGIN_COUNTRY: "origin_country";
435
+ readonly ORIGINAL_NAME: "original_name";
436
+ readonly ORIGINAL_TITLE: "original_title";
437
+ readonly OVERVIEW: "overview";
438
+ readonly PARTS: "parts";
439
+ readonly PLACE_OF_BIRTH: "place_of_birth";
440
+ readonly PLOT_KEYWORDS: "plot_keywords";
441
+ readonly PRODUCTION_CODE: "production_code";
442
+ readonly PRODUCTION_COMPANIES: "production_companies";
443
+ readonly PRODUCTION_COUNTRIES: "production_countries";
444
+ readonly RELEASES: "releases";
445
+ readonly REVENUE: "revenue";
446
+ readonly RUNTIME: "runtime";
447
+ readonly SEASON: "season";
448
+ readonly SEASON_NUMBER: "season_number";
449
+ readonly SEASON_REGULAR: "season_regular";
450
+ readonly SPOKEN_LANGUAGES: "spoken_languages";
451
+ readonly STATUS: "status";
452
+ readonly TAGLINE: "tagline";
453
+ readonly TITLE: "title";
454
+ readonly TRANSLATIONS: "translations";
455
+ readonly TVDB_ID: "tvdb_id";
456
+ readonly TVRAGE_ID: "tvrage_id";
457
+ readonly TYPE: "type";
458
+ readonly VIDEO: "video";
459
+ readonly VIDEOS: "videos";
460
+ };
461
+ type ChangeKeys = (typeof ChangeKey)[keyof typeof ChangeKey];
462
+
463
+ interface MediaChange {
464
+ id: number;
465
+ adult?: boolean;
466
+ }
467
+ interface MediaChanges {
468
+ results: MediaChange[];
469
+ page: number;
470
+ total_pages: number;
471
+ total_results: number;
472
+ }
473
+ interface Changes<T> {
474
+ changes: Change<T>[];
475
+ }
476
+ interface Change<T> {
477
+ key: string;
478
+ items: ChangeItem<T>[];
479
+ }
480
+ interface ChangeItem<T> {
481
+ id: string;
482
+ action: string;
483
+ time: string;
484
+ value: T;
485
+ iso_639_1: string;
486
+ original_value: T;
487
+ }
488
+
489
+ interface BelongsToCollection {
490
+ id: number;
491
+ name: string;
492
+ poster_path: string;
493
+ backdrop_path: string;
494
+ }
495
+ interface MovieDetails {
496
+ adult: boolean;
497
+ backdrop_path: string;
498
+ belongs_to_collection?: BelongsToCollection;
499
+ budget: number;
500
+ genres: Genre[];
501
+ homepage: string;
502
+ id: number;
503
+ imdb_id: string | null;
504
+ original_language: string;
505
+ original_title: string;
506
+ overview: string;
507
+ popularity: number;
508
+ poster_path?: string;
509
+ production_companies: ProductionCompany[];
510
+ production_countries: ProductionCountry[];
511
+ release_date: string;
512
+ revenue: number;
513
+ runtime: number;
514
+ spoken_languages: SpokenLanguage[];
515
+ status: string;
516
+ tagline: string;
517
+ title: string;
518
+ video: boolean;
519
+ vote_average: number;
520
+ vote_count: number;
521
+ }
522
+ declare enum ReleaseDateType {
523
+ Premiere = 1,
524
+ 'Theatrical (limited)' = 2,
525
+ Theatrical = 3,
526
+ Digital = 4,
527
+ Physical = 5,
528
+ TV = 6
529
+ }
530
+ interface ReleaseDate {
531
+ certification: string;
532
+ descriptors: string[];
533
+ iso_639_1: string;
534
+ release_date: string;
535
+ type: ReleaseDateType;
536
+ note: string;
537
+ }
538
+ interface ReleaseDateResult {
539
+ iso_3166_1: CountryCode;
540
+ release_dates: ReleaseDate[];
541
+ }
542
+ interface ReleaseDates {
543
+ id: number;
544
+ results: ReleaseDateResult[];
545
+ }
546
+ interface SimilarMovies {
547
+ page: number;
548
+ results: Movie[];
549
+ total_pages: number;
550
+ total_results: number;
551
+ }
552
+ interface MovieList {
553
+ description: string;
554
+ favorite_count: number;
555
+ id: number;
556
+ item_count: number;
557
+ iso_639_1: string;
558
+ list_type: string;
559
+ name: string;
560
+ poster_path: string;
561
+ }
562
+ interface MovieLists {
563
+ id: number;
564
+ page: number;
565
+ results: MovieList[];
566
+ total_pages: number;
567
+ total_results: number;
568
+ }
569
+ interface LatestMovie {
570
+ adult: boolean;
571
+ backdrop_path?: string;
572
+ belongs_to_collection?: BelongsToCollection;
573
+ budget: number;
574
+ genres: Genre[];
575
+ homepage: string;
576
+ id: number;
577
+ imdb_id: string | null;
578
+ original_language: string;
579
+ original_title: string;
580
+ overview: string;
581
+ popularity: number;
582
+ poster_path: string;
583
+ production_companies: ProductionCompany[];
584
+ production_countries: ProductionCountry[];
585
+ release_date: string;
586
+ revenue: number;
587
+ runtime: number;
588
+ spoken_languages: SpokenLanguage[];
589
+ status: string;
590
+ tagline: string;
591
+ title: string;
592
+ video: boolean;
593
+ vote_average: number;
594
+ vote_count: number;
595
+ }
596
+ interface Dates {
597
+ maximum: string;
598
+ minimum: string;
599
+ }
600
+ interface MoviesPlayingNow {
601
+ page: number;
602
+ results: Movie[];
603
+ dates: Dates;
604
+ total_pages: number;
605
+ total_results: number;
606
+ }
607
+ interface PopularMovies {
608
+ page: number;
609
+ results: Movie[];
610
+ total_results: number;
611
+ total_pages: number;
612
+ }
613
+ interface TopRatedMovies {
614
+ page: number;
615
+ results: Movie[];
616
+ total_results: number;
617
+ total_pages: number;
618
+ }
619
+ interface UpcomingMovies {
620
+ page: number;
621
+ results: Movie[];
622
+ total_results: number;
623
+ total_pages: number;
624
+ }
625
+ type MovieChangeValue = string | {
626
+ person_id: number;
627
+ character: string;
628
+ order: number;
629
+ cast_id: number;
630
+ credit_id: string;
631
+ } | unknown;
632
+
633
+ interface Search<T> {
634
+ page: number;
635
+ results: T[];
636
+ total_pages: number;
637
+ total_results: number;
638
+ }
639
+ type MultiSearchResult = MovieWithMediaType | TVWithMediaType | PersonWithMediaType;
640
+
641
+ interface CreatedBy {
642
+ id: number;
643
+ credit_id: string;
644
+ name: string;
645
+ gender: number;
646
+ profile_path: string;
647
+ }
648
+ interface NextEpisodeToAir {
649
+ id: number;
650
+ name: string;
651
+ overview: string;
652
+ vote_average: number;
653
+ vote_count: number;
654
+ air_date: string;
655
+ episode_number: number;
656
+ production_code: string;
657
+ runtime: number;
658
+ season_number: number;
659
+ show_id: number;
660
+ still_path: string;
661
+ }
662
+ interface LastEpisodeToAir {
663
+ air_date: string;
664
+ episode_number: number;
665
+ id: number;
666
+ name: string;
667
+ overview: string;
668
+ production_code: string;
669
+ season_number: number;
670
+ still_path: string;
671
+ vote_average: number;
672
+ vote_count: number;
673
+ }
674
+ interface Season {
675
+ air_date: string;
676
+ episode_count: number;
677
+ id: number;
678
+ name: string;
679
+ overview: string;
680
+ poster_path: string;
681
+ season_number: number;
682
+ }
683
+ interface TvShowDetails {
684
+ backdrop_path: string;
685
+ created_by: CreatedBy[];
686
+ episode_run_time: number[];
687
+ first_air_date: string;
688
+ genres: Genre[];
689
+ homepage: string;
690
+ id: number;
691
+ in_production: boolean;
692
+ languages: string[];
693
+ last_air_date: string;
694
+ last_episode_to_air: LastEpisodeToAir;
695
+ name: string;
696
+ next_episode_to_air?: NextEpisodeToAir;
697
+ networks: Network[];
698
+ number_of_episodes: number;
699
+ number_of_seasons: number;
700
+ origin_country: string[];
701
+ original_language: string;
702
+ original_name: string;
703
+ overview: string;
704
+ popularity: number;
705
+ poster_path: string;
706
+ production_companies: ProductionCompany[];
707
+ production_countries: ProductionCountry[];
708
+ seasons: Season[];
709
+ spoken_languages: SpokenLanguage[];
710
+ status: string;
711
+ tagline: string;
712
+ type: string;
713
+ vote_average: number;
714
+ vote_count: number;
715
+ }
716
+ interface Network {
717
+ name: string;
718
+ id: number;
719
+ logo_path: string;
720
+ origin_country: string;
721
+ }
722
+ interface Network {
723
+ id: number;
724
+ logo_path: string;
725
+ name: string;
726
+ origin_country: string;
727
+ }
728
+ interface EpisodeGroup {
729
+ description: string;
730
+ episode_count: number;
731
+ group_count: number;
732
+ id: string;
733
+ name: string;
734
+ network: Network;
735
+ type: number;
736
+ }
737
+ interface EpisodeGroups {
738
+ results: EpisodeGroup[];
739
+ id: number;
740
+ }
741
+ interface ScreenedTheatricallyResult {
742
+ id: number;
743
+ episode_number: number;
744
+ season_number: number;
745
+ }
746
+ interface ScreenedTheatrically {
747
+ id: number;
748
+ results: ScreenedTheatricallyResult[];
749
+ }
750
+ interface SimilarTvShow {
751
+ backdrop_path: string;
752
+ first_air_date: string;
753
+ genre_ids: number[];
754
+ id: number;
755
+ original_language: string;
756
+ original_name: string;
757
+ overview: string;
758
+ origin_country: string[];
759
+ poster_path: string;
760
+ popularity: number;
761
+ name: string;
762
+ vote_average: number;
763
+ vote_count: number;
764
+ }
765
+ interface SimilarTvShows {
766
+ page: number;
767
+ results: SimilarTvShow[];
768
+ total_pages: number;
769
+ total_results: number;
770
+ }
771
+ interface LatestTvShows {
772
+ backdrop_path?: string;
773
+ created_by: CreatedBy[];
774
+ episode_run_time: number[];
775
+ first_air_date: string;
776
+ genres: Genre[];
777
+ homepage: string;
778
+ id: number;
779
+ in_production: boolean;
780
+ languages: string[];
781
+ last_air_date: string;
782
+ name: string;
783
+ networks: Network[];
784
+ number_of_episodes: number;
785
+ number_of_seasons: number;
786
+ origin_country: string[];
787
+ original_language: string;
788
+ original_name: string;
789
+ overview?: string;
790
+ popularity: number;
791
+ poster_path?: string;
792
+ production_companies: ProductionCompany[];
793
+ seasons: Season[];
794
+ status: string;
795
+ type: string;
796
+ vote_average: number;
797
+ vote_count: number;
798
+ }
799
+ interface OnTheAirResult {
800
+ poster_path: string;
801
+ popularity: number;
802
+ id: number;
803
+ backdrop_path: string;
804
+ vote_average: number;
805
+ overview: string;
806
+ first_air_date: string;
807
+ origin_country: string[];
808
+ genre_ids: number[];
809
+ original_language: string;
810
+ vote_count: number;
811
+ name: string;
812
+ original_name: string;
813
+ }
814
+ interface OnTheAir {
815
+ page: number;
816
+ results: OnTheAirResult[];
817
+ total_results: number;
818
+ total_pages: number;
819
+ }
820
+ interface AiringTodayResult {
821
+ poster_path: string;
822
+ popularity: number;
823
+ id: number;
824
+ backdrop_path: string;
825
+ vote_average: number;
826
+ overview: string;
827
+ first_air_date: string;
828
+ origin_country: string[];
829
+ genre_ids: number[];
830
+ original_language: string;
831
+ vote_count: number;
832
+ name: string;
833
+ original_name: string;
834
+ }
835
+ interface TvShowsAiringToday {
836
+ page: number;
837
+ results: AiringTodayResult[];
838
+ total_results: number;
839
+ total_pages: number;
840
+ }
841
+ interface PopularTvShowResult {
842
+ poster_path: string;
843
+ popularity: number;
844
+ id: number;
845
+ backdrop_path: string;
846
+ vote_average: number;
847
+ overview: string;
848
+ first_air_date: string;
849
+ origin_country: string[];
850
+ genre_ids: number[];
851
+ original_language: string;
852
+ vote_count: number;
853
+ name: string;
854
+ original_name: string;
855
+ }
856
+ interface PopularTvShows {
857
+ page: number;
858
+ results: PopularTvShowResult[];
859
+ total_results: number;
860
+ total_pages: number;
861
+ }
862
+ interface TopRatedTvShowResult {
863
+ poster_path: string;
864
+ popularity: number;
865
+ id: number;
866
+ backdrop_path: string;
867
+ vote_average: number;
868
+ overview: string;
869
+ first_air_date: string;
870
+ origin_country: string[];
871
+ genre_ids: number[];
872
+ original_language: string;
873
+ vote_count: number;
874
+ name: string;
875
+ original_name: string;
876
+ }
877
+ interface TopRatedTvShows {
878
+ page: number;
879
+ results: TopRatedTvShowResult[];
880
+ total_results: number;
881
+ total_pages: number;
882
+ }
883
+ interface TvShowChangeValue {
884
+ season_id: number;
885
+ season_number: number;
886
+ }
887
+ interface TvShowImageOptions extends LanguageOption {
888
+ /**
889
+ * a list of ISO-639-1 values to query
890
+ */
891
+ include_image_language?: string[];
892
+ }
893
+ interface TvShowVideoOptions extends LanguageOption {
894
+ /**
895
+ * a list of ISO-639-1 values to query
896
+ */
897
+ include_video_language?: string[];
898
+ }
899
+
900
+ interface Region {
901
+ iso_3166_1: CountryCode;
902
+ english_name: string;
903
+ native_name: string;
904
+ }
905
+
906
+ interface WatchProvider {
907
+ display_priorities: {
908
+ [K in CountryCode]: number;
909
+ };
910
+ display_priority: number;
911
+ logo_path: string;
912
+ provider_id: number;
913
+ provider_name: string;
914
+ }
915
+ interface RegionResult {
916
+ results: Array<Region>;
917
+ }
918
+ interface WatchProviderResult {
919
+ results: Array<WatchProvider>;
920
+ }
921
+ interface Flatrate {
922
+ display_priority: number;
923
+ logo_path: string;
924
+ provider_id: number;
925
+ provider_name: string;
926
+ }
927
+ interface Rent {
928
+ display_priority: number;
929
+ logo_path: string;
930
+ provider_id: number;
931
+ provider_name: string;
932
+ }
933
+ interface Buy {
934
+ display_priority: number;
935
+ logo_path: string;
936
+ provider_id: number;
937
+ provider_name: string;
938
+ }
939
+ interface WatchLocale {
940
+ AR: {
941
+ link: string;
942
+ flatrate: Flatrate[];
943
+ rent: Rent[];
944
+ buy: Buy[];
945
+ };
946
+ AT: {
947
+ link: string;
948
+ rent: Rent[];
949
+ buy: Buy[];
950
+ };
951
+ AU: {
952
+ link: string;
953
+ flatrate: Flatrate[];
954
+ rent: Rent[];
955
+ buy: Buy[];
956
+ };
957
+ BE: {
958
+ link: string;
959
+ buy: Buy[];
960
+ flatrate: Flatrate[];
961
+ rent: Rent[];
962
+ };
963
+ BR: {
964
+ link: string;
965
+ rent: Rent[];
966
+ buy: Buy[];
967
+ flatrate: Flatrate[];
968
+ };
969
+ CA: {
970
+ link: string;
971
+ rent: Rent[];
972
+ flatrate: Flatrate[];
973
+ buy: Buy[];
974
+ };
975
+ CH: {
976
+ link: string;
977
+ rent: Rent[];
978
+ buy: Buy[];
979
+ flatrate: Flatrate[];
980
+ };
981
+ CL: {
982
+ link: string;
983
+ flatrate: Flatrate[];
984
+ buy: Buy[];
985
+ rent: Rent[];
986
+ };
987
+ CO: {
988
+ link: string;
989
+ flatrate: Flatrate[];
990
+ rent: Rent[];
991
+ buy: Buy[];
992
+ };
993
+ CZ: {
994
+ link: string;
995
+ buy: Buy[];
996
+ flatrate: Flatrate[];
997
+ rent: Rent[];
998
+ };
999
+ DE: {
1000
+ link: string;
1001
+ rent: Rent[];
1002
+ buy: Buy[];
1003
+ };
1004
+ DK: {
1005
+ link: string;
1006
+ rent: Rent[];
1007
+ buy: Buy[];
1008
+ flatrate: Flatrate[];
1009
+ };
1010
+ EC: {
1011
+ link: string;
1012
+ flatrate: Flatrate[];
1013
+ buy: Buy[];
1014
+ rent: Rent[];
1015
+ };
1016
+ EE: {
1017
+ link: string;
1018
+ flatrate: Flatrate[];
1019
+ buy: Buy[];
1020
+ rent: Rent[];
1021
+ };
1022
+ ES: {
1023
+ link: string;
1024
+ rent: Rent[];
1025
+ flatrate: Flatrate[];
1026
+ buy: Buy[];
1027
+ };
1028
+ FI: {
1029
+ link: string;
1030
+ buy: Buy[];
1031
+ flatrate: Flatrate[];
1032
+ rent: Rent[];
1033
+ };
1034
+ FR: {
1035
+ link: string;
1036
+ flatrate: Flatrate[];
1037
+ buy: Buy[];
1038
+ rent: Rent[];
1039
+ };
1040
+ GB: {
1041
+ link: string;
1042
+ rent: Rent[];
1043
+ flatrate: Flatrate[];
1044
+ buy: Buy[];
1045
+ };
1046
+ GR: {
1047
+ link: string;
1048
+ flatrate: Flatrate[];
1049
+ rent: Rent[];
1050
+ buy: Buy[];
1051
+ };
1052
+ HU: {
1053
+ link: string;
1054
+ rent: Rent[];
1055
+ buy: Buy[];
1056
+ flatrate: Flatrate[];
1057
+ };
1058
+ ID: {
1059
+ link: string;
1060
+ flatrate: Flatrate[];
1061
+ rent: Rent[];
1062
+ buy: Buy[];
1063
+ };
1064
+ IE: {
1065
+ link: string;
1066
+ rent: Rent[];
1067
+ flatrate: Flatrate[];
1068
+ buy: Buy[];
1069
+ };
1070
+ IN: {
1071
+ link: string;
1072
+ buy: Buy[];
1073
+ flatrate: Flatrate[];
1074
+ rent: Rent[];
1075
+ };
1076
+ IT: {
1077
+ link: string;
1078
+ buy: Buy[];
1079
+ flatrate: Flatrate[];
1080
+ rent: Rent[];
1081
+ };
1082
+ JP: {
1083
+ link: string;
1084
+ rent: Rent[];
1085
+ flatrate: Flatrate[];
1086
+ buy: Buy[];
1087
+ };
1088
+ KR: {
1089
+ link: string;
1090
+ buy: Buy[];
1091
+ rent: Rent[];
1092
+ flatrate: Flatrate[];
1093
+ };
1094
+ LT: {
1095
+ link: string;
1096
+ buy: Buy[];
1097
+ flatrate: Flatrate[];
1098
+ };
1099
+ LV: {
1100
+ link: string;
1101
+ buy: Buy[];
1102
+ flatrate: Flatrate[];
1103
+ };
1104
+ MX: {
1105
+ link: string;
1106
+ flatrate: Flatrate[];
1107
+ rent: Rent[];
1108
+ buy: Buy[];
1109
+ };
1110
+ MY: {
1111
+ link: string;
1112
+ rent: Rent[];
1113
+ flatrate: Flatrate[];
1114
+ buy: Buy[];
1115
+ };
1116
+ NL: {
1117
+ link: string;
1118
+ flatrate: Flatrate[];
1119
+ buy: Buy[];
1120
+ rent: Rent[];
1121
+ };
1122
+ NO: {
1123
+ link: string;
1124
+ buy: Buy[];
1125
+ rent: Rent[];
1126
+ flatrate: Flatrate[];
1127
+ };
1128
+ NZ: {
1129
+ link: string;
1130
+ buy: Buy[];
1131
+ rent: Rent[];
1132
+ flatrate: Flatrate[];
1133
+ };
1134
+ PE: {
1135
+ link: string;
1136
+ flatrate: Flatrate[];
1137
+ rent: Rent[];
1138
+ buy: Buy[];
1139
+ };
1140
+ PH: {
1141
+ link: string;
1142
+ rent: Rent[];
1143
+ buy: Buy[];
1144
+ flatrate: Flatrate[];
1145
+ };
1146
+ PL: {
1147
+ link: string;
1148
+ rent: Rent[];
1149
+ flatrate: Flatrate[];
1150
+ buy: Buy[];
1151
+ };
1152
+ PT: {
1153
+ link: string;
1154
+ rent: Rent[];
1155
+ flatrate: Flatrate[];
1156
+ buy: Buy[];
1157
+ };
1158
+ RO: {
1159
+ link: string;
1160
+ flatrate: Flatrate[];
1161
+ };
1162
+ RU: {
1163
+ link: string;
1164
+ rent: Rent[];
1165
+ flatrate: Flatrate[];
1166
+ buy: Buy[];
1167
+ };
1168
+ SE: {
1169
+ link: string;
1170
+ rent: Rent[];
1171
+ flatrate: Flatrate[];
1172
+ buy: Buy[];
1173
+ };
1174
+ SG: {
1175
+ link: string;
1176
+ flatrate: Flatrate[];
1177
+ buy: Buy[];
1178
+ rent: Rent[];
1179
+ };
1180
+ TH: {
1181
+ link: string;
1182
+ flatrate: Flatrate[];
1183
+ rent: Rent[];
1184
+ buy: Buy[];
1185
+ };
1186
+ TR: {
1187
+ link: string;
1188
+ buy: Buy[];
1189
+ rent: Rent[];
1190
+ flatrate: Flatrate[];
1191
+ };
1192
+ US: {
1193
+ link: string;
1194
+ rent: Rent[];
1195
+ buy: Buy[];
1196
+ flatrate: Flatrate[];
1197
+ };
1198
+ VE: {
1199
+ link: string;
1200
+ flatrate: Flatrate[];
1201
+ rent: Rent[];
1202
+ buy: Buy[];
1203
+ };
1204
+ ZA: {
1205
+ link: string;
1206
+ rent: Rent[];
1207
+ buy: Buy[];
1208
+ flatrate: Flatrate[];
1209
+ };
1210
+ }
1211
+ interface WatchProviders {
1212
+ id: number;
1213
+ results: WatchLocale;
1214
+ }
1215
+
1216
+ interface Cast {
1217
+ character: string;
1218
+ credit_id: string;
1219
+ vote_count: number;
1220
+ id: number;
1221
+ backdrop_path: string;
1222
+ poster_path: string;
1223
+ original_language: string;
1224
+ vote_average: number;
1225
+ genre_ids: number[];
1226
+ popularity: number;
1227
+ overview: string;
1228
+ }
1229
+ interface Crew {
1230
+ id: number;
1231
+ department: string;
1232
+ original_language: string;
1233
+ credit_id: string;
1234
+ overview: string;
1235
+ vote_count: number;
1236
+ poster_path: string;
1237
+ backdrop_path: string;
1238
+ popularity: number;
1239
+ genre_ids: number[];
1240
+ job: string;
1241
+ vote_average: number;
1242
+ }
1243
+ interface PersonMovieCast extends Cast {
1244
+ release_date: string;
1245
+ video: boolean;
1246
+ adult: boolean;
1247
+ title: string;
1248
+ original_title: string;
1249
+ }
1250
+ interface PersonMovieCrew extends Crew {
1251
+ original_title: string;
1252
+ video: boolean;
1253
+ title: string;
1254
+ adult: boolean;
1255
+ release_date: string;
1256
+ }
1257
+ interface PersonTvShowCrew extends Crew {
1258
+ episode_count: number;
1259
+ origin_country: string[];
1260
+ original_name: string;
1261
+ name: string;
1262
+ first_air_date: string;
1263
+ }
1264
+ interface PersonTvShowCast extends Cast {
1265
+ original_name: string;
1266
+ name: string;
1267
+ episode_count: number;
1268
+ first_air_date: string;
1269
+ origin_country: string[];
1270
+ }
1271
+ interface PersonMovieCredit {
1272
+ cast: PersonMovieCast[];
1273
+ crew: PersonMovieCrew[];
1274
+ id: number;
1275
+ }
1276
+ interface PersonTvShowCredit {
1277
+ cast: PersonTvShowCast[];
1278
+ crew: PersonTvShowCrew[];
1279
+ id: number;
1280
+ }
1281
+ interface PersonCombinedCredits {
1282
+ cast: (PersonMovieCast & PersonTvShowCast)[];
1283
+ crew: (PersonMovieCrew & PersonTvShowCrew)[];
1284
+ id: number;
1285
+ }
1286
+ interface PersonDetails {
1287
+ birthday: string;
1288
+ known_for_department: string;
1289
+ deathday: string;
1290
+ id: number;
1291
+ name: string;
1292
+ also_known_as: string[];
1293
+ gender: number;
1294
+ biography: string;
1295
+ popularity: number;
1296
+ place_of_birth: string;
1297
+ profile_path: string;
1298
+ adult: boolean;
1299
+ imdb_id: string;
1300
+ homepage: string;
1301
+ }
1302
+ type PersonChangeValue = string | {
1303
+ profile: {
1304
+ file_path: string;
1305
+ };
1306
+ };
1307
+ interface PopularPeople {
1308
+ page: number;
1309
+ results: Person[];
1310
+ total_results: number;
1311
+ total_pages: number;
1312
+ }
1313
+ interface PeopleImages {
1314
+ id: number;
1315
+ profiles: Image[];
1316
+ }
1317
+ interface TaggedImage {
1318
+ aspect_ratio: number;
1319
+ file_path: string;
1320
+ height: number;
1321
+ id: string;
1322
+ iso_639_1: string;
1323
+ vote_average: number;
1324
+ vote_count: number;
1325
+ width: number;
1326
+ image_type: string;
1327
+ media_type: string;
1328
+ media: Movie | TV;
1329
+ }
1330
+ interface TaggedImages {
1331
+ page: number;
1332
+ results: TaggedImage[];
1333
+ total_results: number;
1334
+ total_pages: number;
1335
+ }
1336
+ interface PersonTranslations {
1337
+ id: number;
1338
+ translations: {
1339
+ iso_3166_1: CountryCode;
1340
+ iso_639_1: string;
1341
+ name: string;
1342
+ english_name: string;
1343
+ data: {
1344
+ biography: string;
1345
+ };
1346
+ };
1347
+ }
1348
+
1349
+ type MonetizationType = 'flatrate' | 'free' | 'ads' | 'rent' | 'buy';
1350
+ interface DiscoverQueryOptions {
1351
+ language?: string;
1352
+ sort_by?: SortOption;
1353
+ page?: number;
1354
+ 'vote_average.gte'?: number;
1355
+ 'vote_count.gte'?: number;
1356
+ 'vote_count.lte'?: number;
1357
+ 'vote_average.lte'?: number;
1358
+ with_watch_providers?: string;
1359
+ watch_region?: string;
1360
+ without_companies?: string;
1361
+ with_watch_monetization_types?: MonetizationType;
1362
+ 'with_runtime.gte'?: number;
1363
+ 'with_runtime.lte'?: number;
1364
+ with_genres?: string;
1365
+ without_genres?: string;
1366
+ with_original_language?: string;
1367
+ without_keywords?: string;
1368
+ with_keywords?: string;
1369
+ with_companies?: string;
1370
+ include_adult?: boolean;
1371
+ }
1372
+ interface MovieQueryOptions extends DiscoverQueryOptions {
1373
+ region?: string;
1374
+ certification_country?: string;
1375
+ certification?: string;
1376
+ 'certification.lte'?: string;
1377
+ 'certification.gte'?: string;
1378
+ include_adult?: boolean;
1379
+ include_video?: boolean;
1380
+ primary_release_year?: number;
1381
+ 'primary_release_date.gte'?: string;
1382
+ 'primary_release_date.lte'?: string;
1383
+ 'release_date.gte'?: string;
1384
+ 'release_date.lte'?: string;
1385
+ with_release_type?: string;
1386
+ year?: number;
1387
+ with_cast?: string;
1388
+ with_crew?: string;
1389
+ with_people?: string;
1390
+ }
1391
+ interface TvShowQueryOptions extends DiscoverQueryOptions {
1392
+ 'air_date.gte'?: string;
1393
+ 'air_date.lte'?: string;
1394
+ 'first_air_date.gte'?: string;
1395
+ 'first_air_date.lte'?: string;
1396
+ first_air_date_year?: number;
1397
+ timezone?: string;
1398
+ with_networks?: string;
1399
+ include_null_first_air_dates?: boolean;
1400
+ screened_theatrically?: boolean;
1401
+ with_status?: string;
1402
+ with_type?: string;
1403
+ }
1404
+ 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';
1405
+ interface MovieDiscoverResult {
1406
+ page: number;
1407
+ results: Movie[];
1408
+ total_results: number;
1409
+ total_pages: number;
1410
+ }
1411
+ interface TvShowDiscoverResult {
1412
+ page: number;
1413
+ results: TV[];
1414
+ total_results: number;
1415
+ total_pages: number;
1416
+ }
1417
+
1418
+ interface ReviewDetails extends Review {
1419
+ iso_639_1: string;
1420
+ media_id: number;
1421
+ media_title: number;
1422
+ media_type: number;
1423
+ }
1424
+
1425
+ type TimeWindow = 'day' | 'week';
1426
+ type TrendingMediaType = MediaType | 'all';
1427
+ type TrendingResult<T extends TrendingMediaType> = T extends 'tv' ? TV : T extends 'movie' ? Movie : T extends 'person' ? Person : TVWithMediaType | MovieWithMediaType | PersonWithMediaType;
1428
+ interface TrendingResults<T extends TrendingMediaType> {
1429
+ page: number;
1430
+ results: TrendingResult<T>[];
1431
+ total_pages: number;
1432
+ total_results: number;
1433
+ }
1434
+
1435
+ type ExternalSource = 'imdb_id' | 'freebase_mid' | 'freebase_id' | 'tvdb_id' | 'tvrage_id' | 'facebook_id' | 'twitter_id' | 'instagram_id';
1436
+ interface ExternalIdOptions {
1437
+ external_source: ExternalSource;
1438
+ language?: string;
1439
+ }
1440
+ type MediaTagged<T> = T & {
1441
+ media_type: MediaType;
1442
+ };
1443
+ interface FindResult {
1444
+ movie_results: MediaTagged<Movie>[];
1445
+ person_results: MediaTagged<Person>[];
1446
+ tv_results: MediaTagged<TV>[];
1447
+ tv_episode_results: MediaTagged<Episode>[];
1448
+ tv_season_results: MediaTagged<Season & {
1449
+ show_id: string;
1450
+ }>[];
1451
+ }
1452
+
1453
+ interface KeywordsOptions extends PageOption {
1454
+ include_adult?: boolean;
1455
+ language?: string;
1456
+ }
1457
+ interface BelongingMovies {
1458
+ page: number;
1459
+ results: Movie[];
1460
+ total_results: number;
1461
+ total_pages: number;
1462
+ }
1463
+ interface Keyword {
1464
+ id: number;
1465
+ name: string;
1466
+ }
1467
+ interface Keywords {
1468
+ id: number;
1469
+ keywords: Keyword[];
1470
+ }
1471
+
1472
+ interface Collection {
1473
+ id: number;
1474
+ name: string;
1475
+ overview: string;
1476
+ poster_path: string;
1477
+ backdrop_path: string;
1478
+ }
1479
+ interface CollectionDetails extends Collection {
1480
+ parts: Movie[];
1481
+ }
1482
+ interface CollectionImageOptions extends LanguageOption {
1483
+ /**
1484
+ * a list of ISO-639-1 values to query
1485
+ */
1486
+ include_image_language?: string[];
1487
+ }
1488
+
1489
+ interface EpisodeSelection {
1490
+ tvShowID: number;
1491
+ seasonNumber: number;
1492
+ episodeNumber: number;
1493
+ }
1494
+ interface Episode {
1495
+ air_date: string;
1496
+ episode_number: number;
1497
+ crew: Crew$1[];
1498
+ guest_stars: GuestStar[];
1499
+ id: number;
1500
+ name: string;
1501
+ overview: string;
1502
+ production_code: string;
1503
+ season_number: number;
1504
+ still_path: string;
1505
+ vote_average: number;
1506
+ vote_count: number;
1507
+ runtime: number;
1508
+ show_id: number;
1509
+ }
1510
+ interface GuestStar {
1511
+ credit_id: string;
1512
+ order: number;
1513
+ character: string;
1514
+ adult: boolean;
1515
+ gender: number | null;
1516
+ id: number;
1517
+ known_for_department: string;
1518
+ name: string;
1519
+ original_name: string;
1520
+ popularity: number;
1521
+ profile_path: string | null;
1522
+ }
1523
+ interface TvEpisodeCredit extends Credits {
1524
+ guest_stars: GuestStar[];
1525
+ }
1526
+ interface TvEpisodeTranslations {
1527
+ id: number;
1528
+ translations: {
1529
+ iso_3166_1: CountryCode;
1530
+ iso_639_1: string;
1531
+ name: string;
1532
+ english_name: string;
1533
+ data: {
1534
+ name: string;
1535
+ overview: string;
1536
+ };
1537
+ };
1538
+ }
1539
+ type TvEpisodeChangeValue = string | unknown;
1540
+
1541
+ interface SeasonSelection {
1542
+ tvShowID: number;
1543
+ seasonNumber: number;
1544
+ }
1545
+ interface SeasonDetails {
1546
+ air_date: string;
1547
+ episodes: Episode[];
1548
+ name: string;
1549
+ overview: string;
1550
+ id: number;
1551
+ poster_path: string | null;
1552
+ season_number: number;
1553
+ }
1554
+ type TvSeasonChangeValue = string | {
1555
+ episode_id: number;
1556
+ episode_number: number;
1557
+ };
1558
+
1559
+ interface ErrorResponse {
1560
+ status_code: number;
1561
+ status_message: string;
1562
+ success: boolean;
1563
+ }
1564
+ type MediaType = 'movie' | 'tv' | 'person';
1565
+ interface AuthorDetails {
1566
+ name: string;
1567
+ username: string;
1568
+ avatar_path: string;
1569
+ rating?: number;
1570
+ }
1571
+ type KnownFor = MovieWithMediaType | TVWithMediaType;
1572
+ interface Person {
1573
+ id: number;
1574
+ name: string;
1575
+ original_name: string;
1576
+ known_for: KnownFor[];
1577
+ profile_path: string;
1578
+ adult: boolean;
1579
+ known_for_department: string;
1580
+ gender: number;
1581
+ popularity: number;
1582
+ }
1583
+ interface PersonWithMediaType extends Person {
1584
+ media_type: 'person';
1585
+ }
1586
+ interface Movie {
1587
+ id: number;
1588
+ poster_path: string;
1589
+ adult: boolean;
1590
+ overview: string;
1591
+ release_date: string;
1592
+ genre_ids: number[];
1593
+ original_title: string;
1594
+ original_language: string;
1595
+ title: string;
1596
+ backdrop_path: string;
1597
+ popularity: number;
1598
+ vote_count: number;
1599
+ video: boolean;
1600
+ vote_average: number;
1601
+ }
1602
+ interface MovieWithMediaType extends Movie {
1603
+ media_type: 'movie';
1604
+ }
1605
+ interface Company {
1606
+ id: number;
1607
+ logo_path: string;
1608
+ name: string;
1609
+ origin_country: string;
1610
+ }
1611
+ interface TV {
1612
+ id: number;
1613
+ adult: boolean;
1614
+ name: string;
1615
+ first_air_date: string;
1616
+ backdrop_path: string;
1617
+ genre_ids: number[];
1618
+ origin_country: string[];
1619
+ original_language: string;
1620
+ original_name: string;
1621
+ overview: string;
1622
+ poster_path: string;
1623
+ popularity: number;
1624
+ vote_count: number;
1625
+ vote_average: number;
1626
+ }
1627
+ interface TVWithMediaType extends TV {
1628
+ media_type: 'tv';
1629
+ }
1630
+ interface Genre {
1631
+ id: number;
1632
+ name: string;
1633
+ }
1634
+ interface ExternalIds {
1635
+ imdb_id: string;
1636
+ facebook_id: string;
1637
+ instagram_id: string;
1638
+ twitter_id: string;
1639
+ tvdb_id?: number;
1640
+ freebase_mid?: string;
1641
+ freebase_id?: string;
1642
+ tvrage_id?: number;
1643
+ wikidata_id: string;
1644
+ tiktok_id?: string;
1645
+ youtube_id?: string;
1646
+ id: number;
1647
+ }
1648
+ interface ProductionCompany {
1649
+ id: number;
1650
+ logo_path: string;
1651
+ name: string;
1652
+ origin_country: string;
1653
+ }
1654
+ interface ProductionCountry {
1655
+ iso_3166_1: CountryCode;
1656
+ name: string;
1657
+ }
1658
+ interface SpokenLanguage {
1659
+ english_name: string;
1660
+ iso_639_1: string;
1661
+ name: string;
1662
+ }
1663
+ interface ContentRatings {
1664
+ results: ContentRatingsResult[];
1665
+ id: number;
1666
+ }
1667
+ interface ContentRatingsResult {
1668
+ descriptor: unknown[];
1669
+ iso_3166_1: CountryCode;
1670
+ rating: string;
1671
+ }
1672
+ interface Recommendation {
1673
+ adult: boolean;
1674
+ backdrop_path?: string;
1675
+ genre_ids: number[];
1676
+ id: number;
1677
+ original_language: string;
1678
+ original_title: string;
1679
+ overview: string;
1680
+ release_date: string;
1681
+ poster_path?: string;
1682
+ popularity: number;
1683
+ title: string;
1684
+ video: boolean;
1685
+ vote_average: number;
1686
+ vote_count: number;
1687
+ }
1688
+ interface Recommendations {
1689
+ page: number;
1690
+ results: Recommendation[];
1691
+ total_pages: number;
1692
+ total_results: number;
1693
+ }
1694
+ interface Review {
1695
+ author: string;
1696
+ author_details: AuthorDetails;
1697
+ content: string;
1698
+ created_at: string;
1699
+ id: string;
1700
+ updated_at: string;
1701
+ url: string;
1702
+ }
1703
+ interface Reviews {
1704
+ id: number;
1705
+ page: number;
1706
+ results: Review[];
1707
+ total_pages: number;
1708
+ total_results: number;
1709
+ }
1710
+ interface TranslationData {
1711
+ title: string;
1712
+ overview: string;
1713
+ homepage: string;
1714
+ }
1715
+ interface Translation {
1716
+ iso_3166_1: CountryCode;
1717
+ iso_639_1: string;
1718
+ name: string;
1719
+ english_name: string;
1720
+ data: TranslationData;
1721
+ }
1722
+ interface Translations {
1723
+ id: number;
1724
+ translations: Translation[];
1725
+ }
1726
+ interface Image {
1727
+ aspect_ratio: number;
1728
+ file_path: string;
1729
+ height: number;
1730
+ iso_639_1: string;
1731
+ vote_average: number;
1732
+ vote_count: number;
1733
+ width: number;
1734
+ }
1735
+ interface Images {
1736
+ id: number;
1737
+ backdrops: Image[];
1738
+ logos: Image[];
1739
+ posters: Image[];
1740
+ }
1741
+ 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"];
1742
+ type CountryCode = (typeof CountryCodes)[number];
1743
+
1744
+ interface Gravatar {
1745
+ hash: string;
1746
+ }
1747
+ interface Avatar {
1748
+ gravatar: Gravatar;
1749
+ }
1750
+ interface AccountDetails {
1751
+ avatar: Avatar;
1752
+ id: number;
1753
+ include_adult: boolean;
1754
+ iso_3166_1: CountryCode;
1755
+ iso_639_1: string;
1756
+ name: string;
1757
+ username: string;
1758
+ }
1759
+
1760
+ declare class Api {
1761
+ private accessToken;
1762
+ constructor(accessToken: string);
1763
+ get<T>(path: string, options?: Record<string, any>): Promise<T>;
1764
+ }
1765
+
1766
+ declare class BaseEndpoint {
1767
+ protected readonly accessToken: string;
1768
+ protected api: Api;
1769
+ constructor(accessToken: string);
1770
+ }
1771
+
1772
+ declare class AccountEndpoint extends BaseEndpoint {
1773
+ details(): Promise<AccountDetails>;
1774
+ }
1775
+
1776
+ declare class CertificationEndpoint extends BaseEndpoint {
1777
+ protected readonly accessToken: string;
1778
+ constructor(accessToken: string);
1779
+ movies(): Promise<Certifications>;
1780
+ tvShows(): Promise<Certifications>;
1781
+ }
1782
+
1783
+ declare class ChangeEndpoint extends BaseEndpoint {
1784
+ protected readonly accessToken: string;
1785
+ constructor(accessToken: string);
1786
+ movies(options?: ChangeOption): Promise<MediaChanges>;
1787
+ tvShows(options?: ChangeOption): Promise<MediaChanges>;
1788
+ person(options?: ChangeOption): Promise<MediaChanges>;
1789
+ }
1790
+
1791
+ declare class CreditsEndpoint extends BaseEndpoint {
1792
+ protected readonly accessToken: string;
1793
+ constructor(accessToken: string);
1794
+ getById(id: string): Promise<CreditResponse>;
1795
+ }
1796
+
1797
+ interface SearchOptions {
1798
+ query: string;
1799
+ page?: number;
1800
+ }
1801
+ interface MovieSearchOptions extends SearchOptions, LanguageOption, PageOption, RegionOption {
1802
+ include_adult?: boolean;
1803
+ year?: number;
1804
+ primary_release_year?: number;
1805
+ }
1806
+ interface TvSearchOptions extends SearchOptions, LanguageOption, PageOption {
1807
+ include_adult?: boolean;
1808
+ year?: number;
1809
+ first_air_date_year?: number;
1810
+ }
1811
+ interface PeopleSearchOptions extends SearchOptions, LanguageOption, PageOption {
1812
+ include_adult?: boolean;
1813
+ }
1814
+ interface MultiSearchOptions extends SearchOptions, LanguageOption, PageOption {
1815
+ include_adult?: boolean;
1816
+ }
1817
+ declare class SearchEndpoint extends BaseEndpoint {
1818
+ protected readonly accessToken: string;
1819
+ constructor(accessToken: string);
1820
+ companies(options: SearchOptions): Promise<Search<Company>>;
1821
+ collections(options: SearchOptions): Promise<Search<Collection>>;
1822
+ keywords(options: SearchOptions): Promise<Search<{
1823
+ id: string;
1824
+ name: string;
1825
+ }>>;
1826
+ movies(options: MovieSearchOptions): Promise<Search<Movie>>;
1827
+ people(options: PeopleSearchOptions): Promise<Search<Person>>;
1828
+ tvShows(options: TvSearchOptions): Promise<Search<TV>>;
1829
+ multi(options: MultiSearchOptions): Promise<Search<MultiSearchResult>>;
1830
+ }
1831
+
1832
+ interface Genres {
1833
+ genres: Array<{
1834
+ id: number;
1835
+ name: string;
1836
+ }>;
1837
+ }
1838
+ declare class GenreEndpoint extends BaseEndpoint {
1839
+ protected readonly accessToken: string;
1840
+ constructor(accessToken: string);
1841
+ movies(options?: LanguageOption): Promise<Genres>;
1842
+ tvShows(options?: LanguageOption): Promise<Genres>;
1843
+ }
1844
+
1845
+ interface MoviesImageSearchOptions extends LanguageOption {
1846
+ /**
1847
+ * a list of ISO-639-1 values to query
1848
+ */
1849
+ include_image_language?: string[];
1850
+ }
1851
+ declare class MoviesEndpoint extends BaseEndpoint {
1852
+ protected readonly accessToken: string;
1853
+ constructor(accessToken: string);
1854
+ details<T extends AppendToResponseMovieKey[] | undefined>(id: number, appendToResponse?: T, language?: string): Promise<AppendToResponse<MovieDetails, T, "movie">>;
1855
+ alternativeTitles(id: number): Promise<AlternativeTitles>;
1856
+ changes(id: number, options?: ChangeOption): Promise<Changes<MovieChangeValue>>;
1857
+ credits(id: number, options?: LanguageOption): Promise<Credits>;
1858
+ externalIds(id: number): Promise<ExternalIds>;
1859
+ images(id: number, options?: MoviesImageSearchOptions): Promise<Images>;
1860
+ keywords(id: number): Promise<Keywords>;
1861
+ lists(id: number, options?: LanguageOption & PageOption): Promise<MovieLists>;
1862
+ recommendations(id: number, options?: LanguageOption & PageOption): Promise<Recommendations>;
1863
+ releaseDates(id: number): Promise<ReleaseDates>;
1864
+ reviews(id: number, options?: LanguageOption & PageOption): Promise<Reviews>;
1865
+ similar(id: number, options?: LanguageOption & PageOption): Promise<SimilarMovies>;
1866
+ translations(id: number): Promise<Translations>;
1867
+ videos(id: number, options?: LanguageOption): Promise<Videos>;
1868
+ /**
1869
+ * Powered by JustWatch
1870
+ * @param id
1871
+ */
1872
+ watchProviders(id: number): Promise<WatchProviders>;
1873
+ latest(): Promise<LatestMovie>;
1874
+ nowPlaying(options?: PageOption & LanguageOption & RegionOption): Promise<MoviesPlayingNow>;
1875
+ popular(options?: LanguageOption & PageOption): Promise<PopularMovies>;
1876
+ topRated(options?: PageOption & LanguageOption & RegionOption): Promise<TopRatedMovies>;
1877
+ upcoming(options?: PageOption & LanguageOption & RegionOption): Promise<UpcomingMovies>;
1878
+ }
1879
+
1880
+ declare class ConfigurationEndpoint extends BaseEndpoint {
1881
+ protected readonly accessToken: string;
1882
+ constructor(accessToken: string);
1883
+ getApiConfiguration(): Promise<Configuration>;
1884
+ getCountries(): Promise<CountryConfiguration[]>;
1885
+ getLanguages(): Promise<LanguageConfiguration[]>;
1886
+ getJobs(): Promise<JobConfiguration[]>;
1887
+ getPrimaryTranslations(): Promise<string[]>;
1888
+ getTimezones(): Promise<TimezoneConfiguration[]>;
1889
+ }
1890
+
1891
+ declare class TvShowsEndpoint extends BaseEndpoint {
1892
+ protected readonly accessToken: string;
1893
+ constructor(accessToken: string);
1894
+ details<T extends AppendToResponseTvKey[] | undefined>(id: number, appendToResponse?: T, language?: string): Promise<AppendToResponse<TvShowDetails, T, "tvShow">>;
1895
+ alternativeTitles(id: number): Promise<AlternativeTitles>;
1896
+ changes(id: number, options?: ChangeOption): Promise<Changes<TvShowChangeValue>>;
1897
+ contentRatings(id: number): Promise<ContentRatings>;
1898
+ aggregateCredits(id: number, options?: LanguageOption): Promise<AggregateCredits>;
1899
+ credits(id: number, options?: LanguageOption): Promise<Credits>;
1900
+ season(tvId: number, seasonNumber: number): Promise<SeasonDetails>;
1901
+ episodeGroups(id: number): Promise<EpisodeGroups>;
1902
+ externalIds(id: number): Promise<ExternalIds>;
1903
+ images(id: number, options?: TvShowImageOptions): Promise<Images>;
1904
+ keywords(id: number): Promise<Keywords>;
1905
+ recommendations(id: number, options?: LanguageOption & PageOption): Promise<Recommendations>;
1906
+ reviews(id: number, options?: LanguageOption & PageOption): Promise<Reviews>;
1907
+ screenedTheatrically(id: number): Promise<ScreenedTheatrically>;
1908
+ similar(id: number, options?: LanguageOption & PageOption): Promise<SimilarTvShows>;
1909
+ translations(id: number): Promise<Translations>;
1910
+ videos(id: number, options?: TvShowVideoOptions): Promise<Videos>;
1911
+ /**
1912
+ * Powered by JustWatch
1913
+ * @param id
1914
+ */
1915
+ watchProviders(id: number): Promise<WatchProviders>;
1916
+ latest(): Promise<LatestTvShows>;
1917
+ onTheAir(options?: PageOption & LanguageOption & TimezoneOption): Promise<OnTheAir>;
1918
+ airingToday(options?: PageOption & LanguageOption & TimezoneOption): Promise<TvShowsAiringToday>;
1919
+ popular(options?: PageOption & LanguageOption): Promise<PopularTvShows>;
1920
+ topRated(options?: PageOption & LanguageOption): Promise<TopRatedTvShows>;
1921
+ }
1922
+
1923
+ declare class DiscoverEndpoint extends BaseEndpoint {
1924
+ movie(options?: MovieQueryOptions): Promise<MovieDiscoverResult>;
1925
+ tvShow(options?: TvShowQueryOptions): Promise<TvShowDiscoverResult>;
1926
+ }
1927
+
1928
+ declare class PeopleEndpoint extends BaseEndpoint {
1929
+ details<T extends AppendToResponsePersonKey[] | undefined>(id: number, appendToResponse?: T, language?: string): Promise<AppendToResponse<PersonDetails, T, "person">>;
1930
+ changes(id: number, options?: ChangeOption): Promise<Changes<PersonChangeValue>>;
1931
+ movieCredits(id: number, options?: LanguageOption): Promise<PersonMovieCredit>;
1932
+ tvShowCredits(id: number, options?: LanguageOption): Promise<PersonTvShowCredit>;
1933
+ combinedCredits(id: number, options?: LanguageOption): Promise<PersonCombinedCredits>;
1934
+ externalId(id: number): Promise<ExternalIds>;
1935
+ images(id: number): Promise<PeopleImages>;
1936
+ /**
1937
+ * @deprecated
1938
+ */
1939
+ taggedImages(id: number, options?: PageOption): Promise<TaggedImages>;
1940
+ translation(id: number): Promise<PersonTranslations>;
1941
+ latest(): Promise<PersonDetails>;
1942
+ popular(options?: LanguageOption & PageOption): Promise<PopularPeople>;
1943
+ }
1944
+
1945
+ declare class ReviewEndpoint extends BaseEndpoint {
1946
+ details(id: string): Promise<ReviewDetails>;
1947
+ }
1948
+
1949
+ declare class TrendingEndpoint extends BaseEndpoint {
1950
+ trending<T extends TrendingMediaType>(mediaType: T, timeWindow: TimeWindow, options?: LanguageOption & PageOption): Promise<TrendingResults<T>>;
1951
+ }
1952
+
1953
+ declare class FindEndpoint extends BaseEndpoint {
1954
+ byExternalId(id: string, options: ExternalIdOptions): Promise<FindResult>;
1955
+ }
1956
+
1957
+ declare class KeywordsEndpoint extends BaseEndpoint {
1958
+ details(keywordId: number): Promise<Keyword>;
1959
+ /**
1960
+ *
1961
+ * @deprecated
1962
+ */
1963
+ belongingMovies(keywordId: number, options?: KeywordsOptions): Promise<BelongingMovies>;
1964
+ }
1965
+
1966
+ declare class CollectionsEndpoint extends BaseEndpoint {
1967
+ protected readonly accessToken: string;
1968
+ constructor(accessToken: string);
1969
+ details(id: number, options?: LanguageOption): Promise<CollectionDetails>;
1970
+ images(id: number, options?: CollectionImageOptions): Promise<ImageCollection>;
1971
+ translations(id: number, options?: LanguageOption): Promise<Translations>;
1972
+ }
1973
+
1974
+ interface TvSeasonImageSearchOptions extends LanguageOption {
1975
+ /**
1976
+ * a list of ISO-639-1 values to query
1977
+ */
1978
+ include_image_language?: string[];
1979
+ }
1980
+ interface TvSeasonVideoSearchOptions extends LanguageOption {
1981
+ /**
1982
+ * a list of ISO-639-1 values to query
1983
+ */
1984
+ include_video_language?: string[];
1985
+ }
1986
+ declare class TvSeasonsEndpoint extends BaseEndpoint {
1987
+ details<T extends AppendToResponseTvSeasonKey[] | undefined>(seasonSelection: SeasonSelection, appendToResponse?: T, options?: LanguageOption): Promise<AppendToResponse<SeasonDetails, T, "tvSeason">>;
1988
+ aggregateCredits(seasonSelection: SeasonSelection, options?: LanguageOption): Promise<AggregateCredits>;
1989
+ changes(seasonId: number, options?: ChangeOption): Promise<Changes<TvSeasonChangeValue>>;
1990
+ credits(seasonSelection: SeasonSelection, options?: LanguageOption): Promise<Credits>;
1991
+ externalIds(seasonSelection: SeasonSelection, options?: LanguageOption): Promise<ExternalIds>;
1992
+ images(seasonSelection: SeasonSelection, options?: TvSeasonImageSearchOptions): Promise<Images>;
1993
+ videos(seasonSelection: SeasonSelection, options?: TvSeasonVideoSearchOptions): Promise<Videos>;
1994
+ translations(seasonSelection: SeasonSelection, options?: LanguageOption): Promise<Translations>;
1995
+ }
1996
+
1997
+ interface TvEpisodeImageSearchOptions extends LanguageOption {
1998
+ /**
1999
+ * a list of ISO-639-1 values to query
2000
+ */
2001
+ include_image_language?: string[];
2002
+ }
2003
+ interface TvEpisodeVideoSearchOptions extends LanguageOption {
2004
+ /**
2005
+ * a list of ISO-639-1 values to query
2006
+ */
2007
+ include_video_language?: string[];
2008
+ }
2009
+ declare class TvEpisodesEndpoint extends BaseEndpoint {
2010
+ details<T extends AppendToResponseTvEpisodeKey[] | undefined>(episodeSelection: EpisodeSelection, appendToResponse?: T, options?: LanguageOption): Promise<AppendToResponse<Omit<Episode, "show_id">, T, "tvEpisode">>;
2011
+ changes(episodeID: number, options?: ChangeOption): Promise<Changes<unknown>>;
2012
+ credits(episodeSelection: EpisodeSelection, options?: LanguageOption): Promise<TvEpisodeCredit>;
2013
+ externalIds(episodeSelection: EpisodeSelection): Promise<ExternalIds>;
2014
+ images(episodeSelection: EpisodeSelection, options?: TvEpisodeImageSearchOptions): Promise<Images>;
2015
+ translations(episodeSelection: EpisodeSelection): Promise<TvEpisodeTranslations>;
2016
+ videos(episodeSelection: EpisodeSelection, options?: TvEpisodeVideoSearchOptions): Promise<Videos>;
2017
+ }
2018
+
2019
+ type ProviderOptions = WatchRegionOption & LanguageOption;
2020
+ declare class WatchProvidersEndpoint extends BaseEndpoint {
2021
+ protected readonly accessToken: string;
2022
+ constructor(accessToken: string);
2023
+ getRegions(options?: LanguageOption): Promise<RegionResult>;
2024
+ getMovieProviders(options?: ProviderOptions): Promise<WatchProviderResult>;
2025
+ getTvProviders(options?: ProviderOptions): Promise<WatchProviderResult>;
2026
+ }
2027
+
2028
+ declare class CompaniesEndpoint extends BaseEndpoint {
2029
+ protected readonly accessToken: string;
2030
+ constructor(accessToken: string);
2031
+ details(id: number): Promise<CompanyDetails>;
2032
+ alternativeNames(id: number): Promise<AlternativeNames>;
2033
+ images(id: number): Promise<CompanyImages>;
2034
+ }
2035
+
2036
+ declare class NetworksEndpoint extends BaseEndpoint {
2037
+ protected readonly accessToken: string;
2038
+ constructor(accessToken: string);
2039
+ details(id: number): Promise<NetworkDetails>;
2040
+ alternativeNames(id: number): Promise<AlternativeNames>;
2041
+ images(id: number): Promise<NetworkImages>;
2042
+ }
2043
+
2044
+ declare class TMDB {
2045
+ private readonly accessToken;
2046
+ constructor(accessToken: string);
2047
+ get account(): AccountEndpoint;
2048
+ get configuration(): ConfigurationEndpoint;
2049
+ get certifications(): CertificationEndpoint;
2050
+ get changes(): ChangeEndpoint;
2051
+ get credits(): CreditsEndpoint;
2052
+ get companies(): CompaniesEndpoint;
2053
+ get networks(): NetworksEndpoint;
2054
+ get search(): SearchEndpoint;
2055
+ get genres(): GenreEndpoint;
2056
+ get movies(): MoviesEndpoint;
2057
+ get tvShows(): TvShowsEndpoint;
2058
+ get tvEpisode(): TvEpisodesEndpoint;
2059
+ get discover(): DiscoverEndpoint;
2060
+ get people(): PeopleEndpoint;
2061
+ get review(): ReviewEndpoint;
2062
+ get trending(): TrendingEndpoint;
2063
+ get find(): FindEndpoint;
2064
+ get keywords(): KeywordsEndpoint;
2065
+ get collections(): CollectionsEndpoint;
2066
+ get tvSeasons(): TvSeasonsEndpoint;
2067
+ get watchProviders(): WatchProvidersEndpoint;
2068
+ }
2069
+
2070
+ /**
2071
+ * Utility method to construct full url for image
2072
+ * based on configuration
2073
+ *
2074
+ * https://developers.themoviedb.org/3/getting-started/images
2075
+ * @param {string} baseUrl base image url
2076
+ * @param {string} fileSize file size
2077
+ * @param {string} imagePath raw image path
2078
+ * @param {boolean} svg get svg version if true
2079
+ */
2080
+ declare const getFullImagePath: (baseUrl: string, fileSize: string, imagePath: string, svg?: boolean) => string;
2081
+
2082
+ declare function parseOptions(options?: Record<string, any>): string;
2083
+
2084
+ export { AvailableLanguages, BackdropSize, ChangeKey, CountryCodes, LogoSize, MediaSize, PosterSize, ProfileSize, ReleaseDateType, StillSize, TMDB, getFullImagePath, parseOptions };
2085
+ export type { AggregateCast, AggregateCredits, AggregateCrew, AiringTodayResult, AlternativeNames, AlternativeTitles, AppendToResponse, AppendToResponseMediaType, AppendToResponseMovieKey, AppendToResponsePersonKey, AppendToResponseTvEpisodeKey, AppendToResponseTvKey, AppendToResponseTvSeasonKey, AuthorDetails, AvailableLanguage, BelongingMovies, BelongsToCollection, Buy, Cast$1 as Cast, CastRole, Certification, Certifications, Change, ChangeItem, ChangeOption, Changes, Collection, CollectionDetails, CollectionImageOptions, Company, CompanyDetails, CompanyImages, Configuration, ContentRatings, ContentRatingsResult, CountryCode, CountryConfiguration, CreatedBy, CreditResponse, CreditSeason, Credits, Crew$1 as Crew, CrewJob, Dates, DiscoverQueryOptions, Episode, EpisodeGroup, EpisodeGroups, EpisodeSelection, ErrorResponse, ExternalIdOptions, ExternalIds, ExternalSource, FindResult, Flatrate, Genre, GuestStar, Image, ImageCollection, ImageConfiguration, Images, JobConfiguration, Keyword, Keywords, KeywordsOptions, KnownFor, LanguageConfiguration, LanguageOption, LastEpisodeToAir, LatestMovie, LatestTvShows, Media, MediaChange, MediaChanges, MediaType, MonetizationType, Movie, MovieChangeValue, MovieDetails, MovieDiscoverResult, MovieList, MovieLists, MovieQueryOptions, MovieWithMediaType, MoviesPlayingNow, MultiSearchResult, Name, Network, NetworkDetails, NetworkImages, NextEpisodeToAir, OnTheAir, OnTheAirResult, PageOption, ParentCompany, PeopleImages, Person, PersonChangeValue, PersonCombinedCredits, PersonDetails, PersonMovieCast, PersonMovieCredit, PersonMovieCrew, PersonTranslations, PersonTvShowCast, PersonTvShowCredit, PersonTvShowCrew, PersonWithMediaType, PopularMovies, PopularPeople, PopularTvShowResult, PopularTvShows, ProductionCompany, ProductionCountry, Recommendation, Recommendations, RegionOption, RegionResult, ReleaseDate, ReleaseDateResult, ReleaseDates, Rent, Review, ReviewDetails, Reviews, ScreenedTheatrically, ScreenedTheatricallyResult, Search, Season, SeasonDetails, SeasonSelection, SimilarMovies, SimilarTvShow, SimilarTvShows, SortOption, SpokenLanguage, TV, TVWithMediaType, TaggedImage, TaggedImages, TimeWindow, TimezoneConfiguration, TimezoneOption, Title, TopRatedMovies, TopRatedTvShowResult, TopRatedTvShows, Translation, TranslationData, Translations, TrendingMediaType, TrendingResults, TvEpisodeChangeValue, TvEpisodeCredit, TvEpisodeTranslations, TvSeasonChangeValue, TvShowChangeValue, TvShowDetails, TvShowDiscoverResult, TvShowImageOptions, TvShowQueryOptions, TvShowVideoOptions, TvShowsAiringToday, UpcomingMovies, Video, Videos, WatchLocale, WatchProvider, WatchProviderResult, WatchProviders, WatchRegionOption };