import { RuntimeConfig } from "./runtimeConfig.js";
import { Awaitable } from "./utils.js";
export declare function exitGracefully(): Promise<void>;
/**
 * validates and sets RuntimeConfig
 * @return (the number of errors Zod encountered in the configuration)
 */
/**
 * starts singletons, then runs the callback, then cleans up
 * @param entrypoint
 */
type CommanderActionCb = (options: Record<string, unknown>) => void | Promise<void>;
/**
 * Initializes only the database, runs the callback, then cleans up
 */
export declare function withMinimalRuntime<T extends (...args: unknown[]) => Awaitable<string | void>>(entrypoint: T, { migrate }?: {
    migrate?: boolean | undefined;
}): (...args: Parameters<T>) => Promise<void>;
export declare function determineRuntimeConfig(rawOptions: Record<string, unknown>): Promise<{
    delay: number;
    torznab: string[];
    useClientTorrents: boolean;
    dataDirs: string[];
    matchMode: import("@cross-seed/shared/constants").MatchMode;
    skipRecheck: boolean;
    autoResumeMaxDownload: number;
    ignoreNonRelevantFilesToResume: boolean;
    linkDirs: string[];
    linkType: import("@cross-seed/shared/constants").LinkType;
    flatLinking: boolean;
    maxDataDepth: number;
    outputDir: string;
    includeSingleEpisodes: boolean;
    verbose: boolean;
    includeNonVideos: boolean;
    fuzzySizeThreshold: number;
    action: import("@cross-seed/shared/constants").Action;
    torrentClients: string[];
    duplicateCategories: boolean;
    notificationWebhookUrls: (string | {
        url: string;
        payload?: Record<string, unknown> | undefined;
        headers?: Record<string, string> | undefined;
    })[];
    torrents: string[];
    blockList: string[];
    sonarr: string[];
    radarr: string[];
    linkCategory?: string | undefined;
    torrentDir?: string | undefined;
    injectDir?: string | undefined;
    ignoreTitles?: boolean | undefined;
    seasonFromEpisodes?: number | undefined;
    excludeOlder?: number | undefined;
    excludeRecentSearch?: number | undefined;
    port?: number | undefined;
    host?: string | undefined;
    basePath?: string | undefined;
    searchCadence?: number | undefined;
    rssCadence?: number | undefined;
    snatchTimeout?: number | undefined;
    searchTimeout?: number | undefined;
    searchLimit?: number | undefined;
    apiKey?: string | undefined;
}>;
/**
 * Initializes the full runtime, runs the callback, then cleans up
 * @param entrypoint
 */
export declare function withFullRuntime(entrypoint: (runtimeConfig: RuntimeConfig) => Promise<void>): CommanderActionCb;
export declare function restartCrossSeed(): Promise<void>;
export {};
