import { BindingFromClassOptions, Constructor, ControllerClass, Interceptor, InterceptorBindingOptions, Provider, ServiceOptions, ServiceOrProviderClass } from '@loopback/core';
import { Class, juggler, Repository } from '@loopback/repository';
import { ObjectTreesApplicationInterface } from '../application.interface';
import { ObjectSubType } from '../models';
import { ObjectNode } from '../models/object-node.model';
import { ObjectType } from '../models/object-type.model';
import { ApplicationExtensionContext, ApplicationService } from '../services/application.service';
import { ObjectNodeService } from '../services/object-node/object-node.service';
import { ObjectTreeService } from '../services/object-tree/object-tree.service';
import { ObjectTypeService } from '../services/object-type.service';
import { DataEntity } from './../models/data-entity.model';
import { AccessRightsScope } from './../services/access-rights/access-rights.const';
import { InterceptorDescription, RunnerTreatmentDescription } from './extension-description';
export declare type ExtensionProviderClass = new (app: ObjectTreesApplicationInterface) => ExtensionProvider;
export declare type ObjectTypeDefinition = Partial<ObjectType> & {
    name: string;
    forcedAccessRights?: {
        [scope in AccessRightsScope]?: boolean;
    };
};
export declare type CalculatedString = string | (() => string);
export declare type ObjectSubTypeDefinition = Partial<ObjectSubType> & {
    typeName: CalculatedString;
    subTypeName: CalculatedString;
};
export interface ObjectTreeDefinition {
    treeNode: Partial<ObjectNode>;
    children: {
        [objectTypeId: string]: {
            [name: string]: ObjectTreeDefinition[];
        };
    };
}
export declare type CalculatedNode = {
    ownerTypeId: string;
    ownerName: string;
    namespaceTypeId: string;
    namespaceName: string;
} | (() => Promise<ObjectNode>);
export declare class TypeMigrationOperation {
    parentType: string;
    previousType: string;
    newType: string;
}
export declare class NameMigrationOperation {
    previousName: string;
    newName: string;
    type?: string;
    parentType?: string;
}
export declare type MigrationOperation = TypeMigrationOperation | NameMigrationOperation;
export declare abstract class ExtensionProvider {
    name: string;
    protected app: ObjectTreesApplicationInterface;
    protected appCtx: ApplicationService;
    protected ctx: ApplicationExtensionContext;
    protected objectTypeService: ObjectTypeService;
    protected objectNodeService: ObjectNodeService;
    protected objectTreeService: ObjectTreeService;
    constructor(name: string, app: ObjectTreesApplicationInterface);
    requiredProviders: ExtensionProviderClass[];
    _objectTypes: {
        [typeField: string]: ObjectTypeDefinition;
    };
    objectTypes: ObjectTypeDefinition[];
    objectSubTypes: ObjectSubTypeDefinition[];
    objectTrees: {
        [nodeField: string]: {
            parentNode: () => ObjectNode;
            treeNodeTypeId: string;
            treeNodeName: string;
            reset?: boolean;
            tree: ObjectTreeDefinition;
        };
    };
    services: {
        cls: ServiceOrProviderClass;
        nameOrOptions?: string | ServiceOptions;
    }[];
    models: Class<DataEntity>[];
    repositories: {
        repoClass: Class<Repository<DataEntity>>;
        nameOrOptions?: string | BindingFromClassOptions | undefined;
    }[];
    interceptorsPrepend: {
        id: string;
        interceptor: Interceptor | Constructor<Provider<Interceptor>>;
        nameOrOptions?: string | InterceptorBindingOptions;
        description: InterceptorDescription;
    }[];
    interceptorsAppend: {
        id: string;
        interceptor: Interceptor | Constructor<Provider<Interceptor>>;
        nameOrOptions?: string | InterceptorBindingOptions;
        description: InterceptorDescription;
    }[];
    controllers: {
        controllerCtor: ControllerClass;
        nameOrOptions?: string | BindingFromClassOptions;
        description: RunnerTreatmentDescription;
    }[];
    dataSources: {
        dataSource: juggler.DataSource | Class<juggler.DataSource>;
        name: string;
    }[];
    migrations: MigrationOperation[];
    private _forcedAccessRightsByObjectType;
    setContext(appCtx: ApplicationService): Promise<void>;
    beforeBoot(): Promise<void>;
    migrateBeforeBoot(): Promise<void>;
    boot(): Promise<void>;
}
