/*!
 * Copyright 2017 - 2020 by ChartIQ, Inc.
 * All rights reserved.
 */
/**
 * The Storage Client handles saving and retrieving data for your smart desktop.
 *
 *
 * See the <a href=tutorial-storingData.html>Storing Data tutorial</a> for an overview of using the Storage Client.
 * @module StorageClient
 */
import { ComponentMutateParams } from "../services/window/WindowAbstractions/BaseWindow";
import { StandardErrorCallback, StandardPromise } from "../types";
/**
 * Define the user name for storage (i.e., each user has unique storage).
 *
 * ```JavaScript
 * FSBL.Clients.StorageClient.setUser({ user: "JohnDeere"});
 * ```
 * @param params
 * @param params.user A unique key to store user data under
 * @param cb Callback to be called on success.
 */
export declare const setUser: (params: {
    user: string;
}, cb?: StandardErrorCallback<void> | undefined) => StandardPromise<void>;
/**
 * @deprecated This method has been deprecated.
 *
 * Specifies the data store. For normal operation this function doesn't have to be invoked -- the default data store is set in configuration.
 *
 * ```JavaScript
 * FSBL.Clients.StorageClient.setStore({topic:"finsemble", dataStore:"redis"})
 * ```
 * @param params
 * @param params.topic If specified then data store is set only for topic.
 * @param params.dataStore Identifies the data store (e.g. "localStorage", "redis").
 * @param cb Callback to be called on success.
 * @ignore
 */
export declare const setStore: (params: {
    topic: string;
    dataStore?: string;
}, cb?: StandardErrorCallback<void> | undefined) => StandardPromise<void>;
/**
 * Save a key value pair into storage.
 *
 * ```JavaScript
 * FSBL.Clients.StorageClient.save({topic:"finsemble", key:"testKey", value:"testValue"});
 * FSBL.Clients.StorageClient.save({topic:"finsemble", key:"testKey", value:"testValue"}, (err, data) => {});
 * const {err, data} = await FSBL.Clients.StorageClient.save({topic:"finsemble", key:"testKey", value:"testValue"});
 * ```
 * @param params
 * @param params.topic Storage topic for key being stored.
 * @param params.key The key for the value to be stored under.
 * @param params.value The value to be stored.
 * @param cb Callback to be called on success.
 */
export declare const save: (params: ComponentMutateParams, cb?: StandardErrorCallback<void> | undefined) => StandardPromise<void>;
/**
 * Get a value from storage.
 *
 *
 * ```JavaScript
 * FSBL.Clients.StorageClient.getStandardized({ topic:"finsemble", key:"testKey" }, function(err, data) {
 *	let myData = data;
 * });
 * const {err, data} = await FSBL.Clients.StorageClient.getStandardized({ topic:"finsemble", key:"testKey" });
 * ```
 * @param params
 * @param params.key The key to get from storage.
 * @param params.topic The topic that the data is saved under.
 * @param cb Callback to be called on success.
 */
export declare const getStandardized: <T = any>(params: {
    key: string;
    topic: string;
}, cb?: StandardErrorCallback<T> | undefined) => StandardPromise<T>;
/**
 * @deprecated
 * Please use getStandardized() for a standardized `Promise<{err, data}>`
 * This function returns a `Promise<T>` and rejects on an error. This is maintained for backward compatibility.
 *
 * Get a value from storage.
 *
 * ```JavaScript
 * FSBL.Clients.StorageClient.get({ topic:"finsemble", key:"testKey" }, function(err, data) {
 *	var myData = data;
 * });
 * ```
 *
 * @param params
 * @param params.key The key to get from storage.
 * @param params.topic The topic that the data is saved under.
 * @param cb Callback to be called on success.
 */
