import { default as joi } from 'joi';
import type { ClusterNode } from 'ioredis';
import type { Serializable } from '@nhtio/serialization/types';
import type { ConnectionOptions } from 'bullmq';
import type { ConnectionStatus, KyooConfigurationOptions } from '.';
import type { KyooConnectionToAdapterBus } from '../utils/connection_to_adapter_bus';
import type { KyooJob, KyooJobToEnqueue, KyooWorkable } from '../job';
export type { ClusterNode } from 'ioredis';
export type { Serializable } from '@nhtio/serialization/types';
export type { ConnectionOptions, Job, JobsOptions } from 'bullmq';
/**
 * Describes additional options which are used to configure the BullMQ adapter.
 */
export interface BullMQRedisConnectionExtraOptions {
    /**
     * Denotes commands should retry indefinitely.
     * @deprecated
     */
    blocking?: boolean;
    /**
     * Denotes that the connection is a shared connection.
     */
    shared?: boolean;
    /**
     * Denotes that the connection should skip version check.
     */
    skipVersionCheck?: boolean;
    /**
     * Denotes that the connection should skip waiting for ready.
     */
    skipWaitingForReady?: boolean;
}
/**
 * Describes the overall shape of the configuration which should be passed to the BullMQ adapter.
 * @see [BullMQ Documentation](https://docs.bullmq.io/guide/connections)
 */
export interface BullMQAdapterConfiguration {
    /**
     * An array of cluster nodes to connect to when configuring a cluster connection to use for Redis.
     * @see [IORedis Documentation](https://redis.github.io/ioredis/index.html#ClusterNode)
     */
    startupNodes?: ClusterNode[];
    /**
     * The options used to connect to the Redis server or the IORedis.Redis or IORedis.Cluster instance
     * which is used to connect to the Redis server.
     *
     * @see [BullMQ Documentation](https://api.docs.bullmq.io/types/v5.ConnectionOptions.html)
     */
    options: ConnectionOptions;
    /**
     * Describes additional options which are used to configure the BullMQ adapter.
     */
    extraOptions?: BullMQRedisConnectionExtraOptions;
}
export declare const bullmqAdapterConfigurationSchema: joi.ObjectSchema<any>;
/** @private */
export declare class BullMQAdapter {
    #private;
    /**
     * @private
     */
    constructor(configuration: BullMQAdapterConfiguration, bus: KyooConnectionToAdapterBus, options: KyooConfigurationOptions);
    connect(signal?: AbortSignal): Promise<boolean>;
    disconnect(terminate?: boolean): Promise<void>;
    get connectionStatus(): ConnectionStatus;
    get queues(): any;
    get jobs(): {
        enqueue: (queue: string, ...jobs: KyooJobToEnqueue[]) => Promise<boolean | boolean[]>;
        purge: (queue: string) => Promise<void>;
        next: <T = Serializable>(queue: string, noAck?: boolean, rejectable?: boolean, onDispositioned?: (disposition: "ack" | "nack") => void) => Promise<KyooWorkable<T> | undefined>;
        enqueued: (queue: string) => Promise<number>;
        fetch: <T = Serializable>(queue: string, count: number) => Promise<Array<KyooJob<T>>>;
    };
}
