import type { S3Config } from '../../resource/s3/config.ts'; /** * One JSON-record-per-object client with ETag-anchored CAS. * * The generic building block both S3 stores share (mirroring how the * Redis stores share one cas.lua): a record is one object at * `{prefix}{name}.json`, and a conditional write anchors on the exact * ETag the compare-read returned, so the generation check and the * write hit the same stored version. Immutable-blob planes never need * this; it exists only for the few mutable control-plane cells. * Mirrors the Python S3RecordClient. */ export declare class S3RecordClient { private readonly config; private readonly prefix; private clientPromise; constructor(config: S3Config, prefix: string); private client; key(name: string): string; /** Read one record; `[fields, etag]`, `[null, '']` when absent. */ get(name: string): Promise<[Record | null, string]>; put(name: string, fields: Record): Promise; /** * Write one record iff its stored generation matches. * * Compare-read the record, check the generation client-side, then * make the write conditional on the exact version read: If-None-Match * for create (expected 0, nothing stored), If-Match on the read ETag * otherwise. A 412/409 means another writer moved the record between * our read and write; the caller adopts and retries. */ casPut(name: string, fields: Record, expectedGeneration: number): Promise; listNames(): Promise; /** Every stored record, keyed by name; batch-first (one list, then parallel reads). */ loadAll(): Promise>>; delete(names: readonly string[]): Promise; clear(): Promise; close(): Promise; } //# sourceMappingURL=s3.d.ts.map