tmdb-ts 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/dist/api.js +2 -2
  2. package/dist/api.js.map +1 -1
  3. package/dist/endpoints/changes.js +4 -7
  4. package/dist/endpoints/changes.js.map +1 -1
  5. package/dist/endpoints/collections.d.ts +9 -0
  6. package/dist/endpoints/collections.js +26 -0
  7. package/dist/endpoints/collections.js.map +1 -0
  8. package/dist/endpoints/discover.d.ts +61 -0
  9. package/dist/endpoints/discover.js +21 -0
  10. package/dist/endpoints/discover.js.map +1 -0
  11. package/dist/endpoints/find.d.ts +6 -0
  12. package/dist/endpoints/find.js +16 -0
  13. package/dist/endpoints/find.js.map +1 -0
  14. package/dist/endpoints/index.d.ts +7 -0
  15. package/dist/endpoints/index.js +12 -1
  16. package/dist/endpoints/index.js.map +1 -1
  17. package/dist/endpoints/keywords.d.ts +7 -0
  18. package/dist/endpoints/keywords.js +20 -0
  19. package/dist/endpoints/keywords.js.map +1 -0
  20. package/dist/endpoints/movies.d.ts +9 -31
  21. package/dist/endpoints/movies.js +10 -13
  22. package/dist/endpoints/movies.js.map +1 -1
  23. package/dist/endpoints/people.d.ts +19 -0
  24. package/dist/endpoints/people.js +49 -0
  25. package/dist/endpoints/people.js.map +1 -0
  26. package/dist/endpoints/review.d.ts +6 -0
  27. package/dist/endpoints/review.js +14 -0
  28. package/dist/endpoints/review.js.map +1 -0
  29. package/dist/endpoints/search.d.ts +1 -3
  30. package/dist/endpoints/search.js +7 -10
  31. package/dist/endpoints/search.js.map +1 -1
  32. package/dist/endpoints/trending.d.ts +6 -0
  33. package/dist/endpoints/trending.js +14 -0
  34. package/dist/endpoints/trending.js.map +1 -0
  35. package/dist/endpoints/tv-shows.d.ts +8 -23
  36. package/dist/endpoints/tv-shows.js +11 -11
  37. package/dist/endpoints/tv-shows.js.map +1 -1
  38. package/dist/index.js +5 -1
  39. package/dist/index.js.map +1 -1
  40. package/dist/tmdb.d.ts +8 -1
  41. package/dist/tmdb.js +21 -0
  42. package/dist/tmdb.js.map +1 -1
  43. package/dist/types/changes.d.ts +1 -3
  44. package/dist/types/collections.d.ts +14 -0
  45. package/dist/types/collections.js +3 -0
  46. package/dist/types/collections.js.map +1 -0
  47. package/dist/types/credits.d.ts +4 -29
  48. package/dist/types/discover.d.ts +14 -0
  49. package/dist/types/discover.js +3 -0
  50. package/dist/types/discover.js.map +1 -0
  51. package/dist/types/find.d.ts +19 -0
  52. package/dist/types/find.js +3 -0
  53. package/dist/types/find.js.map +1 -0
  54. package/dist/types/index.d.ts +17 -8
  55. package/dist/types/index.js +13 -1
  56. package/dist/types/index.js.map +1 -1
  57. package/dist/types/keywords.d.ts +19 -0
  58. package/dist/types/keywords.js +3 -0
  59. package/dist/types/keywords.js.map +1 -0
  60. package/dist/types/options.d.ts +9 -0
  61. package/dist/types/options.js +3 -0
  62. package/dist/types/options.js.map +1 -0
  63. package/dist/types/people.d.ts +148 -0
  64. package/dist/types/people.js +3 -0
  65. package/dist/types/people.js.map +1 -0
  66. package/dist/types/review.d.ts +7 -0
  67. package/dist/types/review.js +3 -0
  68. package/dist/types/review.js.map +1 -0
  69. package/dist/types/trending.d.ts +13 -0
  70. package/dist/types/trending.js +3 -0
  71. package/dist/types/trending.js.map +1 -0
  72. package/dist/types/tv-shows.d.ts +39 -1
  73. package/dist/utils/index.d.ts +1 -0
  74. package/dist/utils/index.js +6 -1
  75. package/dist/utils/index.js.map +1 -1
  76. package/dist/utils/parseOptions.d.ts +3 -0
  77. package/dist/utils/parseOptions.js +10 -0
  78. package/dist/utils/parseOptions.js.map +1 -0
  79. package/package.json +1 -1
