import { IJobBridge, BridgeDeliveryInsert, StatusHistogram } from './bridge.protocol.js';
import { BridgeDeliveryRecord } from './bridge-delivery.schema.js';
import 'drizzle-orm';
import '../events/event-bus.protocol.js';
import '../../types/drizzle.js';
import 'drizzle-orm/node-postgres';
import '../events/event-registry.js';
import 'drizzle-orm/pg-core';

declare class MemoryBridgeDeliveryRepo implements IJobBridge {
    private readonly deliveries;
    insertDelivery(row: BridgeDeliveryInsert): Promise<void>;
    findDelivery(eventId: string, triggerId: string): Promise<BridgeDeliveryRecord | null>;
    findDeliveryById(id: string): Promise<BridgeDeliveryRecord | null>;
    markDelivered(id: string, userRunId: string): Promise<void>;
    markSkipped(id: string, reason: string): Promise<void>;
    markFailed(id: string, error: Record<string, unknown>): Promise<void>;
    /**
     * Observability read — see `IJobBridge.getStatusHistogram` JSDoc for the
     * tenant-filter and windowHours contract.
     *
     * Unlike `insertDelivery`, this read does NOT call `assertTenantId`:
     * `tenantId === undefined` is the supported cross-tenant admin view.
     */
    getStatusHistogram(windowHours: number, tenantId?: string | null, nowMs?: number): Promise<StatusHistogram>;
    /** All deliveries for a given event (any status, declaration order). */
    getDeliveriesForEvent(eventId: string): BridgeDeliveryRecord[];
    /** All deliveries currently in the given status. */
    getByStatus(status: BridgeDeliveryRecord['status']): BridgeDeliveryRecord[];
    /** Reset the store. Tests use this in `beforeEach`. */
    clear(): void;
    private findById;
}

export { MemoryBridgeDeliveryRepo };
