/** * Cloudflare KV Adapter * * Wraps native KV binding with our interface. * The tool recedes; KV is used transparently. */ import type { Cache } from '../types.js'; interface KVNamespace { get(key: string, options?: { type?: string; cacheTtl?: number; }): Promise; getWithMetadata(key: string, options?: { type?: string; }): Promise<{ value: T | null; metadata: Record | null; }>; put(key: string, value: string | ArrayBuffer | ReadableStream, options?: { expiration?: number; expirationTtl?: number; metadata?: Record; }): Promise; delete(key: string): Promise; list(options?: { prefix?: string; limit?: number; cursor?: string; }): Promise<{ keys: Array<{ name: string; expiration?: number; metadata?: Record; }>; list_complete: boolean; cursor?: string; }>; } /** * Wrap Cloudflare KV namespace with our platform-agnostic interface. * * @param kv - Native Cloudflare KV namespace binding * @returns Cache interface that works with getPlatform() */ export declare function wrapKV(kv: KVNamespace): Cache; /** * Type guard to check if an object is a KV namespace. */ export declare function isKVNamespace(obj: unknown): obj is KVNamespace; export {};