import { Observable } from 'rxjs'; import { TerraKeyValueInterface } from '../models'; import { TerraBaseParameterInterface } from '../components/data/terra-base-parameter.interface'; /** * @experimental * @description This class provides basic functionality to cache data for a model accessible on a server */ export declare class ModelCache { protected dataModel: TerraKeyValueInterface; /** * @description Handles the retrieval of a list. When the list has already been loaded from the server, it will be retrieved from the * cache. * @param getRequest$ * @param params */ protected handleLocalDataModelGetList(getRequest$: Observable>, params?: TerraBaseParameterInterface): Observable>; /** * @description Handles the retrieval of a single entity. If it has been loaded from the server before, it will be retrieved from the * cache. * @param getRequest$ * @param dataId */ protected handleLocalDataModelGet(getRequest$: Observable, dataId: number | string): Observable; /** * @description Handles the creation of a single entity. If the creation is successful, the response is stored in the cache. * @param postRequest$ * @param dataId */ protected handleLocalDataModelPost(postRequest$: Observable, dataId: number | string): Observable; /** * @description Handles the modification of a single entity. If it has been updated successfully, the cache is updated with the * response object. * @param putRequest$ * @param dataId */ protected handleLocalDataModelPut(putRequest$: Observable, dataId: number | string): Observable; /** * @description Handles the deletion of a single entity. If the deletion was successful, the entity is removed from the cache as well. * @param deleteRequest$ * @param dataId */ protected handleLocalDataModelDelete(deleteRequest$: Observable, dataId: number | string): Observable; private _hasAllParamsLoaded; }