/** * Client-side storage utility for Juncture applications * Provides a simple interface to interact with the server-side storage system */ export interface StorageOptions { dataPath?: string; validate?: boolean; prettyPrinting?: boolean; } export interface StorageData { [key: string]: any; } export declare class JunctureStorage { private bridge; constructor(bridge: any); /** * Get data for a key */ get(key: string, options?: StorageOptions): Promise; /** * Set data for a key */ set(key: string, data: any, options?: StorageOptions): Promise<{ success: boolean; }>; /** * Check if a key exists */ has(key: string, options?: StorageOptions): Promise; /** * Get all keys */ keys(options?: StorageOptions): Promise; /** * Remove a key */ remove(key: string, options?: StorageOptions): Promise<{ success: boolean; }>; /** * Clear all storage */ clear(options?: StorageOptions): Promise<{ success: boolean; }>; /** * Get multiple keys at once */ getMany(keys: string[], options?: StorageOptions): Promise; /** * Get all data */ getAll(options?: StorageOptions): Promise; /** * Get storage statistics */ getStats(options?: StorageOptions): Promise<{ totalKeys: number; totalSize: number; keys: string[]; }>; /** * Set custom data path */ setDataPath(path?: string): Promise<{ success: boolean; path: string; }>; /** * Get current data path */ getDataPath(): Promise; /** * Get data synchronously (server-side sync operation) */ getSync(key: string, options?: StorageOptions): Promise; /** * Set data synchronously (server-side sync operation) */ setSync(key: string, data: any, options?: StorageOptions): Promise<{ success: boolean; }>; } /** * Create a storage instance with a bridge */ export declare function createStorage(bridge: any): JunctureStorage; /** * React Hook for using storage in React components */ export declare function useStorage(bridge: any): { storage: JunctureStorage; get: (key: string, options?: StorageOptions) => Promise; set: (key: string, data: any, options?: StorageOptions) => Promise<{ success: boolean; }>; has: (key: string, options?: StorageOptions) => Promise; keys: (options?: StorageOptions) => Promise; remove: (key: string, options?: StorageOptions) => Promise<{ success: boolean; }>; clear: (options?: StorageOptions) => Promise<{ success: boolean; }>; getMany: (keys: string[], options?: StorageOptions) => Promise; getAll: (options?: StorageOptions) => Promise; getStats: (options?: StorageOptions) => Promise<{ totalKeys: number; totalSize: number; keys: string[]; }>; setDataPath: (path?: string) => Promise<{ success: boolean; path: string; }>; getDataPath: () => Promise; getSync: (key: string, options?: StorageOptions) => Promise; setSync: (key: string, data: any, options?: StorageOptions) => Promise<{ success: boolean; }>; }; export default JunctureStorage;