import type { AgendaBackend, JobRepository, NotificationChannel, JobLogger } from 'agenda';
import type { MongoBackendConfig } from './types.js';
/**
 * MongoDB backend for Agenda.
 * Provides storage via MongoDB. Does not provide notifications (uses polling).
 *
 * @example
 * ```typescript
 * import { Agenda } from 'agenda';
 * import { MongoBackend } from '@agendajs/mongo-backend';
 *
 * // Via connection string
 * const backend = new MongoBackend({ address: 'mongodb://localhost/agenda' });
 *
 * // Via existing connection
 * const backend = new MongoBackend({ mongo: existingDb });
 *
 * // With persistent job event logging
 * const backend = new MongoBackend({ mongo: existingDb, logging: true });
 *
 * const agenda = new Agenda({ backend, logging: true });
 * ```
 */
export declare class MongoBackend implements AgendaBackend {
    private config;
    readonly name = "MongoDB";
    private _repository;
    private _ownsConnection;
    private _logger;
    /**
     * MongoDB does not provide a notification channel.
     * For real-time notifications with MongoDB, use a separate notification
     * channel like Redis pub/sub.
     */
    readonly notificationChannel: NotificationChannel | undefined;
    constructor(config: MongoBackendConfig);
    get repository(): JobRepository;
    /**
     * The job logger for persistent event logging.
     * Always available; Agenda decides whether to activate it via its `logging` config.
     */
    get logger(): JobLogger;
    /**
     * Whether this backend owns its database connection.
     * True if created from address (connection string), false if mongo Db was passed in.
     */
    get ownsConnection(): boolean;
    /**
     * Connect to MongoDB and initialize the collection.
     */
    connect(): Promise<void>;
    /**
     * Disconnect from MongoDB.
     * Only closes the connection if we created it (i.e., from connection string).
     * If an existing Db instance was passed in, this is a no-op.
     */
    disconnect(): Promise<void>;
}
