import { type HttpClient } from "../services/webhook.dispatcher";
import { type WebhookDelivery, type WebhookEndpoint, type WebhookEvent, type WebhookTestResult } from "../types/webhook.types";
import { resolveEndpointValidationOptions } from "./endpoint-validation";
import type { WebhookDeliveryListOptions, WebhookEndpointInput, WebhookRuntime, WebhookRuntimeConfig, WebhookRuntimeSecurityOptions, WebhookRuntimeTestPayload } from "./types";
export declare class WebhookRuntimeService implements WebhookRuntime {
    private readonly config;
    private readonly dispatcher;
    private readonly endpointStore;
    private readonly deliveryStore;
    private readonly securityOptions;
    private readonly persistence;
    private readonly eventQueue;
    private batchProcessor;
    private initPromise;
    private processing;
    constructor(config: WebhookRuntimeConfig);
    addEndpoint(input: WebhookEndpointInput): Promise<WebhookEndpoint>;
    addEndpoints(inputs: readonly WebhookEndpointInput[]): Promise<WebhookEndpoint[]>;
    updateEndpoint(endpointId: string, updates: Partial<WebhookEndpointInput>): Promise<WebhookEndpoint>;
    removeEndpoint(endpointId: string): Promise<void>;
    getEndpoint(endpointId: string): Promise<WebhookEndpoint | null>;
    listEndpoints(): Promise<WebhookEndpoint[]>;
    probeEndpoint(input: string | WebhookRuntimeTestPayload): Promise<WebhookTestResult>;
    emit(event: WebhookEvent): Promise<void>;
    emitSync(event: WebhookEvent): Promise<WebhookDelivery[]>;
    flush(): Promise<void>;
    listDeliveries(options?: WebhookDeliveryListOptions): Promise<WebhookDelivery[]>;
    shutdown(): Promise<void>;
    private resolvePersistence;
    private ensureInitialized;
    private validateEvent;
    private processBatch;
    private getMatchingEndpoints;
    private createProbeEvent;
    private generateEndpointId;
    private startBatchProcessor;
}
export declare function probeEndpoint(runtime: WebhookRuntimeService, input: string | WebhookRuntimeTestPayload): Promise<WebhookTestResult>;
export declare function addEndpoints(runtime: WebhookRuntimeService, inputs: readonly WebhookEndpointInput[]): Promise<WebhookEndpoint[]>;
export declare function resolveWebhookSecurityOptions(security: WebhookRuntimeSecurityOptions | undefined): ReturnType<typeof resolveEndpointValidationOptions>;
export type { HttpClient };
