import { InjectionToken } from '@angular/core';
import { Observable } from 'rxjs';
export interface SdCacheOption<T = any> {
    type?: 'default' | 'session' | 'local';
    hours?: number;
    default?: T;
    args?: {
        [key: string]: any;
    };
}
export interface SdCacheServerOption<T = any> {
    hours?: number;
    default?: T;
    args?: {
        [key: string]: any;
    };
}
export interface SdCache<T = any> {
    get: () => T;
    set: (data: T) => void;
    has: () => boolean;
    remove: () => void;
    observer: Observable<T>;
}
export interface SdCacheServer<T = any> {
    get: () => Promise<T>;
    set: (data: T) => Promise<void>;
    has: () => Promise<boolean>;
    remove: () => Promise<void>;
    observer: Observable<T>;
}
export interface ICacheConfiguration {
    convertKey?: (key: string) => string;
    set?: (key: string, value: {
        data: any;
        createdOn: Date;
    }, option?: SdCacheServerOption) => Promise<void>;
    get?: (key: string, option?: SdCacheServerOption) => Promise<{
        data: any;
        createdOn: Date;
    }>;
    remove?: (key: string, option?: SdCacheServerOption) => Promise<void>;
}
export declare const CACHE_CONFIG: InjectionToken<ICacheConfiguration>;
