import type { StorageType, Optional } from '@sudobility/types'; interface PlatformStorage { setItem(key: string, value: string): Promise | void; getItem(key: string): Promise> | Optional; removeItem(key: string): Promise | void; clear?: Optional<() => Promise | void>; getAllKeys?: Optional<() => Promise | string[]>; } interface AdvancedPlatformStorage extends PlatformStorage { setItem(key: string, value: string, ttl?: Optional): Promise | void; hasItem(key: string): Promise | boolean; clearPattern(pattern?: Optional): Promise | void; } interface StorageProvider { storage: PlatformStorage | AdvancedPlatformStorage; get(key: string): Promise> | Optional; set(key: string, value: string, ttl?: Optional): Promise | void; remove(key: string): Promise | void; clear(): Promise | void; } interface StorageService { getItem(key: string): Promise> | Optional; setItem(key: string, value: string): Promise | void; removeItem(key: string): Promise | void; clear(): Promise | void; getAllKeys(): Promise | string[]; isAvailable(): boolean; getType(): StorageType; } interface SerializedStorageService { getObject(key: string): Promise> | Optional; setObject(key: string, value: T): Promise | void; removeObject(key: string): Promise | void; hasObject(key: string): Promise | boolean; } interface StorageFactory { createStorage(type: StorageType): StorageService; createSerializedStorage(type: StorageType): SerializedStorageService; getDefaultStorageType(): StorageType; } interface StorageConfig { prefix?: Optional; encryption?: Optional; compression?: Optional; ttl?: Optional; } export { type PlatformStorage, type AdvancedPlatformStorage, type StorageProvider, type StorageService, type SerializedStorageService, type StorageFactory, type StorageConfig, }; //# sourceMappingURL=storage.d.ts.map