import { RendererConstructor } from '../../../models/models/canvas-dispatcher';
import { IndexMapper } from '../kos-container-index';
import { IKosDataModel } from '../kosModel';
/**
 * @kosService core.extension
 */
export type ExtensionType = number | string | boolean;
/**
 * @kosService core.extension
 */
export type FailurePolicy = "throw" | "continue";
/**
 * @kosService core.extension
 * @kosApiLevel 20
 */
export interface ExtensionOptions {
    failurePolicy?: FailurePolicy;
}
/**
 * @kosService core.extension
 * @kosApiLevel 20
 */
export declare class ExtensionException extends Error {
    readonly extensionId: string;
    readonly extensionType: string;
    readonly cause: unknown;
    constructor(extensionId: string, extensionType: string, cause: unknown, message?: string);
}
/**
 * @kosService core.extension
 */
export type DataMapper<I extends object = any, O extends object = any, C extends object = any> = (input: I, context?: C) => Promise<O>;
/**
 * @kosService core.extension
 */
export type PropertyMapper<I extends object = any, O extends ExtensionType = any, C extends object = any> = (input: I, context?: C) => O;
/**
 * @kosService core.extension
 */
export type DataLoader<I extends object = any, O extends object = any> = (input: I) => Promise<O>;
/**
 * @kosService core.extension
 */
export type IndexExtension<T extends IKosDataModel = any> = Record<string, keyof T | IndexMapper<any>>;
/**
 * @kosService core.extension
 * @kosApiLevel 10
 */
export declare const EXTENSION_CANVAS_RENDERER = "canvas-renderer";
/**
 * @kosService core.extension
 * @kosApiLevel 22
 */
export declare const EXTENSION_FUTURE_LIFECYCLE_WRAPPER = "kos.declarative.futureLifecycleWrapper";
/**
 * @kosService core.extension
 * @kosApiLevel 2
 */
export interface ExtensionPoint<Data extends object = any, Output extends object = any, Context extends object = any> {
    register: (id: string, extension: any) => void;
    execute: (id: string, data: Data, context?: Context) => Output;
}
/**
 * @kosService core.extension
 * @kosApiLevel 2
 */
export declare const registerExtensionPoint: (id: string, extensionPoint: ExtensionPoint) => void;
declare const _ExtensionManager: {
    indexExtension: {
        registerIndexExtension: (id: string, extension: IndexExtension) => void;
        loadIndexExtensions: (id: string) => IndexExtension<any>;
    };
    loader: {
        registerLoader: (id: string, loader: DataLoader, options?: ExtensionOptions) => void;
        executeLoader: <T extends object = any>(id: string, data: T) => Promise<any>;
    };
    propertyMapper: {
        registerPropertyMapper: (id: string, mapper: PropertyMapper, options?: ExtensionOptions) => void;
        hasMapper: (id: string) => boolean;
        executeMapper: <T extends object = any, O extends ExtensionType = any, C extends object = any>(id: string, data: T, context?: C) => O;
    };
    dataMapper: {
        registerDataMapper: (id: string, mapper: DataMapper, options?: ExtensionOptions) => void;
        executeMapper: <T extends object = any, O extends object = any, C extends object = any>(id: string, data: T, context?: C) => Promise<O>;
    };
    canvas: {
        registerRenderer: (id: string, renderer: RendererConstructor) => void;
    };
};
/**
 * @kosService core.extension
 */
export interface IExtensionManager {
}
type ExtensionManagerType = typeof _ExtensionManager & IExtensionManager & {
    [key: string]: ExtensionPoint;
};
/**
 * @kosService core.extension
 * @kosApiLevel 2
 */
export declare const ExtensionManager: ExtensionManagerType;
export {};
//# sourceMappingURL=extension-manager.d.ts.map