/**
 * Copyright (c) "Neo4j"
 * Neo4j Sweden AB [https://neo4j.com]
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import ClientCertificate, { ClientCertificateProvider } from './client-certificate';
import { Rules } from './mapping.highlevel';
import NotificationFilter from './notification-filter';
/**
 * @private
 */
export type Query = string | String | {
    text: string;
    parameters?: any;
    parameterRules?: Rules;
};
export type EncryptionLevel = 'ENCRYPTION_ON' | 'ENCRYPTION_OFF';
export type LogLevel = 'error' | 'warn' | 'info' | 'debug';
export type LoggerFunction = (level: LogLevel, message: string) => unknown;
export type SessionMode = 'READ' | 'WRITE';
export interface LoggingConfig {
    level?: LogLevel;
    logger: LoggerFunction;
}
export type TrustStrategy = 'TRUST_ALL_CERTIFICATES' | 'TRUST_CUSTOM_CA_SIGNED_CERTIFICATES' | 'TRUST_SYSTEM_CA_SIGNED_CERTIFICATES';
export interface Parameters {
    [key: string]: any;
}
export interface AuthToken {
    scheme: string;
    principal?: string;
    credentials: string;
    realm?: string;
    parameters?: Parameters;
}
export interface BoltAgent {
    product?: string;
    platform?: string;
    language?: string;
    languageDetails?: string;
}
/**
 * The Neo4j Driver configuration.
 *
 * @interface
 */
export declare class Config {
    encrypted?: boolean | EncryptionLevel;
    trust?: TrustStrategy;
    trustedCertificates?: string[];
    fetchSize?: number;
    maxConnectionPoolSize?: number;
    maxTransactionRetryTime?: number;
    maxConnectionLifetime?: number;
    connectionAcquisitionTimeout?: number;
    connectionLivenessCheckTimeout?: number;
    connectionTimeout?: number;
    /**
     * Disables retries using `Session.run()`.
     *
     * Retries on `Session.run()` are limited to a specific set of errors. Namely those errors marked as *idempotent* by the DBMS, i.e., errors that are guaranteed to not have altered the state of any database. At the time of writing, this set encompasses only admission control errors.
     *
     * When set to `true`, calls to `Session.run()` will fail without retrying when receiving an error from the server, even when only idempotent work has occurred. By default, these calls will be rerun with a one-shot retry to avoid friction when encountering rate limiting and other errors that can be safely retried.
     * Default value: {@link false}
     */
    disableAutoCommitRetries?: boolean;
    disableLosslessIntegers?: boolean;
    notificationFilter?: NotificationFilter;
    useBigInt?: boolean;
    logging?: LoggingConfig;
    resolver?: (address: string) => string[] | Promise<string[]>;
    userAgent?: string;
    telemetryDisabled?: boolean;
    clientCertificate?: ClientCertificate | ClientCertificateProvider;
    /**
     * @constructor
     * @private
     */
    protected constructor();
}
export declare class InternalConfig extends Config {
    boltAgent?: BoltAgent;
}
/**
 * Extension interface for {@link AsyncIterator} with peek capabilities.
 *
 * @public
 */
export interface PeekableAsyncIterator<T, TReturn = any, TNext = undefined> extends AsyncIterator<T, TReturn, TNext> {
    /**
     * Returns the next element in the iteration without advancing the iterator.
     *
     * @return {IteratorResult<T, TReturn>} The next element in the iteration.
     */
    peek: () => Promise<IteratorResult<T, TReturn>>;
}
