import { WebhookEntry } from "@cross-seed/shared/configSchema";
import { ActionResult } from "./constants.js";
import { ResultAssessment } from "./decide.js";
import { SearcheeWithLabel } from "./searchee.js";
export declare let pushNotifier: PushNotifier;
type TrackerName = string;
export interface WebhookResult {
    url: string;
    ok: boolean;
    error?: string;
}
interface PushNotification {
    title?: string;
    body: string;
    templateVars?: Record<string, string>;
    extra?: Record<string, unknown>;
}
export declare function substituteTemplateVars(obj: Record<string, unknown>, vars: Record<string, string>): Record<string, unknown>;
/**
 * Merge user-supplied headers over the defaults case-insensitively, so a
 * user override like `content-type` replaces the default `Content-Type`
 * instead of both being sent.
 */
export declare function mergeHeaders(defaults: Record<string, string>, overrides?: Record<string, string>): Record<string, string>;
export declare class PushNotifier {
    entries: WebhookEntry[];
    constructor(entries: WebhookEntry[]);
    notify({ title, body, templateVars, ...rest }: PushNotification): Promise<WebhookResult[]>;
}
export declare function sendResultsNotification(searchee: SearcheeWithLabel, results: [ResultAssessment, TrackerName, ActionResult][]): void;
export declare function initializePushNotifier(): void;
export declare function sendTestNotification(entries?: WebhookEntry[]): Promise<WebhookResult[]>;
export {};
