import { METAFORM_ERROR } from "./enums"; import { Params, Responses } from "./schemas"; export type MetaformOptions = { apiVer: string; apiDomain: string; https: boolean; timeout: number; }; export interface IMetaform3 { getTitle(params: Params.GetTitleParams): Promise; getTitleList(params: Params.GetTitleListParams): Promise; getTitleRandom(params?: Params.GetTitleRandomParams): Promise; getTitleUpdates(params?: Params.GetTitleChangesAndUpdatesParams): Promise; getTitleChanges(params?: Params.GetTitleChangesAndUpdatesParams): Promise; getTitleSchedule(params?: Params.GetTitleScheduleParams): Promise; getTitleSearch(params: Params.GetTitleSearchParams): Promise; getTitleFranchises(params: Params.GetTitleFranchisesParams): Promise; getYoutube(params?: Params.GetYoutubeParams): Promise; getTorrentSeedStats(params?: Params.GetTorrentsSeedStatsParams): Promise; getFranchiseList(params: Params.FranshiseListParams): Promise; getFeed(params?: Params.GetFeedParams): Promise; login(email: string, password: string): Promise; getGenres(): Promise; getYears(): Promise; getTeam(): Promise; session: string | null; } type TimeoutFetchOptions = RequestInit & { timeout?: number; }; export declare class Metaform3 implements IMetaform3 { private readonly _urlConst; private readonly _loginUrl; private readonly _logoutUrl; private readonly _timeout; private _session; constructor(options?: MetaformOptions); get session(): string | null; set session(session: string | null); /** * Prepare user credentials before send * * @private * @param {string} email User ```login``` or ```email``` * @param {string} password User password * @return {*} {string} * @memberof Metaform3 */ private _encodeUserCredentials; protected _required(arg: unknown): boolean; /** * Modified fetch() method, added timeout option * * @protected * @param {string} url Request URL * @param {TimeoutFetchOptions} options Extended fetch() options * @return {*} * @memberof Metaform3 */ protected _fetch(url: string, options: TimeoutFetchOptions): Promise; /** * Method for fetch JSON data * * @protected * @template T * @param {string} url * @return {*} {Promise} * @memberof Metaform3 */ protected _requestData(url: string): Promise; protected _getQuery(params: unknown): string; protected _getError(error: unknown): { error: METAFORM_ERROR; data: null; }; login(email: string, password: string): Promise; getFeed(params?: Params.GetFeedParams): Promise; getTitleFranchises(params: Params.GetTitleFranchisesParams): Promise; getTorrentSeedStats(params?: Params.GetTorrentsSeedStatsParams): Promise; getYoutube(params?: Params.GetYoutubeParams): Promise; getTitleSearch(params: Params.GetTitleSearchParams): Promise; getTitleSchedule(params?: Params.GetTitleScheduleParams): Promise; getFranchiseList(params: Params.FranshiseListParams): Promise; getTitleUpdates(params?: Params.GetTitleChangesAndUpdatesParams): Promise; getTitleChanges(params?: Params.GetTitleChangesAndUpdatesParams): Promise; getTitle(params: Params.GetTitleParams): Promise; getTitleRandom(params?: Params.GetTitleRandomParams): Promise; getTitleList(params: Params.GetTitleListParams): Promise; getYears(): Promise; getGenres(): Promise; getTeam(): Promise; } export {};