import { EpisodeResolver } from "../../util/episode-resolver"; import { CollectionItem } from "../../util/types"; import { IDisneyOpts } from "./config"; /** `program` is used for eg movies, or episodes in a show */ export declare type SearchEntityType = "program" | "series" | "set"; declare const IMAGE_TYPES: readonly ["tile", "thumbnail", "background_details", "background_up_next"]; export declare type ImageTypes = CollectionItem; declare const IMAGE_RATIOS: readonly ["1.78", "1.33", "1.0", "0.75", "0.71", "0.67"]; export declare type ImageRatios = CollectionItem; declare type ResourceSet = Partial>; export interface ISearchHit { image: ResourceSet; text: ResourceSet<"title" | "description", "full" | "slug", { content: string; language: string; sourceEntity: SearchEntityType; }>; family?: { encodedFamilyId: string; }; mediaRights: { downloadBlocked: true; rewind: true; }; contentId: string; encodedSeriesId?: string; episodeNumber?: number; episodeSequenceNumber?: number; originalLanguage: string; programType: "movie"; runtimeMillis: 5337000; seasonId?: string; seasonSequenceNumber?: number; seriesId?: string; type: "DmcVideo" | "DmcSeries" | "StandardCollection"; videoId: string; } export interface IDisneySeason { seasonId: string; seasonSequenceNumber: number; } export interface IDisneyEpisode extends ISearchHit { indexInSeason: number; season: number; } export interface ICollection { meta: { hits: number; offset: number; page_size: number; }; id: string; items?: ISearchHit[]; title: string; type: "BecauseYouSet" | "ContinueWatchingSet" | "CuratedSet" | "RecommendationSet"; } export declare function pickPreferredImage(imageContainer: ISearchHit["image"], key: SearchEntityType): { masterId: string; masterHeight: number; masterWidth: number; url: string; } | undefined; export declare class DisneyApi { private readonly options; private clientInfo?; private tokenExpiresAt; constructor(options: IDisneyOpts); getResumeForFamilyId(familyId: string): Promise<{ contentId: string; startTime: number; } | { contentId: string; startTime?: undefined; }>; pickResumeEpisodeForSeries(seriesId: string): Promise<{ startTime: number | undefined; episode: ISearchHit; } | undefined>; /** * Typically, a more convenient method than [pickResumeEpisodeForSeries] * when you just want *some* episode. If there's nothing to resume, this * will find the first episode of the series */ pickEpisodeForSeries(seriesId: string): Promise<{ startTime: number | undefined; episode: ISearchHit; } | undefined>; search(query: string): Promise; getCollections(): Promise; loadCollection(collection: ICollection): Promise; getSeriesSeasons(encodedSeriesId: string): Promise; getSeriesEpisodes(encodedSeriesId: string): Promise>; getSeasonEpisodesById(encodedSeriesId: string, seasonId: string): AsyncGenerator; ensureTokensValid(): Promise<{ token: string; refreshToken: string; }>; private getSeasonEpisodeBatchesById; private ensureToken; private getClientInfo; private request; } export {};