import type { Adapter } from "../index.js"; /** * A value the {@link MemoryAdapterOptions.initial} seed accepts for one key. * * The constructor is synchronous, so a seed body must be convertible to bytes * without awaiting — that rules out `Blob`/`File` (their `arrayBuffer()` is * async) and `ReadableStream`. Seed those by calling `upload()` after * construction instead. The object form lets a fixture pin a `contentType` / * `metadata` / `cacheControl` the way an `upload()` call would. */ export type MemorySeed = string | Uint8Array | ArrayBuffer | ArrayBufferView | { body: string | Uint8Array | ArrayBuffer | ArrayBufferView; contentType?: string; metadata?: Record; cacheControl?: string; }; export interface MemoryAdapterOptions { /** * Keys to pre-populate the store with, useful for tests that need fixtures * present up front. Each value is a body (string or bytes) or an object that * also pins `contentType` / `metadata` / `cacheControl`. Bodies are copied * in, so later mutation of a passed buffer does not change the stored bytes. */ initial?: Record; } /** One stored object: its bytes plus the metadata reads round-trip. */ export interface MemoryEntry { bytes: Uint8Array; contentType: string; metadata?: Record; cacheControl?: string; etag: string; lastModified: number; } /** * The `raw` escape hatch is the backing `Map`, so callers can inspect or reset * the store directly in tests — `adapter.raw.clear()`, `adapter.raw.size`, etc. * * `move` is narrowed to required: the adapter always re-keys natively (no * copy+delete fallback), so callers can rely on it without an optional guard. */ export type MemoryAdapter = Adapter> & Required>, "move">>; export declare const memory: (opts?: MemoryAdapterOptions) => MemoryAdapter; //# sourceMappingURL=index.d.ts.map