/* eslint-disable */ /* this is a generated file, do not edit */ import client from "$lib/apollo-client"; import type { ApolloQueryResult, ObservableQuery, WatchQueryOptions, MutationOptions } from "@apollo/client"; import { readable } from "svelte/store"; import type { Readable } from "svelte/store"; import gql from "graphql-tag" export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; export type MakeEmpty = { [_ in K]?: never }; export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { ID: { input: string | number; output: string; } String: { input: string; output: string; } Boolean: { input: boolean; output: boolean; } Int: { input: number; output: number; } Float: { input: number; output: number; } BigInt: { input: any; output: any; } DateTime: { input: any; output: any; } }; export enum DownloadableMediaState { Downloaded = 'DOWNLOADED', Downloading = 'DOWNLOADING', Missing = 'MISSING', Processed = 'PROCESSED', Searching = 'SEARCHING' } export type DownloadingMedia = { __typename?: 'DownloadingMedia'; id: Scalars['String']['output']; quality: Scalars['String']['output']; resourceId: Scalars['Float']['output']; resourceType: FileType; tag: Scalars['String']['output']; title: Scalars['String']['output']; torrent: Scalars['String']['output']; }; export type EnrichedMovie = { __typename?: 'EnrichedMovie'; createdAt: Scalars['DateTime']['output']; id: Scalars['Float']['output']; originalTitle?: Maybe; overview: Scalars['String']['output']; posterPath?: Maybe; releaseDate: Scalars['String']['output']; runtime?: Maybe; state: DownloadableMediaState; title: Scalars['String']['output']; tmdbId: Scalars['Float']['output']; updatedAt: Scalars['DateTime']['output']; voteAverage: Scalars['Float']['output']; }; export type EnrichedTvEpisode = { __typename?: 'EnrichedTVEpisode'; createdAt: Scalars['DateTime']['output']; episodeNumber: Scalars['Float']['output']; id: Scalars['Float']['output']; releaseDate: Scalars['String']['output']; seasonNumber: Scalars['Float']['output']; state: DownloadableMediaState; tvShow: TvShow; updatedAt: Scalars['DateTime']['output']; voteAverage?: Maybe; }; export type EnrichedTvShow = { __typename?: 'EnrichedTVShow'; createdAt: Scalars['DateTime']['output']; id: Scalars['Float']['output']; originalTitle?: Maybe; overview: Scalars['String']['output']; posterPath?: Maybe; releaseDate: Scalars['String']['output']; runtime?: Maybe; title: Scalars['String']['output']; tmdbId: Scalars['Float']['output']; updatedAt: Scalars['DateTime']['output']; voteAverage: Scalars['Float']['output']; }; export enum Entertainment { Movie = 'Movie', TvShow = 'TvShow' } export enum FileType { Episode = 'EPISODE', Movie = 'MOVIE', Season = 'SEASON' } export type GetTorrentStatusInput = { resourceId: Scalars['Int']['input']; resourceType: FileType; }; export type GraphQlCommonResponse = { __typename?: 'GraphQLCommonResponse'; message?: Maybe; success: Scalars['Boolean']['output']; }; export type JackettFormattedResult = { __typename?: 'JackettFormattedResult'; downloadLink: Scalars['String']['output']; id: Scalars['String']['output']; link: Scalars['String']['output']; normalizedTitle: Scalars['String']['output']; normalizedTitleParts: Array; peers: Scalars['Float']['output']; publishDate: Scalars['String']['output']; quality: Scalars['String']['output']; qualityScore: Scalars['Float']['output']; seeders: Scalars['Float']['output']; size: Scalars['BigInt']['output']; tag: Scalars['String']['output']; tagScore: Scalars['Float']['output']; title: Scalars['String']['output']; }; export type JackettInput = { downloadLink: Scalars['String']['input']; quality: Scalars['String']['input']; tag: Scalars['String']['input']; title: Scalars['String']['input']; }; export type LibraryCalendar = { __typename?: 'LibraryCalendar'; movies: Array; tvEpisodes: Array; }; export type LibraryFileDetails = { __typename?: 'LibraryFileDetails'; id: Scalars['Float']['output']; libraryFileSize?: Maybe; libraryPath: Scalars['String']['output']; torrentFileName?: Maybe; }; export type Movie = { __typename?: 'Movie'; createdAt: Scalars['DateTime']['output']; id: Scalars['Float']['output']; state: DownloadableMediaState; title: Scalars['String']['output']; tmdbId: Scalars['Float']['output']; updatedAt: Scalars['DateTime']['output']; }; export type Mutation = { __typename?: 'Mutation'; clearRedisCache: GraphQlCommonResponse; downloadMovie: GraphQlCommonResponse; downloadOwnTorrent: GraphQlCommonResponse; downloadSeason: GraphQlCommonResponse; downloadTVEpisode: GraphQlCommonResponse; removeMovie: GraphQlCommonResponse; removeTVShow: GraphQlCommonResponse; resetLibrary: GraphQlCommonResponse; saveQualityParams: GraphQlCommonResponse; saveTags: GraphQlCommonResponse; startDownloadMissingJob: GraphQlCommonResponse; startFindNewEpisodesJob: GraphQlCommonResponse; startScanLibraryJob: GraphQlCommonResponse; trackMovie: Movie; trackTVShow: TvShow; updateParams: GraphQlCommonResponse; }; export type MutationDownloadMovieArgs = { jackettResult: JackettInput; movieId: Scalars['Int']['input']; }; export type MutationDownloadOwnTorrentArgs = { mediaId: Scalars['Int']['input']; mediaType: FileType; torrent: Scalars['String']['input']; }; export type MutationDownloadSeasonArgs = { jackettResult: JackettInput; seasonNumber: Scalars['Int']['input']; tvShowTMDBId: Scalars['Int']['input']; }; export type MutationDownloadTvEpisodeArgs = { episodeId: Scalars['Int']['input']; jackettResult: JackettInput; }; export type MutationRemoveMovieArgs = { tmdbId: Scalars['Int']['input']; }; export type MutationRemoveTvShowArgs = { tmdbId: Scalars['Int']['input']; }; export type MutationResetLibraryArgs = { deleteFiles: Scalars['Boolean']['input']; resetSettings: Scalars['Boolean']['input']; }; export type MutationSaveQualityParamsArgs = { qualities: Array; }; export type MutationSaveTagsArgs = { tags: Array; }; export type MutationTrackMovieArgs = { title: Scalars['String']['input']; tmdbId: Scalars['Int']['input']; }; export type MutationTrackTvShowArgs = { seasonNumbers: Array; tmdbId: Scalars['Int']['input']; }; export type MutationUpdateParamsArgs = { params: Array; }; export type OmdbInfo = { __typename?: 'OMDBInfo'; ratings: Ratings; }; export type ParamsHash = { __typename?: 'ParamsHash'; jackett_api_key: Scalars['String']['output']; language: Scalars['String']['output']; max_movie_download_size: Scalars['String']['output']; max_tvshow_episode_download_size: Scalars['String']['output']; organize_library_strategy: Scalars['String']['output']; region: Scalars['String']['output']; tmdb_api_key: Scalars['String']['output']; }; export type Quality = { __typename?: 'Quality'; createdAt: Scalars['DateTime']['output']; id: Scalars['Float']['output']; match: Array; name: Scalars['String']['output']; score: Scalars['Float']['output']; type: Entertainment; updatedAt: Scalars['DateTime']['output']; }; export type QualityInput = { id: Scalars['Float']['input']; score: Scalars['Float']['input']; }; export type Query = { __typename?: 'Query'; discover: TmdbPaginatedResult; getCalendar: LibraryCalendar; getDownloadingMedias: Array; getGenres: TmdbGenresResults; getLanguages: Array; getMissingMovies: Array; getMissingTVEpisodes: Array; getMovieFileDetails: LibraryFileDetails; getMovies: Array; getParams: ParamsHash; getPopular: TmdbSearchResults; getQualityParams: Array; getRecommendedMovies: Array; getRecommendedTVShows: Array; getSearchingMedias: Array; getTVSeasonDetails: Array; getTVShowSeasons: Array; getTVShows: Array; getTags: Array; getTorrentStatus: Array; omdbSearch: OmdbInfo; search: TmdbSearchResults; searchJackett: Array; }; export type QueryDiscoverArgs = { entertainment?: InputMaybe; genres?: InputMaybe>; originLanguage?: InputMaybe; page?: InputMaybe; primaryReleaseYear?: InputMaybe; score?: InputMaybe; }; export type QueryGetMovieFileDetailsArgs = { tmdbId: Scalars['Int']['input']; }; export type QueryGetQualityParamsArgs = { type: Entertainment; }; export type QueryGetTvSeasonDetailsArgs = { seasonNumber: Scalars['Int']['input']; tvShowTMDBId: Scalars['Int']['input']; }; export type QueryGetTvShowSeasonsArgs = { tvShowTMDBId: Scalars['Int']['input']; }; export type QueryGetTorrentStatusArgs = { torrents: Array; }; export type QueryOmdbSearchArgs = { title: Scalars['String']['input']; }; export type QuerySearchArgs = { query: Scalars['String']['input']; }; export type QuerySearchJackettArgs = { query: Scalars['String']['input']; }; export type Ratings = { __typename?: 'Ratings'; IMDB?: Maybe; metaCritic?: Maybe; rottenTomatoes?: Maybe; }; export type SearchingMedia = { __typename?: 'SearchingMedia'; id: Scalars['String']['output']; resourceId: Scalars['Float']['output']; resourceType: FileType; title: Scalars['String']['output']; }; export type TmdbFormattedTvEpisode = { __typename?: 'TMDBFormattedTVEpisode'; airDate?: Maybe; episodeNumber: Scalars['Float']['output']; id: Scalars['Float']['output']; name: Scalars['String']['output']; overview: Scalars['String']['output']; seasonNumber: Scalars['Float']['output']; stillPath?: Maybe; voteAverage?: Maybe; voteCount?: Maybe; }; export type TmdbFormattedTvSeason = { __typename?: 'TMDBFormattedTVSeason'; airDate?: Maybe; episodeCount?: Maybe; episodes?: Maybe>; id: Scalars['Float']['output']; inLibrary: Scalars['Boolean']['output']; name: Scalars['String']['output']; overview?: Maybe; posterPath?: Maybe; seasonNumber: Scalars['Float']['output']; }; export type TmdbGenresResult = { __typename?: 'TMDBGenresResult'; id: Scalars['Float']['output']; name: Scalars['String']['output']; }; export type TmdbGenresResults = { __typename?: 'TMDBGenresResults'; movieGenres: Array; tvShowGenres: Array; }; export type TmdbLanguagesResult = { __typename?: 'TMDBLanguagesResult'; code: Scalars['String']['output']; language: Scalars['String']['output']; }; export type TmdbPaginatedResult = { __typename?: 'TMDBPaginatedResult'; page: Scalars['Float']['output']; results: Array; totalPages: Scalars['Float']['output']; totalResults: Scalars['Float']['output']; }; export type TmdbSearchResult = { __typename?: 'TMDBSearchResult'; id: Scalars['Float']['output']; overview: Scalars['String']['output']; posterPath?: Maybe; releaseDate?: Maybe; runtime?: Maybe; title: Scalars['String']['output']; tmdbId: Scalars['Float']['output']; voteAverage: Scalars['Float']['output']; }; export type TmdbSearchResults = { __typename?: 'TMDBSearchResults'; movies: Array; tvShows: Array; }; export type TvShow = { __typename?: 'TVShow'; createdAt: Scalars['DateTime']['output']; id: Scalars['Float']['output']; title: Scalars['String']['output']; tmdbId: Scalars['Float']['output']; updatedAt: Scalars['DateTime']['output']; }; export type Tag = { __typename?: 'Tag'; createdAt: Scalars['DateTime']['output']; id: Scalars['Float']['output']; name: Scalars['String']['output']; score: Scalars['Float']['output']; updatedAt: Scalars['DateTime']['output']; }; export type TagInput = { name: Scalars['String']['input']; score: Scalars['Float']['input']; }; export type TorrentStatus = { __typename?: 'TorrentStatus'; id: Scalars['Int']['output']; percentDone: Scalars['Float']['output']; rateDownload: Scalars['Int']['output']; rateUpload: Scalars['Int']['output']; resourceId: Scalars['Int']['output']; resourceType: FileType; status: Scalars['Int']['output']; totalSize: Scalars['BigInt']['output']; uploadRatio: Scalars['Float']['output']; uploadedEver: Scalars['BigInt']['output']; }; export type UpdateParamsInput = { key: Scalars['String']['input']; value: Scalars['String']['input']; }; export type ClearCacheMutationVariables = Exact<{ [key: string]: never; }>; export type ClearCacheMutation = { __typename?: 'Mutation', result: { __typename?: 'GraphQLCommonResponse', success: boolean, message?: string | null } }; export type DownloadOwnTorrentMutationVariables = Exact<{ mediaId: Scalars['Int']['input']; mediaType: FileType; torrent: Scalars['String']['input']; }>; export type DownloadOwnTorrentMutation = { __typename?: 'Mutation', downloadOwnTorrent: { __typename?: 'GraphQLCommonResponse', success: boolean, message?: string | null } }; export type StartScanLibraryMutationVariables = Exact<{ [key: string]: never; }>; export type StartScanLibraryMutation = { __typename?: 'Mutation', result: { __typename?: 'GraphQLCommonResponse', success: boolean, message?: string | null } }; export type StartFindNewEpisodesMutationVariables = Exact<{ [key: string]: never; }>; export type StartFindNewEpisodesMutation = { __typename?: 'Mutation', result: { __typename?: 'GraphQLCommonResponse', success: boolean, message?: string | null } }; export type StartDownloadMissingMutationVariables = Exact<{ [key: string]: never; }>; export type StartDownloadMissingMutation = { __typename?: 'Mutation', result: { __typename?: 'GraphQLCommonResponse', success: boolean, message?: string | null } }; export type DownloadMovieMutationVariables = Exact<{ movieId: Scalars['Int']['input']; jackettResult: JackettInput; }>; export type DownloadMovieMutation = { __typename?: 'Mutation', result: { __typename?: 'GraphQLCommonResponse', success: boolean, message?: string | null } }; export type DownloadTvEpisodeMutationVariables = Exact<{ episodeId: Scalars['Int']['input']; jackettResult: JackettInput; }>; export type DownloadTvEpisodeMutation = { __typename?: 'Mutation', result: { __typename?: 'GraphQLCommonResponse', success: boolean, message?: string | null } }; export type DownloadSeasonMutationVariables = Exact<{ tvShowTMDBId: Scalars['Int']['input']; seasonNumber: Scalars['Int']['input']; jackettResult: JackettInput; }>; export type DownloadSeasonMutation = { __typename?: 'Mutation', result: { __typename?: 'GraphQLCommonResponse', success: boolean, message?: string | null } }; export type RemoveMovieMutationVariables = Exact<{ tmdbId: Scalars['Int']['input']; }>; export type RemoveMovieMutation = { __typename?: 'Mutation', result: { __typename?: 'GraphQLCommonResponse', success: boolean, message?: string | null } }; export type RemoveTvShowMutationVariables = Exact<{ tmdbId: Scalars['Int']['input']; }>; export type RemoveTvShowMutation = { __typename?: 'Mutation', result: { __typename?: 'GraphQLCommonResponse', success: boolean, message?: string | null } }; export type ResetLibraryMutationVariables = Exact<{ deleteFiles: Scalars['Boolean']['input']; resetSettings: Scalars['Boolean']['input']; }>; export type ResetLibraryMutation = { __typename?: 'Mutation', result: { __typename?: 'GraphQLCommonResponse', success: boolean, message?: string | null } }; export type SaveQualityMutationVariables = Exact<{ qualities: Array | QualityInput; }>; export type SaveQualityMutation = { __typename?: 'Mutation', result: { __typename?: 'GraphQLCommonResponse', success: boolean, message?: string | null } }; export type SaveTagsMutationVariables = Exact<{ tags: Array | TagInput; }>; export type SaveTagsMutation = { __typename?: 'Mutation', result: { __typename?: 'GraphQLCommonResponse', success: boolean, message?: string | null } }; export type TrackMovieMutationVariables = Exact<{ title: Scalars['String']['input']; tmdbId: Scalars['Int']['input']; }>; export type TrackMovieMutation = { __typename?: 'Mutation', movie: { __typename?: 'Movie', id: number } }; export type TrackTvShowMutationVariables = Exact<{ tmdbId: Scalars['Int']['input']; seasonNumbers: Array | Scalars['Int']['input']; }>; export type TrackTvShowMutation = { __typename?: 'Mutation', tvShow: { __typename?: 'TVShow', id: number } }; export type UpdateParamsMutationVariables = Exact<{ params: Array | UpdateParamsInput; }>; export type UpdateParamsMutation = { __typename?: 'Mutation', result: { __typename?: 'GraphQLCommonResponse', success: boolean, message?: string | null } }; export type GetCalendarQueryVariables = Exact<{ [key: string]: never; }>; export type GetCalendarQuery = { __typename?: 'Query', calendar: { __typename?: 'LibraryCalendar', movies: Array<{ __typename?: 'EnrichedMovie', id: number, title: string, state: DownloadableMediaState, releaseDate: string }>, tvEpisodes: Array<{ __typename?: 'EnrichedTVEpisode', id: number, episodeNumber: number, seasonNumber: number, state: DownloadableMediaState, releaseDate: string, tvShow: { __typename?: 'TVShow', id: number, title: string } }> } }; export type GetDiscoverQueryVariables = Exact<{ entertainment?: InputMaybe; originLanguage?: InputMaybe; primaryReleaseYear?: InputMaybe; score?: InputMaybe; genres?: InputMaybe | Scalars['Float']['input']>; page?: InputMaybe; }>; export type GetDiscoverQuery = { __typename?: 'Query', TMDBResults: { __typename?: 'TMDBPaginatedResult', page: number, totalResults: number, totalPages: number, results: Array<{ __typename?: 'TMDBSearchResult', id: number, tmdbId: number, title: string, posterPath?: string | null, overview: string, runtime?: number | null, voteAverage: number, releaseDate?: string | null }> } }; export type GetDownloadingQueryVariables = Exact<{ [key: string]: never; }>; export type GetDownloadingQuery = { __typename?: 'Query', searching: Array<{ __typename?: 'SearchingMedia', id: string, title: string, resourceId: number, resourceType: FileType }>, downloading: Array<{ __typename?: 'DownloadingMedia', id: string, title: string, tag: string, quality: string, torrent: string, resourceId: number, resourceType: FileType }> }; export type GetGenresQueryVariables = Exact<{ [key: string]: never; }>; export type GetGenresQuery = { __typename?: 'Query', genres: { __typename?: 'TMDBGenresResults', movieGenres: Array<{ __typename?: 'TMDBGenresResult', id: number, name: string }>, tvShowGenres: Array<{ __typename?: 'TMDBGenresResult', id: number, name: string }> } }; export type GetLanguagesQueryVariables = Exact<{ [key: string]: never; }>; export type GetLanguagesQuery = { __typename?: 'Query', languages: Array<{ __typename?: 'TMDBLanguagesResult', code: string, language: string }> }; export type GetLibraryMoviesQueryVariables = Exact<{ [key: string]: never; }>; export type GetLibraryMoviesQuery = { __typename?: 'Query', movies: Array<{ __typename?: 'EnrichedMovie', id: number, tmdbId: number, title: string, originalTitle?: string | null, state: DownloadableMediaState, posterPath?: string | null, overview: string, runtime?: number | null, voteAverage: number, releaseDate: string, createdAt: any, updatedAt: any }> }; export type GetLibraryTvShowsQueryVariables = Exact<{ [key: string]: never; }>; export type GetLibraryTvShowsQuery = { __typename?: 'Query', tvShows: Array<{ __typename?: 'EnrichedTVShow', id: number, tmdbId: number, title: string, originalTitle?: string | null, posterPath?: string | null, runtime?: number | null, overview: string, voteAverage: number, releaseDate: string, createdAt: any, updatedAt: any }> }; export type MissingTvEpisodesFragment = { __typename?: 'EnrichedTVEpisode', id: number, seasonNumber: number, episodeNumber: number, releaseDate: string, tvShow: { __typename?: 'TVShow', id: number, title: string } }; export type MissingMoviesFragment = { __typename?: 'EnrichedMovie', id: number, title: string, releaseDate: string }; export type GetMissingQueryVariables = Exact<{ [key: string]: never; }>; export type GetMissingQuery = { __typename?: 'Query', tvEpisodes: Array<{ __typename?: 'EnrichedTVEpisode', id: number, seasonNumber: number, episodeNumber: number, releaseDate: string, tvShow: { __typename?: 'TVShow', id: number, title: string } }>, movies: Array<{ __typename?: 'EnrichedMovie', id: number, title: string, releaseDate: string }> }; export type GetMovieFileDetailsQueryVariables = Exact<{ tmdbId: Scalars['Int']['input']; }>; export type GetMovieFileDetailsQuery = { __typename?: 'Query', details: { __typename?: 'LibraryFileDetails', id: number, libraryPath: string, libraryFileSize?: any | null, torrentFileName?: string | null } }; export type GetParamsQueryVariables = Exact<{ [key: string]: never; }>; export type GetParamsQuery = { __typename?: 'Query', params: { __typename?: 'ParamsHash', region: string, language: string, tmdb_api_key: string, jackett_api_key: string, max_movie_download_size: string, max_tvshow_episode_download_size: string, organize_library_strategy: string } }; export type GetPopularQueryVariables = Exact<{ [key: string]: never; }>; export type GetPopularQuery = { __typename?: 'Query', results: { __typename?: 'TMDBSearchResults', movies: Array<{ __typename?: 'TMDBSearchResult', id: number, tmdbId: number, title: string, releaseDate?: string | null, posterPath?: string | null, overview: string, runtime?: number | null, voteAverage: number }>, tvShows: Array<{ __typename?: 'TMDBSearchResult', id: number, tmdbId: number, title: string, releaseDate?: string | null, posterPath?: string | null, overview: string, runtime?: number | null, voteAverage: number }> } }; export type GetQualityQueryVariables = Exact<{ type: Entertainment; }>; export type GetQualityQuery = { __typename?: 'Query', qualities: Array<{ __typename?: 'Quality', id: number, name: string, match: Array, score: number, updatedAt: any, createdAt: any, type: Entertainment }> }; export type GetRecommendedQueryVariables = Exact<{ [key: string]: never; }>; export type GetRecommendedQuery = { __typename?: 'Query', tvShows: Array<{ __typename?: 'TMDBSearchResult', id: number, tmdbId: number, title: string, releaseDate?: string | null, posterPath?: string | null, overview: string, runtime?: number | null, voteAverage: number }>, movies: Array<{ __typename?: 'TMDBSearchResult', id: number, tmdbId: number, title: string, releaseDate?: string | null, posterPath?: string | null, overview: string, runtime?: number | null, voteAverage: number }> }; export type GetTagsQueryVariables = Exact<{ [key: string]: never; }>; export type GetTagsQuery = { __typename?: 'Query', tags: Array<{ __typename?: 'Tag', id: number, name: string, score: number, createdAt: any, updatedAt: any }> }; export type GetTorrentStatusQueryVariables = Exact<{ torrents: Array | GetTorrentStatusInput; }>; export type GetTorrentStatusQuery = { __typename?: 'Query', torrents: Array<{ __typename?: 'TorrentStatus', id: number, resourceId: number, resourceType: FileType, percentDone: number, rateDownload: number, rateUpload: number, uploadRatio: number, uploadedEver: any, totalSize: any, status: number }> }; export type GetTvSeasonDetailsQueryVariables = Exact<{ tvShowTMDBId: Scalars['Int']['input']; seasonNumber: Scalars['Int']['input']; }>; export type GetTvSeasonDetailsQuery = { __typename?: 'Query', episodes: Array<{ __typename?: 'EnrichedTVEpisode', id: number, episodeNumber: number, seasonNumber: number, state: DownloadableMediaState, updatedAt: any, voteAverage?: number | null, releaseDate: string, createdAt: any, tvShow: { __typename?: 'TVShow', id: number, title: string, tmdbId: number, updatedAt: any, createdAt: any } }> }; export type GetTvShowSeasonsQueryVariables = Exact<{ tvShowTMDBId: Scalars['Int']['input']; }>; export type GetTvShowSeasonsQuery = { __typename?: 'Query', seasons: Array<{ __typename?: 'TMDBFormattedTVSeason', id: number, name: string, seasonNumber: number, episodeCount?: number | null, overview?: string | null, posterPath?: string | null, airDate?: string | null, inLibrary: boolean }> }; export type OmdbSearchQueryVariables = Exact<{ title: Scalars['String']['input']; }>; export type OmdbSearchQuery = { __typename?: 'Query', result: { __typename?: 'OMDBInfo', ratings: { __typename?: 'Ratings', IMDB?: string | null, rottenTomatoes?: string | null, metaCritic?: string | null } } }; export type SearchTorrentQueryVariables = Exact<{ query: Scalars['String']['input']; }>; export type SearchTorrentQuery = { __typename?: 'Query', results: Array<{ __typename?: 'JackettFormattedResult', id: string, title: string, quality: string, qualityScore: number, seeders: number, peers: number, link: string, downloadLink: string, tag: string, tagScore: number, normalizedTitle: string, normalizedTitleParts: Array, size: any, publishDate: string }> }; export type SearchQueryVariables = Exact<{ query: Scalars['String']['input']; }>; export type SearchQuery = { __typename?: 'Query', results: { __typename?: 'TMDBSearchResults', movies: Array<{ __typename?: 'TMDBSearchResult', id: number, tmdbId: number, title: string, releaseDate?: string | null, posterPath?: string | null, overview: string, runtime?: number | null, voteAverage: number }>, tvShows: Array<{ __typename?: 'TMDBSearchResult', id: number, tmdbId: number, title: string, releaseDate?: string | null, posterPath?: string | null, overview: string, runtime?: number | null, voteAverage: number }> } }; export const MissingTvEpisodesFragmentDoc = gql` fragment MissingTVEpisodes on EnrichedTVEpisode { id seasonNumber episodeNumber releaseDate tvShow { id title } } `; export const MissingMoviesFragmentDoc = gql` fragment MissingMovies on EnrichedMovie { id title releaseDate } `; export const ClearCacheDoc = gql` mutation clearCache { result: clearRedisCache { success message } } `; export const DownloadOwnTorrentDoc = gql` mutation downloadOwnTorrent($mediaId: Int!, $mediaType: FileType!, $torrent: String!) { downloadOwnTorrent(mediaId: $mediaId, mediaType: $mediaType, torrent: $torrent) { success message } } `; export const StartScanLibraryDoc = gql` mutation startScanLibrary { result: startScanLibraryJob { success message } } `; export const StartFindNewEpisodesDoc = gql` mutation startFindNewEpisodes { result: startFindNewEpisodesJob { success message } } `; export const StartDownloadMissingDoc = gql` mutation startDownloadMissing { result: startDownloadMissingJob { success message } } `; export const DownloadMovieDoc = gql` mutation downloadMovie($movieId: Int!, $jackettResult: JackettInput!) { result: downloadMovie(movieId: $movieId, jackettResult: $jackettResult) { success message } } `; export const DownloadTvEpisodeDoc = gql` mutation downloadTVEpisode($episodeId: Int!, $jackettResult: JackettInput!) { result: downloadTVEpisode(episodeId: $episodeId, jackettResult: $jackettResult) { success message } } `; export const DownloadSeasonDoc = gql` mutation downloadSeason($tvShowTMDBId: Int!, $seasonNumber: Int!, $jackettResult: JackettInput!) { result: downloadSeason( tvShowTMDBId: $tvShowTMDBId seasonNumber: $seasonNumber jackettResult: $jackettResult ) { success message } } `; export const RemoveMovieDoc = gql` mutation removeMovie($tmdbId: Int!) { result: removeMovie(tmdbId: $tmdbId) { success message } } `; export const RemoveTvShowDoc = gql` mutation removeTVShow($tmdbId: Int!) { result: removeTVShow(tmdbId: $tmdbId) { success message } } `; export const ResetLibraryDoc = gql` mutation resetLibrary($deleteFiles: Boolean!, $resetSettings: Boolean!) { result: resetLibrary(deleteFiles: $deleteFiles, resetSettings: $resetSettings) { success message } } `; export const SaveQualityDoc = gql` mutation saveQuality($qualities: [QualityInput!]!) { result: saveQualityParams(qualities: $qualities) { success message } } `; export const SaveTagsDoc = gql` mutation saveTags($tags: [TagInput!]!) { result: saveTags(tags: $tags) { success message } } `; export const TrackMovieDoc = gql` mutation trackMovie($title: String!, $tmdbId: Int!) { movie: trackMovie(title: $title, tmdbId: $tmdbId) { id } } `; export const TrackTvShowDoc = gql` mutation trackTVShow($tmdbId: Int!, $seasonNumbers: [Int!]!) { tvShow: trackTVShow(tmdbId: $tmdbId, seasonNumbers: $seasonNumbers) { id } } `; export const UpdateParamsDoc = gql` mutation updateParams($params: [UpdateParamsInput!]!) { result: updateParams(params: $params) { success message } } `; export const GetCalendarDoc = gql` query getCalendar { calendar: getCalendar { movies { id title state releaseDate } tvEpisodes { id tvShow { id title } episodeNumber seasonNumber state releaseDate } } } `; export const GetDiscoverDoc = gql` query getDiscover($entertainment: Entertainment, $originLanguage: String, $primaryReleaseYear: String, $score: Float, $genres: [Float!], $page: Float) { TMDBResults: discover( entertainment: $entertainment originLanguage: $originLanguage primaryReleaseYear: $primaryReleaseYear score: $score genres: $genres page: $page ) { page totalResults totalPages results { id tmdbId title posterPath overview runtime voteAverage releaseDate } } } `; export const GetDownloadingDoc = gql` query getDownloading { searching: getSearchingMedias { id title resourceId resourceType } downloading: getDownloadingMedias { id title tag quality torrent resourceId resourceType } } `; export const GetGenresDoc = gql` query getGenres { genres: getGenres { movieGenres { id name } tvShowGenres { id name } } } `; export const GetLanguagesDoc = gql` query getLanguages { languages: getLanguages { code language } } `; export const GetLibraryMoviesDoc = gql` query getLibraryMovies { movies: getMovies { id tmdbId title originalTitle state posterPath overview runtime voteAverage releaseDate createdAt updatedAt } } `; export const GetLibraryTvShowsDoc = gql` query getLibraryTVShows { tvShows: getTVShows { id tmdbId title originalTitle posterPath runtime overview voteAverage releaseDate createdAt updatedAt } } `; export const GetMissingDoc = gql` query getMissing { tvEpisodes: getMissingTVEpisodes { ...MissingTVEpisodes } movies: getMissingMovies { ...MissingMovies } } ${MissingTvEpisodesFragmentDoc} ${MissingMoviesFragmentDoc}`; export const GetMovieFileDetailsDoc = gql` query getMovieFileDetails($tmdbId: Int!) { details: getMovieFileDetails(tmdbId: $tmdbId) { id libraryPath libraryFileSize torrentFileName } } `; export const GetParamsDoc = gql` query getParams { params: getParams { region language tmdb_api_key jackett_api_key max_movie_download_size max_tvshow_episode_download_size organize_library_strategy } } `; export const GetPopularDoc = gql` query getPopular { results: getPopular { movies { id tmdbId title releaseDate posterPath overview runtime voteAverage } tvShows { id tmdbId title releaseDate posterPath overview runtime voteAverage } } } `; export const GetQualityDoc = gql` query getQuality($type: Entertainment!) { qualities: getQualityParams(type: $type) { id name match score updatedAt createdAt type } } `; export const GetRecommendedDoc = gql` query getRecommended { tvShows: getRecommendedTVShows { id tmdbId title releaseDate posterPath overview runtime voteAverage } movies: getRecommendedMovies { id tmdbId title releaseDate posterPath overview runtime voteAverage } } `; export const GetTagsDoc = gql` query getTags { tags: getTags { id name score createdAt updatedAt } } `; export const GetTorrentStatusDoc = gql` query getTorrentStatus($torrents: [GetTorrentStatusInput!]!) { torrents: getTorrentStatus(torrents: $torrents) { id resourceId resourceType percentDone rateDownload rateUpload uploadRatio uploadedEver totalSize status } } `; export const GetTvSeasonDetailsDoc = gql` query getTVSeasonDetails($tvShowTMDBId: Int!, $seasonNumber: Int!) { episodes: getTVSeasonDetails( tvShowTMDBId: $tvShowTMDBId seasonNumber: $seasonNumber ) { id episodeNumber seasonNumber state updatedAt voteAverage releaseDate createdAt tvShow { id title tmdbId updatedAt createdAt } } } `; export const GetTvShowSeasonsDoc = gql` query getTVShowSeasons($tvShowTMDBId: Int!) { seasons: getTVShowSeasons(tvShowTMDBId: $tvShowTMDBId) { id name seasonNumber episodeCount overview posterPath airDate inLibrary } } `; export const OmdbSearchDoc = gql` query omdbSearch($title: String!) { result: omdbSearch(title: $title) { ratings { IMDB rottenTomatoes metaCritic } } } `; export const SearchTorrentDoc = gql` query searchTorrent($query: String!) { results: searchJackett(query: $query) { id title quality qualityScore seeders peers link downloadLink tag tagScore normalizedTitle normalizedTitleParts size publishDate } } `; export const SearchDoc = gql` query search($query: String!) { results: search(query: $query) { movies { id tmdbId title releaseDate posterPath overview runtime voteAverage } tvShows { id tmdbId title releaseDate posterPath overview runtime voteAverage } } } `; export const clearCache = ( options: Omit< MutationOptions, "mutation" > ) => { const m = client.mutate({ mutation: ClearCacheDoc, ...options, }); return m; } export const downloadOwnTorrent = ( options: Omit< MutationOptions, "mutation" > ) => { const m = client.mutate({ mutation: DownloadOwnTorrentDoc, ...options, }); return m; } export const startScanLibrary = ( options: Omit< MutationOptions, "mutation" > ) => { const m = client.mutate({ mutation: StartScanLibraryDoc, ...options, }); return m; } export const startFindNewEpisodes = ( options: Omit< MutationOptions, "mutation" > ) => { const m = client.mutate({ mutation: StartFindNewEpisodesDoc, ...options, }); return m; } export const startDownloadMissing = ( options: Omit< MutationOptions, "mutation" > ) => { const m = client.mutate({ mutation: StartDownloadMissingDoc, ...options, }); return m; } export const downloadMovie = ( options: Omit< MutationOptions, "mutation" > ) => { const m = client.mutate({ mutation: DownloadMovieDoc, ...options, }); return m; } export const downloadTVEpisode = ( options: Omit< MutationOptions, "mutation" > ) => { const m = client.mutate({ mutation: DownloadTvEpisodeDoc, ...options, }); return m; } export const downloadSeason = ( options: Omit< MutationOptions, "mutation" > ) => { const m = client.mutate({ mutation: DownloadSeasonDoc, ...options, }); return m; } export const removeMovie = ( options: Omit< MutationOptions, "mutation" > ) => { const m = client.mutate({ mutation: RemoveMovieDoc, ...options, }); return m; } export const removeTVShow = ( options: Omit< MutationOptions, "mutation" > ) => { const m = client.mutate({ mutation: RemoveTvShowDoc, ...options, }); return m; } export const resetLibrary = ( options: Omit< MutationOptions, "mutation" > ) => { const m = client.mutate({ mutation: ResetLibraryDoc, ...options, }); return m; } export const saveQuality = ( options: Omit< MutationOptions, "mutation" > ) => { const m = client.mutate({ mutation: SaveQualityDoc, ...options, }); return m; } export const saveTags = ( options: Omit< MutationOptions, "mutation" > ) => { const m = client.mutate({ mutation: SaveTagsDoc, ...options, }); return m; } export const trackMovie = ( options: Omit< MutationOptions, "mutation" > ) => { const m = client.mutate({ mutation: TrackMovieDoc, ...options, }); return m; } export const trackTVShow = ( options: Omit< MutationOptions, "mutation" > ) => { const m = client.mutate({ mutation: TrackTvShowDoc, ...options, }); return m; } export const updateParams = ( options: Omit< MutationOptions, "mutation" > ) => { const m = client.mutate({ mutation: UpdateParamsDoc, ...options, }); return m; } export const getCalendar = ( options: Omit< WatchQueryOptions, "query" > ): Readable< ApolloQueryResult & { query: ObservableQuery< GetCalendarQuery, GetCalendarQueryVariables >; } > => { const q = client.watchQuery({ query: GetCalendarDoc, ...options, }); var result = readable< ApolloQueryResult & { query: ObservableQuery< GetCalendarQuery, GetCalendarQueryVariables >; } >( { data: {} as any, loading: true, error: undefined, networkStatus: 1, query: q }, (set) => { q.subscribe((v: any) => { set({ ...v, query: q }); }); } ); return result; } export const getDiscover = ( options: Omit< WatchQueryOptions, "query" > ): Readable< ApolloQueryResult & { query: ObservableQuery< GetDiscoverQuery, GetDiscoverQueryVariables >; } > => { const q = client.watchQuery({ query: GetDiscoverDoc, ...options, }); var result = readable< ApolloQueryResult & { query: ObservableQuery< GetDiscoverQuery, GetDiscoverQueryVariables >; } >( { data: {} as any, loading: true, error: undefined, networkStatus: 1, query: q }, (set) => { q.subscribe((v: any) => { set({ ...v, query: q }); }); } ); return result; } export const getDownloading = ( options: Omit< WatchQueryOptions, "query" > ): Readable< ApolloQueryResult & { query: ObservableQuery< GetDownloadingQuery, GetDownloadingQueryVariables >; } > => { const q = client.watchQuery({ query: GetDownloadingDoc, ...options, }); var result = readable< ApolloQueryResult & { query: ObservableQuery< GetDownloadingQuery, GetDownloadingQueryVariables >; } >( { data: {} as any, loading: true, error: undefined, networkStatus: 1, query: q }, (set) => { q.subscribe((v: any) => { set({ ...v, query: q }); }); } ); return result; } export const getGenres = ( options: Omit< WatchQueryOptions, "query" > ): Readable< ApolloQueryResult & { query: ObservableQuery< GetGenresQuery, GetGenresQueryVariables >; } > => { const q = client.watchQuery({ query: GetGenresDoc, ...options, }); var result = readable< ApolloQueryResult & { query: ObservableQuery< GetGenresQuery, GetGenresQueryVariables >; } >( { data: {} as any, loading: true, error: undefined, networkStatus: 1, query: q }, (set) => { q.subscribe((v: any) => { set({ ...v, query: q }); }); } ); return result; } export const getLanguages = ( options: Omit< WatchQueryOptions, "query" > ): Readable< ApolloQueryResult & { query: ObservableQuery< GetLanguagesQuery, GetLanguagesQueryVariables >; } > => { const q = client.watchQuery({ query: GetLanguagesDoc, ...options, }); var result = readable< ApolloQueryResult & { query: ObservableQuery< GetLanguagesQuery, GetLanguagesQueryVariables >; } >( { data: {} as any, loading: true, error: undefined, networkStatus: 1, query: q }, (set) => { q.subscribe((v: any) => { set({ ...v, query: q }); }); } ); return result; } export const getLibraryMovies = ( options: Omit< WatchQueryOptions, "query" > ): Readable< ApolloQueryResult & { query: ObservableQuery< GetLibraryMoviesQuery, GetLibraryMoviesQueryVariables >; } > => { const q = client.watchQuery({ query: GetLibraryMoviesDoc, ...options, }); var result = readable< ApolloQueryResult & { query: ObservableQuery< GetLibraryMoviesQuery, GetLibraryMoviesQueryVariables >; } >( { data: {} as any, loading: true, error: undefined, networkStatus: 1, query: q }, (set) => { q.subscribe((v: any) => { set({ ...v, query: q }); }); } ); return result; } export const getLibraryTVShows = ( options: Omit< WatchQueryOptions, "query" > ): Readable< ApolloQueryResult & { query: ObservableQuery< GetLibraryTvShowsQuery, GetLibraryTvShowsQueryVariables >; } > => { const q = client.watchQuery({ query: GetLibraryTvShowsDoc, ...options, }); var result = readable< ApolloQueryResult & { query: ObservableQuery< GetLibraryTvShowsQuery, GetLibraryTvShowsQueryVariables >; } >( { data: {} as any, loading: true, error: undefined, networkStatus: 1, query: q }, (set) => { q.subscribe((v: any) => { set({ ...v, query: q }); }); } ); return result; } export const getMissing = ( options: Omit< WatchQueryOptions, "query" > ): Readable< ApolloQueryResult & { query: ObservableQuery< GetMissingQuery, GetMissingQueryVariables >; } > => { const q = client.watchQuery({ query: GetMissingDoc, ...options, }); var result = readable< ApolloQueryResult & { query: ObservableQuery< GetMissingQuery, GetMissingQueryVariables >; } >( { data: {} as any, loading: true, error: undefined, networkStatus: 1, query: q }, (set) => { q.subscribe((v: any) => { set({ ...v, query: q }); }); } ); return result; } export const getMovieFileDetails = ( options: Omit< WatchQueryOptions, "query" > ): Readable< ApolloQueryResult & { query: ObservableQuery< GetMovieFileDetailsQuery, GetMovieFileDetailsQueryVariables >; } > => { const q = client.watchQuery({ query: GetMovieFileDetailsDoc, ...options, }); var result = readable< ApolloQueryResult & { query: ObservableQuery< GetMovieFileDetailsQuery, GetMovieFileDetailsQueryVariables >; } >( { data: {} as any, loading: true, error: undefined, networkStatus: 1, query: q }, (set) => { q.subscribe((v: any) => { set({ ...v, query: q }); }); } ); return result; } export const getParams = ( options: Omit< WatchQueryOptions, "query" > ): Readable< ApolloQueryResult & { query: ObservableQuery< GetParamsQuery, GetParamsQueryVariables >; } > => { const q = client.watchQuery({ query: GetParamsDoc, ...options, }); var result = readable< ApolloQueryResult & { query: ObservableQuery< GetParamsQuery, GetParamsQueryVariables >; } >( { data: {} as any, loading: true, error: undefined, networkStatus: 1, query: q }, (set) => { q.subscribe((v: any) => { set({ ...v, query: q }); }); } ); return result; } export const getPopular = ( options: Omit< WatchQueryOptions, "query" > ): Readable< ApolloQueryResult & { query: ObservableQuery< GetPopularQuery, GetPopularQueryVariables >; } > => { const q = client.watchQuery({ query: GetPopularDoc, ...options, }); var result = readable< ApolloQueryResult & { query: ObservableQuery< GetPopularQuery, GetPopularQueryVariables >; } >( { data: {} as any, loading: true, error: undefined, networkStatus: 1, query: q }, (set) => { q.subscribe((v: any) => { set({ ...v, query: q }); }); } ); return result; } export const getQuality = ( options: Omit< WatchQueryOptions, "query" > ): Readable< ApolloQueryResult & { query: ObservableQuery< GetQualityQuery, GetQualityQueryVariables >; } > => { const q = client.watchQuery({ query: GetQualityDoc, ...options, }); var result = readable< ApolloQueryResult & { query: ObservableQuery< GetQualityQuery, GetQualityQueryVariables >; } >( { data: {} as any, loading: true, error: undefined, networkStatus: 1, query: q }, (set) => { q.subscribe((v: any) => { set({ ...v, query: q }); }); } ); return result; } export const getRecommended = ( options: Omit< WatchQueryOptions, "query" > ): Readable< ApolloQueryResult & { query: ObservableQuery< GetRecommendedQuery, GetRecommendedQueryVariables >; } > => { const q = client.watchQuery({ query: GetRecommendedDoc, ...options, }); var result = readable< ApolloQueryResult & { query: ObservableQuery< GetRecommendedQuery, GetRecommendedQueryVariables >; } >( { data: {} as any, loading: true, error: undefined, networkStatus: 1, query: q }, (set) => { q.subscribe((v: any) => { set({ ...v, query: q }); }); } ); return result; } export const getTags = ( options: Omit< WatchQueryOptions, "query" > ): Readable< ApolloQueryResult & { query: ObservableQuery< GetTagsQuery, GetTagsQueryVariables >; } > => { const q = client.watchQuery({ query: GetTagsDoc, ...options, }); var result = readable< ApolloQueryResult & { query: ObservableQuery< GetTagsQuery, GetTagsQueryVariables >; } >( { data: {} as any, loading: true, error: undefined, networkStatus: 1, query: q }, (set) => { q.subscribe((v: any) => { set({ ...v, query: q }); }); } ); return result; } export const getTorrentStatus = ( options: Omit< WatchQueryOptions, "query" > ): Readable< ApolloQueryResult & { query: ObservableQuery< GetTorrentStatusQuery, GetTorrentStatusQueryVariables >; } > => { const q = client.watchQuery({ query: GetTorrentStatusDoc, ...options, }); var result = readable< ApolloQueryResult & { query: ObservableQuery< GetTorrentStatusQuery, GetTorrentStatusQueryVariables >; } >( { data: {} as any, loading: true, error: undefined, networkStatus: 1, query: q }, (set) => { q.subscribe((v: any) => { set({ ...v, query: q }); }); } ); return result; } export const getTVSeasonDetails = ( options: Omit< WatchQueryOptions, "query" > ): Readable< ApolloQueryResult & { query: ObservableQuery< GetTvSeasonDetailsQuery, GetTvSeasonDetailsQueryVariables >; } > => { const q = client.watchQuery({ query: GetTvSeasonDetailsDoc, ...options, }); var result = readable< ApolloQueryResult & { query: ObservableQuery< GetTvSeasonDetailsQuery, GetTvSeasonDetailsQueryVariables >; } >( { data: {} as any, loading: true, error: undefined, networkStatus: 1, query: q }, (set) => { q.subscribe((v: any) => { set({ ...v, query: q }); }); } ); return result; } export const getTVShowSeasons = ( options: Omit< WatchQueryOptions, "query" > ): Readable< ApolloQueryResult & { query: ObservableQuery< GetTvShowSeasonsQuery, GetTvShowSeasonsQueryVariables >; } > => { const q = client.watchQuery({ query: GetTvShowSeasonsDoc, ...options, }); var result = readable< ApolloQueryResult & { query: ObservableQuery< GetTvShowSeasonsQuery, GetTvShowSeasonsQueryVariables >; } >( { data: {} as any, loading: true, error: undefined, networkStatus: 1, query: q }, (set) => { q.subscribe((v: any) => { set({ ...v, query: q }); }); } ); return result; } export const omdbSearch = ( options: Omit< WatchQueryOptions, "query" > ): Readable< ApolloQueryResult & { query: ObservableQuery< OmdbSearchQuery, OmdbSearchQueryVariables >; } > => { const q = client.watchQuery({ query: OmdbSearchDoc, ...options, }); var result = readable< ApolloQueryResult & { query: ObservableQuery< OmdbSearchQuery, OmdbSearchQueryVariables >; } >( { data: {} as any, loading: true, error: undefined, networkStatus: 1, query: q }, (set) => { q.subscribe((v: any) => { set({ ...v, query: q }); }); } ); return result; } export const searchTorrent = ( options: Omit< WatchQueryOptions, "query" > ): Readable< ApolloQueryResult & { query: ObservableQuery< SearchTorrentQuery, SearchTorrentQueryVariables >; } > => { const q = client.watchQuery({ query: SearchTorrentDoc, ...options, }); var result = readable< ApolloQueryResult & { query: ObservableQuery< SearchTorrentQuery, SearchTorrentQueryVariables >; } >( { data: {} as any, loading: true, error: undefined, networkStatus: 1, query: q }, (set) => { q.subscribe((v: any) => { set({ ...v, query: q }); }); } ); return result; } export const search = ( options: Omit< WatchQueryOptions, "query" > ): Readable< ApolloQueryResult & { query: ObservableQuery< SearchQuery, SearchQueryVariables >; } > => { const q = client.watchQuery({ query: SearchDoc, ...options, }); var result = readable< ApolloQueryResult & { query: ObservableQuery< SearchQuery, SearchQueryVariables >; } >( { data: {} as any, loading: true, error: undefined, networkStatus: 1, query: q }, (set) => { q.subscribe((v: any) => { set({ ...v, query: q }); }); } ); return result; }