import type { EnqueueOptions, Queue, QueueDefinition } from '%queuesImports';
/**
 * Initialize the pg-boss instance.
 * @returns Promise that resolves when pg-boss is ready.
 */
export declare function initializePgBoss({ disableMaintenance, }?: {
    disableMaintenance?: boolean;
}): Promise<void>;
/**
 * Shutdown the pg-boss instance.
 * @returns Promise that resolves when pg-boss is stopped.
 */
export declare function shutdownPgBoss(): Promise<void>;
/**
 * Implementation of Queue interface backed by pg-boss.
 */
export declare class PgBossQueue<T> implements Queue<T> {
    readonly name: string;
    private readonly definition;
    private isWorkerStarted;
    private hasCreatedQueue;
    constructor(name: string, definition: QueueDefinition<T>);
    private createQueue;
    enqueue(data: T, options?: EnqueueOptions): Promise<string | undefined>;
    work(): Promise<void>;
}
/**
 * Create a queue with the specified name and definition.
 * The worker is not started automatically - call queue.work() to start processing jobs.
 *
 * @param name The name of the queue.
 * @param definition The queue definition containing handler and options.
 * @returns A Queue interface for enqueuing jobs and starting workers.
 */
export declare function createQueue<T>(name: string, definition: QueueDefinition<T>): PgBossQueue<T>;
/**
 * Get all scheduled/cron jobs from pg-boss.
 * @returns Promise that resolves to array of scheduled job names.
 */
export declare function getScheduledJobs(): Promise<string[]>;
/**
 * Start all queue workers from the registry.
 * Cleans up orphaned schedules before starting workers.
 * @param registry The list of queues to start workers for.
 */
export declare function startWorkers(registry: Queue<unknown>[]): Promise<void>;
/**
 * Remove scheduled/cron jobs for queues that are no longer active.
 * @param activeQueueNames List of queue names that should have schedules.
 * @returns Promise that resolves when cleanup is complete.
 */
export declare function cleanupOrphanedSchedules(activeQueueNames: string[]): Promise<void>;
//# sourceMappingURL=pg-boss.service.d.ts.map