import type { LogContext } from '@rocicorp/logger'; import type { Enum } from '../../../shared/src/enum.ts'; import { BTreeRead } from '../btree/read.ts'; import { BTreeWrite } from '../btree/write.ts'; import type { FrozenCookie } from '../cookies.ts'; import type { Write as DagWrite } from '../dag/store.ts'; import * as FormatVersion from '../format-version-enum.ts'; import type { FrozenJSONValue } from '../frozen-json.ts'; import { type Hash } from '../hash.ts'; import type { DiffComputationConfig } from '../sync/diff.ts'; import { DiffsMap } from '../sync/diff.ts'; import type { ClientID } from '../sync/ids.ts'; import { Commit, type Meta as CommitMeta } from './commit.ts'; import { IndexWrite } from './index.ts'; import { Read } from './read.ts'; type FormatVersion = Enum; export declare class Write extends Read { #private; map: BTreeWrite; readonly indexes: Map; constructor(dagWrite: DagWrite, map: BTreeWrite, basis: Commit | undefined, meta: CommitMeta, indexes: Map, clientID: ClientID, formatVersion: FormatVersion); /** * The value needs to be frozen since it is kept in memory and used later for * comparison as well as returned in `get`. */ put(lc: LogContext, key: string, value: FrozenJSONValue): Promise; getMutationID(): Promise; del(lc: LogContext, key: string): Promise; clear(): Promise; putCommit(): Promise>; commit(headName: string): Promise; commitWithDiffs(headName: string, diffConfig: DiffComputationConfig): Promise<[Hash, DiffsMap]>; close(): void; } export declare function newWriteLocal(basisHash: Hash, mutatorName: string, mutatorArgsJSON: FrozenJSONValue, originalHash: Hash | null, dagWrite: DagWrite, timestamp: number, clientID: ClientID, formatVersion: FormatVersion): Promise; export declare function newWriteSnapshotDD31(basisHash: Hash, lastMutationIDs: Record, cookieJSON: FrozenCookie, dagWrite: DagWrite, clientID: ClientID, formatVersion: FormatVersion): Promise; export declare function updateIndexes(lc: LogContext, indexes: Map, key: string, oldValGetter: () => Promise, newVal: FrozenJSONValue | undefined): Promise; export declare function readIndexesForWrite(commit: Commit, dagWrite: DagWrite, formatVersion: FormatVersion): Map; export declare function createIndexBTree(lc: LogContext, dagWrite: DagWrite, valueMap: BTreeRead, prefix: string, jsonPointer: string, allowEmpty: boolean, formatVersion: FormatVersion): Promise; export {}; //# sourceMappingURL=write.d.ts.map