/// <reference types="@cloudflare/workers-types" />
/// <reference types="node" />
declare type InputValueValue = string | ArrayBuffer | ReadableStream | Buffer;
interface InputObject {
    value: InputValueValue;
    metadata?: Record<string, string>;
    expiration?: number;
}
declare type InputValue = InputValueValue | InputObject;
interface InternalValue {
    value: ArrayBuffer;
    metadata?: unknown;
    expiration?: number;
}
interface OutputValue {
    value: any;
    metadata: unknown | null;
}
interface ListValue {
    name: string;
    expiration?: number;
    metadata?: unknown;
}
declare type ValueTypeNames = 'text' | 'json' | 'arrayBuffer' | 'stream';
export declare class EdgeKVNamespace implements KVNamespace {
    protected kv: Map<string, InternalValue>;
    constructor();
    get(key: string, options?: {
        type?: ValueTypeNames;
        cacheTtl?: number;
    } | ValueTypeNames): Promise<any>;
    getWithMetadata(key: string, type?: ValueTypeNames): Promise<OutputValue>;
    put(key: string, value: InputValueValue, { metadata }?: {
        metadata?: Record<string, string>;
    }): Promise<void>;
    delete(key: string): Promise<void>;
    list(options?: {
        prefix?: string;
        limit?: number;
        cursor?: string;
    }): Promise<{
        keys: ListValue[];
        list_complete: boolean;
        cursor?: string;
    }>;
    _add_files(directory: string, prepare_key?: (file_name: string) => string): Promise<number>;
    protected _add_directory(directory: string, prepare_key: (file_name: string) => string): Promise<number>;
    _manifestJson(): string;
    _clear(): void;
    _putMany(kv: Record<string, InputValue>): Promise<void>;
}
export {};
