import { DrizzleClient } from '../../types/drizzle.js';
import { IEventBus, DrizzleTransaction } from '../events/event-bus.protocol.js';
import { EventTypeName, EventOfType } from '../events/event-registry.js';
import { I as IJobOrchestrator } from '../../../job-orchestrator.protocol-ZuJ3ow-O.js';
import { IEventFlow, IJobBridge, BridgeRegistry, PublishAndStartOptions, PublishAndStartResult } from './bridge.protocol.js';
import 'drizzle-orm/node-postgres';
import '../jobs/job-orchestration.schema.js';
import 'drizzle-orm/pg-core';
import 'drizzle-orm';
import '@nestjs/common';
import './bridge-delivery.schema.js';

declare class EventFlowService implements IEventFlow {
    private readonly db;
    private readonly eventBus;
    private readonly orchestrator;
    private readonly bridgeRepo;
    private readonly registry;
    private readonly multiTenant;
    constructor(db: DrizzleClient, eventBus: IEventBus, orchestrator: IJobOrchestrator, bridgeRepo: IJobBridge, registry?: BridgeRegistry, multiTenant?: boolean);
    publish<T extends EventTypeName>(event: EventOfType<T>, tx?: DrizzleTransaction): Promise<void>;
    publishAndStart<T extends EventTypeName>(event: EventOfType<T>, jobType: string, input: unknown, opts?: PublishAndStartOptions): Promise<PublishAndStartResult>;
    /**
     * Linear scan of the per-event-type trigger list for entries whose
     * `jobType` matches. Typical N is 1–5; the table is not big enough to
     * warrant a secondary index. Returns an empty array for Case A.
     */
    private matchingTriggers;
}

export { EventFlowService };
