@tdanks2000/tmdb-wrapper 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -23,17 +23,7 @@ interface Certification {
23
23
  order: number;
24
24
  }
25
25
  interface Certifications {
26
- certifications: {
27
- US: Certification[];
28
- CA: Certification[];
29
- DE: Certification[];
30
- GB: Certification[];
31
- AU: Certification[];
32
- BR: Certification[];
33
- FR: Certification[];
34
- NZ: Certification[];
35
- IN: Certification[];
36
- };
26
+ certifications: Record<string, Certification[]>;
37
27
  }
38
28
  //# sourceMappingURL=certification.d.ts.map
39
29
  //#endregion
@@ -65,12 +55,18 @@ interface ChangeItem<T> {
65
55
  }
66
56
  //# sourceMappingURL=changes.d.ts.map
67
57
  //#endregion
58
+ //#region src/@types/wire.d.ts
59
+ type TMDBDate = string;
60
+ type TMDBDateTime = string;
61
+ type Nullable<T> = T | null;
62
+ //# sourceMappingURL=wire.d.ts.map
63
+ //#endregion
68
64
  //#region src/@types/endpoints/collection.d.ts
69
65
  interface Collection {
70
66
  id: number;
71
- backdrop_path: string;
67
+ backdrop_path: Nullable<string>;
72
68
  name: string;
73
- poster_path: string;
69
+ poster_path: Nullable<string>;
74
70
  adult: boolean;
75
71
  original_language: string;
76
72
  original_name: string;
@@ -228,7 +224,7 @@ declare enum ChangeKeys {
228
224
  //#region src/@types/endpoints/credits.d.ts
229
225
  interface CreditSeason {
230
226
  air_date?: string;
231
- poster_path?: string;
227
+ poster_path: Nullable<string>;
232
228
  season_number?: number;
233
229
  }
234
230
  interface Media$1 {
@@ -238,11 +234,11 @@ interface Media$1 {
238
234
  vote_count?: number;
239
235
  overview?: string;
240
236
  vote_average?: number;
241
- backdrop_path?: string;
237
+ backdrop_path: Nullable<string>;
242
238
  genre_ids?: number[];
243
239
  original_name?: string;
244
240
  origin_country?: string[];
245
- poster_path?: string;
241
+ poster_path: Nullable<string>;
246
242
  original_language?: string;
247
243
  popularity?: number;
248
244
  character?: string;
@@ -275,7 +271,7 @@ interface Cast {
275
271
  name: string;
276
272
  original_name: string;
277
273
  popularity: number;
278
- profile_path: string;
274
+ profile_path: Nullable<string>;
279
275
  cast_id: number;
280
276
  character: string;
281
277
  credit_id: string;
@@ -289,7 +285,7 @@ interface Crew {
289
285
  name: string;
290
286
  original_name: string;
291
287
  popularity: number;
292
- profile_path: string;
288
+ profile_path: Nullable<string>;
293
289
  credit_id: string;
294
290
  department: string;
295
291
  job: string;
@@ -336,7 +332,7 @@ interface AggregateCast {
336
332
  name: string;
337
333
  original_name: string;
338
334
  popularity: number;
339
- profile_path: string;
335
+ profile_path: Nullable<string>;
340
336
  roles: CastRole[];
341
337
  total_episode_count: number;
342
338
  order: number;
@@ -354,7 +350,7 @@ interface AggregateCrew {
354
350
  name: string;
355
351
  original_name: string;
356
352
  popularity: number;
357
- profile_path: string;
353
+ profile_path: Nullable<string>;
358
354
  jobs: CrewJob[];
359
355
  department: string;
360
356
  total_episode_count: number;
@@ -479,8 +475,8 @@ interface PageOption {
479
475
  page?: number;
480
476
  }
481
477
  interface ChangeOption extends PageOption {
482
- start_date?: Date;
483
- end_date?: Date;
478
+ start_date?: TMDBDate;
479
+ end_date?: TMDBDate;
484
480
  }
485
481
  type AppendToResponseMovieKey = "images" | "videos" | "credits" | "recommendations" | "reviews" | "changes" | "similar" | "lists" | "release_dates" | "alternative_titles" | "external_ids" | "translations" | "watch/providers" | "keywords";
486
482
  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";
@@ -560,12 +556,12 @@ interface Keywords {
560
556
  interface BelongsToCollection {
561
557
  id: number;
562
558
  name: string;
563
- poster_path: string;
564
- backdrop_path: string;
559
+ poster_path: Nullable<string>;
560
+ backdrop_path: Nullable<string>;
565
561
  }
566
562
  interface MovieDetails {
567
563
  adult: boolean;
568
- backdrop_path: string;
564
+ backdrop_path: Nullable<string>;
569
565
  belongs_to_collection?: BelongsToCollection;
570
566
  budget: number;
571
567
  genres: Genre[];
@@ -576,7 +572,7 @@ interface MovieDetails {
576
572
  original_title: string;
577
573
  overview: string;
578
574
  popularity: number;
579
- poster_path?: string;
575
+ poster_path: Nullable<string>;
580
576
  production_companies: ProductionCompany[];
581
577
  production_countries: ProductionCountry[];
582
578
  release_date: string;
@@ -601,7 +597,7 @@ declare enum ReleaseDateType {
601
597
  interface ReleaseDate {
602
598
  certification: string;
603
599
  iso_639_1: string;
604
- release_date: Date;
600
+ release_date: TMDBDateTime;
605
601
  type: ReleaseDateType;
606
602
  note: string;
607
603
  }
@@ -627,7 +623,7 @@ interface MovieList {
627
623
  iso_639_1: string;
628
624
  list_type: string;
629
625
  name: string;
630
- poster_path: string;
626
+ poster_path: Nullable<string>;
631
627
  }
632
628
  interface MovieLists {
633
629
  id: number;
@@ -638,7 +634,7 @@ interface MovieLists {
638
634
  }
639
635
  interface LatestMovie {
640
636
  adult: boolean;
641
- backdrop_path?: string;
637
+ backdrop_path: Nullable<string>;
642
638
  belongs_to_collection?: BelongsToCollection;
643
639
  budget: number;
644
640
  genres: Genre[];
@@ -649,7 +645,7 @@ interface LatestMovie {
649
645
  original_title: string;
650
646
  overview: string;
651
647
  popularity: number;
652
- poster_path: string;
648
+ poster_path: Nullable<string>;
653
649
  production_companies: ProductionCompany[];
654
650
  production_countries: ProductionCountry[];
655
651
  release_date: string;
@@ -728,8 +724,8 @@ interface Cast$1 {
728
724
  credit_id: string;
729
725
  vote_count: number;
730
726
  id: number;
731
- backdrop_path: string;
732
- poster_path: string;
727
+ backdrop_path: Nullable<string>;
728
+ poster_path: Nullable<string>;
733
729
  original_language: string;
734
730
  vote_average: number;
735
731
  genre_ids: number[];
@@ -743,8 +739,8 @@ interface Crew$1 {
743
739
  credit_id: string;
744
740
  overview: string;
745
741
  vote_count: number;
746
- poster_path: string;
747
- backdrop_path: string;
742
+ poster_path: Nullable<string>;
743
+ backdrop_path: Nullable<string>;
748
744
  popularity: number;
749
745
  genre_ids: number[];
750
746
  job: string;
@@ -804,14 +800,14 @@ interface PersonDetails {
804
800
  biography: string;
805
801
  popularity: number;
806
802
  place_of_birth: string;
807
- profile_path: string;
803
+ profile_path: Nullable<string>;
808
804
  adult: boolean;
809
805
  imdb_id: string;
810
806
  homepage: string;
811
807
  }
812
808
  type PersonChangeValue = string | {
813
809
  profile: {
814
- file_path: string;
810
+ file_path: Nullable<string>;
815
811
  };
816
812
  };
817
813
  interface PopularPersons {
@@ -826,7 +822,7 @@ interface PeopleImages {
826
822
  }
827
823
  interface TaggedImage {
828
824
  aspect_ratio: number;
829
- file_path: string;
825
+ file_path: Nullable<string>;
830
826
  height: number;
831
827
  id: string;
832
828
  iso_639_1: string;
@@ -845,7 +841,7 @@ interface TaggedImages {
845
841
  }
846
842
  interface PersonTranslations {
847
843
  id: number;
848
- translations: {
844
+ translations: Array<{
849
845
  iso_3166_1: string;
850
846
  iso_639_1: string;
851
847
  name: string;
@@ -853,14 +849,14 @@ interface PersonTranslations {
853
849
  data: {
854
850
  biography: string;
855
851
  };
856
- };
852
+ }>;
857
853
  }
858
854
  //#endregion
859
855
  //#region src/@types/endpoints/review.d.ts
860
856
  interface ReviewDetails extends Review {
861
857
  iso_639_1: string;
862
858
  media_id: number;
863
- media_title: number;
859
+ media_title: string;
864
860
  media_type: number;
865
861
  }
866
862
  //# sourceMappingURL=review.d.ts.map
@@ -986,7 +982,7 @@ interface SeasonDetails {
986
982
  name: string;
987
983
  overview: string;
988
984
  id: number;
989
- poster_path: string | null;
985
+ poster_path: Nullable<string>;
990
986
  season_number: number;
991
987
  }
992
988
  type TvSeasonChangeValue = string | {
@@ -1013,7 +1009,7 @@ interface CreatedBy {
1013
1009
  credit_id: string;
1014
1010
  name: string;
1015
1011
  gender: number;
1016
- profile_path: string;
1012
+ profile_path: Nullable<string>;
1017
1013
  }
1018
1014
  interface NextEpisodeToAir {
1019
1015
  id: number;
@@ -1027,7 +1023,7 @@ interface NextEpisodeToAir {
1027
1023
  runtime: number;
1028
1024
  season_number: number;
1029
1025
  show_id: number;
1030
- still_path: string;
1026
+ still_path: Nullable<string>;
1031
1027
  }
1032
1028
  interface LastEpisodeToAir {
1033
1029
  air_date: string;
@@ -1037,14 +1033,14 @@ interface LastEpisodeToAir {
1037
1033
  overview: string;
1038
1034
  production_code: string;
1039
1035
  season_number: number;
1040
- still_path: string;
1036
+ still_path: Nullable<string>;
1041
1037
  vote_average: number;
1042
1038
  vote_count: number;
1043
1039
  }
1044
1040
  interface Network {
1045
1041
  name: string;
1046
1042
  id: number;
1047
- logo_path: string;
1043
+ logo_path: Nullable<string>;
1048
1044
  origin_country: string;
1049
1045
  }
1050
1046
  interface Season {
@@ -1053,11 +1049,11 @@ interface Season {
1053
1049
  id: number;
1054
1050
  name: string;
1055
1051
  overview: string;
1056
- poster_path: string;
1052
+ poster_path: Nullable<string>;
1057
1053
  season_number: number;
1058
1054
  }
1059
1055
  interface TvShowDetails {
1060
- backdrop_path: string;
1056
+ backdrop_path: Nullable<string>;
1061
1057
  created_by: CreatedBy[];
1062
1058
  episode_run_time: number[];
1063
1059
  first_air_date: string;
@@ -1078,7 +1074,7 @@ interface TvShowDetails {
1078
1074
  original_name: string;
1079
1075
  overview: string;
1080
1076
  popularity: number;
1081
- poster_path: string;
1077
+ poster_path: Nullable<string>;
1082
1078
  production_companies: ProductionCompany[];
1083
1079
  production_countries: ProductionCountry[];
1084
1080
  seasons: Season[];
@@ -1091,7 +1087,7 @@ interface TvShowDetails {
1091
1087
  }
1092
1088
  interface Network {
1093
1089
  id: number;
1094
- logo_path: string;
1090
+ logo_path: Nullable<string>;
1095
1091
  name: string;
1096
1092
  origin_country: string;
1097
1093
  }
@@ -1118,7 +1114,7 @@ interface ScreenedTheatrically {
1118
1114
  results: ScreenedTheatricallyResult[];
1119
1115
  }
1120
1116
  interface SimilarTvShow {
1121
- backdrop_path: string;
1117
+ backdrop_path: Nullable<string>;
1122
1118
  first_air_date: string;
1123
1119
  genre_ids: number[];
1124
1120
  id: number;
@@ -1126,7 +1122,7 @@ interface SimilarTvShow {
1126
1122
  original_name: string;
1127
1123
  overview: string;
1128
1124
  origin_country: string[];
1129
- poster_path: string;
1125
+ poster_path: Nullable<string>;
1130
1126
  popularity: number;
1131
1127
  name: string;
1132
1128
  vote_average: number;
@@ -1139,7 +1135,7 @@ interface Similartv {
1139
1135
  total_results: number;
1140
1136
  }
1141
1137
  interface Latesttv {
1142
- backdrop_path?: string;
1138
+ backdrop_path: Nullable<string>;
1143
1139
  created_by: CreatedBy[];
1144
1140
  episode_run_time: number[];
1145
1141
  first_air_date: string;
@@ -1158,7 +1154,7 @@ interface Latesttv {
1158
1154
  original_name: string;
1159
1155
  overview?: string;
1160
1156
  popularity: number;
1161
- poster_path?: string;
1157
+ poster_path: Nullable<string>;
1162
1158
  production_companies: ProductionCompany[];
1163
1159
  seasons: Season[];
1164
1160
  status: string;
@@ -1167,10 +1163,10 @@ interface Latesttv {
1167
1163
  vote_count: number;
1168
1164
  }
1169
1165
  interface OnTheAirResult {
1170
- poster_path: string;
1166
+ poster_path: Nullable<string>;
1171
1167
  popularity: number;
1172
1168
  id: number;
1173
- backdrop_path: string;
1169
+ backdrop_path: Nullable<string>;
1174
1170
  vote_average: number;
1175
1171
  overview: string;
1176
1172
  first_air_date: string;
@@ -1188,10 +1184,10 @@ interface OnTheAir {
1188
1184
  total_pages: number;
1189
1185
  }
1190
1186
  interface AiringTodayResult {
1191
- poster_path: string;
1187
+ poster_path: Nullable<string>;
1192
1188
  popularity: number;
1193
1189
  id: number;
1194
- backdrop_path: string;
1190
+ backdrop_path: Nullable<string>;
1195
1191
  vote_average: number;
1196
1192
  overview: string;
1197
1193
  first_air_date: string;
@@ -1209,10 +1205,10 @@ interface tvAiringToday {
1209
1205
  total_pages: number;
1210
1206
  }
1211
1207
  interface PopularTvShowResult {
1212
- poster_path: string;
1208
+ poster_path: Nullable<string>;
1213
1209
  popularity: number;
1214
1210
  id: number;
1215
- backdrop_path: string;
1211
+ backdrop_path: Nullable<string>;
1216
1212
  vote_average: number;
1217
1213
  overview: string;
1218
1214
  first_air_date: string;
@@ -1230,10 +1226,10 @@ interface Populartv {
1230
1226
  total_pages: number;
1231
1227
  }
1232
1228
  interface TopRatedTvShowResult {
1233
- poster_path: string;
1229
+ poster_path: Nullable<string>;
1234
1230
  popularity: number;
1235
1231
  id: number;
1236
- backdrop_path: string;
1232
+ backdrop_path: Nullable<string>;
1237
1233
  vote_average: number;
1238
1234
  overview: string;
1239
1235
  first_air_date: string;
@@ -1295,337 +1291,59 @@ interface WatchRegion {
1295
1291
  interface WatchRegionsResponse {
1296
1292
  results: WatchRegion[];
1297
1293
  }
1298
- interface WatchLocale {
1299
- AR: {
1300
- link: string;
1301
- flatrate: Flatrate[];
1302
- rent: Rent[];
1303
- buy: Buy[];
1304
- };
1305
- AT: {
1306
- link: string;
1307
- rent: Rent[];
1308
- buy: Buy[];
1309
- };
1310
- AU: {
1311
- link: string;
1312
- flatrate: Flatrate[];
1313
- rent: Rent[];
1314
- buy: Buy[];
1315
- };
1316
- BE: {
1317
- link: string;
1318
- buy: Buy[];
1319
- flatrate: Flatrate[];
1320
- rent: Rent[];
1321
- };
1322
- BR: {
1323
- link: string;
1324
- rent: Rent[];
1325
- buy: Buy[];
1326
- flatrate: Flatrate[];
1327
- };
1328
- CA: {
1329
- link: string;
1330
- rent: Rent[];
1331
- flatrate: Flatrate[];
1332
- buy: Buy[];
1333
- };
1334
- CH: {
1335
- link: string;
1336
- rent: Rent[];
1337
- buy: Buy[];
1338
- flatrate: Flatrate[];
1339
- };
1340
- CL: {
1341
- link: string;
1342
- flatrate: Flatrate[];
1343
- buy: Buy[];
1344
- rent: Rent[];
1345
- };
1346
- CO: {
1347
- link: string;
1348
- flatrate: Flatrate[];
1349
- rent: Rent[];
1350
- buy: Buy[];
1351
- };
1352
- CZ: {
1353
- link: string;
1354
- buy: Buy[];
1355
- flatrate: Flatrate[];
1356
- rent: Rent[];
1357
- };
1358
- DE: {
1359
- link: string;
1360
- rent: Rent[];
1361
- buy: Buy[];
1362
- };
1363
- DK: {
1364
- link: string;
1365
- rent: Rent[];
1366
- buy: Buy[];
1367
- flatrate: Flatrate[];
1368
- };
1369
- EC: {
1370
- link: string;
1371
- flatrate: Flatrate[];
1372
- buy: Buy[];
1373
- rent: Rent[];
1374
- };
1375
- EE: {
1376
- link: string;
1377
- flatrate: Flatrate[];
1378
- buy: Buy[];
1379
- rent: Rent[];
1380
- };
1381
- ES: {
1382
- link: string;
1383
- rent: Rent[];
1384
- flatrate: Flatrate[];
1385
- buy: Buy[];
1386
- };
1387
- FI: {
1388
- link: string;
1389
- buy: Buy[];
1390
- flatrate: Flatrate[];
1391
- rent: Rent[];
1392
- };
1393
- FR: {
1394
- link: string;
1395
- flatrate: Flatrate[];
1396
- buy: Buy[];
1397
- rent: Rent[];
1398
- };
1399
- GB: {
1400
- link: string;
1401
- rent: Rent[];
1402
- flatrate: Flatrate[];
1403
- buy: Buy[];
1404
- };
1405
- GR: {
1406
- link: string;
1407
- flatrate: Flatrate[];
1408
- rent: Rent[];
1409
- buy: Buy[];
1410
- };
1411
- HU: {
1412
- link: string;
1413
- rent: Rent[];
1414
- buy: Buy[];
1415
- flatrate: Flatrate[];
1416
- };
1417
- ID: {
1418
- link: string;
1419
- flatrate: Flatrate[];
1420
- rent: Rent[];
1421
- buy: Buy[];
1422
- };
1423
- IE: {
1424
- link: string;
1425
- rent: Rent[];
1426
- flatrate: Flatrate[];
1427
- buy: Buy[];
1428
- };
1429
- IN: {
1430
- link: string;
1431
- buy: Buy[];
1432
- flatrate: Flatrate[];
1433
- rent: Rent[];
1434
- };
1435
- IT: {
1436
- link: string;
1437
- buy: Buy[];
1438
- flatrate: Flatrate[];
1439
- rent: Rent[];
1440
- };
1441
- JP: {
1442
- link: string;
1443
- rent: Rent[];
1444
- flatrate: Flatrate[];
1445
- buy: Buy[];
1446
- };
1447
- KR: {
1448
- link: string;
1449
- buy: Buy[];
1450
- rent: Rent[];
1451
- flatrate: Flatrate[];
1452
- };
1453
- LT: {
1454
- link: string;
1455
- buy: Buy[];
1456
- flatrate: Flatrate[];
1457
- };
1458
- LV: {
1459
- link: string;
1460
- buy: Buy[];
1461
- flatrate: Flatrate[];
1462
- };
1463
- MX: {
1464
- link: string;
1465
- flatrate: Flatrate[];
1466
- rent: Rent[];
1467
- buy: Buy[];
1468
- };
1469
- MY: {
1470
- link: string;
1471
- rent: Rent[];
1472
- flatrate: Flatrate[];
1473
- buy: Buy[];
1474
- };
1475
- NL: {
1476
- link: string;
1477
- flatrate: Flatrate[];
1478
- buy: Buy[];
1479
- rent: Rent[];
1480
- };
1481
- NO: {
1482
- link: string;
1483
- buy: Buy[];
1484
- rent: Rent[];
1485
- flatrate: Flatrate[];
1486
- };
1487
- NZ: {
1488
- link: string;
1489
- buy: Buy[];
1490
- rent: Rent[];
1491
- flatrate: Flatrate[];
1492
- };
1493
- PE: {
1494
- link: string;
1495
- flatrate: Flatrate[];
1496
- rent: Rent[];
1497
- buy: Buy[];
1498
- };
1499
- PH: {
1500
- link: string;
1501
- rent: Rent[];
1502
- buy: Buy[];
1503
- flatrate: Flatrate[];
1504
- };
1505
- PL: {
1506
- link: string;
1507
- rent: Rent[];
1508
- flatrate: Flatrate[];
1509
- buy: Buy[];
1510
- };
1511
- PT: {
1512
- link: string;
1513
- rent: Rent[];
1514
- flatrate: Flatrate[];
1515
- buy: Buy[];
1516
- };
1517
- RO: {
1518
- link: string;
1519
- flatrate: Flatrate[];
1520
- };
1521
- RU: {
1522
- link: string;
1523
- rent: Rent[];
1524
- flatrate: Flatrate[];
1525
- buy: Buy[];
1526
- };
1527
- SE: {
1528
- link: string;
1529
- rent: Rent[];
1530
- flatrate: Flatrate[];
1531
- buy: Buy[];
1532
- };
1533
- SG: {
1534
- link: string;
1535
- flatrate: Flatrate[];
1536
- buy: Buy[];
1537
- rent: Rent[];
1538
- };
1539
- TH: {
1540
- link: string;
1541
- flatrate: Flatrate[];
1542
- rent: Rent[];
1543
- buy: Buy[];
1544
- };
1545
- TR: {
1546
- link: string;
1547
- buy: Buy[];
1548
- rent: Rent[];
1549
- flatrate: Flatrate[];
1550
- };
1551
- US: {
1552
- link: string;
1553
- rent: Rent[];
1554
- buy: Buy[];
1555
- flatrate: Flatrate[];
1556
- };
1557
- VE: {
1558
- link: string;
1559
- flatrate: Flatrate[];
1560
- rent: Rent[];
1561
- buy: Buy[];
1562
- };
1563
- ZA: {
1564
- link: string;
1565
- rent: Rent[];
1566
- buy: Buy[];
1567
- flatrate: Flatrate[];
1568
- };
1294
+ interface WatchProviderEntry {
1295
+ display_priority: number;
1296
+ logo_path: string | null;
1297
+ provider_id: number;
1298
+ provider_name: string;
1569
1299
  }
1300
+ type WatchLocale = Record<string, {
1301
+ link: string;
1302
+ flatrate?: WatchProviderEntry[];
1303
+ rent?: WatchProviderEntry[];
1304
+ buy?: WatchProviderEntry[];
1305
+ free?: WatchProviderEntry[];
1306
+ ads?: WatchProviderEntry[];
1307
+ }>;
1570
1308
  interface WatchProviders {
1571
1309
  id: number;
1572
1310
  results: WatchLocale;
1573
1311
  }
1312
+ interface WatchProviderListItem {
1313
+ display_priority: number;
1314
+ logo_path: string | null;
1315
+ provider_id: number;
1316
+ provider_name: string;
1317
+ }
1318
+ interface WatchProviderListResponse {
1319
+ results: WatchProviderListItem[];
1320
+ }
1574
1321
  //# sourceMappingURL=watchProviders.d.ts.map
1575
1322
  //#endregion
1576
1323
  //#region src/utils/api.d.ts
1577
- /**
1578
- * Lightweight TMDB v3 API client.
1579
- *
1580
- * - Sends requests to `https://api.themoviedb.org/3`.
1581
- * - Supports authentication via:
1582
- * - v4 API Read Access Token (Bearer), and/or
1583
- * - v3 API key via `api_key` query parameter.
1584
- *
1585
- * Notes:
1586
- * - Many endpoints accept either method depending on your TMDB settings.
1587
- * - When an API key is present, it is appended as `api_key` in the query string.
1588
- */
1324
+ type Primitive = string | number | boolean;
1325
+ type QueryValue = Primitive | null | undefined | Array<Primitive | null | undefined>;
1326
+ type Query = Record<string, QueryValue>;
1327
+ interface RequestOptions<Q extends object = object> {
1328
+ query?: Q;
1329
+ signal?: AbortSignal;
1330
+ timeoutMs?: number;
1331
+ retries?: number;
1332
+ retryDelayMs?: number;
1333
+ }
1334
+ declare class TMDBError extends Error {
1335
+ readonly status: number;
1336
+ readonly url: string;
1337
+ readonly payload?: unknown | undefined;
1338
+ constructor(message: string, status: number, url: string, payload?: unknown | undefined);
1339
+ }
1340
+ declare const parseOptions: (options?: Query) => string;
1589
1341
  declare class API {
1590
- /**
1591
- * Optional v3 API key (sent as `api_key` query param).
1592
- */
1593
1342
  private apiKey?;
1594
- /**
1595
- * Optional v4 read access token (sent as `Authorization: Bearer ...`).
1596
- */
1597
1343
  private accessToken?;
1598
- /**
1599
- * Create a new API client.
1600
- *
1601
- * @param {TokenType} auth - Authentication information.
1602
- */
1603
1344
  constructor(auth: TokenType);
1604
- /**
1605
- * Generic HTTP GET request.
1606
- *
1607
- * @template T - Response JSON type.
1608
- * @template O - Query options (query params) type.
1609
- *
1610
- * @param {string} path - The TMDB path beginning with `/`, e.g. `/movie/550`.
1611
- * @param {O} [options] - Query parameters to serialize.
1612
- *
1613
- * @returns {Promise<T>} Resolves with parsed JSON typed as `T`.
1614
- * @throws {ErrorResponse} Rejects with parsed TMDB error payload when `response.ok` is false.
1615
- */
1616
- get<T, O extends Record<string, unknown> = Record<string, unknown>>(path: string, options?: O): Promise<T>;
1345
+ get<T, Q extends object = object>(path: string, opts?: RequestOptions<Q>): Promise<T>;
1617
1346
  }
1618
- /**
1619
- * Serializes an options object into a query string.
1620
- *
1621
- * - Skips `undefined` and `null`.
1622
- * - Arrays are expanded into repeated keys:
1623
- * `{ with_genres: ["12", "16"] }` -> `with_genres=12&with_genres=16`
1624
- *
1625
- * @param {Record<string, unknown>} [options] - Options to serialize.
1626
- * @returns {string} Query string without the leading `?`.
1627
- */
1628
- declare const parseOptions: (options?: Record<string, unknown>) => string;
1629
1347
  //# sourceMappingURL=api.d.ts.map
1630
1348
  //#endregion
1631
1349
  //#region src/utils/getimagePath.d.ts
@@ -1689,7 +1407,7 @@ interface PersonWithMediaType extends Person {
1689
1407
  }
1690
1408
  interface Movie {
1691
1409
  id: number;
1692
- poster_path: string;
1410
+ poster_path: Nullable<string>;
1693
1411
  adult: boolean;
1694
1412
  overview: string;
1695
1413
  release_date: string;
@@ -1697,7 +1415,7 @@ interface Movie {
1697
1415
  original_title: string;
1698
1416
  original_language: string;
1699
1417
  title: string;
1700
- backdrop_path: string;
1418
+ backdrop_path: Nullable<string>;
1701
1419
  popularity: number;
1702
1420
  vote_count: number;
1703
1421
  video: boolean;
@@ -1716,13 +1434,13 @@ interface TV {
1716
1434
  id: number;
1717
1435
  name: string;
1718
1436
  first_air_date: string;
1719
- backdrop_path: string;
1437
+ backdrop_path: Nullable<string>;
1720
1438
  genre_ids: number[];
1721
1439
  origin_country: string[];
1722
1440
  original_language: string;
1723
1441
  original_name: string;
1724
1442
  overview: string;
1725
- poster_path: string;
1443
+ poster_path: Nullable<string>;
1726
1444
  popularity: number;
1727
1445
  vote_count: number;
1728
1446
  vote_average: number;
@@ -1791,9 +1509,9 @@ interface Review {
1791
1509
  author: string;
1792
1510
  author_details: AuthorDetails;
1793
1511
  content: string;
1794
- created_at: Date;
1512
+ created_at: TMDBDateTime;
1795
1513
  id: string;
1796
- updated_at: Date;
1514
+ updated_at: TMDBDateTime;
1797
1515
  url: string;
1798
1516
  }
1799
1517
  interface Reviews {
@@ -1852,13 +1570,13 @@ declare class BaseEndpoint {
1852
1570
  /**
1853
1571
  * Low-level HTTP client wrapper used by all endpoints.
1854
1572
  */
1855
- protected api: API;
1573
+ protected readonly api: API;
1856
1574
  /**
1857
1575
  * Create a new endpoint instance.
1858
1576
  *
1859
1577
  * @param {TokenType} auth - Authentication information.
1860
1578
  * - If a string: treated as a v4 API Read Access Token (Bearer token).
1861
- * - If an object: can include an API key and/or access token, depending on your {@link TokenType}.
1579
+ * - If an object: can include an API key and/or access token.
1862
1580
  */
1863
1581
  constructor(auth: TokenType);
1864
1582
  }
@@ -2869,26 +2587,21 @@ declare class WatchProvidersEndpoint extends BaseEndpoint {
2869
2587
  * @param {string} access_token - The access token used for authentication.
2870
2588
  */
2871
2589
  constructor(access_token: TokenType);
2872
- /**
2873
- * Retrieves a list of all available watch providers (streaming services).
2874
- * @returns {Promise<WatchProviders>} A Promise that resolves with the list of watch providers.
2875
- */
2876
- available(): Promise<WatchProviders>;
2877
- /**
2878
- * Retrieves a list of available regions for watch providers.
2879
- * @returns {Promise<WatchRegionsResponse>} A Promise that resolves with the list of available regions.
2880
- */
2881
- regions(): Promise<WatchRegionsResponse>;
2882
2590
  /**
2883
2591
  * Retrieves a list of watch providers for movies.
2884
- * @returns {Promise<WatchProviders>} A Promise that resolves with the list of movie watch providers.
2592
+ * @returns {Promise<WatchProviderListResponse>} A Promise that resolves with the list of movie watch providers.
2885
2593
  */
2886
- movie(): Promise<WatchProviders>;
2594
+ movie(): Promise<WatchProviderListResponse>;
2887
2595
  /**
2888
2596
  * Retrieves a list of watch providers for TV shows.
2889
- * @returns {Promise<WatchProviders>} A Promise that resolves with the list of TV watch providers.
2597
+ * @returns {Promise<WatchProviderListResponse>} A Promise that resolves with the list of TV watch providers.
2598
+ */
2599
+ tv(): Promise<WatchProviderListResponse>;
2600
+ /**
2601
+ * Retrieves a list of available regions for watch providers.
2602
+ * @returns {Promise<WatchProviderListResponse>} A Promise that resolves with the list of available regions.
2890
2603
  */
2891
- tv(): Promise<WatchProviders>;
2604
+ regions(): Promise<WatchProviderListResponse>;
2892
2605
  }
2893
2606
  //# sourceMappingURL=watchProviders.d.ts.map
2894
2607
  //#endregion
@@ -2918,5 +2631,5 @@ declare class TMDB {
2918
2631
  watchProviders: WatchProvidersEndpoint;
2919
2632
  }
2920
2633
  //#endregion
2921
- export { API, AccountDetails, AggregateCast, AggregateCredits, AggregateCrew, AiringTodayResult, AlternativeNames, AlternativeTitles, AppendToResponse, AppendToResponseMediaType, AppendToResponseMovieKey, AppendToResponsePersonKey, AppendToResponseTvEpisodeKey, AppendToResponseTvKey, AppendToResponseTvSeasonKey, AuthorDetails, Avatar, BackdropSizes, BaseEndpoint, BelongingMovies, BelongsToCollection, Buy, Cast, CastRole, Certification, Certifications, Change, ChangeItem, ChangeKeys, ChangeOption, Changes, Collection, CollectionImageOptions, CollectionSearchOptions, Company, CompanyDetails, CompanyImages, Configuration, ContentRatings, ContentRatingsResult, CreatedBy, CreditResponse, CreditSeason, Credits, Crew, CrewJob, Dates, DetailedCollection, DiscoverQueryOptions, Episode, EpisodeGroup, EpisodeGroups, EpisodeSelection, ErrorResponse, ExternalIdOptions, ExternalIds, ExternalSource, FindResult, Flatrate, Genre, Genres, Gravatar, GuestStar, Image, ImageCollection, ImageConfiguration, ImageFormat, ImageFormats, ImageSize, ImageSizes, Images, Keyword, Keywords, KeywordsOptions, KnownFor, LanguageOption, LastEpisodeToAir, LatestMovie, Latesttv, LogoSizes, Media$1 as Media, MediaChange, MediaChanges, MediaType, Movie, MovieChangeValue, MovieDetails, MovieDiscoverResult, MovieList, MovieLists, MovieQueryOptions, MovieSearchOptions, MovieSortOption, MovieWithMediaType, MoviesImageSearchOptions, MoviesPlayingNow, MultiSearchOptions, MultiSearchResult, Name, Network, NetworkDetails, NetworkImages, NextEpisodeToAir, OnTheAir, OnTheAirResult, PageOption, ParentCompany, PeopleImages, PeopleSearchOptions, Person, PersonChangeValue, PersonCombinedCredits, PersonDetails, PersonMovieCast, PersonMovieCredit, PersonMovieCrew, PersonTranslations, PersonTvShowCast, PersonTvShowCredit, PersonTvShowCrew, PersonWithMediaType, PopularMovies, PopularPersons, PopularTvShowResult, Populartv, PosterSizes, ProductionCompany, ProductionCountry, ProfileSizes, Recommendation, Recommendations, RegionOption, ReleaseDate, ReleaseDateResult, ReleaseDateType, ReleaseDates, Rent, Review, ReviewDetails, Reviews, ScreenedTheatrically, ScreenedTheatricallyResult, Search, SearchOptions, Season, SeasonDetails, SeasonSelection, SimilarMovies, SimilarTvShow, Similartv, SpokenLanguage, StillSizes, TMDB, TMDBConfig, TMDB_IMAGE_BASE_URL, TV, TVWithMediaType, TaggedImage, TaggedImages, TimeWindow, TimezoneOption, Title, TokenType, TopRatedMovies, TopRatedTvShowResult, TopRatedtv, Translation, TranslationData, Translations, TrendingMediaType, TrendingResults, TvEpisodeChangeValue, TvEpisodeCredit, TvEpisodeImageSearchOptions, TvEpisodeTranslations, TvEpisodeVideoSearchOptions, TvSearchOptions, TvSeasonChangeValue, TvSeasonImageSearchOptions, TvSeasonVideoSearchOptions, TvShowChangeValue, TvShowDetails, TvShowDiscoverResult, TvShowImageOptions, TvShowQueryOptions, TvShowVideoOptions, TvSortOption, UpcomingMovies, Video, Videos, WatchLocale, WatchMonetizationType, WatchProviders, WatchRegion, WatchRegionsResponse, formImage, getFullImagePath, parseOptions, tvAiringToday };
2634
+ export { API, AccountDetails, AggregateCast, AggregateCredits, AggregateCrew, AiringTodayResult, AlternativeNames, AlternativeTitles, AppendToResponse, AppendToResponseMediaType, AppendToResponseMovieKey, AppendToResponsePersonKey, AppendToResponseTvEpisodeKey, AppendToResponseTvKey, AppendToResponseTvSeasonKey, AuthorDetails, Avatar, BackdropSizes, BaseEndpoint, BelongingMovies, BelongsToCollection, Buy, Cast, CastRole, Certification, Certifications, Change, ChangeItem, ChangeKeys, ChangeOption, Changes, Collection, CollectionImageOptions, CollectionSearchOptions, Company, CompanyDetails, CompanyImages, Configuration, ContentRatings, ContentRatingsResult, CreatedBy, CreditResponse, CreditSeason, Credits, Crew, CrewJob, Dates, DetailedCollection, DiscoverQueryOptions, Episode, EpisodeGroup, EpisodeGroups, EpisodeSelection, ErrorResponse, ExternalIdOptions, ExternalIds, ExternalSource, FindResult, Flatrate, Genre, Genres, Gravatar, GuestStar, Image, ImageCollection, ImageConfiguration, ImageFormat, ImageFormats, ImageSize, ImageSizes, Images, Keyword, Keywords, KeywordsOptions, KnownFor, LanguageOption, LastEpisodeToAir, LatestMovie, Latesttv, LogoSizes, Media$1 as Media, MediaChange, MediaChanges, MediaType, Movie, MovieChangeValue, MovieDetails, MovieDiscoverResult, MovieList, MovieLists, MovieQueryOptions, MovieSearchOptions, MovieSortOption, MovieWithMediaType, MoviesImageSearchOptions, MoviesPlayingNow, MultiSearchOptions, MultiSearchResult, Name, Network, NetworkDetails, NetworkImages, NextEpisodeToAir, OnTheAir, OnTheAirResult, PageOption, ParentCompany, PeopleImages, PeopleSearchOptions, Person, PersonChangeValue, PersonCombinedCredits, PersonDetails, PersonMovieCast, PersonMovieCredit, PersonMovieCrew, PersonTranslations, PersonTvShowCast, PersonTvShowCredit, PersonTvShowCrew, PersonWithMediaType, PopularMovies, PopularPersons, PopularTvShowResult, Populartv, PosterSizes, Primitive, ProductionCompany, ProductionCountry, ProfileSizes, Query, QueryValue, Recommendation, Recommendations, RegionOption, ReleaseDate, ReleaseDateResult, ReleaseDateType, ReleaseDates, Rent, RequestOptions, Review, ReviewDetails, Reviews, ScreenedTheatrically, ScreenedTheatricallyResult, Search, SearchOptions, Season, SeasonDetails, SeasonSelection, SimilarMovies, SimilarTvShow, Similartv, SpokenLanguage, StillSizes, TMDB, TMDBConfig, TMDBError, TMDB_IMAGE_BASE_URL, TV, TVWithMediaType, TaggedImage, TaggedImages, TimeWindow, TimezoneOption, Title, TokenType, TopRatedMovies, TopRatedTvShowResult, TopRatedtv, Translation, TranslationData, Translations, TrendingMediaType, TrendingResults, TvEpisodeChangeValue, TvEpisodeCredit, TvEpisodeImageSearchOptions, TvEpisodeTranslations, TvEpisodeVideoSearchOptions, TvSearchOptions, TvSeasonChangeValue, TvSeasonImageSearchOptions, TvSeasonVideoSearchOptions, TvShowChangeValue, TvShowDetails, TvShowDiscoverResult, TvShowImageOptions, TvShowQueryOptions, TvShowVideoOptions, TvSortOption, UpcomingMovies, Video, Videos, WatchLocale, WatchMonetizationType, WatchProviderEntry, WatchProviderListItem, WatchProviderListResponse, WatchProviders, WatchRegion, WatchRegionsResponse, formImage, getFullImagePath, parseOptions, tvAiringToday };
2922
2635
  //# sourceMappingURL=index.d.cts.map