@@ -0,0 +1,148 @@
1
+ import { Movie, Person, TV } from ".";
2
+ interface Cast {
3
+ character: string;
4
+ credit_id: string;
5
+ vote_count: number;
6
+ id: number;
7
+ backdrop_path: string;
8
+ poster_path: string;
9
+ original_language: string;
10
+ vote_average: number;
11
+ genre_ids: number[];
12
+ popularity: number;
13
+ overview: string;
14
+ }
15
+ interface Crew {
16
+ id: number;
17
+ department: string;
18
+ original_language: string;
19
+ credit_id: string;
20
+ overview: string;
21
+ vote_count: number;
22
+ poster_path: string;
23
+ backdrop_path: string;
24
+ popularity: number;
25
+ genre_ids: number[];
26
+ job: string;
27
+ vote_average: number;
28
+ }
29
+ export interface PersonMovieCast extends Cast {
30
+ release_date: string;
31
+ video: boolean;
32
+ adult: boolean;
33
+ title: string;
34
+ original_title: string;
35
+ }
36
+ export interface PersonMovieCrew extends Crew {
37
+ original_title: string;
38
+ video: boolean;
39
+ title: string;
40
+ adult: boolean;
41
+ release_date: string;
42
+ }
43
+ export interface PersonTvShowCrew extends Crew {
44
+ episode_count: number;
45
+ origin_country: string[];
46
+ original_name: string;
47
+ name: string;
48
+ first_air_date: string;
49
+ }
50
+ export interface PersonTvShowCast extends Cast {
51
+ original_name: string;
52
+ name: string;
53
+ episode_count: number;
54
+ first_air_date: string;
55
+ origin_country: string[];
56
+ }
57
+ export interface PersonMovieCredit {
58
+ cast: PersonMovieCast[];
59
+ crew: PersonMovieCrew[];
60
+ id: number;
61
+ }
62
+ export interface PersonTvShowCredit {
63
+ cast: PersonTvShowCast[];
64
+ crew: PersonTvShowCrew[];
65
+ id: number;
66
+ }
67
+ export interface PersonCombinedCredits {
68
+ cast: (PersonMovieCast & PersonTvShowCast)[];
69
+ crew: (PersonMovieCrew & PersonTvShowCrew)[];
70
+ id: number;
71
+ }
72
+ export interface PersonDetail {
73
+ birthday: string;
74
+ known_for_department: string;
75
+ deathday: string;
76
+ id: number;
77
+ name: string;
78
+ also_known_as: string[];
79
+ gender: number;
80
+ biography: string;
81
+ popularity: number;
82
+ place_of_birth: string;
83
+ profile_path: string;
84
+ adult: boolean;
85
+ imdb_id: string;
86
+ homepage: string;
87
+ }
88
+ export interface PersonChange {
89
+ id: string;
90
+ action: string;
91
+ time: string;
92
+ iso_639_1: string;
93
+ iso_3166_1: string;
94
+ value: string | {
95
+ profile: {
96
+ file_path: string;
97
+ };
98
+ };
99
+ original_value: string | {
100
+ profile: {
101
+ file_path: string;
102
+ };
103
+ };
104
+ }
105
+ export interface PersonChanges {
106
+ changes: {
107
+ key: string;
108
+ items: PersonChange[];
109
+ }[];
110
+ }
111
+ export interface PopularPersons {
112
+ page: number;
113
+ results: Person[];
114
+ total_results: number;
115
+ total_pages: number;
116
+ }
117
+ export interface TaggedImage {
118
+ aspect_ratio: number;
119
+ file_path: string;
120
+ height: number;
121
+ id: string;
122
+ iso_639_1: string;
123
+ vote_average: number;
124
+ vote_count: number;
125
+ width: number;
126
+ image_type: string;
127
+ media_type: string;
128
+ media: Movie | TV;
129
+ }
130
+ export interface TaggedImages {
131
+ page: number;
132
+ results: TaggedImage[];
133
+ total_results: number;
134
+ total_pages: number;
135
+ }
136
+ export interface PeopleTranslations {
137
+ id: number;
138
+ translations: {
139
+ iso_3166_1: string;
140
+ iso_639_1: string;
141
+ name: string;
142
+ english_name: string;
143
+ data: {
144
+ biography: string;
145
+ };
146
+ };
147
+ }
148
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=people.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"people.js","sourceRoot":"","sources":["../../src/types/people.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { Review } from './';
2
+ export interface ReviewDetails extends Review {
3
+ iso_639_1: string;
4
+ media_id: number;
5
+ media_title: number;
6
+ media_type: number;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=review.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"review.js","sourceRoot":"","sources":["../../src/types/review.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ import { Movie, Person, TV } from '.';
2
+ export type MediaType = 'all' | 'movie' | 'tv' | 'person';
3
+ export type TimeWindow = 'day' | 'week';
4
+ type TrendingResult<T extends MediaType> = T extends 'tv' ? TV : T extends 'movie' ? Movie : T extends 'person' ? Person : TV | Movie | Person;
5
+ export interface TrendingResults<T extends MediaType> {
6
+ page: number;
7
+ results: (TrendingResult<T> & {
8
+ media_type: MediaType;
9
+ })[];
10
+ total_pages: number;
11
+ total_results: number;
12
+ }
13
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=trending.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trending.js","sourceRoot":"","sources":["../../src/types/trending.ts"],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { Genre, ProductionCompany, ProductionCountry, SpokenLanguage } from './';
1
+ import { Genre, ProductionCompany, ProductionCountry, SpokenLanguage, Crew } from './';
2
2
  export interface CreatedBy {
3
3
  id: number;
4
4
  credit_id: string;
@@ -66,6 +66,44 @@ export interface TvShowDetails {
66
66
  vote_average: number;
67
67
  vote_count: number;
68
68
  }
69
+ export interface GuestStar {
70
+ credit_id: string;
71
+ order: number;
72
+ character: string;
73
+ adult: boolean;
74
+ gender: number | null;
75
+ id: number;
76
+ known_for_department: string;
77
+ name: string;
78
+ original_name: string;
79
+ popularity: number;
80
+ profile_path: string | null;
81
+ }
82
+ export interface Episode {
83
+ air_date: string;
84
+ episode_number: number;
85
+ crew: Crew[];
86
+ guest_stars: GuestStar[];
87
+ id: number;
88
+ name: string;
89
+ overview: string;
90
+ production_code: string;
91
+ season_number: number;
92
+ still_path: string;
93
+ vote_average: number;
94
+ vote_count: number;
95
+ show_id: number;
96
+ runtime: number;
97
+ }
98
+ export interface SeasonDetails {
99
+ air_date: string;
100
+ episodes: Episode[];
101
+ name: string;
102
+ overview: string;
103
+ id: number;
104
+ poster_path: string | null;
105
+ season_number: number;
106
+ }
69
107
  export interface TvShowItem {
70
108
  id: string;
71
109
  action: string;
@@ -1 +1,2 @@
1
1
  export * from './getImagePath';
2
+ export * from './parseOptions';
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -11,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11
15
  };
12
16
  Object.defineProperty(exports, "__esModule", { value: true });
13
17
  __exportStar(require("./getImagePath"), exports);
18
+ __exportStar(require("./parseOptions"), exports);
14
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAA+B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,iDAA+B"}
@@ -0,0 +1,3 @@
1
+ export declare function parseOptions(options?: {
2
+ [s: string]: any;
3
+ }): string;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseOptions = void 0;
4
+ function parseOptions(options) {
5
+ return options
6
+ ? new URLSearchParams(Object.entries(options)).toString()
7
+ : '';
8
+ }
9
+ exports.parseOptions = parseOptions;
10
+ //# sourceMappingURL=parseOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseOptions.js","sourceRoot":"","sources":["../../src/utils/parseOptions.ts"],"names":[],"mappings":";;;AAAA,SAAgB,YAAY,CAC1B,OAA8B;IAE9B,OAAO,OAAO;QACZ,CAAC,CAAC,IAAI,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE;QACzD,CAAC,CAAE,EAAE,CAAC;AACV,CAAC;AAND,oCAMC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tmdb-ts",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "TMDB v3 library wrapper",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",