import type * as Firestore from './types'; /** * Creates a write batch, used for performing multiple writes as a single atomic unit. * Similar to the SDK's [writeBatch](https://firebase.google.com/docs/reference/js/firestore_.md#writebatch). * * Reference: {@link https://firebase.google.com/docs/firestore/reference/rest/v1/projects.databases.documents/commit} * * @param firestore The DB instance. */ export declare const batch: ({ jwt, project_id }: Firestore.DB) => { /** * Adds a set operation to the batch. If the document does not yet exist, it will be created. * If you provide `merge: true`, the provided fields will be merged into the existing document. * * @param paths The path segments to the document. * @param fields The fields to write. * @param options Optional settings (e.g., `{ merge: true }`). */ set>(paths: string[], fields: Fields, options?: { merge?: boolean; }): void; /** * Adds an update operation to the batch. The document must already exist. * * @param paths The path segments to the document. * @param fields The fields to update. */ update>(paths: string[], fields: Fields): void; /** * Adds a delete operation to the batch. * * @param paths The path segments to the document. */ delete(paths: string[]): void; /** * Commits all of the writes in this write batch as a single atomic unit. * * @returns The commit response containing write results and commit time. */ commit(): Promise; };