import { Observable, Subject } from 'rxjs'; import { HttpOptions } from './http-options.model'; import { QueryOptions } from './query-options.model'; type RequestFunctionType = (...params: any[]) => Observable; type PrepareDataBeforeCachingType = (result: Array>) => Array>; export declare enum CachingExpiryUnit { YEARS = "years", MONTHS = "months", WEEKS = "weeks", DAYS = "days", HOURS = "hours", MINUTES = "minutes", SECONDS = "seconds", MILLI_SECONDS = "milliseconds" } interface BaseOption { cacheKey: string; prepareDataBeforeCaching: PrepareDataBeforeCachingType; inMemory?: boolean; enableQuickRefresh?: boolean; } export type CachedQueryOptions = {} & BaseOption & QueryOptions; export type CachedHttpOptions = {} & BaseOption & HttpOptions; export type CachedFullQueryOptions = {} & CachedQueryOptions & BaseCacheOptions; export type CachedFullHttpOptions = {} & CachedHttpOptions & BaseCacheOptions; export type BaseCacheOptions = { userName: string; request: RequestFunctionType; pageKey?: string; totalPageKey?: string; resultsCount?: string; mappedDataKey?: string; uniqueCompareKey?: string; minCompareDateKey?: string; lastModifiedDateKey?: string; lastModifiedDatePath?: string; excludeKeysWhenUpdate?: string[]; childrenPath?: string; parentKey?: string; } & BaseOption; export interface CacheInfo { data: Array>; firstFetchingDate: string; lastModifiedDate: string; resultsCount: number; fetchingItemsFromTheServer: boolean; onFinishFetching: Subject; request?: RequestFunctionType; params?: Record; } export {};