@lorenzopant/tmdb 1.12.0 → 1.13.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.
@@ -0,0 +1,14 @@
1
+ import { TVEpisodeGroupDetails, TVEpisodeGroupParams } from "../types/other/tv_episode_groups";
2
+ import { TMDBAPIBase } from "./base";
3
+ export declare class TVEpisodeGroupsAPI extends TMDBAPIBase {
4
+ /**
5
+ * Details
6
+ * GET - https://api.themoviedb.org/3/tv/episode_group/{episode_group_id}
7
+ *
8
+ * Get the details of a TV episode group by ID.
9
+ * @param episode_group_id The ID of the episode group.
10
+ * @reference https://developer.themoviedb.org/reference/tv-episode-group-details
11
+ */
12
+ details(params: TVEpisodeGroupParams): Promise<TVEpisodeGroupDetails>;
13
+ }
14
+ //# sourceMappingURL=tv_episode_groups.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tv_episode_groups.d.ts","sourceRoot":"","sources":["../../src/endpoints/tv_episode_groups.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAC/F,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAErC,qBAAa,kBAAmB,SAAQ,WAAW;IAClD;;;;;;;OAOG;IACG,OAAO,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAI3E"}
@@ -0,0 +1,16 @@
1
+ import { ENDPOINTS } from "../routes";
2
+ import { TMDBAPIBase } from "./base";
3
+ export class TVEpisodeGroupsAPI extends TMDBAPIBase {
4
+ /**
5
+ * Details
6
+ * GET - https://api.themoviedb.org/3/tv/episode_group/{episode_group_id}
7
+ *
8
+ * Get the details of a TV episode group by ID.
9
+ * @param episode_group_id The ID of the episode group.
10
+ * @reference https://developer.themoviedb.org/reference/tv-episode-group-details
11
+ */
12
+ async details(params) {
13
+ const endpoint = `${ENDPOINTS.TV_EPISODE_GROUPS.DETAILS}/${params.episode_group_id}`;
14
+ return this.client.request(endpoint);
15
+ }
16
+ }
package/dist/routes.d.ts CHANGED
@@ -114,6 +114,9 @@ export declare const ENDPOINTS: {
114
114
  TRANSLATIONS: string;
115
115
  VIDEOS: string;
116
116
  };
117
+ TV_EPISODE_GROUPS: {
118
+ DETAILS: string;
119
+ };
117
120
  WATCH_PROVIDERS: {
118
121
  MOVIE: string;
119
122
  TV: string;
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyHrB,CAAC"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4HrB,CAAC"}
package/dist/routes.js CHANGED
@@ -114,6 +114,9 @@ export const ENDPOINTS = {
114
114
  TRANSLATIONS: "/translations",
115
115
  VIDEOS: "/videos",
116
116
  },
