import { BaseSDK } from './sdk'; import { StandardResponse, Storage } from '@jolibox/types'; /** * @private * Provides functionalities for persistent key-value storage within the Jolibox SDK. * Allows setting, getting, removing items, and clearing the entire storage. * @implements {Storage} */ export declare class StorageSDK extends BaseSDK implements Storage { /** * @public * Retrieves an item from storage based on its key. * @param key - The key of the item to retrieve. * @returns A promise that resolves with the value of the item, or null if the key is not found. The specific structure of the resolved value (e.g., if wrapped in StandardResponse) depends on the command execution result. */ getItem(key: string): Promise>; /** * @public * Sets an item in storage with a given key and value. * There are limitations on the length of the key and the combined length of key and value. * @param key - The key for the item. Should be less than 128 characters. * @param value - The value to store. Can be a number, string, or boolean. It will be converted to a string for storage. * @returns A promise that resolves with a StandardResponse. It might contain an error object if validation fails (e.g., key/value length exceeded). */ setItem(key: string, value: number | string | boolean): Promise>; /** * @public * Removes an item from storage based on its key. * @param key - The key of the item to remove. * @returns A promise that resolves with a StandardResponse (or the direct result of command execution). */ removeItem(key: string): Promise>; /** * @public * Clears all items from the storage. * @returns A promise that resolves with a StandardResponse (or the direct result of command execution). */ clear(): Promise>; }