import { IRestEntity } from '@jacquesparis/objects-model';
import { Provider } from '@loopback/core';
import { ObjectNode } from '../..';
import { ApplicationService, CurrentContext } from './../application.service';
import { EntityInterceptService } from './../entity-intercept/entity-intercept.service';
import { InsideRestDataSource } from './inside-rest.datasource';
export interface InsideRestRepository {
    read<T extends IRestEntity>(uri: string, authorization: string, acceptLanguage: string, sessionid: string | undefined): Promise<T>;
}
export declare class InsideRestRepositoryProvider implements Provider<InsideRestRepository> {
    protected dataSource: InsideRestDataSource;
    constructor(dataSource?: InsideRestDataSource);
    value(): Promise<InsideRestRepository>;
}
declare class InsideRestContext {
    id?: string;
    copyToChildContext: boolean;
    loadedUris: {
        [uri: string]: object;
    };
}
export declare class InsideRestService {
    private insideRestRepository;
    private entityInterceptService;
    private applicationService;
    private insideRestInterceptor;
    private insideRestFinalTreatment;
    get runningRequestLoadedUris(): {
        [id: string]: {
            [uri: string]: object;
        };
    };
    get runningRequestLoadedNodes(): {
        [id: string]: {
            [id: string]: ObjectNode;
        };
    };
    constructor(insideRestRepository: InsideRestRepository, entityInterceptService: EntityInterceptService, applicationService: ApplicationService);
    getOpenedSessionId(ctx: CurrentContext): string | undefined;
    isInternalCall(ctx: CurrentContext): boolean;
    startSharedResults(ctx: CurrentContext): void;
    endSharedResults(ctx: CurrentContext): void;
    private getCtx;
    getLoadedEntity<T extends IRestEntity>(uriId: string, insideRestCtx: InsideRestContext): T;
    setLoadedEntity<T extends IRestEntity>(entity: T, uriId: string, insideRestCtx: InsideRestContext): T;
    read<T extends IRestEntity>(uri: string, ctx: CurrentContext, forceNewRead?: boolean): Promise<T>;
}
export {};