export declare const get: <T = any>(params: {
    key: string;
    topic: string;
}, cb?: StandardErrorCallback<T> | undefined) => Promise<T>;
/**
 * Get all keys for the topic.
 *
 * ```JavaScript
 * FSBL.Clients.StorageClient.keys({topic:"finsemble", keyPrefix:"test"}, function(err, data){
 *	let myKeys = data;
 * });
 * const {err, data} = await FSBL.Clients.StorageClient.keys({topic:"finsemble", keyPrefix:"test"});
 * ```
 * @param params
 * @param params.topic Topic for the keys to return.
 * @param params.keyPrefix Filter all keys that don't start with this prefix.
 * @param cb Callback to be called on success.
 */
export declare const keys: (params: {
    topic: string;
    keyPrefix?: string;
}, cb?: StandardErrorCallback<string[]> | undefined) => StandardPromise<string[]>;
/**
 * Get a multiple values from storage based on regex.(coming soon)
 * @param params
 * @param cb Callback to be called on success.
 * @ignore
 * @deprecated
 */
export declare const getMultiple: (params: any, cb?: StandardErrorCallback<any> | undefined) => StandardPromise<any>;
/**
 * Delete a value from storage.
 *
 * ```JavaScript
 * FSBL.Clients.StorageClient.remove({ key:"testKey" })
 * await FSBL.Clients.StorageClient.remove({ key:"testKey" })
 * ```
 * @param params
 * @param params.key The key to get from storage.
 * @param params.topic The topic that the data is saved under.
 * @param cb Callback to be called on success.
 */
export declare const remove: (params: {
    key: string;
    topic: string;
}, cb?: StandardErrorCallback<void> | undefined) => StandardPromise<void>;
/**
 * @deprecated
 */
export declare const deleteInner: (...args: any[]) => void;
/**
 * Clears a storage adapter of all data.
 * @param cb The callback to be invoked after the method completes successfully.
 */
export declare const clearCache: (cb?: StandardErrorCallback<void> | undefined) => StandardPromise<void>;
/**
 * @ignore
 */
export declare const StorageClient: {
    /**
     * For backward compatibility
     * @private
     * @deprecated
     */
    initialize: () => void;
    /**
     * For backward compatibility
     * @private
     * @deprecated
     */
    onReady: (cb?: any) => void;
    clearCache: (cb?: StandardErrorCallback<void> | undefined) => StandardPromise<void>;
    remove: (params: {
        key: string;
        topic: string;
    }, cb?: StandardErrorCallback<void> | undefined) => StandardPromise<void>;
    getMultiple: (params: any, cb?: StandardErrorCallback<any> | undefined) => StandardPromise<any>;
    keys: (params: {
        topic: string;
        keyPrefix?: string;
    }, cb?: StandardErrorCallback<string[]> | undefined) => StandardPromise<string[]>;
    getStandardized: <T = any>(params: {
        key: string;
        topic: string;
    }, cb?: StandardErrorCallback<T> | undefined) => StandardPromise<T>;
    get: <T_1 = any>(params: {
        key: string;
        topic: string;
    }, cb?: StandardErrorCallback<T_1> | undefined) => Promise<T_1>;
    save: (params: ComponentMutateParams, cb?: StandardErrorCallback<void> | undefined) => StandardPromise<void>;
    setStore: (params: {
        topic: string;
        dataStore?: string;
    }, cb?: StandardErrorCallback<void> | undefined) => StandardPromise<void>;
    setUser: (params: {
        user: string;
    }, cb?: StandardErrorCallback<void> | undefined) => StandardPromise<void>;
    delete: (...args: any[]) => void;
    remove1: (params: {
        key: string;
        topic: string;
    }) => void;
    get1: <T_2 = any>(params: {
        key: string;
        topic: string;
    }, cb?: StandardErrorCallback<T_2> | undefined) => Promise<T_2>;
    save1: (params: {
        key: string;
        topic: string;
        value: any;
    }) => void;
    keys1: (params: {
        topic: string;
        keyPrefix?: string;
    }) => Promise<string[]>;
};
/**
 * @ignore
 */
export default StorageClient;
//# sourceMappingURL=storageClient.d.ts.map