import type { Db } from 'mongodb';
import type { JobLogger, JobLogEntry, JobLogQuery, JobLogQueryResult } from 'agenda';
/**
 * MongoDB implementation of JobLogger.
 * Stores job lifecycle events in a dedicated MongoDB collection.
 *
 * @example
 * ```typescript
 * // Via backend (automatic connection sharing):
 * import { MongoBackend } from '@agendajs/mongo-backend';
 *
 * const backend = new MongoBackend({
 *   mongo: db,
 *   logging: true // enables MongoJobLogger with 'agenda_logs' collection
 * });
 *
 * // Standalone (e.g., log to Mongo while using Postgres for storage):
 * import { MongoJobLogger } from '@agendajs/mongo-backend';
 *
 * const logger = new MongoJobLogger({ db: existingDb });
 * const agenda = new Agenda({
 *   backend: new PostgresBackend({ connectionString: '...' }),
 *   logging: logger
 * });
 * ```
 */
export declare class MongoJobLogger implements JobLogger {
    private collection;
    private readonly collectionName;
    private initialized;
    constructor(options?: {
        db?: Db;
        collectionName?: string;
    } | string);
    /**
     * Set the database instance and initialize the collection.
     * Called by MongoBackend after the repository connects,
     * or automatically when a db is provided in the constructor.
     */
    setDb(db: Db): Promise<void>;
    private ensureIndexes;
    log(entry: Omit<JobLogEntry, '_id'>): Promise<void>;
    getLogs(query?: JobLogQuery): Promise<JobLogQueryResult>;
    clearLogs(query?: JobLogQuery): Promise<number>;
    private buildFilter;
}
