import { InMemoryStorageLedger } from './storage-ledger'; import { type CollectExpiredResult } from '../retention'; import type { ObjectCollectExpiredInput } from '../blob'; /** * In-memory {@link ObjectStore} reference (§12.7.4, §12.7.8). * * Metadata only — there are no bytes here, and there are none in the Postgres * composition either: the manifest is the transaction authority and the object * store holds the payload. `refCount` is derived from the reference rows rather * than incremented in place, so a double `addReference` for the same * `(refKind, refId)` cannot inflate it and strand an object forever. */ import { type ContentHash, type ObjectCommitInput, type ObjectListQuery, type ObjectManifestEntry, type ObjectManifestInput, type ObjectReferenceInput, type ObjectStore } from '../blob'; import type { Clock } from '../stores'; import { type TenantId } from '../tenant'; export declare class InMemoryObjectStore implements ObjectStore { #private; private readonly maintenance; constructor(clock: Clock, maintenance: { readonly ledger: InMemoryStorageLedger; readonly bytes: InMemoryObjectBytes; }); putManifest(tenant: TenantId, input: ObjectManifestInput): Promise; commit(tenant: TenantId, input: ObjectCommitInput): Promise; get(tenant: TenantId, hash: ContentHash): Promise; list(tenant: TenantId, query: ObjectListQuery): Promise; addReference(tenant: TenantId, input: ObjectReferenceInput): Promise; removeReference(tenant: TenantId, input: ObjectReferenceInput): Promise; markDeletePending(tenant: TenantId, hash: ContentHash): Promise; markDeleted(tenant: TenantId, hash: ContentHash): Promise; collectExpired(tenant: TenantId, input: ObjectCollectExpiredInput): Promise; } export interface InMemoryObjectBytes { deleteObject(tenant: TenantId, hash: ContentHash): void; }