export type ResourceCacheStorageKind = 'opfs' | 'indexeddb';
export type ResourceCacheResolveMode = 'prefer-fast-start' | 'prefer-cache-ready';
export type ResourceCacheStatus = 'hit' | 'miss' | 'bypass' | 'stale-revalidated' | 'fallback';
export interface ResourceCacheOptions {
    enabled: boolean;
    maxEntryBytes: number;
    maxTotalBytes: number;
    ttlMs: number;
    preferStorage: ResourceCacheStorageKind;
    resolveMode: ResourceCacheResolveMode;
    allowedMimeTypes: string[];
}
export type ResourceCacheConfig = boolean | Partial<ResourceCacheOptions>;
export interface ResolveResourceInput {
    url: string;
    mimeType?: string | null;
    kind?: string | null;
    sourceKey?: string | null;
}
export interface ResolvedCachedResource {
    url: string;
    cacheStatus: ResourceCacheStatus;
    sourceUrl: string;
    sizeBytes?: number;
    objectUrl?: string;
}
export interface ResourceProbeResult {
    url: string;
    ok: boolean;
    status: number;
    mimeType: string | null;
    sizeBytes: number | null;
    etag: string | null;
    lastModified: string | null;
    acceptRanges: string | null;
}
export interface CachedResourceMetadata {
    cacheKey: string;
    sourceUrl: string;
    mimeType: string | null;
    sizeBytes: number;
    etag: string | null;
    lastModified: string | null;
    contentLength: number | null;
    storageKind: ResourceCacheStorageKind;
    createdAt: number;
    updatedAt: number;
    lastAccessedAt: number;
    expiresAt: number;
}
export interface ResourceCacheStats {
    entryCount: number;
    totalBytes: number;
    maxTotalBytes: number;
}
export interface TimelineResourceCacheStats extends ResourceCacheStats {
    enabled: boolean;
}
export interface ResourceCacheStorage {
    readonly kind: ResourceCacheStorageKind;
    read(cacheKey: string): Promise<Blob | null>;
    write(cacheKey: string, blob: Blob): Promise<void>;
    delete(cacheKey: string): Promise<void>;
    clear(): Promise<void>;
}
export interface ResourceCacheMetadataStore {
    get(cacheKey: string): Promise<CachedResourceMetadata | null>;
    put(metadata: CachedResourceMetadata): Promise<void>;
    delete(cacheKey: string): Promise<void>;
    clear(): Promise<void>;
    list(): Promise<CachedResourceMetadata[]>;
}
export interface ResourceCacheHttpClient {
    probe(url: string): Promise<ResourceProbeResult>;
    download(url: string): Promise<Blob>;
}
export interface ObjectUrlAdapter {
    createObjectURL(blob: Blob): string;
    revokeObjectURL(url: string): void;
}
export declare const RESOURCE_CACHE_DEFAULT_MAX_ENTRY_BYTES: number;
export declare const RESOURCE_CACHE_DEFAULT_MAX_TOTAL_BYTES: number;
export declare const RESOURCE_CACHE_DEFAULT_TTL_MS: number;
export declare const RESOURCE_CACHE_DEFAULT_ALLOWED_MIME_TYPES: string[];
export declare const RESOURCE_CACHE_DEFAULT_OPTIONS: ResourceCacheOptions;
