import { ExternalIds } from "./arr.js";
import { MediaType } from "./constants.js";
import { Indexer } from "./indexers.js";
import { Candidate, CandidateWithIndexerId } from "./pipeline.js";
import { RuntimeConfig } from "./runtimeConfig.js";
import { Searchee, SearcheeWithLabel } from "./searchee.js";
export interface IdSearchParams {
    tvdbid?: string;
    tmdbid?: string;
    imdbid?: string;
    tvmazeid?: string;
}
interface Query extends IdSearchParams {
    t: "caps" | "search" | "tvsearch" | "movie";
    q?: string;
    limit?: number;
    offset?: number;
    season?: number | string;
    ep?: number | string;
}
export type IndexerCandidates = {
    indexerId: number;
    candidates: CandidateWithIndexerId[];
};
export type CachedSearch = {
    q: string | null;
    indexerCandidates: IndexerCandidates[];
    lastSearch: number;
    ids?: ExternalIds;
};
/**
 * Used to calculate what searchees should share the same cached search.
 * @param searchee - The searchee object to generate the search string for.
 * @returns The search string that would be used to query indexers.
 */
export declare function getSearchString(searchee: Searchee): Promise<string>;
/**
 * Useful for calculating the number of unique queries with just a searchee name.
 * @param name - The name of the searchee.
 * @return The search string that would be used to query indexers.
 */
export declare function estimateSearchString(name: string): Promise<string>;
/**
 * Only for testing purposes. (createTorznabSearchQueries now accepts searchee
 * instead of stem (title))
 *
 * Logs the queries that would be sent to indexers for id and non-id searches.
 * Ensure that item exists in your arr for the id search example.
 * Ensure mediaType is what cross-seed would actually parse the item as.
 */
export declare function logQueries(searcheeTitle: string, mediaType: MediaType): Promise<void>;
export declare function indexerDoesSupportMediaType(mediaType: MediaType, i: Indexer): boolean;
export declare function rssPager(indexer: Indexer, timeSinceLastRun: number): AsyncGenerator<Candidate, void, undefined>;
export declare function queryRssFeeds(lastRun: number, indexers: Indexer[]): Promise<AsyncGenerator<Candidate>[]>;
export declare function searchTorznab(searchee: SearcheeWithLabel, indexerSearchCount: Map<number, number>, cachedSearch: CachedSearch, progress: string, options?: {
    configOverride: Partial<RuntimeConfig>;
}): Promise<IndexerCandidates[]>;
export declare function assembleUrl(baseUrl: string, apikey: string, params: Query): string;
export declare function updateCaps(): Promise<void>;
export declare function updateCapsForIndexer(indexer: Indexer): Promise<void>;
export {};
