import { IMethodResult, IRestEntity } from '@jacquesparis/objects-model';
import { InvocationArgs } from '@loopback/core';
import { GeneratedResponse } from '../../helper/generated-response';
import { EntityName } from '../../models/entity-name';
import { CurrentContext } from '../application.service';
import { ObjectNodeService } from '../object-node/object-node.service';
import { TransientEntityService } from '../transient-entity/transient-entity.service';
import { TreatmentDescription } from './../../integration/extension-description';
import { ObjectTreeService } from './../object-tree/object-tree.service';
import { ObjectTypeService } from './../object-type.service';
export interface MethodAndViewEntityInterface {
    providerId: string;
    serviceId: string;
    description: string | (() => TreatmentDescription) | TreatmentDescription;
    accessRightsScope: string;
    hasMethod?(entity: IRestEntity, ctx: CurrentContext): Promise<boolean>;
    hasView?(entity: IRestEntity, ctx: CurrentContext): Promise<boolean>;
    runMethod?(entity: IRestEntity, args: Object, ctx: CurrentContext): Promise<IMethodResult>;
    generateView?(entity: IRestEntity, args: {
        0?: string;
        1?: string;
        2?: string;
    }, ctx: CurrentContext): Promise<GeneratedResponse>;
}
export declare class ActionEntityService {
    private objectNodeService;
    private objectTreeService;
    private objectTypeService;
    methodsAndViews: {
        [entityType: string]: {
            [methodOrViewId: string]: MethodAndViewEntityInterface[];
        };
    };
    constructor(objectNodeService: ObjectNodeService, objectTreeService: ObjectTreeService, objectTypeService: ObjectTypeService);
    getTreatmentDescription(): TreatmentDescription[];
    getMethodAuthorizationContext(entityType: EntityName, args: InvocationArgs, ctx: CurrentContext): Promise<string>;
    getViewAuthorizationContext(entityType: EntityName, args: InvocationArgs, ctx: CurrentContext): Promise<string>;
    registerNewMethodOrView(entityType: EntityName, methodOrViewId: string, methodOrView: MethodAndViewEntityInterface): void;
    registerNewMethodFunction<T extends IRestEntity>(functionProviderId: string, functionServiceId: string, functionDescription: string, entityType: EntityName, methodId: string, objectType: string, actionsFunction: (entity: T, args: Object, ctx: CurrentContext) => Promise<IMethodResult>, functionAccessRightsScope?: string): void;
    registerNewViewFunction<T extends IRestEntity>(functionProviderId: string, functionServiceId: string, functionDescription: string, entityType: EntityName, methodId: string, objectType: string, viewFunction: (entity: T, args: {
        0?: string;
        1?: string;
        2?: string;
    }, ctx: CurrentContext) => Promise<GeneratedResponse>, functionAccessRightsScope?: string, addItInDefinition?: {
        transientEntityService: TransientEntityService;
        viewName: string;
        icon: string;
        parameters?: string[];
    }): void;
    getEntity<T extends IRestEntity>(entityType: EntityName, id: string, ctx: CurrentContext): Promise<T>;
    getMethod(entityType: EntityName, id: string, methodId: string, ctx: CurrentContext): Promise<MethodAndViewEntityInterface | undefined>;
    getView(entityType: EntityName, id: string, viewId: string, ctx: CurrentContext): Promise<MethodAndViewEntityInterface | undefined>;
    runMethod(entityType: EntityName, id: string, methodId: string, args: Object, ctx: CurrentContext): Promise<IMethodResult>;
    generateView(entityType: EntityName, id: string, viewId: string, args: {
        [0]?: string;
        [1]?: string;
        [2]?: string;
    }, ctx: CurrentContext): Promise<GeneratedResponse>;
}
