@segha/tmdb 0.0.5 → 1.0.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.
Files changed (33) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/DataTypes/Video.ts +10 -2
  3. package/Enums/MonetizationType.ts +15 -0
  4. package/Enums/ReleaseType.ts +17 -0
  5. package/Enums/WatchProvider.ts +27 -0
  6. package/Enums/index.ts +4 -0
  7. package/Movies/MovieDetails.ts +5 -1
  8. package/README.md +58 -12
  9. package/TVSeries/SerieDetails.ts +5 -1
  10. package/index.ts +1 -0
  11. package/json-schemas/API/MethodsSchema.json +780 -4
  12. package/json-schemas/API/SpecSchema.json +780 -4
  13. package/json-schemas/API/index.json +1710 -158
  14. package/json-schemas/DataTypes/VideoSchema.json +12 -2
  15. package/json-schemas/DataTypes/VideosResponseSchema.json +12 -2
  16. package/json-schemas/DataTypes/index.json +24 -4
  17. package/json-schemas/Enums/MonetizationType.json +11 -0
  18. package/json-schemas/Enums/ReleaseType.json +12 -0
  19. package/json-schemas/Enums/WatchProvider.json +17 -0
  20. package/json-schemas/Enums/index.json +47 -0
  21. package/json-schemas/MonetizationType.json +11 -0
  22. package/json-schemas/MovieDetailsSchema.json +365 -0
  23. package/json-schemas/Movies/MovieDetailsSchema.json +365 -0
  24. package/json-schemas/Movies/index.json +365 -0
  25. package/json-schemas/ReleaseType.json +12 -0
  26. package/json-schemas/SerieDetailsSchema.json +391 -0
  27. package/json-schemas/TVSeries/SerieDetailsSchema.json +391 -0
  28. package/json-schemas/TVSeries/index.json +391 -0
  29. package/json-schemas/VideoSchema.json +12 -2
  30. package/json-schemas/VideosResponseSchema.json +12 -2
  31. package/json-schemas/WatchProvider.json +17 -0
  32. package/json-schemas/index.json +820 -4
  33. package/package.json +1 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,16 @@
1
+ # Changelog
2
+
3
+ All notable changes to @segha/tmdb will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.0.0] - 2026-02-21
9
+
10
+ ### Changed
11
+
12
+ - **BREAKING** Property `site` in `VideoSchema` type changed from `string` to `undefined`
13
+ - **BREAKING** Property `type` in `VideoSchema` type changed from `string` to `undefined`
14
+ - Property `results` in `MovieDetailsSchema` was modified
15
+ - Property `results` in `SerieDetailsSchema` was modified
16
+ - Property `results` in `VideosResponseSchema` was modified
@@ -1,13 +1,21 @@
1
1
  import z from "zod";
2
2
 
