tmdb-ts 1.3.0 → 1.5.1

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,9 @@
1
+ import { CompanyDetails, AlternativeNames, CompanyImages } from './../types/companies';
2
+ import { BaseEndpoint } from './base';
3
+ export declare class CompaniesEndpoint extends BaseEndpoint {
4
+ protected readonly accessToken: string;
5
+ constructor(accessToken: string);
6
+ details(id: number): Promise<CompanyDetails>;
7
+ alternativeNames(id: number): Promise<AlternativeNames>;
8
+ images(id: number): Promise<CompanyImages>;
9
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CompaniesEndpoint = void 0;
4
+ const base_1 = require("./base");
5
+ class CompaniesEndpoint extends base_1.BaseEndpoint {
6
+ accessToken;
7
+ constructor(accessToken) {
8
+ super(accessToken);
9
+ this.accessToken = accessToken;
10
+ }
11
+ async details(id) {
12
+ return await this.api.get(`/company/${id}`);
13
+ }
14
+ async alternativeNames(id) {
15
+ return await this.api.get(`/company/${id}/alternative_names`);
16
+ }
17
+ async images(id) {
18
+ return await this.api.get(`/company/${id}/images`);
19
+ }
20
+ }
21
+ exports.CompaniesEndpoint = CompaniesEndpoint;
22
+ //# sourceMappingURL=companies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"companies.js","sourceRoot":"","sources":["../../src/endpoints/companies.ts"],"names":[],"mappings":";;;AAKA,iCAAsC;AAEtC,MAAa,iBAAkB,SAAQ,mBAAY;IAClB;IAA/B,YAA+B,WAAmB;QAChD,KAAK,CAAC,WAAW,CAAC,CAAC;QADU,gBAAW,GAAX,WAAW,CAAQ;IAElD,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,EAAU;QACtB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAiB,YAAY,EAAE,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,EAAU;QAC/B,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,YAAY,EAAE,oBAAoB,CACnC,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAgB,YAAY,EAAE,SAAS,CAAC,CAAC;IACpE,CAAC;CACF;AAlBD,8CAkBC"}
@@ -14,4 +14,5 @@ export * from './trending';
14
14
  export * from './find';
15
15
  export * from './keywords';
16
16
  export * from './collections';
17
+ export * from './tv-seasons';
17
18
  export * from './tv-episode';
@@ -30,5 +30,6 @@ __exportStar(require("./trending"), exports);
30
30
  __exportStar(require("./find"), exports);
31
31
  __exportStar(require("./keywords"), exports);
32
32
  __exportStar(require("./collections"), exports);
33
+ __exportStar(require("./tv-seasons"), exports);
33
34
  __exportStar(require("./tv-episode"), exports);
34
35
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/endpoints/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,kDAAgC;AAChC,4CAA0B;AAC1B,4CAA0B;AAC1B,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,kDAAgC;AAChC,6CAA2B;AAC3B,6CAA2B;AAC3B,2CAAyB;AACzB,2CAAyB;AACzB,6CAA2B;AAC3B,yCAAuB;AACvB,6CAA2B;AAC3B,gDAA8B;AAC9B,+CAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/endpoints/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,kDAAgC;AAChC,4CAA0B;AAC1B,4CAA0B;AAC1B,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,kDAAgC;AAChC,6CAA2B;AAC3B,6CAA2B;AAC3B,2CAAyB;AACzB,2CAAyB;AACzB,6CAA2B;AAC3B,yCAA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AK,CAAC,cAAc,CAAC,EAAU;QAC7B,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,GAAG,UAAU,IAAI,EAAE,kBAAkB,CACtC,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM;QACV,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAc,GAAG,UAAU,SAAS,CAAC,CAAC;IACjE,CAAC;IAED,KAAK,CAAC,UAAU,CACd,OAAoD;QAEpD,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,GAAG,UAAU,cAAc,EAC3B,OAAO,CACR,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,OAAoB;QAChC,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAgB,GAAG,UAAU,UAAU,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;IAED,KAAK,CAAC,QAAQ,CACZ,OAAoD;QAEpD,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,GAAG,UAAU,YAAY,EACzB,OAAO,CACR,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,QAAQ,CACZ,OAAoD;QAEpD,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,GAAG,UAAU,WAAW,EACxB,OAAO,CACR,CAAC;IACJ,CAAC;CACF;AA3ID,wCA2IC"}
@@ -0,0 +1,10 @@
1
+ import { NetworkDetails, NetworkImages } from '..';
2
+ import { AlternativeNames } from './../types/companies';
3
+ import { BaseEndpoint } from './base';
4
+ export declare class NetworksEndpoint extends BaseEndpoint {
5
+ protected readonly accessToken: string;
6
+ constructor(accessToken: string);
7
+ details(id: number): Promise<NetworkDetails>;
8
+ alternativeNames(id: number): Promise<AlternativeNames>;
9
+ images(id: number): Promise<NetworkImages>;
10
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NetworksEndpoint = void 0;
4
+ const base_1 = require("./base");
5
+ class NetworksEndpoint extends base_1.BaseEndpoint {
6
+ accessToken;
7
+ constructor(accessToken) {
8
+ super(accessToken);
9
+ this.accessToken = accessToken;
10
+ }
11
+ async details(id) {
12
+ return await this.api.get(`/network/${id}`);
13
+ }
14
+ async alternativeNames(id) {
15
+ return await this.api.get(`/network/${id}/alternative_names`);
16
+ }
17
+ async images(id) {
18
+ return await this.api.get(`/network/${id}/images`);
19
+ }
20
+ }
21
+ exports.NetworksEndpoint = NetworksEndpoint;
22
+ //# sourceMappingURL=networks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"networks.js","sourceRoot":"","sources":["../../src/endpoints/networks.ts"],"names":[],"mappings":";;;AAEA,iCAAsC;AAEtC,MAAa,gBAAiB,SAAQ,mBAAY;IACjB;IAA/B,YAA+B,WAAmB;QAChD,KAAK,CAAC,WAAW,CAAC,CAAC;QADU,gBAAW,GAAX,WAAW,CAAQ;IAElD,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,EAAU;QACtB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAiB,YAAY,EAAE,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,EAAU;QAC/B,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,YAAY,EAAE,oBAAoB,CACnC,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAgB,YAAY,EAAE,SAAS,CAAC,CAAC;IACpE,CAAC;CACF;AAlBD,4CAkBC"}
@@ -0,0 +1,13 @@
1
+ import { ChangeOption, Changes, Credits, ExternalIds, Images, LanguageOption, TvSeasonChangeValue, SeasonDetails, SeasonSelection, Translations, Videos, AppendToResponseTvSeasonKey, AppendToResponse, AggregateCredits } from '..';
2
+ import { BaseEndpoint } from './base';
3
+ export declare class TvSeasonsEndpoint extends BaseEndpoint {
4
+ constructor(accessToken: string);
5
+ details<T extends AppendToResponseTvSeasonKey[] | undefined>(seasonSelection: SeasonSelection, appendToResponse?: T, options?: LanguageOption): Promise<AppendToResponse<SeasonDetails, T, "tvSeason">>;
6
+ aggregateCredits(seasonSelection: SeasonSelection, options?: LanguageOption): Promise<AggregateCredits>;
7
+ changes(seasonId: number, options?: ChangeOption): Promise<Changes<TvSeasonChangeValue>>;
8
+ credits(seasonSelection: SeasonSelection, options?: LanguageOption): Promise<Credits>;
9
+ externalIds(seasonSelection: SeasonSelection, options?: LanguageOption): Promise<ExternalIds>;
10
+ images(seasonSelection: SeasonSelection, options?: LanguageOption): Promise<Images>;
11
+ videos(seasonSelection: SeasonSelection, options?: LanguageOption): Promise<Videos>;
12
+ translations(seasonSelection: SeasonSelection, options?: LanguageOption): Promise<Translations>;
13
+ }
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TvSeasonsEndpoint = void 0;
4
+ const base_1 = require("./base");
5
+ const BASE_SEASON = (seasonSelection) => {
6
+ return `/tv/${seasonSelection.tvShowID}/season/${seasonSelection.seasonNumber}`;
7
+ };
8
+ class TvSeasonsEndpoint extends base_1.BaseEndpoint {
9
+ constructor(accessToken) {
10
+ super(accessToken);
11
+ }
12
+ async details(seasonSelection, appendToResponse, options) {
13
+ const combinedOptions = {
14
+ append_to_response: appendToResponse
15
+ ? appendToResponse.join(',')
16
+ : undefined,
17
+ ...options,
18
+ };
19
+ return await this.api.get(`${BASE_SEASON(seasonSelection)}`, combinedOptions);
20
+ }
21
+ async aggregateCredits(seasonSelection, options) {
22
+ return await this.api.get(`${BASE_SEASON(seasonSelection)}/aggregate_credits`, options);
23
+ }
24
+ async changes(seasonId, options) {
25
+ return await this.api.get(`/tv/season/${seasonId}/changes`, options);
26
+ }
27
+ async credits(seasonSelection, options) {
28
+ return await this.api.get(`${BASE_SEASON(seasonSelection)}/credits`, options);
29
+ }
30
+ async externalIds(seasonSelection, options) {
31
+ return await this.api.get(`${BASE_SEASON(seasonSelection)}/external_ids`, options);
32
+ }
33
+ async images(seasonSelection, options) {
34
+ return await this.api.get(`${BASE_SEASON(seasonSelection)}/images`, options);
35
+ }
36
+ async videos(seasonSelection, options) {
37
+ return await this.api.get(`${BASE_SEASON(seasonSelection)}/videos`, options);
38
+ }
39
+ async translations(seasonSelection, options) {
40
+ return await this.api.get(`${BASE_SEASON(seasonSelection)}/translations`, options);
41
+ }
42
+ }
43
+ exports.TvSeasonsEndpoint = TvSeasonsEndpoint;
44
+ //# sourceMappingURL=tv-seasons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tv-seasons.js","sourceRoot":"","sources":["../../src/endpoints/tv-seasons.ts"],"names":[],"mappings":";;;AAgBA,iCAAsC;AAEtC,MAAM,WAAW,GAAG,CAAC,eAAgC,EAAU,EAAE;IAC/D,OAAO,OAAO,eAAe,CAAC,QAAQ,WAAW,eAAe,CAAC,YAAY,EAAE,CAAC;AAClF,CAAC,CAAC;AAEF,MAAa,iBAAkB,SAAQ,mBAAY;IACjD,YAAY,WAAmB;QAC7B,KAAK,CAAC,WAAW,CAAC,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,OAAO,CACX,eAAgC,EAChC,gBAAoB,EACpB,OAAwB;QAExB,MAAM,eAAe,GAAG;YACtB,kBAAkB,EAAE,gBAAgB;gBAClC,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC;gBAC5B,CAAC,CAAC,SAAS;YACb,GAAG,OAAO;SACX,CAAC;QAEF,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,GAAG,WAAW,CAAC,eAAe,CAAC,EAAE,EACjC,eAAe,CAChB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,gBAAgB,CACpB,eAAgC,EAChC,OAAwB;QAExB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,GAAG,WAAW,CAAC,eAAe,CAAC,oBAAoB,EACnD,OAAO,CACR,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,QAAgB,EAAE,OAAsB;QACpD,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,cAAc,QAAQ,UAAU,EAChC,OAAO,CACR,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,eAAgC,EAAE,OAAwB;QACtE,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,GAAG,WAAW,CAAC,eAAe,CAAC,UAAU,EACzC,OAAO,CACR,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,WAAW,CACf,eAAgC,EAChC,OAAwB;QAExB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,GAAG,WAAW,CAAC,eAAe,CAAC,eAAe,EAC9C,OAAO,CACR,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,eAAgC,EAAE,OAAwB;QACrE,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,GAAG,WAAW,CAAC,eAAe,CAAC,SAAS,EACxC,OAAO,CACR,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,eAAgC,EAAE,OAAwB;QACrE,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,GAAG,WAAW,CAAC,eAAe,CAAC,SAAS,EACxC,OAAO,CACR,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,YAAY,CAChB,eAAgC,EAChC,OAAwB;QAExB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACvB,GAAG,WAAW,CAAC,eAAe,CAAC,eAAe,EAC9C,OAAO,CACR,CAAC;IACJ,CAAC;CACF;AAhFD,8CAgFC"}
@@ -1,5 +1,5 @@
1
1
  import { BaseEndpoint } from './base';
2
- import { AlternativeTitles, AppendToResponse, AppendToResponseTvKey, ChangeOption, Changes, ContentRatings, Credits, EpisodeGroups, ExternalIds, Images, Keywords, LanguageOption, LatestTvShows, OnTheAir, PageOption, PopularTvShows, Recommendations, RegionOption, Reviews, ScreenedTheatrically, SeasonDetails, SimilarTvShows, TopRatedTvShows, Translations, TvShowChangeValue, TvShowDetails, TvShowsAiringToday, Videos, WatchProviders } from '../types';
2
+ import { AggregateCredits, AlternativeTitles, AppendToResponse, AppendToResponseTvKey, ChangeOption, Changes, ContentRatings, Credits, EpisodeGroups, ExternalIds, Images, Keywords, LanguageOption, LatestTvShows, OnTheAir, PageOption, PopularTvShows, Recommendations, RegionOption, Reviews, ScreenedTheatrically, SeasonDetails, SimilarTvShows, TopRatedTvShows, Translations, TvShowChangeValue, TvShowDetails, TvShowsAiringToday, Videos, WatchProviders } from '../types';
3
3
  export declare class TvShowsEndpoint extends BaseEndpoint {
4
4
  protected readonly accessToken: string;
5
5
  constructor(accessToken: string);
@@ -7,6 +7,7 @@ export declare class TvShowsEndpoint extends BaseEndpoint {
7
7
  alternativeTitles(id: number): Promise<AlternativeTitles>;
8
8
  changes(id: number, options?: ChangeOption): Promise<Changes<TvShowChangeValue>>;
9
9
  contentRatings(id: number): Promise<ContentRatings>;
10
+ aggregateCredits(id: number): Promise<AggregateCredits>;
10
11
  credits(id: number): Promise<Credits>;
11
12
  season(tvId: number, seasonNumber: number): Promise<SeasonDetails>;
12
13
  episodeGroups(id: number): Promise<EpisodeGroups>;
@@ -26,6 +26,9 @@ class TvShowsEndpoint extends base_1.BaseEndpoint {
26
26
  async contentRatings(id) {
27
27
  return await this.api.get(`${BASE_TV}/${id}/content_ratings`);
28
28
  }
29
+ async aggregateCredits(id) {
30
+ return await this.api.get(`${BASE_TV}/${id}/aggregate_credits`);
31
+ }
29
32
  async credits(id) {
30
33
  return await this.api.get(`${BASE_TV}/${id}/credits`);
31
34
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tv-shows.js","sourceRoot":"","sources":["../../src/endpoints/tv-shows.ts"],"names":[],"mappings":";;;AAAA,iCAAsC;AAiCtC,MAAM,OAAO,GAA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AC,QAAQ,CACZ,OAAoD;QAEpD,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAkB,GAAG,OAAO,YAAY,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;CACF;AAnJD,0CAmJC"}
package/dist/tmdb.d.ts CHANGED
@@ -1,4 +1,6 @@
1
- import { AccountEndpoint, CertificationEndpoint, ChangeEndpoint, CreditsEndpoint, GenreEndpoint, MoviesEndpoint, SearchEndpoint, TvShowsEndpoint, ConfigurationEndpoint, DiscoverEndpoint, PeopleEndpoint, ReviewEndpoint, TrendingEndpoint, FindEndpoint, KeywordsEndpoint, CollectionsEndpoint, TvEpisodesEndpoint } from './endpoints';
1
+ import { AccountEndpoint, CertificationEndpoint, ChangeEndpoint, CreditsEndpoint, GenreEndpoint, MoviesEndpoint, SearchEndpoint, TvShowsEndpoint, ConfigurationEndpoint, DiscoverEndpoint, PeopleEndpoint, ReviewEndpoint, TrendingEndpoint, FindEndpoint, KeywordsEndpoint, CollectionsEndpoint, TvSeasonsEndpoint, TvEpisodesEndpoint } from './endpoints';
2
+ import { CompaniesEndpoint } from './endpoints/companies';
3
+ import { NetworksEndpoint } from './endpoints/networks';
2
4
  export declare class TMDB {
3
5
  private readonly accessToken;
4
6
  constructor(accessToken: string);
@@ -7,6 +9,8 @@ export declare class TMDB {
7
9
  get certifications(): CertificationEndpoint;
8
10
  get changes(): ChangeEndpoint;
9
11
  get credits(): CreditsEndpoint;
12
+ get companies(): CompaniesEndpoint;
13
+ get networks(): NetworksEndpoint;
10
14
  get search(): SearchEndpoint;
11
15
  get genres(): GenreEndpoint;
12
16
  get movies(): MoviesEndpoint;
@@ -19,4 +23,5 @@ export declare class TMDB {
19
23
  get find(): FindEndpoint;
20
24
  get keywords(): KeywordsEndpoint;
21
25
  get collections(): CollectionsEndpoint;
26
+ get tvSeasons(): TvSeasonsEndpoint;
22
27
  }
package/dist/tmdb.js CHANGED
@@ -2,6 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TMDB = void 0;
4
4
  const endpoints_1 = require("./endpoints");
5
+ const companies_1 = require("./endpoints/companies");
6
+ const networks_1 = require("./endpoints/networks");
5
7
  class TMDB {
6
8
  accessToken;
7
9
  constructor(accessToken) {
@@ -22,6 +24,12 @@ class TMDB {
22
24
  get credits() {
23
25
  return new endpoints_1.CreditsEndpoint(this.accessToken);
24
26
  }
27
+ get companies() {
28
+ return new companies_1.CompaniesEndpoint(this.accessToken);
29
+ }
30
+ get networks() {
31
+ return new networks_1.NetworksEndpoint(this.accessToken);
32
+ }
25
33
  get search() {
26
34
  return new endpoints_1.SearchEndpoint(this.accessToken);
27
35
  }
@@ -58,6 +66,9 @@ class TMDB {
58
66
  get collections() {
59
67
  return new endpoints_1.CollectionsEndpoint(this.accessToken);
60
68
  }
69
+ get tvSeasons() {
70
+ return new endpoints_1.TvSeasonsEndpoint(this.accessToken);
71
+ }
61
72
  }
62
73
  exports.TMDB = TMDB;
63
74
  //# sourceMappingURL=tmdb.js.map
package/dist/tmdb.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"tmdb.js","sourceRoot":"","sources":["../src/tmdb.ts"],"names":[],"mappings":";;;AAAA,2CAkBqB;AAErB,MAAa,IAAI;IACE,WAAW,CAAS;IAErC,YAAY,WAAmB;QAC7B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,2BAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC/C,CAAC;IAED,IAAI,aAAa;QACf,OAAO,IAAI,iCAAqB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACrD,CAAC;IAED,IAAI,cAAc;QAChB,OAAO,IAAI,iCAAqB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACrD,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,0BAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC9C,CAAC;IAED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,IAAI,CAAC,WAAW,CAAC,CAAC;IAClD,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,4BAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAChD,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,0BAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC9C,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,0BAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC9C,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,4BAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAChD,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,wBAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC5C,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,4BAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAChD,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,+BAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACnD,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,6BAAiB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACjD,CAAC;CACF;AAtFD,oBAsFC"}
@@ -0,0 +1,28 @@
1
+ import { Image } from '.';
2
+ export interface CompanyDetails {
3
+ description: string;
4
+ headquarters: string;
5
+ homepage: string;
6
+ id: number;
7
+ logo_path: string;
8
+ name: string;
9
+ origin_country: string;
10
+ parent_company: ParentCompany;
11
+ }
12
+ export interface ParentCompany {
13
+ name: string;
14
+ id: number;
15
+ logo_path: string;
16
+ }
17
+ export interface AlternativeNames {
18
+ id: number;
19
+ results: Name[];
20
+ }
21
+ export interface Name {
22
+ name: string;
23
+ type: string;
24
+ }
25
+ export interface CompanyImages {
26
+ id: number;
27
+ logos: Image[];
28
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=companies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"companies.js","sourceRoot":"","sources":["../../src/types/companies.ts"],"names":[],"mappings":""}
@@ -91,3 +91,44 @@ export interface Videos {
91
91
  id: number;
92
92
  results: Video[];
93
93
  }
94
+ export interface AggregateCredits {
95
+ id: number;
96
+ cast: AggregateCast[];
97
+ crew: AggregateCrew[];
98
+ }
99
+ export interface CastRole {
100
+ credit_id: string;
101
+ character: string;
102
+ episode_count: number;
103
+ }
104
+ export interface AggregateCast {
105
+ adult: boolean;
106
+ gender: number;
107
+ id: number;
108
+ known_for_department: string;
109
+ name: string;
110
+ original_name: string;
111
+ popularity: number;
112
+ profile_path: string;
113
+ roles: CastRole[];
114
+ total_episode_count: number;
115
+ order: number;
116
+ }
117
+ export interface CrewJob {
118
+ credit_id: string;
119
+ job: string;
120
+ episode_count: number;
121
+ }
122
+ export interface AggregateCrew {
123
+ adult: boolean;
124
+ gender: number;
125
+ id: number;
126
+ known_for_department: string;
127
+ name: string;
128
+ original_name: string;
129
+ popularity: number;
130
+ profile_path: string;
131
+ jobs: CrewJob[];
132
+ department: string;
133
+ total_episode_count: number;
134
+ }
@@ -1,6 +1,8 @@
1
1
  export * from './options';
2
2
  export * from './certification';
3
3
  export * from './credits';
4
+ export * from './companies';
5
+ export * from './networks';
4
6
  export * from './configuration';
5
7
  export * from './changes';
6
8
  export * from './movies';
@@ -15,6 +17,7 @@ export * from './find';
15
17
  export * from './keywords';
16
18
  export * from './collections';
17
19
  export * from './tv-episode';
20
+ export * from './tv-seasons';
18
21
  export type MediaType = 'movie' | 'tv' | 'person';
19
22
  export interface AuthorDetails {
20
23
  name: string;
@@ -17,6 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./options"), exports);
18
18
  __exportStar(require("./certification"), exports);
19
19
  __exportStar(require("./credits"), exports);
20
+ __exportStar(require("./companies"), exports);
21
+ __exportStar(require("./networks"), exports);
20
22
  __exportStar(require("./configuration"), exports);
21
23
  __exportStar(require("./changes"), exports);
22
24
  __exportStar(require("./movies"), exports);
@@ -31,4 +33,5 @@ __exportStar(require("./find"), exports);
31
33
  __exportStar(require("./keywords"), exports);
32
34
  __exportStar(require("./collections"), exports);
33
35
  __exportStar(require("./tv-episode"), exports);
36
+ __exportStar(require("./tv-seasons"), exports);
34
37
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,kDAAgC;AAChC,4CAA0B;AAC1B,kDAAgC;AAChC,4CAA0B;AAC1B,2CAAyB;AACzB,2CAAyB;AACzB,6CAA2B;AAC3B,oDAAkC;AAClC,2CAAyB;AACzB,6CAA2B;AAC3B,2CAAyB;AACzB,6CAA2B;AAC3B,yCAAuB;AACvB,6CAA2B;AAC3B,gDAA8B;AAC9B,+CAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,kDAAgC;AAChC,4CAA0B;AAC1B,8CAA4B;AAC5B,6CAA2B;AAC3B,kDAAgC;AAChC,4CAA0B;AAC1B,2CAAyB;AACzB,2CAAyB;AACzB,6CAA2B;AAC3B,oDAAkC;AAClC,2CAAyB;AACzB,6CAA2B;AAC3B,2CAAyB;AACzB,6CAA2B;AAC3B,yCAAuB;AACvB,6CAA2B;AAC3B,gDAA8B;AAC9B,+CAA6B;AAC7B,+CAA6B"}
@@ -0,0 +1,13 @@
1
+ import { Image } from '.';
2
+ export interface NetworkDetails {
3
+ headquarters: string;
4
+ homepage: string;
5
+ id: number;
6
+ logo_path: string;
7
+ name: string;
8
+ origin_country: string;
9
+ }
10
+ export interface NetworkImages {
11
+ id: number;
12
+ logos: Image[];
13
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=networks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"networks.js","sourceRoot":"","sources":["../../src/types/networks.ts"],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { AlternativeTitles, Changes, ContentRatings, Credits, EpisodeGroups, ExternalIds, Images, Keywords, MovieLists, PeopleImages, PersonTranslations, PersonCombinedCredits, PersonMovieCredit, PersonTvShowCredit, Recommendations, ReleaseDates, Reviews, ScreenedTheatrically, SimilarMovies, SimilarTvShows, TaggedImages, Translations, Videos, WatchProviders, PersonChangeValue, MovieChangeValue, TvShowChangeValue, TvEpisodeChangeValue, TvEpisodeCredit, TvEpisodeTranslations } from '.';
1
+ import { AlternativeTitles, Changes, ContentRatings, Credits, EpisodeGroups, ExternalIds, Images, Keywords, MovieLists, PeopleImages, PersonTranslations, PersonCombinedCredits, PersonMovieCredit, PersonTvShowCredit, Recommendations, ReleaseDates, Reviews, ScreenedTheatrically, SimilarMovies, SimilarTvShows, TaggedImages, Translations, Videos, WatchProviders, PersonChangeValue, MovieChangeValue, TvShowChangeValue, TvEpisodeChangeValue, TvEpisodeCredit, TvEpisodeTranslations, TvSeasonChangeValue } from '.';
2
2
  export interface LanguageOption {
3
3
  language?: string;
4
4
  }
@@ -16,8 +16,9 @@ export type AppendToResponseMovieKey = 'images' | 'videos' | 'credits' | 'recomm
16
16
  export type AppendToResponseTvKey = 'content_ratings' | 'images' | 'videos' | 'credits' | 'recommendations' | 'reviews' | 'changes' | 'similar' | 'alternative_titles' | 'external_ids' | 'translations' | 'watch/providers' | 'aggregate_credits' | 'episode_groups' | 'screened_theatrically' | 'keywords';
17
17
  export type AppendToResponsePersonKey = 'images' | 'changes' | 'movie_credits' | 'tv_credits' | 'combined_credits' | 'external_ids' | 'tagged_images' | 'translations';
18
18
  export type AppendToResponseTvEpisodeKey = 'images' | 'credits' | 'external_ids' | 'videos' | 'translations';
19
- type AppendToResponseAllKeys = AppendToResponseTvKey | AppendToResponseMovieKey | AppendToResponseTvEpisodeKey | AppendToResponsePersonKey;
20
- export type AppendToResponseMediaType = 'movie' | 'tvShow' | 'person' | 'tvEpisode';
19
+ export type AppendToResponseTvSeasonKey = 'images' | 'credits' | 'external_ids' | 'videos' | 'aggregate_credits' | 'translations';
20
+ type AppendToResponseAllKeys = AppendToResponseTvKey | AppendToResponseMovieKey | AppendToResponseTvEpisodeKey | AppendToResponseTvSeasonKey | AppendToResponsePersonKey;
21
+ export type AppendToResponseMediaType = 'movie' | 'tvShow' | 'person' | 'tvSeason' | 'tvEpisode';
21
22
  export type AppendToResponse<K, T extends AppendToResponseAllKeys[] | undefined, Media extends AppendToResponseMediaType> = K & (T extends undefined ? object : T extends Array<unknown> ? ('credits' extends T[number] ? {
22
23
  credits: Media extends 'tvEpisode' ? TvEpisodeCredit : Omit<Credits, 'id'>;
23
24
  } : object) & ('videos' extends T[number] ? {
@@ -31,7 +32,7 @@ export type AppendToResponse<K, T extends AppendToResponseAllKeys[] | undefined,
31
32
  } : object) & ('reviews' extends T[number] ? {
32
33
  reviews: Omit<Translations, 'id'>;
33
34
  } : object) & ('changes' extends T[number] ? {
34
- changes: Changes<Media extends 'person' ? PersonChangeValue : Media extends 'movie' ? MovieChangeValue : Media extends 'tvShow' ? TvShowChangeValue : TvEpisodeChangeValue>;
35
+ changes: Changes<Media extends 'person' ? PersonChangeValue : Media extends 'movie' ? MovieChangeValue : Media extends 'tvShow' ? TvShowChangeValue : Media extends 'tvSeason' ? TvSeasonChangeValue : TvEpisodeChangeValue>;
35
36
  } : object) & ('keywords' extends T[number] ? {
36
37
  keywords: Omit<Keywords, 'id'>;
37
38
  } : object) & ('lists' extends T[number] ? {
@@ -0,0 +1,18 @@
1
+ import { Episode } from '.';
2
+ export interface SeasonSelection {
3
+ tvShowID: number;
4
+ seasonNumber: number;
5
+ }
6
+ export interface SeasonDetails {
7
+ air_date: string;
8
+ episodes: Episode[];
9
+ name: string;
10
+ overview: string;
11
+ id: number;
12
+ poster_path: string | null;
13
+ season_number: number;
14
+ }
15
+ export type TvSeasonChangeValue = string | {
16
+ episode_id: number;
17
+ episode_number: number;
18
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=tv-seasons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tv-seasons.js","sourceRoot":"","sources":["../../src/types/tv-seasons.ts"],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { Genre, ProductionCompany, ProductionCountry, SpokenLanguage, Episode } from './';
1
+ import { Genre, ProductionCompany, ProductionCountry, SpokenLanguage } from './';
2
2
  export interface CreatedBy {
3
3
  id: number;
4
4
  credit_id: string;
@@ -80,15 +80,6 @@ export interface TvShowDetails {
80
80
  vote_average: number;
81
81
  vote_count: number;
82
82
  }
83
- export interface SeasonDetails {
84
- air_date: string;
85
- episodes: Episode[];
86
- name: string;
87
- overview: string;
88
- id: number;
89
- poster_path: string | null;
90
- season_number: number;
91
- }
92
83
  export interface Network {
93
84
  id: number;
94
85
  logo_path: string;
package/package.json CHANGED
@@ -1,16 +1,15 @@
1
1
  {
2
2
  "name": "tmdb-ts",
3
- "version": "1.3.0",
3
+ "version": "1.5.1",
4
4
  "description": "TMDB v3 library wrapper",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "scripts": {
8
- "compile": "rm -rf dist && tsc -d && npm run copy-types",
8
+ "compile": "rm -rf dist && tsc -d",
9
9
  "lint": "eslint --ext .ts src/",
10
10
  "lint:fix": "eslint --ext .ts src/ --fix",
11
11
  "format": "npx prettier --write src",
12
- "pre-commit": "npm run lint",
13
- "copy-types": "mkdir dist/types && cp src/types/*.d.ts dist/types"
12
+ "pre-commit": "npm run lint"
14
13
  },
15
14
  "bugs": {
16
15
  "url": "https://github.com/blakejoy/tmdb-ts/issues",