import { type UserStorage as UserStorageType } from '@grafana/data'; /** * Clears the global storage cache. Used for testing purposes. * @internal */ export declare function _clearStorageCache(): void; export type UserStorageSpec = { data: { [key: string]: string; }; }; /** * A class for interacting with the backend user storage. * Exposed internally only to avoid misuse (wrong service name).. */ export declare class UserStorage implements UserStorageType { private service; private resourceName; private userUID; private canUseUserStorage; constructor(service: string); /** * Acquires a lock for this resourceName to serialize operations. * Returns a function to release the lock when done. */ private acquireLock; private init; getItem(key: string): Promise; setItem(key: string, value: string): Promise; } export interface PluginUserStorage extends UserStorageType { } /** * A hook for interacting with the backend user storage (or local storage if not enabled). * @returns An scoped object for a plugin and a user with getItem and setItem functions. * @alpha Experimental */ export declare function usePluginUserStorage(): PluginUserStorage; /** * Internal Grafana-core only interface for constructing a UserStorage instance in a * react component. */ export declare function useUserStorage(service: string): UserStorageType;