import { default as joi } from 'joi';
import { SQLAdapter } from './sql';
import { SQSAdapter } from './sqs';
import { AMQPAdapter } from './amqp';
import { PGBossAdapter } from './pgboss';
import { BullMQAdapter } from './bullmq';
import type { SQSAdapterConfiguration } from './sqs';
import type { SQLAdapterConfiguration } from './sql';
import type { AMQPAdapterConfiguration } from './amqp';
import type { BullMQAdapterConfiguration } from './bullmq';
import type { PGBossAdapterConfiguration } from './pgboss';
export { AMQPAdapter, BullMQAdapter, SQSAdapter, PGBossAdapter, SQLAdapter };
export type { AMQPAdapterConfiguration, BullMQAdapterConfiguration, SQSAdapterConfiguration, PGBossAdapterConfiguration, };
export type { BullMQRedisConnectionExtraOptions } from './bullmq';
export type { AMQPClientOptionsObject, AMQPUrl, AMQPAMQPUrl, AMQPAMQPSUrl } from './amqp';
export type { PostgreSQLConnectionObject, PostgreSQLDatabaseOptions, PostgreSQLQueueOptions, PostgreSQLSchedulingOptions, PostgreSQLMaintenanceOptions, PostgreSQLExpirationOptions, PostgreSQLRetentionOptions, PostgreSQLRetryOptions, PostgreSQLJobPollingOptions, } from './pgboss';
export type { SQLAdapterConfiguration, SQLClient, KnexSQLClient, PoolConfig } from './sql';
/**
 * @private
 */
export interface KyooClientConfigurations {
    amqp: AMQPAdapterConfiguration;
    bullmq: BullMQAdapterConfiguration;
    sqs: SQSAdapterConfiguration;
    pgboss: PGBossAdapterConfiguration;
    sql: SQLAdapterConfiguration;
}
/**
 * @private
 */
export interface KyooClientAdapters {
    amqp: AMQPAdapter;
    bullmq: BullMQAdapter;
    sqs: SQSAdapter;
    pgboss: PGBossAdapter;
    sql: SQLAdapter;
}
/**
 * KyooClient is a union type representing the supported queue
 * adapters in the Kyoo library. The possible choices are `amqp`, `bullmq`, `sqs` and `pgboss`.
 */
export type KyooClient = keyof KyooClientConfigurations;
/**
 * @private
 */
export type KyooClientConfiguration<T extends KyooClient> = T extends keyof KyooClientConfigurations ? KyooClientConfigurations[T] : never;
/**
 * @private
 */
export type KyooAdapter<T extends KyooClient> = T extends keyof KyooClientAdapters ? T : never;
/**
 * @private
 */
export type KyooClientAdapter<T extends KyooClient> = T extends keyof KyooClientAdapters ? KyooClientAdapters[T] : never;
/**
 * Options for Kyoo behavior which is not related to an adapter.
 */
export interface KyooConfigurationOptions {
    /**
     * Whether to throw an error when trying to enqueue a job
     * while the adapter is not connected. If set to `true`, an error
     * will be thrown if the adapter is not connected when trying to
     * enqueue a job. If set to `false`, the function will return `false` for each job
     * that is not enqueued.
     */
    rejectEnqueueIfNotConnected?: boolean;
    /**
     * Whether to emit a process-level warning when the normalized behavior of an
     * operation cannot be implemented by the adapter. This is primarily used
     * so that developers can be aware of non-standard behavior, and should be set
     * to `false` in production environments. Defaults to `true`.
     */
    warnOnUnexpectedBehavior?: boolean;
    /**
     * Whether to disable payload gzip compression, enabled by default
     */
    disableCompression?: boolean;
}
/**
 * KyooConfiguration is a generic type that represents the configuration
 * for a specific queue adapter. It includes the adapter type and its
 * corresponding configuration, as well as Kyoo-specific options.
 */
export interface KyooConfiguration<T extends KyooClient> {
    /**
     * The type of the queue adapter to use. This should be one of the
     * supported adapters (e.g., "amqp", "bullmq", "sqs").
     */
    client: KyooAdapter<T>;
    /**
     * The configuration object for the specified queue adapter. This
     * should match the expected configuration for the chosen adapter.
     *
     * @see {@link AMQPAdapterConfiguration}
     * @see {@link BullMQAdapterConfiguration}
     * @see {@link SQSAdapterConfiguration}
     * @see {@link PGBossAdapterConfiguration}
     */
    configuration: KyooClientConfiguration<T>;
    /**
     * Optional Kyoo-specific options.
     */
    options?: KyooConfigurationOptions;
}
export declare const kyooConfigurationSchema: joi.ObjectSchema<any>;
/**
 * @private
 */
export declare const getValidatedConfiguration: <T extends KyooClient>(input: unknown) => KyooConfiguration<T>;
/**
 * Validates, sanitizes, and returns the configuration object for the adapter.
 * @param config The configuration object for the adapter.
 * @returns A validated configuration object with the correct type.
 */
export declare const defineAdapterConfiguration: <T extends KyooClient>(config: KyooConfiguration<T>) => KyooConfiguration<T>;
/**
 * A string literal type representing the connection status of the adapter.
 * It can be one of the following values:
 * - "connected": The adapter is connected and ready to use.
 * - "disconnected": The adapter is not connected.
 * - "connecting": The adapter is in the process of connecting.
 */
export type ConnectionStatus = 'connected' | 'disconnected' | 'connecting';
