import { BreezeEvent } from './event';
/** @hidden */
export interface AdapterCtor<T extends BaseAdapter> {
    new (...args: any[]): T;
}
/** @hidden */
export interface IDef<T extends BaseAdapter> {
    ctor: AdapterCtor<T>;
    defaultInstance?: T;
}
export type AdapterType = 'dataService' | 'modelLibrary' | 'ajax' | 'uriBuilder';
export declare class InterfaceDef<T extends BaseAdapter> {
    name: string;
    defaultInstance?: T;
    /** @hidden @internal */
    _implMap: {
        [name: string]: IDef<T>;
    };
    constructor(name: string);
    /** Define an implementation of the given adaptername */
    registerCtor(adapterName: string, ctor: AdapterCtor<T>): void;
    /** Return the definition for the given adapterName */
    getImpl(adapterName: string): IDef<T>;
    /** Return the first implementation for this InterfaceDef */
    getFirstImpl(): IDef<T>;
    getDefaultInstance(): T;
}
export interface BaseAdapter {
    /** @hidden @internal */
    _$impl?: any;
    name: string;
    initialize(): void;
    checkForRecomposition?: (context: any) => void;
}
export declare class BreezeConfig {
    functionRegistry: {};
    typeRegistry: {};
    objectRegistry: {};
    interfaceInitialized: BreezeEvent<{
        interfaceName: string;
        instance: BaseAdapter;
        isDefault: boolean;
    }>;
    stringifyPad: string;
    /** whether to prohibit eval() and Function() in breeze code */
    noEval: boolean;
    /** @hidden @internal */
    _interfaceRegistry: any;
    constructor();
    /**
    Method use to register implementations of standard breeze interfaces.  Calls to this method are usually
    made as the last step within an adapter implementation.
    @method registerAdapter
    @param interfaceName {String} - one of the following interface names: "ajax", "dataService", "modelLibrary", "uriBuilder"
    @param adapterCtor {Function} - an ctor function that returns an instance of the specified interface.
    **/
    registerAdapter<T extends BaseAdapter>(interfaceName: AdapterType, adapterCtor: AdapterCtor<T>): void;
    /**
    Returns the ctor function used to implement a specific interface with a specific adapter name.
    @method getAdapter
    @param interfaceName {String} One of the following interface names: "ajax", "dataService", "modelLibrary", "uriBuilder"
    @param [adapterName] {String} The name of any previously registered adapter. If this parameter is omitted then
    this method returns the "default" adapter for this interface. If there is no default adapter, then a null is returned.
    @return {Function|null} Returns either a ctor function or null.
    **/
    getAdapter(interfaceName: AdapterType, adapterName: string): any;
    /**
    Initializes a single adapter implementation. Initialization means either newing a instance of the
    specified interface and then calling "initialize" on it or simply calling "initialize" on the instance
    if it already exists.
    @method initializeAdapterInstance
    @param interfaceName {String} The name of the interface to which the adapter to initialize belongs.
    @param adapterName {String} - The name of a previously registered adapter to initialize.
    @param [isDefault=true] {Boolean} - Whether to make this the default "adapter" for this interface.
    @return {an instance of the specified adapter}
    **/
    initializeAdapterInstance(interfaceName: AdapterType, adapterName: string, isDefault?: boolean): BaseAdapter;
    /**
    Returns the adapter instance corresponding to the specified interface and adapter names.
    @method getAdapterInstance
    @param interfaceName {String} The name of the interface.
    @param [adapterName] {String} - The name of a previously registered adapter.  If this parameter is
    omitted then the default implementation of the specified interface is returned. If there is
    no defaultInstance of this interface, then the first registered instance of this interface is returned.
    @return {an instance of the specified adapter}
    @internal
    **/
    getAdapterInstance<T extends BaseAdapter>(interfaceName: AdapterType, adapterName?: string): T;
    /** this is needed for reflection purposes when deserializing an object that needs a fn or ctor.
        Used to register validators. */
    registerFunction(fn: Function, fnName: string): void;
    registerType(ctor: Function, typeName: string): void;
    getRegisteredFunction(fnName: string): any;
    getInterfaceDef<T extends BaseAdapter>(interfaceName: string): InterfaceDef<T>;
    /** @deprecated @internal no-op kept for backward compatibility */
    setQ(q: any): void;
    /** @hidden @internal */
    _storeObject(obj: Object, type: string | Function, name: string): void;
    /** @hidden @internal */
    _fetchObject(type: string | Function, name: string): any;
    /** @hidden @internal */
    _initializeAdapterInstanceCore<T extends BaseAdapter>(interfaceDef: InterfaceDef<T>, impl: IDef<T>, isDefault: boolean): T;
}
export declare const config: BreezeConfig;
