import Connection from '../../connection/grpc.js'; import { ConsistencyLevel } from '../../index.js'; import { DbVersionSupport } from '../../utils/dbVersion.js'; import { BatchObject, BatchReference, ErrorObject, ErrorReference } from '../index.js'; type InternalError = { index: number; message: string; entry: E; type: 'error'; }; type InternalSuccess = { index: number; uuid?: string; beacon?: string; type: 'success'; }; export declare const isInternalError: (obj: InternalError | InternalSuccess) => obj is InternalError; export interface Batching { addObject: (obj: BatchObject) => Promise; addReference: (ref: BatchReference) => Promise; stop: () => Promise; hasErrors: () => boolean; uuids: () => Record; beacons: () => Record; objErrors: () => Record>; refErrors: () => Record; } export interface Batch { stream: (consistencyLevel?: ConsistencyLevel) => Promise; } export default function (connection: Connection, dbVersionSupport: DbVersionSupport): Batch; export declare class Queue { private resolvers; private promises; constructor(); _add(): void; _readd(promise: Promise): void; push(t: T): void; pull(timeout?: number): Promise; get length(): number; } export {};