@segha/watchmode
v0.0.4
Published
Schemas for Watchmode
Readme
@segha/watchmode
Schemas for Watchmode
Requirements
zod
Installation
pnpm add @segha/watchmodeUsage
import { FreeServiceTypeSchema, IdMappingEntrySchema, IdMappingSchema, ... } from '@segha/watchmode';
// Validate data
const result = FreeServiceTypeSchema.parse(data);
// Infer TypeScript types
type FreeServiceType = z.infer<typeof FreeServiceTypeSchema>;You can also import specific submodules:
import { SpecSchema, ConfigurationSchema } from '@segha/watchmode/api';Schemas
- FreeServiceType
- IdMappingEntry
- IdMapping
- PurchaseServiceType
- StreamingSourceName
- StreamingSource
- StreamingSourceType
- StreamingSourcesParameters
- StreamingSources
- SubscriptionServiceType
- TVEServiceType
- TitleStreamingSource
- TitleStreamingSourcesParameters
- TitleStreamingSources
API Reference
FreeServiceType
Free ad-supported services (Tubi, Pluto TV, etc.)
Literal 'free' value.
IdMappingEntry
Object containing the following properties:
| Property | Description | Type |
| :---------------------- | :----------- | :------- |
| Watchmode ID (*) | Watchmode ID | string |
| IMDB ID (*) | IMDB ID | string |
| TMDB ID (*) | TMDB ID | string |
| TMDB Type (*) | TMDB Type | string |
| Title (*) | Title | string |
| Year (*) | Year | string |
(*) Required.
IdMapping
Array of IdMappingEntry items.
PurchaseServiceType
Rental/purchase services (iTunes, Vudu, etc.)
Literal 'purchase' value.
StreamingSourceName
Enum, one of the following possible values:
'Netflix''Hulu''Max''Prime Video''Disney+''AppleTV+''BBC iPlayer''Hayu''Paramount+''Paramount+ with Showtime''Crave''Peacock''Peacock Premium''Amazon Freevee''Netflix Free''Crave Starz''Stan''STARZ''CBC Gem''Foxtel Now''Sky Go''MAX Free''MGM+''Now TV''All 4''BINGE''Britbox UK''Tubi TV''AMC''Arrow Player''Fawesome''FX''Kanopy''NBC''SkyShowtime''USA''Videoland''Youtube Premium''Crunchyroll Premium''Movistar+''Plex''Topic''The Criterion Channel''FILMIN''Fandor''Shudder''WWE Network''AppleTV''PBS''Google Play''Amazon''Fandango at Home''YouTube''The Roku Channel''Syfy''Acorn TV (Via Amazon Prime)''Cinemax (Via Amazon Prime)''Curiosity Stream (Via Amazon Prime)''Fandor (Via Amazon Prime)''Hallmark Movies Now (Via Amazon Prime)''Shout! Factory TV (Via Amazon Prime)''Shudder (Via Amazon Prime)''STARZ (Via Amazon Prime)''SundanceNow Doc Club (Via Amazon Prime)''Spectrum On Demand''DirecTV On Demand''7plus''9Now''A&E''ABC iview''Acorn TV''Adult Swim''AHC GO''AMC+''Animal Planet GO''BBC America''Beamafilm''BET''BET+''BFI Player''Bravo''Britbox''Britbox (Via Amazon Prime)''Cartoon Network''CBS''CBS News''Chili''Cinemax (Via Hulu)''Cineplex''Clarovideo''Crunchyroll''CTV''Curiosity Stream''Curzon Home Cinema''The CW''Darkmatter TV''Destination America GO''Discovery GO''Discovery Life GO''Discovery+''Fetch TV''Flix Premiere''FlixFling''Food Network''FOX''Freeform''fuboTV''fyi''Globoplay''GuideDoc''Hallmark Channel Everywhere''Hallmark Movies Now''HBO (Via Hulu)''HGTV''HiDive''The History Channel''Hollywood Suite''Hoopla''JioHotstar''Hungama Play''ICI TOU.TV''IFC''Investigation Discovery''Investigation Discovery GO''ITVX''Lifetime''LOGO''MGM+ (Via Amazon Prime)''MTV''MUBI''Amazon MX Player''My5''National Geographic''NBC News''NLZIET''Oxygen''OzFlix''Paramount Network''PBS Kids''Pluto TV''Popcornflix''Rakuten TV''SBS On Demand''Science GO''Shout! Factory TV''Sky Store''Sony LIV''South Park Studios''STARZ (Via Hulu)''Sun Nxt''Sundance''SundanceNow Doc Club''Talk Talk TV''TBS''tenplay''TLC GO''TNT''Travel Channel''truTV''TV Land''UKTV Play''VH1''Vice TV''Vimeo''Virgin TV GO''Fandango at Home Free''Watch Food Network''Watch HGTV''Watch TCM''Watch Travel Channel''WE tv''Windows Store''Zee5'
StreamingSource
Object containing the following properties:
| Property | Description | Type |
| :------------------------------- | :--------------------- | :------------------------------------------ |
| id (*) | ID | number |
| name (*) | Name | string |
| type (*) | Streaming source type | StreamingSourceType |
| logo_100px (*) | Logo 100px | string |
| ios_appstore_url (*) | iOS App Store URL | string (nullable) |
| android_playstore_url (*) | Android Play Store URL | string (nullable) |
| android_tv_url (*) | Android TV URL | string (nullable) |
| fire_tv_url (*) | Fire TV URL | string (nullable) |
| roku_url (*) | Roku URL | string (nullable) |
| tvos_url (*) | tvOS URL | string (nullable) |
| regions (*) | Regions | Array<string> |
(*) Required.
StreamingSourceType
Streaming source type
Union of the following possible types:
StreamingSourcesParameters
Object containing the following properties:
| Property | Description | Type |
| :----------------- | :------------------------------------------------------------------------------------------------------ | :------- |
| regions (*) | Filter sources by region. Pass one or multiple 2-letter country codes comma-separated (e.g., US,GB,CA). | string |
| types (*) | Filter sources by type. Pass one or multiple types comma-separated. | string |
(*) Required.
StreamingSources
Array of StreamingSource items.
SubscriptionServiceType
Subscription services (Netflix, Hulu, etc.)
Literal 'sub' value.
TVEServiceType
TV Channel App (cable login required)
Literal 'tve' value.
TitleStreamingSource
Object containing the following properties:
| Property | Description | Type |
| :------------------------ | :---------------------------------------------------------------------------------------- | :------------------------------------------ |
| source_id (*) | Source ID | number |
| name (*) | | StreamingSourceName |
| type (*) | Streaming source type | StreamingSourceType |
| region (*) | Region | string |
| ios_url (*) | iOS deep link URL. For free plans, returns "Deeplinks available for paid plans only." | string (nullable) |
| android_url (*) | Android deep link URL. For free plans, returns "Deeplinks available for paid plans only." | string (nullable) |
| web_url (*) | Web URL to watch the title | string (nullable) |
| tvos_url (*) | tvOS deep link. Only included if TV links are enabled for your account. | string (nullable) |
| android_tv_url (*) | Android TV deep link. Only included if TV links are enabled for your account. | string (nullable) |
| roku_url (*) | Roku deep link. Only included if TV links are enabled for your account. | string (nullable) |
| format (*) | Video quality (HD, 4K, etc.) | string (nullable) |
| price (*) | Price for rent/buy sources | number (nullable) |
| seasons (*) | Number of seasons available (for TV) | number (nullable) |
| episodes (*) | Number of episodes available (for TV) | number (nullable) |
(*) Required.
TitleStreamingSourcesParameters
Object containing the following properties:
| Property | Description | Type |
| :----------------- | :------------------------------------------------------------------------------------------------------ | :------- |
| regions (*) | Filter sources by region. Pass one or multiple 2-letter country codes comma-separated (e.g., US,GB,CA). | string |
(*) Required.
TitleStreamingSources
Array of TitleStreamingSource items.