117
+ TV_EPISODE_GROUPS: {
118
+ DETAILS: "/tv/episode_group",
119
+ },
117
120
  WATCH_PROVIDERS: {
118
121
  MOVIE: "/watch/providers/movie",
119
122
  TV: "/watch/providers/tv",
package/dist/tmdb.d.ts CHANGED
@@ -18,6 +18,7 @@ import { ImageAPI } from "./images/images";
18
18
  import { TMDBOptions } from "./types/config";
19
19
  import { NetworksAPI } from "./endpoints/networks";
20
20
  import { TVEpisodesAPI } from "./endpoints/tv_episodes";
21
+ import { TVEpisodeGroupsAPI } from "./endpoints/tv_episode_groups";
21
22
  export declare class TMDB {
22
23
  private client;
23
24
  private options;
@@ -40,6 +41,7 @@ export declare class TMDB {
40
41
  find: FindAPI;
41
42
  networks: NetworksAPI;
42
43
  tv_episodes: TVEpisodesAPI;
44
+ tv_episode_groups: TVEpisodeGroupsAPI;
43
45
  /**
44
46
  * Creates a new TMDB instance.
45
47
  * @param accessToken The TMDB API access token.
@@ -1 +1 @@
1
- {"version":3,"file":"tmdb.d.ts","sourceRoot":"","sources":["../src/tmdb.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,WAAW,EA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C,OAAO,EAAE,UAAU,CAAC;IACpB,SAAS,EAAE,YAAY,CAAC;IACxB,OAAO,EAAE,UAAU,CAAC;IACpB,WAAW,EAAE,cAAc,CAAC;IAC5B,QAAQ,EAAE,WAAW,CAAC;IACtB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,WAAW,CAAC;IACtB,WAAW,EAAE,aAAa,CAAC;IAC3B,iBAAiB,EAAE,kBAAkB,CAAC;IAG7C;;;;OAIG;gBACS,WAAW,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB;CAyB1D"}
package/dist/tmdb.js CHANGED
@@ -20,6 +20,7 @@ import { Errors } from "./errors/messages";
20
20
  import { ImageAPI } from "./images/images";
21
21
  import { NetworksAPI } from "./endpoints/networks";
22
22
  import { TVEpisodesAPI } from "./endpoints/tv_episodes";
23
+ import { TVEpisodeGroupsAPI } from "./endpoints/tv_episode_groups";
23
24
  export class TMDB {
24
25
  client;
25
26
  options; // ** Default options for all requests
@@ -42,6 +43,7 @@ export class TMDB {
42
43
  find;
43
44
  networks;
44
45
  tv_episodes;
46
+ tv_episode_groups;
45
47
  // etc...
46
48
  /**
47
49
  * Creates a new TMDB instance.
@@ -72,5 +74,6 @@ export class TMDB {
72
74
  this.find = new FindAPI(this.client, this.options);
73
75
  this.networks = new NetworksAPI(this.client, this.options);
74
76
  this.tv_episodes = new TVEpisodesAPI(this.client, this.options);
77
+ this.tv_episode_groups = new TVEpisodeGroupsAPI(this.client, this.options);
75
78
  }
76
79
  }
@@ -5,4 +5,5 @@ export * from "./find";
5
5
  export * from "./watch_providers";
6
6
  export * from "./keywords";
7
7
  export * from "./networks";
8
+ export * from "./tv_episode_groups";
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/other/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/other/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC"}
@@ -5,3 +5,4 @@ export * from "./find";
5
5
  export * from "./watch_providers";
6
6
  export * from "./keywords";
7
7
  export * from "./networks";
8
+ export * from "./tv_episode_groups";
@@ -0,0 +1,64 @@
1
+ import { NetworkItem } from "./networks";
2
+ import { TVEpisode } from "../tv-episodes/tv_episodes";
3
+ /**
4
+ * Full details for a TV episode group, including grouped episode lists.
5
+ */
6
+ export type TVEpisodeGroupDetails = {
7
+ /** Description of the episode group */
8
+ description: string;
9
+ /** Total number of episodes across all groups */
10
+ episode_count: number;
11
+ /** Number of group entries in this episode group */
12
+ group_count: number;
13
+ /** Unique episode group identifier */
14
+ id: string;
15
+ /** Name of the episode group */
16
+ name: string;
17
+ /** Network associated with the episode group, if available */
18
+ network: NetworkItem | null;
19
+ /** Grouping strategy type (e.g., numbered by season, collections, etc.) */
20
+ type: TVEpisodeGroupType;
21
+ /** Grouped episode entries */
22
+ groups: TVEpisodeGroupDetailsItem[];
23
+ };
24
+ /**
25
+ * A group within an episode group (e.g., a season-like grouping).
26
+ */
27
+ export type TVEpisodeGroupDetailsItem = {
28
+ /** Unique group identifier */
29
+ id: string;
30
+ /** Group name */
31
+ name: string;
32
+ /** Display order */
33
+ order: number;
34
+ /** Whether the group is locked on TMDB */
35
+ locked: boolean;
36
+ /** Episodes included in this group */
37
+ episodes: TVEpisodeGroupEpisode[];
38
+ };
39
+ /**
40
+ * A simplified TV episode item returned in episode group details.
41
+ */
42
+ export type TVEpisodeGroupEpisode = Omit<TVEpisode, "guest_stars" | "runtime"> & {
43
+ /** Production code for the episode, if available */
44
+ production_code?: string | null;
45
+ /** Path to the episode still image, if available */
46
+ still_path?: string | null;
47
+ };
48
+ /**
49
+ * Supported episode group type identifiers.
50
+ */
51
+ export declare enum TVEpisodeGroupType {
52
+ OriginalAirDate = 1,
53
+ Absolute = 2,
54
+ Dvd = 3,
55
+ Digital = 4,
56
+ StoryArc = 5,
57
+ Production = 6,
58
+ TV = 7
59
+ }
60
+ export type TVEpisodeGroupParams = {
61
+ /** Episode group identifier */
62
+ episode_group_id: string;
63
+ };
64
+ //# sourceMappingURL=tv_episode_groups.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tv_episode_groups.d.ts","sourceRoot":"","sources":["../../../src/types/other/tv_episode_groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IACnC,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,aAAa,EAAE,MAAM,CAAC;IACtB,oDAAoD;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,2EAA2E;IAC3E,IAAI,EAAE,kBAAkB,CAAC;IACzB,8BAA8B;IAC9B,MAAM,EAAE,yBAAyB,EAAE,CAAC;CACpC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACvC,8BAA8B;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,MAAM,EAAE,OAAO,CAAC;IAChB,sCAAsC;IACtC,QAAQ,EAAE,qBAAqB,EAAE,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,SAAS,EAAE,aAAa,GAAG,SAAS,CAAC,GAAG;IAChF,oDAAoD;IACpD,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,oBAAY,kBAAkB;IAC7B,eAAe,IAAI;IACnB,QAAQ,IAAI;IACZ,GAAG,IAAI;IACP,OAAO,IAAI;IACX,QAAQ,IAAI;IACZ,UAAU,IAAI;IACd,EAAE,IAAI;CACN;AAED,MAAM,MAAM,oBAAoB,GAAG;IAClC,+BAA+B;IAC/B,gBAAgB,EAAE,MAAM,CAAC;CACzB,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Supported episode group type identifiers.
3
+ */
4
+ export var TVEpisodeGroupType;
5
+ (function (TVEpisodeGroupType) {
6
+ TVEpisodeGroupType[TVEpisodeGroupType["OriginalAirDate"] = 1] = "OriginalAirDate";
7
+ TVEpisodeGroupType[TVEpisodeGroupType["Absolute"] = 2] = "Absolute";
8
+ TVEpisodeGroupType[TVEpisodeGroupType["Dvd"] = 3] = "Dvd";
9
+ TVEpisodeGroupType[TVEpisodeGroupType["Digital"] = 4] = "Digital";
10
+ TVEpisodeGroupType[TVEpisodeGroupType["StoryArc"] = 5] = "StoryArc";
11
+ TVEpisodeGroupType[TVEpisodeGroupType["Production"] = 6] = "Production";
12
+ TVEpisodeGroupType[TVEpisodeGroupType["TV"] = 7] = "TV";
13
+ })(TVEpisodeGroupType || (TVEpisodeGroupType = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lorenzopant/tmdb",
3
- "version": "1.12.0",
3
+ "version": "1.13.0",
4
4
  "description": "A completely type-safe The Movie Database (TMDB) API wrapper for typescript applications.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",