3
+ const YouTubeSite = z.literal('YouTube');
4
+
5
+ const VideoSite = z.union([YouTubeSite]);
6
+
7
+ const TeaserType = z.literal('Teaser');
8
+
9
+ const VideoType = z.union([TeaserType]);
10
+
3
11
  export const VideoSchema = z.object({
4
12
  iso_639_1: z.string().describe('Spoken language ISO 639-1 code'),
5
13
  iso_3166_1: z.string().describe('Production country ISO 3166-1 Alpha-2 code'),
6
14
  name: z.string().describe('Video name'),
7
15
  key: z.string().describe('Video key'),
8
- site: z.string().describe('Video site'),
16
+ site: VideoSite.describe('Video site'),
9
17
  size: z.number().describe('Video size'),
10
- type: z.string().describe('Video type'),
18
+ type: VideoType.describe('Video type'),
11
19
  official: z.boolean().describe('Video official'),
12
20
  published_at: z.string().describe('Video published at'),
13
21
  id: z.string().describe('Video ID'),
@@ -0,0 +1,15 @@
1
+ import z from "zod"
2
+
3
+ const FlatRate = z.literal('flatrate');
4
+ const Free = z.literal('free');
5
+ const Ads = z.literal('ads');
6
+ const Rent = z.literal('rent');
7
+ const Buy = z.literal('buy');
8
+
9
+ export const MonetizationType = z.enum({
10
+ FlatRate: FlatRate.value,
11
+ Free: Free.value,
12
+ Ads: Ads.value,
13
+ Rent: Rent.value,
14
+ Buy: Buy.value
15
+ })
@@ -0,0 +1,17 @@
1
+ import z from "zod";
2
+
3
+ const Premiere = z.literal('1');
4
+ const LimitedTheatrical = z.literal('2');
5
+ const Theatrical = z.literal('3');
6
+ const Digital = z.literal('4');
7
+ const Physical = z.literal('5');
8
+ const Tv = z.literal('6');
9
+
10
+ export const ReleaseType = z.enum({
11
+ Premiere: Premiere.value,
12
+ LimitedTheatrical: LimitedTheatrical.value,
13
+ Theatrical: Theatrical.value,
14
+ Digital: Digital.value,
15
+ Physical: Physical.value,
16
+ Tv: Tv.value
17
+ });
@@ -0,0 +1,27 @@
1
+ import z from "zod";
2
+
3
+ const Netflix = z.literal(8);
4
+ const DisneyPlus = z.literal(337);
5
+ const AppleTv = z.literal(350);
6
+ const PrimeVideo = z.literal(119);
7
+ const Filmin = z.literal(63);
8
+ const ATresPlayer = z.literal(62);
9
+ const HboMax = z.literal(1899);
10
+ const YoutubePremium = z.literal(188);
11
+ const RTVE = z.literal(541);
12
+ const Plex = z.literal(538);
13
+ const CrunchyRoll = z.literal(283);
14
+
15
+ export const WatchProvider = z.enum({
16
+ Netflix: Netflix.value,
17
+ DisneyPlus: DisneyPlus.value,
18
+ AppleTv: AppleTv.value,
19
+ PrimeVideo: PrimeVideo.value,
20
+ Filmin: Filmin.value,
21
+ ATresPlayer: ATresPlayer.value,
22
+ HboMax: HboMax.value,
23
+ YoutubePremium: YoutubePremium.value,
24
+ RTVE: RTVE.value,
25
+ Plex: Plex.value,
26
+ CrunchyRoll: CrunchyRoll.value,
27
+ });
package/Enums/index.ts ADDED
@@ -0,0 +1,4 @@
1
+
2
+ export * from './MonetizationType';
3
+ export * from './ReleaseType';
4
+ export * from './WatchProvider';
@@ -1,7 +1,8 @@
1
1
 
2
2
  import z from "zod";
3
3
 
4
- import { GenreSchema, ProductionCompanySchema, ProductionCountrySchema, LanguageSchema } from "../DataTypes";
4
+ import { GenreSchema, ProductionCompanySchema, ProductionCountrySchema, LanguageSchema, VideosResponseSchema, VideoSchema, ImagesResponseSchema } from "../DataTypes";
5
+ import { MoviesResponseSchema } from './MoviesResponse';
5
6
  import { MovieSchema } from "./Movie";
6
7
 
7
8
  export const MovieDetailsSchema = MovieSchema.omit({
@@ -18,6 +19,9 @@ export const MovieDetailsSchema = MovieSchema.omit({
18
19
  spoken_languages: z.array(LanguageSchema).describe('Spoken languages'),
19
20
  status: z.string().describe('Current status (Released, Post Production, etc.)'),
20
21
  tagline: z.string().nullable().describe('Tagline'),
22
+ images: ImagesResponseSchema.optional(),
23
+ videos: VideosResponseSchema.optional(),
24
+ similar: MoviesResponseSchema.optional()
21
25
  });
22
26
 
23
27
  export const MovieDetailsParamsSchema = z.object({
package/README.md CHANGED
@@ -40,6 +40,7 @@ import { SpecSchema, ConfigurationSchema } from '@segha/tmdb/api';
40
40
  - [Image](#image)
41
41
  - [ImagesResponse](#imagesresponse)
42
42
  - [Language](#language)
43
+ - [MonetizationType](#monetizationtype)
43
44
  - [MovieDetailsParams](#moviedetailsparams)
44
45
  - [MovieDetails](#moviedetails)
45
46
  - [Movie](#movie)
@@ -48,6 +49,7 @@ import { SpecSchema, ConfigurationSchema } from '@segha/tmdb/api';
48
49
  - [PosterSize](#postersize)
49
50
  - [ProductionCompany](#productioncompany)
50
51
  - [ProductionCountry](#productioncountry)
52
+ - [ReleaseType](#releasetype)
51
53
  - [SearchMoviesParams](#searchmoviesparams)
52
54
  - [SearchSeriesParams](#searchseriesparams)
53
55
  - [SerieDetailsParams](#seriedetailsparams)
@@ -56,6 +58,7 @@ import { SpecSchema, ConfigurationSchema } from '@segha/tmdb/api';
56
58
  - [SeriesResponse](#seriesresponse)
57
59
  - [Video](#video)
58
60
  - [VideosResponse](#videosresponse)
61
+ - [WatchProvider](#watchprovider)
59
62
 
60
63
  ## API Reference
61
64
 
@@ -122,6 +125,16 @@ _Object containing the following properties:_
122
125
 
123
126
  _(\*) Required._
124
127
 
128
+ ## MonetizationType
129
+
130
+ _Enum, one of the following possible values:_
131
+
132
+ - `'flatrate'`
133
+ - `'free'`
134
+ - `'ads'`
135
+ - `'rent'`
136
+ - `'buy'`
137
+
125
138
  ## MovieDetailsParams
126
139
 
127
140
  _Object containing the following properties:_
@@ -164,6 +177,9 @@ _Object containing the following properties:_
164
177
  | **`spoken_languages`** (\*) | Spoken languages | _Array of [Language](#language) items_ |
165
178
  | **`status`** (\*) | Current status (Released, Post Production, etc.) | `string` |
166
179
  | **`tagline`** (\*) | Tagline | `string` (_nullable_) |
180
+ | `images` | | [ImagesResponse](#imagesresponse) |
181
+ | `videos` | | [VideosResponse](#videosresponse) |
182
+ | `similar` | | [MoviesResponse](#moviesresponse) |
167
183
 
168
184
  _(\*) Required._
169
185
 
@@ -254,6 +270,17 @@ _Object containing the following properties:_
254
270
 
255
271
  _(\*) Required._
256
272
 
273
+ ## ReleaseType
274
+
275
+ _Enum, one of the following possible values:_
276
+
277
+ - `'1'`
278
+ - `'2'`
279
+ - `'3'`
280
+ - `'4'`
281
+ - `'5'`
282
+ - `'6'`
283
+
257
284
  ## SearchMoviesParams
258
285
 
259
286
  _Object containing the following properties:_
@@ -332,6 +359,9 @@ _Object containing the following properties:_
332
359
  | **`status`** (\*) | Status of the serie | `string` |
333
360
  | **`tagline`** (\*) | Tagline of the serie | `string` (_nullable_) |
334
361
  | **`type`** (\*) | Type of the serie | `string` |
362
+ | `images` | | [ImagesResponse](#imagesresponse) |
363
+ | `videos` | | [VideosResponse](#videosresponse) |
364
+ | `similar` | | [SeriesResponse](#seriesresponse) |
335
365
 
336
366
  _(\*) Required._
337
367
 
@@ -374,18 +404,18 @@ _(\*) Required._
374
404
 
375
405
  _Object containing the following properties:_
376
406
 
377
- | Property | Description | Type |
378
- | :---------------------- | :----------------------------------------- | :-------- |
379
- | **`iso_639_1`** (\*) | Spoken language ISO 639-1 code | `string` |
380
- | **`iso_3166_1`** (\*) | Production country ISO 3166-1 Alpha-2 code | `string` |
381
- | **`name`** (\*) | Video name | `string` |
382
- | **`key`** (\*) | Video key | `string` |
383
- | **`site`** (\*) | Video site | `string` |
384
- | **`size`** (\*) | Video size | `number` |
385
- | **`type`** (\*) | Video type | `string` |
386
- | **`official`** (\*) | Video official | `boolean` |
387
- | **`published_at`** (\*) | Video published at | `string` |
388
- | **`id`** (\*) | Video ID | `string` |
407
+ | Property | Description | Type |
408
+ | :---------------------- | :----------------------------------------- | :---------- |
409
+ | **`iso_639_1`** (\*) | Spoken language ISO 639-1 code | `string` |
410
+ | **`iso_3166_1`** (\*) | Production country ISO 3166-1 Alpha-2 code | `string` |
411
+ | **`name`** (\*) | Video name | `string` |
412
+ | **`key`** (\*) | Video key | `string` |
413
+ | **`site`** (\*) | Video site | `'YouTube'` |
414
+ | **`size`** (\*) | Video size | `number` |
415
+ | **`type`** (\*) | Video type | `'Teaser'` |
416
+ | **`official`** (\*) | Video official | `boolean` |
417
+ | **`published_at`** (\*) | Video published at | `string` |
418
+ | **`id`** (\*) | Video ID | `string` |
389
419
 
390
420
  _(\*) Required._
391
421
 
@@ -399,3 +429,19 @@ _Object containing the following properties:_
399
429
  | **`results`** (\*) | Videos | _Array of [Video](#video) items_ |
400
430
 
401
431
  _(\*) Required._
432
+
433
+ ## WatchProvider
434
+
435
+ _Enum, one of the following possible values:_
436
+
437
+ - `8`
438
+ - `337`
439
+ - `350`
440
+ - `119`
441
+ - `63`
442
+ - `62`
443
+ - `1899`
444
+ - `188`
445
+ - `541`
446
+ - `538`
447
+ - `283`
@@ -1,12 +1,13 @@
1
1
  import z from "zod";
2
2
 
3
- import { GenreSchema, ProductionCompanySchema, ProductionCountrySchema, LanguageSchema } from "../DataTypes";
3
+ import { GenreSchema, ProductionCompanySchema, ProductionCountrySchema, LanguageSchema, VideosResponseSchema, ImagesResponseSchema } from "../DataTypes";
4
4
 
5
5
  import { SerieSchema } from "./Serie";
6
6
  import { SeasonSchema } from "./Season";
7
7
  import { NetworkSchema } from "./Network";
8
8
  import { CreatorSchema } from "./Creator";
9
9
  import { EpisodeSchema } from "./Episode";
10
+ import { SeriesResponseSchema } from "./SeriesResponse";
10
11
 
11
12
  export const SerieDetailsSchema = SerieSchema.omit({
12
13
  genre_ids: true,
@@ -31,6 +32,9 @@ export const SerieDetailsSchema = SerieSchema.omit({
31
32
  status: z.string().describe('Status of the serie'),
32
33
  tagline: z.string().nullable().describe('Tagline of the serie'),
33
34
  type: z.string().describe('Type of the serie'),
35
+ images: ImagesResponseSchema.optional(),
36
+ videos: VideosResponseSchema.optional(),
37
+ similar: SeriesResponseSchema.optional()
34
38
  });
35
39
 
36
40
  export const SerieDetailsParamsSchema = z.object({
package/index.ts CHANGED
@@ -1,4 +1,5 @@
1
1
 
2
2
  export * from './DataTypes';
3
+ export * from './Enums';
3
4
  export * from './Movies';
4
5
  export * from './TVSeries';